restulicious 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -16,8 +16,8 @@ module Restulicious
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def initialize(attributes = {})
|
19
|
-
|
20
|
-
|
19
|
+
attributes.each do |key, value|
|
20
|
+
send("#{key}=", check_utf8(value))
|
21
21
|
end
|
22
22
|
super()
|
23
23
|
end
|
@@ -57,11 +57,11 @@ module Restulicious
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def all(&block)
|
60
|
-
adapter.get(query_interface.
|
60
|
+
adapter.get(query_interface.all_url, query_interface.params, &block)
|
61
61
|
end
|
62
62
|
|
63
63
|
def create(&block)
|
64
|
-
adapter.post(query_interface.
|
64
|
+
adapter.post(query_interface.all_url, query_interface.params, &block)
|
65
65
|
end
|
66
66
|
|
67
67
|
def update(&block)
|
@@ -40,12 +40,16 @@ module Restulicious
|
|
40
40
|
coordinator.all(&block)
|
41
41
|
end
|
42
42
|
|
43
|
-
def create(&block)
|
44
|
-
|
45
|
-
end
|
43
|
+
# def create(&block)
|
44
|
+
# coordinator.create(&block)
|
45
|
+
# end
|
46
|
+
|
47
|
+
# def update(&bock)
|
48
|
+
# coordinator.update(&block)
|
49
|
+
# end
|
46
50
|
|
47
|
-
def
|
48
|
-
|
51
|
+
def coordinator
|
52
|
+
Restulicious::Coordinator.new(self, @api_options)
|
49
53
|
end
|
50
54
|
|
51
55
|
private
|
@@ -54,10 +58,19 @@ module Restulicious
|
|
54
58
|
@api_options = options
|
55
59
|
end
|
56
60
|
|
57
|
-
|
58
|
-
|
59
|
-
|
61
|
+
end
|
62
|
+
|
63
|
+
def coordinator
|
64
|
+
@coordinator ||= self.class.coordinator
|
65
|
+
end
|
60
66
|
|
67
|
+
def create(&block)
|
68
|
+
coordinator.create(&block)
|
61
69
|
end
|
70
|
+
|
71
|
+
def update(&bock)
|
72
|
+
coordinator.update(&block)
|
73
|
+
end
|
74
|
+
|
62
75
|
end
|
63
76
|
end
|
data/lib/restulicious/version.rb
CHANGED
data/restulicious.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
|
18
18
|
gem.add_dependency('activesupport', '>= 3.0.0')
|
19
19
|
gem.add_dependency('i18n')
|
20
|
-
gem.add_dependency('typhoeus')
|
20
|
+
gem.add_dependency('typhoeus', '<= 0.4.2')
|
21
21
|
|
22
22
|
gem.add_development_dependency('minitest', '>= 3.0.0')
|
23
23
|
gem.add_development_dependency('mocha')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restulicious
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -48,17 +48,17 @@ dependencies:
|
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - <=
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 0.4.2
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - <=
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.4.2
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: minitest
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,12 +157,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
157
|
- - ! '>='
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
|
+
segments:
|
161
|
+
- 0
|
162
|
+
hash: -708485616625507035
|
160
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
164
|
none: false
|
162
165
|
requirements:
|
163
166
|
- - ! '>='
|
164
167
|
- !ruby/object:Gem::Version
|
165
168
|
version: '0'
|
169
|
+
segments:
|
170
|
+
- 0
|
171
|
+
hash: -708485616625507035
|
166
172
|
requirements: []
|
167
173
|
rubyforge_project:
|
168
174
|
rubygems_version: 1.8.24
|