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 <glebm@google.com>2015-02-25 03:16:59 +0300
committerGleb Mazovetskiy <glebm@google.com>2015-03-16 18:38:18 +0300
commit899fe20a4dce276baa2795bb8b1b2db8f0b84acc (patch)
treeb88661a3fba799b2b01237fd1f9dd42b358889f6 /Rakefile
parent2c51ce887081ce09dc76caddd0f0cec14f843c28 (diff)
tests: dummy rails app server task & fixes
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index c90a305..8b9a9fc 100644
--- a/Rakefile
+++ b/Rakefile
@@ -40,7 +40,7 @@ task :compile, :css_path do |t, args|
css_path = args.with_defaults(css_path: 'tmp')[:css_path]
puts Term::ANSIColor.bold "Compiling SCSS in #{path}"
Dir.mkdir(css_path) unless File.directory?(css_path)
- %w(bootstrap bootstrap/_theme).each do |file|
+ %w(_bootstrap bootstrap/_theme).each do |file|
save_path = "#{css_path}/#{file.sub(/(^|\/)?_+/, '\1').sub('/', '-')}.css"
puts Term::ANSIColor.cyan(" #{save_path}") + '...'
engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
@@ -49,4 +49,15 @@ task :compile, :css_path do |t, args|
end
end
+desc 'Start a dummy (test) Rails app server'
+task :dummy_rails do
+ require 'rack'
+ require 'term/ansicolor'
+ port = ENV['PORT'] || 9292
+ puts %Q(Starting on #{Term::ANSIColor.cyan "http://localhost:#{port}"})
+ Rack::Server.start(
+ config: 'test/dummy_rails/config.ru',
+ Port: port)
+end
+
task default: :test