twitter-bootswatch-rails 2.3.2.3 → 2.3.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.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NTNhNWViYjE4MDc3Mzk1MjY5NmI4OTYxZDU1Mzc3NDI3YWI2NzE0Mw==
5
+ data.tar.gz: !binary |-
6
+ NDE0NGQzZDA5MzAzMmIwNjk2ZGZiYzJhYWQyMjhmODVkOWEzMTZmNg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ZGQyZjZiZjNhMjNlZTA2MzBmN2UxMDE1NmViNTMxNTdkM2M2MTE4NDQ4YjQ4
10
+ YjVlNjE1ZTVlMTY2MjJjYjlhZjczZWMwNWU4OWNhODA0NWYxMDBmYmZkYmQ4
11
+ Y2U5YWQ3OWU2MTVhZDA1ZTE0ZDU2Nzg1NjgyMTU4ODA3YTBmODI=
12
+ data.tar.gz: !binary |-
13
+ YmU3ZjEyMjY0MDA4NjI2OTQ5ZjYxZjJjNmJhYTNiMjkwNWZhNGYzYTI4ZTc0
14
+ ZDM1NTAwZjVlMDA4NDYyNDM4ZjhkYWU1MGFkMDFjNjU4OGQ4NGI2Y2MwNWI3
15
+ M2FhZjhhMjg2Y2IyY2RhNGRiMTY1YTg5MGQzYWY1YjdjYTliMzg=
@@ -5,6 +5,8 @@ module Bootswatch
5
5
  module Generators
6
6
  class InstallGenerator < ::Rails::Generators::NamedBase
7
7
 
8
+ DEFAULT_RAILS_APP_JS_FILE='app/assets/javascripts/application.js'
9
+ DEFAULT_RAILS_APP_CSS_FILE='app/assets/stylesheets/application.css'
8
10
  DEFAULT_THEME_NAME='bootswatch'
9
11
 
10
12
  argument :name, type: :string, default: DEFAULT_THEME_NAME,
@@ -25,28 +27,38 @@ module Bootswatch
25
27
  "#{use_default_theme_name? ? 'bootstrap'.capitalize : theme_name.capitalize}"
26
28
  end
27
29
 
30
+ def remove_require_tree_directives
31
+ if File.exist?(DEFAULT_RAILS_APP_JS_FILE)
32
+ gsub_file DEFAULT_RAILS_APP_JS_FILE, /\/\/=\s*require_tree\s*\./, ''
33
+ end
34
+
35
+ if File.exist?(DEFAULT_RAILS_APP_CSS_FILE)
36
+ gsub_file DEFAULT_RAILS_APP_CSS_FILE, /=\s*require_tree\s*\./, ''
37
+ end
38
+ end
39
+
28
40
  def add_assets
29
41
 
30
42
  if use_default_theme_name?
31
- if File.exist?('app/assets/javascripts/application.js')
32
- unless File.read('app/assets/javascripts/application.js').include?(theme_name)
33
- insert_into_file "app/assets/javascripts/application.js",
34
- "//= require #{theme_name}/loader\n",
43
+ if File.exist?(DEFAULT_RAILS_APP_JS_FILE)
44
+ unless File.read(DEFAULT_RAILS_APP_JS_FILE).include?(theme_name)
45
+ insert_into_file DEFAULT_RAILS_APP_JS_FILE,
46
+ "//= require #{theme_name}/loader\n//= require #{theme_name}/bootswatch\n",
35
47
  :after => "jquery_ujs\n"
36
48
  end
37
49
  else
38
- template 'application.js.tt', 'app/assets/stylesheets/application.js', {theme_name: theme_name, theme_info: theme_info}
50
+ template 'application.js.tt', DEFAULT_RAILS_APP_JS_FILE, {theme_name: theme_name, theme_info: theme_info}
39
51
  end
40
52
 
41
- if File.exist?('app/assets/stylesheets/application.css')
42
- unless File.read('app/assets/stylesheets/application.css').include?(theme_name)
43
- insert_into_file "app/assets/stylesheets/application.css",
44
- " *= require #{theme_name}/loader\n",
53
+ if File.exist?(DEFAULT_RAILS_APP_CSS_FILE)
54
+ unless File.read(DEFAULT_RAILS_APP_CSS_FILE).include?(theme_name)
55
+ insert_into_file DEFAULT_RAILS_APP_CSS_FILE,
56
+ " *= require #{theme_name}/loader\n *= require #{theme_name}/bootswatch\n",
45
57
  :after => "require_self\n"
46
58
  end
47
59
 
48
60
  else
49
- template 'application.css.tt', 'app/assets/stylesheets/application.css', {theme_name: theme_name, theme_info: theme_info}
61
+ template 'application.css.tt', DEFAULT_RAILS_APP_CSS_FILE, {theme_name: theme_name, theme_info: theme_info}
50
62
  end
51
63
  else
52
64
  template 'application.js.tt', "app/assets/javascripts/#{theme_name}.js", {theme_name: theme_name, theme_info: theme_info}
@@ -62,7 +74,7 @@ module Bootswatch
62
74
 
63
75
  template 'loader.coffee.tt', File.join(javascripts_dest_path,'loader.coffee'), {theme_name: theme_name, theme_info: theme_info}
64
76
 
65
- template 'bootswatch.coffee.tt', File.join(javascripts_dest_path,'bootswatch.coffee'), {theme_name: theme_name, theme_info: theme_info}
77
+ template 'bootswatch.js.coffee.tt', File.join(javascripts_dest_path,'bootswatch.js.coffee'), {theme_name: theme_name, theme_info: theme_info}
66
78
 
67
79
  end
68
80
 
@@ -79,7 +91,7 @@ module Bootswatch
79
91
 
