From 00ba651f40de5ae57cf9b433ba0c6b7150d71a56 Mon Sep 17 00:00:00 2001 From: Craig Sheen Date: Mon, 27 Jul 2015 08:23:39 +0100 Subject: Move VERSION constant to version file and use this in the gemspec --- actioncable.gemspec | 5 ++++- lib/action_cable.rb | 2 -- lib/action_cable/version.rb | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 lib/action_cable/version.rb diff --git a/actioncable.gemspec b/actioncable.gemspec index e3aaa21fe7..02350186db 100644 --- a/actioncable.gemspec +++ b/actioncable.gemspec @@ -1,6 +1,9 @@ +$:.push File.expand_path("../lib", __FILE__) +require 'action_cable/version' + Gem::Specification.new do |s| s.name = 'actioncable' - s.version = '0.1.0' + s.version = ActionCable::VERSION s.summary = 'Websockets framework for Rails.' s.description = 'Structure many real-time application concerns into channels over a single websockets connection.' s.license = 'MIT' diff --git a/lib/action_cable.rb b/lib/action_cable.rb index 968adafc25..62cb9bcf8a 100644 --- a/lib/action_cable.rb +++ b/lib/action_cable.rb @@ -18,8 +18,6 @@ require 'redis' require 'action_cable/engine' if defined?(Rails) module ActionCable - VERSION = '0.0.3' - autoload :Server, 'action_cable/server' autoload :Connection, 'action_cable/connection' autoload :Channel, 'action_cable/channel' diff --git a/lib/action_cable/version.rb b/lib/action_cable/version.rb new file mode 100644 index 0000000000..4947029dcc --- /dev/null +++ b/lib/action_cable/version.rb @@ -0,0 +1,3 @@ +module ActionCable + VERSION = '0.0.3' +end \ No newline at end of file -- cgit v1.2.3 From fa7292e3c39b62619d9ab90cba79fcf76a6a3180 Mon Sep 17 00:00:00 2001 From: Craig Sheen Date: Mon, 27 Jul 2015 08:59:30 +0100 Subject: require new version file so the constant is available to the application --- lib/action_cable.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/action_cable.rb b/lib/action_cable.rb index 62cb9bcf8a..13c5c77578 100644 --- a/lib/action_cable.rb +++ b/lib/action_cable.rb @@ -16,6 +16,7 @@ require 'em-hiredis' require 'redis' require 'action_cable/engine' if defined?(Rails) +require 'action_cable/version' module ActionCable autoload :Server, 'action_cable/server' -- cgit v1.2.3