wrest 1.0.0.beta5 → 1.0.0.beta7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/README.rdoc +8 -8
- data/lib/wrest/components/mutators.rb +3 -2
- data/lib/wrest/components/translators/json.rb +1 -1
- data/lib/wrest/components.rb +1 -2
- data/lib/wrest/core_ext/hash.rb +1 -1
- data/lib/wrest/uri_template.rb +1 -1
- data/lib/wrest/version.rb +1 -1
- data/lib/wrest/xml_mini/nokogiri/xpath_filter.rb +14 -0
- data/lib/wrest/xml_mini/nokogiri.rb +8 -0
- data/lib/wrest.rb +2 -1
- metadata +51 -56
data/CHANGELOG
CHANGED
@@ -18,6 +18,13 @@ Features under a numbered section are complete and available in the Wrest gem.
|
|
18
18
|
|
19
19
|
== Current
|
20
20
|
|
21
|
+
== 1.0.0.beta7
|
22
|
+
* GH#46 Response.deserialise for Json responses
|
23
|
+
|
24
|
+
== 1.0.0.beta6
|
25
|
+
* GH#35 Wrest::UriTemplate extensions swallow existing path
|
26
|
+
* GH#41 Make Hash core_ext opt out
|
27
|
+
|
21
28
|
== 1.0.0.beta5
|
22
29
|
* GH#30 Replace rails app in spec/sample_rails_app with a lighter sinatra app
|
23
30
|
* GH#37 Allow opting out of Adding to_uri to string
|
data/README.rdoc
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= Wrest 1.0.0.
|
1
|
+
= Wrest 1.0.0.beta7
|
2
2
|
|
3
3
|
(c) Copyright 2009-2010 {Sidu Ponnappa}[http://blog.sidu.in]. All Rights Reserved.
|
4
4
|
|
@@ -147,10 +147,10 @@ You can launch the interactive Wrest shell by running bin/wrest if you have the
|
|
147
147
|
|
148
148
|
== Contributors
|
149
149
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
150
|
+
* Sidu Ponnappa : {kaiwren}[http://github.com/kaiwren]
|
151
|
+
* Niranjan Paranjape : {achamian}[http://github.com/achamian]
|
152
|
+
* Aakash Dharmadhkari : {aakashd}[http://github.com/aakashd]
|
153
|
+
* Srushti : {srushti}[http://github.com/srushti]
|
154
|
+
* Preethi Ramdev : {preethiramdev}[http://github.com/preethiramdev]
|
155
|
+
* Nikhil Vallishayee : {nikhilvallishayee}[http://github.com/nikhilvallishayee]
|
156
|
+
* Jacques Crocker : {railsjedi}[http://github.com/railsjedi]
|
@@ -32,8 +32,9 @@ module Wrest
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
35
|
-
|
35
|
+
require "#{Wrest::Root}/wrest/core_ext/hash"
|
36
36
|
require "#{Wrest::Root}/wrest/components/mutators/base"
|
37
37
|
require "#{Wrest::Root}/wrest/components/mutators/xml_simple_type_caster"
|
38
38
|
require "#{Wrest::Root}/wrest/components/mutators/xml_mini_type_caster"
|
39
|
-
require "#{Wrest::Root}/wrest/components/mutators/camel_to_snake_case"
|
39
|
+
require "#{Wrest::Root}/wrest/components/mutators/camel_to_snake_case"
|
40
|
+
|
data/lib/wrest/components.rb
CHANGED
data/lib/wrest/core_ext/hash.rb
CHANGED
data/lib/wrest/uri_template.rb
CHANGED
data/lib/wrest/version.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
#require 'nokogiri'
|
2
|
+
module Xml_Mini
|
3
|
+
module Nokogiri
|
4
|
+
module XPathFilter
|
5
|
+
#Enables filtering of an xml response using a specified xpath
|
6
|
+
#Returns all elements that match the xpath
|
7
|
+
def filter(xml_body,xpath)
|
8
|
+
doc = ::Nokogiri::XML(xml_body)
|
9
|
+
doc.xpath(xpath).to_a
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
data/lib/wrest.rb
CHANGED
@@ -80,7 +80,8 @@ RUBY_PLATFORM =~ /java/ ? gem('json-jruby', '>= 1.4.2') : gem('json', '>= 1.4.2'
|
|
80
80
|
ActiveSupport::JSON.backend = "JSONGem"
|
81
81
|
|
82
82
|
|
83
|
-
|
83
|
+
|
84
|
+
require "#{Wrest::Root}/wrest/core_ext/string"
|
84
85
|
|
85
86
|
# Load Wrest Core
|
86
87
|
require "#{Wrest::Root}/wrest/version"
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -1848230055
|
5
4
|
prerelease: true
|
6
5
|
segments:
|
7
6
|
- 1
|
8
7
|
- 0
|
9
8
|
- 0
|
10
|
-
-
|
11
|
-
version: 1.0.0.
|
9
|
+
- beta7
|
10
|
+
version: 1.0.0.beta7
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Sidu Ponnappa
|
@@ -17,7 +16,7 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2010-09-
|
19
|
+
date: 2010-09-30 00:00:00 +05:30
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
@@ -28,7 +27,6 @@ dependencies:
|
|
28
27
|
requirements:
|
29
28
|
- - ~>
|
30
29
|
- !ruby/object:Gem::Version
|
31
|
-
hash: 62196431
|
32
30
|
segments:
|
33
31
|
- 2
|
34
32
|
- 0
|
@@ -46,7 +44,6 @@ dependencies:
|
|
46
44
|
requirements:
|
47
45
|
- - ~>
|
48
46
|
- !ruby/object:Gem::Version
|
49
|
-
hash: 7
|
50
47
|
segments:
|
51
48
|
- 3
|
52
49
|
- 0
|
@@ -62,7 +59,6 @@ dependencies:
|
|
62
59
|
requirements:
|
63
60
|
- - ~>
|
64
61
|
- !ruby/object:Gem::Version
|
65
|
-
hash: 15
|
66
62
|
segments:
|
67
63
|
- 2
|
68
64
|
- 1
|
@@ -78,7 +74,6 @@ dependencies:
|
|
78
74
|
requirements:
|
79
75
|
- - ~>
|
80
76
|
- !ruby/object:Gem::Version
|
81
|
-
hash: 11
|
82
77
|
segments:
|
83
78
|
- 1
|
84
79
|
- 4
|
@@ -96,64 +91,66 @@ extensions: []
|
|
96
91
|
extra_rdoc_files:
|
97
92
|
- README.rdoc
|
98
93
|
files:
|
99
|
-
- bin/wrest
|
100
94
|
- bin/wrest_shell.rb
|
101
|
-
-
|
102
|
-
- lib/
|
103
|
-
- lib/wrest
|
104
|
-
- lib/wrest/
|
105
|
-
- lib/wrest/
|
106
|
-
- lib/wrest/
|
107
|
-
- lib/wrest/
|
108
|
-
- lib/wrest/
|
109
|
-
- lib/wrest/
|
110
|
-
- lib/wrest/
|
111
|
-
- lib/wrest/
|
112
|
-
- lib/wrest/components/translators.rb
|
113
|
-
- lib/wrest/components.rb
|
95
|
+
- bin/wrest
|
96
|
+
- lib/wrest_no_ext.rb
|
97
|
+
- lib/wrest.rb
|
98
|
+
- lib/wrest/uri_template.rb
|
99
|
+
- lib/wrest/version.rb
|
100
|
+
- lib/wrest/xml_mini/nokogiri.rb
|
101
|
+
- lib/wrest/xml_mini/nokogiri/xpath_filter.rb
|
102
|
+
- lib/wrest/resource/state.rb
|
103
|
+
- lib/wrest/resource/base.rb
|
104
|
+
- lib/wrest/resource/collection.rb
|
105
|
+
- lib/wrest/test.rb
|
114
106
|
- lib/wrest/core_ext/hash/conversions.rb
|
115
107
|
- lib/wrest/core_ext/hash.rb
|
116
108
|
- lib/wrest/core_ext/string/conversions.rb
|
117
109
|
- lib/wrest/core_ext/string.rb
|
118
|
-
- lib/wrest/curl/delete.rb
|
119
|
-
- lib/wrest/curl/get.rb
|
120
|
-
- lib/wrest/curl/options.rb
|
121
|
-
- lib/wrest/curl/post.rb
|
122
|
-
- lib/wrest/curl/put.rb
|
123
|
-
- lib/wrest/curl/request.rb
|
124
|
-
- lib/wrest/curl/response.rb
|
125
|
-
- lib/wrest/curl/session.rb
|
126
110
|
- lib/wrest/curl.rb
|
127
|
-
- lib/wrest/
|
128
|
-
- lib/wrest/http_shared/headers.rb
|
129
|
-
- lib/wrest/http_shared/standard_headers.rb
|
130
|
-
- lib/wrest/http_shared/standard_tokens.rb
|
111
|
+
- lib/wrest/native.rb
|
131
112
|
- lib/wrest/http_shared.rb
|
132
|
-
- lib/wrest/
|
133
|
-
- lib/wrest/native/
|
134
|
-
- lib/wrest/native/
|
135
|
-
- lib/wrest/native/get.rb
|
113
|
+
- lib/wrest/native/session.rb
|
114
|
+
- lib/wrest/native/redirection.rb
|
115
|
+
- lib/wrest/native/response.rb
|
136
116
|
- lib/wrest/native/options.rb
|
117
|
+
- lib/wrest/native/get.rb
|
118
|
+
- lib/wrest/native/connection_factory.rb
|
119
|
+
- lib/wrest/native/request.rb
|
137
120
|
- lib/wrest/native/post.rb
|
138
|
-
- lib/wrest/native/post_multipart.rb
|
139
|
-
- lib/wrest/native/put.rb
|
140
121
|
- lib/wrest/native/put_multipart.rb
|
141
|
-
- lib/wrest/native/
|
142
|
-
- lib/wrest/native/
|
143
|
-
- lib/wrest/native/
|
144
|
-
- lib/wrest/
|
145
|
-
- lib/wrest/
|
146
|
-
- lib/wrest/
|
147
|
-
- lib/wrest/
|
148
|
-
- lib/wrest/
|
122
|
+
- lib/wrest/native/put.rb
|
123
|
+
- lib/wrest/native/delete.rb
|
124
|
+
- lib/wrest/native/post_multipart.rb
|
125
|
+
- lib/wrest/uri.rb
|
126
|
+
- lib/wrest/components.rb
|
127
|
+
- lib/wrest/curl/session.rb
|
128
|
+
- lib/wrest/curl/response.rb
|
129
|
+
- lib/wrest/curl/options.rb
|
130
|
+
- lib/wrest/curl/get.rb
|
131
|
+
- lib/wrest/curl/request.rb
|
132
|
+
- lib/wrest/curl/post.rb
|
133
|
+
- lib/wrest/curl/put.rb
|
134
|
+
- lib/wrest/curl/delete.rb
|
135
|
+
- lib/wrest/exceptions.rb
|
136
|
+
- lib/wrest/components/translators/json.rb
|
137
|
+
- lib/wrest/components/translators/xml.rb
|
138
|
+
- lib/wrest/components/translators/content_types.rb
|
139
|
+
- lib/wrest/components/mutators.rb
|
140
|
+
- lib/wrest/components/translators.rb
|
141
|
+
- lib/wrest/components/container.rb
|
142
|
+
- lib/wrest/components/container/alias_accessors.rb
|
143
|
+
- lib/wrest/components/container/typecaster.rb
|
144
|
+
- lib/wrest/components/mutators/camel_to_snake_case.rb
|
145
|
+
- lib/wrest/components/mutators/xml_mini_type_caster.rb
|
146
|
+
- lib/wrest/components/mutators/base.rb
|
147
|
+
- lib/wrest/components/mutators/xml_simple_type_caster.rb
|
148
|
+
- lib/wrest/http_shared/standard_tokens.rb
|
149
|
+
- lib/wrest/http_shared/standard_headers.rb
|
150
|
+
- lib/wrest/http_shared/headers.rb
|
149
151
|
- lib/wrest/resource.rb
|
150
152
|
- lib/wrest/test/request_patches.rb
|
151
|
-
- lib/wrest/
|
152
|
-
- lib/wrest/uri.rb
|
153
|
-
- lib/wrest/uri_template.rb
|
154
|
-
- lib/wrest/version.rb
|
155
|
-
- lib/wrest.rb
|
156
|
-
- lib/wrest_no_ext.rb
|
153
|
+
- lib/wrest/multipart.rb
|
157
154
|
- README.rdoc
|
158
155
|
- CHANGELOG
|
159
156
|
- LICENCE
|
@@ -171,7 +168,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
168
|
requirements:
|
172
169
|
- - ">="
|
173
170
|
- !ruby/object:Gem::Version
|
174
|
-
hash: 3
|
175
171
|
segments:
|
176
172
|
- 0
|
177
173
|
version: "0"
|
@@ -180,7 +176,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
176
|
requirements:
|
181
177
|
- - ">="
|
182
178
|
- !ruby/object:Gem::Version
|
183
|
-
hash: 21
|
184
179
|
segments:
|
185
180
|
- 1
|
186
181
|
- 3
|