bootstrapped 0.9.0 → 1.0.0
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/README.rdoc +4 -0
- data/bootstrapped.gemspec +1 -1
- data/features/Installation.feature +122 -2
- data/features/step_definitions/common_steps.rb +8 -0
- data/lib/bootstrapped/engine.rb +0 -6
- data/lib/bootstrapped/version.rb +1 -1
- data/lib/generators/bootstrapped/install/install_generator.rb +19 -6
- metadata +22 -23
data/README.rdoc
CHANGED
@@ -21,6 +21,10 @@ To install with Less Support
|
|
21
21
|
To install with static CSS Support
|
22
22
|
|
23
23
|
rails g bootstrapped:install static
|
24
|
+
|
25
|
+
By default, the install generator will include all of the Twitter Bootstrap javascript files in app/assets/javascripts/application.js. If you do not wish to have the javascript files included in your applications.js file, include the --no-javascript option
|
26
|
+
|
27
|
+
rails g boostrapped:install --no-javascript
|
24
28
|
|
25
29
|
== Included Generators
|
26
30
|
|
data/bootstrapped.gemspec
CHANGED
@@ -11,7 +11,20 @@ Feature: Bootstrapped Installation Generator
|
|
11
11
|
| app/assets/stylesheets/application.css |
|
12
12
|
| app/assets/javascripts/bootstrap.js.coffee |
|
13
13
|
| app/assets/stylesheets/bootstrap_and_overrides.css.less |
|
14
|
-
And I should see
|
14
|
+
And I should see the following in file "app/assets/javascripts/application.js"
|
15
|
+
| //= require bootstrap-transition.js |
|
16
|
+
| //= require bootstrap-alert.js |
|
17
|
+
| //= require bootstrap-modal.js |
|
18
|
+
| //= require bootstrap-dropdown.js |
|
19
|
+
| //= require bootstrap-scrollspy.js |
|
20
|
+
| //= require bootstrap-tab.js |
|
21
|
+
| //= require bootstrap-tooltip.js |
|
22
|
+
| //= require bootstrap-popover.js |
|
23
|
+
| //= require bootstrap-button.js |
|
24
|
+
| //= require bootstrap-collapse.js |
|
25
|
+
| //= require bootstrap-carousel.js |
|
26
|
+
| //= require bootstrap-typeahead.js |
|
27
|
+
| //= require bootstrap |
|
15
28
|
And I should not see "*= require twitter/bootstrap/static/bootstrap" in file "app/assets/stylesheets/application.css"
|
16
29
|
|
17
30
|
Scenario: Generate Installation with Static CSS Files
|
@@ -20,7 +33,114 @@ Feature: Bootstrapped Installation Generator
|
|
20
33
|
Then I should see the following files
|
21
34
|
| app/assets/javascripts/application.js |
|
22
35
|
| app/assets/stylesheets/application.css |
|
23
|
-
And I should see
|
36
|
+
And I should see the following in file "app/assets/javascripts/application.js"
|
37
|
+
| //= require bootstrap-transition.js |
|
38
|
+
| //= require bootstrap-alert.js |
|
39
|
+
| //= require bootstrap-modal.js |
|
40
|
+
| //= require bootstrap-dropdown.js |
|
41
|
+
| //= require bootstrap-scrollspy.js |
|
42
|
+
| //= require bootstrap-tab.js |
|
43
|
+
| //= require bootstrap-tooltip.js |
|
44
|
+
| //= require bootstrap-popover.js |
|
45
|
+
| //= require bootstrap-button.js |
|
46
|
+
| //= require bootstrap-collapse.js |
|
47
|
+
| //= require bootstrap-carousel.js |
|
48
|
+
| //= require bootstrap-typeahead.js |
|
49
|
+
| //= require bootstrap |
|
24
50
|
And I should see "*= require twitter/bootstrap/static/bootstrap" in file "app/assets/stylesheets/application.css"
|
25
51
|
And I should not see "*= bootstrap_and_overrides" in file "app/assets/stylesheets/application.css"
|
52
|
+
|
53
|
+
Scenario: Generate Installation with LESS CSS support
|
54
|
+
Given a new Rails app
|
55
|
+
When I run "rails g bootstrapped:install --javascripts"
|
56
|
+
Then I should see the following files
|
57
|
+
| app/assets/javascripts/application.js |
|
58
|
+
| app/assets/stylesheets/application.css |
|
59
|
+
| app/assets/javascripts/bootstrap.js.coffee |
|
60
|
+
| app/assets/stylesheets/bootstrap_and_overrides.css.less |
|
61
|
+
And I should see the following in file "app/assets/javascripts/application.js"
|
62
|
+
| //= require bootstrap-transition.js |
|
63
|
+
| //= require bootstrap-alert.js |
|
64
|
+
| //= require bootstrap-modal.js |
|
65
|
+
| //= require bootstrap-dropdown.js |
|
66
|
+
| //= require bootstrap-scrollspy.js |
|
67
|
+
| //= require bootstrap-tab.js |
|
68
|
+
| //= require bootstrap-tooltip.js |
|
69
|
+
| //= require bootstrap-popover.js |
|
70
|
+
| //= require bootstrap-button.js |
|
71
|
+
| //= require bootstrap-collapse.js |
|
72
|
+
| //= require bootstrap-carousel.js |
|
73
|
+
| //= require bootstrap-typeahead.js |
|
74
|
+
| //= require bootstrap |
|
75
|
+
And I should not see "*= require twitter/bootstrap/static/bootstrap" in file "app/assets/stylesheets/application.css"
|
76
|
+
|
77
|
+
Scenario: Generate Installation with LESS CSS support
|
78
|
+
Given a new Rails app
|
79
|
+
When I run "rails g bootstrapped:install --no-javascripts"
|
80
|
+
Then I should see the following files
|
81
|
+
| app/assets/javascripts/application.js |
|
82
|
+
| app/assets/stylesheets/application.css |
|
83
|
+
| app/assets/javascripts/bootstrap.js.coffee |
|
84
|
+
| app/assets/stylesheets/bootstrap_and_overrides.css.less |
|
85
|
+
And I should not see the following in file "app/assets/javascripts/application.js"
|
86
|
+
| //= require bootstrap-transition.js |
|
87
|
+
| //= require bootstrap-alert.js |
|
88
|
+
| //= require bootstrap-modal.js |
|
89
|
+
| //= require bootstrap-dropdown.js |
|
90
|
+
| //= require bootstrap-scrollspy.js |
|
91
|
+
| //= require bootstrap-tab.js |
|
92
|
+
| //= require bootstrap-tooltip.js |
|
93
|
+
| //= require bootstrap-popover.js |
|
94
|
+
| //= require bootstrap-button.js |
|
95
|
+
| //= require bootstrap-collapse.js |
|
96
|
+
| //= require bootstrap-carousel.js |
|
97
|
+
| //= require bootstrap-typeahead.js |
|
98
|
+
| //= require bootstrap |
|
99
|
+
And I should not see "*= require twitter/bootstrap/static/bootstrap" in file "app/assets/stylesheets/application.css"
|
26
100
|
|
101
|
+
Scenario: Generate Installation with Static CSS Files
|
102
|
+
Given a new Rails app
|
103
|
+
When I run "rails g bootstrapped:install static --no-javascripts"
|
104
|
+
Then I should see the following files
|
105
|
+
| app/assets/javascripts/application.js |
|
106
|
+
| app/assets/stylesheets/application.css |
|
107
|
+
And I should not see the following in file "app/assets/javascripts/application.js"
|
108
|
+
| //= require bootstrap-transition.js |
|
109
|
+
| //= require bootstrap-alert.js |
|
110
|
+
| //= require bootstrap-modal.js |
|
111
|
+
| //= require bootstrap-dropdown.js |
|
112
|
+
| //= require bootstrap-scrollspy.js |
|
113
|
+
| //= require bootstrap-tab.js |
|
114
|
+
| //= require bootstrap-tooltip.js |
|
115
|
+
| //= require bootstrap-popover.js |
|
116
|
+
| //= require bootstrap-button.js |
|
117
|
+
| //= require bootstrap-collapse.js |
|
118
|
+
| //= require bootstrap-carousel.js |
|
119
|
+
| //= require bootstrap-typeahead.js |
|
120
|
+
| //= require bootstrap |
|
121
|
+
And I should see "*= require twitter/bootstrap/static/bootstrap" in file "app/assets/stylesheets/application.css"
|
122
|
+
And I should not see "*= bootstrap_and_overrides" in file "app/assets/stylesheets/application.css"
|
123
|
+
|
124
|
+
Scenario: Generate Installation with LESS CSS support
|
125
|
+
Given a new Rails app
|
126
|
+
When I run "rails g bootstrapped:install --no-javascripts"
|
127
|
+
Then I should see the following files
|
128
|
+
| app/assets/javascripts/application.js |
|
129
|
+
| app/assets/stylesheets/application.css |
|
130
|
+
| app/assets/javascripts/bootstrap.js.coffee |
|
131
|
+
| app/assets/stylesheets/bootstrap_and_overrides.css.less |
|
132
|
+
And I should not see the following in file "app/assets/javascripts/application.js"
|
133
|
+
| //= require bootstrap-transition.js |
|
134
|
+
| //= require bootstrap-alert.js |
|
135
|
+
| //= require bootstrap-modal.js |
|
136
|
+
| //= require bootstrap-dropdown.js |
|
137
|
+
| //= require bootstrap-scrollspy.js |
|
138
|
+
| //= require bootstrap-tab.js |
|
139
|
+
| //= require bootstrap-tooltip.js |
|
140
|
+
| //= require bootstrap-popover.js |
|
141
|
+
| //= require bootstrap-button.js |
|
142
|
+
| //= require bootstrap-collapse.js |
|
143
|
+
| //= require bootstrap-carousel.js |
|
144
|
+
| //= require bootstrap-typeahead.js |
|
145
|
+
| //= require bootstrap |
|
146
|
+
And I should not see "*= require twitter/bootstrap/static/bootstrap" in file "app/assets/stylesheets/application.css"
|
@@ -53,6 +53,14 @@ Then /^I should see the following in file "([^\"]*)"$/ do |short_path, table|
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
Then /^I should not see the following in file "([^\"]*)"$/ do |short_path, table|
|
57
|
+
path = File.join(@current_directory, short_path)
|
58
|
+
File.should exist(path)
|
59
|
+
table.raw.flatten.each do |content|
|
60
|
+
File.readlines(path).join.should_not include(content)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
56
64
|
Then /^I should successfully run "([^\"]*)"$/ do |command|
|
57
65
|
system("cd #{@current_directory} && #{command}").should be_true
|
58
66
|
end
|
data/lib/bootstrapped/engine.rb
CHANGED
@@ -9,11 +9,5 @@ module Bootstrapped
|
|
9
9
|
app.config.less.paths << File.join(config.root, 'vendor', 'less')
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
13
|
-
#initializer 'bootstrapped-less.setup', :after => 'less-rails.after.load_config_initializers', :group => :all do |app|
|
14
|
-
# app.config.less.paths << File.join(app.root, 'app', 'assets', 'stylesheets','bootstrap','less')
|
15
|
-
#end
|
16
|
-
|
17
|
-
|
18
12
|
end
|
19
13
|
end
|
data/lib/bootstrapped/version.rb
CHANGED
@@ -6,14 +6,9 @@ module Bootstrapped
|
|
6
6
|
class InstallGenerator < ::Bootstrapped::Generators::Base
|
7
7
|
desc "This generator installs Twitter Bootstrap to Asset Pipeline"
|
8
8
|
argument :css_engine, :type => :string, :default => 'less'
|
9
|
+
class_option :javascripts, :type => :boolean, :default => true, :description => "Include Twitter Bootstrap javascript files"
|
9
10
|
|
10
11
|
def add_assets
|
11
|
-
|
12
|
-
if File.exist?('app/assets/javascripts/application.js')
|
13
|
-
insert_into_file "app/assets/javascripts/application.js", "//= require bootstrap\n", :after => "jquery_ujs\n"
|
14
|
-
else
|
15
|
-
copy_file "application.js", "app/assets/javascripts/application.js"
|
16
|
-
end
|
17
12
|
|
18
13
|
unless css_engine.eql?('static')
|
19
14
|
if File.exist?('app/assets/stylesheets/application.css')
|
@@ -43,6 +38,24 @@ module Bootstrapped
|
|
43
38
|
end
|
44
39
|
end
|
45
40
|
|
41
|
+
def add_javascript
|
42
|
+
if options.javascripts?
|
43
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-transition.js\n", :before => "//= require_tree ."
|
44
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-alert.js\n", :before => "//= require_tree ."
|
45
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-modal.js\n", :before => "//= require_tree ."
|
46
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-dropdown.js\n", :before => "//= require_tree ."
|
47
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-scrollspy.js\n", :before => "//= require_tree ."
|
48
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-tab.js\n", :before => "//= require_tree ."
|
49
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-tooltip.js\n", :before => "//= require_tree ."
|
50
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-popover.js\n", :before => "//= require_tree ."
|
51
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-button.js\n", :before => "//= require_tree ."
|
52
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-collapse.js\n", :before => "//= require_tree ."
|
53
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-carousel.js\n", :before => "//= require_tree ."
|
54
|
+
insert_into_file "app/assets/javascripts/application.js","//= require bootstrap-typeahead.js\n", :before => "//= require_tree ."
|
55
|
+
insert_into_file "app/assets/javascripts/application.js", "//= require bootstrap\n", :before => "//= require_tree ."
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
46
59
|
end
|
47
60
|
end
|
48
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrapped
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-03-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
16
|
-
requirement: &
|
16
|
+
requirement: &70330102311200 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70330102311200
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: actionpack
|
27
|
-
requirement: &
|
27
|
+
requirement: &70330102310720 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '3.1'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70330102310720
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: less-rails
|
38
|
-
requirement: &
|
38
|
+
requirement: &70330102310320 !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: *70330102310320
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rails
|
49
|
-
requirement: &
|
49
|
+
requirement: &70330102309780 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '3.1'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70330102309780
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec-rails
|
60
|
-
requirement: &
|
60
|
+
requirement: &70330102309280 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 2.6.1
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70330102309280
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mocha
|
71
|
-
requirement: &
|
71
|
+
requirement: &70330102308820 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.9.12
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70330102308820
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: cucumber
|
82
|
-
requirement: &
|
82
|
+
requirement: &70330102308360 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 1.0.6
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70330102308360
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: bundler
|
93
|
-
requirement: &
|
93
|
+
requirement: &70330102307900 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 1.0.0
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70330102307900
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rails
|
104
|
-
requirement: &
|
104
|
+
requirement: &70330102307440 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '3.1'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70330102307440
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: sqlite3-ruby
|
115
|
-
requirement: &
|
115
|
+
requirement: &70330102306980 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
version: 1.3.1
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70330102306980
|
124
124
|
description: Twitters Bootstrap CSS and JS files all in one nice little gem
|
125
125
|
email:
|
126
126
|
- nwwatson@gmail.com
|
@@ -192,7 +192,6 @@ files:
|
|
192
192
|
- lib/generators/bootstrapped/scaffold/templates/views/erb/index.html.erb
|
193
193
|
- lib/generators/bootstrapped/scaffold/templates/views/erb/new.html.erb
|
194
194
|
- lib/generators/bootstrapped/scaffold/templates/views/erb/show.html.erb
|
195
|
-
- tmp/rails_app/log/development.log
|
196
195
|
- vendor/assets/images/glyphicons-halflings-white.png
|
197
196
|
- vendor/assets/images/glyphicons-halflings.png
|
198
197
|
- vendor/assets/javascripts/bootstrap-alert.js
|
@@ -265,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
265
264
|
version: '0'
|
266
265
|
requirements: []
|
267
266
|
rubyforge_project: bootstrapped
|
268
|
-
rubygems_version: 1.8.
|
267
|
+
rubygems_version: 1.8.10
|
269
268
|
signing_key:
|
270
269
|
specification_version: 3
|
271
270
|
summary: Twitters Bootstrap CSS in a gem
|