Skip to content

Commit 7097cf5

Browse files
committed
Update node.js devDeps, tests, new mincer compat
1 parent 47819e8 commit 7097cf5

File tree

6 files changed

+14
-15
lines changed

6 files changed

+14
-15
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ env:
1818
global:
1919
- VERBOSE=1
2020
script:
21-
- bundle exec rake
22-
- sh test/*.sh
21+
bundle exec rake && sh test/*.sh

Rakefile

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

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

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

assets/stylesheets/_bootstrap-mincer.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>"
1010
// from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>"
1111
// or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>"
12-
@return "<%- asset_path('#{$path}'.replace(/[#?].*$/, '')) + '#{$path}'.replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
12+
@return "<%- asset_path("#{$path}".replace(/[#?].*$/, '')) + "#{$path}".replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
1313
}
1414

1515
@function twbs-image-path($file) {
16-
@return "<%- asset_path('#{$file}') %>";
16+
@return "<%- asset_path("#{$file}") %>";
1717
}
1818

1919
$bootstrap-sass-asset-helper: true;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"url": "https://github.com/twbs/bootstrap-sass/issues"
2424
},
2525
"devDependencies": {
26-
"node-sass": "~2.0",
27-
"mincer": "~1.2",
28-
"ejs": "~1.0"
26+
"node-sass": "~3.2",
27+
"mincer": "~1.3",
28+
"ejs": "~2.3"
2929
}
3030
}

test/node_mincer_test.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ def test_image_helper
2222

2323
def setup
2424
tmp_dir = File.join GEM_PATH, 'tmp/node-mincer'
25-
command = "node manifest.js #{tmp_dir}"
2625
success = Dir.chdir DUMMY_PATH do
2726
silence_stdout_if !ENV['VERBOSE'] do
28-
system(command)
27+
system 'node', 'manifest.js', tmp_dir
2928
end
3029
end
3130
assert success, 'Node.js Mincer compilation failed'
3231
manifest = JSON.parse(File.read("#{tmp_dir}/manifest.json"))
33-
css_name = manifest["assets"]["application.css"]
32+
css_name = manifest['assets']['application.css']
3433
@css = File.read("#{tmp_dir}/#{css_name}")
3534
end
3635
end

test/node_sass_compile_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# Test compilation with node-sass binary
44

55
mkdir -p tmp/node-sass
6-
node-sass assets/stylesheets/bootstrap -o tmp/node-sass/bootstrap.css && \
7-
node-sass assets/stylesheets/bootstrap/theme -o tmp/node-sass/bootstrap-theme.css || \
6+
node-sass assets/stylesheets/_bootstrap.scss -o tmp/node-sass/bootstrap.css && \
7+
node-sass assets/stylesheets/bootstrap/_theme.scss -o tmp/node-sass/bootstrap-theme.css || \
88
(echo "node-sass compilation failed" && exit 1)

0 commit comments

Comments
 (0)