Skip to content

Commit 98ad61d

Browse files
committed
see CHANGELOG, bump version to 2.2.4
1 parent 31b20b6 commit 98ad61d

File tree

9 files changed

+40
-20
lines changed

9 files changed

+40
-20
lines changed

CHANGELOG.textile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
h1. CHANGELOG
22

3+
h2. 2.2.4 August 29, 2012
4+
5+
* improve 'setup' recipe to save diagnostics before anything can fail
6+
* improve 'setup' recipe to not offer "Twitter Bootstrap (Less)" to Windows users
7+
* improve 'extras' recipe to only ask Linux users about adding 'therubyracer' gem
8+
* fix 'setup' recipe for error introduced in version 2.2.3
9+
* update gem 'puma' from 1.6.1 to 1.6.2
10+
311
h2. 2.2.3 August 27, 2012
412

513
* fix 'setup', 'frontend', and 'controllers' recipes to allow CanCan authorization when OmniAuth authentication is selected

lib/rails_wizard/diagnostics.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ module Diagnostics
3939
@@prefs << {:railsapps=>"rails3-mongoid-omniauth", :database=>'mongodb', :orm=>'mongoid', :templates=>'erb', :unit_test=>'rspec', :integration=>'cucumber', :fixtures=>'factory_girl', :frontend=>'none', :email=>'none', :authentication=>'omniauth', :omniauth_provider=>'twitter', :authorization=>'none', :starter_app=>'users_app', :form_builder=>'none'}
4040
@@prefs << {:railsapps=>"rails3-subdomains", :database=>'mongodb', :orm=>'mongoid', :templates=>'haml', :unit_test=>'rspec', :integration=>'cucumber', :fixtures=>'factory_girl', :frontend=>'none', :email=>'gmail', :authentication=>'devise', :devise_modules=>'default', :authorization=>'none', :starter_app=>'subdomains_app', :form_builder=>'none'}
4141
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"rspec", :integration=>"capybara", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"none", :authentication=>"omniauth", :omniauth_provider=>"twitter", :authorization=>"cancan", :form_builder=>"none", :starter_app=>"admin_app"}
42-
42+
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"none", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"invitable", :authorization=>"cancan", :form_builder=>"simple_form", :starter_app=>"admin_app"}
43+
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"cancan", :form_builder=>"none", :starter_app=>"admin_app"}
44+
4345
def self.recipes
4446
@@recipes
4547
end
File renamed without changes.

recipes/controllers.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
end
1010
if prefer :authorization, 'cancan'
1111
inject_into_file 'app/controllers/application_controller.rb', :before => "\nend" do <<-RUBY
12+
\n
1213
rescue_from CanCan::AccessDenied do |exception|
1314
redirect_to root_path, :alert => exception.message
1415
end

recipes/extras.rb

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@
1414
end
1515

1616
## JSRUNTIME
17-
if config['jsruntime']
18-
prefs[:jsruntime] = true
19-
end
20-
if prefs[:jsruntime]
21-
say_wizard "recipe adding 'therubyracer' JavaScript runtime gem"
22-
# maybe it was already added for bootstrap-less?
23-
unless prefer :bootstrap, 'less'
24-
gem 'therubyracer', '>= 0.10.2', :group => :assets, :platform => :ruby
25-
end
17+
case RbConfig::CONFIG['host_os']
18+
when /linux/i
19+
prefs[:jsruntime] = yes_wizard? "Add 'therubyracer' JavaScript runtime (for Linux users without node.js)?" unless prefs.has_key? :jsruntime
20+
if prefs[:jsruntime]
21+
# was it already added for bootstrap-less?
22+
unless prefer :bootstrap, 'less'
23+
say_wizard "recipe adding 'therubyracer' JavaScript runtime gem"
24+
gem 'therubyracer', '>= 0.10.2', :group => :assets, :platform => :ruby
25+
end
26+
end
2627
end
2728

2829
## RVMRC
@@ -112,9 +113,6 @@
112113
- ban_spiders:
113114
type: boolean
114115
prompt: Set a robots.txt file to ban spiders?
115-
- jsruntime:
116-
type: boolean
117-
prompt: Add 'therubyracer' JavaScript runtime (for Linux users without node.js)?
118116
- rvmrc:
119117
type: boolean
120118
prompt: Create a project-specific rvm gemset and .rvmrc?

