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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fac51c488482e0d04613279cb0e38c75c2f5cfa9
4
- data.tar.gz: fa08f175fb5b8466731420e8e86d2963484a0150
3
+ metadata.gz: 1f57d477ddf08b8879212063fd0833e42527f8c7
4
+ data.tar.gz: 8f7ec2eef50da75ac4e44cc9d5581e3440f5b42b
5
5
  SHA512:
6
- metadata.gz: 028cb9e83c1cbec58766f1ea0721fa63ed5f60dda8fd3b3fe821bb0da5581028c4eec68199a8ea2d9892c9ce4b0da5777de3fad6ae0209b1d06ab435699aec6d
7
- data.tar.gz: 13c90ddfad22da59508a5a4751aec79725aa1f813f53979a97531f06ca21826d0db5ae33033a958bd6bee29ca96df27d936994b4837068773076864ef3c8937c
6
+ metadata.gz: efeb740d05351cc6e14386e9d86eab9f35f046f72acfa524533fb563ceea19400b0b7d01315946007251e32606bad151e7e16d60042460110bd45ada23e3a56e
7
+ data.tar.gz: 42a9b551dcb282b87c79147c4c30c76ad76a3d8748cd37364d1128c2d53169b0aace32eba5f7c0431912e1fc699ae405b2d6538e481fd6408a230ce92b1666e7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sp2db (0.0.3)
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.0)
13
- actionpack (= 5.2.0)
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.0)
17
- actionpack (= 5.2.0)
18
- actionview (= 5.2.0)
19
- activejob (= 5.2.0)
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.0)
23
- actionview (= 5.2.0)
24
- activesupport (= 5.2.0)
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.0)
30
- activesupport (= 5.2.0)
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.0)
36
- activesupport (= 5.2.0)
35
+ activejob (5.2.1)
36
+ activesupport (= 5.2.1)
37
37
  globalid (>= 0.3.6)
38
- activemodel (5.2.0)
39
- activesupport (= 5.2.0)
40
- activerecord (5.2.0)
41
- activemodel (= 5.2.0)
42
- activesupport (= 5.2.0)
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.0)
45
- actionpack (= 5.2.0)
46
- activerecord (= 5.2.0)
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.0)
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.2)
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 (~> 0.9)
82
+ os (>= 0.9, < 2.0)
84
83
  signet (~> 0.7)
85
84
  httpclient (2.8.3)
86
- i18n (1.0.1)
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.9.6)
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.0)
120
- actioncable (= 5.2.0)
121
- actionmailer (= 5.2.0)
122
- actionpack (= 5.2.0)
123
- actionview (= 5.2.0)
124
- activejob (= 5.2.0)
125
- activemodel (= 5.2.0)
126
- activerecord (= 5.2.0)
127
- activestorage (= 5.2.0)
128
- activesupport (= 5.2.0)
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.0)
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.0)
138
- actionpack (= 5.2.0)
139
- activesupport (= 5.2.0)
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.18.1, < 2.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)
@@ -64,7 +64,15 @@ module Sp2db
64
64
 
65
65
  def sp_data
66
66
  retries = 2
67
- raw_data = CSV.parse worksheet.export_as_string
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
@@ -76,7 +76,7 @@ module Sp2db
76
76
 
77
77
  def set_record_value record, row
78
78
  row.each do |k, v|
79
- record.send("#{k}=", v)
79
+ record.send("#{k}=", v) if record.respond_to?("#{k}=")
80
80
  end
81
81
  record
82
82
  end
@@ -1,3 +1,3 @@
1
1
  module Sp2db
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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-07-30 00:00:00.000000000 Z
11
+ date: 2018-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails