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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c25095030b59046ff81c29a3bcf76c7f1362b179
4
- data.tar.gz: a3367cefa41f1e1213adbf402ef95e6d981189c8
3
+ metadata.gz: 90fc4b658334f8b64a152c8856d1d5746d2f30d6
4
+ data.tar.gz: dfd804e1df9105ef39ab391f5af287dd2b96bf9c
5
5
  SHA512:
6
- metadata.gz: da9fdb99c8c286067396344f80c5eda45039a3204a40df44f66c73b22d0daaa01591c03873291fef165c1e8608ad8c2a23c9f905b71550c062cde8b293f44af2
7
- data.tar.gz: b3ff36fddf9bc819911f25dbae0cb38abec249ada4ab1884e055582597973169d9c1e823a3922368d44e50e957a1e8e73edf4b5594ca514776e4693840b51f67
6
+ metadata.gz: 5c03db4abbe8ba3b1b815be22c42f7dbdc435c770e69ad9a3adadb454b129b306a6bb35f456da4cd765c8fd480898d38237653f0ffb28d7dfe3c34d960e9cb50
7
+ data.tar.gz: 93bc9a5a89cd0bdefecc6fc9a183ed89c59bf7e83879cf6d1471b8a8ca1c446b50a391f493e732e45ba4f9cc41fb7eadf167b957cea75a7e1503b3b477267c2b
data/UPGRADE.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 2.5.0
2
+
3
+ * remove yajl
4
+
5
+
1
6
  # 2.4.9
2
7
 
3
8
  * observe ruby platform
@@ -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
- Yajl.load(body, :symbolize_keys => true)
62
- rescue Yajl::ParseError
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
 
@@ -1,6 +1,6 @@
1
1
  module Quandl
2
2
  module Client
3
- VERSION = '2.4.9'
3
+ VERSION = '2.5.0'
4
4
  API_VERSION = 'v2'
5
5
 
6
6
  class << self
@@ -1,5 +1,3 @@
1
- require 'yajl'
2
-
3
1
  module Her
4
2
  module Model
5
3
  # remove deprecated data method since cassinatra returns data: []
@@ -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.9
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-03 00:00:00.000000000 Z
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