ats 0.1.6 → 0.1.7

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
  SHA256:
3
- metadata.gz: 549e6f0076a120831fb54d0ab1d2f516c38bd426feed91a9fcfef77395410c23
4
- data.tar.gz: e5ea540288300f2ed2daa5c8fa7a8fd04fe48366156ff324f90793ce97b5ce28
3
+ metadata.gz: a1072c017d8e77937188e39e7f019b5176505e1b27041f53672d60e1c339745f
4
+ data.tar.gz: f0e796f9ae6feedd3e79ea67bc0a11bdecd68a8a59429d881a1eafc7f5aec21c
5
5
  SHA512:
6
- metadata.gz: 790bae34bdc6c1f5bb9dd8ba5278cdb3aec024edab9c35dce2f146e1e07feee0727aef9ea68ea9ab35ca60d61cbd7efccf7af6c5cd245a2664c7d3dacd3f207f
7
- data.tar.gz: cd1cc9c634f5330ce6825c3774b3eaaaa812e9c40946f66576d37125e50624302300b5a242b6e8002dd5266cd03d904f195256551565c339796f20458b476968
6
+ metadata.gz: d70bac3a644e5546a20ca47466c97749ea0947a787908de7aca141c71bb47c809d9c2741e1e225d056b1bb44574f3f9909028b68c3f7a479319cb457a2054a23
7
+ data.tar.gz: e274f5b2e9d4c7d7d37ad42265a9ae7f7f3c8f00b9cd4dba09556527c7fd246d0d6324c321979d3e0c9b43734e431cce4b0a07c2db2001596469960b21c969a9
@@ -3,6 +3,7 @@ require 'ats/cli/threat_grid/organizations'
3
3
  require 'ats/cli/threat_grid/samples'
4
4
  require 'ats/cli/threat_grid/search'
5
5
  require 'ats/cli/threat_grid/users'
6
+ require 'ats/cli/threat_grid/whoami'
6
7
 
7
8
  require 'ats/cli/threat_grid/application'
8
9
 
@@ -2,8 +2,6 @@ module ATS
2
2
  module CLI
3
3
  module ThreatGrid
4
4
  class Application < Thor
5
- class_option :profile, default: :default, required: false
6
-
7
5
  desc 'users SUBCOMMAND ...ARGS', 'interact with the Threat Grid API'
8
6
  subcommand :users, ATS::CLI::ThreatGrid::Users
9
7
 
@@ -16,10 +14,8 @@ module ATS
16
14
  desc 'search SUBCOMMAND ...ARGS', 'interact with the Threat Grid API'
17
15
  subcommand :search, ATS::CLI::ThreatGrid::Search
18
16
 
19
- desc 'whoami', 'whoami'
20
- def whoami
21
- say JSON.pretty_generate(ATS::ThreatGrid::API.new(profile: options['profile']).whoami)
22
- end
17
+ desc 'whoami', 'interact with the Threat Grid API'
18
+ subcommand :whoami, ATS::CLI::ThreatGrid::Whoami
23
19
  end
24
20
  end
25
21
  end
@@ -0,0 +1,14 @@
1
+ module ATS
2
+ module CLI
3
+ module ThreatGrid
4
+ class Whoami < Command
5
+ default_command :whoami
6
+
7
+ desc 'whoami', 'whoami'
8
+ def whoami
9
+ print_json api.whoami
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module ATS
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - mokha
@@ -100,6 +100,7 @@ files:
100
100
  - lib/ats/cli/threat_grid/samples.rb
101
101
  - lib/ats/cli/threat_grid/search.rb
102
102
  - lib/ats/cli/threat_grid/users.rb
103
+ - lib/ats/cli/threat_grid/whoami.rb
103
104
  - lib/ats/configuration.rb
104
105
  - lib/ats/http_api.rb
105
106
  - lib/ats/threat_grid/api.rb