bootstrap-sass 3.1.1.1 → 3.2.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap-sass might be problematic. Click here for more details.

Files changed (143) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.travis.yml +6 -2
  4. data/CHANGELOG.md +19 -0
  5. data/Gemfile +5 -10
  6. data/README.md +140 -75
  7. data/Rakefile +4 -5
  8. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  9. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.svg +0 -0
  10. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  11. data/{vendor/assets → assets}/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  12. data/assets/images/.keep +0 -0
  13. data/assets/javascripts/bootstrap-sprockets.js +12 -0
  14. data/assets/javascripts/bootstrap.js +2107 -0
  15. data/{vendor/assets → assets}/javascripts/bootstrap/affix.js +18 -11
  16. data/{vendor/assets → assets}/javascripts/bootstrap/alert.js +10 -6
  17. data/{vendor/assets → assets}/javascripts/bootstrap/button.js +11 -8
  18. data/{vendor/assets → assets}/javascripts/bootstrap/carousel.js +49 -31
  19. data/{vendor/assets → assets}/javascripts/bootstrap/collapse.js +19 -24
  20. data/{vendor/assets → assets}/javascripts/bootstrap/dropdown.js +9 -5
  21. data/{vendor/assets → assets}/javascripts/bootstrap/modal.js +25 -16
  22. data/{vendor/assets → assets}/javascripts/bootstrap/popover.js +9 -6
  23. data/{vendor/assets → assets}/javascripts/bootstrap/scrollspy.js +37 -21
  24. data/{vendor/assets → assets}/javascripts/bootstrap/tab.js +11 -8
  25. data/{vendor/assets → assets}/javascripts/bootstrap/tooltip.js +52 -17
  26. data/{vendor/assets → assets}/javascripts/bootstrap/transition.js +14 -3
  27. data/assets/stylesheets/_bootstrap-compass.scss +7 -0
  28. data/{vendor/assets → assets}/stylesheets/_bootstrap-mincer.scss +0 -0
  29. data/assets/stylesheets/_bootstrap-sprockets.scss +7 -0
  30. data/{vendor/assets/stylesheets/bootstrap.scss → assets/stylesheets/_bootstrap.scss} +0 -0
  31. data/{vendor/assets → assets}/stylesheets/bootstrap/_alerts.scss +4 -3
  32. data/{vendor/assets → assets}/stylesheets/bootstrap/_badges.scss +0 -0
  33. data/{vendor/assets → assets}/stylesheets/bootstrap/_breadcrumbs.scss +0 -0
  34. data/{vendor/assets → assets}/stylesheets/bootstrap/_button-groups.scss +5 -1
  35. data/{vendor/assets → assets}/stylesheets/bootstrap/_buttons.scss +0 -2
  36. data/{vendor/assets → assets}/stylesheets/bootstrap/_carousel.scss +3 -1
  37. data/{vendor/assets → assets}/stylesheets/bootstrap/_close.scss +0 -0
  38. data/{vendor/assets → assets}/stylesheets/bootstrap/_code.scss +6 -0
  39. data/{vendor/assets → assets}/stylesheets/bootstrap/_component-animations.scss +0 -0
  40. data/{vendor/assets → assets}/stylesheets/bootstrap/_dropdowns.scss +1 -0
  41. data/{vendor/assets → assets}/stylesheets/bootstrap/_forms.scss +82 -22
  42. data/{vendor/assets → assets}/stylesheets/bootstrap/_glyphicons.scss +4 -4
  43. data/{vendor/assets → assets}/stylesheets/bootstrap/_grid.scss +0 -0
  44. data/{vendor/assets → assets}/stylesheets/bootstrap/_input-groups.scss +6 -2
  45. data/{vendor/assets → assets}/stylesheets/bootstrap/_jumbotron.scss +0 -0
  46. data/{vendor/assets → assets}/stylesheets/bootstrap/_labels.scss +0 -0
  47. data/{vendor/assets → assets}/stylesheets/bootstrap/_list-group.scss +3 -1
  48. data/{vendor/assets → assets}/stylesheets/bootstrap/_media.scss +0 -0
  49. data/{vendor/assets → assets}/stylesheets/bootstrap/_mixins.scss +0 -0
  50. data/{vendor/assets → assets}/stylesheets/bootstrap/_modals.scss +7 -4
  51. data/{vendor/assets → assets}/stylesheets/bootstrap/_navbar.scss +1 -0
  52. data/{vendor/assets → assets}/stylesheets/bootstrap/_navs.scss +1 -1
  53. data/{vendor/assets → assets}/stylesheets/bootstrap/_normalize.scss +0 -0
  54. data/{vendor/assets → assets}/stylesheets/bootstrap/_pager.scss +0 -0
  55. data/{vendor/assets → assets}/stylesheets/bootstrap/_pagination.scss +0 -0
  56. data/{vendor/assets → assets}/stylesheets/bootstrap/_panels.scss +6 -3
  57. data/{vendor/assets → assets}/stylesheets/bootstrap/_popovers.scss +0 -0
  58. data/{vendor/assets → assets}/stylesheets/bootstrap/_print.scss +0 -0
  59. data/{vendor/assets → assets}/stylesheets/bootstrap/_progress-bars.scss +18 -2
  60. data/{vendor/assets → assets}/stylesheets/bootstrap/_responsive-embed.scss +0 -0
  61. data/{vendor/assets → assets}/stylesheets/bootstrap/_responsive-utilities.scss +2 -1
  62. data/{vendor/assets → assets}/stylesheets/bootstrap/_scaffolding.scss +1 -1
  63. data/{vendor/assets → assets}/stylesheets/bootstrap/_tables.scss +2 -2
  64. data/{vendor/assets → assets}/stylesheets/bootstrap/_theme.scss +11 -0
  65. data/{vendor/assets → assets}/stylesheets/bootstrap/_thumbnails.scss +0 -0
  66. data/{vendor/assets → assets}/stylesheets/bootstrap/_tooltip.scss +0 -0
  67. data/{vendor/assets → assets}/stylesheets/bootstrap/_type.scss +16 -6
  68. data/{vendor/assets → assets}/stylesheets/bootstrap/_utilities.scss +1 -0
  69. data/{vendor/assets → assets}/stylesheets/bootstrap/_variables.scss +25 -20
  70. data/{vendor/assets → assets}/stylesheets/bootstrap/_wells.scss +0 -0
  71. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_alerts.scss +0 -0
  72. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_background-variant.scss +0 -0
  73. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_border-radius.scss +0 -0
  74. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_buttons.scss +0 -0
  75. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_center-block.scss +0 -0
  76. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_clearfix.scss +0 -0
  77. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_forms.scss +0 -0
  78. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
  79. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_grid-framework.scss +2 -8
  80. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_grid.scss +3 -3
  81. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_hide-text.scss +0 -0
  82. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_image.scss +1 -0
  83. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_labels.scss +0 -0
  84. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_list-group.scss +0 -0
  85. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -0
  86. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -0
  87. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_opacity.scss +0 -0
  88. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_pagination.scss +0 -0
  89. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_panels.scss +4 -0
  90. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_progress-bar.scss +2 -0
  91. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -0
  92. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  93. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -0
  94. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_size.scss +0 -0
  95. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -0
  96. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_table-row.scss +0 -0
  97. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -0
  98. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_text-overflow.scss +0 -0
  99. data/{vendor/assets → assets}/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +5 -10
  100. data/bootstrap-sass.gemspec +11 -6
  101. data/bower.json +22 -90
  102. data/composer.json +1 -1
  103. data/lib/bootstrap-sass.rb +3 -2
  104. data/lib/bootstrap-sass/engine.rb +4 -1
  105. data/lib/bootstrap-sass/version.rb +2 -2
  106. data/package.json +6 -1
  107. data/sache.json +5 -0
  108. data/tasks/bower.rake +6 -5
  109. data/tasks/converter.rb +3 -3
  110. data/tasks/converter/js_conversion.rb +11 -5
  111. data/tasks/converter/less_conversion.rb +30 -21
  112. data/tasks/converter/logger.rb +1 -0
  113. data/tasks/converter/network.rb +14 -16
  114. data/templates/project/{_variables.sass.erb → _bootstrap-variables.sass.erb} +0 -2
  115. data/templates/project/manifest.rb +17 -16
  116. data/templates/project/styles.sass +2 -2
  117. data/test/compass_test.rb +5 -4
  118. data/test/compilation_test.rb +10 -9
  119. data/test/dummy_node_mincer/manifest.js +2 -2
  120. data/test/dummy_rails/README.rdoc +1 -1
  121. data/test/dummy_rails/app/assets/javascripts/application.js +1 -1
  122. data/test/dummy_rails/app/assets/stylesheets/application.css.sass +2 -1
  123. data/test/dummy_rails/app/views/pages/root.html.slim +1 -1
  124. data/test/dummy_rails/config/application.rb +19 -3
  125. data/test/dummy_sass_only/compile.rb +4 -4
  126. data/test/gemfiles/sass_3_2.gemfile +1 -11
  127. data/test/gemfiles/sass_3_3.gemfile +2 -13
  128. data/test/gemfiles/sass_3_4.gemfile +7 -0
  129. data/test/gemfiles/sass_head.gemfile +2 -13
  130. data/test/node_mincer_test.rb +6 -5
  131. data/test/node_sass_test.rb +7 -6
  132. data/test/pages_test.rb +3 -3
  133. data/test/sass_test.rb +9 -6
  134. data/test/sprockets_rails_test.rb +11 -5
  135. data/test/support/dummy_rails_integration.rb +22 -0
  136. data/test/support/integration_test.rb +4 -11
  137. data/test/support/reporting.rb +17 -0
  138. data/test/test_helper.rb +22 -18
  139. data/test/test_helper_rails.rb +6 -0
  140. metadata +231 -151
  141. data/lib/bootstrap-sass/sass_functions.rb +0 -50
  142. data/vendor/assets/javascripts/bootstrap.js +0 -12
  143. data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +0 -50
