From 71d406697266fc2525706361b86aeb85183fe4c7 Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Mon, 9 May 2016 09:36:53 -0400 Subject: Kick off initial JavaScript tests --- actioncable/Rakefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actioncable/Rakefile') diff --git a/actioncable/Rakefile b/actioncable/Rakefile index 5ba7b7f7f6..58c18dd457 100644 --- a/actioncable/Rakefile +++ b/actioncable/Rakefile @@ -25,6 +25,11 @@ namespace :test do sh(Gem.ruby, '-w', '-Ilib:test', file) end or raise "Failures" end + + task :javascript do + require 'blade' + Blade.start(interface: :runner) + end end namespace :assets do -- cgit v1.2.3 From 11078dddbb94c620bff13a7c656390392b2007f8 Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Mon, 23 May 2016 09:37:16 -0400 Subject: Build action_cable.js with Blade --- actioncable/Rakefile | 40 ++++------------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) (limited to 'actioncable/Rakefile') diff --git a/actioncable/Rakefile b/actioncable/Rakefile index 58c18dd457..aa62265ac9 100644 --- a/actioncable/Rakefile +++ b/actioncable/Rakefile @@ -1,15 +1,14 @@ 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" +task "package:clean" Rake::TestTask.new do |t| t.libs << "test" @@ -27,44 +26,13 @@ namespace :test do end task :javascript do - require 'blade' Blade.start(interface: :runner) end end namespace :assets do - root_path = Pathname.new(dir) - destination_path = root_path.join("lib/assets/compiled") - - desc "Compile dist/action_cable.js" + desc "Compile Action Cable assets" 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)) - end - - puts 'Done' - end - - task :clean do - destination_path.rmtree if destination_path.exist? + Blade.build end end -- cgit v1.2.3 From d12209cad2d8961f396a6e7cbd0ee9437b9751ef Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Mon, 23 May 2016 17:05:44 -0400 Subject: Remove package:clean task MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced in d6f2000a67cc63aa67414c75ce77de671824ec52 and was only used by Action Cable. Now handled by Action Cable’s assets:compile task. --- actioncable/Rakefile | 1 - 1 file changed, 1 deletion(-) (limited to 'actioncable/Rakefile') diff --git a/actioncable/Rakefile b/actioncable/Rakefile index aa62265ac9..b0e9c0a4a8 100644 --- a/actioncable/Rakefile +++ b/actioncable/Rakefile @@ -8,7 +8,6 @@ dir = File.dirname(__FILE__) task :default => :test task :package => "assets:compile" -task "package:clean" Rake::TestTask.new do |t| t.libs << "test" -- cgit v1.2.3 From 8cfce058d9d002526fd93e66957f8359985c92bf Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Mon, 9 May 2016 15:42:28 -0400 Subject: CI: run Action Cable browser tests in Sauce Labs Allow failures until test runs are consistently stable, not hanging. Closes #24943. Signed-off-by: Jeremy Daer --- actioncable/Rakefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'actioncable/Rakefile') diff --git a/actioncable/Rakefile b/actioncable/Rakefile index b0e9c0a4a8..a72142deb5 100644 --- a/actioncable/Rakefile +++ b/actioncable/Rakefile @@ -24,8 +24,12 @@ namespace :test do end or raise "Failures" end - task :javascript do - Blade.start(interface: :runner) + task :integration do + if ENV['CI'] + Blade.start(interface: :ci) + else + Blade.start(interface: :runner) + end end end -- cgit v1.2.3