diff options
author | Gleb Mazovetskiy <glebm@google.com> | 2015-02-25 03:16:59 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glebm@google.com> | 2015-03-16 18:38:18 +0300 |
commit | 899fe20a4dce276baa2795bb8b1b2db8f0b84acc (patch) | |
tree | b88661a3fba799b2b01237fd1f9dd42b358889f6 /Rakefile | |
parent | 2c51ce887081ce09dc76caddd0f0cec14f843c28 (diff) |
tests: dummy rails app server task & fixes
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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 |