vmc 0.4.0.beta.46 → 0.4.0.beta.47

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.
@@ -61,28 +61,30 @@ module VMC
61
61
 
62
62
  desc "Update a user's password"
63
63
  group :admin, :user, :hidden => true
64
- input(:email, :argument => true, :desc => "User to update") {
65
- ask("Email")
64
+ input(:user, :argument => :optional, :desc => "User to update") {
65
+ client.current_user
66
66
  }
67
67
  input(:password, :desc => "New password") {
68
- ask("Password", :echo => "*", :forget => true)
68
+ ask("Current Password", :echo => "*", :forget => true)
69
+ }
70
+ input(:new_password, :desc => "New password") {
71
+ ask("New Password", :echo => "*", :forget => true)
69
72
  }
70
73
  input(:verify, :desc => "Repeat new password") {
71
74
  ask("Verify Password", :echo => "*", :forget => true)
72
75
  }
73
76
  def passwd
74
- email = input[:email]
77
+ user = input[:user]
75
78
  password = input[:password]
79
+ new_password = input[:new_password]
76
80
  verify = input[:verify]
77
81
 
78
- if password != verify
82
+ if new_password != verify
79
83
  fail "Passwords don't match."
80
84
  end
81
85
 
82
86
  with_progress("Changing password") do
83
- user = client.user(email)
84
- user.password = password
85
- user.update!
87
+ user.change_password!(new_password, password)
86
88
  end
87
89
  end
88
90
 
@@ -1,3 +1,3 @@
1
1
  module VMC
2
- VERSION = "0.4.0.beta.46"
2
+ VERSION = "0.4.0.beta.47"
3
3
  end
@@ -86,7 +86,7 @@ module VMC::Cli
86
86
  next if matched_file
87
87
  File.open(fname, 'r') do |f|
88
88
  str = f.read # This might want to be limited
89
- matched_file = fname if (str && str.match(/^\s*require[\s\(]*['"]sinatra['"(\/base['"])]/))
89
+ matched_file = fname if (str && str.match(/^\s*require[\s\(]*['"]sinatra(\/base)?['"]/))
90
90
  end
91
91
  end
92
92
  if matched_file
@@ -2,6 +2,6 @@ module VMC
2
2
  module Cli
3
3
  # This version number is used as the RubyGem release version.
4
4
  # The internal VMC version number is VMC::VERSION.
5
- VERSION = '0.3.20'
5
+ VERSION = '0.3.21'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1875048273
4
+ hash: 3780277393
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 0
10
10
  - beta
11
- - 46
12
- version: 0.4.0.beta.46
11
+ - 47
12
+ version: 0.4.0.beta.47
13
13
  platform: ruby
14
14
  authors:
15
15
  - VMware