jcinnamond-httparty 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/httparty.gemspec +10 -8
- data/lib/httparty/parsers.rb +31 -0
- data/lib/httparty/request.rb +0 -3
- metadata +10 -8
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.6
|
data/httparty.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{httparty}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["John Nunemaker"]
|
12
|
-
s.date = %q{2009-09-
|
11
|
+
s.authors = ["John Nunemaker", "Sandro Turriate"]
|
12
|
+
s.date = %q{2009-09-16}
|
13
13
|
s.default_executable = %q{httparty}
|
14
14
|
s.description = %q{Makes http fun! Also, makes consuming restful web services dead easy.}
|
15
15
|
s.email = %q{nunemaker@gmail.com}
|
@@ -51,6 +51,7 @@ Gem::Specification.new do |s|
|
|
51
51
|
"lib/httparty/core_extensions.rb",
|
52
52
|
"lib/httparty/exceptions.rb",
|
53
53
|
"lib/httparty/module_inheritable_attributes.rb",
|
54
|
+
"lib/httparty/parsers.rb",
|
54
55
|
"lib/httparty/request.rb",
|
55
56
|
"lib/httparty/response.rb",
|
56
57
|
"lib/httparty/version.rb",
|
@@ -74,21 +75,22 @@ Gem::Specification.new do |s|
|
|
74
75
|
s.post_install_message = %q{When you HTTParty, you must party hard!}
|
75
76
|
s.rdoc_options = ["--charset=UTF-8"]
|
76
77
|
s.require_paths = ["lib"]
|
78
|
+
s.rubyforge_project = %q{httparty}
|
77
79
|
s.rubygems_version = %q{1.3.1}
|
78
80
|
s.summary = %q{Makes http fun! Also, makes consuming restful web services dead easy.}
|
79
81
|
s.test_files = [
|
80
82
|
"spec/httparty/cookie_hash_spec.rb",
|
81
|
-
"spec/httparty/request_spec.rb",
|
82
83
|
"spec/httparty/response_spec.rb",
|
84
|
+
"spec/httparty/request_spec.rb",
|
83
85
|
"spec/httparty_spec.rb",
|
84
86
|
"spec/spec_helper.rb",
|
85
|
-
"examples/
|
87
|
+
"examples/twitter.rb",
|
86
88
|
"examples/basic.rb",
|
89
|
+
"examples/whoismyrep.rb",
|
87
90
|
"examples/delicious.rb",
|
88
|
-
"examples/google.rb",
|
89
91
|
"examples/rubyurl.rb",
|
90
|
-
"examples/
|
91
|
-
"examples/
|
92
|
+
"examples/aaws.rb",
|
93
|
+
"examples/google.rb"
|
92
94
|
]
|
93
95
|
|
94
96
|
if s.respond_to? :specification_version then
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module HTTParty
|
2
|
+
module Xml
|
3
|
+
def self.parse(body)
|
4
|
+
Crack::XML.parse(body)
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
module Json
|
9
|
+
def self.parse(body)
|
10
|
+
Crack::JSON.parse(body)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
module Yaml
|
15
|
+
def self.parse(str)
|
16
|
+
::YAML.load(str)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
module Html
|
21
|
+
def self.parse(str)
|
22
|
+
str
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module Text
|
27
|
+
def self.parse(str)
|
28
|
+
str
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/httparty/request.rb
CHANGED
@@ -21,13 +21,11 @@ module HTTParty
|
|
21
21
|
|
22
22
|
def uri
|
23
23
|
new_uri = path.relative? ? URI.parse("#{options[:base_uri]}#{path}") : path
|
24
|
-
print "Uri: #{new_uri} "
|
25
24
|
|
26
25
|
# avoid double query string on redirects [#12]
|
27
26
|
unless @redirect
|
28
27
|
new_uri.query = query_string(new_uri)
|
29
28
|
end
|
30
|
-
puts "... #{new_uri}"
|
31
29
|
|
32
30
|
new_uri
|
33
31
|
end
|
@@ -95,7 +93,6 @@ module HTTParty
|
|
95
93
|
query_string_parts << options[:query] unless options[:query].nil?
|
96
94
|
end
|
97
95
|
|
98
|
-
print "[ qsp = #{query_string_parts.inspect}, options[default_params] = #{options[:default_params].inspect} ]"
|
99
96
|
query_string_parts.size > 0 ? query_string_parts.join('&') : nil
|
100
97
|
end
|
101
98
|
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jcinnamond-httparty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
8
|
+
- Sandro Turriate
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
|
12
|
-
date: 2009-09-
|
13
|
+
date: 2009-09-16 00:00:00 -07:00
|
13
14
|
default_executable: httparty
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
@@ -74,6 +75,7 @@ files:
|
|
74
75
|
- lib/httparty/core_extensions.rb
|
75
76
|
- lib/httparty/exceptions.rb
|
76
77
|
- lib/httparty/module_inheritable_attributes.rb
|
78
|
+
- lib/httparty/parsers.rb
|
77
79
|
- lib/httparty/request.rb
|
78
80
|
- lib/httparty/response.rb
|
79
81
|
- lib/httparty/version.rb
|
@@ -113,21 +115,21 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
115
|
version:
|
114
116
|
requirements: []
|
115
117
|
|
116
|
-
rubyforge_project:
|
118
|
+
rubyforge_project: httparty
|
117
119
|
rubygems_version: 1.3.5
|
118
120
|
signing_key:
|
119
121
|
specification_version: 2
|
120
122
|
summary: Makes http fun! Also, makes consuming restful web services dead easy.
|
121
123
|
test_files:
|
122
124
|
- spec/httparty/cookie_hash_spec.rb
|
123
|
-
- spec/httparty/request_spec.rb
|
124
125
|
- spec/httparty/response_spec.rb
|
126
|
+
- spec/httparty/request_spec.rb
|
125
127
|
- spec/httparty_spec.rb
|
126
128
|
- spec/spec_helper.rb
|
127
|
-
- examples/
|
129
|
+
- examples/twitter.rb
|
128
130
|
- examples/basic.rb
|
131
|
+
- examples/whoismyrep.rb
|
129
132
|
- examples/delicious.rb
|
130
|
-
- examples/google.rb
|
131
133
|
- examples/rubyurl.rb
|
132
|
-
- examples/
|
133
|
-
- examples/
|
134
|
+
- examples/aaws.rb
|
135
|
+
- examples/google.rb
|