airrecord 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/airrecord.gemspec +2 -2
- data/lib/airrecord.rb +17 -2
- data/lib/airrecord/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cb016c7f7bfa6d6e5affe3432faedf8cebf92a2
|
4
|
+
data.tar.gz: eff4bdb0fb4d85cbeaf2ca1dcf82f9c5523e6050
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2d60c1447b99e57037782bdd36ec9b93a058b5d0d713b10a8646cc41285d94ca4ccdced574d048b8c720c910fd4beeb020905e110df432b2f0062444e965f75
|
7
|
+
data.tar.gz: 3055b1ad8dd62efd1a28b07d11ace7e06b0411f082021f3ac6c5da7e1d0f986d84ca08874e2fcd8e217de21f1eec8025034216dc2e91739ee6fff73a418b4438
|
data/airrecord.gemspec
CHANGED
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'faraday'
|
22
|
-
spec.add_dependency "net-http-persistent"
|
21
|
+
spec.add_dependency 'faraday', '~> 0.10.0'
|
22
|
+
spec.add_dependency "net-http-persistent", '~> 2.9.4'
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.12"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/airrecord.rb
CHANGED
@@ -95,7 +95,14 @@ module Airrecord
|
|
95
95
|
}
|
96
96
|
|
97
97
|
if paginate && parsed_response["offset"]
|
98
|
-
records.concat(records(
|
98
|
+
records.concat(records(
|
99
|
+
filter: filter,
|
100
|
+
sort: sort,
|
101
|
+
view: view,
|
102
|
+
paginate: paginate,
|
103
|
+
fields: fields,
|
104
|
+
offset: parsed_response["offset"],
|
105
|
+
))
|
99
106
|
end
|
100
107
|
|
101
108
|
records
|
@@ -136,7 +143,7 @@ module Airrecord
|
|
136
143
|
return associations.first if association[:single]
|
137
144
|
associations
|
138
145
|
else
|
139
|
-
value
|
146
|
+
type_cast(value)
|
140
147
|
end
|
141
148
|
end
|
142
149
|
|
@@ -246,6 +253,14 @@ module Airrecord
|
|
246
253
|
def client
|
247
254
|
self.class.client
|
248
255
|
end
|
256
|
+
|
257
|
+
def type_cast(value)
|
258
|
+
if value =~ /\d{4}-\d{2}-\d{2}/
|
259
|
+
Time.parse(value + " UTC")
|
260
|
+
else
|
261
|
+
value
|
262
|
+
end
|
263
|
+
end
|
249
264
|
end
|
250
265
|
|
251
266
|
def self.table(api_key, base_key, table_name)
|
data/lib/airrecord/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airrecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Eskildsen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.10.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.10.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: net-http-persistent
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.9.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.9.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|