quandl_data 0.0.12 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/quandl/data/version.rb +1 -1
- data/quandl_data.gemspec +3 -2
- data/spec/{quandl_data.rb → quandl/data_spec.rb} +21 -4
- data/spec/spec_helper.rb +1 -0
- metadata +29 -13
data/lib/quandl/data/version.rb
CHANGED
data/quandl_data.gemspec
CHANGED
@@ -5,7 +5,7 @@ require "quandl/data/version"
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "quandl_data"
|
7
7
|
s.version = Quandl::Data::VERSION
|
8
|
-
s.authors = ["
|
8
|
+
s.authors = ["Blake Hilscher"]
|
9
9
|
s.email = ["blake@hilscher.ca"]
|
10
10
|
s.homepage = "http://blake.hilscher.ca/"
|
11
11
|
s.license = "MIT"
|
@@ -20,7 +20,8 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_development_dependency "rake", "~> 10.0"
|
21
21
|
s.add_development_dependency "rspec", "~> 2.13"
|
22
22
|
s.add_development_dependency "fivemat", "~> 1.2"
|
23
|
+
s.add_development_dependency "pry"
|
23
24
|
|
24
25
|
s.add_runtime_dependency "activesupport", ">= 3.0.0"
|
25
|
-
s.add_runtime_dependency "quandl_operation", ">= 0.0
|
26
|
+
s.add_runtime_dependency "quandl_operation", ">= 0.1.0"
|
26
27
|
end
|
@@ -12,6 +12,23 @@ describe Quandl::Data::Table do
|
|
12
12
|
Quandl::Data::Table.new(subject.to_csv).count.should eq 4
|
13
13
|
end
|
14
14
|
|
15
|
+
it "should output csv that is consistent with subject" do
|
16
|
+
data = CSV.parse( subject.to_csv ).collect{|r| r.collect{|v| v.to_f } }
|
17
|
+
data.should eq subject
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should convert to julian dates" do
|
21
|
+
data = subject.to_jd
|
22
|
+
data[0][0].should be_a Integer
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should convert to dates" do
|
26
|
+
julian_data = subject.to_jd
|
27
|
+
julian_data.first.first.should be_a Integer
|
28
|
+
date_data = julian_data.to_date
|
29
|
+
date_data.first.first.should be_a Date
|
30
|
+
end
|
31
|
+
|
15
32
|
it "should transform the data" do
|
16
33
|
value = subject.first[1]
|
17
34
|
subject.transform(:rdiff).first[1].should_not eq value
|
@@ -21,12 +38,12 @@ describe Quandl::Data::Table do
|
|
21
38
|
subject.collapse(:monthly).count.should eq 1
|
22
39
|
end
|
23
40
|
|
24
|
-
it "should convert julian dates to dates" do
|
25
|
-
subject.to_date.first.first.should be_a Date
|
26
|
-
end
|
27
|
-
|
28
41
|
it "should limit the data" do
|
29
42
|
subject.limit(2).count.should eq 2
|
30
43
|
end
|
31
44
|
|
45
|
+
it "should convert julian dates to dates" do
|
46
|
+
subject.to_date.first.first.should be_a Date
|
47
|
+
end
|
48
|
+
|
32
49
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quandl_data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
-
|
8
|
+
- Blake Hilscher
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -59,12 +59,28 @@ dependencies:
|
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.2'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: pry
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
62
78
|
- !ruby/object:Gem::Dependency
|
63
79
|
name: activesupport
|
64
80
|
requirement: !ruby/object:Gem::Requirement
|
65
81
|
none: false
|
66
82
|
requirements:
|
67
|
-
- - '>='
|
83
|
+
- - ! '>='
|
68
84
|
- !ruby/object:Gem::Version
|
69
85
|
version: 3.0.0
|
70
86
|
type: :runtime
|
@@ -72,7 +88,7 @@ dependencies:
|
|
72
88
|
version_requirements: !ruby/object:Gem::Requirement
|
73
89
|
none: false
|
74
90
|
requirements:
|
75
|
-
- - '>='
|
91
|
+
- - ! '>='
|
76
92
|
- !ruby/object:Gem::Version
|
77
93
|
version: 3.0.0
|
78
94
|
- !ruby/object:Gem::Dependency
|
@@ -80,17 +96,17 @@ dependencies:
|
|
80
96
|
requirement: !ruby/object:Gem::Requirement
|
81
97
|
none: false
|
82
98
|
requirements:
|
83
|
-
- - '>='
|
99
|
+
- - ! '>='
|
84
100
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0.0
|
101
|
+
version: 0.1.0
|
86
102
|
type: :runtime
|
87
103
|
prerelease: false
|
88
104
|
version_requirements: !ruby/object:Gem::Requirement
|
89
105
|
none: false
|
90
106
|
requirements:
|
91
|
-
- - '>='
|
107
|
+
- - ! '>='
|
92
108
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0.0
|
109
|
+
version: 0.1.0
|
94
110
|
description: Data will be interfaced
|
95
111
|
email:
|
96
112
|
- blake@hilscher.ca
|
@@ -114,7 +130,7 @@ files:
|
|
114
130
|
- lib/quandl/data/table/operations.rb
|
115
131
|
- lib/quandl/data/version.rb
|
116
132
|
- quandl_data.gemspec
|
117
|
-
- spec/
|
133
|
+
- spec/quandl/data_spec.rb
|
118
134
|
- spec/spec_helper.rb
|
119
135
|
homepage: http://blake.hilscher.ca/
|
120
136
|
licenses:
|
@@ -126,13 +142,13 @@ require_paths:
|
|
126
142
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
143
|
none: false
|
128
144
|
requirements:
|
129
|
-
- - '>='
|
145
|
+
- - ! '>='
|
130
146
|
- !ruby/object:Gem::Version
|
131
147
|
version: '0'
|
132
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
149
|
none: false
|
134
150
|
requirements:
|
135
|
-
- - '>='
|
151
|
+
- - ! '>='
|
136
152
|
- !ruby/object:Gem::Version
|
137
153
|
version: '0'
|
138
154
|
requirements: []
|
@@ -142,5 +158,5 @@ signing_key:
|
|
142
158
|
specification_version: 3
|
143
159
|
summary: For interfacing with data
|
144
160
|
test_files:
|
145
|
-
- spec/
|
161
|
+
- spec/quandl/data_spec.rb
|
146
162
|
- spec/spec_helper.rb
|