diff --git a/lib/postal/http.rb b/lib/postal/http.rb index 960e061..143be05 100644 --- a/lib/postal/http.rb +++ b/lib/postal/http.rb @@ -42,7 +42,7 @@ module Postal #request.add_field 'X-Postal-Signature', signature end - request['User-Agent'] = options[:user_agent] || "Postal/#{Postal::VERSION}" + request['User-Agent'] = options[:user_agent] || "Postal/#{Postal.version}" connection = Net::HTTP.new(uri.host, uri.port) diff --git a/lib/postal/version.rb b/lib/postal/version.rb index 6321e76..de37751 100644 --- a/lib/postal/version.rb +++ b/lib/postal/version.rb @@ -1,3 +1,11 @@ module Postal + VERSION = '1.0.0' + REVISION = nil + CHANNEL = 'dev' + + def self.version + [VERSION, REVISION, CHANNEL].compact.join('-') + end + end diff --git a/script/version.rb b/script/version.rb index 023b67a..42c8317 100644 --- a/script/version.rb +++ b/script/version.rb @@ -1,3 +1,3 @@ #!/usr/bin/env ruby require File.expand_path('../../lib/postal/version', __FILE__) -puts Postal::VERSION +puts Postal.version