Skip to content

Commit 37ea51e

Browse files
committed
Merge branch 'next'
Conflicts: README.md lib/bootstrap-sass.rb
2 parents 9365af1 + f675be9 commit 37ea51e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2082
-995
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ Gemfile.lock
1414
tmp/
1515
test/screenshots/
1616
test/dummy_rails/log/*.log
17-
17+
test/dummy_rails/public/assets/
1818
.DS_Store
1919
node_modules

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
language: ruby
22
rvm:
3-
- 2.1.1
4-
- 2.0.0
3+
- 2.1.2
54
- jruby
65
- rbx-2
76
gemfile:
87
- test/gemfiles/sass_3_2.gemfile
98
- test/gemfiles/sass_3_3.gemfile
9+
- test/gemfiles/sass_3_4.gemfile
1010
- test/gemfiles/sass_head.gemfile
1111
before_install:
1212
- "npm install"
@@ -17,3 +17,9 @@ matrix:
1717
- gemfile: test/gemfiles/sass_head.gemfile
1818
notifications:
1919
slack: heybb:3n88HHilXn76ji9vV4gL819Y
20+
env:
21+
global:
22+
- VERBOSE=1
23+
script:
24+
- bundle exec rake
25+
- sh test/*.sh

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 3.3.0
4+
5+
* Improve libsass compatibility
6+
* Support using Bower package with Rails
7+
38
## 3.2.0.2
49

510
Main bootstrap file is now a partial (_bootstrap.scss), for compatibility with Compass 1+.

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Please see the appropriate guide for your environment of choice:
1717
In your Gemfile you need to add the `bootstrap-sass` gem, and ensure that the `sass-rails` gem is present - it is added to new Rails applications by default.
1818

1919
```ruby
20-
gem 'bootstrap-sass', '~> 3.2.0'
20+
gem 'bootstrap-sass', '~> 3.3.0'
2121
gem 'sass-rails', '>= 3.2'
2222
```
2323

@@ -33,6 +33,7 @@ gem 'autoprefixer-rails'
3333
Import Bootstrap styles in `app/assets/stylesheets/application.css.scss`:
3434

3535
```scss
36+
// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
3637
@import "bootstrap-sprockets";
3738
@import "bootstrap";
3839
```
@@ -57,13 +58,29 @@ Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
5758

5859
#### Bower with Rails
5960

60-
When using [bootstrap-sass Bower package](#c-bower) in Rails, ensure [minimum Sass number precision](#sass-number-precision):
61+
When using [bootstrap-sass Bower package](#c-bower) instead of the gem in Rails, add Bootstrap asset paths:
6162

6263
```ruby
63-
# e.g. config/initializers/sass.rb
64+
# config/application.rb
65+
# bootstrap-sass asset paths
66+
root.join('vendor/assets/bower_components/bootstrap-sass/assets').tap do |path|
67+
config.sass.load_paths << path.join('stylesheets')
68+
config.assets.paths += %w(javascripts fonts images).map(&path.method(:join))
69+
end
70+
```
71+
72+
Then, ensure [minimum Sass number precision](#sass-number-precision):
73+
74+
```ruby
75+
# config/initializers/sass.rb
76+
# Minimum precision required by bootstrap-sass
6477
::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
6578
```
6679

80+
#### Rails 4.x
81+
82+
Please make sure `sprockets-rails` is at least v2.1.4.
83+
6784
#### Rails 3.2.x
6885

6986
Rails 3.2 is [no longer maintained for bugfixes](http://guides.rubyonrails.org/maintenance_policy.html), and you should upgrade as soon as possible.
@@ -159,8 +176,8 @@ See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for min
159176
By default all of Bootstrap is imported.
160177

161178
You can also import components explicitly. To start with a full list of modules copy
162-
[`bootstrap.scss`](assets/stylesheets/_bootstrap.scss) file into your assets as `bootstrap-custom.scss`.
163-
Then comment out components you do not want from `bootstrap-custom`.
179+
[`_bootstrap.scss`](assets/stylesheets/_bootstrap.scss) file into your assets as `_bootstrap-custom.scss`.
180+
Then comment out components you do not want from `_bootstrap-custom`.
164181
In the application Sass file, replace `@import 'bootstrap'` with:
165182

166183
```scss

Rakefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ $:.unshift(lib_path) unless $:.include?(lib_path)
44
load './tasks/bower.rake'
55

66
require 'rake/testtask'
7-
Rake::TestTask.new do |t|
8-
t.libs << "test"
9-
t.test_files = FileList['test/*_test.rb']
10-
t.verbose = true
7+
task :test do |t|
8+
$: << File.expand_path('test/')
9+
Dir.glob('./test/**/*_test.rb').each { |file| require file }
1110
end
1211

1312
desc 'Dumps output to a CSS file for testing'

assets/fonts/bootstrap/glyphicons-halflings-regular.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)