@@ -13,16 +13,21 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.add_runtime_dependency 'sass', '~> 3.2'
15
15
 
16
+ # Testing dependencies
17
+ s.add_development_dependency 'minitest', '~> 5.4.0'
18
+ s.add_development_dependency 'minitest-reporters', '~> 1.0.5'
19
+ # Integration testing
20
+ s.add_development_dependency 'capybara'
21
+ s.add_development_dependency 'poltergeist'
16
22
  # Dummy Rails app dependencies
17
- s.add_development_dependency 'sprockets-rails', '>= 2.0.1'
23
+ s.add_development_dependency 'actionpack', '>= 4.1.5'
24
+ s.add_development_dependency 'activesupport', '>= 4.1.5'
25
+ s.add_development_dependency 'json', '>= 1.8.1'
26
+ s.add_development_dependency 'sprockets-rails', '>= 2.1.3'
27
+ s.add_development_dependency 'autoprefixer-rails', '~> 1.1'
18
28
  s.add_development_dependency 'jquery-rails', '>= 3.1.0'
19
29
  s.add_development_dependency 'slim-rails'
20
30
  s.add_development_dependency 'uglifier'
21
- # Compass dummy app
22
- s.add_development_dependency 'compass'
23
- # Integration testing
24
- s.add_development_dependency 'capybara'
25
- s.add_development_dependency 'poltergeist'
26
31
  # Converter
