td 0.17.0 → 0.18.0
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 +4 -4
- data/ChangeLog +9 -0
- data/SECURITY.md +7 -0
- data/lib/td/command/account.rb +7 -3
- data/lib/td/command/user.rb +1 -1
- data/lib/td/version.rb +1 -1
- data/spec/td/command/account_spec.rb +79 -0
- data/spec/td/command/workflow_spec.rb +1 -1
- data/td.gemspec +1 -1
- metadata +11 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1dbc916f042b6416a0e1938f7d1b352d2bad5f3cb44be4d3f9e9d576f51f96b
|
4
|
+
data.tar.gz: faa0d9b3281e368d0999714aa7e58a9f517da3071dab4d5c357fb0e8f3a97ad5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61584b44bf0e10309f3117af78b547158340735515745f06d4647cbf9c67aac513c2e26bcfc3f5f86dbb0c878257852f80bbc014e2fc2d1eeb4baca4f7c41c77
|
7
|
+
data.tar.gz: 527a8c17ca6e253dc0d5e3ead71a7aab077af320aa6d940af4ec0b89ed29ecec7222c59c66abd4ba0629dbb4301658d274ca115b070641662c4db4167424f539
|
data/ChangeLog
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
== 2025-04-29 version 0.18.0
|
2
|
+
|
3
|
+
* Update password symbol for user creation #262
|
4
|
+
* Add support for td-client-ruby 2.x.x #267
|
5
|
+
|
6
|
+
== 2023-03-18 version 0.17.1
|
7
|
+
|
8
|
+
* Fix account command error on windows (for Ruby 3) #262
|
9
|
+
|
1
10
|
== 2023-03-28 version 0.17.0
|
2
11
|
|
3
12
|
* Show job's start & end time for td job:show [job_id] #253
|
data/SECURITY.md
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Reporting a Vulnerability
|
4
|
+
|
5
|
+
Treasure Data values the security of its customers and is committed to ensuring that the systems and products are secure. We invite all bug bounty researchers to join our efforts in identifying and reporting vulnerabilities in our systems.
|
6
|
+
|
7
|
+
Submit your findings to our dedicated bug bounty email address [vulnerabilities@treasuredata.com](mailto:vulnerabilities@treasuredata.com) and help us keep Treasure Data secure. Let’s work together to make the Internet a safer place!
|
data/lib/td/command/account.rb
CHANGED
@@ -113,12 +113,16 @@ module Command
|
|
113
113
|
|
114
114
|
private
|
115
115
|
if Helpers.on_windows?
|
116
|
-
require '
|
116
|
+
require 'fiddle'
|
117
117
|
|
118
118
|
def get_char
|
119
|
-
|
119
|
+
msvcrt = Fiddle.dlopen('msvcrt')
|
120
|
+
getch = Fiddle::Function.new(msvcrt['_getch'], [], Fiddle::TYPE_CHAR)
|
121
|
+
getch.call()
|
120
122
|
rescue Exception
|
121
|
-
|
123
|
+
crtdll = Fiddle.dlopen('crtdll')
|
124
|
+
getch = Fiddle::Function.new(crtdll['_getch'], [], Fiddle::TYPE_CHAR)
|
125
|
+
getch.call()
|
122
126
|
end
|
123
127
|
|
124
128
|
def get_password
|
data/lib/td/command/user.rb
CHANGED
data/lib/td/version.rb
CHANGED
@@ -0,0 +1,79 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require "tempfile"
|
5
|
+
require 'td/command/common'
|
6
|
+
require 'td/command/account'
|
7
|
+
require 'td/command/list'
|
8
|
+
require 'td/helpers'
|
9
|
+
|
10
|
+
module TreasureData::Command
|
11
|
+
describe 'account command' do
|
12
|
+
let :command do
|
13
|
+
Class.new { include TreasureData::Command }.new
|
14
|
+
end
|
15
|
+
let(:client) { double(:client) }
|
16
|
+
let(:conf_file) { Tempfile.new("td.conf").tap {|s| s.close } }
|
17
|
+
let(:conf_expect) {
|
18
|
+
"""[account]
|
19
|
+
user = test@email.com
|
20
|
+
apikey = 1/xxx
|
21
|
+
"""
|
22
|
+
}
|
23
|
+
|
24
|
+
before do
|
25
|
+
TreasureData::Config.path = conf_file.path
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'is called without any option' do
|
29
|
+
expect(STDIN).to receive(:gets).and_return('test@email.com')
|
30
|
+
if TreasureData::Helpers.on_windows?
|
31
|
+
'password'.chars.each { |c| expect(command).to receive(:get_char).and_return(c) }
|
32
|
+
expect(command).to receive(:get_char).and_return(nil)
|
33
|
+
else
|
34
|
+
expect(STDIN).to receive(:gets).and_return('password')
|
35
|
+
end
|
36
|
+
expect(TreasureData::Client).to receive(:authenticate).and_return(client)
|
37
|
+
expect(client).to receive(:apikey).and_return("1/xxx")
|
38
|
+
|
39
|
+
op = List::CommandParser.new("account", %w[], %w[], false, [], true)
|
40
|
+
command.account(op)
|
41
|
+
|
42
|
+
expect(File.read(conf_file.path)).to eq(conf_expect)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'is called with -f option' do
|
46
|
+
if TreasureData::Helpers.on_windows?
|
47
|
+
'password'.chars.each { |c| expect(command).to receive(:get_char).and_return(c) }
|
48
|
+
expect(command).to receive(:get_char).and_return(nil)
|
49
|
+
else
|
50
|
+
expect(STDIN).to receive(:gets).and_return('password')
|
51
|
+
end
|
52
|
+
expect(TreasureData::Client).to receive(:authenticate).and_return(client)
|
53
|
+
expect(client).to receive(:apikey).and_return("1/xxx")
|
54
|
+
|
55
|
+
op = List::CommandParser.new("account", %w[-f], %w[], false, ['test@email.com'], true)
|
56
|
+
command.account(op)
|
57
|
+
|
58
|
+
expect(File.read(conf_file.path)).to eq(conf_expect)
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'is called with username password mismatched' do
|
62
|
+
if TreasureData::Helpers.on_windows?
|
63
|
+
3.times do
|
64
|
+
'password'.chars.each { |c| expect(command).to receive(:get_char).and_return(c) }
|
65
|
+
expect(command).to receive(:get_char).and_return(nil)
|
66
|
+
end
|
67
|
+
else
|
68
|
+
expect(STDIN).to receive(:gets).and_return('password').thrice
|
69
|
+
end
|
70
|
+
expect(TreasureData::Client).to receive(:authenticate).thrice.and_raise(TreasureData::AuthError)
|
71
|
+
expect(STDERR).to receive(:puts).with('User name or password mismatched.').thrice
|
72
|
+
|
73
|
+
op = List::CommandParser.new("account", %w[-f], %w[], false, ['test@email.com'], true)
|
74
|
+
command.account(op)
|
75
|
+
|
76
|
+
expect(File.read(conf_file.path)).to eq("")
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
data/td.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.add_dependency "yajl-ruby", ">= 1.3.1", "< 2.0"
|
23
23
|
gem.add_dependency "hirb", ">= 0.4.5"
|
24
24
|
gem.add_dependency "parallel", "~> 1.20.0"
|
25
|
-
gem.add_dependency "td-client", ">= 1.0.8", "<
|
25
|
+
gem.add_dependency "td-client", ">= 1.0.8", "< 3"
|
26
26
|
gem.add_dependency "td-logger", ">= 0.3.21", "< 2"
|
27
27
|
gem.add_dependency "rubyzip", "~> 1.3.0"
|
28
28
|
gem.add_dependency "zip-zip", "~> 0.3"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Treasure Data, Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
version: 1.0.8
|
96
96
|
- - "<"
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: '
|
98
|
+
version: '3'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
101
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -105,7 +105,7 @@ dependencies:
|
|
105
105
|
version: 1.0.8
|
106
106
|
- - "<"
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
108
|
+
version: '3'
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
name: td-logger
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,6 +254,7 @@ files:
|
|
254
254
|
- Gemfile
|
255
255
|
- README.rdoc
|
256
256
|
- Rakefile
|
257
|
+
- SECURITY.md
|
257
258
|
- appveyor.yml
|
258
259
|
- bin/td
|
259
260
|
- contrib/completion/_td
|
@@ -304,6 +305,7 @@ files:
|
|
304
305
|
- spec/file_reader/shared_context.rb
|
305
306
|
- spec/file_reader_spec.rb
|
306
307
|
- spec/spec_helper.rb
|
308
|
+
- spec/td/command/account_spec.rb
|
307
309
|
- spec/td/command/connector_spec.rb
|
308
310
|
- spec/td/command/export_spec.rb
|
309
311
|
- spec/td/command/import_spec.rb
|
@@ -333,7 +335,7 @@ homepage: http://treasure-data.com/
|
|
333
335
|
licenses:
|
334
336
|
- Apache-2.0
|
335
337
|
metadata: {}
|
336
|
-
post_install_message:
|
338
|
+
post_install_message:
|
337
339
|
rdoc_options: []
|
338
340
|
require_paths:
|
339
341
|
- lib
|
@@ -348,8 +350,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
348
350
|
- !ruby/object:Gem::Version
|
349
351
|
version: '0'
|
350
352
|
requirements: []
|
351
|
-
rubygems_version: 3.
|
352
|
-
signing_key:
|
353
|
+
rubygems_version: 3.3.26
|
354
|
+
signing_key:
|
353
355
|
specification_version: 4
|
354
356
|
summary: CLI to manage data on Treasure Data, the Hadoop-based cloud data warehousing
|
355
357
|
test_files:
|
@@ -360,6 +362,7 @@ test_files:
|
|
360
362
|
- spec/file_reader/shared_context.rb
|
361
363
|
- spec/file_reader_spec.rb
|
362
364
|
- spec/spec_helper.rb
|
365
|
+
- spec/td/command/account_spec.rb
|
363
366
|
- spec/td/command/connector_spec.rb
|
364
367
|
- spec/td/command/export_spec.rb
|
365
368
|
- spec/td/command/import_spec.rb
|