rails_apps_composer 2.4.11 → 2.4.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64ba215e7b77575c286faa2d39e74edaaa9afb66
4
- data.tar.gz: 30df9d4448e44f4d8da249a3fe10350b86679f2b
3
+ metadata.gz: 004fa66d78dd32e045ff2368ec6354b029787cb2
4
+ data.tar.gz: e78d06ee9655948a86376509a5b3291ca12a09b7
5
5
  SHA512:
6
- metadata.gz: b65940dcd8715b4e4ba017ef7498940b8be213150dfbdb8a97bee70dd883fc1bc127ea5c9b5018d13ae61d73ba562e30b5eb098d8a75e429f87561b0e1f67009
7
- data.tar.gz: 71081f8697f2bd1ba8793d7b4c37157ab46fa64e49107c6c0ca9c6f7813f5ade39e06e7733b241e035e8ea7dec3d0f64bbfe8c680dbbc5a531ba7e7ee3fae3d6
6
+ metadata.gz: 7ff0f9b2b6c0d4d57e3956fd37887869868581a0495f63ac035548a2602800bce61479c5eb90501963a2804612ed89e0be6c1ac3bc9a1d7abb0fcac23d828a78
7
+ data.tar.gz: b39f0fb854fa1b64f00db509b05ff33d99666cd8e5fd195a64f42c39103988484dd8462090476b2254c832850f4467904a6f9d170f73ceb7bd4038e17cb3064a
data/recipes/apps4.rb CHANGED
@@ -13,7 +13,7 @@ if prefer :apps4, 'learn-rails'
13
13
  add_gem 'sqlite3', :group => :development
14
14
  add_gem 'pg', :group => :production
15
15
  add_gem 'thin', :group => :production
16
- add_gem 'rails_on_heroku', :group => :production
16
+ add_gem 'rails_12factor', :group => :production
17
17
 
18
18
  # >-------------------------------[ after_everything ]--------------------------------<
19
19
 
@@ -61,13 +61,7 @@ if prefer :apps4, 'learn-rails'
61
61
  copy_from_repo 'app/views/user_mailer/contact_email.html.erb', :repo => repo
62
62
  copy_from_repo 'app/views/user_mailer/contact_email.text.erb', :repo => repo
63
63
  copy_from_repo 'app/views/visitors/new.html.erb', :repo => repo
64
-
65
- # >-------------------------------[ Layouts ]--------------------------------<
66
-
67
- # if view files were installed previously, navogation links will be created
68
- if prefer :frontend, 'bootstrap'
69
- generate 'layout bootstrap2 -f'
70
- end
64
+ copy_from_repo 'app/views/layouts/_navigation.html.erb', :repo => repo
71
65
 
72
66
  # >-------------------------------[ Routes ]--------------------------------<
73
67
 
@@ -77,10 +71,7 @@ if prefer :apps4, 'learn-rails'
77
71
 
78
72
  # >-------------------------------[ Assets ]--------------------------------<
79
73
 
80
- copy_from_repo 'app/assets/javascripts/application.js', :repo => repo
81
74
  copy_from_repo 'app/assets/javascripts/segmentio.js', :repo => repo
82
- copy_from_repo 'app/assets/stylesheets/application.css.scss', :repo => repo
83
- copy_from_repo 'app/assets/stylesheets/bootstrap_and_overrides.css.scss', :repo => repo
84
75
 
85
76
  ### GIT ###
86
77
  git :add => '-A' if prefer :git, true
@@ -130,13 +121,7 @@ if prefer :apps4, 'rails-bootstrap'
130
121
 
131
122
  copy_from_repo 'app/views/pages/about.html.erb', :repo => repo
132
123
  copy_from_repo 'app/views/visitors/new.html.erb', :repo => repo
133
-
134
- # >-------------------------------[ Layouts ]--------------------------------<
135
-
136
- # if view files were installed previously, navogation links will be created
137
- if prefer :frontend, 'bootstrap'
138
- generate 'layout bootstrap2 -f'
139
- end
124
+ copy_from_repo 'app/views/layouts/_navigation.html.erb', :repo => repo
140
125
 
141
126
  # >-------------------------------[ Routes ]--------------------------------<
142
127
 
@@ -146,9 +131,7 @@ if prefer :apps4, 'rails-bootstrap'
146
131
 
147
132
  # >-------------------------------[ Assets ]--------------------------------<
148
133
 
149
- copy_from_repo 'app/assets/javascripts/application.js', :repo => repo
150
- copy_from_repo 'app/assets/stylesheets/application.css.scss', :repo => repo
151
- copy_from_repo 'app/assets/stylesheets/bootstrap_and_overrides.css.scss', :repo => repo
134
+ # no assets
152
135
 
153
136
  ### GIT ###
154
137
  git :add => '-A' if prefer :git, true
data/recipes/extras.rb CHANGED
@@ -111,11 +111,8 @@ case RbConfig::CONFIG['host_os']
111
111
  when /linux/i
112
112
  prefs[:jsruntime] = yes_wizard? "Add 'therubyracer' JavaScript runtime (for Linux users without node.js)?" unless prefs.has_key? :jsruntime
113
113
  if prefs[:jsruntime]
114
- # was it already added for bootstrap-less?
115
- unless prefer :bootstrap, 'less'
116
- say_wizard "recipe adding 'therubyracer' JavaScript runtime gem"
117
- add_gem 'therubyracer', :group => :assets, :platform => :ruby
118
- end
114
+ say_wizard "recipe adding 'therubyracer' JavaScript runtime gem"
115
+ add_gem 'therubyracer', :platform => :ruby
119
116
  end
120
117
  end
121
118
 
data/recipes/frontend.rb CHANGED
@@ -3,12 +3,19 @@
3
3
 
4
4
  after_bundler do
5
5
  say_wizard "recipe running after 'bundle install'"
6
- ### LAYOUTS ###
7
- copy_from_repo 'app/views/layouts/application.html.erb'
8
- copy_from_repo 'app/views/layouts/application-bootstrap.html.erb', :prefs => 'bootstrap'
9
- copy_from_repo 'app/views/layouts/_messages.html.erb'
10
- copy_from_repo 'app/views/layouts/_messages-bootstrap.html.erb', :prefs => 'bootstrap'
11
- copy_from_repo 'app/views/layouts/_navigation.html.erb'
6
+ # set up a front-end framework using the rails_layout gem
7
+ case prefs[:frontend]
8
+ when 'simple'
9
+ generate 'layout simple -f'
10
+ when 'bootstrap2'
11
+ generate 'layout bootstrap2 -f'
12
+ when 'bootstrap3'
13
+ generate 'layout bootstrap3 -f'
14
+ when 'foundation4'
15
+ generate 'layout foundation4 -f'
16
+ end
17
+
18
+ # specialized navigation partials
12
19
  if prefer :authorization, 'cancan'
13
20
  case prefs[:authentication]
14
21
  when 'devise'
@@ -21,35 +28,7 @@ after_bundler do
21
28
  copy_from_repo 'app/views/layouts/_navigation-omniauth.html.erb', :prefs => 'omniauth'
22
29
  end
23
30
  copy_from_repo 'app/views/layouts/_navigation-subdomains_app.html.erb', :prefs => 'subdomains_app'
24
- ## APPLICATION NAME
25
- application_layout_file = Dir['app/views/layouts/application.html.*'].first
26
- navigation_partial_file = Dir['app/views/layouts/_navigation.html.*'].first
27
- gsub_file application_layout_file, /App_Name/, "#{app_name.humanize.titleize}"
28
- gsub_file navigation_partial_file, /App_Name/, "#{app_name.humanize.titleize}"
29
- ### CSS ###
30
- copy_from_repo 'app/assets/stylesheets/application.css.scss'
31
- copy_from_repo 'app/assets/stylesheets/application-bootstrap.css.scss', :prefs => 'bootstrap'
32
- if prefer :bootstrap, 'less'
33
- generate 'bootstrap:install'
34
- insert_into_file 'app/assets/stylesheets/bootstrap_and_overrides.css.less', "body { padding-top: 60px; }\n", :after => "@import \"twitter/bootstrap/bootstrap\";\n"
35
- elsif prefer :bootstrap, 'sass'
36
- insert_into_file 'app/assets/javascripts/application.js', "//= require bootstrap\n", :after => "jquery_ujs\n"
37
- create_file 'app/assets/stylesheets/bootstrap_and_overrides.css.scss', <<-RUBY
38
- @import "bootstrap";
39
- body { padding-top: 60px; }
40
- @import "bootstrap-responsive";
41
- RUBY
42
- elsif prefer :frontend, 'foundation'
43
- insert_into_file 'app/assets/stylesheets/application.css.scss', " *= require foundation_and_overrides\n", :after => "require_self\n"
44
- elsif prefer :frontend, 'skeleton'
45
- copy_from 'https://raw.github.com/necolas/normalize.css/master/normalize.css', 'app/assets/stylesheets/normalize.css'
46
- copy_from 'https://raw.github.com/dhgamache/Skeleton/master/stylesheets/base.css', 'app/assets/stylesheets/base.css'
47
- copy_from 'https://raw.github.com/dhgamache/Skeleton/master/stylesheets/layout.css', 'app/assets/stylesheets/layout.css'
48
- copy_from 'https://raw.github.com/dhgamache/Skeleton/master/stylesheets/skeleton.css', 'app/assets/stylesheets/skeleton.css'
49
- elsif prefer :frontend, 'normalize'
50
- copy_from 'https://raw.github.com/necolas/normalize.css/master/normalize.css', 'app/assets/stylesheets/normalize.css'
51
- end
52
- remove_file 'app/assets/stylesheets/application.css'
31
+
53
32
  ### GIT ###
54
33
  git :add => '-A' if prefer :git, true
55
34
  git :commit => '-qm "rails_apps_composer: front-end framework"' if prefer :git, true
data/recipes/gems.rb CHANGED
@@ -99,21 +99,20 @@ add_gem 'fabrication', :group => [:development, :test] if prefer :fixtures, 'fab
99
99
  add_gem 'machinist', :group => :test if prefer :fixtures, 'machinist'
100
100
 
101
101
  ## Front-end Framework
102
- add_gem 'bootstrap-sass', '~> 2.3.2.2' if prefer :bootstrap, 'sass'
103
- add_gem 'rails_layout', :group => :development if prefer :bootstrap, 'sass'
104
- if prefer :frontend, 'foundation'
105
- if rails_4?
106
- add_gem 'compass-rails', '~> 2.0.alpha.0'
107
- else
108
- add_gem 'compass-rails', :group => assets_group
109
- end
110
- end
111
- add_gem 'zurb-foundation', :group => assets_group if prefer :frontend, 'foundation'
112
- if prefer :bootstrap, 'less'
113
- add_gem 'less-rails', :group => assets_group
114
- add_gem 'twitter-bootstrap-rails', :group => assets_group
115
- # install gem 'therubyracer' to use Less
116
- add_gem 'therubyracer', :group => assets_group, :platform => :ruby
102
+ add_gem 'rails_layout', :group => :development
103
+ case prefs[:frontend]
104
+ when 'bootstrap2'
105
+ add_gem 'bootstrap-sass', '~> 2.3.2.2'
106
+ when 'bootstrap3'
107
+ add_gem 'bootstrap-sass', '>= 3.0.0.0'
108
+ when 'foundation4'
109
+ if rails_4?
110
+ add_gem 'zurb-foundation'
111
+ add_gem 'compass-rails', '~> 2.0.alpha.0'
112
+ else
113
+ add_gem 'zurb-foundation', :group => assets_group
114
+ add_gem 'compass-rails', '~> 1.0.3', :group => assets_group
115
+ end
117
116
  end
118
117
 
119
118
  ## Email
@@ -139,11 +138,7 @@ if prefer :authorization, 'cancan'
139
138
  end
140
139
 
141
140
  ## Form Builder
142
- if rails_4?
143
- add_gem 'simple_form', '>= 3.0.0.rc' if prefer :form_builder, 'simple_form'
144
- else
145
- add_gem 'simple_form' if prefer :form_builder, 'simple_form'
146
- end
141
+ add_gem 'simple_form' if prefer :form_builder, 'simple_form'
147
142
 
148
143
  ## Membership App
149
144
  if prefer :railsapps, 'rails-stripe-membership-saas'
@@ -232,16 +227,21 @@ end # after_bundler
232
227
 
233
228
  ### GENERATORS ###
234
229
  after_bundler do
235
- ## Front-end Framework
236
- generate 'foundation:install' if prefer :frontend, 'foundation'
237
230
  ## Form Builder
238
231
  if prefer :form_builder, 'simple_form'
