quandl_client 2.4.0 → 2.4.1

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: 6bdbf7c4522f4761addb5805c1ff9f7933021ee8
4
- data.tar.gz: 26ed1147332cde5d16d202662bfda14b784e46db
3
+ metadata.gz: d4ca9b23ab2967c5a4022b45ba6c0ca55e2978a2
4
+ data.tar.gz: 5d9cf30414c5375de68a9f2511479438d73113a0
5
5
  SHA512:
6
- metadata.gz: f06923fbaafc6eb86326796a3355b09a3e25214ccd4626ec3d5bcff7549439483283fb26713ca297da2da14d7fcc86b427333d762b9ad0a1858de179409d0bd4
7
- data.tar.gz: 68ee14e21b88d24f9d3a89a2703ee1c6a8a5a3031c13ecc9b3c84fc797636cd6f4b7dbdeed37b62b4e9ae8a818bc62e973a7afd96ed7f631763861395cc96c19
6
+ metadata.gz: 2b38ace5101e92948d26a20aeba3049517c02a946bfa617c668bf560e18238e6e0b2a4385cedc8e7827514193df082fc7baf08e8ab7ce185765d9002ad271616
7
+ data.tar.gz: 4f85c8622f1da630055f6a9320f67a1d827cdc6a58790024090b5a7b2b4db16faae560cb39b9e078b4c74577e25a91b42c74cd1e51dd7352721615734df50ca5
data/UPGRADE.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 2.4.1
2
+
3
+ * revise reference_url http prepend
4
+
5
+
1
6
  # 2.4.0
2
7
 
3
8
  * Dataset#reference_url should prepend of http:// when missing
data/examples/create.rb CHANGED
@@ -13,6 +13,6 @@ include Quandl::Client
13
13
 
14
14
  # configure quandl client
15
15
  Quandl::Client.use ENV['QUANDL_API_HOST']
16
- Quandl::Client.token = ENV['QUANDL_USER_TOKEN']
16
+ Quandl::Client.token = ENV['QUANDL_TEST_TOKEN']
17
17
 
18
18
  binding.pry
data/examples/login.rb CHANGED
@@ -6,7 +6,7 @@ require "quandl/client"
6
6
  include Quandl::Client
7
7
 
8
8
  Quandl::Client.use ENV['QUANDL_API_HOST']
9
- Quandl::Client.token = ENV['QUANDL_USER_TOKEN']
9
+ Quandl::Client.token = ENV['QUANDL_TEST_TOKEN']
10
10
 
11
11
  u = User.login( login: 'blakehil', password: 'example' )
12
12
 
data/examples/search.rb CHANGED
@@ -7,7 +7,7 @@ include Quandl::Client
7
7
 
8
8
  Quandl::Client.use ENV['QUANDL_API_HOST']
9
9
  # Quandl::Client.use 'http://staging.quandl.com/api/'
10
- Quandl::Client.token = ENV['QUANDL_USER_TOKEN']
10
+ Quandl::Client.token = ENV['QUANDL_TEST_TOKEN']
11
11
 
12
12
  datasets = Dataset.query('water').all
13
13
 
data/examples/trims.rb CHANGED
@@ -6,7 +6,7 @@ require "quandl/client"
6
6
  include Quandl::Client
7
7
 
8
8
  Quandl::Client.use 'http://quandl.com/api/'
9
- Quandl::Client.token = ENV['QUANDL_USER_TOKEN']
9
+ Quandl::Client.token = ENV['QUANDL_TEST_TOKEN']
10
10
 
11
11
  # create dataset
12
12
  d = Dataset.find('NSE/OIL')
@@ -51,7 +51,7 @@ class Quandl::Client::Dataset < Quandl::Client::Base
51
51
  self.display_url
52
52
  end
53
53
  def reference_url=(value)
54
- value = "http://#{value}" if value.present? && !(value =~ /http:\/\//)
54
+ value = "http://#{value}" if value.present? && !(value =~ /:\/\//)
55
55
  self.display_url = value
56
56
  end
57
57
 
@@ -106,6 +106,8 @@ class Quandl::Client::Dataset < Quandl::Client::Base
106
106
  protected
107
107
 
108
108
  def save_dataset_data
109
+ return if !saved? && id.blank?
110
+
109
111
  dataset_data.id = id
110
112
  dataset_data.save
111
113
  # update dataset's attributes with dataset_data's attributes
@@ -1,6 +1,6 @@
1
1
  module Quandl
2
2
  module Client
3
- VERSION = '2.4.0'
3
+ VERSION = '2.4.1'
4
4
  API_VERSION = 'v2'
5
5
 
6
6
  class << self
@@ -94,7 +94,7 @@ describe Dataset do
94
94
  it "should not delete the dataset with a user token" do
95
95
  id = dataset.id
96
96
  # behave as a user
97
- Quandl::Client.token = ENV['QUANDL_USER_TOKEN']
97
+ Quandl::Client.token = ENV['QUANDL_TEST_TOKEN']
98
98
  user_dataset = Dataset.find(id)
99
99
  user_dataset.destroy
100
100
  user_dataset.status.should eq 403
@@ -7,7 +7,7 @@ describe Dataset do
7
7
  subject{ dataset }
8
8
 
9
9
  context "admin user" do
10
-
10
+
11
11
  its(:saved?){ should be_true }
12
12
  its(:source_code){ should be_present }
13
13
 
@@ -24,7 +24,7 @@ describe Dataset do
24
24
 
25
25
  context "normal user" do
26
26
  # behave as a user
27
- before(:all){ Quandl::Client.token = ENV['QUANDL_USER_TOKEN'] }
27
+ before(:all){ Quandl::Client.token = ENV['QUANDL_TEST_TOKEN'] }
28
28
 
29
29
  its(:saved?){ should be_true }
30
30
  its(:source_code){ should be_present }
@@ -10,6 +10,7 @@ describe Source do
10
10
  before(:all){ Quandl::Client.token = '' }
11
11
 
12
12
  subject{ source }
13
+
13
14
  its(:valid?){ should be_true }
14
15
 
15
16
  describe "#save" do
data/spec/spec_helper.rb CHANGED
@@ -16,14 +16,11 @@ require "quandl/fabricate"
16
16
  # ENV['QUANDL_AUTH_TOKEN']
17
17
 
18
18
  # user:
19
- # ENV['QUANDL_USER_TOKEN']
19
+ # ENV['QUANDL_TEST_TOKEN']
20
20
 
21
21
  include Quandl::Client
22
22
  Quandl::Client.token = ENV['QUANDL_AUTH_TOKEN']
23
- Quandl::Client.use ENV['QUANDL_API_HOST']
24
- # Quandl::Client.use 'http://staging.quandl.com/api/'
25
- # Quandl::Client.use 'http://67.202.27.116:8080/api/'
26
- # Quandl::Client.use 'http://quandl.com/api/'
23
+ Quandl::Client.use ENV['QUANDL_TEST_URL']
27
24
 
28
25
  RSpec.configure do |config|
29
26
  config.include FactoryGirl::Syntax::Methods
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.0
4
+ version: 2.4.1
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-01-21 00:00:00.000000000 Z
11
+ date: 2014-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake