diff options
Diffstat (limited to 'actioncable')
-rw-r--r-- | actioncable/CHANGELOG.md | 2 | ||||
-rw-r--r-- | actioncable/Rakefile | 36 | ||||
-rw-r--r-- | actioncable/lib/action_cable/gem_version.rb | 2 | ||||
-rw-r--r-- | actioncable/package.json | 2 |
4 files changed, 39 insertions, 3 deletions
diff --git a/actioncable/CHANGELOG.md b/actioncable/CHANGELOG.md index 7657a05077..a0254fe323 100644 --- a/actioncable/CHANGELOG.md +++ b/actioncable/CHANGELOG.md @@ -1,3 +1,5 @@ +## Rails 5.1.0.beta1 (February 23, 2017) ## + * Redis subscription adapters now support `channel_prefix` option in `cable.yml` Avoids channel name collisions when multiple apps use the same Redis server. diff --git a/actioncable/Rakefile b/actioncable/Rakefile index 87d443919c..bda8c7b6c8 100644 --- a/actioncable/Rakefile +++ b/actioncable/Rakefile @@ -1,12 +1,13 @@ require "rake/testtask" require "pathname" +require "open3" require "action_cable" dir = File.dirname(__FILE__) task default: :test -task package: "assets:compile" +task package: %w( assets:compile assets:verify ) Rake::TestTask.new do |t| t.libs << "test" @@ -37,6 +38,39 @@ namespace :assets do desc "Compile Action Cable assets" task :compile do require "blade" + require "sprockets" + require "sprockets/export" Blade.build end + + desc "Verify compiled Action Cable assets" + task :verify do + file = "lib/assets/compiled/action_cable.js" + pathname = Pathname.new("#{dir}/#{file}") + + print "[verify] #{file} exists " + if pathname.exist? + puts "[OK]" + else + $stderr.puts "[FAIL]" + fail + end + + print "[verify] #{file} is a UMD module " + if pathname.read =~ /module\.exports.*define\.amd/m + puts "[OK]" + else + $stderr.puts "[FAIL]" + fail + end + + print "[verify] #{dir} can be required as a module " + stdout, stderr, status = Open3.capture3("node", "--print", "window = {}; require('#{dir}');") + if status.success? + puts "[OK]" + else + $stderr.puts "[FAIL]\n#{stderr}" + fail + end + end end diff --git a/actioncable/lib/action_cable/gem_version.rb b/actioncable/lib/action_cable/gem_version.rb index 8ba0230d47..c09613a747 100644 --- a/actioncable/lib/action_cable/gem_version.rb +++ b/actioncable/lib/action_cable/gem_version.rb @@ -8,7 +8,7 @@ module ActionCable MAJOR = 5 MINOR = 1 TINY = 0 - PRE = "alpha" + PRE = "beta1" STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") end diff --git a/actioncable/package.json b/actioncable/package.json index 37f82fa1ea..69ae3519d9 100644 --- a/actioncable/package.json +++ b/actioncable/package.json @@ -1,6 +1,6 @@ { "name": "actioncable", - "version": "5.0.0-rc1", + "version": "5.1.0-beta1", "description": "WebSocket framework for Ruby on Rails.", "main": "lib/assets/compiled/action_cable.js", "files": [ |