27
32
  s.add_development_dependency 'term-ansicolor'
28
33
 
data/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-sass",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "homepage": "https://github.com/twbs/bootstrap-sass",
5
5
  "authors": [
6
6
  "Thomas McDonald",
@@ -10,94 +10,23 @@
10
10
  ],
11
11
  "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.",
12
12
  "main": [
13
- "vendor/assets/stylesheets/_bootstrap-mincer.scss",
14
- "vendor/assets/stylesheets/bootstrap/_alerts.scss",
15
- "vendor/assets/stylesheets/bootstrap/_badges.scss",
16
- "vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss",
17
- "vendor/assets/stylesheets/bootstrap/_button-groups.scss",
18
- "vendor/assets/stylesheets/bootstrap/_buttons.scss",
19
- "vendor/assets/stylesheets/bootstrap/_carousel.scss",
20
- "vendor/assets/stylesheets/bootstrap/_close.scss",
21
- "vendor/assets/stylesheets/bootstrap/_code.scss",
22
- "vendor/assets/stylesheets/bootstrap/_component-animations.scss",
23
- "vendor/assets/stylesheets/bootstrap/_dropdowns.scss",
24
- "vendor/assets/stylesheets/bootstrap/_forms.scss",
25
- "vendor/assets/stylesheets/bootstrap/_glyphicons.scss",
26
- "vendor/assets/stylesheets/bootstrap/_grid.scss",
27
- "vendor/assets/stylesheets/bootstrap/_input-groups.scss",
28
- "vendor/assets/stylesheets/bootstrap/_jumbotron.scss",
29
- "vendor/assets/stylesheets/bootstrap/_labels.scss",
30
- "vendor/assets/stylesheets/bootstrap/_list-group.scss",
31
- "vendor/assets/stylesheets/bootstrap/_media.scss",
32
- "vendor/assets/stylesheets/bootstrap/_mixins.scss",
33
- "vendor/assets/stylesheets/bootstrap/_modals.scss",
34
- "vendor/assets/stylesheets/bootstrap/_navbar.scss",
35
- "vendor/assets/stylesheets/bootstrap/_navs.scss",
36
- "vendor/assets/stylesheets/bootstrap/_normalize.scss",
37
- "vendor/assets/stylesheets/bootstrap/_pager.scss",
38
- "vendor/assets/stylesheets/bootstrap/_pagination.scss",
39
- "vendor/assets/stylesheets/bootstrap/_panels.scss",
40
- "vendor/assets/stylesheets/bootstrap/_popovers.scss",
41
- "vendor/assets/stylesheets/bootstrap/_print.scss",
42
- "vendor/assets/stylesheets/bootstrap/_progress-bars.scss",
43
- "vendor/assets/stylesheets/bootstrap/_responsive-embed.scss",
44
- "vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss",
45
- "vendor/assets/stylesheets/bootstrap/_scaffolding.scss",
46
- "vendor/assets/stylesheets/bootstrap/_tables.scss",
47
- "vendor/assets/stylesheets/bootstrap/_theme.scss",
48
- "vendor/assets/stylesheets/bootstrap/_thumbnails.scss",
49
- "vendor/assets/stylesheets/bootstrap/_tooltip.scss",
50
- "vendor/assets/stylesheets/bootstrap/_type.scss",
51
- "vendor/assets/stylesheets/bootstrap/_utilities.scss",
52
- "vendor/assets/stylesheets/bootstrap/_variables.scss",
53
- "vendor/assets/stylesheets/bootstrap/_wells.scss",
54
- "vendor/assets/stylesheets/bootstrap/bootstrap.scss",
55
- "vendor/assets/stylesheets/bootstrap/mixins/_alerts.scss",
56
- "vendor/assets/stylesheets/bootstrap/mixins/_background-variant.scss",
57
- "vendor/assets/stylesheets/bootstrap/mixins/_border-radius.scss",
58
- "vendor/assets/stylesheets/bootstrap/mixins/_buttons.scss",
59
- "vendor/assets/stylesheets/bootstrap/mixins/_center-block.scss",
60
- "vendor/assets/stylesheets/bootstrap/mixins/_clearfix.scss",
61
- "vendor/assets/stylesheets/bootstrap/mixins/_forms.scss",
62
- "vendor/assets/stylesheets/bootstrap/mixins/_gradients.scss",
63
- "vendor/assets/stylesheets/bootstrap/mixins/_grid-framework.scss",
64
- "vendor/assets/stylesheets/bootstrap/mixins/_grid.scss",
65
- "vendor/assets/stylesheets/bootstrap/mixins/_hide-text.scss",
66
- "vendor/assets/stylesheets/bootstrap/mixins/_image.scss",
67
- "vendor/assets/stylesheets/bootstrap/mixins/_labels.scss",
68
- "vendor/assets/stylesheets/bootstrap/mixins/_list-group.scss",
69
- "vendor/assets/stylesheets/bootstrap/mixins/_nav-divider.scss",
70
- "vendor/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss",
71
- "vendor/assets/stylesheets/bootstrap/mixins/_opacity.scss",
72
- "vendor/assets/stylesheets/bootstrap/mixins/_pagination.scss",
73
- "vendor/assets/stylesheets/bootstrap/mixins/_panels.scss",
74
- "vendor/assets/stylesheets/bootstrap/mixins/_progress-bar.scss",
75
- "vendor/assets/stylesheets/bootstrap/mixins/_reset-filter.scss",
76
- "vendor/assets/stylesheets/bootstrap/mixins/_resize.scss",
77
- "vendor/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss",
78
- "vendor/assets/stylesheets/bootstrap/mixins/_size.scss",
79
- "vendor/assets/stylesheets/bootstrap/mixins/_tab-focus.scss",
80
- "vendor/assets/stylesheets/bootstrap/mixins/_table-row.scss",
81
- "vendor/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss",
82
- "vendor/assets/stylesheets/bootstrap/mixins/_text-overflow.scss",
83
- "vendor/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss",
84
- "vendor/assets/stylesheets/bootstrap.scss",
85
- "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot",
86
- "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg",
87
- "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf",
88
- "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff",
89
- "vendor/assets/javascripts/bootstrap/affix.js",
90
- "vendor/assets/javascripts/bootstrap/alert.js",
91
- "vendor/assets/javascripts/bootstrap/button.js",
92
- "vendor/assets/javascripts/bootstrap/carousel.js",
93
- "vendor/assets/javascripts/bootstrap/collapse.js",
94
- "vendor/assets/javascripts/bootstrap/dropdown.js",
95
- "vendor/assets/javascripts/bootstrap/tab.js",
96
- "vendor/assets/javascripts/bootstrap/transition.js",
97
- "vendor/assets/javascripts/bootstrap/scrollspy.js",
98
- "vendor/assets/javascripts/bootstrap/modal.js",
99
- "vendor/assets/javascripts/bootstrap/tooltip.js",
100
- "vendor/assets/javascripts/bootstrap/popover.js"
13
+ "assets/stylesheets/_bootstrap.scss",
14
+ "assets/fonts/bootstrap/glyphicons-halflings-regular.eot",
15
+ "assets/fonts/bootstrap/glyphicons-halflings-regular.svg",
16
+ "assets/fonts/bootstrap/glyphicons-halflings-regular.ttf",
17
+ "assets/fonts/bootstrap/glyphicons-halflings-regular.woff",
18
+ "assets/javascripts/bootstrap/affix.js",
19
+ "assets/javascripts/bootstrap/alert.js",
20
+ "assets/javascripts/bootstrap/button.js",
21
+ "assets/javascripts/bootstrap/carousel.js",
22
+ "assets/javascripts/bootstrap/collapse.js",
23
+ "assets/javascripts/bootstrap/dropdown.js",
24
+ "assets/javascripts/bootstrap/tab.js",
25
+ "assets/javascripts/bootstrap/transition.js",
26
+ "assets/javascripts/bootstrap/scrollspy.js",
27
+ "assets/javascripts/bootstrap/modal.js",
28
+ "assets/javascripts/bootstrap/tooltip.js",
29
+ "assets/javascripts/bootstrap/popover.js"
101
30
  ],
