rails_apps_composer 1.0.20 → 1.0.21

Sign up to get free protection for your applications and to get access to all the features.
data/recipes/css_setup.rb CHANGED
@@ -31,8 +31,8 @@ ul.hmenu li {
31
31
 
32
32
  CSS
33
33
 
34
- # Add a stylesheet for use with HTML5 Boilerplate
35
- css_boilerplate = <<-CSS
34
+ # Add a stylesheet for use with HTML5
35
+ css_html5 = <<-CSS
36
36
 
37
37
  header nav ul {
38
38
  list-style: none;
@@ -61,7 +61,7 @@ CSS
61
61
  create_file 'public/stylesheets/application.css', css
62
62
  else
63
63
  if recipes.include? 'html5'
64
- append_file 'app/assets/stylesheets/application.css', css_boilerplate
64
+ append_file 'app/assets/stylesheets/application.css', css_html5
65
65
  else
66
66
  append_file 'app/assets/stylesheets/application.css', css
67
67
  end
data/recipes/devise.rb CHANGED
@@ -7,7 +7,7 @@ if config['devise']
7
7
  gem 'devise', '1.3.4'
8
8
  else
9
9
  # for Rails 3.1+, use optimistic versioning for gems
10
- gem 'devise', '>= 1.4.7'
10
+ gem 'devise', '>= 1.4.9'
11
11
  end
12
12
  else
13
13
  recipes.delete('devise')
data/recipes/html5.rb CHANGED
@@ -1,135 +1,76 @@
1
1
  # Application template recipe for the rails_apps_composer. Check for a newer version here:
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/html5.rb
3
3
 
4
- if config['html5']
5
- if recipes.include? 'rails 3.1'
6
- gem 'frontend-helpers'
7
- after_bundler do
8
- say_wizard "HTML5 Boilerplate recipe running 'after bundler'"
9
- # Download HTML5 Boilerplate JavaScripts
10
- get "https://raw.github.com/paulirish/html5-boilerplate/master/js/libs/modernizr-2.0.6.min.js", "app/assets/javascripts/modernizr.js"
11
- # Download stylesheet to normalize or reset CSS
12
- case config['css_option']
13
- when 'skeleton'
14
- get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
15
- get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/base.css", "app/assets/stylesheets/base.css.scss"
16
- get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/layout.css", "app/assets/stylesheets/layout.css.scss"
17
- get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/skeleton.css", "app/assets/stylesheets/skeleton.css.scss"
18
- get "https://raw.github.com/dhgamache/Skeleton/master/javascripts/tabs.js", "app/assets/javascripts/tabs.js"
19
- when 'normalize'
20
- get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
21
- when 'reset'
22
- get "https://raw.github.com/paulirish/html5-boilerplate/master/css/style.css", "app/assets/stylesheets/reset.css.scss"
23
- end
24
- # Download HTML5 Boilerplate Site Root Assets
25
- get "https://raw.github.com/paulirish/html5-boilerplate/master/apple-touch-icon-114x114-precomposed.png", "public/apple-touch-icon-114x114-precomposed.png"
26
- get "https://raw.github.com/paulirish/html5-boilerplate/master/apple-touch-icon-57x57-precomposed.png", "public/apple-touch-icon-57x57-precomposed.png"
27
- get "https://raw.github.com/paulirish/html5-boilerplate/master/apple-touch-icon-72x72-precomposed.png", "public/apple-touch-icon-72x72-precomposed.png"
28
- get "https://raw.github.com/paulirish/html5-boilerplate/master/apple-touch-icon-precomposed.png", "public/apple-touch-icon-precomposed.png"
29
- get "https://raw.github.com/paulirish/html5-boilerplate/master/apple-touch-icon.png", "public/apple-touch-icon.png"
30
- get "https://raw.github.com/paulirish/html5-boilerplate/master/crossdomain.xml", "public/crossdomain.xml"
31
- get "https://raw.github.com/paulirish/html5-boilerplate/master/humans.txt", "public/humans.txt"
32
- # Set up the default application layout
33
- if recipes.include? 'haml'
34
- # create some Haml helpers
35
- # We have to use single-quote-style-heredoc to avoid interpolation.
36
- inject_into_file 'app/controllers/application_controller.rb', :after => "protect_from_forgery\n" do <<-'RUBY'
37
- include FrontendHelpers::Html5Helper
38
- RUBY
39
- end
40
- # Haml version of default application layout
41
- remove_file 'app/views/layouts/application.html.erb'
42
- remove_file 'app/views/layouts/application.html.haml'
43
- # There is Haml code in this script. Changing the indentation is perilous between HAMLs.
44
- create_file 'app/views/layouts/application.html.haml' do <<-HAML
45
- - html_tag class: 'no-js' do
46
- %head
47
- %title #{app_name}
48
- %meta{:charset => "utf-8"}
49
- %meta{"http-equiv" => "X-UA-Compatible", :content => "IE=edge,chrome=1"}
50
- %meta{:name => "viewport", :content => "width=device-width, initial-scale=1, maximum-scale=1"}
51
- = stylesheet_link_tag :application
52
- = javascript_include_tag :application
53
- = csrf_meta_tags
54
- %body{:class => params[:controller]}
55
- #container.container
56
- %header
57
- - flash.each do |name, msg|
58
- = content_tag :div, msg, :id => "flash_\#{name}" if msg.is_a?(String)
59
- #main{:role => "main"}
60
- = yield
61
- %footer
62
- HAML
63
- end
64
- else
65
- # ERB version of default application layout
66
- remove_file 'app/views/layouts/application.html.erb'
67
- remove_file 'app/views/layouts/application.html.haml'
68
- create_file 'app/views/layouts/application.html.erb' do <<-ERB
69
- <!doctype html>
70
- <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
71
- <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
72
- <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
73
- <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
74
- <head>
75
- <meta charset="utf-8">
76
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
77
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
78
- <title>#{app_name}</title>
79
- <meta name="description" content="">
80
- <meta name="author" content="">
81
- <%= stylesheet_link_tag "application" %>
82
- <%= javascript_include_tag "application" %>
83
- <%= csrf_meta_tags %>
84
- </head>
85
- <body class="<%= params[:controller] %>">
86
- <div id="container" class="container">
87
- <header>
88
- </header>
89
- <div id="main" role="main">
90
- <%= yield %>
91
- </div>
92
- <footer>
93
- </footer>
94
- </div> <!--! end of #container -->
95
- </body>
96
- </html>
97
- ERB
98
- end
99
- inject_into_file 'app/views/layouts/application.html.erb', :after => "<header>\n" do
100
- <<-ERB
101
- <%- flash.each do |name, msg| -%>
102
- <%= content_tag :div, msg, :id => "flash_\#{name}" if msg.is_a?(String) %>
103
- <%- end -%>
104
- ERB
105
- end
106
- end
4
+ if recipes.include? 'rails 3.1'
5
+ case config['css_option']
6
+ when 'foundation'
7
+ # https://github.com/zurb/foundation-rails
8
+ gem 'zurb-foundation'
9
+ when 'bootstrap'
10
+ # https://github.com/seyhunak/twitter-bootstrap-rails
11
+ gem 'twitter-bootstrap-rails'
12
+ end
13
+ after_bundler do
14
+ say_wizard "HTML5 recipe running 'after bundler'"
15
+ # add a humans.txt file
16
+ get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/humans.txt", "public/humans.txt"
17
+ # install a front-end framework for HTML5 and CSS3
18
+ case config['css_option']
19
+ when 'nothing'
20
+ say_wizard "no HTML5 front-end framework selected"
21
+ when 'foundation'
22
+ say_wizard "installing Zurb Foundation HTML5 framework"
23
+ insert_into_file "app/assets/javascripts/application.js", "//= require foundation\n", :after => "jquery_ujs\n"
24
+ insert_into_file "app/assets/stylesheets/application.css", " *= require foundation\n", :after => "require_self\n"
25
+ when 'bootstrap'
26
+ say_wizard "installing Twitter Bootstrap HTML5 framework"
27
+ insert_into_file "app/assets/javascripts/application.js", "//= require twitter/bootstrap\n", :after => "jquery_ujs\n"
28
+ insert_into_file "app/assets/stylesheets/application.css", " *= require twitter/bootstrap\n", :after => "require_self\n"
29
+ when 'skeleton'
30
+ say_wizard "installing Skeleton HTML5 framework"
31
+ get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
32
+ get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/base.css", "app/assets/stylesheets/base.css.scss"
33
+ get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/layout.css", "app/assets/stylesheets/layout.css.scss"
34
+ get "https://raw.github.com/dhgamache/Skeleton/master/stylesheets/skeleton.css", "app/assets/stylesheets/skeleton.css.scss"
35
+ get "https://raw.github.com/dhgamache/Skeleton/master/javascripts/tabs.js", "app/assets/javascripts/tabs.js"
36
+ when 'normalize'
37
+ say_wizard "normalizing CSS for consistent styling"
38
+ get "https://raw.github.com/necolas/normalize.css/master/normalize.css", "app/assets/stylesheets/normalize.css.scss"
39
+ end
40
+ # Set up the default application layout
41
+ if recipes.include? 'haml'
42
+ # Haml version of default application layout
43
+ remove_file 'app/views/layouts/application.html.erb'
44
+ remove_file 'app/views/layouts/application.html.haml'
45
+ get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/views/layout/application.html.haml", "app/views/layouts/application.html.haml"
46
+ gsub_file "app/views/layouts/application.html.haml", /App_Name/, "#{app_name.humanize.titleize}"
47
+ else
48
+ # ERB version of default application layout
49
+ remove_file 'app/views/layouts/application.html.erb'
50
+ remove_file 'app/views/layouts/application.html.haml'
51
+ get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/views/layout/application.html.erb", "app/views/layouts/application.html.erb"
52
+ gsub_file "app/views/layouts/application.html.erb", /App_Name/, "#{app_name.humanize.titleize}"
107
53
  end
108
- elsif recipes.include? 'rails 3.0'
109
- say_wizard "Not supported for Rails version #{Rails::VERSION::STRING}. HTML5 Boilerplate recipe skipped."
110
- else
111
- say_wizard "Don't know what to do for Rails version #{Rails::VERSION::STRING}. HTML5 Boilerplate recipe skipped."
112
54
  end
55
+ elsif recipes.include? 'rails 3.0'
56
+ say_wizard "Not supported for Rails version #{Rails::VERSION::STRING}. HTML5 recipe skipped."
113
57
  else
114
- say_wizard "HTML5 Boilerplate recipe skipped. No CSS styles added."
115
- recipes.delete('html5')
58
+ say_wizard "Don't know what to do for Rails version #{Rails::VERSION::STRING}. HTML5 recipe skipped."
116
59
  end
117
60
 
61
+
118
62
  __END__
119
63
 
120
64
  name: html5
121
- description: "Install HTML5 Boilerplate."
65
+ description: "Install a front-end framework for HTML5 and CSS3."
122
66
  author: RailsApps
123
67
 
124
68
  category: other
125
69
  tags: [utilities, configuration]
126
70
 
127
71
  config:
128
- - html5:
129
- type: boolean
130
- prompt: Would you like to install HTML5 Boilerplate?
131
72
  - css_option:
132
73
  type: multiple_choice
133
- prompt: "If you've chosen HTML5 Boilerplate, how do you like your CSS?"
134
- choices: [["Do nothing", nothing], ["Normalize CSS and add Skeleton styling", skeleton], ["Normalize CSS for consistent styling across browsers", normalize], ["Completely reset all CSS to eliminate styling", reset]]
74
+ prompt: "Which front-end framework would you like for HTML5 and CSS3?"
75
+ choices: [["None", nothing], ["Zurb Foundation", foundation], ["Twitter Bootstrap", bootstrap], ["Skeleton", skeleton], ["Just normalize CSS for consistent styling", normalize]]
135
76
 
data/recipes/mongoid.rb CHANGED
@@ -10,8 +10,8 @@ if config['mongoid']
10
10
  gem 'mongoid', '2.0.2'
11
11
  else
12
12
  # for Rails 3.1+, use optimistic versioning for gems
13
- gem 'bson_ext', '>= 1.4.0'
14
- gem 'mongoid', '>= 2.3.0'
13
+ gem 'bson_ext', '>= 1.4.1'
14
+ gem 'mongoid', '>= 2.3.2'
15
15
  end
16
16
  else
17
17
  recipes.delete('mongoid')
data/recipes/omniauth.rb CHANGED
@@ -7,7 +7,7 @@ if config['omniauth']
7
7
  gem 'omniauth', '0.2.6'
8
8
  else
9
9
  # for Rails 3.1+, use optimistic versioning for gems
10
- gem 'omniauth', '>= 0.3.0'
10
+ gem 'omniauth', '>= 0.3.2'
11
11
  end
12
12
  else
13
13
  recipes.delete('omniauth')
data/recipes/rspec.rb CHANGED
@@ -19,7 +19,7 @@ if config['rspec']
19
19
  end
20
20
  else
21
21
  # for Rails 3.1+, use optimistic versioning for gems
22
- gem 'rspec-rails', '>= 2.6.1', :group => [:development, :test]
22
+ gem 'rspec-rails', '>= 2.7.0', :group => [:development, :test]
23
23
  if recipes.include? 'mongoid'
24
24
  # use the database_cleaner gem to reset the test database
25
25
  gem 'database_cleaner', '>= 0.6.7', :group => :test
@@ -28,7 +28,7 @@ if config['rspec']
28
28
  end
29
29
  if config['factory_girl']
30
30
  # use the factory_girl gem for test fixtures
31
- gem 'factory_girl_rails', '>= 1.2.0', :group => :test
31
+ gem 'factory_girl_rails', '>= 1.3.0', :group => :test
32
32
  end
33
33
  end
34
34
  else
data/templates/layout.erb CHANGED
@@ -51,7 +51,7 @@ say_wizard "Checking configuration. Please confirm your preferences."
51
51
 
52
52
  prepend_file 'Gemfile' do <<-RUBY
53
53
  require 'rbconfig'
54
- HOST_OS = Config::CONFIG['host_os']
54
+ HOST_OS = RbConfig::CONFIG['host_os']
55
55
 
56
56
  RUBY
57
57
  end
@@ -60,7 +60,7 @@ if recipes.include? 'rails 3.1'
60
60
  append_file 'Gemfile' do <<-RUBY
61
61
  # install a Javascript runtime for linux
62
62
  if HOST_OS =~ /linux/i
63
- gem 'therubyracer', '>= 0.8.2'
63
+ gem 'therubyracer', '>= 0.9.8'
64
64
  end
65
65
 
66
66
  RUBY
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "1.0.20"
2
+ VERSION = "1.0.21"
3
3
  end
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: 1.0.20
4
+ version: 1.0.21
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-07 00:00:00.000000000Z
12
+ date: 2011-10-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &2154322300 !ruby/object:Gem::Requirement
16
+ requirement: &2161136360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2154322300
24
+ version_requirements: *2161136360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &2154321800 !ruby/object:Gem::Requirement
27
+ requirement: &2161119700 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2154321800
35
+ version_requirements: *2161119700
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: thor
38
- requirement: &2154321380 !ruby/object:Gem::Requirement
38
+ requirement: &2161119220 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2154321380
46
+ version_requirements: *2161119220
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &2154320840 !ruby/object:Gem::Requirement
49
+ requirement: &2161118560 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.5.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2154320840
57
+ version_requirements: *2161118560
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: mg
60
- requirement: &2154320420 !ruby/object:Gem::Requirement
60
+ requirement: &2161118080 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2154320420
68
+ version_requirements: *2161118080
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: activesupport
71
- requirement: &2154319880 !ruby/object:Gem::Requirement
71
+ requirement: &2161117500 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 3.0.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2154319880
79
+ version_requirements: *2161117500
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: i18n
82
- requirement: &2154319460 !ruby/object:Gem::Requirement
82
+ requirement: &2161117060 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2154319460
90
+ version_requirements: *2161117060
91
91
  description: A gem with recipes to create Rails application templates you can use
92
92
  to generate Rails starter apps.
93
93
  email:
@@ -179,7 +179,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
179
179
  version: '0'
180
180
  segments:
181
181
  - 0
182
- hash: 2375044092887418713
182
+ hash: 257034863744836780
183
183
  required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  none: false
185
185
  requirements:
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  version: '0'
189
189
  segments:
190
190
  - 0
191
- hash: 2375044092887418713
191
+ hash: 257034863744836780
192
192
  requirements: []
193
193
  rubyforge_project: rails_apps_composer
194
194
  rubygems_version: 1.8.11