Permalink
Browse files

Send version in request header. Use version in gemspec

  • Loading branch information...
1 parent bbf66ae commit a9ba0348aac0146b0e9c75b663d0cf808d031e82 @mattwynne mattwynne committed Sep 1, 2011
Showing with 5 additions and 3 deletions.
  1. +2 −2 lib/relish/commands/base.rb
  2. +3 −1 relish.gemspec
@@ -57,6 +57,7 @@ def get_api_token
def resource(options = {})
options[:user] ||= api_token
options[:password] ||= 'X'
+ options[:headers] = { :client_version => Relish::Version::STRING }
RestClient::Resource.new(url, options)
end
@@ -70,7 +71,6 @@ def valid_option_names
def validate_cli_options
cli_options.keys.each do |option|
-
unless valid_option_names.include?(option.to_s)
error "'#{option}' is not a valid option."
end
@@ -107,4 +107,4 @@ def escape(str)
end
end
-end
+end
View
@@ -1,6 +1,8 @@
+require File.dirname(__FILE__) + '/lib/relish/version'
+
Gem::Specification.new do |s|
s.name = "relish"
- s.version = "0.4.0"
+ s.version = Relish::Version::STRING
s.required_rubygems_version = '>= 1.3.5'
s.authors = ["Matt Wynne", "Justin Ko"]

0 comments on commit a9ba034

Please sign in to comment.