80
92
  template 'mixins.less.tt', File.join(stylesheets_dest_path,'mixins.less'), {theme_name: theme_name, theme_info: theme_info}
81
93
 
82
- template 'bootswatch.less.tt', File.join(stylesheets_dest_path,'bootswatch.less'), {theme_name: theme_name, theme_info: theme_info}
94
+ template 'bootswatch.css.less.tt', File.join(stylesheets_dest_path,'bootswatch.css.less'), {theme_name: theme_name, theme_info: theme_info}
83
95
 
84
96
  template 'base.less.tt', File.join(stylesheets_dest_path,'base.less'), {theme_name: theme_name, theme_info: theme_info}
85
97
 
@@ -2,4 +2,5 @@
2
2
  * Bootswatch
3
3
  *= require_self
4
4
  *= require <%= config[:theme_name] %>/loader
5
+ *= require <%= config[:theme_name] %>/bootswatch
5
6
  */
@@ -2,4 +2,5 @@
2
2
  // Bootswatch
3
3
  //= require jquery
4
4
  //= require jquery_ujs
5
- //= require <%= config[:theme_name] %>/loader
5
+ //= require <%= config[:theme_name] %>/loader
6
+ //= require <%= config[:theme_name] %>/bootswatch
@@ -1,7 +1,7 @@
1
- @import "base";
1
+ @import "<%= config[:theme_name] %>/base";
2
2
  // <%= config[:theme_info] %>
3
3
  // Bootswatch
4
- // bootswatch.less
4
+ // bootswatch.css.less
5
5
 
6
6
  //body {
7
7
  // padding-top: 10px;
@@ -1,6 +1,6 @@
1
1
  # <%= config[:theme_info] %>
2
2
  # Bootswatch
3
- # bootswatch.coffee
3
+ # bootswatch.js.coffee
4
4
  # http://coffeescriptcookbook.com/chapters/syntax/embedding_javascript
5
5
 
6
6
  #jQuery ->
@@ -20,6 +20,4 @@ bootstrap-affix]
20
20
 
21
21
  js_files.each do |js_file|
22
22
  %>#= require twitter/bootstrap/<%= js_file %>
23
- <% end %>
24
-
25
- #= require <%= config[:theme_name] %>/bootswatch
23
+ <% end %>
@@ -17,6 +17,4 @@ end
17
17
  end
18
18
  %>
19
19
 
20
- // @import "twitter/bootstrap/responsive";
21
-
22
- @import "<%= config[:theme_name] %>/bootswatch";
20
+ // @import "twitter/bootstrap/responsive";
@@ -1,7 +1,7 @@
1
1
  module Twitter
2
2
  module Bootswatch
3
3
  module Rails
4
- VERSION = '2.3.2.3'
4
+ VERSION = '2.3.2.4'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-bootswatch-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2.3
5
- prerelease:
4
+ version: 2.3.2.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Scott V. Rosenthal
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-02 00:00:00.000000000 Z
11
+ date: 2013-07-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: railties
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: less-rails
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: execjs
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rails
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: therubyracer
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ! '>='
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ! '>='
92
81
  - !ruby/object:Gem::Version
@@ -108,8 +97,8 @@ files:
108
97
  - lib/generators/bootswatch/install/templates/application.js.tt
109
98
  - lib/generators/bootswatch/install/templates/base.less.tt
110
99
  - lib/generators/bootswatch/install/templates/bootstrap.less
111
- - lib/generators/bootswatch/install/templates/bootswatch.coffee.tt
112
- - lib/generators/bootswatch/install/templates/bootswatch.less.tt
100
+ - lib/generators/bootswatch/install/templates/bootswatch.css.less.tt
101
+ - lib/generators/bootswatch/install/templates/bootswatch.js.coffee.tt
113
102
  - lib/generators/bootswatch/install/templates/loader.coffee.tt
114
103
  - lib/generators/bootswatch/install/templates/loader.css.less.tt
115
104
  - lib/generators/bootswatch/install/templates/mixins.less.tt
@@ -198,6 +187,7 @@ homepage: https://github.com/scottvrosenthal/twitter-bootswatch-rails
198
187
  licenses:
199
188
  - MIT
200
189
  - GPL-2
190
+ metadata: {}
201
191
  post_install_message: ! "Important: You may need to add a javascript runtime to your
202
192
  Gemfile in order for bootstrap's LESS files to compile to CSS. \n\n**********************************************\n\nExecJS
203
193
  supports these runtimes:\n\ntherubyracer - Google V8 embedded within Ruby\n\ntherubyrhino
@@ -206,28 +196,20 @@ rdoc_options: []
206
196
  require_paths:
207
197
  - lib
208
198
  required_ruby_version: !ruby/object:Gem::Requirement
209
- none: false
210
199
  requirements:
211
200
  - - ! '>='
212
201
  - !ruby/object:Gem::Version
213
202
  version: '0'
214
- segments:
215
- - 0
216
- hash: 3139436027548453459
217
203
  required_rubygems_version: !ruby/object:Gem::Requirement
218
- none: false
219
204
  requirements:
220
205
  - - ! '>='
221
206
  - !ruby/object:Gem::Version
222
207
  version: '0'
223
- segments:
224
- - 0
225
- hash: 3139436027548453459
226
208
  requirements: []
227
209
  rubyforge_project: twitter-bootswatch-rails
228
- rubygems_version: 1.8.25
210
+ rubygems_version: 2.0.3
229
211
  signing_key:
230
- specification_version: 3
212
+ specification_version: 4
231
213
  summary: Twitter Bootstrap CSS toolkit for Rails 3.1+ Asset Pipeline with less-rails
232
214
  (no fluff - core only)
233
215
  test_files: []