td-client 0.8.51 → 0.8.52

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,4 +1,9 @@
1
- == 2012-05-27 version 0.8.51
1
+ == 2012-06-24 version 0.8.52
2
+
3
+ * Add last_log_timestamp to Table model
4
+
5
+
6
+ == 2012-06-17 version 0.8.51
2
7
 
3
8
  * Relax dependent gem versions
4
9
 
data/lib/td/client.rb CHANGED
@@ -99,9 +99,10 @@ class Client
99
99
  # => [Table]
100
100
  def tables(db_name)
101
101
  m = @api.list_tables(db_name)
102
- m.map {|table_name,(type,schema,count,created_at,updated_at,estimated_storage_size, last_import)|
102
+ m.map {|table_name,(type,schema,count,created_at,updated_at,estimated_storage_size, last_import, last_log_timestamp)|
103
103
  schema = Schema.new.from_json(schema)
104
- Table.new(self, db_name, table_name, type, schema, count, created_at, updated_at, estimated_storage_size, last_import)
104
+ Table.new(self, db_name, table_name, type, schema, count, created_at, updated_at,
105
+ estimated_storage_size, last_import, last_log_timestamp)
105
106
  }
106
107
  end
107
108
 
data/lib/td/client/api.rb CHANGED
@@ -251,9 +251,10 @@ class API
251
251
  created_at = m['created_at']
252
252
  updated_at = m['updated_at']
253
253
  last_import = m['counter_updated_at']
254
+ last_log_timestamp = m['last_log_timestamp']
254
255
  estimated_storage_size = m['estimated_storage_size'].to_i
255
256
  schema = JSON.parse(m['schema'] || '[]')
256
- result[name] = [type, schema, count, created_at, updated_at, estimated_storage_size, last_import]
257
+ result[name] = [type, schema, count, created_at, updated_at, estimated_storage_size, last_import, last_log_timestamp]
257
258
  }
258
259
  return result
259
260
  end
@@ -98,7 +98,7 @@ class Database < Model
98
98
  end
99
99
 
100
100
  class Table < Model
101
- def initialize(client, db_name, table_name, type, schema, count, created_at=nil, updated_at=nil, estimated_storage_size=nil, last_import=nil)
101
+ def initialize(client, db_name, table_name, type, schema, count, created_at=nil, updated_at=nil, estimated_storage_size=nil, last_import=nil, last_log_timestamp=nil)
102
102
  super(client)
103
103
  @db_name = db_name
104
104
  @table_name = table_name
@@ -109,6 +109,7 @@ class Table < Model
109
109
  @updated_at = updated_at
110
110
  @estimated_storage_size = estimated_storage_size
111
111
  @last_import = last_import
112
+ @last_log_timestamp = last_log_timestamp
112
113
  end
113
114
 
114
115
  attr_reader :type, :db_name, :table_name, :schema, :count, :estimated_storage_size
@@ -128,6 +129,10 @@ class Table < Model
128
129
  @last_import && !@last_import.empty? ? Time.parse(@last_import) : nil
129
130
  end
130
131
 
132
+ def last_log_timestamp
133
+ @last_log_timestamp && !@last_log_timestamp.empty? ? Time.parse(@last_log_timestamp) : nil
134
+ end
135
+
131
136
  def database
132
137
  @client.database(@db_name)
133
138
  end
@@ -1,5 +1,5 @@
1
1
  module TreasureData
2
2
  class Client
3
- VERSION = '0.8.51'
3
+ VERSION = '0.8.52'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: td-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.51
4
+ version: 0.8.52
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-06-17 00:00:00.000000000 Z
12
+ date: 2013-06-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack