bootstrap-sass-rails-rtl 2.0.4.12
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/LICENSE +14 -0
- data/README.md +115 -0
- data/Rakefile +37 -0
- data/lib/bootstrap-sass-rails-rtl.rb +9 -0
- data/lib/bootstrap/sass/extensions.rb +5 -0
- data/lib/bootstrap/sass/extensions/functions.rb +15 -0
- data/lib/bootstrap/sass/rails.rb +2 -0
- data/lib/bootstrap/sass/rails/engine.rb +9 -0
- data/lib/bootstrap/sass/rails/version.rb +7 -0
- data/test/cases/usage_css_spec.rb +216 -0
- data/test/cases/usage_js_spec.rb +40 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +3 -0
- data/test/dummy/app/assets/javascripts/individual.js +1 -0
- data/test/dummy/app/assets/stylesheets/application-rtl.css.scss +3 -0
- data/test/dummy/app/assets/stylesheets/application.css.scss +3 -0
- data/test/dummy/app/assets/stylesheets/individual-rtl.css.scss +11 -0
- data/test/dummy/app/assets/stylesheets/individual.css.scss +11 -0
- data/test/dummy/app/assets/stylesheets/sprockets-rtl.css +3 -0
- data/test/dummy/app/assets/stylesheets/sprockets.css +3 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +49 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +30 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/spec_helper.rb +13 -0
- data/test/support/helpers.rb +35 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
- data/vendor/assets/javascripts/twitter/bootstrap/alert.js +90 -0
- data/vendor/assets/javascripts/twitter/bootstrap/button.js +96 -0
- data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +169 -0
- data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +157 -0
- data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +100 -0
- data/vendor/assets/javascripts/twitter/bootstrap/modal.js +218 -0
- data/vendor/assets/javascripts/twitter/bootstrap/popover.js +98 -0
- data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +151 -0
- data/vendor/assets/javascripts/twitter/bootstrap/tab.js +135 -0
- data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +275 -0
- data/vendor/assets/javascripts/twitter/bootstrap/transition.js +61 -0
- data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +285 -0
- data/vendor/assets/stylesheets/twitter/bootstrap.css.scss +62 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_accordion.scss +33 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_alerts.scss +59 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_breadcrumbs.scss +24 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_button-groups.scss +190 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_buttons.scss +193 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_carousel.scss +121 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_close.scss +29 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_code.scss +57 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_component-animations.scss +20 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +142 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_forms.scss +589 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_grid.scss +8 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_hero-unit.scss +22 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_labels-badges.scss +54 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_layouts.scss +17 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_mixins.scss +612 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_modals.scss +90 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_navbar.scss +358 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_navs.scss +364 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_pager.scss +36 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_pagination.scss +56 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_popovers.scss +49 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +118 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_reset.scss +131 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-1200px-min.scss +26 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-767px-max.scss +150 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-768px-979px.scss +19 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-navbar.scss +153 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_responsive-utilities.scss +41 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_responsive.scss +48 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_scaffolding.scss +29 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_sprites.scss +178 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_tables.scss +175 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +47 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_tooltip.scss +35 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_type.scss +232 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_utilities.scss +23 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_variables.scss +206 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/_wells.scss +27 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_accordion.scss +33 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_alerts.scss +59 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_breadcrumbs.scss +24 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_button-groups.scss +190 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_buttons.scss +193 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_carousel.scss +121 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_close.scss +29 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_code.scss +57 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_component-animations.scss +20 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_dropdowns.scss +142 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_forms.scss +589 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_grid.scss +8 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_hero-unit.scss +22 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_labels-badges.scss +54 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_layouts.scss +17 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_mixins.scss +612 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_modals.scss +90 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_navbar.scss +358 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_navs.scss +364 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_pager.scss +36 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_pagination.scss +56 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_popovers.scss +49 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_progress-bars.scss +118 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_reset.scss +131 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-1200px-min.scss +26 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-767px-max.scss +150 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-768px-979px.scss +19 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-navbar.scss +153 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive-utilities.scss +41 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_responsive.scss +48 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_scaffolding.scss +29 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_sprites.scss +178 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_tables.scss +175 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_thumbnails.scss +47 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_tooltip.scss +35 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_type.scss +232 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_utilities.scss +23 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_variables.scss +206 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/rtl/_wells.scss +27 -0
- data/vendor/assets/stylesheets/twitter/bootstrap_rtl.css.scss +62 -0
- metadata +276 -0
data/LICENSE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Copyright 2011-2012 Morton Jonuschat
|
|
2
|
+
Twitter Bootstrap Copyright 2011-2012 Twitter, Inc.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
data/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Bootstrap::Sass::Rails
|
|
2
|
+
|
|
3
|
+
Bootstrap is Twitter's toolkit for kickstarting CSS for websites, apps, and more.
|
|
4
|
+
It includes base CSS styles for typography, forms, buttons, tables, grids, navigation, alerts, and more.
|
|
5
|
+
|
|
6
|
+
Twitter Bootstrap has been converted to Sass which makes it possible to use the default Rails Asset Pipeline
|
|
7
|
+
|
|
8
|
+
This version is a fork of the original bootstrap-sass-rails gem with added support for RTL css
|
|
9
|
+
|
|
10
|
+
* All assets have been namespaced within twitter/bootstrap to avoid naming conflicts
|
|
11
|
+
* Top level requires for sprockets to get the complete bundle with a
|
|
12
|
+
simple = require twitter/bootstrap
|
|
13
|
+
* Ability to import individually namespaced stylesheets or javascripts.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Stylesheets
|
|
18
|
+
|
|
19
|
+
The easiest way to use Twitter Bootstrap is to require it in your `application.css` file.
|
|
20
|
+
|
|
21
|
+
```css
|
|
22
|
+
/*
|
|
23
|
+
*= require twitter/bootstrap # LTR version
|
|
24
|
+
*= require twitter/bootstrap_rtl # RTL version
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
#example {
|
|
28
|
+
/* Your styles... */
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If you need access to the variables within the Twitter Bootstrap framework or want to use the mixins you
|
|
33
|
+
will need to import it within an `.css.scss` file. This will still include the complete framework.
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
@import "twitter/bootstrap"; # LTR version
|
|
37
|
+
@import "twitter/bootstrap_rtl"; # RTL version
|
|
38
|
+
|
|
39
|
+
#foo {
|
|
40
|
+
@include border-radius(4px);
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Using only parts of the framework like variables and mixin you can import all of these individually from
|
|
45
|
+
within `.css.scss` files.
|
|
46
|
+
|
|
47
|
+
```css
|
|
48
|
+
@import "twitter/bootstrap/variables";
|
|
49
|
+
@import "twitter/bootstrap/rtl/mixins";
|
|
50
|
+
|
|
51
|
+
@mixin myButton($radius: 5px) {
|
|
52
|
+
@include border-radius($radius);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#foo {
|
|
56
|
+
@include myButton(10px);
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Javascripts
|
|
61
|
+
|
|
62
|
+
Using the JavaScript works the same way. You can include them all with a
|
|
63
|
+
single require directive from your `application.js`.
|
|
64
|
+
|
|
65
|
+
```javascript
|
|
66
|
+
//= require twitter/bootstrap
|
|
67
|
+
|
|
68
|
+
$(document).ready(function(){
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If you only want a part of the javascripts require the individual files
|
|
73
|
+
from your `.js` file.
|
|
74
|
+
|
|
75
|
+
```javascript
|
|
76
|
+
//= require twitter/bootstrap/modal
|
|
77
|
+
|
|
78
|
+
$(document).ready(function(){
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Versioning
|
|
83
|
+
|
|
84
|
+
This gem will directly track the semantic versioning releases of the Twitter Bootstrap project.
|
|
85
|
+
If it should be necessary a build number will be added to the version to
|
|
86
|
+
mark releases specific to this gem.
|
|
87
|
+
|
|
88
|
+
## Note on Patches / Pull Requests
|
|
89
|
+
|
|
90
|
+
* Fork the project.
|
|
91
|
+
* Make your feature addition or bug fix.
|
|
92
|
+
* Add tests for it. This is important so I don't break it in a future version unintentionally.
|
|
93
|
+
* Commit, do not mess with rakefile, version, or history.
|
|
94
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
|
95
|
+
* Send me a pull request. Bonus points for topic branches.
|
|
96
|
+
|
|
97
|
+
## Credits
|
|
98
|
+
|
|
99
|
+
This work incorporates [Twitter Bootstrap](https://github.com/twitter/bootstrap) by Twitter, Inc.
|
|
100
|
+
This gem has been inspired by [less-rails-bootstrap](https://github.com/metaskills/less-rails-bootstrap) by Ken Collins
|
|
101
|
+
|
|
102
|
+
## Maintainers
|
|
103
|
+
|
|
104
|
+
* [Morton Jonuschat](https://github.com/yabawock) (Original Gem)
|
|
105
|
+
* [Zohar Arad](https://github.com/zohararad) (RTL version)
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
Apache License, Version 2.0
|
|
110
|
+
|
|
111
|
+
## Copyright
|
|
112
|
+
|
|
113
|
+
Copyright 2011-2012 Morton Jonuschat
|
|
114
|
+
Copyright 2011-2012 Zohar Arad
|
|
115
|
+
Twitter Bootstrap copyright 2011-2012 Twitter, Inc
|
data/Rakefile
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env rake
|
|
2
|
+
begin
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
rescue LoadError
|
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
6
|
+
end
|
|
7
|
+
begin
|
|
8
|
+
require 'rdoc/task'
|
|
9
|
+
rescue LoadError
|
|
10
|
+
require 'rdoc/rdoc'
|
|
11
|
+
require 'rake/rdoctask'
|
|
12
|
+
RDoc::Task = Rake::RDocTask
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
17
|
+
rdoc.title = 'BootstrapSassRails'
|
|
18
|
+
rdoc.options << '--line-numbers'
|
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Bundler::GemHelper.install_tasks
|
|
26
|
+
|
|
27
|
+
require 'rake/testtask'
|
|
28
|
+
|
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
|
30
|
+
t.libs << 'lib'
|
|
31
|
+
t.libs << 'test'
|
|
32
|
+
t.pattern = 'test/**/*_spec.rb'
|
|
33
|
+
t.verbose = false
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
task :default => :test
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Bootstrap::Sass::Extensions::Functions
|
|
2
|
+
# Snatched from compass 0.11 - used for gradients in IE6-9
|
|
3
|
+
# returns an IE hex string for a color with an alpha channel
|
|
4
|
+
# suitable for passing to IE filters.
|
|
5
|
+
def ie_hex_str(color)
|
|
6
|
+
assert_type color, :Color
|
|
7
|
+
alpha = (color.alpha * 255).round
|
|
8
|
+
alphastr = alpha.to_s(16).rjust(2, '0')
|
|
9
|
+
Sass::Script::String.new("##{alphastr}#{color.send(:hex_str)[1..-1]}".upcase)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
module Sass::Script::Functions
|
|
14
|
+
include Bootstrap::Sass::Extensions::Functions
|
|
15
|
+
end
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
class UsageCssSpec < Bootstrap::Sass::Rails::Spec
|
|
4
|
+
|
|
5
|
+
describe 'application.css' do
|
|
6
|
+
|
|
7
|
+
let(:app_css) { dummy_asset('application.css') }
|
|
8
|
+
|
|
9
|
+
it 'will render main bootstrap.less file and all included modules' do
|
|
10
|
+
app_css.must_include 'Bootstrap v'
|
|
11
|
+
app_css.must_include '_reset.scss'
|
|
12
|
+
app_css.must_include '_scaffolding'
|
|
13
|
+
app_css.must_include '_layouts.scss'
|
|
14
|
+
app_css.must_include '_type.scss'
|
|
15
|
+
app_css.must_include '_code.scss'
|
|
16
|
+
app_css.must_include '_forms.scss'
|
|
17
|
+
app_css.must_include '_tables.scss'
|
|
18
|
+
app_css.must_include '_sprites.scss'
|
|
19
|
+
app_css.must_include '_dropdowns.scss'
|
|
20
|
+
app_css.must_include '_wells.scss'
|
|
21
|
+
app_css.must_include '_component-animations.scss'
|
|
22
|
+
app_css.must_include '_close.scss'
|
|
23
|
+
app_css.must_include '_buttons.scss'
|
|
24
|
+
app_css.must_include '_button-groups.scss'
|
|
25
|
+
app_css.must_include '_alerts.scss'
|
|
26
|
+
app_css.must_include '_navs.scss'
|
|
27
|
+
app_css.must_include '_navbar.scss'
|
|
28
|
+
app_css.must_include '_breadcrumbs.scss'
|
|
29
|
+
app_css.must_include '_pagination.scss'
|
|
30
|
+
app_css.must_include '_pager.scss'
|
|
31
|
+
app_css.must_include '_modals.scss'
|
|
32
|
+
app_css.must_include '_tooltip.scss'
|
|
33
|
+
app_css.must_include '_popovers.scss'
|
|
34
|
+
app_css.must_include '_thumbnails.scss'
|
|
35
|
+
app_css.must_include '_labels-badges.scss'
|
|
36
|
+
app_css.must_include '_progress-bars.scss'
|
|
37
|
+
app_css.must_include '_accordion.scss'
|
|
38
|
+
app_css.must_include '_carousel.scss'
|
|
39
|
+
app_css.must_include '_hero-unit.scss'
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
it 'must include basic css afterward' do
|
|
43
|
+
app_css.must_include '#other-css { color: red; }', 'From our code afterward.'
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
it 'must render the correct path for the icon sprites' do
|
|
47
|
+
app_css.must_include 'background-image: url(/assets/twitter/bootstrap/glyphicons-halflings.png)'
|
|
48
|
+
app_css.must_include 'background-image: url(/assets/twitter/bootstrap/glyphicons-halflings-white.png)'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
describe 'application-rtl.css' do
|
|
54
|
+
|
|
55
|
+
let(:app_css) { dummy_asset('application-rtl.css') }
|
|
56
|
+
|
|
57
|
+
it 'will render RTL version of main bootstrap.scs file and all included modules' do
|
|
58
|
+
app_css.must_include 'Bootstrap v'
|
|
59
|
+
app_css.must_include '_reset.scss'
|
|
60
|
+
app_css.must_include '_scaffolding'
|
|
61
|
+
app_css.must_include '_layouts.scss'
|
|
62
|
+
app_css.must_include '_type.scss'
|
|
63
|
+
app_css.must_include '_code.scss'
|
|
64
|
+
app_css.must_include '_forms.scss'
|
|
65
|
+
app_css.must_include '_tables.scss'
|
|
66
|
+
app_css.must_include '_sprites.scss'
|
|
67
|
+
app_css.must_include '_dropdowns.scss'
|
|
68
|
+
app_css.must_include '_wells.scss'
|
|
69
|
+
app_css.must_include '_component-animations.scss'
|
|
70
|
+
app_css.must_include '_close.scss'
|
|
71
|
+
app_css.must_include '_buttons.scss'
|
|
72
|
+
app_css.must_include '_button-groups.scss'
|
|
73
|
+
app_css.must_include '_alerts.scss'
|
|
74
|
+
app_css.must_include '_navs.scss'
|
|
75
|
+
app_css.must_include '_navbar.scss'
|
|
76
|
+
app_css.must_include '_breadcrumbs.scss'
|
|
77
|
+
app_css.must_include '_pagination.scss'
|
|
78
|
+
app_css.must_include '_pager.scss'
|
|
79
|
+
app_css.must_include '_modals.scss'
|
|
80
|
+
app_css.must_include '_tooltip.scss'
|
|
81
|
+
app_css.must_include '_popovers.scss'
|
|
82
|
+
app_css.must_include '_thumbnails.scss'
|
|
83
|
+
app_css.must_include '_labels-badges.scss'
|
|
84
|
+
app_css.must_include '_progress-bars.scss'
|
|
85
|
+
app_css.must_include '_accordion.scss'
|
|
86
|
+
app_css.must_include '_carousel.scss'
|
|
87
|
+
app_css.must_include '_hero-unit.scss'
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
it 'must include basic css afterward' do
|
|
91
|
+
app_css.must_include '#other-css { color: red; }', 'From our code afterward.'
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
it 'must render the correct path for the icon sprites' do
|
|
95
|
+
app_css.must_include 'background-image: url(/assets/twitter/bootstrap/glyphicons-halflings.png)'
|
|
96
|
+
app_css.must_include 'background-image: url(/assets/twitter/bootstrap/glyphicons-halflings-white.png)'
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
describe 'individual-rtl.scss' do
|
|
102
|
+
|
|
103
|
+
let(:individual_css) { dummy_asset('individual-rtl.css') }
|
|
104
|
+
|
|
105
|
+
it 'will render RTL bootstrap variables and mixins' do
|
|
106
|
+
my_button_line = line_for_individual_css('individual-my-button')
|
|
107
|
+
my_button_line.must_include '-webkit-border-radius: 10px'
|
|
108
|
+
my_button_line.must_include '-moz-border-radius: 10px'
|
|
109
|
+
my_button_line.must_include 'border-radius: 10px'
|
|
110
|
+
individual_css.must_include '_responsive-1200px-min.scss'
|
|
111
|
+
individual_css.must_include '_responsive-767px-max.scss'
|
|
112
|
+
individual_css.must_include '_responsive-768px-979px.scss'
|
|
113
|
+
individual_css.must_include '_responsive-navbar.scss'
|
|
114
|
+
individual_css.must_include '_responsive-utilities.scss'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
describe 'sprockets.css' do
|
|
120
|
+
|
|
121
|
+
let(:sprockets_css) { dummy_asset('sprockets.css') }
|
|
122
|
+
|
|
123
|
+
it 'will render main bootstrap.css file and all included modules' do
|
|
124
|
+
sprockets_css.must_include 'Bootstrap v'
|
|
125
|
+
sprockets_css.must_include '_reset.scss'
|
|
126
|
+
sprockets_css.must_include '_scaffolding'
|
|
127
|
+
sprockets_css.must_include '_layouts.scss'
|
|
128
|
+
sprockets_css.must_include '_type.scss'
|
|
129
|
+
sprockets_css.must_include '_code.scss'
|
|
130
|
+
sprockets_css.must_include '_forms.scss'
|
|
131
|
+
sprockets_css.must_include '_tables.scss'
|
|
132
|
+
sprockets_css.must_include '_sprites.scss'
|
|
133
|
+
sprockets_css.must_include '_dropdowns.scss'
|
|
134
|
+
sprockets_css.must_include '_wells.scss'
|
|
135
|
+
sprockets_css.must_include '_component-animations.scss'
|
|
136
|
+
sprockets_css.must_include '_close.scss'
|
|
137
|
+
sprockets_css.must_include '_buttons.scss'
|
|
138
|
+
sprockets_css.must_include '_button-groups.scss'
|
|
139
|
+
sprockets_css.must_include '_alerts.scss'
|
|
140
|
+
sprockets_css.must_include '_navs.scss'
|
|
141
|
+
sprockets_css.must_include '_navbar.scss'
|
|
142
|
+
sprockets_css.must_include '_breadcrumbs.scss'
|
|
143
|
+
sprockets_css.must_include '_pagination.scss'
|
|
144
|
+
sprockets_css.must_include '_pager.scss'
|
|
145
|
+
sprockets_css.must_include '_modals.scss'
|
|
146
|
+
sprockets_css.must_include '_tooltip.scss'
|
|
147
|
+
sprockets_css.must_include '_popovers.scss'
|
|
148
|
+
sprockets_css.must_include '_thumbnails.scss'
|
|
149
|
+
sprockets_css.must_include '_labels-badges.scss'
|
|
150
|
+
sprockets_css.must_include '_progress-bars.scss'
|
|
151
|
+
sprockets_css.must_include '_accordion.scss'
|
|
152
|
+
sprockets_css.must_include '_carousel.scss'
|
|
153
|
+
sprockets_css.must_include '_hero-unit.scss'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
it 'must include basic css afterward' do
|
|
157
|
+
sprockets_css.must_include '#other-css { color: red; }', 'From our code afterward.'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
describe 'sprockets-rtl.css' do
|
|
163
|
+
|
|
164
|
+
let(:sprockets_css) { dummy_asset('sprockets-rtl.css') }
|
|
165
|
+
|
|
166
|
+
it 'will render main bootstrap.css file and all included modules' do
|
|
167
|
+
sprockets_css.must_include 'Bootstrap v'
|
|
168
|
+
sprockets_css.must_include '_reset.scss'
|
|
169
|
+
sprockets_css.must_include '_scaffolding'
|
|
170
|
+
sprockets_css.must_include '_layouts.scss'
|
|
171
|
+
sprockets_css.must_include '_type.scss'
|
|
172
|
+
sprockets_css.must_include '_code.scss'
|
|
173
|
+
sprockets_css.must_include '_forms.scss'
|
|
174
|
+
sprockets_css.must_include '_tables.scss'
|
|
175
|
+
sprockets_css.must_include '_sprites.scss'
|
|
176
|
+
sprockets_css.must_include '_dropdowns.scss'
|
|
177
|
+
sprockets_css.must_include '_wells.scss'
|
|
178
|
+
sprockets_css.must_include '_component-animations.scss'
|
|
179
|
+
sprockets_css.must_include '_close.scss'
|
|
180
|
+
sprockets_css.must_include '_buttons.scss'
|
|
181
|
+
sprockets_css.must_include '_button-groups.scss'
|
|
182
|
+
sprockets_css.must_include '_alerts.scss'
|
|
183
|
+
sprockets_css.must_include '_navs.scss'
|
|
184
|
+
sprockets_css.must_include '_navbar.scss'
|
|
185
|
+
sprockets_css.must_include '_breadcrumbs.scss'
|
|
186
|
+
sprockets_css.must_include '_pagination.scss'
|
|
187
|
+
sprockets_css.must_include '_pager.scss'
|
|
188
|
+
sprockets_css.must_include '_modals.scss'
|
|
189
|
+
sprockets_css.must_include '_tooltip.scss'
|
|
190
|
+
sprockets_css.must_include '_popovers.scss'
|
|
191
|
+
sprockets_css.must_include '_thumbnails.scss'
|
|
192
|
+
sprockets_css.must_include '_labels-badges.scss'
|
|
193
|
+
sprockets_css.must_include '_progress-bars.scss'
|
|
194
|
+
sprockets_css.must_include '_accordion.scss'
|
|
195
|
+
sprockets_css.must_include '_carousel.scss'
|
|
196
|
+
sprockets_css.must_include '_hero-unit.scss'
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
it 'must include basic css afterward' do
|
|
200
|
+
sprockets_css.must_include '#other-css { color: red; }', 'From our code afterward.'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
private
|
|
207
|
+
|
|
208
|
+
def line_for_framework_css(name)
|
|
209
|
+
framework_css.each_line.detect{ |line| line.include? name }.strip
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
def line_for_individual_css(name)
|
|
213
|
+
individual_css.each_line.detect{ |line| line.include? name }.strip
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
class UsageJsSpec < Bootstrap::Sass::Rails::Spec
|
|
4
|
+
|
|
5
|
+
describe 'application.js' do
|
|
6
|
+
|
|
7
|
+
let(:app_js) { dummy_asset('application.js') }
|
|
8
|
+
|
|
9
|
+
it 'will render main bootstrap.js file and all included modules' do
|
|
10
|
+
app_js.must_include 'bootstrap-alert.js'
|
|
11
|
+
app_js.must_include 'bootstrap-button.js'
|
|
12
|
+
app_js.must_include 'bootstrap-carousel.js'
|
|
13
|
+
app_js.must_include 'bootstrap-collapse.js'
|
|
14
|
+
app_js.must_include 'bootstrap-dropdown.js'
|
|
15
|
+
app_js.must_include 'bootstrap-modal.js'
|
|
16
|
+
app_js.must_include 'bootstrap-popover.js'
|
|
17
|
+
app_js.must_include 'bootstrap-scrollspy.js'
|
|
18
|
+
app_js.must_include 'bootstrap-tab.js'
|
|
19
|
+
app_js.must_include 'bootstrap-tooltip.js'
|
|
20
|
+
app_js.must_include 'bootstrap-transition.js'
|
|
21
|
+
app_js.must_include 'bootstrap-typeahead.js'
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it 'must include basic js afterward' do
|
|
25
|
+
app_js.must_include '$(document).ready(function(){...});'
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'individual.js' do
|
|
31
|
+
|
|
32
|
+
let(:individual_js) { dummy_asset('individual.js') }
|
|
33
|
+
|
|
34
|
+
it 'will render bootstrap variables and mixins' do
|
|
35
|
+
individual_js.must_include 'bootstrap-modal.js'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
end
|