restrack-client 1.0.0 → 1.1.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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- restrack-client (0.1.4)
4
+ restrack-client (1.0.0)
5
5
  i18n
6
6
  json
7
7
  mime-types
@@ -10,11 +10,11 @@ PATH
10
10
  GEM
11
11
  remote: http://rubygems.org/
12
12
  specs:
13
- i18n (0.5.0)
14
- json (1.5.1)
13
+ i18n (0.6.0)
14
+ json (1.5.3)
15
15
  mime-types (1.16)
16
16
  shoulda (2.11.3)
17
- xml-simple (1.0.14)
17
+ xml-simple (1.1.0)
18
18
 
19
19
  PLATFORMS
20
20
  ruby
data/README.markdown CHANGED
@@ -1,13 +1,14 @@
1
1
  # RESTRack::Client
2
2
 
3
- A library for interacting with RESTful web services. Use this to communicate with RESTRack based services.
3
+ A library for interacting with RESTful web services.
4
+ Use this to communicate with RESTRack based services.
4
5
 
5
6
 
6
7
  ## Usage
7
8
 
8
9
  uri = URI.new('http://localhost')
9
- client = RESTRackClient.new(uri)
10
- client = RESTRackClient.new('http://localhost')
10
+ client = RESTRack::Client.new(uri)
11
+ client = RESTRack::Client.new('http://localhost')
11
12
  foo_resource = client.foo(123) # pivot object that hasn't yet made request
12
13
  foo = foo_resource.get( { :data => 'something_here' } ) # request is made to GET /foo/123
13
14
  bar = client.foo(123).bar # pivot object that hasn't yet made request
data/Rakefile CHANGED
@@ -7,6 +7,8 @@ Bundler::GemHelper.install_tasks
7
7
  task :default => [:test]
8
8
 
9
9
  desc 'Run tests.'
10
- Rake::TestTask.new('test') { |t|
10
+ Rake::TestTask.new('test') do |t|
11
+ t.libs = ['lib','.']
11
12
  t.pattern = 'test/test_*.rb'
12
- }
13
+ t.verbose = true
14
+ end
@@ -14,7 +14,8 @@ module RESTRack
14
14
  end
15
15
 
16
16
  def method_missing(resource_name, *args)
17
- @path << '/' + resource_name.to_s + '/' + args.join('/')
17
+ @path << '/' + resource_name.to_s
18
+ @path << '/' + args.join('/') if args.length > 0
18
19
  self
19
20
  end
20
21
 
@@ -1,3 +1,3 @@
1
1
  module RESTRackClient
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -1,4 +1,4 @@
1
- require File.join( File.dirname(__FILE__ ), 'helper' )
1
+ require File.expand_path( File.join( File.dirname(__FILE__), 'helper' ) )
2
2
 
3
3
  class TestRESTRackClient < Test::Unit::TestCase
4
4
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: restrack-client
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.0
5
+ version: 1.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Chris St. John
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-18 00:00:00 -04:00
13
+ date: 2011-07-10 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency