rhoconnect 4.0.3 → 4.0.4
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.
- checksums.yaml +8 -8
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +6 -6
- data/lib/rhoconnect/bulk_data/bulk_data.rb +1 -1
- data/lib/rhoconnect/handler/query/engine.rb +16 -10
- data/lib/rhoconnect/jobs/source_job.rb +1 -1
- data/lib/rhoconnect/version.rb +1 -1
- data/spec/jobs/source_job_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDBhM2NiYzg5N2I5NzRmNjg1ODk3ZjM4MDI5ZmFmN2IyOTJiOWZjNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTRlNDA1ZmIzZDQ3OTZkMWQ5MmQyOTlmNDdhYjM0NThhNDgzY2U1NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDhkMjVlMjI0NDk3N2I4YzY5M2ExMzA0MmNjMzNkZTU0NGIyMmU2YzVkYWM3
|
10
|
+
YjdlZDIwMmFiZjM2OTU4MDc0ZjIzNGExYjdkN2MxMmE1ZDhhMDY4OTYwOTAx
|
11
|
+
OWExZGZkY2NkM2QwODFmYTgxYWY5NGUyMWU4NzZiMjIzY2U5N2U=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWVkODNmMTVlYTc2ODhjM2JmN2JkNzVkY2ZjMDAyMzdjZjg3OTE2M2Q2OTk2
|
14
|
+
NzY3OTZjODQ2Njk3N2QxY2Y5OWJlMDMxODczYjRlYWJhYTU4NDgyMDU0NTEz
|
15
|
+
MzM2NDFhNjdhY2Y0NWVjZmNmNjdjNDA0ZDAwNDcyOTliZWM2ZjY=
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rhoconnect (4.0.
|
4
|
+
rhoconnect (4.0.4)
|
5
5
|
bundler (~> 1.0)
|
6
6
|
connection_pool (~> 1.0.0)
|
7
7
|
json (~> 1.7.7)
|
@@ -18,7 +18,7 @@ PATH
|
|
18
18
|
GEM
|
19
19
|
remote: https://rubygems.org/
|
20
20
|
specs:
|
21
|
-
addressable (2.3.
|
21
|
+
addressable (2.3.6)
|
22
22
|
arr-pm (0.0.9)
|
23
23
|
cabin (> 0)
|
24
24
|
async-rack (0.5.1)
|
@@ -30,7 +30,7 @@ GEM
|
|
30
30
|
backports (3.6.0)
|
31
31
|
builder (3.2.2)
|
32
32
|
cabin (0.6.1)
|
33
|
-
childprocess (0.5.
|
33
|
+
childprocess (0.5.2)
|
34
34
|
ffi (~> 1.0, >= 1.0.11)
|
35
35
|
clamp (0.6.3)
|
36
36
|
coffee-script (2.2.0)
|
@@ -90,9 +90,9 @@ GEM
|
|
90
90
|
rainbow
|
91
91
|
sprockets (~> 2)
|
92
92
|
json (1.7.7)
|
93
|
-
mime-types (2.
|
93
|
+
mime-types (2.2)
|
94
94
|
mono_logger (1.1.0)
|
95
|
-
multi_json (1.9.
|
95
|
+
multi_json (1.9.2)
|
96
96
|
net-scp (1.1.2)
|
97
97
|
net-ssh (>= 2.6.5)
|
98
98
|
net-ssh (2.8.0)
|
@@ -143,7 +143,7 @@ GEM
|
|
143
143
|
rack (~> 1.4)
|
144
144
|
rack-protection (~> 1.4)
|
145
145
|
tilt (~> 1.3, >= 1.3.4)
|
146
|
-
sprockets (2.
|
146
|
+
sprockets (2.12.0)
|
147
147
|
hike (~> 1.2)
|
148
148
|
multi_json (~> 1.0)
|
149
149
|
rack (~> 1.0)
|
@@ -34,7 +34,7 @@ module Rhoconnect
|
|
34
34
|
if s
|
35
35
|
rh = lambda { @model.query(params[:query])}
|
36
36
|
model = Rhoconnect::Model::Base.create(s)
|
37
|
-
Rhoconnect::Handler::Query::Engine.new(model, rh, {}).
|
37
|
+
Rhoconnect::Handler::Query::Engine.new(model, rh, {}).run_query
|
38
38
|
s.clone(:md, s.docname(:md_copy)) unless s.sync_type.to_sym == :bulk_sync_only
|
39
39
|
end
|
40
40
|
end
|
@@ -26,22 +26,28 @@ module Rhoconnect
|
|
26
26
|
if source.query_queue or source.queue
|
27
27
|
query_res = async(:query, source.query_queue || source.queue, params[:query])
|
28
28
|
else
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
29
|
+
query_res = run_query
|
30
|
+
end
|
31
|
+
query_res
|
32
|
+
end
|
33
|
+
|
34
|
+
def run_query
|
35
|
+
query_res = nil
|
36
|
+
source.if_need_refresh do
|
37
|
+
Rhoconnect::Stats::Record.update("source:query:#{source.name}") do
|
38
|
+
if auth_method('login')
|
39
|
+
query_res = _execute_query
|
40
|
+
auth_method('logoff')
|
38
41
|
end
|
42
|
+
# re-wind refresh time in case of error
|
43
|
+
query_failure = source.exists?(:errors)
|
44
|
+
source.rewind_refresh_time(query_failure)
|
39
45
|
end
|
40
46
|
end
|
41
47
|
query_res
|
42
48
|
end
|
43
49
|
|
44
|
-
def
|
50
|
+
def _execute_query
|
45
51
|
errordoc = nil
|
46
52
|
docobj = nil
|
47
53
|
result = nil
|
@@ -13,7 +13,7 @@ module Rhoconnect
|
|
13
13
|
handler_sync = lambda { @model.query(params[:query])}
|
14
14
|
@model = Rhoconnect::Model::Base.create(source)
|
15
15
|
source_sync = Rhoconnect::Handler::Query::Engine.new(@model, handler_sync, params)
|
16
|
-
source_sync.
|
16
|
+
source_sync.run_query
|
17
17
|
when :cud
|
18
18
|
handler_cud = lambda { @model.send params[:operation].to_sym, params["#{params[:operation]}_object".to_sym] }
|
19
19
|
@model = Rhoconnect::Model::Base.create(source)
|
data/lib/rhoconnect/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhoconnect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rhomobile
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|