quandl_client 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/UPGRADE.md
CHANGED
@@ -38,7 +38,7 @@ class Sheet
|
|
38
38
|
# PROPERTIES #
|
39
39
|
##############
|
40
40
|
|
41
|
-
attributes :title, :content, :url_title, :full_url_title
|
41
|
+
attributes :title, :content, :url_title, :full_url_title, :description
|
42
42
|
|
43
43
|
def html
|
44
44
|
@html ||= self.attributes[:html] || Sheet.find(full_url_title).attributes[:html]
|
@@ -32,6 +32,18 @@ describe Dataset do
|
|
32
32
|
its(:status){ should eq 201 }
|
33
33
|
|
34
34
|
end
|
35
|
+
context "with data" do
|
36
|
+
|
37
|
+
before(:all){ Quandl::Client.token = ENV['QUANDL_AUTH_TOKEN'] }
|
38
|
+
|
39
|
+
let(:source){ create(:source) }
|
40
|
+
let(:dataset){ create(:dataset, source_code: source.code, data: Quandl::Data::Random.table(rows: 20, columns: 2, nils: false) ) }
|
41
|
+
subject{ dataset }
|
42
|
+
|
43
|
+
its(:saved?){ should be_true }
|
44
|
+
its(:status){ should eq 201 }
|
45
|
+
|
46
|
+
end
|
35
47
|
end
|
36
48
|
|
37
49
|
context "when updated" do
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Sheet do
|
5
|
+
|
6
|
+
before(:all){ Quandl::Client.token = ENV['QUANDL_AUTH_TOKEN'] }
|
7
|
+
|
8
|
+
let(:sheet){ build(:sheet) }
|
9
|
+
|
10
|
+
subject{ sheet }
|
11
|
+
|
12
|
+
its(:valid?){ should be_true }
|
13
|
+
|
14
|
+
context "when saved" do
|
15
|
+
|
16
|
+
before(:each){ subject.save }
|
17
|
+
its(:saved?){ should be_true }
|
18
|
+
|
19
|
+
describe "#description" do
|
20
|
+
|
21
|
+
its(:description){ should eq "Test sheet description." }
|
22
|
+
|
23
|
+
it "should find the description" do
|
24
|
+
Sheet.find( subject.id ).description.should eq "Test sheet description."
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should update the description" do
|
28
|
+
subject.description = "New description."
|
29
|
+
subject.save
|
30
|
+
Sheet.find( subject.id ).description.should eq "New description."
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quandl_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -251,12 +251,14 @@ files:
|
|
251
251
|
- lib/quandl/her/patch.rb
|
252
252
|
- quandl_client.gemspec
|
253
253
|
- spec/factories/dataset.rb
|
254
|
+
- spec/factories/sheet.rb
|
254
255
|
- spec/factories/source.rb
|
255
256
|
- spec/quandl/client/dataset/location_spec.rb
|
256
257
|
- spec/quandl/client/dataset/persistence_spec.rb
|
257
258
|
- spec/quandl/client/dataset/search_spec.rb
|
258
259
|
- spec/quandl/client/dataset/trim_spec.rb
|
259
260
|
- spec/quandl/client/dataset/validation_spec.rb
|
261
|
+
- spec/quandl/client/sheet_spec.rb
|
260
262
|
- spec/quandl/client/source_spec.rb
|
261
263
|
- spec/spec_helper.rb
|
262
264
|
homepage: http://blake.hilscher.ca/
|
@@ -286,11 +288,13 @@ specification_version: 3
|
|
286
288
|
summary: Client rest orm.
|
287
289
|
test_files:
|
288
290
|
- spec/factories/dataset.rb
|
291
|
+
- spec/factories/sheet.rb
|
289
292
|
- spec/factories/source.rb
|
290
293
|
- spec/quandl/client/dataset/location_spec.rb
|
291
294
|
- spec/quandl/client/dataset/persistence_spec.rb
|
292
295
|
- spec/quandl/client/dataset/search_spec.rb
|
293
296
|
- spec/quandl/client/dataset/trim_spec.rb
|
294
297
|
- spec/quandl/client/dataset/validation_spec.rb
|
298
|
+
- spec/quandl/client/sheet_spec.rb
|
295
299
|
- spec/quandl/client/source_spec.rb
|
296
300
|
- spec/spec_helper.rb
|