Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API // Cleanup Gemfile #21

Open
18 of 19 tasks
AleksSenkou opened this issue Jan 28, 2017 · 11 comments
Open
18 of 19 tasks

API // Cleanup Gemfile #21

AleksSenkou opened this issue Jan 28, 2017 · 11 comments
Assignees

Comments

@AleksSenkou
Copy link

AleksSenkou commented Jan 28, 2017

Main Idea

  • Remove useless gems
  • Change requirements
  • Add necessary gems

Changes

  • Remove sass-rails

  • Remove uglifier

  • Remove coffee-rails

  • Remove jquery-rails

  • Remove turbolinks

  • Remove tzinfo-data

  • Remove 'jbuilder', '~> 2.4', because 2.5 is already included in Gemfile

  • Remove rails_layout

  • Remove pry-rescue

  • Remove spring-commands-rspec

  • Change gem 'rubocop' to gem 'rubocop', require: false

  • Change gem 'capistrano', '~> 3.0.1' to 3.6.x version

  • Remove capistrano-bundler

  • Add gem 'rack-cors', require: 'rack/cors'. Should be added by default + cors.rb initializer

  • No need in ruby '2.3.1'. It's already specified in .ruby-version file

  • Let's add pg gem specification, for example gem 'pg', '~> 0.18'

  • Let's not have duplicated :development groups

  • Gems should be installed into vendor/bundle folder, so use bundle install --path vendor/bundle instead of bundle install

  • Let's use new hash style, example gem 'simplecov', require: false instead of gem 'simplecov', :require=>false

Example

Rails API Gemfile

P.S. Ping me if you are not agree, or have better idea.
@AleksSenkou AleksSenkou changed the title Useless gems for api template Cleanup Gemfile Jan 28, 2017
@AleksSenkou AleksSenkou changed the title Cleanup Gemfile API // Cleanup Gemfile Jan 28, 2017
@AleksSenkou AleksSenkou self-assigned this Jan 28, 2017
@MProG
Copy link

MProG commented Jan 31, 2017

How often we do write admin panel for api app on rails? I think we should not remove rails-coffee, sass-rails, jquery-rails and others from gemfile.

@AleksSenkou
Copy link
Author

@MProG we don't need it at all.
it's front part of work, and we use react/redux etc. front tools for that
but I'm not sure // @roman-dubrovsky @Proghat

@MProG
Copy link

MProG commented Jan 31, 2017

@AleksSenkou React for admin panel??? This is not rationally. We can write simple admin panel on rails very fast and very cheap for customers.

@AleksSenkou
Copy link
Author

@MProG looks reasonable to use react admin panel instead of rails
check https://github.com/marmelab/react-admin please

@MProG
Copy link

MProG commented Feb 1, 2017

@AleksSenkou I think database_cleaner is useful for testing. Why gem 'pg', '~> 0.18', why not 0.17 or other version. I think base gem 'pg' is enough. And same question about capistrano gem

@MProG
Copy link

MProG commented Feb 1, 2017

@AleksSenkou
Copy link
Author

@MProG can you please provide useful example of database_cleaner with code. Maybe I'm loosing something(we don't use it for Vital api)

@MProG
Copy link

MProG commented Feb 1, 2017

@AleksSenkou In diffrent tests we can write some information on db. And this situations can results of work other tests is incorrect. If you test work with db you should call DatabaseCleane.clean in my opinion.

@AleksSenkou
Copy link
Author

@MProG

Why gem 'pg', '~> 0.18', why not 0.17 or other version. I think base gem 'pg' is enough
and
And same question about capistrano gem

we may have conflicts after bundle update without specifying gem versions

@AleksSenkou
Copy link
Author

@MProG

In diffrent tests we can write some information on db
we have many tests with real db entries and we don't use database_cleaner

check vital repo for examples

@MProG
Copy link

MProG commented Feb 1, 2017

@AleksSenkou I don't use byebug before but i wrote description and i think this is interesting gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants