Permalink
Browse files

Use consistent order of the arguments

  • Loading branch information...
1 parent 026b6da commit fe21c8589fc44d3e08fb45baa4da8321a7c8f00c @rafaelfranca rafaelfranca committed Nov 1, 2013
Showing with 9 additions and 9 deletions.
  1. +9 −9 railties/lib/rails/generators/app_base.rb
@@ -171,21 +171,21 @@ def comment_if(value)
options[value] ? '# ' : ''
end
- class GemfileEntry < Struct.new(:name, :comment, :version, :options, :commented_out)
- def initialize(name, comment, version, options = {}, commented_out = false)
+ class GemfileEntry < Struct.new(:name, :version, :comment, :options, :commented_out)
+ def initialize(name, version, comment, options = {}, commented_out = false)
super
end
def self.github(name, github, comment = nil)
- new(name, comment, nil, github: github)
+ new(name, nil, comment, github: github)
end
def self.version(name, version, comment = nil)
- new(name, comment, version)
+ new(name, version, comment)
end
def self.path(name, path, comment = nil)
- new(name, comment, nil, path: path)
+ new(name, nil, comment, path: path)
end
def padding(max_width)
@@ -263,12 +263,12 @@ def jbuilder_gemfile_entry
def webconsole_gemfile_entry
comment = 'Run `rails console` in the browser. Read more: https://github.com/rails/web-console'
- GemfileEntry.new('web-console', comment, nil, group: :development)
+ GemfileEntry.new('web-console', nil, comment, group: :development)
end
def sdoc_gemfile_entry
comment = 'bundle exec rake doc:rails generates the API under doc/api.'
- GemfileEntry.new('sdoc', comment, nil, { :group => :doc, :require => false })
+ GemfileEntry.new('sdoc', nil, comment, { group: :doc, require: false })
end
def coffee_gemfile_entry
@@ -297,9 +297,9 @@ def javascript_gemfile_entry
def javascript_runtime_gemfile_entry
comment = 'See https://github.com/sstephenson/execjs#readme for more supported runtimes'
if defined?(JRUBY_VERSION)
- GemfileEntry.version 'therubyrhino', comment, nil
+ GemfileEntry.version 'therubyrhino', nil,comment
else
- GemfileEntry.new 'therubyracer', comment, nil, { :platforms => :ruby }, true
+ GemfileEntry.new 'therubyracer', nil, comment, { platforms: :ruby }, true
end
end

0 comments on commit fe21c85

Please sign in to comment.