quandl_cassinatra 0.1.10 → 0.1.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45ca43fd651a20aa4d3080d9c1014e6ed72aa856
4
- data.tar.gz: 73f0f991491d825d937f72dc00bcc85bed694a8f
3
+ metadata.gz: 321171d3425874e1162260fa7d05c1e596f3ee4a
4
+ data.tar.gz: 46359ab27a5299eaa1cf10bbb1c56a45b76f031b
5
5
  SHA512:
6
- metadata.gz: 01debd1e9b40f1d9663880e720ecd9d3f10377314fc46328eaf96064b039a7cc5b6a6a172b6201d5c059fd3ea6c04065497b293aa8fba5517d6b59dbe04a56c8
7
- data.tar.gz: d31b1ab614e56d96871d88f3ee96e364537cf55632ef1be67c5fa5e25fc580c7e19ef1e69e6050a985c048785eb39c0b6d5197d7b9d188dc5d0e5ca7e511dd70
6
+ metadata.gz: f8b2d1bcf69667cb2ac29cead3f0e15b52156518c7dfd22f60ec96a8354ec43a7c3f3f3065f4e14d0772d65638154e8e3b6b00a9868b099587a3be02d3a35c01
7
+ data.tar.gz: 67d46970e491418b852204319090e30308f8110b4c947737183b868f19bab286f307763f2945e584f6d325c4beee758588584e8fb197871c0c48a2d2bcdd4242
@@ -11,18 +11,8 @@ class Multiset
11
11
  search_helper :to_dataset, -> { dataset }
12
12
  search_helper :dataset, -> { find('multiset') }
13
13
 
14
- search_scope :columns, ->(v){ where( columns: format_columns(v) ) }
14
+ search_scope :columns, ->(v){ where( columns: v ) }
15
15
 
16
- search_helper :format_columns, ->(cols){
17
- cols.split(',').collect do |column|
18
- id_position = column.split('.')
19
- id = id_position.first.to_i
20
- position = id_position.last.to_i
21
- position = position - 1 if position > 0
22
- "#{id}.#{position}"
23
- end.join(',')
24
- }
25
-
26
16
  attributes :id, :column_ids, :data
27
17
 
28
18
  delegate :columns_count, :created_at, :frequency, :rows_count, :type, :updated_at, to: :dataset_attribute
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Cassinatra
3
- VERSION = '0.1.10'
3
+ VERSION = '0.1.11'
4
4
  end
5
5
  end
@@ -6,15 +6,15 @@ describe Multiset do
6
6
  let(:d2){ create(:dataset, data_table: Quandl::Data::Random.table( rows: 10, columns: 4, nils: false ) ) }
7
7
 
8
8
  it "should retrieve the requested columns" do
9
- m = Multiset.columns("#{d1.id.to_i}.0,#{d2.id.to_i}.0").to_dataset
9
+ m = Multiset.columns("#{d1.id.to_i}.1,#{d2.id.to_i}.1").to_dataset
10
10
  m.data_table[0][1].should eq d1.data_table[0][1]
11
11
  m.data_table[0][2].should eq d2.data_table[0][1]
12
12
  end
13
13
 
14
14
  it "should retrieve the requested columns" do
15
- m = Multiset.columns("#{d2.id.to_i}.1,#{d1.id.to_i}.1").to_dataset
16
- m.data_table[0][1].should eq d2.data_table[0][1]
17
- m.data_table[0][2].should eq d1.data_table[0][1]
15
+ m = Multiset.columns("#{d2.id.to_i}.2,#{d1.id.to_i}.2").to_dataset
16
+ m.data_table[0][1].should eq d2.data_table[0][2]
17
+ m.data_table[0][2].should eq d1.data_table[0][2]
18
18
  end
19
19
 
20
20
  it "should be in the right order" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl_cassinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher