medea 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/medea.rb +7 -0
- data/lib/medea/dummy_logger.rb +21 -0
- data/lib/medea/jasondeferredquery.rb +10 -2
- data/lib/medea/version.rb +1 -1
- metadata +4 -3
data/lib/medea.rb
CHANGED
@@ -114,8 +114,10 @@ module Medea
|
|
114
114
|
#hit the URL
|
115
115
|
#fill self.contents with :ghost versions of JasonObjects
|
116
116
|
begin
|
117
|
-
|
118
|
-
|
117
|
+
LOGGER.debug "Executing #{type.name} deferred query! (#{to_url})"
|
118
|
+
|
119
|
+
response = RestClient.get to_url
|
120
|
+
result = JSON.parse(response)
|
119
121
|
self.contents = []
|
120
122
|
#results are in a hash, their keys are just numbers
|
121
123
|
result.keys.each do |k|
|
@@ -136,6 +138,12 @@ module Medea
|
|
136
138
|
self.state = :postfetch
|
137
139
|
result
|
138
140
|
rescue
|
141
|
+
if response.code != 200
|
142
|
+
LOGGER.error "Query to #{to_url} failed to parse!"
|
143
|
+
else
|
144
|
+
LOGGER.error "Query to #{to_url} failed to get!"
|
145
|
+
end
|
146
|
+
|
139
147
|
self.contents = []
|
140
148
|
end
|
141
149
|
end
|
data/lib/medea/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: medea
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Jensen
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- index.html
|
92
92
|
- lib/medea.rb
|
93
93
|
- lib/medea/active_model_methods.rb
|
94
|
+
- lib/medea/dummy_logger.rb
|
94
95
|
- lib/medea/inheritable_attributes.rb
|
95
96
|
- lib/medea/jasondb.rb
|
96
97
|
- lib/medea/jasondeferredquery.rb
|