239
- if prefer :frontend, 'bootstrap'
240
- say_wizard "recipe installing simple_form for use with Twitter Bootstrap"
241
- generate 'simple_form:install --bootstrap'
242
- else
243
- say_wizard "recipe installing simple_form"
244
- generate 'simple_form:install'
232
+ case prefs[:frontend]
233
+ when 'bootstrap2'
234
+ say_wizard "recipe installing simple_form for use with Twitter Bootstrap"
235
+ generate 'simple_form:install --bootstrap'
236
+ when 'bootstrap3'
237
+ say_wizard "recipe installing simple_form for use with Twitter Bootstrap"
238
+ generate 'simple_form:install --bootstrap'
239
+ when 'foundation4'
240
+ say_wizard "recipe installing simple_form for use with Zurb Foundation"
241
+ generate 'simple_form:install --foundation'
242
+ else
243
+ say_wizard "recipe installing simple_form"
244
+ generate 'simple_form:install'
245
245
  end
246
246
  end
247
247
  ## Figaro Gem
@@ -257,6 +257,7 @@ after_bundler do
257
257
  # For example, setting:
258
258
  # GMAIL_USERNAME: Your_Gmail_Username
259
259
  # makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
260
+
260
261
  FILE
261
262
  end
262
263
  end
data/recipes/railsapps.rb CHANGED
@@ -48,7 +48,6 @@ case prefs[:apps4]
48
48
  prefs[:integration] = false
49
49
  prefs[:fixtures] = false
50
50
  prefs[:frontend] = false
51
- prefs[:bootstrap] = false
52
51
  prefs[:email] = false
53
52
  prefs[:authentication] = false
54
53
  prefs[:devise_modules] = false
@@ -66,8 +65,7 @@ case prefs[:apps4]
66
65
  prefs[:unit_test] = false
67
66
  prefs[:integration] = false
68
67
  prefs[:fixtures] = false
69
- prefs[:frontend] = 'bootstrap'
70
- prefs[:bootstrap] = 'sass'
68
+ prefs[:frontend] = 'foundation4'
71
69
  prefs[:email] = 'gmail'
72
70
  prefs[:authentication] = false
73
71
  prefs[:devise_modules] = false
@@ -83,8 +81,7 @@ case prefs[:apps4]
83
81
  prefs[:unit_test] = false
84
82
  prefs[:integration] = false
85
83
  prefs[:fixtures] = false
86
- prefs[:frontend] = 'bootstrap'
87
- prefs[:bootstrap] = 'sass'
84
+ prefs[:frontend] = 'bootstrap2'
88
85
  prefs[:email] = 'none'
89
86
  prefs[:authentication] = false
90
87
  prefs[:devise_modules] = false
@@ -110,8 +107,7 @@ case prefs[:railsapps]
110
107
  prefs[:unit_test] = 'rspec'
111
108
  prefs[:integration] = 'cucumber'
112
109
  prefs[:fixtures] = 'factory_girl'
113
- prefs[:frontend] = 'bootstrap'
114
- prefs[:bootstrap] = 'sass'
110
+ prefs[:frontend] = 'bootstrap2'
115
111
  prefs[:email] = 'gmail'
116
112
  prefs[:authentication] = 'devise'
117
113
  prefs[:devise_modules] = 'default'
@@ -127,8 +123,7 @@ case prefs[:railsapps]
127
123
  prefs[:unit_test] = 'rspec'
128
124
  prefs[:integration] = 'cucumber'
129
125
  prefs[:fixtures] = 'factory_girl'
130
- prefs[:frontend] = 'bootstrap'
131
- prefs[:bootstrap] = 'sass'
126
+ prefs[:frontend] = 'bootstrap2'
132
127
  prefs[:email] = 'gmail'
133
128
  prefs[:authentication] = 'devise'
134
129
  prefs[:devise_modules] = 'default'
@@ -144,8 +139,7 @@ case prefs[:railsapps]
144
139
  prefs[:unit_test] = 'rspec'
145
140
  prefs[:integration] = 'cucumber'
146
141
  prefs[:fixtures] = 'factory_girl'
147
- prefs[:frontend] = 'bootstrap'
148
- prefs[:bootstrap] = 'sass'
142
+ prefs[:frontend] = 'bootstrap2'
149
143
  prefs[:email] = 'mandrill'
150
144
  prefs[:authentication] = 'devise'
151
145
  prefs[:devise_modules] = 'confirmable'
@@ -177,8 +171,7 @@ case prefs[:railsapps]
177
171
  prefs[:unit_test] = 'rspec'
