bootstrap-generators 3.1.1.1 → 3.1.1.2

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: 26d726211095cbab4de3df3ee9c7057512ea7f15
4
- data.tar.gz: e2ce107bef326e9248dca4fa11c52db39df57c2c
3
+ metadata.gz: d048148c11743f246d2a14f5a5a175d7212e730b
4
+ data.tar.gz: e67783d4aa19412becc063224fe9ebba80882af8
5
5
  SHA512:
6
- metadata.gz: 185372e7cf2692f04ee25a54ef433b3cc7ffb3b2773fa70e3db09b23c4e6c9a026bb6f61a7cfbcef2d534b00874f17427c70b8d83ecbba96f3484718af2752b9
7
- data.tar.gz: e6f578fde53708e0190490fafd6cc7249da6182de6727b526fb6f3ac373dd2f9297130d4078ba0bec10047d1c64dc46258418a03f1ddaa90495aff5ac162664e
6
+ metadata.gz: f608b300dbae9916745531af7f1ce0068ceedc88ceededa3d5eeadd9c820ffa8267a7fa52cbb70c5820691d5ea7f1643cc2cefa5ed02b7a011ff8c0ab1372288
7
+ data.tar.gz: 9d0cf7956ecae6b6d08aecbb787bbf960724652ff5313867fa9b6c9784b0fc9e4e6ebcfd0c4ecb28031d295ad5bbe25d3afe29155513537af6be753d473dfb19
@@ -5,5 +5,5 @@ env:
5
5
  - "RAILS_VERSION=3.1.0"
6
6
  - "RAILS_VERSION=3.2.0"
7
7
  - "RAILS_VERSION=4.0.0"
8
- - "RAILS_VERSION=4.1.0.pre"
8
+ - "RAILS_VERSION=4.1.0.rc2"
9
9
  - "RAILS_VERSION=master"
data/Gemfile CHANGED
@@ -5,16 +5,22 @@ gemspec
5
5
 
6
6
  # Dummy application
7
7
  rails_version = ENV["RAILS_VERSION"] || "default"
8
- rails = case rails_version
8
+ case rails_version
9
9
  when "master"
10
- { github: "rails/rails" }
10
+ rails = { github: "rails/rails" }
11
+ gem 'sass-rails', '>= 4.0.2'
11
12
  when "default"
12
- ">= 3.1.0"
13
+ rails = ">= 3.1.0"
14
+ gem 'sass-rails'
13
15
  else
14
- "~> #{rails_version}"
15
- end
16
+ rails = "~> #{rails_version}"
16
17
 
17
- gem "rails", rails
18
+ if rails_version[0] == '4'
19
+ gem 'sass-rails', '>= 4.0.2'
20
+ else
21
+ gem 'sass-rails'
22
+ end
23
+ end
18
24
 
19
- gem 'sass-rails'
25
+ gem 'rails', rails
20
26
  gem 'uglifier'
data/Rakefile CHANGED
@@ -75,7 +75,7 @@ namespace :bootstrap do
75
75
  FileUtils.cp Dir.glob("#{twitter_bootstrap_dir}/fonts/*"), bootstrap_fonts_dir
76
76
 
77
77
  # Reset Twitter Bootstrap CSS file
78
- FileUtils.cp "#{twitter_bootstrap_dir}/dist/css/bootstrap.css", "vendor/assets/stylesheets/bootstrap.css"
78
+ FileUtils.cp "#{twitter_bootstrap_dir}/dist/css/bootstrap.css", "vendor/assets/stylesheets/bootstrap.css.erb"
79
79
 
80
80
  # Reset Twitter Bootstrap LESS files
81
81
  bootstrap_less_dir = 'vendor/twitter/bootstrap/less'
@@ -93,9 +93,47 @@ namespace :bootstrap do
93
93
  FileUtils.cp "#{bootstrap_less_dir}/variables.less", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less"
94
94
  FileUtils.cp "#{bootstrap_sass_dir}/_variables.scss", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss"
95
95
 
