diff options
author | Genadi Samokovarov <gsamokovarov@gmail.com> | 2016-05-30 14:53:03 +0300 |
---|---|---|
committer | Genadi Samokovarov <gsamokovarov@gmail.com> | 2016-05-30 14:53:03 +0300 |
commit | a11a3861b474ef642ac48796572d6276436c7eb0 (patch) | |
tree | 5e7da0567079981991e9a23696c7d20faf4c9f2b /actioncable/Rakefile | |
parent | e6ed3aaf437887bc25a1f715f21c5ca3ebbc966f (diff) | |
parent | 3f2e83d964fcb4cd7f7f2ed8fb2b2592ffc57647 (diff) | |
download | rails-a11a3861b474ef642ac48796572d6276436c7eb0.tar.gz rails-a11a3861b474ef642ac48796572d6276436c7eb0.tar.bz2 rails-a11a3861b474ef642ac48796572d6276436c7eb0.zip |
Merge branch 'master' into always-inherit-from-application-record
Diffstat (limited to 'actioncable/Rakefile')
-rw-r--r-- | actioncable/Rakefile | 46 |
1 files changed, 11 insertions, 35 deletions
diff --git a/actioncable/Rakefile b/actioncable/Rakefile index 5ba7b7f7f6..a72142deb5 100644 --- a/actioncable/Rakefile +++ b/actioncable/Rakefile @@ -1,15 +1,13 @@ require 'rake/testtask' require 'pathname' -require 'sprockets' -require 'coffee-script' require 'action_cable' +require 'blade' dir = File.dirname(__FILE__) task :default => :test task :package => "assets:compile" -task "package:clean" => "assets:clean" Rake::TestTask.new do |t| t.libs << "test" @@ -25,41 +23,19 @@ namespace :test do sh(Gem.ruby, '-w', '-Ilib:test', file) end or raise "Failures" end -end - -namespace :assets do - root_path = Pathname.new(dir) - destination_path = root_path.join("lib/assets/compiled") - - desc "Compile dist/action_cable.js" - task :compile do - puts 'Compiling Action Cable assets...' - - precompile_list = %w(action_cable.js) - - environment = Sprockets::Environment.new - environment.gzip = false - Pathname.glob(root_path.join("app/assets/*/")) do |subdir| - environment.append_path subdir - end - - compile_path = root_path.join("tmp/sprockets") - compile_path.rmtree if compile_path.exist? - compile_path.mkpath - manifest = Sprockets::Manifest.new(environment.index, compile_path) - manifest.compile(precompile_list) - - destination_path.rmtree if destination_path.exist? - manifest.assets.each do |path, fingerprint_path| - destination_path.join(path).dirname.mkpath - FileUtils.cp(compile_path.join(fingerprint_path), destination_path.join(path)) + task :integration do + if ENV['CI'] + Blade.start(interface: :ci) + else + Blade.start(interface: :runner) end - - puts 'Done' end +end - task :clean do - destination_path.rmtree if destination_path.exist? +namespace :assets do + desc "Compile Action Cable assets" + task :compile do + Blade.build end end |