178
172
  prefs[:integration] = 'cucumber'
179
173
  prefs[:fixtures] = 'factory_girl'
180
- prefs[:frontend] = 'bootstrap'
181
- prefs[:bootstrap] = 'sass'
174
+ prefs[:frontend] = 'bootstrap2'
182
175
  prefs[:email] = 'gmail'
183
176
  prefs[:authentication] = 'devise'
184
177
  prefs[:devise_modules] = 'default'
data/recipes/readme.rb CHANGED
@@ -47,11 +47,9 @@ after_everything do
47
47
  gsub_file "README.textile", /RSpec/, "RSpec and Machinist" if prefer :fixtures, 'machinist'
48
48
 
49
49
  # Front-end Framework
50
- gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Twitter Bootstrap (Sass)" if prefer :bootstrap, 'sass'
51
- gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Twitter Bootstrap (Less)" if prefer :bootstrap, 'less'
52
- gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Zurb Foundation" if prefer :frontend, 'foundation'
53
- gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Skeleton" if prefer :frontend, 'skeleton'
54
- gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Normalized CSS" if prefer :frontend, 'normalize'
50
+ gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Twitter Bootstrap 2.3 (Sass)" if prefer :frontend, 'bootstrap2'
51
+ gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Twitter Bootstrap 3.0 (Sass)" if prefer :frontend, 'bootstrap3'
52
+ gsub_file "README.textile", /Front-end Framework: None/, "Front-end Framework: Zurb Foundation" if prefer :frontend, 'foundation4'
55
53
 
56
54
  # Form Builder
57
55
  gsub_file "README.textile", /Form Builder: None/, "Form Builder: SimpleForm" if prefer :form_builder, 'simple_form'
data/recipes/setup.rb CHANGED
@@ -60,17 +60,8 @@ end
60
60
 
61
61
  ## Front-end Framework
62
62
  if recipes.include? 'frontend'
63
- prefs[:frontend] = multiple_choice "Front-end framework?", [["None", "none"], ["Twitter Bootstrap", "bootstrap"],
64
- ["Zurb Foundation", "foundation"], ["Skeleton", "skeleton"], ["Just normalize CSS for consistent styling", "normalize"]] unless prefs.has_key? :frontend
65
- if prefer :frontend, 'bootstrap'
66
- case HOST_OS
67
- when /mswin|windows/i
68
- prefs[:bootstrap] = multiple_choice "Twitter Bootstrap version?", [["Twitter Bootstrap (Sass)", "sass"]] unless prefs.has_key? :bootstrap
69
- else
70
- prefs[:bootstrap] = multiple_choice "Twitter Bootstrap version?", [["Twitter Bootstrap (Less)", "less"],
71
- ["Twitter Bootstrap (Sass)", "sass"]] unless prefs.has_key? :bootstrap
72
- end
73
- end
63
+ prefs[:frontend] = multiple_choice "Front-end framework?", [["None", "none"], ["Zurb Foundation 4.0", "foundation4"],
64
+ ["Twitter Bootstrap 3.0", "bootstrap3"], ["Twitter Bootstrap 2.3", "bootstrap2"], ["Simple CSS", "simple"]] unless prefs.has_key? :frontend
74
65
  end
75
66
 
76
67
  ## Email
data/templates/layout.erb CHANGED
@@ -186,11 +186,7 @@ end
186
186
  # >-----------------------------[ Run 'Bundle Install' ]-------------------------------<
187
187
 
188
188
  say_wizard "Installing gems. This will take a while."
189
- if prefs.has_key? :bundle_path
190
- run "bundle install --without production --path #{prefs[:bundle_path]}"
191
- else
192
- run 'bundle install --without production'
193
- end
189
+ run 'bundle install --without production'
194
190
  say_wizard "Updating gem paths."
195
191
  Gem.clear_paths
196
192
  # >-----------------------------[ Run 'After Bundler' Callbacks ]-------------------------------<
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.4.11"
2
+ VERSION = "2.4.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_apps_composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.11
4
+ version: 2.4.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-20 00:00:00.000000000 Z
11
+ date: 2013-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  requirements: []
194
194
  rubyforge_project: rails_apps_composer
195
- rubygems_version: 2.1.3
195
+ rubygems_version: 2.0.7
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: A version of the RailsWizard gem with custom recipes for Rails starter apps.