sp2db 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +42 -47
- data/lib/sp2db/base_table.rb +9 -1
- data/lib/sp2db/import_strategy.rb +1 -1
- data/lib/sp2db/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f57d477ddf08b8879212063fd0833e42527f8c7
|
4
|
+
data.tar.gz: 8f7ec2eef50da75ac4e44cc9d5581e3440f5b42b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efeb740d05351cc6e14386e9d86eab9f35f046f72acfa524533fb563ceea19400b0b7d01315946007251e32606bad151e7e16d60042460110bd45ada23e3a56e
|
7
|
+
data.tar.gz: 42a9b551dcb282b87c79147c4c30c76ad76a3d8748cd37364d1128c2d53169b0aace32eba5f7c0431912e1fc699ae405b2d6538e481fd6408a230ce92b1666e7
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sp2db (0.0.
|
4
|
+
sp2db (0.0.4)
|
5
5
|
google-api-client (~> 0.11)
|
6
6
|
google_drive (~> 2.1)
|
7
7
|
rails (~> 5.0)
|
@@ -9,43 +9,43 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actioncable (5.2.
|
13
|
-
actionpack (= 5.2.
|
12
|
+
actioncable (5.2.1)
|
13
|
+
actionpack (= 5.2.1)
|
14
14
|
nio4r (~> 2.0)
|
15
15
|
websocket-driver (>= 0.6.1)
|
16
|
-
actionmailer (5.2.
|
17
|
-
actionpack (= 5.2.
|
18
|
-
actionview (= 5.2.
|
19
|
-
activejob (= 5.2.
|
16
|
+
actionmailer (5.2.1)
|
17
|
+
actionpack (= 5.2.1)
|
18
|
+
actionview (= 5.2.1)
|
19
|
+
activejob (= 5.2.1)
|
20
20
|
mail (~> 2.5, >= 2.5.4)
|
21
21
|
rails-dom-testing (~> 2.0)
|
22
|
-
actionpack (5.2.
|
23
|
-
actionview (= 5.2.
|
24
|
-
activesupport (= 5.2.
|
22
|
+
actionpack (5.2.1)
|
23
|
+
actionview (= 5.2.1)
|
24
|
+
activesupport (= 5.2.1)
|
25
25
|
rack (~> 2.0)
|
26
26
|
rack-test (>= 0.6.3)
|
27
27
|
rails-dom-testing (~> 2.0)
|
28
28
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
-
actionview (5.2.
|
30
|
-
activesupport (= 5.2.
|
29
|
+
actionview (5.2.1)
|
30
|
+
activesupport (= 5.2.1)
|
31
31
|
builder (~> 3.1)
|
32
32
|
erubi (~> 1.4)
|
33
33
|
rails-dom-testing (~> 2.0)
|
34
34
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
-
activejob (5.2.
|
36
|
-
activesupport (= 5.2.
|
35
|
+
activejob (5.2.1)
|
36
|
+
activesupport (= 5.2.1)
|
37
37
|
globalid (>= 0.3.6)
|
38
|
-
activemodel (5.2.
|
39
|
-
activesupport (= 5.2.
|
40
|
-
activerecord (5.2.
|
41
|
-
activemodel (= 5.2.
|
42
|
-
activesupport (= 5.2.
|
38
|
+
activemodel (5.2.1)
|
39
|
+
activesupport (= 5.2.1)
|
40
|
+
activerecord (5.2.1)
|
41
|
+
activemodel (= 5.2.1)
|
42
|
+
activesupport (= 5.2.1)
|
43
43
|
arel (>= 9.0)
|
44
|
-
activestorage (5.2.
|
45
|
-
actionpack (= 5.2.
|
46
|
-
activerecord (= 5.2.
|
44
|
+
activestorage (5.2.1)
|
45
|
+
actionpack (= 5.2.1)
|
46
|
+
activerecord (= 5.2.1)
|
47
47
|
marcel (~> 0.3.1)
|
48
|
-
activesupport (5.2.
|
48
|
+
activesupport (5.2.1)
|
49
49
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
50
50
|
i18n (>= 0.7, < 2)
|
51
51
|
minitest (~> 5.1)
|
@@ -74,22 +74,17 @@ GEM
|
|
74
74
|
google-api-client (>= 0.11.0, < 1.0.0)
|
75
75
|
googleauth (>= 0.5.0, < 1.0.0)
|
76
76
|
nokogiri (>= 1.5.3, < 2.0.0)
|
77
|
-
googleauth (0.6.
|
77
|
+
googleauth (0.6.4)
|
78
78
|
faraday (~> 0.12)
|
79
79
|
jwt (>= 1.4, < 3.0)
|
80
|
-
logging (~> 2.0)
|
81
80
|
memoist (~> 0.12)
|
82
81
|
multi_json (~> 1.11)
|
83
|
-
os (
|
82
|
+
os (>= 0.9, < 2.0)
|
84
83
|
signet (~> 0.7)
|
85
84
|
httpclient (2.8.3)
|
86
|
-
i18n (1.0
|
85
|
+
i18n (1.1.0)
|
87
86
|
concurrent-ruby (~> 1.0)
|
88
87
|
jwt (2.1.0)
|
89
|
-
little-plugger (1.1.4)
|
90
|
-
logging (2.2.2)
|
91
|
-
little-plugger (~> 1.1)
|
92
|
-
multi_json (~> 1.10)
|
93
88
|
loofah (2.2.2)
|
94
89
|
crass (~> 1.0.2)
|
95
90
|
nokogiri (>= 1.5.9)
|
@@ -111,35 +106,35 @@ GEM
|
|
111
106
|
nio4r (2.3.1)
|
112
107
|
nokogiri (1.8.4)
|
113
108
|
mini_portile2 (~> 2.3.0)
|
114
|
-
os (0.
|
109
|
+
os (1.0.0)
|
115
110
|
public_suffix (3.0.2)
|
116
111
|
rack (2.0.5)
|
117
112
|
rack-test (1.1.0)
|
118
113
|
rack (>= 1.0, < 3)
|
119
|
-
rails (5.2.
|
120
|
-
actioncable (= 5.2.
|
121
|
-
actionmailer (= 5.2.
|
122
|
-
actionpack (= 5.2.
|
123
|
-
actionview (= 5.2.
|
124
|
-
activejob (= 5.2.
|
125
|
-
activemodel (= 5.2.
|
126
|
-
activerecord (= 5.2.
|
127
|
-
activestorage (= 5.2.
|
128
|
-
activesupport (= 5.2.
|
114
|
+
rails (5.2.1)
|
115
|
+
actioncable (= 5.2.1)
|
116
|
+
actionmailer (= 5.2.1)
|
117
|
+
actionpack (= 5.2.1)
|
118
|
+
actionview (= 5.2.1)
|
119
|
+
activejob (= 5.2.1)
|
120
|
+
activemodel (= 5.2.1)
|
121
|
+
activerecord (= 5.2.1)
|
122
|
+
activestorage (= 5.2.1)
|
123
|
+
activesupport (= 5.2.1)
|
129
124
|
bundler (>= 1.3.0)
|
130
|
-
railties (= 5.2.
|
125
|
+
railties (= 5.2.1)
|
131
126
|
sprockets-rails (>= 2.0.0)
|
132
127
|
rails-dom-testing (2.0.3)
|
133
128
|
activesupport (>= 4.2.0)
|
134
129
|
nokogiri (>= 1.6)
|
135
130
|
rails-html-sanitizer (1.0.4)
|
136
131
|
loofah (~> 2.2, >= 2.2.2)
|
137
|
-
railties (5.2.
|
138
|
-
actionpack (= 5.2.
|
139
|
-
activesupport (= 5.2.
|
132
|
+
railties (5.2.1)
|
133
|
+
actionpack (= 5.2.1)
|
134
|
+
activesupport (= 5.2.1)
|
140
135
|
method_source
|
141
136
|
rake (>= 0.8.7)
|
142
|
-
thor (>= 0.
|
137
|
+
thor (>= 0.19.0, < 2.0)
|
143
138
|
rake (10.5.0)
|
144
139
|
representable (3.0.4)
|
145
140
|
declarative (< 0.1.0)
|
data/lib/sp2db/base_table.rb
CHANGED
@@ -64,7 +64,15 @@ module Sp2db
|
|
64
64
|
|
65
65
|
def sp_data
|
66
66
|
retries = 2
|
67
|
-
|
67
|
+
begin
|
68
|
+
raw_data = CSV.parse worksheet.export_as_string
|
69
|
+
rescue Google::Apis::RateLimitError => e
|
70
|
+
retries -= 1
|
71
|
+
sleep(5)
|
72
|
+
retry if retries >= 0
|
73
|
+
raise e
|
74
|
+
end
|
75
|
+
|
68
76
|
data = process_data raw_data, source: :sp
|
69
77
|
data
|
70
78
|
end
|
data/lib/sp2db/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sp2db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KhiemNS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|