esod-client 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
data/esod-client.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{esod-client}
8
- s.version = "0.1.1"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Yan Pritzker", "CohesiveFT"]
@@ -101,7 +101,7 @@ Gem::Specification.new do |s|
101
101
  "lib/rest-client-1.2.0/spec/response_spec.rb",
102
102
  "lib/rest-client-1.2.0/spec/restclient_spec.rb",
103
103
  "lib/trollop.rb",
104
- "pkg/esod-client-0.1.0.gem"
104
+ "pkg/esod-client-0.2.0.gem"
105
105
  ]
106
106
  s.homepage = %q{http://github.com/cohesive/esod-client}
107
107
  s.rdoc_options = ["--charset=UTF-8"]
data/esod-client.rb CHANGED
@@ -19,7 +19,7 @@ require 'esodclient'
19
19
 
20
20
  def main
21
21
  client = ESODClient.new($options[:url], $options[:api_token])
22
- response = client.send($options[:resource], $options[:id])
22
+ response = client.get($options[:resource], $options[:id])
23
23
 
24
24
  if $options[:property]
25
25
  response = response.value_of_dotted_property($options[:property])
@@ -9,13 +9,13 @@ class ESODClient
9
9
  @token = api_token
10
10
  end
11
11
 
12
- def server(id)
13
- get("server/#{id}")
12
+ def get(resource, id)
13
+ get_path("#{resource}/#{id}")
14
14
  end
15
15
 
16
16
  protected
17
17
 
18
- def get(path)
18
+ def get_path(path)
19
19
  response = RestClient.get("#{@url}/#{path}.xml?key=#{@token}").to_s
20
20
  response_hash = Hash.from_xml(response)
21
21
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esod-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yan Pritzker
@@ -108,7 +108,7 @@ files:
108
108
  - lib/rest-client-1.2.0/spec/response_spec.rb
109
109
  - lib/rest-client-1.2.0/spec/restclient_spec.rb
110
110
  - lib/trollop.rb
111
- - pkg/esod-client-0.1.0.gem
111
+ - pkg/esod-client-0.2.0.gem
112
112
  has_rdoc: true
113
113
  homepage: http://github.com/cohesive/esod-client
114
114
  licenses: []
Binary file