quandl_client 2.7.3 → 2.7.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -6
- data/.rspec +1 -1
- data/.travis.yml +20 -20
- data/.yardopts +2 -2
- data/Gemfile +12 -12
- data/Guardfile +8 -8
- data/LICENSE +7 -7
- data/README.md +303 -303
- data/Rakefile +35 -35
- data/UPGRADE.md +210 -207
- data/VERSION +1 -1
- data/examples/create.rb +32 -32
- data/examples/find.rb +17 -17
- data/examples/login.rb +12 -12
- data/examples/search.rb +12 -12
- data/examples/trims.rb +15 -15
- data/lib/quandl/client.rb +49 -49
- data/lib/quandl/client/base.rb +91 -91
- data/lib/quandl/client/base/attributes.rb +15 -15
- data/lib/quandl/client/base/model.rb +40 -40
- data/lib/quandl/client/base/search.rb +74 -74
- data/lib/quandl/client/base/validation.rb +101 -101
- data/lib/quandl/client/middleware.rb +9 -9
- data/lib/quandl/client/middleware/parse_json.rb +85 -85
- data/lib/quandl/client/models/dataset.rb +245 -245
- data/lib/quandl/client/models/dataset/data.rb +57 -57
- data/lib/quandl/client/models/location.rb +10 -10
- data/lib/quandl/client/models/report.rb +14 -14
- data/lib/quandl/client/models/scraper.rb +16 -16
- data/lib/quandl/client/models/sheet.rb +50 -50
- data/lib/quandl/client/models/source.rb +40 -40
- data/lib/quandl/client/models/superset.rb +59 -59
- data/lib/quandl/client/models/user.rb +7 -7
- data/lib/quandl/client/version.rb +14 -14
- data/lib/quandl/her/remove_method_data.rb +8 -8
- data/lib/quandl/pattern.rb +37 -37
- data/lib/quandl/pattern/client.rb +8 -8
- data/quandl_client.gemspec +33 -33
- data/spec/factories/dataset.rb +10 -10
- data/spec/factories/sheet.rb +7 -7
- data/spec/factories/source.rb +9 -9
- data/spec/fixtures/scraper.rb +5 -5
- data/spec/lib/quandl/client/dataset/attributes_spec.rb +63 -63
- data/spec/lib/quandl/client/dataset/data_spec.rb +92 -92
- data/spec/lib/quandl/client/dataset/location_spec.rb +65 -65
- data/spec/lib/quandl/client/dataset/persistence_spec.rb +104 -104
- data/spec/lib/quandl/client/dataset/search_spec.rb +19 -19
- data/spec/lib/quandl/client/dataset/source_spec.rb +47 -47
- data/spec/lib/quandl/client/dataset/trim_spec.rb +35 -35
- data/spec/lib/quandl/client/dataset/validation_spec.rb +68 -68
- data/spec/lib/quandl/client/dataset_spec.rb +57 -57
- data/spec/lib/quandl/client/scraper_spec.rb +71 -71
- data/spec/lib/quandl/client/sheet_spec.rb +37 -37
- data/spec/lib/quandl/client/source_spec.rb +51 -51
- data/spec/spec_helper.rb +30 -30
- metadata +5 -27
data/Rakefile
CHANGED
@@ -1,35 +1,35 @@
|
|
1
|
-
require "bundler"
|
2
|
-
require "rake"
|
3
|
-
require "bundler/gem_tasks"
|
4
|
-
require "rspec/core/rake_task"
|
5
|
-
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
6
|
-
|
7
|
-
require 'pry'
|
8
|
-
require "quandl/client"
|
9
|
-
|
10
|
-
include Quandl::Client
|
11
|
-
|
12
|
-
config = OpenStruct.new(YAML.load(File.read("#{ENV['HOME']}/.quandl/config")))
|
13
|
-
|
14
|
-
Quandl::Client.use config.quandl_url
|
15
|
-
Quandl::Client.token = config.token
|
16
|
-
|
17
|
-
task :default => :spec
|
18
|
-
|
19
|
-
desc "Run all specs"
|
20
|
-
RSpec::Core::RakeTask.new(:spec) do |task|
|
21
|
-
task.pattern = "spec/**/*_spec.rb"
|
22
|
-
end
|
23
|
-
|
24
|
-
task :console do |t, args|
|
25
|
-
binding.pry
|
26
|
-
end
|
27
|
-
|
28
|
-
require 'quandl/utility/rake_tasks'
|
29
|
-
Quandl::Utility::Tasks.configure do |c|
|
30
|
-
c.name = 'quandl'
|
31
|
-
c.tag_prefix = 'v'
|
32
|
-
c.version_path = 'VERSION'
|
33
|
-
c.changelog_path = 'UPGRADE.md'
|
34
|
-
c.changelog_matching = ['^QUGC','^WIKI']
|
35
|
-
end
|
1
|
+
require "bundler"
|
2
|
+
require "rake"
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rspec/core/rake_task"
|
5
|
+
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
6
|
+
|
7
|
+
require 'pry'
|
8
|
+
require "quandl/client"
|
9
|
+
|
10
|
+
include Quandl::Client
|
11
|
+
|
12
|
+
config = OpenStruct.new(YAML.load(File.read("#{ENV['HOME']}/.quandl/config")))
|
13
|
+
|
14
|
+
Quandl::Client.use config.quandl_url
|
15
|
+
Quandl::Client.token = config.token
|
16
|
+
|
17
|
+
task :default => :spec
|
18
|
+
|
19
|
+
desc "Run all specs"
|
20
|
+
RSpec::Core::RakeTask.new(:spec) do |task|
|
21
|
+
task.pattern = "spec/**/*_spec.rb"
|
22
|
+
end
|
23
|
+
|
24
|
+
task :console do |t, args|
|
25
|
+
binding.pry
|
26
|
+
end
|
27
|
+
|
28
|
+
require 'quandl/utility/rake_tasks'
|
29
|
+
Quandl::Utility::Tasks.configure do |c|
|
30
|
+
c.name = 'quandl'
|
31
|
+
c.tag_prefix = 'v'
|
32
|
+
c.version_path = 'VERSION'
|
33
|
+
c.changelog_path = 'UPGRADE.md'
|
34
|
+
c.changelog_matching = ['^QUGC','^WIKI']
|
35
|
+
end
|
data/UPGRADE.md
CHANGED
@@ -1,208 +1,211 @@
|
|
1
|
-
## 2.7.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
*
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
*
|
137
|
-
* add
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
1
|
+
## 2.7.4
|
2
|
+
full url bug fixed when "api" has no / at the end
|
3
|
+
|
4
|
+
## 2.7.3
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
## 2.7.2
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## 2.7.1
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
## 2.7.0
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
## 2.7.0
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
## 2.6.2
|
35
|
+
|
36
|
+
* QUGC-55 Add Report for filing reports
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
## 2.6.1
|
41
|
+
|
42
|
+
* QUGC-113 fix Dataset#data errors dont propagate to parent object
|
43
|
+
* QUGC-113 Write failing specs for Dataset#data errors dont propagate to parent object
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
## 2.6.0
|
48
|
+
|
49
|
+
* QUGC-104 Fixes when upload fails output is not json
|
50
|
+
* QUGC-103 Fixes quandl upload test -F json does not include metadata
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
## 2.5.2
|
55
|
+
|
56
|
+
* WIKI-153 Add scrapers
|
57
|
+
|
58
|
+
|
59
|
+
## 2.5.1
|
60
|
+
|
61
|
+
* QUGC-57 move data validation from Quandl::Format into Quandl::Client. Data validations only run on #valid?
|
62
|
+
* QUGC-53 numeric codes require the full code
|
63
|
+
|
64
|
+
|
65
|
+
## 2.5.0
|
66
|
+
|
67
|
+
* remove yajl
|
68
|
+
|
69
|
+
|
70
|
+
## 2.4.9
|
71
|
+
|
72
|
+
* observe ruby platform
|
73
|
+
|
74
|
+
|
75
|
+
## 2.4.7
|
76
|
+
|
77
|
+
* add middleware to track the origin of requests across quandl packages
|
78
|
+
|
79
|
+
|
80
|
+
## 2.4.6
|
81
|
+
|
82
|
+
* QUGC-43 improved message on wrong number of colums
|
83
|
+
* QUGC-41 enforce code formatting. always upcase codes
|
84
|
+
* improved example of valid code
|
85
|
+
* revise code pattern
|
86
|
+
|
87
|
+
|
88
|
+
## 2.4.5
|
89
|
+
|
90
|
+
* QUGC-40 add validation to enforce: You may not change number of columns in a dataset
|
91
|
+
* QUGC-37 Dataest.find accept backslash or forward slash interchangeably
|
92
|
+
|
93
|
+
|
94
|
+
## 2.4.4
|
95
|
+
|
96
|
+
* Dataset#data to_table assigns column_names to headers
|
97
|
+
* add skip_browse to Sheet
|
98
|
+
|
99
|
+
|
100
|
+
## 2.4.3
|
101
|
+
|
102
|
+
* hotfix for full_code pattern matching ... code can be as short as two characters
|
103
|
+
|
104
|
+
|
105
|
+
## 2.4.2
|
106
|
+
|
107
|
+
* Dataset.find will return nil unless the id is an integer, or matches the quandl pattern for full_code
|
108
|
+
|
109
|
+
|
110
|
+
## 2.4.1
|
111
|
+
|
112
|
+
* revise reference_url http prepend
|
113
|
+
|
114
|
+
|
115
|
+
## 2.4.0
|
116
|
+
|
117
|
+
* Dataset#reference_url should prepend of http:// when missing
|
118
|
+
* add Quandl::Pattern for defining regex patterns with embedded examples
|
119
|
+
|
120
|
+
|
121
|
+
# 2.3.2
|
122
|
+
|
123
|
+
* add #elapsed_request_time_ms
|
124
|
+
* refactor save_time to request_time. Add specs to #destroy for request_started_at, finished_at, elapsed_request_time
|
125
|
+
* add Client::Base#save_started_at, #save_finished_at, #elapsed_save_time. before_save :touch_save_started_at, after_save :touch_save_finished_at
|
126
|
+
|
127
|
+
|
128
|
+
## 2.3.1
|
129
|
+
|
130
|
+
* bump quandl_data
|
131
|
+
* add human_error_messsages
|
132
|
+
|
133
|
+
|
134
|
+
## 2.3.0
|
135
|
+
|
136
|
+
* add auth_token attribute to user
|
137
|
+
* add Quandl::Client::User, .login for authenticating
|
138
|
+
* full_url outputs the quandl link instead of the api link. Add human_status and HTTP_STATUS_CODES
|
139
|
+
* should validate display_url as a url
|
140
|
+
* add reference_url alias for display_url. reference_url will automatically add http when missing
|
141
|
+
|
142
|
+
|
143
|
+
## 2.2.1
|
144
|
+
|
145
|
+
* full_code: dont assume that source_code is present
|
146
|
+
* Dataset#data scope is cached to permit building across multiple lines. add Dataset#reload to wipe data_scope, dataset_data
|
147
|
+
|
148
|
+
|
149
|
+
## 2.2.0
|
150
|
+
|
151
|
+
* add specs for Dataset.query
|
152
|
+
* Dataset.query.all.metadata should pass
|
153
|
+
|
154
|
+
|
155
|
+
## 2.1.4
|
156
|
+
|
157
|
+
* add specs for Dataset.query(term).all; make specs pass
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
## 2.1.3
|
162
|
+
|
163
|
+
* add specs for data scopes
|
164
|
+
* fix failing data scope specs
|
165
|
+
|
166
|
+
|
167
|
+
## 2.1.2
|
168
|
+
|
169
|
+
* bump quandl_data, operation, logger
|
170
|
+
|
171
|
+
|
172
|
+
## 2.0.1
|
173
|
+
|
174
|
+
* fully qualified classes to avoid collisions
|
175
|
+
|
176
|
+
## 2.0.0
|
177
|
+
|
178
|
+
* update client to take advantage of new /api/v2 routes
|
179
|
+
|
180
|
+
## 0.1.17
|
181
|
+
|
182
|
+
* Dataset#source_code is optional
|
183
|
+
|
184
|
+
|
185
|
+
## 0.1.16
|
186
|
+
|
187
|
+
* add sheet description
|
188
|
+
|
189
|
+
## 0.1.15
|
190
|
+
|
191
|
+
* revise parse_json to respond with more informative error
|
192
|
+
* validation errors should return 422
|
193
|
+
|
194
|
+
## 0.1.14
|
195
|
+
|
196
|
+
* add Dataset#locations spec to test that location data is returned in the same order as it is sent.
|
197
|
+
|
198
|
+
## 0.1.12
|
199
|
+
|
200
|
+
* fix undefined error method
|
201
|
+
|
202
|
+
## 0.1.11
|
203
|
+
|
204
|
+
* add spec for Dataset#availability_delay
|
205
|
+
* add present?, exists?, blank? that check against response status.
|
206
|
+
* remove erroneous source_code and code validations.
|
207
|
+
|
208
|
+
|
209
|
+
## 0.1.10
|
210
|
+
|
208
211
|
* Add Dataset#availability_delay
|