rails_apps_composer 2.2.3 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rails_wizard/diagnostics.rb +3 -1
- data/recipes/controllers.rb +1 -0
- data/recipes/extras.rb +10 -12
- data/recipes/gems.rb +3 -3
- data/recipes/setup.rb +13 -2
- data/recipes/testing.rb +1 -1
- data/version.rb +1 -1
- metadata +4 -4
@@ -39,7 +39,9 @@ module RailsWizard
|
|
39
39
|
@@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'}
|
40
40
|
@@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'}
|
41
41
|
@@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
|
+
|
43
45
|
def self.recipes
|
44
46
|
@@recipes
|
45
47
|
end
|
data/recipes/controllers.rb
CHANGED
@@ -9,6 +9,7 @@ after_bundler do
|
|
9
9
|
end
|
10
10
|
if prefer :authorization, 'cancan'
|
11
11
|
inject_into_file 'app/controllers/application_controller.rb', :before => "\nend" do <<-RUBY
|
12
|
+
\n
|
12
13
|
rescue_from CanCan::AccessDenied do |exception|
|
13
14
|
redirect_to root_path, :alert => exception.message
|
14
15
|
end
|
data/recipes/extras.rb
CHANGED
@@ -14,15 +14,16 @@ if prefs[:ban_spiders]
|
|
14
14
|
end
|
15
15
|
|
16
16
|
## JSRUNTIME
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
if prefs[:jsruntime]
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
26
27
|
end
|
27
28
|
|
28
29
|
## RVMRC
|
@@ -112,9 +113,6 @@ config:
|
|
112
113
|
- ban_spiders:
|
113
114
|
type: boolean
|
114
115
|
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)?
|
118
116
|
- rvmrc:
|
119
117
|
type: boolean
|
120
118
|
prompt: Create a project-specific rvm gemset and .rvmrc?
|
data/recipes/gems.rb
CHANGED
@@ -10,14 +10,14 @@ insert_into_file 'Gemfile', "ruby '1.9.3'\n", :before => "gem 'rails', '3.2.6'"
|
|
10
10
|
if (prefs[:dev_webserver] == prefs[:prod_webserver])
|
11
11
|
gem 'thin', '>= 1.4.1' if prefer :dev_webserver, 'thin'
|
12
12
|
gem 'unicorn', '>= 4.3.1' if prefer :dev_webserver, 'unicorn'
|
13
|
-
gem 'puma', '>= 1.6.
|
13
|
+
gem 'puma', '>= 1.6.2' if prefer :dev_webserver, 'puma'
|
14
14
|
else
|
15
15
|
gem 'thin', '>= 1.4.1', :group => [:development, :test] if prefer :dev_webserver, 'thin'
|
16
16
|
gem 'unicorn', '>= 4.3.1', :group => [:development, :test] if prefer :dev_webserver, 'unicorn'
|
17
|
-
gem 'puma', '>= 1.6.
|
17
|
+
gem 'puma', '>= 1.6.2', :group => [:development, :test] if prefer :dev_webserver, 'puma'
|
18
18
|
gem 'thin', '>= 1.4.1', :group => :production if prefer :prod_webserver, 'thin'
|
19
19
|
gem 'unicorn', '>= 4.3.1', :group => :production if prefer :prod_webserver, 'unicorn'
|
20
|
-
gem 'puma', '>= 1.6.
|
20
|
+
gem 'puma', '>= 1.6.2', :group => :production if prefer :prod_webserver, 'puma'
|
21
21
|
end
|
22
22
|
|
23
23
|
## Database Adapter
|
data/recipes/setup.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/setup.rb
|
3
3
|
|
4
4
|
## Ruby on Rails
|
5
|
+
HOST_OS = RbConfig::CONFIG['host_os']
|
6
|
+
say_wizard "Your operating system is #{HOST_OS}."
|
5
7
|
say_wizard "You are using Ruby version #{RUBY_VERSION}."
|
6
8
|
say_wizard "You are using Rails version #{Rails::VERSION::STRING}."
|
7
9
|
|
@@ -62,8 +64,13 @@ if recipes.include? 'frontend'
|
|
62
64
|
prefs[:frontend] = multiple_choice "Front-end framework?", [["None", "none"], ["Twitter Bootstrap", "bootstrap"],
|
63
65
|
["Zurb Foundation", "foundation"], ["Skeleton", "skeleton"], ["Just normalize CSS for consistent styling", "normalize"]] unless prefs.has_key? :frontend
|
64
66
|
if prefer :frontend, 'bootstrap'
|
65
|
-
|
66
|
-
|
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
|
67
74
|
end
|
68
75
|
end
|
69
76
|
|
@@ -117,6 +124,10 @@ if (recipes.include? 'models') && (recipes.include? 'controllers') && (recipes.i
|
|
117
124
|
end
|
118
125
|
end
|
119
126
|
|
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
|
+
|
120
131
|
__END__
|
121
132
|
|
122
133
|
name: setup
|
data/recipes/testing.rb
CHANGED
@@ -94,7 +94,7 @@ RUBY
|
|
94
94
|
end
|
95
95
|
## TURNIP
|
96
96
|
if prefer :integration, 'turnip'
|
97
|
-
|
97
|
+
append_file '.rspec', '-r turnip/rspec'
|
98
98
|
inject_into_file 'spec/spec_helper.rb', "require 'turnip/capybara'\n", :after => "require 'rspec/rails'\n"
|
99
99
|
create_file 'spec/acceptance/steps/.gitkeep'
|
100
100
|
end
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_apps_composer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
@@ -201,7 +201,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
201
|
version: '0'
|
202
202
|
segments:
|
203
203
|
- 0
|
204
|
-
hash: -
|
204
|
+
hash: -2695024622024920926
|
205
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
206
|
none: false
|
207
207
|
requirements:
|
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
210
|
version: '0'
|
211
211
|
segments:
|
212
212
|
- 0
|
213
|
-
hash: -
|
213
|
+
hash: -2695024622024920926
|
214
214
|
requirements: []
|
215
215
|
rubyforge_project: rails_apps_composer
|
216
216
|
rubygems_version: 1.8.24
|