quandl_data 0.0.8 → 0.0.9

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.
@@ -52,6 +52,11 @@ module Operations
52
52
  self
53
53
  end
54
54
 
55
+ def limit(amount)
56
+ @data_array = data_array[0..( amount.to_i - 1 )] if amount.present?
57
+ self
58
+ end
59
+
55
60
  def sort_order(dir)
56
61
  dir == :asc ? sort_ascending! : sort_descending!
57
62
  end
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Data
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
data/quandl_data.gemspec CHANGED
@@ -22,5 +22,5 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency "fivemat", "~> 1.2"
23
23
 
24
24
  s.add_runtime_dependency "activesupport", ">= 3.0.0"
25
- s.add_runtime_dependency "quandl_operation", ">= 0.0.11"
25
+ s.add_runtime_dependency "quandl_operation", ">= 0.0.15"
26
26
  end
data/spec/quandl_data.rb CHANGED
@@ -25,4 +25,8 @@ describe Quandl::Data::Table do
25
25
  subject.to_date.first.first.should be_a Date
26
26
  end
27
27
 
28
+ it "should limit the data" do
29
+ subject.limit(2).count.should eq 2
30
+ end
31
+
28
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
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-07-10 00:00:00.000000000 Z
12
+ date: 2013-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - '>='
84
84
  - !ruby/object:Gem::Version
85
- version: 0.0.11
85
+ version: 0.0.15
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - '>='
92
92
  - !ruby/object:Gem::Version
93
- version: 0.0.11
93
+ version: 0.0.15
94
94
  description: Data will be interfaced
95
95
  email:
96
96
  - blake@hilscher.ca