td 0.9.7 → 0.9.8

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.
data/ChangeLog CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ == 2011-10-03 version 0.9.8
3
+
4
+ * Added table:tail subcommand
5
+
6
+
2
7
  == 2011-09-30 version 0.9.7
3
8
 
4
9
  * Use local time zone at job:list and sched:history subcommands
@@ -191,7 +191,7 @@ module List
191
191
  add_list 'table:create', %w[db table], 'Create a table'
192
192
  add_list 'table:delete', %w[db table], 'Delete a table'
193
193
  add_list 'table:import', %w[db table files_], 'Parse and import files to a table'
194
- #add_list 'table:tail', %w[db table], 'Get recently imported logs'
194
+ add_list 'table:tail', %w[db table], 'Get recently imported logs'
195
195
 
196
196
  add_list 'schema:show', %w[db table], 'Show schema of a table'
197
197
  add_list 'schema:set', %w[db table columns_?], 'Set new schema on a table'
@@ -102,18 +102,14 @@ module Command
102
102
  end
103
103
 
104
104
  def table_tail(op)
105
- from = nil
106
105
  to = nil
107
- num = 80
106
+ count = 80
108
107
 
109
- op.on('-f', '--from TIME', 'start time of logs to get') {|s|
110
- from = Time.parse(s).to_i
111
- }
112
108
  op.on('-t', '--to TIME', 'end time of logs to get') {|s|
113
109
  to = Time.parse(s).to_i
114
110
  }
115
- op.on('-n', '--num N', 'number of logs to get', Integer) {|i|
116
- num = i
111
+ op.on('-n', '--count N', 'number of logs to get', Integer) {|i|
112
+ count = i
117
113
  }
118
114
 
119
115
  db_name, table_name = op.cmd_parse
@@ -122,7 +118,7 @@ module Command
122
118
 
123
119
  table = get_table(client, db_name, table_name)
124
120
 
125
- rows = table.tail(num, to, from)
121
+ rows = table.tail(count, to)
126
122
 
127
123
  require 'json'
128
124
  rows.each {|row|
data/lib/td/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module TreasureData
2
2
 
3
- VERSION = '0.9.7'
3
+ VERSION = '0.9.8'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: td
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 43
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 7
10
- version: 0.9.7
9
+ - 8
10
+ version: 0.9.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sadayuki Furuhashi
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-30 00:00:00 +09:00
18
+ date: 2011-10-03 00:00:00 +09:00
19
19
  default_executable: td
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -74,12 +74,12 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- hash: 59
77
+ hash: 57
78
78
  segments:
79
79
  - 0
80
80
  - 8
81
- - 2
82
- version: 0.8.2
81
+ - 3
82
+ version: 0.8.3
83
83
  type: :runtime
84
84
  version_requirements: *id004
85
85
  - !ruby/object:Gem::Dependency