96
- # Change icon-font-path
97
- ["vendor/assets/stylesheets/bootstrap.css", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss"].each do |filepath|
98
- file_content = File.read(filepath).gsub("../fonts/", "/assets/")
96
+ # Asset helpers
97
+ Dir.glob('**/*.css.erb').each do |filepath|
98
+ file_content = File.read(filepath)
99
+
100
+ # Remove fonts path
101
+ file_content.gsub!("../fonts/", "bootstrap/")
102
+
103
+ # Asset helpers for fonts
104
+ file_content.gsub!(%r{(["'][\w\-@{}$#\/]+\.(eot|woff|ttf|svg)["'])}, '\'<%= font_path(\1) %>\'')
105
+ file_content.gsub!(%r{(["'])([\w\-@{}$#\/]+\.(eot|woff|ttf|svg))(\??#[\w\-@{}$#]+["'])}, '\'<%= font_path(\1\2\1) %>\4')
106
+
107
+ File.open(filepath, 'w') { |file| file.puts file_content }
108
+ end
109
+
110
+ Dir.glob('**/*.scss').each do |filepath|
111
+ file_content = File.read(filepath)
112
+
113
+ # Remove fonts path
114
+ file_content.gsub!("../fonts/", "bootstrap/")
115
+
116
+ # Asset helpers for fonts
117
+ file_content.gsub!(%r{(["'\w\-@{}$#\/]+\.(eot|woff|ttf|svg)(\??#[\w\-@{}$#]+)?["'])}, 'font-path(\1)')
118
+
119
+ # Asset helpers for images
120
+ file_content.gsub!(%r{image: url\(}, 'image: image-url(')
121
+
122
+ File.open(filepath, 'w') { |file| file.puts file_content }
123
+ end
124
+
125
+ Dir.glob('**/*.less').each do |filepath|
126
+ file_content = File.read(filepath)
127
+
128
+ # Remove fonts path
129
+ file_content.gsub!("../fonts/", "bootstrap/")
130
+
131
+ # Asset helpers for fonts
132
+ file_content.gsub!(%r{~"url\(([^)]+)\)( [^"]*)?"}, 'font-url(~"\1")\2')
133
+
134
+ # Asset helpers for images
135
+ file_content.gsub!(%r{image: url\(}, 'image: image-url(')
136
+
99
137
  File.open(filepath, 'w') { |file| file.puts file_content }
100
138
  end
101
139
 
@@ -1,5 +1,5 @@
1
1
  module Bootstrap
2
2
  module Generators
3
- VERSION = '3.1.1.1'
3
+ VERSION = '3.1.1.2'
4
4
  end
5
5
  end
@@ -72,7 +72,7 @@
72
72
  //
73
73
  //## Specify custom locations of the include Glyphicons icon font. Useful for those including Bootstrap via Bower.
74
74
 
75
- @icon-font-path: "/assets/";
75
+ @icon-font-path: "bootstrap/";
76
76
  @icon-font-name: "glyphicons-halflings-regular";
77
77
  @icon-font-svg-id: "glyphicons_halflingsregular";
78
78
 
@@ -2376,8 +2376,8 @@ input[type="button"].btn-block {
2376
2376
  @font-face {
2377
2377
  font-family: 'Glyphicons Halflings';
2378
2378
 
2379
- src: url('/assets/glyphicons-halflings-regular.eot');
2380
- src: url('/assets/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('/assets/glyphicons-halflings-regular.woff') format('woff'), url('/assets/glyphicons-halflings-regular.ttf') format('truetype'), url('/assets/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
2379
+ src: url('<%= font_path('bootstrap/glyphicons-halflings-regular.eot') %>');
2380
+ src: url('<%= font_path('bootstrap/glyphicons-halflings-regular.eot') %>?#iefix') format('embedded-opentype'), url('<%= font_path('bootstrap/glyphicons-halflings-regular.woff') %>') format('woff'), url('<%= font_path('bootstrap/glyphicons-halflings-regular.ttf') %>') format('truetype'), url('<%= font_path('bootstrap/glyphicons-halflings-regular.svg') %>#glyphicons_halflingsregular') format('svg');
2381
2381
  }
2382
2382
  .glyphicon {
2383
2383
  position: relative;
@@ -10,11 +10,11 @@
10
10
  // Import the fonts
11
11
  @font-face {
12
12
  font-family: 'Glyphicons Halflings';
13
- src: ~"url('@{icon-font-path}@{icon-font-name}.eot')";
14
- src: ~"url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype')",
15
- ~"url('@{icon-font-path}@{icon-font-name}.woff') format('woff')",
16
- ~"url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype')",
17
- ~"url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg')";
13
+ src: font-url(~"'@{icon-font-path}@{icon-font-name}.eot'");
14
+ src: font-url(~"'@{icon-font-path}@{icon-font-name}.eot?#iefix'") format('embedded-opentype'),
15
+ font-url(~"'@{icon-font-path}@{icon-font-name}.woff'") format('woff'),
16
+ font-url(~"'@{icon-font-path}@{icon-font-name}.ttf'") format('truetype'),
17
+ font-url(~"'@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}'") format('svg');
18
18
  }
19
19
 
20
20
  // Catchall baseclass
@@ -361,7 +361,7 @@
361
361
  // Short retina mixin for setting background-image and -size
362
362
 
363
363
  .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
364
- background-image: url("@{file-1x}");
364
+ background-image: image-url("@{file-1x}");
365
365
 
366
366
  @media
367
367
  only screen and (-webkit-min-device-pixel-ratio: 2),
@@ -370,7 +370,7 @@
370
370
  only screen and ( min-device-pixel-ratio: 2),
371
371
  only screen and ( min-resolution: 192dpi),
372
372
  only screen and ( min-resolution: 2dppx) {
373
- background-image: url("@{file-2x}");
373
+ background-image: image-url("@{file-2x}");
374
374
  background-size: @width-1x @height-1x;
375
375
  }
376
376
  }
@@ -420,4 +420,4 @@ table {
420
420
  td,
421
421
  th {
422
422
  padding: 0;
423
- }
423
+ }
@@ -72,7 +72,7 @@
72
72
  //
73
73
  //## Specify custom locations of the include Glyphicons icon font. Useful for those including Bootstrap via Bower.
74
74
 
75
- @icon-font-path: "../fonts/";
75
+ @icon-font-path: "bootstrap/";
76
76
  @icon-font-name: "glyphicons-halflings-regular";
77
77
  @icon-font-svg-id: "glyphicons_halflingsregular";
78
78
 
@@ -10,11 +10,11 @@
10
10
  // Import the fonts
11
11
  @font-face {
12
12
  font-family: 'Glyphicons Halflings';
13
- src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot'), '#{$icon-font-path}#{$icon-font-name}.eot'));
14
- src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot?#iefix'), '#{$icon-font-path}#{$icon-font-name}.eot?#iefix')) format('embedded-opentype'),
15
- url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.woff'), '#{$icon-font-path}#{$icon-font-name}.woff')) format('woff'),
16
- url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.ttf'), '#{$icon-font-path}#{$icon-font-name}.ttf')) format('truetype'),
17
- url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}'), '#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}')) format('svg');
13
+ src: url(if($bootstrap-sass-asset-helper, twbs-font-path(font-path('#{$icon-font-path}#{$icon-font-name}.eot')), font-path('#{$icon-font-path}#{$icon-font-name}.eot')));
14
+ src: url(if($bootstrap-sass-asset-helper, twbs-font-path(font-path('#{$icon-font-path}#{$icon-font-name}.eot?#iefix')), font-path('#{$icon-font-path}#{$icon-font-name}.eot?#iefix'))) format('embedded-opentype'),
15
+ url(if($bootstrap-sass-asset-helper, twbs-font-path(font-path('#{$icon-font-path}#{$icon-font-name}.woff')), font-path('#{$icon-font-path}#{$icon-font-name}.woff'))) format('woff'),
16
+ url(if($bootstrap-sass-asset-helper, twbs-font-path(font-path('#{$icon-font-path}#{$icon-font-name}.ttf')), font-path('#{$icon-font-path}#{$icon-font-name}.ttf'))) format('truetype'),
17
+ url(if($bootstrap-sass-asset-helper, twbs-font-path(font-path('#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}')), font-path('#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}'))) format('svg');
18
18
  }
19
19
 
20
20
  // Catchall baseclass
@@ -360,7 +360,7 @@
360
360
  // Short retina mixin for setting background-image and -size
361
361
 
362
362
  @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
363
- background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
363
+ background-image: image-url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
364
364
 
365
365
  @media
366
366
  only screen and (-webkit-min-device-pixel-ratio: 2),
@@ -369,7 +369,7 @@
369
369
  only screen and ( min-device-pixel-ratio: 2),
370
370
  only screen and ( min-resolution: 192dpi),
371
371
  only screen and ( min-resolution: 2dppx) {
372
- background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}"));
372
+ background-image: image-url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}"));
373
373
  background-size: $width-1x $height-1x;
374
374
  }
375
375
  }
@@ -420,4 +420,4 @@ table {
420
420
  td,
421
421
  th {
422
422
  padding: 0;
423
- }
423
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1.1
4
+ version: 3.1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Décio Ferreira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-21 00:00:00.000000000 Z
11
+ date: 2014-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -124,7 +124,7 @@ files:
124
124
  - vendor/assets/javascripts/bootstrap/tab.js
125
125
  - vendor/assets/javascripts/bootstrap/tooltip.js
126
126
  - vendor/assets/javascripts/bootstrap/transition.js
127
- - vendor/assets/stylesheets/bootstrap.css
127
+ - vendor/assets/stylesheets/bootstrap.css.erb
128
128
  - vendor/twitter/bootstrap/less/alerts.less
129
129
  - vendor/twitter/bootstrap/less/badges.less
130
130
  - vendor/twitter/bootstrap/less/bootstrap.less
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  requirements: []
227
227
  rubyforge_project: bootstrap-generators
228
- rubygems_version: 2.2.0.rc.1
228
+ rubygems_version: 2.2.2
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: Bootstrap-generators provides Twitter Bootstrap generators for Rails 4 (supported