rbld 1.3.2 → 1.3.3

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
  SHA1:
3
- metadata.gz: afda56780e000dda2179af1fe6559382551926cf
4
- data.tar.gz: 2e54d8682d9933871bf202f9584b916b4eb82dc2
3
+ metadata.gz: 7bca62e00fbf523630f21ac49a64c278f42aa5ac
4
+ data.tar.gz: 7f6ae20c007bbedd9a33a35aeb158902ba44e571
5
5
  SHA512:
6
- metadata.gz: d761dbb46e55ad337b0d60eab6d9e49e4fb49c8d15d612aa568c11303023dccfaefae4abc3136476a52676081669b26de3272782079e43df7af7317f6539b644
7
- data.tar.gz: 2a5029cdd031099585f9a817abe818b8f56f8c583da781619c3f9a2fcd0d82e2a816363e59644313adac6b3b5f9eb25f16fbcf4b713036d243c665ec06c5d1ea
6
+ metadata.gz: f695830b29a3552f3061d3471c4b1be9e484baa30414ba067bdcc6b3b95b82f75083a5ad98ab7393692bc5c997b7dde723c4230e60465fbb5b9651a6c2da954b
7
+ data.tar.gz: 5006deaf0ee6253247dc1e9709ab6bd8a73355985e494aa3c678990260ad9fd4c4617aba10075c2770479b5c15612922553513f05f19a516367965c5ae14e939
@@ -1,7 +1,7 @@
1
1
  module Rebuild::CLI
2
2
  class RbldCheckoutCommand < Command
3
3
  def initialize
4
- @usage = "checkout [OPTIONS] [ENVIRONMENT[:TAG]]"
4
+ @usage = "[OPTIONS] [ENVIRONMENT[:TAG]]"
5
5
  @description = "Discard environment modifications"
6
6
  end
7
7
 
@@ -3,7 +3,7 @@ require 'getoptlong'
3
3
  module Rebuild::CLI
4
4
  class RbldCommitCommand < Command
5
5
  def initialize
6
- @usage = "commit [OPTIONS] [ENVIRONMENT[:TAG]]"
6
+ @usage = "[OPTIONS] [ENVIRONMENT[:TAG]]"
7
7
  @description = "Commit environment modifications"
8
8
  @options = [["-t TAG,--tag TAG", "New tag to be created"]]
9
9
  end
@@ -3,7 +3,7 @@ require 'getoptlong'
3
3
  module Rebuild::CLI
4
4
  class RbldCreateCommand < Command
5
5
  def initialize
6
- @usage = "create [OPTIONS] [ENVIRONMENT]"
6
+ @usage = "[OPTIONS] [ENVIRONMENT]"
7
7
  @description = "Create a new environment"