102
31
  "keywords": [
103
32
  "twbs",
@@ -114,5 +43,8 @@
114
43
  "*.gemspec",
115
44
  "Rakefile",
116
45
  "Gemfile"
117
- ]
46
+ ],
47
+ "dependencies": {
48
+ "jquery": ">= 1.9.0"
49
+ }
118
50
  }
@@ -29,7 +29,7 @@
29
29
  "license": "MIT",
30
30
  "extra": {
31
31
  "branch-alias": {
32
- "dev-master": "3.1.x-dev"
32
+ "dev-master": "3.2.x-dev"
33
33
  }
34
34
  }
35
35
  }
@@ -2,7 +2,6 @@ module Bootstrap
2
2
  class << self
3
3
  # Inspired by Kaminari
4
4
  def load!
5
- require 'bootstrap-sass/sass_functions'
6
5
  register_compass_extension if compass?
7
6
 
8
7
  if rails?
@@ -30,7 +29,7 @@ module Bootstrap
30
29
  end
31
30
 
32
31
  def assets_path
33
- @assets_path ||= File.join gem_path, 'vendor', 'assets'
32
+ @assets_path ||= File.join gem_path, 'assets'
34
33
  end
35
34
 
36
35
  # Environment detection helpers
@@ -49,6 +48,8 @@ module Bootstrap
49
48
  private
