restparty 0.1.2 → 0.1.3
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.
- data/README.rdoc +9 -0
- data/VERSION +1 -1
- data/lib/restparty.rb +2 -2
- data/restparty.gemspec +2 -2
- metadata +14 -8
data/README.rdoc
CHANGED
@@ -43,6 +43,10 @@ Of course You can use your RestParty class like a basic HTTparty class everythin
|
|
43
43
|
auth_digest "login", "pass"
|
44
44
|
end
|
45
45
|
|
46
|
+
== TODO
|
47
|
+
|
48
|
+
* Handle association ?
|
49
|
+
* Handle Resource errors
|
46
50
|
|
47
51
|
== Contributing to restparty
|
48
52
|
|
@@ -54,6 +58,11 @@ Of course You can use your RestParty class like a basic HTTparty class everythin
|
|
54
58
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
55
59
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
56
60
|
|
61
|
+
== Contributors
|
62
|
+
|
63
|
+
* Michael Bensoussan
|
64
|
+
* Pierre Boutbel
|
65
|
+
|
57
66
|
== Copyright
|
58
67
|
|
59
68
|
Copyright (c) 2010 Michael Bensoussan. See LICENSE.txt for
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/lib/restparty.rb
CHANGED
@@ -51,10 +51,10 @@ class RestParty
|
|
51
51
|
response = ""
|
52
52
|
if id.to_s == "all" and #{@resource_methods.include?(:index)}
|
53
53
|
response = get('/#{@resource}', :query => options)
|
54
|
-
elsif
|
54
|
+
elsif #{@resource_methods.include?(:show)}
|
55
55
|
response = get('/#{@resource}/'+id.to_s, :query => options)
|
56
56
|
else
|
57
|
-
raise "
|
57
|
+
raise ArgumentError, "only :all, 'all' or integer values are supported"
|
58
58
|
end
|
59
59
|
end
|
60
60
|
}
|
data/restparty.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{restparty}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Bensoussan", "Pierre Boutbel"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-19}
|
13
13
|
s.description = %q{Add ressource love to your party !}
|
14
14
|
s.email = %q{mbensoussan.is@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restparty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Michael Bensoussan
|
@@ -15,65 +16,69 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-12-
|
19
|
+
date: 2010-12-19 00:00:00 +01:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
22
|
-
name: httparty
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
+
hash: 5
|
28
29
|
segments:
|
29
30
|
- 0
|
30
31
|
- 6
|
31
32
|
- 1
|
32
33
|
version: 0.6.1
|
33
34
|
type: :runtime
|
35
|
+
name: httparty
|
34
36
|
prerelease: false
|
35
37
|
version_requirements: *id001
|
36
38
|
- !ruby/object:Gem::Dependency
|
37
|
-
name: shoulda
|
38
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
40
|
none: false
|
40
41
|
requirements:
|
41
42
|
- - ">="
|
42
43
|
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
43
45
|
segments:
|
44
46
|
- 0
|
45
47
|
version: "0"
|
46
48
|
type: :development
|
49
|
+
name: shoulda
|
47
50
|
prerelease: false
|
48
51
|
version_requirements: *id002
|
49
52
|
- !ruby/object:Gem::Dependency
|
50
|
-
name: bundler
|
51
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
52
54
|
none: false
|
53
55
|
requirements:
|
54
56
|
- - ~>
|
55
57
|
- !ruby/object:Gem::Version
|
58
|
+
hash: 23
|
56
59
|
segments:
|
57
60
|
- 1
|
58
61
|
- 0
|
59
62
|
- 0
|
60
63
|
version: 1.0.0
|
61
64
|
type: :development
|
65
|
+
name: bundler
|
62
66
|
prerelease: false
|
63
67
|
version_requirements: *id003
|
64
68
|
- !ruby/object:Gem::Dependency
|
65
|
-
name: jeweler
|
66
69
|
requirement: &id004 !ruby/object:Gem::Requirement
|
67
70
|
none: false
|
68
71
|
requirements:
|
69
72
|
- - ~>
|
70
73
|
- !ruby/object:Gem::Version
|
74
|
+
hash: 1
|
71
75
|
segments:
|
72
76
|
- 1
|
73
77
|
- 5
|
74
78
|
- 1
|
75
79
|
version: 1.5.1
|
76
80
|
type: :development
|
81
|
+
name: jeweler
|
77
82
|
prerelease: false
|
78
83
|
version_requirements: *id004
|
79
84
|
description: Add ressource love to your party !
|
@@ -111,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
116
|
requirements:
|
112
117
|
- - ">="
|
113
118
|
- !ruby/object:Gem::Version
|
114
|
-
hash:
|
119
|
+
hash: 3
|
115
120
|
segments:
|
116
121
|
- 0
|
117
122
|
version: "0"
|
@@ -120,6 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
125
|
requirements:
|
121
126
|
- - ">="
|
122
127
|
- !ruby/object:Gem::Version
|
128
|
+
hash: 3
|
123
129
|
segments:
|
124
130
|
- 0
|
125
131
|
version: "0"
|