recipes/gems.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
if (prefs[:dev_webserver] == prefs[:prod_webserver])
1111
gem 'thin', '>= 1.4.1' if prefer :dev_webserver, 'thin'
1212
gem 'unicorn', '>= 4.3.1' if prefer :dev_webserver, 'unicorn'
13-
gem 'puma', '>= 1.6.1' if prefer :dev_webserver, 'puma'
13+
gem 'puma', '>= 1.6.2' if prefer :dev_webserver, 'puma'
1414
else
1515
gem 'thin', '>= 1.4.1', :group => [:development, :test] if prefer :dev_webserver, 'thin'
1616
gem 'unicorn', '>= 4.3.1', :group => [:development, :test] if prefer :dev_webserver, 'unicorn'
17-
gem 'puma', '>= 1.6.1', :group => [:development, :test] if prefer :dev_webserver, 'puma'
17+
gem 'puma', '>= 1.6.2', :group => [:development, :test] if prefer :dev_webserver, 'puma'
1818
gem 'thin', '>= 1.4.1', :group => :production if prefer :prod_webserver, 'thin'
1919
gem 'unicorn', '>= 4.3.1', :group => :production if prefer :prod_webserver, 'unicorn'
20-
gem 'puma', '>= 1.6.1', :group => :production if prefer :prod_webserver, 'puma'
20+
gem 'puma', '>= 1.6.2', :group => :production if prefer :prod_webserver, 'puma'
2121
end
2222

2323
## Database Adapter

recipes/setup.rb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/setup.rb
33

44
## Ruby on Rails
5+
HOST_OS = RbConfig::CONFIG['host_os']
6+
say_wizard "Your operating system is #{HOST_OS}."
57
say_wizard "You are using Ruby version #{RUBY_VERSION}."
68
say_wizard "You are using Rails version #{Rails::VERSION::STRING}."
79

@@ -62,8 +64,13 @@
6264
prefs[:frontend] = multiple_choice "Front-end framework?", [["None", "none"], ["Twitter Bootstrap", "bootstrap"],
6365
["Zurb Foundation", "foundation"], ["Skeleton", "skeleton"], ["Just normalize CSS for consistent styling", "normalize"]] unless prefs.has_key? :frontend
6466
if prefer :frontend, 'bootstrap'
65-
prefs[:bootstrap] = multiple_choice "Twitter Bootstrap version?", [["Twitter Bootstrap (Less)", "less"],
66-
["Twitter Bootstrap (Sass)", "sass"]] unless prefs.has_key? :bootstrap
67+
case HOST_OS
68+
when /mswin|windows/i
69+
prefs[:bootstrap] = multiple_choice "Twitter Bootstrap version?", [["Twitter Bootstrap (Sass)", "sass"]] unless prefs.has_key? :bootstrap
70+
else
71+
prefs[:bootstrap] = multiple_choice "Twitter Bootstrap version?", [["Twitter Bootstrap (Less)", "less"],
72+
["Twitter Bootstrap (Sass)", "sass"]] unless prefs.has_key? :bootstrap
73+
end
6774
end
6875
end
6976

@@ -117,6 +124,10 @@
117124
end
118125
end
119126

127+
# save diagnostics before anything can fail
128+
create_file "README", "RECIPES\n#{recipes.sort.inspect}\n"
129+
append_file "README", "PREFERENCES\n#{prefs.inspect}"
130+
120131
__END__
121132

122133
name: setup

recipes/testing.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
end
9595
## TURNIP
9696
if prefer :integration, 'turnip'
97-
append_to_file '.rspec', '-r turnip/rspec'
97+
append_file '.rspec', '-r turnip/rspec'
9898
inject_into_file 'spec/spec_helper.rb', "require 'turnip/capybara'\n", :after => "require 'rspec/rails'\n"
9999
create_file 'spec/acceptance/steps/.gitkeep'
100100
end

version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module RailsWizard
2-
VERSION = "2.2.3"
2+
VERSION = "2.2.4"
33
end

0 commit comments

Comments
 (0)