50
49
 
51
50
  def configure_sass
51
+ require 'sass'
52
+
52
53
  ::Sass.load_paths << stylesheets_path
53
54
 
54
55
  # bootstrap requires minimum precision of 10, see https://github.com/twbs/bootstrap-sass/issues/409
@@ -1,7 +1,10 @@
1
1
  module Bootstrap
2
2
  module Rails
3
3
  class Engine < ::Rails::Engine
4
- initializer "bootstrap-sass.assets.precompile" do |app|
4
+ initializer 'bootstrap-sass.assets.precompile' do |app|
5
+ %w(stylesheets javascripts fonts images).each do |sub|
6
+ app.config.assets.paths << root.join('assets', sub)
7
+ end
5
8
  app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff)$)
6
9
  end
7
10
  end
@@ -1,4 +1,4 @@
1
1
  module Bootstrap
2
- VERSION = '3.1.1.1'
3
- BOOTSTRAP_SHA = '573ad10a9dba52e4a6f059e63b667f4034ad2b39'
2
+ VERSION = '3.2.0.4'
3
+ BOOTSTRAP_SHA = 'c068162161154a4b85110ea1e7dd3d7897ce2b72'
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-sass",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -21,5 +21,10 @@
21
21
  "license": "MIT",
22
22
  "bugs": {
23
23
  "url": "https://github.com/twbs/bootstrap-sass/issues"
24
+ },
25
+ "devDependencies": {
26
+ "node-sass": "*",
27
+ "mincer": "*",
28
+ "ejs": "*"
24
29
  }
