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