zillabyte-cli 0.1.5 → 0.1.6

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjczNzk4NGFlYTc2MGY1M2JjZWExZDNmZjg4MzBkNDlmNGEzYTg3NA==
4
+ Nzg4MjUyOWI3MDVkZGMwZjUyNWI2YmUzOTIyMjMyYjRhZWFmMTA1MA==
5
5
  data.tar.gz: !binary |-
6
- MzM4MDJlMjc3M2NiMmRhM2E5ZWQ5ZThmZjA2ZjY5YTcyZjI3ZTNhMg==
6
+ MGY3ODY4NTU3MzIyZmIxZDcxMmIzODY1MjYyZDgxNmE5N2IxYjk3Yg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OWQ5NzcxYTUzODMwNDI3ZDRmMmMyYmM4NTgwY2JjMzU5NDA2ZjZlODdkMWJk
10
- YTM5YjI0ZmFhM2VlNDBjZDMzNjZjOGFmNWVlMTRiMTQzOWZhY2UwNDFkOWUw
11
- YmUwYjY1ZGJlYjZhNmZjMzYzY2RjYzVkZTljMDc1MjEzNzk2ZjI=
9
+ NzQzZGRhNmYwOWFhMzVjM2RkODFhZjQ3NjNmYzNkNmIyY2JlZDg3Mjg5YTNh
10
+ YTRjZTgwODY0MjZiNDgxNzhjMjUzMDg5OWRiNmExYmZiNzU0MTM3MGFiOWMw
11
+ Nzc4YTU3NDJjZGY5ZDFkN2Q5MjBiNjM2ODY3YjE5OWUwNjc0NmU=
12
12
  data.tar.gz: !binary |-
13
- NjZiMmI2YmM4MjA4NGFiYjNlY2M0MTc2YzQ5ODZmMjM5MjUzZWNlNmViMGQz
14
- MmY3MGYxZTY2ZmZiOTk1OGJhZWZlZjU0MTcwMmRkMzYyYTcxZjYwODdlZDkz
15
- NjA0MTY3Y2E2YWJlZjVhMzc4NTZmYTU3NDY1ZTNlYzQxMGI1ZGQ=
13
+ MzQyMWNjYTViOTYwMjgzNjc4ZmY2M2U3ZTM1ZjM0NDgyYTI5M2EyMjcxMzQ1
14
+ MWVkNGZlMDM4ZmY2ZTVkZTJkOGVlNDM5ZDlmNzdhMDBjY2IzYjU2N2FjYmE0
15
+ ZjgzNzcxYzY2MTQzMTY2NjIwYzVkOTU0YTVlOThhZTNkY2ZiOTA=
data/bin/zbd ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
3
+
4
+ require("zillabyte-cli")
5
+ Zillabyte::CLI.start(*ARGV)
@@ -360,6 +360,7 @@ class Zillabyte::Command::Apps < Zillabyte::Command::Flows
360
360
  elsif trigger_forever
361
361
  response = api.apps.run_forever(app_id, options)
362
362
  else
363
+ require("date")
363
364
  # List the apps
364
365
  response = api.apps.list_cycles(app_id, options)
365
366
  # TODO List the sequence number for this app.
@@ -1,6 +1,4 @@
1
1
  require "zillabyte/cli/base"
2
- require "optparse"
3
- require "pp"
4
2
 
5
3
  # manage zillabyte accounts
6
4
  #
@@ -12,6 +10,7 @@ class Zillabyte::Command::Auth < Zillabyte::Command::Base
12
10
  # Set the authentication token.
13
11
  #
14
12
  def login
13
+ require "zillabyte/auth"
15
14
  Zillabyte::Auth.ask_for_and_save_credentials
16
15
  end
17
16
 
@@ -22,6 +21,7 @@ class Zillabyte::Command::Auth < Zillabyte::Command::Base
22
21
  # Clear the authentication token.
23
22
  #
24
23
  def logout
24
+ require "zillabyte/auth"
25
25
  Zillabyte::Auth.logout
26
26
  end
27
27
 
@@ -248,7 +248,7 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
248
248
 
249
249
  # Push the component...
250
250
  session.display("packaging directory... ") if session && type.nil?
251
- reqire("zillabyte/common/tar")
251
+ require("zillabyte/common/tar")
252
252
  tar = Zillabyte::Common::Tar.tar(dir)
253
253
 
254
254
  # Create the component
@@ -300,8 +300,8 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
300
300
  #
301
301
  # Submits a single query to the rpc. The input parameters MUST be
302
302
  # listed in the same order as that given in the component inputs.
303
- # TO SUBMIT MULTIPLE queries, use the --file switch to specify a
304
- # csv file containing the queries without listing any inputs on
303
+ # TO SUBMIT MULTIPLE queries, use the --input_file switch to specify
304
+ # a csv file containing the queries without listing any inputs on
305
305
  # the command line. Each line of the file should correspond to a
306
306
  # unique query.
307
307
  #
@@ -318,7 +318,8 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
318
318
  # $ zillabyte components:rpc 'web_screenshot' --file 'url_list.csv'
319
319
  #
320
320
  def rpc
321
-
321
+ require("csv")
322
+
322
323
  component_id = options[:id] || shift_argument
323
324
  async = options[:async] || false
324
325
 
@@ -223,7 +223,7 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
223
223
  headings = ["operation", "date", "error"]
224
224
  rows = (res.body["recent_errors"] || []).map do |row|
225
225
  if row['date']
226
- d = Time.at(row['date']/1000)
226
+ d = row['date']
227
227
  else
228
228
  d = nil
229
229
  end
@@ -1,5 +1,5 @@
1
1
  module Zillabyte
2
2
  module CLI
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  if File.directory?(".git")
17
17
  spec.files = Dir.glob("{bin,lib}/**/*") + %w(LICENSE README.md zillabyte_emails.csv zillaconf.json Gemfile zillabyte-cli.gemspec)
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.executables = ["zillabyte", "zb"]
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  end
21
21
  spec.require_paths = ["lib"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zillabyte-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - zillabyte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-17 00:00:00.000000000 Z
11
+ date: 2014-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -168,12 +168,13 @@ description: The Official Zillabyte CLI Gem
168
168
  email:
169
169
  - gem@zillabyte.com
170
170
  executables:
171
- - zb
172
171
  - zillabyte
172
+ - zb
173
173
  extensions: []
174
174
  extra_rdoc_files: []
175
175
  files:
176
176
  - bin/zb
177
+ - bin/zbd
177
178
  - bin/zillabyte
178
179
  - lib/zillabyte/api/apps.rb
179
180
  - lib/zillabyte/api/base.rb