orthrus 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ - ree
5
+ - jruby
6
+
7
+ script: "bundle exec rake test"
8
+
9
+ notifications:
10
+ disabled: false
11
+ recipients:
12
+ - xijo@gmx.de
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source "http://rubygems.org"
2
+ gem 'rake'
2
3
 
3
4
  # Specify your gem's dependencies in orthrus.gemspec
4
5
  gemspec
@@ -13,7 +13,11 @@ Orthrus is a small extension inspired by the original remote method API from Pau
13
13
  which is deprecated in the current Typhoeus release.
14
14
 
15
15
  It can be used to encapsulate remote method calls in a clean way and provide an
16
- easy interface to work with.
16
+ easy interface to work with. All of its functionality is covered by tests as well.
17
+
18
+ ![orthrus build status][1]
19
+
20
+ [1]:http://travis-ci.org/xijo/orthrus.png
17
21
 
18
22
  ## Installation
19
23
 
@@ -38,7 +38,7 @@ module Orthrus
38
38
  # path = "/planet/:identifier"
39
39
  # interpolated_path({:identifier => "mars"}) #=> "/planet/mars"
40
40
  def interpolated_path(args = {})
41
- interpolated_path = @path
41
+ interpolated_path = @path || ""
42
42
  args.each do |key, value|
43
43
  if interpolated_path.include?(":#{key}")
44
44
  interpolated_path.sub!(":#{key}", value.to_s)
@@ -1,3 +1,3 @@
1
1
  module Orthrus
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -35,6 +35,14 @@ class TestDefineRemoteMethod < Test::Unit::TestCase
35
35
  )
36
36
  assert_equal @mars_response.body, remote_method.run(:identifier => :mars).body
37
37
  end
38
+
39
+ def test_remote_method_with_empty_path
40
+ remote_method = Orthrus::RemoteMethod.new(
41
+ :base_uri => "http://astronomical.test/planets/mars",
42
+ :method => :get
43
+ )
44
+ assert_equal @mars_response.body, remote_method.run(:identifier => :mars).body
45
+ end
38
46
 
39
47
  def test_remote_method_with_success_handler
40
48
  remote_method = Orthrus::RemoteMethod.new(
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orthrus
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Johannes Opper
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-20 00:00:00 +02:00
18
+ date: 2011-07-15 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -74,6 +74,7 @@ extra_rdoc_files: []
74
74
 
75
75
  files:
76
76
  - .gitignore
77
+ - .travis.yml
77
78
  - CHANGELOG.markdown
78
79
  - Gemfile
79
80
  - LICENSE