rails_apps_composer 1.1.7 → 1.1.8
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/recipes/html5.rb +57 -35
- data/recipes/mongoid.rb +1 -1
- data/version.rb +1 -1
- metadata +20 -20
data/recipes/html5.rb
CHANGED
@@ -10,70 +10,92 @@ case config['css_option']
|
|
10
10
|
when 'bootstrap_less'
|
11
11
|
# https://github.com/seyhunak/twitter-bootstrap-rails
|
12
12
|
# http://railscasts.com/episodes/328-twitter-bootstrap-basics
|
13
|
-
gem 'twitter-bootstrap-rails', '
|
13
|
+
gem 'twitter-bootstrap-rails', '>= 2.0.3', :group => :assets
|
14
14
|
recipes << 'bootstrap'
|
15
15
|
|
16
16
|
when 'bootstrap_sass'
|
17
17
|
# https://github.com/thomas-mcdonald/bootstrap-sass
|
18
18
|
# http://rubysource.com/twitter-bootstrap-less-and-sass-understanding-your-options-for-rails-3-1/
|
19
|
-
gem 'bootstrap-sass', '
|
19
|
+
gem 'bootstrap-sass', '>= 2.0.1'
|
20
20
|
recipes << 'bootstrap'
|
21
21
|
|
22
22
|
end
|
23
23
|
after_bundler do
|
24
24
|
say_wizard "HTML5 recipe running 'after bundler'"
|
25
25
|
# add a humans.txt file
|
26
|
-
get
|
26
|
+
get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/humans.txt', 'public/humans.txt'
|
27
27
|
# install a front-end framework for HTML5 and CSS3
|
28
28
|
remove_file 'app/assets/stylesheets/application.css'
|
29
|
-
|
29
|
+
remove_file 'app/views/layouts/application.html.erb'
|
30
|
+
remove_file 'app/views/layouts/application.html.haml'
|
31
|
+
unless recipes.include? 'bootstrap'
|
32
|
+
if recipes.include? 'haml'
|
33
|
+
# Haml version of a simple application layout
|
34
|
+
get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/simple/views/layouts/application.html.haml', 'app/views/layouts/application.html.haml'
|
35
|
+
else
|
36
|
+
# ERB version of a simple application layout
|
37
|
+
get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/simple/views/layouts/application.html.erb', 'app/views/layouts/application.html.erb'
|
38
|
+
end
|
39
|
+
# simple css styles
|
40
|
+
get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/simple/assets/stylesheets/application.css.scss', 'app/assets/stylesheets/application.css.scss'
|
41
|
+
else # for Twitter Bootstrap
|
42
|
+
if recipes.include? 'haml'
|
43
|
+
# Haml version of a complex application layout using Twitter Bootstrap
|
44
|
+
get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/twitter-bootstrap/views/layouts/application.html.haml', 'app/views/layouts/application.html.haml'
|
45
|
+
else
|
46
|
+
# ERB version of a complex application layout using Twitter Bootstrap
|
47
|
+
get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/twitter-bootstrap/views/layouts/application.html.erb', 'app/views/layouts/application.html.erb'
|
48
|
+
end
|
49
|
+
# complex css styles using Twitter Bootstrap
|
50
|
+
get 'https://raw.github.com/RailsApps/rails3-application-templates/master/files/twitter-bootstrap/assets/stylesheets/application.css.scss', 'app/assets/stylesheets/application.css.scss'
|
51
|
+
end
|
52
|
+
if recipes.include? 'haml'
|
53
|
+
gsub_file 'app/views/layouts/application.html.haml', /App_Name/, "#{app_name.humanize.titleize}"
|
54
|
+
else
|
55
|
+
gsub_file 'app/views/layouts/application.html.erb', /App_Name/, "#{app_name.humanize.titleize}"
|
56
|
+
end
|
30
57
|
case config['css_option']
|
31
58
|
|
32
59
|
when 'bootstrap_less'
|
33
|
-
say_wizard
|
60
|
+
say_wizard 'installing Twitter Bootstrap HTML5 framework (less)'
|
34
61
|
generate 'bootstrap:install'
|
35
|
-
remove_file 'app/assets/stylesheets/application.css'
|
62
|
+
remove_file 'app/assets/stylesheets/application.css' # already created application.css.scss above
|
63
|
+
insert_into_file 'app/assets/stylesheets/bootstrap_and_overrides.css.less', "body { padding-top: 60px; }\n", :after => "@import "twitter/bootstrap/bootstrap";\n"
|
36
64
|
|
37
65
|
when 'bootstrap_sass'
|
38
|
-
say_wizard
|
39
|
-
insert_into_file
|
40
|
-
create_file
|
66
|
+
say_wizard 'installing Twitter Bootstrap HTML5 framework (sass)'
|
67
|
+
insert_into_file 'app/assets/javascripts/application.js', "//= require bootstrap\n", :after => "jquery_ujs\n"
|
68
|
+
create_file 'app/assets/stylesheets/bootstrap_and_overrides.css.scss', <<-RUBY
|
69
|
+
// Set the correct sprite paths
|
70
|
+
$iconSpritePath: image-path('glyphicons-halflings.png');
|
71
|
+
$iconWhiteSpritePath: image-path('glyphicons-halflings-white.png');
|
72
|
+
@import "bootstrap";
|
73
|
+
body { padding-top: 60px; }
|
74
|
+
@import "bootstrap-responsive";
|
75
|
+
RUBY
|
41
76
|
|
42
77
|
when 'foundation'
|
43
|
-
say_wizard
|
44
|
-
insert_into_file
|
45
|
-
insert_into_file
|
78
|
+
say_wizard 'installing Zurb Foundation HTML5 framework'
|
79
|
+
insert_into_file 'app/assets/javascripts/application.js', "//= require foundation\n", :after => "jquery_ujs\n"
|
80
|
+
insert_into_file 'app/assets/stylesheets/application.css.scss', " *= require foundation\n", :after => "require_self\n"
|
46
81
|
|
47
82
|
when 'skeleton'
|
48
|
-
say_wizard
|
49
|
-
get
|
50
|
-
get
|
51
|
-
get
|
52
|
-
get
|
53
|
-
get
|
83
|
+
say_wizard 'installing Skeleton HTML5 framework'
|
84
|
+
get 'https://raw.github.com/necolas/normalize.css/master/normalize.css', 'app/assets/stylesheets/normalize.css.scss'
|
85
|
+
get 'https://raw.github.com/dhgamache/Skeleton/master/stylesheets/base.css', 'app/assets/stylesheets/base.css.scss'
|
86
|
+
get 'https://raw.github.com/dhgamache/Skeleton/master/stylesheets/layout.css', 'app/assets/stylesheets/layout.css.scss'
|
87
|
+
get 'https://raw.github.com/dhgamache/Skeleton/master/stylesheets/skeleton.css', 'app/assets/stylesheets/skeleton.css.scss'
|
88
|
+
get 'https://raw.github.com/dhgamache/Skeleton/master/javascripts/tabs.js', 'app/assets/javascripts/tabs.js'
|
54
89
|
|
55
90
|
when 'normalize'
|
56
|
-
say_wizard
|
57
|
-
get
|
91
|
+
say_wizard 'normalizing CSS for consistent styling'
|
92
|
+
get 'https://raw.github.com/necolas/normalize.css/master/normalize.css', 'app/assets/stylesheets/normalize.css.scss'
|
58
93
|
|
59
94
|
when 'nothing'
|
60
|
-
say_wizard
|
95
|
+
say_wizard 'no HTML5 front-end framework selected'
|
61
96
|
|
62
97
|
end
|
63
|
-
|
64
|
-
if recipes.include? 'haml'
|
65
|
-
# Haml version of default application layout
|
66
|
-
remove_file 'app/views/layouts/application.html.erb'
|
67
|
-
remove_file 'app/views/layouts/application.html.haml'
|
68
|
-
get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/views/layouts/application.html.haml", "app/views/layouts/application.html.haml"
|
69
|
-
gsub_file "app/views/layouts/application.html.haml", /App_Name/, "#{app_name.humanize.titleize}"
|
70
|
-
else
|
71
|
-
# ERB version of default application layout
|
72
|
-
remove_file 'app/views/layouts/application.html.erb'
|
73
|
-
remove_file 'app/views/layouts/application.html.haml'
|
74
|
-
get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/views/layouts/application.html.erb", "app/views/layouts/application.html.erb"
|
75
|
-
gsub_file "app/views/layouts/application.html.erb", /App_Name/, "#{app_name.humanize.titleize}"
|
76
|
-
end
|
98
|
+
|
77
99
|
end
|
78
100
|
|
79
101
|
__END__
|
data/recipes/mongoid.rb
CHANGED
@@ -5,7 +5,7 @@ if config['mongoid']
|
|
5
5
|
say_wizard "REMINDER: When creating a Rails app using Mongoid..."
|
6
6
|
say_wizard "you should add the '-O' flag to 'rails new'"
|
7
7
|
gem 'bson_ext', '>= 1.5.2'
|
8
|
-
gem 'mongoid', '>= 2.4.
|
8
|
+
gem 'mongoid', '>= 2.4.6'
|
9
9
|
else
|
10
10
|
recipes.delete('mongoid')
|
11
11
|
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: 1.1.
|
4
|
+
version: 1.1.8
|
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: 2012-03-
|
12
|
+
date: 2012-03-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
16
|
-
requirement: &
|
16
|
+
requirement: &2161236900 !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: *
|
24
|
+
version_requirements: *2161236900
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activesupport
|
27
|
-
requirement: &
|
27
|
+
requirement: &2161236400 !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: *
|
35
|
+
version_requirements: *2161236400
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: thor
|
38
|
-
requirement: &
|
38
|
+
requirement: &2161230300 !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: *
|
46
|
+
version_requirements: *2161230300
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
|
-
requirement: &
|
49
|
+
requirement: &2161229440 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2161229440
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &2161228660 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 2.5.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2161228660
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mg
|
71
|
-
requirement: &
|
71
|
+
requirement: &2161228180 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2161228180
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: activesupport
|
82
|
-
requirement: &
|
82
|
+
requirement: &2161227560 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 3.0.0
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2161227560
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: i18n
|
93
|
-
requirement: &
|
93
|
+
requirement: &2161227120 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2161227120
|
102
102
|
description: A gem with recipes to create Rails application templates you can use
|
103
103
|
to generate Rails starter apps.
|
104
104
|
email:
|
@@ -178,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
segments:
|
180
180
|
- 0
|
181
|
-
hash: -
|
181
|
+
hash: -4335969651070518607
|
182
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
183
|
none: false
|
184
184
|
requirements:
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
version: '0'
|
188
188
|
segments:
|
189
189
|
- 0
|
190
|
-
hash: -
|
190
|
+
hash: -4335969651070518607
|
191
191
|
requirements: []
|
192
192
|
rubyforge_project: rails_apps_composer
|
193
193
|
rubygems_version: 1.8.16
|