8
8
  @options = [
9
9
  ["-b NAME, --base NAME", "Base image from Docker Hub"],
@@ -1,7 +1,7 @@
1
1
  module Rebuild::CLI
2
2
  class RbldDeployCommand < Command
3
3
  def initialize
4
- @usage = "deploy [OPTIONS] [ENVIRONMENT[:TAG]]"
4
+ @usage = "[OPTIONS] [ENVIRONMENT[:TAG]]"
5
5
  @description = "Deploy environment from remote registry"
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Rebuild::CLI
2
2
  class RbldListCommand < Command
3
3
  def initialize
4
- @usage = "list [OPTIONS]"
4
+ @usage = "[OPTIONS]"
5
5
  @description = "List local environments"
6
6
  end
7
7
 
@@ -9,7 +9,7 @@ module Rebuild::CLI
9
9
  public
10
10
 
11
11
  def initialize
12
- @usage = "load [OPTIONS] [FILE]"
12
+ @usage = "[OPTIONS] [FILE]"
13
13
  @description = "Load environment from file"
14
14
  end
15
15
 
@@ -5,10 +5,10 @@ module Rebuild::CLI
5
5
 
6
6
  def initialize
7
7
  @usage = [
8
- { :syntax => "modify [OPTIONS] [ENVIRONMENT[:TAG]]",
8
+ { :syntax => "[OPTIONS] [ENVIRONMENT[:TAG]]",
9
9
  :description => "Interactive mode: opens shell in the " \
10
10
  "specified enviroment" },
11
- { :syntax => "modify [OPTIONS] [ENVIRONMENT[:TAG]] -- COMMANDS",
11
+ { :syntax => "[OPTIONS] [ENVIRONMENT[:TAG]] -- COMMANDS",
12
12
  :description => "Scripting mode: runs COMMANDS in the " \
13
13
  "specified environment" }
14
14
  ]
@@ -1,7 +1,7 @@
1
1
  module Rebuild::CLI
2
2
  class RbldPublishCommand < Command
3
3
  def initialize
4
- @usage = "publish [OPTIONS] [ENVIRONMENT[:TAG]]"
4
+ @usage = "[OPTIONS] [ENVIRONMENT[:TAG]]"
5
5
  @description = "Publish environment on remote registry"
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Rebuild::CLI
2
2
  class RbldRmCommand < Command
3
3
  def initialize
4
- @usage = "rm [OPTIONS] [ENVIRONMENT[:TAG]]"
4
+ @usage = "[OPTIONS] [ENVIRONMENT[:TAG]]"
5
5
  @description = "Remove local environment"
6
6
  end
7
7
 
@@ -5,10 +5,10 @@ module Rebuild::CLI
5
5
 
6
6
  def initialize
7
7
  @usage = [
8
- { :syntax => "run [OPTIONS] [ENVIRONMENT[:TAG]]",
8
+ { :syntax => "[OPTIONS] [ENVIRONMENT[:TAG]]",
9
9
  :description => "Interactive mode: opens shell in the " \
10
10
  "specified enviroment" },
11
- { :syntax => "run [OPTIONS] [ENVIRONMENT[:TAG]] -- COMMANDS",
11
+ { :syntax => "[OPTIONS] [ENVIRONMENT[:TAG]] -- COMMANDS",
12
12
  :description => "Scripting mode: runs COMMANDS in the " \
13
13
  "specified environment" }
14
14
  ]
@@ -9,7 +9,7 @@ module Rebuild::CLI
9
9
  public
10
10
 
11
11
  def initialize
12
- @usage = "save [OPTIONS] [ENVIRONMENT] [FILE]"
12
+ @usage = "[OPTIONS] [ENVIRONMENT] [FILE]"
13
13
  @description = "Save local environment to file"
14
14
  end
15
15
 
@@ -1,7 +1,7 @@
1
1
  module Rebuild::CLI
2
2
  class RbldSearchCommand < Command
3
3
  def initialize
4
- @usage = "search [OPTIONS] [NAME[:TAG]|PREFIX]"
4
+ @usage = "[OPTIONS] [NAME[:TAG]|PREFIX]"
5
5
  @description = "Search remote registry for published environments"
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Rebuild::CLI
2
2
  class RbldStatusCommand < Command
3
3
  def initialize
4
- @usage = "status [OPTIONS]"
4
+ @usage = "[OPTIONS]"
5
5
  @description = "List modified environments"
6
6
  end
7
7
 
@@ -1,7 +1,7 @@
1
1
  module Rebuild::CLI
2
2
  class RbldVersionCommand < Command
3
3
  def initialize
4
- @usage = "version [OPTIONS]"
4
+ @usage = "[OPTIONS]"
5
5
  @description = "Show the Rebuild version information"
6
6
  end
7
7
 
data/cli/lib/data/version CHANGED
@@ -1 +1 @@
1
- 1.3.2
1
+ 1.3.3
@@ -120,6 +120,10 @@ module Rebuild::CLI
120
120
  rbld_log.info( "Command handler class #{handler_class} registered" )
121
121
  end
122
122
 
123
+ def cmd_name
124
+ @cmd_name ||= Commands.deduce_cmd_name( self.class )
125
+ end
126
+
123
127
  def options_text
124
128
  options = (@options || []) + [["-h, --help", "Print usage"]]
125
129
  text = ""
@@ -163,11 +167,11 @@ module Rebuild::CLI
163
167
  if @usage.respond_to?(:each)
164
168
  text << "\n"
165
169
  @usage.each do |mode|
166
- text << "\n rbld #{mode[:syntax]}\n\n" \
170
+ text << "\n rbld #{cmd_name} #{mode[:syntax]}\n\n" \
167
171
  " #{mode[:description]}\n"
168
172
  end
169
173
  else
170
- text << "rbld #{@usage}\n"
174
+ text << "rbld #{cmd_name} #{@usage}\n"
171
175
  end
172
176
  text
173
177
  end
@@ -1,7 +1,7 @@
1
1
  require 'docker_registry2'
2
2
  require_relative 'rbld_log'
3
3
  require_relative 'rbld_utils'
4
- require 'fancy_gets'
4
+ require 'highline'
5
5
 
6
6
  module Rebuild
7
7
  module Registry
@@ -13,8 +13,6 @@ module Rebuild
13
13
  RegistryNotAuthenticatedError: nil
14
14
 
15
15
  class EnvironmentImage
16
- include FancyGets
17
-
18
16
  def initialize(api_module = ::Docker)
19
17
  @api_module = api_module
20
18
  end
@@ -40,6 +38,10 @@ module Rebuild
40
38
  end
41
39
  end
42
40
 
41
+ def get_password
42
+ HighLine.new($stdin, $stderr).ask('') { |q| q.echo = '*' }
43
+ end
44
+
43
45
  def get_credential(name, is_secret = false)
44
46
  print "#{name}: "
45
47
  predefined = ENV["RBLD_CREDENTIAL_#{name.upcase}"]
@@ -47,7 +49,7 @@ module Rebuild
47
49
  puts "<environment>"
48
50
  predefined
49
51
  else
50
- is_secret ? gets_password : STDIN.gets.chomp
52
+ is_secret ? get_password : STDIN.gets.chomp
51
53
  end
52
54
  end
53
55
 
@@ -33,8 +33,8 @@ class Rebuild::PlugMgr
33
33
 
34
34
  require plugin
35
35
 
36
- rescue LoadError
37
- rbld_log.warn( "Failed to load plugin #{plugin}" )
36
+ rescue LoadError => e
37
+ rbld_log.warn( "Failed to load plugin #{plugin}: #{e}" )
38
38
  else
39
39
  rbld_log.info( "Loaded plugin #{plugin}" )
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbld
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Fleytman
8
8
  autorequire:
9
9
  bindir: cli/bin
10
10
  cert_chain: []
11
- date: 2017-04-23 00:00:00.000000000 Z
11
+ date: 2017-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -147,25 +147,25 @@ dependencies:
147
147
  - !ruby/object:Gem::Version
148
148
  version: 0.9.6
149
149
  - !ruby/object:Gem::Dependency
150
- name: fancy_gets_ex
150
+ name: highline
151
151
  requirement: !ruby/object:Gem::Requirement
152
152
  requirements:
153
153
  - - "~>"
154
154
  - !ruby/object:Gem::Version
155
- version: '0.1'
155
+ version: '1.7'
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
- version: 0.1.6
158
+ version: 1.7.8
159
159
  type: :runtime
160
160
  prerelease: false
161
161
  version_requirements: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: '0.1'
165
+ version: '1.7'
166
166
  - - ">="
167
167
  - !ruby/object:Gem::Version
168
- version: 0.1.6
168
+ version: 1.7.8
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: ruby-progressbar
171
171
  requirement: !ruby/object:Gem::Requirement
@@ -346,6 +346,26 @@ dependencies:
346
346
  - - ">="
347
347
  - !ruby/object:Gem::Version
348
348
  version: 0.8.1
349
+ - !ruby/object:Gem::Dependency
350
+ name: rubygems-tasks
351
+ requirement: !ruby/object:Gem::Requirement
352
+ requirements:
353
+ - - "~>"
354
+ - !ruby/object:Gem::Version
355
+ version: '0.2'
356
+ - - ">="
357
+ - !ruby/object:Gem::Version
358
+ version: 0.2.4
359
+ type: :development
360
+ prerelease: false
361
+ version_requirements: !ruby/object:Gem::Requirement
362
+ requirements:
363
+ - - "~>"
364
+ - !ruby/object:Gem::Version
365
+ version: '0.2'
366
+ - - ">="
367
+ - !ruby/object:Gem::Version
368
+ version: 0.2.4
349
369
  description: Zero-dependency, reproducible build environments
350
370
  email: rbld-devel@rbld.io
351
371
  executables:
@@ -411,5 +431,5 @@ rubyforge_project:
411
431
  rubygems_version: 2.6.11
412
432
  signing_key:
413
433
  specification_version: 4
414
- summary: rbld-1.3.2
434
+ summary: rbld-1.3.3
415
435
  test_files: []