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.
- data/vmc-ng/lib/vmc/cli/user.rb +10 -8
- data/vmc-ng/lib/vmc/version.rb +1 -1
- data/vmc/lib/cli/frameworks.rb +1 -1
- data/vmc/lib/cli/version.rb +1 -1
- metadata +3 -3
data/vmc-ng/lib/vmc/cli/user.rb
CHANGED
@@ -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(:
|
65
|
-
|
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
|
-
|
77
|
+
user = input[:user]
|
75
78
|
password = input[:password]
|
79
|
+
new_password = input[:new_password]
|
76
80
|
verify = input[:verify]
|
77
81
|
|
78
|
-
if
|
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
|
84
|
-
user.password = password
|
85
|
-
user.update!
|
87
|
+
user.change_password!(new_password, password)
|
86
88
|
end
|
87
89
|
end
|
88
90
|
|
data/vmc-ng/lib/vmc/version.rb
CHANGED
data/vmc/lib/cli/frameworks.rb
CHANGED
@@ -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
|
89
|
+
matched_file = fname if (str && str.match(/^\s*require[\s\(]*['"]sinatra(\/base)?['"]/))
|
90
90
|
end
|
91
91
|
end
|
92
92
|
if matched_file
|
data/vmc/lib/cli/version.rb
CHANGED
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:
|
4
|
+
hash: 3780277393
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 0.4.0.beta.
|
11
|
+
- 47
|
12
|
+
version: 0.4.0.beta.47
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- VMware
|