quandl_client 2.2.0 → 2.2.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: 30cfb6f556fd81ee4c6f6b0ed1ba51404e924c10
4
- data.tar.gz: 9728c368e51fcb51fcb4cafb7774d73d9e873260
3
+ metadata.gz: 2770339f1ebb07e01be99bbbfa1e31f80822d2d7
4
+ data.tar.gz: 715ed180a8445d6f09e90835ca800a53fb58a98e
5
5
  SHA512:
6
- metadata.gz: 5afdf7eaa1d4a948fd2821fc8551b8b3111b89eb8a3422555f8f7b077e39c42da40062e57caac23268354d787737812518bb4f3a6cf20a59e9b9347f0827939c
7
- data.tar.gz: 8c2b4941f33058a13cb0a7d9381ef1ececd39a12d15650b49dd26ac724202386e669bf9e1b6b0cf83f43e21d7b43cd76e4705f82cf27faeff0558c111b8940f8
6
+ metadata.gz: f6510d04692e330d009eabdae2e0f8b473989fb1375521d840c5b1f00a78489c5a44b998d86d3acf72699552476fe1ff957c87cdb693fd94333b9322b3bc3d03
7
+ data.tar.gz: 598f1df704d3241204ee013e53470d607c442a15075ff207a248bec3fec105635d4cdee9f621b6d06022b31465f90d1ea76c10c5568abccc73b69112572d0918
data/Guardfile ADDED
@@ -0,0 +1,8 @@
1
+ group :specs do
2
+ guard :rspec, cmd: 'bundle exec rspec --fail-fast -f doc --color' do
3
+ watch(%r{^spec/.+_spec\.rb$})
4
+ watch(%r{^(lib/.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
5
+ watch('spec/spec_helper.rb') { 'spec' }
6
+ end
7
+ end
8
+
data/UPGRADE.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 2.2.1
2
+
3
+ * full_code: dont assume that source_code is present
4
+ * Dataset#data scope is cached to permit building across multiple lines. add Dataset#reload to wipe data_scope, dataset_data
5
+
6
+
1
7
  ## 2.2.0
2
8
 
3
9
  * add specs for Dataset.query
@@ -49,14 +49,18 @@ class Quandl::Client::Dataset < Quandl::Client::Base
49
49
  alias_method :locations, :locations_attributes
50
50
  alias_method :locations=, :locations_attributes=
51
51
 
52
+ def full_url
53
+ File.join(Quandl::Client::Dataset.url, 'datasets', full_code)
54
+ end
55
+
52
56
  def full_code
53
- @full_code ||= File.join(self.source_code, self.code)
57
+ File.join(self.source_code.to_s, self.code.to_s)
54
58
  end
55
59
 
56
60
  # DATA
57
61
 
58
62
  def data
59
- dataset_data.data? ? dataset_data.data : Quandl::Client::Dataset::Data.with_id(id)
63
+ dataset_data.data? ? dataset_data.data : data_scope
60
64
  end
61
65
 
62
66
  def data=(value)
@@ -79,10 +83,20 @@ class Quandl::Client::Dataset < Quandl::Client::Base
79
83
  self.class.destroy_existing("#{id}/data/rows?#{query}").saved?
80
84
  end
81
85
 
86
+ def data_scope
87
+ @data_scope ||= Quandl::Client::Dataset::Data.with_id(id)
88
+ end
89
+
82
90
  def dataset_data
83
91
  @dataset_data ||= Quandl::Client::Dataset::Data.new( id: id )
84
92
  end
85
93
 
94
+ def reload
95
+ @dataset_data = nil
96
+ @data_scope = nil
97
+ @full_code = nil
98
+ end
99
+
86
100
  after_save :save_dataset_data
87
101
 
88
102
  protected
@@ -1,6 +1,6 @@
1
1
  module Quandl
2
2
  module Client
3
- VERSION = '2.2.0'
3
+ VERSION = '2.2.1'
4
4
  API_VERSION = 'v2'
5
5
 
6
6
  class << self
@@ -31,4 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.add_runtime_dependency "scope_composer", "~> 0.3"
32
32
  s.add_runtime_dependency "quandl_data", "~> 1.2"
33
33
 
34
- end
34
+
35
+ s.add_development_dependency "guard"
36
+ s.add_development_dependency "guard-rspec"
37
+ end
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.2.0
4
+ version: 2.2.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: 2013-11-28 00:00:00.000000000 Z
11
+ date: 2013-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -164,6 +164,34 @@ dependencies:
164
164
  - - ~>
165
165
  - !ruby/object:Gem::Version
166
166
  version: '1.2'
167
+ - !ruby/object:Gem::Dependency
168
+ name: guard
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - '>='
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: guard-rspec
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - '>='
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - '>='
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
167
195
  description: An orm for the cassinatra rest interface.
168
196
  email:
169
197
  - blake@hilscher.ca
@@ -176,6 +204,7 @@ files:
176
204
  - .travis.yml
177
205
  - .yardopts
178
206
  - Gemfile
207
+ - Guardfile
179
208
  - LICENSE
180
209
  - README.md
181
210
  - Rakefile