bootstrap 4.0.0.alpha1

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.
Files changed (145) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +14 -0
  3. data/.gitignore +19 -0
  4. data/.travis.yml +16 -0
  5. data/CHANGELOG.md +7 -0
  6. data/Gemfile +13 -0
  7. data/LICENSE +21 -0
  8. data/README.md +143 -0
  9. data/Rakefile +75 -0
  10. data/assets/javascripts/bootstrap-sprockets.js +11 -0
  11. data/assets/javascripts/bootstrap.js +3560 -0
  12. data/assets/javascripts/bootstrap.min.js +220 -0
  13. data/assets/javascripts/bootstrap/alert.js +192 -0
  14. data/assets/javascripts/bootstrap/button.js +172 -0
  15. data/assets/javascripts/bootstrap/carousel.js +478 -0
  16. data/assets/javascripts/bootstrap/collapse.js +364 -0
  17. data/assets/javascripts/bootstrap/dropdown.js +293 -0
  18. data/assets/javascripts/bootstrap/modal.js +536 -0
  19. data/assets/javascripts/bootstrap/popover.js +201 -0
  20. data/assets/javascripts/bootstrap/scrollspy.js +320 -0
  21. data/assets/javascripts/bootstrap/tab.js +263 -0
  22. data/assets/javascripts/bootstrap/tooltip.js +619 -0
  23. data/assets/javascripts/bootstrap/util.js +157 -0
  24. data/assets/stylesheets/_bootstrap-flex.scss +8 -0
  25. data/assets/stylesheets/_bootstrap-grid.scss +62 -0
  26. data/assets/stylesheets/_bootstrap-reboot.scss +10 -0
  27. data/assets/stylesheets/_bootstrap.scss +55 -0
  28. data/assets/stylesheets/bootstrap/_alert.scss +65 -0
  29. data/assets/stylesheets/bootstrap/_animation.scss +27 -0
  30. data/assets/stylesheets/bootstrap/_breadcrumb.scss +23 -0
  31. data/assets/stylesheets/bootstrap/_button-group.scss +224 -0
  32. data/assets/stylesheets/bootstrap/_buttons.scss +174 -0
  33. data/assets/stylesheets/bootstrap/_card.scss +293 -0
  34. data/assets/stylesheets/bootstrap/_carousel.scss +252 -0
  35. data/assets/stylesheets/bootstrap/_close.scss +28 -0
  36. data/assets/stylesheets/bootstrap/_code.scss +58 -0
  37. data/assets/stylesheets/bootstrap/_custom-forms.scss +225 -0
  38. data/assets/stylesheets/bootstrap/_dropdown.scss +191 -0
  39. data/assets/stylesheets/bootstrap/_forms.scss +454 -0
  40. data/assets/stylesheets/bootstrap/_grid.scss +76 -0
  41. data/assets/stylesheets/bootstrap/_images.scss +28 -0
  42. data/assets/stylesheets/bootstrap/_input-group.scss +181 -0
  43. data/assets/stylesheets/bootstrap/_jumbotron.scss +22 -0
  44. data/assets/stylesheets/bootstrap/_labels.scss +75 -0
  45. data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
  46. data/assets/stylesheets/bootstrap/_media.scss +90 -0
  47. data/assets/stylesheets/bootstrap/_mixins.scss +54 -0
  48. data/assets/stylesheets/bootstrap/_modal.scss +146 -0
  49. data/assets/stylesheets/bootstrap/_nav.scss +155 -0
  50. data/assets/stylesheets/bootstrap/_navbar.scss +230 -0
  51. data/assets/stylesheets/bootstrap/_normalize.scss +428 -0
  52. data/assets/stylesheets/bootstrap/_pager.scss +57 -0
  53. data/assets/stylesheets/bootstrap/_pagination.scss +82 -0
  54. data/assets/stylesheets/bootstrap/_popover.scss +140 -0
  55. data/assets/stylesheets/bootstrap/_print.scss +88 -0
  56. data/assets/stylesheets/bootstrap/_progress.scss +156 -0
  57. data/assets/stylesheets/bootstrap/_reboot.scss +298 -0
  58. data/assets/stylesheets/bootstrap/_responsive-embed.scss +38 -0
  59. data/assets/stylesheets/bootstrap/_tables.scss +193 -0
  60. data/assets/stylesheets/bootstrap/_tooltip.scss +85 -0
  61. data/assets/stylesheets/bootstrap/_type.scss +192 -0
  62. data/assets/stylesheets/bootstrap/_utilities-responsive.scss +49 -0
  63. data/assets/stylesheets/bootstrap/_utilities-spacing.scss +78 -0
  64. data/assets/stylesheets/bootstrap/_utilities.scss +117 -0
  65. data/assets/stylesheets/bootstrap/_variables.scss +632 -0
  66. data/assets/stylesheets/bootstrap/mixins/_alert.scss +14 -0
  67. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +13 -0
  68. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +35 -0
  69. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +76 -0
  70. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +100 -0
  71. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  72. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +7 -0
  73. data/assets/stylesheets/bootstrap/mixins/_forms.scss +89 -0
  74. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +43 -0
  75. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +44 -0
  76. data/assets/stylesheets/bootstrap/mixins/_grid.scss +75 -0
  77. data/assets/stylesheets/bootstrap/mixins/_hover.scss +59 -0
  78. data/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
  79. data/assets/stylesheets/bootstrap/mixins/_label.scss +11 -0
  80. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +30 -0
  81. data/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
  82. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  83. data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +9 -0
  84. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
  85. data/assets/stylesheets/bootstrap/mixins/_progress.scss +18 -0
  86. data/assets/stylesheets/bootstrap/mixins/_pulls.scss +6 -0
  87. data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  88. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
  89. data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  90. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +32 -0
  91. data/assets/stylesheets/bootstrap/mixins/_size.scss +6 -0
  92. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  93. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +30 -0
  94. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
  95. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +8 -0
  96. data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +8 -0
  97. data/bootstrap.gemspec +36 -0
  98. data/lib/bootstrap.rb +76 -0
  99. data/lib/bootstrap/engine.rb +11 -0
  100. data/lib/bootstrap/version.rb +4 -0
  101. data/tasks/updater.rb +67 -0
  102. data/tasks/updater/js.rb +37 -0
  103. data/tasks/updater/logger.rb +57 -0
  104. data/tasks/updater/network.rb +101 -0
  105. data/tasks/updater/scss.rb +34 -0
  106. data/templates/project/_bootstrap-variables.scss +633 -0
  107. data/templates/project/manifest.rb +18 -0
  108. data/templates/project/styles.scss +10 -0
  109. data/test/compass_test.rb +9 -0
  110. data/test/dummy_rails/README.rdoc +3 -0
  111. data/test/dummy_rails/Rakefile +6 -0
  112. data/test/dummy_rails/app/assets/images/.keep +0 -0
  113. data/test/dummy_rails/app/assets/javascripts/application.js +7 -0
  114. data/test/dummy_rails/app/assets/stylesheets/application.sass +1 -0
  115. data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
  116. data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
  117. data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
  118. data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
  119. data/test/dummy_rails/app/views/pages/root.html.slim +58 -0
  120. data/test/dummy_rails/config.ru +4 -0
  121. data/test/dummy_rails/config/application.rb +34 -0
  122. data/test/dummy_rails/config/boot.rb +5 -0
  123. data/test/dummy_rails/config/environment.rb +5 -0
  124. data/test/dummy_rails/config/environments/development.rb +23 -0
  125. data/test/dummy_rails/config/environments/production.rb +82 -0
  126. data/test/dummy_rails/config/environments/test.rb +38 -0
  127. data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
  128. data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
  129. data/test/dummy_rails/config/initializers/inflections.rb +16 -0
  130. data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
  131. data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
  132. data/test/dummy_rails/config/initializers/session_store.rb +3 -0
  133. data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
  134. data/test/dummy_rails/config/locales/en.yml +3 -0
  135. data/test/dummy_rails/config/locales/es.yml +3 -0
  136. data/test/dummy_rails/config/routes.rb +3 -0
  137. data/test/dummy_rails/log/.keep +0 -0
  138. data/test/gemfiles/rails_4_2.gemfile +11 -0
  139. data/test/gemfiles/rails_head.gemfile +19 -0
  140. data/test/rails_test.rb +19 -0
  141. data/test/support/dummy_rails_integration.rb +22 -0
  142. data/test/support/reporting.rb +27 -0
  143. data/test/test_helper.rb +35 -0
  144. data/test/test_helper_rails.rb +6 -0
  145. metadata +433 -0
@@ -0,0 +1,59 @@
1
+ @mixin hover {
2
+ @if $enable-hover-media-query {
3
+ // See Media Queries Level 4: http://drafts.csswg.org/mediaqueries/#hover
4
+ // Currently shimmed by https://github.com/twbs/mq4-hover-shim
5
+ @media (hover: hover) {
6
+ &:hover { @content }
7
+ }
8
+ }
9
+ @else {
10
+ &:hover { @content }
11
+ }
12
+ }
13
+
14
+ @mixin hover-focus {
15
+ @if $enable-hover-media-query {
16
+ &:focus { @content }
17
+ @include hover { @content }
18
+ }
19
+ @else {
20
+ &:focus,
21
+ &:hover {
22
+ @content
23
+ }
24
+ }
25
+ }
26
+
27
+ @mixin plain-hover-focus {
28
+ @if $enable-hover-media-query {
29
+ &,
30
+ &:focus {
31
+ @content
32
+ }
33
+ @include hover { @content }
34
+ }
35
+ @else {
36
+ &,
37
+ &:focus,
38
+ &:hover {
39
+ @content
40
+ }
41
+ }
42
+ }
43
+
44
+ @mixin hover-focus-active {
45
+ @if $enable-hover-media-query {
46
+ &:focus,
47
+ &:active {
48
+ @content
49
+ }
50
+ @include hover { @content }
51
+ }
52
+ @else {
53
+ &:focus,
54
+ &:active,
55
+ &:hover {
56
+ @content
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,33 @@
1
+ // Image Mixins
2
+ // - Responsive image
3
+ // - Retina image
4
+
5
+
6
+ // Responsive image
7
+ //
8
+ // Keep images from scaling beyond the width of their parents.
9
+
10
+ @mixin img-fluid($display: block) {
11
+ display: $display;
12
+ max-width: 100%; // Part 1: Set a maximum relative to the parent
13
+ height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
14
+ }
15
+
16
+
17
+ // Retina image
18
+ //
19
+ // Short retina mixin for setting background-image and -size.
20
+
21
+ @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
22
+ background-image: url($file-1x);
23
+
24
+ @media
25
+ only screen and (-webkit-min-device-pixel-ratio: 2),
26
+ only screen and ( -o-min-device-pixel-ratio: 2/1),
27
+ only screen and ( min-device-pixel-ratio: 2),
28
+ only screen and ( min-resolution: 192dpi),
29
+ only screen and ( min-resolution: 2dppx) {
30
+ background-image: url($file-2x);
31
+ background-size: $width-1x $height-1x;
32
+ }
33
+ }
@@ -0,0 +1,11 @@
1
+ // Labels
2
+
3
+ @mixin label-variant($color) {
4
+ background-color: $color;
5
+
6
+ &[href] {
7
+ @include hover-focus {
8
+ background-color: darken($color, 10%);
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,30 @@
1
+ // List Groups
2
+
3
+ @mixin list-group-item-variant($state, $background, $color) {
4
+ .list-group-item-#{$state} {
5
+ color: $color;
6
+ background-color: $background;
7
+ }
8
+
9
+ a.list-group-item-#{$state},
10
+ button.list-group-item-#{$state} {
11
+ color: $color;
12
+
13
+ .list-group-item-heading {
14
+ color: inherit;
15
+ }
16
+
17
+ @include hover-focus {
18
+ color: $color;
19
+ background-color: darken($background, 5%);
20
+ }
21
+
22
+ &.active {
23
+ @include plain-hover-focus {
24
+ color: #fff;
25
+ background-color: $color;
26
+ border-color: $color;
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,7 @@
1
+ // Lists
2
+
3
+ // Unstyled keeps list items block level, just removes default browser padding and list-style
4
+ @mixin list-unstyled {
5
+ padding-left: 0;
6
+ list-style: none;
7
+ }
@@ -0,0 +1,10 @@
1
+ // Horizontal dividers
2
+ //
3
+ // Dividers (basically an hr) within dropdowns and nav lists
4
+
5
+ @mixin nav-divider($color: #e5e5e5) {
6
+ height: 1px;
7
+ margin: ($spacer-y / 2) 0;
8
+ overflow: hidden;
9
+ background-color: $color;
10
+ }
@@ -0,0 +1,9 @@
1
+ // Navbar vertical align
2
+ //
3
+ // Vertically center elements in the navbar.
4
+ // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
5
+
6
+ // @mixin navbar-vertical-align($element-height) {
7
+ // margin-top: (($navbar-height - $element-height) / 2);
8
+ // margin-bottom: (($navbar-height - $element-height) / 2);
9
+ // }
@@ -0,0 +1,24 @@
1
+ // Pagination
2
+
3
+ @mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
4
+ > li {
5
+ > a,
6
+ > span {
7
+ padding: $padding-vertical $padding-horizontal;
8
+ font-size: $font-size;
9
+ line-height: $line-height;
10
+ }
11
+ &:first-child {
12
+ > a,
13
+ > span {
14
+ @include border-left-radius($border-radius);
15
+ }
16
+ }
17
+ &:last-child {
18
+ > a,
19
+ > span {
20
+ @include border-right-radius($border-radius);
21
+ }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,18 @@
1
+ // Progress bars
2
+
3
+ @mixin progress-variant($color) {
4
+ &[value]::-webkit-progress-value {
5
+ background-color: $color;
6
+ }
7
+
8
+ &[value]::-moz-progress-bar {
9
+ background-color: $color;
10
+ }
11
+
12
+ // IE9
13
+ @media screen and (min-width:0\0) {
14
+ .progress-bar {
15
+ background-color: $color;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,6 @@
1
+ @mixin pull-left {
2
+ float: left !important;
3
+ }
4
+ @mixin pull-right {
5
+ float: right !important;
6
+ }
@@ -0,0 +1,8 @@
1
+ // Reset filters for IE
2
+ //
3
+ // When you need to remove a gradient background, do not forget to use this to reset
4
+ // the IE filter for IE9.
5
+
6
+ @mixin reset-filter() {
7
+ filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)";
8
+ }
@@ -0,0 +1,18 @@
1
+ @mixin reset-text {
2
+ font-family: $font-family-base;
3
+ // We deliberately do NOT reset font-size.
4
+ font-style: normal;
5
+ font-weight: normal;
6
+ letter-spacing: normal;
7
+ line-break: auto;
8
+ line-height: $line-height;
9
+ text-align: left; // Fallback for where `start` is not supported
10
+ text-align: start;
11
+ text-decoration: none;
12
+ text-shadow: none;
13
+ text-transform: none;
14
+ white-space: normal;
15
+ word-break: normal;
16
+ word-spacing: normal;
17
+ word-wrap: normal;
18
+ }
@@ -0,0 +1,6 @@
1
+ // Resize anything
2
+
3
+ @mixin resizable($direction) {
4
+ resize: $direction; // Options: horizontal, vertical, both
5
+ overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
6
+ }
@@ -0,0 +1,32 @@
1
+ // Only display content to screen readers
2
+ //
3
+ // See: http://a11yproject.com/posts/how-to-hide-content/
4
+
5
+ @mixin sr-only {
6
+ position: absolute;
7
+ width: 1px;
8
+ height: 1px;
9
+ padding: 0;
10
+ margin: -1px;
11
+ overflow: hidden;
12
+ clip: rect(0,0,0,0);
13
+ border: 0;
14
+ }
15
+
16
+ // Use in conjunction with .sr-only to only display content when it's focused.
17
+ //
18
+ // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
19
+ //
20
+ // Credit: HTML5 Boilerplate
21
+
22
+ @mixin sr-only-focusable {
23
+ &:active,
24
+ &:focus {
25
+ position: static;
26
+ width: auto;
27
+ height: auto;
28
+ margin: 0;
29
+ overflow: visible;
30
+ clip: auto;
31
+ }
32
+ }
@@ -0,0 +1,6 @@
1
+ // Sizing shortcuts
2
+
3
+ @mixin size($width, $height: $width) {
4
+ width: $width;
5
+ height: $height;
6
+ }
@@ -0,0 +1,9 @@
1
+ // WebKit-style focus
2
+
3
+ @mixin tab-focus() {
4
+ // Default
5
+ outline: thin dotted;
6
+ // WebKit
7
+ outline: 5px auto -webkit-focus-ring-color;
8
+ outline-offset: -2px;
9
+ }
@@ -0,0 +1,30 @@
1
+ // Tables
2
+
3
+ @mixin table-row-variant($state, $background) {
4
+ // Exact selectors below required to override `.table-striped` and prevent
5
+ // inheritance to nested tables.
6
+ .table-#{$state} {
7
+ &,
8
+ > th,
9
+ > td {
10
+ background-color: $background;
11
+ }
12
+ }
13
+
14
+ // Hover states for `.table-hover`
15
+ // Note: this is not available for cells or rows within `thead` or `tfoot`.
16
+ .table-hover {
17
+ $hover-background: darken($background, 5%);
18
+
19
+ .table-#{$state} {
20
+ @include hover {
21
+ background-color: $hover-background;
22
+
23
+ > td,
24
+ > th {
25
+ background-color: $hover-background;
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,12 @@
1
+ // Typography
2
+
3
+ @mixin text-emphasis-variant($parent, $color) {
4
+ #{$parent} {
5
+ color: $color;
6
+ }
7
+ a#{$parent} {
8
+ @include hover-focus {
9
+ color: darken($color, 10%);
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,8 @@
1
+ // CSS image replacement
2
+ @mixin text-hide() {
3
+ font: "0/0" a;
4
+ color: transparent;
5
+ text-shadow: none;
6
+ background-color: transparent;
7
+ border: 0;
8
+ }
@@ -0,0 +1,8 @@
1
+ // Text truncate
2
+ // Requires inline-block or block for proper styling
3
+
4
+ @mixin text-truncate() {
5
+ overflow: hidden;
6
+ text-overflow: ellipsis;
7
+ white-space: nowrap;
8
+ }
data/bootstrap.gemspec ADDED
@@ -0,0 +1,36 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'bootstrap/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'bootstrap'
7
+ s.version = Bootstrap::VERSION
8
+ s.authors = ['Twitter, Inc.']
9
+ s.email = 'glex.spb@gmail.com'
10
+ s.summary = 'The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web. http://getbootstrap.com'
11
+ s.homepage = 'https://github.com/twbs/bootstrap-rubygem'
12
+ s.license = 'MIT'
13
+
14
+ s.add_runtime_dependency 'sass', '>= 3.4.19'
15
+ s.add_runtime_dependency 'autoprefixer-rails', '>= 6.0.3'
16
+
17
+ # Testing dependencies
18
+ s.add_development_dependency 'minitest', '~> 5.8.0'
19
+ s.add_development_dependency 'minitest-reporters', '~> 1.0.5'
20
+ s.add_development_dependency 'compass', '~> 1.0.3'
21
+ s.add_development_dependency 'term-ansicolor'
22
+ # Integration testing
23
+ s.add_development_dependency 'capybara'
24
+ s.add_development_dependency 'poltergeist'
25
+ # Dummy Rails app dependencies
26
+ s.add_development_dependency 'actionpack', '>= 4.1.5'
27
+ s.add_development_dependency 'activesupport', '>= 4.1.5'
28
+ s.add_development_dependency 'json', '>= 1.8.1'
29
+ s.add_development_dependency 'sprockets-rails', '>= 2.3.2'
30
+ s.add_development_dependency 'jquery-rails', '>= 3.1.0'
31
+ s.add_development_dependency 'slim-rails'
32
+ s.add_development_dependency 'uglifier'
33
+
34
+ s.files = `git ls-files`.split("\n")
35
+ s.test_files = `git ls-files -- test/*`.split("\n")
36
+ end
data/lib/bootstrap.rb ADDED
@@ -0,0 +1,76 @@
1
+ require 'bootstrap/version'
2
+ module Bootstrap
3
+ class << self
4
+ # Inspired by Kaminari
5
+ def load!
6
+ register_compass_extension if compass?
7
+
8
+ if rails?
9
+ register_rails_engine
10
+ elsif sprockets?
11
+ register_sprockets
12
+ end
13
+
14
+ configure_sass
15
+ end
16
+
17
+ # Paths
18
+ def gem_path
19
+ @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
20
+ end
21
+
22
+ def stylesheets_path
23
+ File.join assets_path, 'stylesheets'
24
+ end
25
+
26
+ def javascripts_path
27
+ File.join assets_path, 'javascripts'
28
+ end
29
+
30
+ def assets_path
31
+ @assets_path ||= File.join gem_path, 'assets'
32
+ end
33
+
34
+ # Environment detection helpers
35
+ def sprockets?
36
+ defined?(::Sprockets)
37
+ end
38
+
39
+ def compass?
40
+ defined?(::Compass::Frameworks)
41
+ end
42
+
43
+ def rails?
44
+ defined?(::Rails)
45
+ end
46
+
47
+ private
48
+
49
+ def configure_sass
50
+ require 'sass'
51
+
52
+ ::Sass.load_paths << stylesheets_path
53
+ end
54
+
55
+ def register_compass_extension
56
+ ::Compass::Frameworks.register(
57
+ 'bootstrap',
58
+ :version => Bootstrap::VERSION,
59
+ :path => gem_path,
60
+ :stylesheets_directory => stylesheets_path,
61
+ :templates_directory => File.join(gem_path, 'templates')
62
+ )
63
+ end
64
+
65
+ def register_rails_engine
66
+ require 'bootstrap/engine'
67
+ end
68
+
69
+ def register_sprockets
70
+ Sprockets.append_path(stylesheets_path)
71
+ Sprockets.append_path(javascripts_path)
72
+ end
73
+ end
74
+ end
75
+
76
+ Bootstrap.load!