Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Send version in request header. Use version in gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwynne committed Sep 1, 2011
1 parent bbf66ae commit a9ba034
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/relish/commands/base.rb
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -107,4 +107,4 @@ def escape(str)

end
end
end
end
4 changes: 3 additions & 1 deletion relish.gemspec
@@ -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"]
Expand Down

0 comments on commit a9ba034

Please sign in to comment.