savon_model 0.1.0 → 0.1.1

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.
Files changed (4) hide show
  1. data/.rspec +1 -0
  2. data/Gemfile.lock +2 -2
  3. data/lib/savon/model.rb +11 -7
  4. metadata +5 -4
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- savon_model (0.1.0)
4
+ savon_model (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: http://gems.blau.de/
@@ -24,7 +24,7 @@ GEM
24
24
  rspec-mocks (2.0.0)
25
25
  rspec-core (= 2.0.0)
26
26
  rspec-expectations (= 2.0.0)
27
- savon (0.8.0.alpha.1)
27
+ savon (0.8.0.alpha.2)
28
28
  builder (~> 2.1.2)
29
29
  crack (~> 0.1.8)
30
30
  httpi (>= 0.6.0)
data/lib/savon/model.rb CHANGED
@@ -4,7 +4,7 @@ require "savon/ext/response"
4
4
  module Savon
5
5
  module Model
6
6
 
7
- VERSION = "0.1.0"
7
+ VERSION = "0.1.1"
8
8
 
9
9
  class << self
10
10
 
@@ -40,15 +40,19 @@ module Savon
40
40
  private
41
41
 
42
42
  def define_class_action(action)
43
- self.class.send :define_method, action do |body|
44
- client.request :wsdl, action, :body => body
45
- end
43
+ instance_eval %Q{
44
+ def #{action}(body = nil, &block)
45
+ client.request :wsdl, :#{action}, :body => body, &block
46
+ end
47
+ }
46
48
  end
47
49
 
48
50
  def define_instance_action(action)
49
- define_method action do |body|
50
- self.class.send action, body
51
- end
51
+ class_eval %Q{
52
+ def #{action}(body = nil, &block)
53
+ self.class.#{action} body, &block
54
+ end
55
+ }
52
56
  end
53
57
 
54
58
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: savon_model
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Harrington
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-20 00:00:00 +02:00
18
+ date: 2010-10-25 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -77,6 +77,7 @@ extensions: []
77
77
  extra_rdoc_files: []
78
78
 
79
79
  files:
80
+ - .rspec
80
81
  - Gemfile
81
82
  - Gemfile.lock
82
83
  - LICENSE