25
30
  }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "bootstrap-sass",
3
+ "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications",
4
+ "tags": ["bootstrap", "grid", "typography", "buttons", "ui", "responsive-web-design"]
5
+ }
@@ -1,5 +1,4 @@
1
1
  require 'find'
2
- require 'bootstrap-sass'
3
2
  require 'json'
4
3
  require 'pathname'
5
4
 
@@ -12,14 +11,16 @@ namespace :bower do
12
11
  }
13
12
 
14
13
  desc 'update main and version in bower.json'
15
- task :spec do
14
+ task :generate do
15
+ require 'bootstrap-sass'
16
16
  Dir.chdir Bootstrap.gem_path do
17
17
  spec = JSON.parse(File.read 'bower.json')
18
- js_paths = File.read(File.join Bootstrap.javascripts_path, 'bootstrap.js').lines.map do |line|
19
- line.strip if line.sub!(%r(//\s*=\s*require\s*(.*)\s*), 'vendor/assets/javascripts/\1.js')
18
+ js_paths = File.read(File.join Bootstrap.javascripts_path, 'bootstrap-sprockets.js').lines.map do |line|
19
+ line.strip if line.sub!(%r(//\s*=\s*require\s*(?:./)?(.*)\s*), 'assets/javascripts/\1.js')
20
20
  end.compact
21
21
 
22
- spec['main'] = find_files.(Bootstrap.stylesheets_path) +
22
+ spec['main'] =
23
+ find_files.(File.join(Bootstrap.stylesheets_path, '_bootstrap.scss')) +
23
24
  find_files.(Bootstrap.fonts_path) +
24
25
  js_paths
25
26
 
@@ -42,9 +42,9 @@ class Converter
42
42
  @cache_path = cache_path
43
43
  @repo_url = "https://github.com/#@repo"
44
44
  @save_to = {
45
- js: 'vendor/assets/javascripts/bootstrap',
46
- scss: 'vendor/assets/stylesheets/bootstrap',
47
- fonts: 'vendor/assets/fonts/bootstrap'}.merge(save_to)
45
+ js: 'assets/javascripts/bootstrap',
46
+ scss: 'assets/stylesheets/bootstrap',
47
+ fonts: 'assets/fonts/bootstrap'}.merge(save_to)
48
48
  end
49
49
 
50
50
  def_delegators :@logger, :log, :log_status, :log_processing, :log_transform, :log_file_info, :log_processed, :log_http_get_file, :log_http_get_files, :silence_log
@@ -3,20 +3,26 @@ class Converter
3
3
  def process_javascript_assets
4
4
  log_status 'Processing javascripts...'
5
5
  save_to = @save_to[:js]
6
+ contents = {}
6
7
  read_files('js', bootstrap_js_files).each do |name, file|
8
+ contents[name] = file
7
9
  save_file("#{save_to}/#{name}", file)
8
10
  end
9
11
  log_processed "#{bootstrap_js_files * ' '}"
10
12
 
11
13
  log_status 'Updating javascript manifest'
12
- content = ''
14
+ manifest = ''
15
+ cat = ''
13
16
  bootstrap_js_files.each do |name|
17
+ cat << contents[name] + "\n"
14
18
  name = name.gsub(/\.js$/, '')
15
- content << "//= require bootstrap/#{name}\n"
19
+ manifest << "//= require ./bootstrap/#{name}\n"
20
+ end
21
+ {'assets/javascripts/bootstrap-sprockets.js' => manifest,
22
+ 'assets/javascripts/bootstrap.js' => cat}.each do |path, content|
23
+ save_file path, content
24
+ log_processed path
16
25
  end
17
- path = 'vendor/assets/javascripts/bootstrap.js'
18
- save_file(path, content)
19
- log_processed path
20
26
  end
21
27
 
22
28
  def bootstrap_js_files
@@ -79,7 +79,7 @@ class Converter
79
79
  file = deinterpolate_vararg_mixins(file)
80
80
  when 'mixins/vendor-prefixes.less'
81
81
  # remove second scale mixins as this is handled via vararg in the first one
82
- file = replace_rules(file, '.scale(@ratioX; @ratioY)') {}
82
+ file = replace_rules(file, Regexp.escape('@mixin scale($ratioX, $ratioY...)')) { '' }
83
83
  when 'mixins/grid-framework.less'
84
84
  file = convert_grid_mixins file
85
85
  when 'component-animations.less'
@@ -88,13 +88,16 @@ class Converter
88
88
  file = apply_mixin_parent_selector file, '\.(?:visible|hidden)'
89
89
  when 'variables.less'
90
90
  file = insert_default_vars(file)
91
- file = unindent <<-SCSS + file, 14
92
- // a flag to toggle asset pipeline / compass integration
93
- // defaults to true if twbs-font-path function is present (no function => twbs-font-path('') parsed as string == right side)
94
- // in Sass 3.3 this can be improved with: function-exists(twbs-font-path)
95
- $bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default;
91
+ file = unindent <<-SCSS + "\n" + file, 14
92
+ // When true, asset path helpers are used, otherwise the regular CSS `url()` is used.
93
+ // When there no function is defined, `fn('')` is parsed as string that equals the right hand side
94
+ // NB: in Sass 3.3 there is a native function: function-exists(twbs-font-path)
95
+ $bootstrap-sass-asset-helper: #{sass_fn_exists('twbs-font-path')} !default;
96
+ SCSS
97
+ file = replace_all file, %r{(\$icon-font-path): \s*"(.*)" (!default);}, "\n" + unindent(<<-SCSS, 14)
98
+ // [converter] Asset helpers such as Sprockets and Node.js Mincer do not resolve relative paths
99
+ \\1: if($bootstrap-sass-asset-helper, "bootstrap/", "\\2bootstrap/") \\3;
96
100
  SCSS
97
- file = replace_all file, /(\$icon-font-path:).*(!default)/, '\1 "bootstrap/" \2'
98
101
  when 'close.less'
99
102
  # extract .close { button& {...} } rule
100
103
  file = extract_nested_rule file, 'button&'
@@ -111,8 +114,7 @@ class Converter
111
114
  when 'thumbnails.less', 'labels.less', 'badges.less'
112
115
  file = extract_nested_rule file, 'a&'
113
116
  when 'glyphicons.less'
114
- file = bootstrap_font_files.map { |p| %Q(//= depend_on_asset "bootstrap/#{File.basename(p)}") } * "\n" + "\n" + file
115
- file = replace_all file, /\#\{(url\(.*?\))}/, '\1'
117
+ file = bootstrap_font_files.map { |p| %Q(//= depend_on "bootstrap/#{File.basename(p)}") } * "\n" + "\n" + file
116
118
  file = replace_rules(file, '@font-face') { |rule|
117
119
  rule = replace_all rule, /(\$icon-font(?:-\w+)+)/, '#{\1}'
118
120
  replace_asset_url rule, :font
@@ -123,18 +125,17 @@ class Converter
123
125
  file = replace_all(file, " @include bg-variant($brand-primary);\n}", "}\n@include bg-variant('.bg-primary', $brand-primary);")
124
126
  end
125
127
 
126
- name = name.sub(/\.less$/, '.scss')
127
- path = File.join save_to, name
128
- unless name == 'bootstrap.scss'
129
- path = File.join File.dirname(path), '_' + File.basename(path)
130
- end
128
+ path = File.join save_to, name.sub(/\.less$/, '.scss')
129
+ path = File.join File.dirname(path), '_' + File.basename(path)
131
130
  save_file(path, file)
132
131
  log_processed File.basename(path)
133
132
  end
134
133
 
135
- # generate imports valid relative to both load path and file directory
136
- save_file File.expand_path("#{save_to}/../bootstrap.scss"),
137
- File.read("#{save_to}/bootstrap.scss").gsub(/ "/, ' "bootstrap/')
134
+ # move bootstrap/_bootstrap.scss to _bootstrap.scss adjusting import paths
135
+ main_from = "#{save_to}/_bootstrap.scss"
136
+ main_to = File.expand_path("#{save_to}/../_bootstrap.scss")
137
+ save_file main_to, File.read(main_from).gsub(/ "/, ' "bootstrap/')
138
+ File.delete(main_from)
138
139
  end
139
140
 
140
141
  def bootstrap_less_files
@@ -161,6 +162,10 @@ class Converter
161
162
  file
162
163
  end
163
164
 
165
+ def sass_fn_exists(fn)
166
+ %Q{(#{fn}("") != unquote('#{fn}("")'))}
167
+ end
168
+
164
169
  def replace_asset_url(rule, type)
165
170
  replace_all rule, /url\((.*?)\)/, "url(if($bootstrap-sass-asset-helper, twbs-#{type}-path(\\1), \\1))"
166
171
  end
@@ -168,13 +173,17 @@ class Converter
168
173
  # convert recursively evaluated selector $list to @for loop
169
174
  def mixin_all_grid_columns(css, selector: raise('pass class'), from: 1, to: raise('pass to'))
170
175
  mxn_def = css.each_line.first.strip
176
+ # inject local variables as default arguments
177
+ # this is to avoid overwriting outer variables with the same name with Sass <= 3.3
178
+ # see also: https://github.com/twbs/bootstrap-sass/issues/636
179
+ locals = <<-SASS.strip
180
+ $i: #{from}, $list: "#{selector}"
181
+ SASS
182
+ mxn_def.sub!(/(\(?)(\)\s*\{)/) { "#{$1}#{', ' if $1.empty?}#{locals}#{$2}" }
171
183
  step_body = (css =~ /\$list \{\n(.*?)\n[ ]*\}/m) && $1
172
184
  <<-SASS
173
185
  // [converter] This is defined recursively in LESS, but Sass supports real loops
174
186
  #{mxn_def}
175
- $list: '';
176
- $i: #{from};
177
- $list: "#{selector}";
178
187
  @for $i from (#{from} + 1) through #{to} {
179
188
  $list: "\#{$list}, #{selector}";
180
189
  }
@@ -452,7 +461,7 @@ SASS
452
461
  end
453
462
 
454
463
  def replace_fadein(less)
455
- less.gsub(/(?![\-$@.])fadein\((.*?),\s*(.*?)%\)/) { "rgba(#{$1}, #{$2.to_i / 100.0})" }
464
+ less.gsub(/(?![\-$@.])fadein\((.*?),\s*(.*?)%\)/) { "fade_in(#{$1}, #{$2.to_i / 100.0})" }
456
465
  end
457
466
 
458
467
  def replace_image_urls(less)
@@ -32,6 +32,7 @@ class Converter
32
32
  end
33
33
 
34
34
  def log_http_get_files(files, from, cached = false)
35
+ return if files.empty?
35
36
  s = " #{'CACHED ' if cached}GET #{files.length} files from #{from} #{files * ' '}..."
36
37
  if cached
37
38
  puts dark green s
@@ -7,20 +7,17 @@ class Converter
7
7
  end
8
8
 
9
9
  def read_files(path, files)
10
- full_path = "https://raw.github.com/#@repo/#@branch_sha/#{path}"
11
- if (contents = read_cached_files(path, files))
12
- log_http_get_files files, full_path, true
13
- else
14
- log_http_get_files files, full_path, false
15
- contents = {}
16
- files.map do |name|
17
- Thread.start {
18
- content = open("#{full_path}/#{name}").read
19
- Thread.exclusive { contents[name] = content }
20
- }
21
- end.each(&:join)
22
- write_cached_files path, contents
23
- end
10
+ full_path = "https://raw.githubusercontent.com/#@repo/#@branch_sha/#{path}"
11
+ contents = read_cached_files(path, files)
12
+ log_http_get_files contents.keys, full_path, true if contents.keys
13
+ files -= contents.keys
14
+ log_http_get_files files, full_path, false
15
+ files.map do |name|
16
+ Thread.start {
17
+ contents[name] = open("#{full_path}/#{name}").read
18
+ Thread.exclusive { write_cached_files path, name => contents[name] }
19
+ }
20
+ end.each(&:join)
24
21
  contents
25
22
  end
26
23
 
@@ -29,10 +26,11 @@ class Converter
29
26
  contents = {}
30
27
  if File.directory?(full_path)
31
28
  files.each do |name|
32
- contents[name] = File.read("#{full_path}/#{name}", mode: 'rb') || ''
29
+ path = "#{full_path}/#{name}"
30
+ contents[name] = File.read(path, mode: 'rb') if File.exists?(path)
33
31
  end
34
- contents
35
32
  end
33
+ contents
36
34
  end
37
35
 
38
36
  def write_cached_files(path, files)