quandl_cassinatra 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/UPGRADE.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.2.2
2
+
3
+ * delete uses destroy_existing
4
+
5
+
1
6
  ## 0.2.1
2
7
 
3
8
  * add Dataset#delete_rows(*dates)
@@ -9,7 +9,7 @@ class Dataset
9
9
  include Concerns::Properties
10
10
  include Searchable
11
11
 
12
- attributes :id, :column_ids, :data, :trim_start, :trim_end, :columns
12
+ attributes :id, :data, :trim_start, :trim_end, :columns
13
13
 
14
14
  delegate :columns_count, :created_at, :frequency, :rows_count, :type, :updated_at, to: :dataset_attribute
15
15
 
@@ -21,6 +21,10 @@ class Dataset
21
21
  @column_names ||= columns.collect{|c| c['name'] }
22
22
  end
23
23
 
24
+ def column_ids
25
+ @column_ids ||= columns.collect{|c| c['id'] }
26
+ end
27
+
24
28
  def data_table
25
29
  @data_table ||= Data::Table.new( self.data || [] )
26
30
  end
@@ -38,12 +42,12 @@ class Dataset
38
42
  end
39
43
 
40
44
  def delete_data
41
- Dataset.delete("/datasets/#{id.to_i}/data").status
45
+ Dataset.destroy_existing("#{id.to_i}/data").status
42
46
  end
43
47
 
44
48
  def delete_rows(*dates)
45
49
  query = { dates: Array(dates).flatten }.to_query
46
- Dataset.delete("/datasets/#{id.to_i}/data/rows?#{query}").status
50
+ Dataset.destroy_existing("#{id.to_i}/data/rows?#{query}").status
47
51
  end
48
52
 
49
53
  end
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Cassinatra
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -13,6 +13,6 @@ end
13
13
 
14
14
  require "quandl/fabricate"
15
15
  require "quandl/cassinatra"
16
- # Quandl::Cassinatra.use 'http://192.168.33.10:8983/wikiposit_cassandra/'
17
- Quandl::Cassinatra.use 'http://localhost:9292/'
16
+ Quandl::Cassinatra.use 'http://192.168.33.10:8983/wikiposit_cassandra/'
17
+ # Quandl::Cassinatra.use 'http://localhost:9292/'
18
18
  include Quandl::Cassinatra
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.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: