restafari 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,7 +44,10 @@ module Restafari
44
44
  def execute!(path, params)
45
45
  conn = Faraday.new(url: Restafari.config.url)
46
46
  Restafari.config.run_before_request_hook(params)
47
- result = conn.send(Restafari.config.http_method, path, params)
47
+ result = conn.send(Restafari.config.http_method, path, params) do |req|
48
+ @req = req
49
+ end
50
+ result.env[:req] = Hash[@req.each_pair.to_a]
48
51
  Restafari.config.run_after_response_hook(result)
49
52
  Restafari::Response.new(result)
50
53
  end
@@ -1,3 +1,3 @@
1
1
  module Restafari
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
@@ -34,6 +34,8 @@ describe Restafari::Action do
34
34
 
35
35
  Restafari.config.should_receive(:run_before_request_hook).once.and_return({test: true})
36
36
  SomeAction.some_method()
37
+
38
+ Restafari.config.defaults[:before_request].clear
37
39
  end
38
40
 
39
41
  it "should run the after response hook after each response" do
metadata CHANGED
@@ -1,89 +1,116 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: restafari
3
- version: !ruby/object:Gem::Version
4
- version: 0.7.1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 7
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 7
9
+ - 2
10
+ version: 0.7.2
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Danni Friedland
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-07-16 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-08-07 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: faraday
16
- requirement: &70335743957060 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
22
32
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70335743957060
25
- - !ruby/object:Gem::Dependency
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
26
35
  name: webmock
27
- requirement: &70335743956640 !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
28
38
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
33
46
  type: :development
34
- prerelease: false
35
- version_requirements: *70335743956640
36
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
37
49
  name: spork
38
- requirement: &70335743956220 !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
39
52
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
44
60
  type: :development
45
- prerelease: false
46
- version_requirements: *70335743956220
47
- - !ruby/object:Gem::Dependency
61
+ version_requirements: *id003
62
+ - !ruby/object:Gem::Dependency
48
63
  name: rack-test
49
- requirement: &70335743955800 !ruby/object:Gem::Requirement
64
+ prerelease: false
65
+ requirement: &id004 !ruby/object:Gem::Requirement
50
66
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
55
74
  type: :development
56
- prerelease: false
57
- version_requirements: *70335743955800
58
- - !ruby/object:Gem::Dependency
75
+ version_requirements: *id004
76
+ - !ruby/object:Gem::Dependency
59
77
  name: rspec
60
- requirement: &70335743955380 !ruby/object:Gem::Requirement
78
+ prerelease: false
79
+ requirement: &id005 !ruby/object:Gem::Requirement
61
80
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ hash: 3
85
+ segments:
86
+ - 0
87
+ version: "0"
66
88
  type: :development
67
- prerelease: false
68
- version_requirements: *70335743955380
69
- - !ruby/object:Gem::Dependency
89
+ version_requirements: *id005
90
+ - !ruby/object:Gem::Dependency
70
91
  name: rake
71
- requirement: &70335743954960 !ruby/object:Gem::Requirement
92
+ prerelease: false
93
+ requirement: &id006 !ruby/object:Gem::Requirement
72
94
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ hash: 3
99
+ segments:
100
+ - 0
101
+ version: "0"
77
102
  type: :development
78
- prerelease: false
79
- version_requirements: *70335743954960
103
+ version_requirements: *id006
80
104
  description: Helper class to work with the restful apis
81
- email:
105
+ email:
82
106
  - - dannifriedland@gmail.com
83
107
  executables: []
108
+
84
109
  extensions: []
110
+
85
111
  extra_rdoc_files: []
86
- files:
112
+
113
+ files:
87
114
  - .gemspec
88
115
  - .gitignore
89
116
  - Gemfile
@@ -100,26 +127,36 @@ files:
100
127
  - spec/spec_helper.rb
101
128
  homepage: https://github.com/TheGiftsProject/restafari
102
129
  licenses: []
130
+
103
131
  post_install_message:
104
132
  rdoc_options: []
105
- require_paths:
133
+
134
+ require_paths:
106
135
  - lib
107
- required_ruby_version: !ruby/object:Gem::Requirement
136
+ required_ruby_version: !ruby/object:Gem::Requirement
108
137
  none: false
109
- requirements:
110
- - - ! '>='
111
- - !ruby/object:Gem::Version
112
- version: '0'
113
- required_rubygems_version: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ hash: 3
142
+ segments:
143
+ - 0
144
+ version: "0"
145
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
146
  none: false
115
- requirements:
116
- - - ! '>='
117
- - !ruby/object:Gem::Version
118
- version: '0'
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ hash: 3
151
+ segments:
152
+ - 0
153
+ version: "0"
119
154
  requirements: []
155
+
120
156
  rubyforge_project:
121
- rubygems_version: 1.8.10
157
+ rubygems_version: 1.8.13
122
158
  signing_key:
123
159
  specification_version: 3
124
160
  summary: A DSL for consuming RESTful apis
125
161
  test_files: []
162
+