quandl_client 2.4.9 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/UPGRADE.md +5 -0
- data/lib/quandl/client/middleware/parse_json.rb +4 -2
- data/lib/quandl/client/models/dataset.rb +2 -0
- data/lib/quandl/client/version.rb +1 -1
- data/lib/quandl/her/remove_method_data.rb +0 -2
- data/quandl_client.gemspec +0 -1
- data/spec/lib/quandl/client/dataset/attributes_spec.rb +11 -0
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90fc4b658334f8b64a152c8856d1d5746d2f30d6
|
4
|
+
data.tar.gz: dfd804e1df9105ef39ab391f5af287dd2b96bf9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c03db4abbe8ba3b1b815be22c42f7dbdc435c770e69ad9a3adadb454b129b306a6bb35f456da4cd765c8fd480898d38237653f0ffb28d7dfe3c34d960e9cb50
|
7
|
+
data.tar.gz: 93bc9a5a89cd0bdefecc6fc9a183ed89c59bf7e83879cf6d1471b8a8ca1c446b50a391f493e732e45ba4f9cc41fb7eadf167b957cea75a7e1503b3b477267c2b
|
data/UPGRADE.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
1
3
|
module Quandl
|
2
4
|
module Client
|
3
5
|
module Middleware
|
@@ -58,8 +60,8 @@ class ParseJSON < Faraday::Response::Middleware
|
|
58
60
|
def parse_json(body = nil, env)
|
59
61
|
body ||= '{}'
|
60
62
|
json = begin
|
61
|
-
|
62
|
-
rescue
|
63
|
+
JSON.parse(body).symbolize_keys!
|
64
|
+
rescue JSON::ParserError
|
63
65
|
nil
|
64
66
|
end
|
65
67
|
# invalid json body?
|
@@ -142,6 +142,8 @@ class Quandl::Client::Dataset < Quandl::Client::Base
|
|
142
142
|
|
143
143
|
def enforce_required_formats
|
144
144
|
# self.data = Quandl::Data.new(data).to_csv
|
145
|
+
self.source_code = self.source_code.to_s.upcase
|
146
|
+
self.code = self.code.to_s.upcase
|
145
147
|
self.locations_attributes = locations_attributes.to_json if locations_attributes.respond_to?(:to_json) && !locations_attributes.kind_of?(String)
|
146
148
|
end
|
147
149
|
|
data/quandl_client.gemspec
CHANGED
@@ -28,7 +28,6 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_runtime_dependency "quandl_data", "~> 1.3"
|
29
29
|
s.add_runtime_dependency "activesupport", ">= 3.0.0"
|
30
30
|
s.add_runtime_dependency "her", "~> 0.6"
|
31
|
-
s.add_runtime_dependency "yajl-ruby", "~> 1.1.0"
|
32
31
|
s.add_runtime_dependency 'json', '~> 1.7.7'
|
33
32
|
s.add_runtime_dependency "scope_composer", "~> 0.3"
|
34
33
|
end
|
@@ -10,6 +10,17 @@ describe Dataset do
|
|
10
10
|
}
|
11
11
|
subject{ create(:dataset, source_code: source.code, private: true ) }
|
12
12
|
|
13
|
+
describe "#code" do
|
14
|
+
subject{ build(:dataset, source_code: source.code.downcase ) }
|
15
|
+
before(:each){}
|
16
|
+
it "lowercase code should be valid" do
|
17
|
+
subject.code = subject.code.downcase
|
18
|
+
subject.save
|
19
|
+
subject.saved?.should be_true
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
13
24
|
describe "#name" do
|
14
25
|
subject{ create(:dataset, source_code: source.code, private: true, name: '' ) }
|
15
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quandl_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Hilscher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -150,20 +150,6 @@ dependencies:
|
|
150
150
|
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0.6'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: yajl-ruby
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ~>
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: 1.1.0
|
160
|
-
type: :runtime
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ~>
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 1.1.0
|
167
153
|
- !ruby/object:Gem::Dependency
|
168
154
|
name: json
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|