Skip to content

Commit

Permalink
Refactored lib version usage across sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed May 10, 2024
1 parent 631b1f8 commit 5d82e87
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ably.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require 'ably/version'

Gem::Specification.new do |spec|
spec.name = 'ably'
spec.version = Ably::VERSION
spec.version = Ably::LIB_VERSION
spec.authors = ['Lewis Marshall', "Matthew O'Riordan"]
spec.email = %w[[email protected] [email protected]]
spec.description = %q{A Ruby client library for ably.io realtime messaging}
Expand Down
2 changes: 1 addition & 1 deletion lib/ably/agent.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Ably
AGENT = "ably-ruby/#{Ably::VERSION} ruby/#{RUBY_VERSION}"
AGENT = "ably-ruby/#{Ably::LIB_VERSION} ruby/#{RUBY_VERSION}"
end
2 changes: 1 addition & 1 deletion lib/ably/modules/http_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def encode64(text)
end

def user_agent
"Ably Ruby client #{Ably::VERSION} (https://www.ably.io)"
"Ably Ruby client #{Ably::LIB_VERSION} (https://www.ably.io)"
end

def setup_outgoing_middleware(builder)
Expand Down
7 changes: 1 addition & 6 deletions lib/ably/version.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
module Ably
VERSION = '1.2.4'
LIB_VERSION = '1.2.4'
PROTOCOL_VERSION = '1.2'

# @api private
def self.major_minor_version_numeric
VERSION.gsub(/\.\d+$/, '').to_f
end
end
2 changes: 1 addition & 1 deletion spec/support/markdown_spec_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def start(notification)
else
'REST'
end
output.write "# Ably #{scope} Client Library #{Ably::VERSION} Specification\n"
output.write "# Ably #{scope} Client Library #{Ably::LIB_VERSION} Specification\n"
end

def close(notification)
Expand Down

0 comments on commit 5d82e87

Please sign in to comment.