Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2015-07-01 22:45:14 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2015-07-01 22:45:14 +0300
commit7097cf5572e8f61b634c34e0dad86961b111b3b6 (patch)
tree6981ee633f78c9d4ee3660563a07e64a758dbe82
parent47819e892fc0f2fa9c7269fdf297aa5e81a361c6 (diff)
Update node.js devDeps, tests, new mincer compat
-rw-r--r--.travis.yml3
-rw-r--r--Rakefile7
-rw-r--r--assets/stylesheets/_bootstrap-mincer.scss4
-rw-r--r--package.json6
-rw-r--r--test/node_mincer_test.rb5
-rwxr-xr-xtest/node_sass_compile_test.sh4
6 files changed, 14 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml
index 84db8f0..e38e38a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,5 +18,4 @@ env:
global:
- VERBOSE=1
script:
- - bundle exec rake
- - sh test/*.sh
+ bundle exec rake && sh test/*.sh
diff --git a/Rakefile b/Rakefile
index 8b9a9fc..91cb0cd 100644
--- a/Rakefile
+++ b/Rakefile
@@ -4,9 +4,10 @@ $:.unshift(lib_path) unless $:.include?(lib_path)
load './tasks/bower.rake'
require 'rake/testtask'
-task :test do |t|
- $: << File.expand_path('test/')
- Dir.glob('./test/**/*_test.rb').each { |file| require file }
+Rake::TestTask.new do |t|
+ t.libs << 'test'
+ t.test_files = FileList['test/**/*_test.rb']
+ t.verbose = true
end
desc 'Dumps output to a CSS file for testing'
diff --git a/assets/stylesheets/_bootstrap-mincer.scss b/assets/stylesheets/_bootstrap-mincer.scss
index 7ec4657..0c4655e 100644
--- a/assets/stylesheets/_bootstrap-mincer.scss
+++ b/assets/stylesheets/_bootstrap-mincer.scss
@@ -9,11 +9,11 @@
// from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>"
// from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>"
// or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>"
- @return "<%- asset_path('#{$path}'.replace(/[#?].*$/, '')) + '#{$path}'.replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
+ @return "<%- asset_path("#{$path}".replace(/[#?].*$/, '')) + "#{$path}".replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
}
@function twbs-image-path($file) {
- @return "<%- asset_path('#{$file}') %>";
+ @return "<%- asset_path("#{$file}") %>";
}
$bootstrap-sass-asset-helper: true;
diff --git a/package.json b/package.json
index 045b918..2096976 100644
--- a/package.json
+++ b/package.json
@@ -23,8 +23,8 @@
"url": "https://github.com/twbs/bootstrap-sass/issues"
},
"devDependencies": {
- "node-sass": "~2.0",
- "mincer": "~1.2",
- "ejs": "~1.0"
+ "node-sass": "~3.2",
+ "mincer": "~1.3",
+ "ejs": "~2.3"
}
}
diff --git a/test/node_mincer_test.rb b/test/node_mincer_test.rb
index c18a086..28aacab 100644
--- a/test/node_mincer_test.rb
+++ b/test/node_mincer_test.rb
@@ -22,15 +22,14 @@ class NodeMincerTest < Minitest::Test
def setup
tmp_dir = File.join GEM_PATH, 'tmp/node-mincer'
- command = "node manifest.js #{tmp_dir}"
success = Dir.chdir DUMMY_PATH do
silence_stdout_if !ENV['VERBOSE'] do
- system(command)
+ system 'node', 'manifest.js', tmp_dir
end
end
assert success, 'Node.js Mincer compilation failed'
manifest = JSON.parse(File.read("#{tmp_dir}/manifest.json"))
- css_name = manifest["assets"]["application.css"]
+ css_name = manifest['assets']['application.css']
@css = File.read("#{tmp_dir}/#{css_name}")
end
end
diff --git a/test/node_sass_compile_test.sh b/test/node_sass_compile_test.sh
index df6314a..6c8a369 100755
--- a/test/node_sass_compile_test.sh
+++ b/test/node_sass_compile_test.sh
@@ -3,6 +3,6 @@
# Test compilation with node-sass binary
mkdir -p tmp/node-sass
-node-sass assets/stylesheets/bootstrap -o tmp/node-sass/bootstrap.css && \
-node-sass assets/stylesheets/bootstrap/theme -o tmp/node-sass/bootstrap-theme.css || \
+node-sass assets/stylesheets/_bootstrap.scss -o tmp/node-sass/bootstrap.css && \
+node-sass assets/stylesheets/bootstrap/_theme.scss -o tmp/node-sass/bootstrap-theme.css || \
(echo "node-sass compilation failed" && exit 1)