match 0.2.2 → 0.2.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 +4 -4
- data/lib/match/change_password.rb +18 -2
- data/lib/match/encrypt.rb +2 -4
- data/lib/match/nuke.rb +1 -1
- data/lib/match/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5be00b2f40c0abbfb617e63df232a870ccf4420
|
4
|
+
data.tar.gz: 2dea3eceaf91c17fc1e8931009496b7b17ca7fd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5931858fa62b8028032a6ca65da006bdbd8a1aac566d092575523a4ce125f9c47c9f743bb90d5cd5656361382f5b9c0e85460d7d5e25239732c8065065f8bdd
|
7
|
+
data.tar.gz: e0d4c5432fa521c39d887f698969252070a1f036083cf9b0989a22563074385abc328e0c4ed9a65b0043916e0432d236d18896e216a3f9c174b5f03452536083
|
@@ -1,14 +1,30 @@
|
|
1
1
|
module Match
|
2
2
|
class ChangePassword
|
3
3
|
def self.update(params: nil, from: nil, to: nil)
|
4
|
-
to ||=
|
4
|
+
to ||= ChangePassword.ask_password(message: "New passphrase for Git Repo: ", confirm: false)
|
5
|
+
from ||= ChangePassword.ask_password(message: "Old passphrase for Git Repo: ", confirm: true)
|
5
6
|
GitHelper.clear_changes
|
6
7
|
workspace = GitHelper.clone(params[:git_url], params[:shallow_clone], manual_password: from)
|
7
8
|
Encrypt.new.clear_password(params[:git_url])
|
8
9
|
Encrypt.new.store_password(params[:git_url], to)
|
9
10
|
|
10
|
-
message = "[fastlane] Changed
|
11
|
+
message = "[fastlane] Changed passphrase"
|
11
12
|
GitHelper.commit_changes(workspace, message, params[:git_url])
|
12
13
|
end
|
14
|
+
|
15
|
+
def self.ask_password(message: "Passphrase for Git Repo: ", confirm: true)
|
16
|
+
loop do
|
17
|
+
password = ask(message.yellow) { |q| q.echo = "*" }
|
18
|
+
if confirm
|
19
|
+
password2 = ask("Type passphrase again: ".yellow) { |q| q.echo = "*" }
|
20
|
+
if password == password2
|
21
|
+
return password
|
22
|
+
end
|
23
|
+
else
|
24
|
+
return password
|
25
|
+
end
|
26
|
+
UI.error("Passhprases differ. Try again")
|
27
|
+
end
|
28
|
+
end
|
13
29
|
end
|
14
30
|
end
|
data/lib/match/encrypt.rb
CHANGED
@@ -17,9 +17,7 @@ module Match
|
|
17
17
|
UI.important "Enter the passphrase that should be used to encrypt/decrypt your certificates"
|
18
18
|
UI.important "This passphrase is specific per repository and will be stored in your local keychain"
|
19
19
|
UI.important "Make sure to remember the password, as you'll need it when you run match on a different machine"
|
20
|
-
|
21
|
-
password = ask("Passphrase for Git Repo: ".yellow) { |q| q.echo = "*" }
|
22
|
-
end
|
20
|
+
password = ChangePassword.ask_password(confirm: true)
|
23
21
|
store_password(git_url, password)
|
24
22
|
end
|
25
23
|
|
@@ -73,7 +71,7 @@ module Match
|
|
73
71
|
end
|
74
72
|
|
75
73
|
def crypt(path: nil, password: nil, encrypt: true)
|
76
|
-
if password.to_s.strip.length == 0
|
74
|
+
if password.to_s.strip.length == 0 && encrypt
|
77
75
|
UI.user_error!("No password supplied")
|
78
76
|
end
|
79
77
|
|
data/lib/match/nuke.rb
CHANGED
@@ -31,7 +31,7 @@ module Match
|
|
31
31
|
UI.error "Are you sure you want to completely delete and revoke all the"
|
32
32
|
UI.error "certificates and provisioning profiles listed above? (y/n)"
|
33
33
|
UI.error "Warning: By nuking distribution, both App Store and Ad Hoc profiles will be deleted" if type == "distribution"
|
34
|
-
UI.error "Warning: The :app_identifier value will be ignored - this will all
|
34
|
+
UI.error "Warning: The :app_identifier value will be ignored - this will delete all profiles for all your apps!" if had_app_identifier
|
35
35
|
UI.error "---"
|
36
36
|
if agree("(y/n)", true)
|
37
37
|
nuke_it_now!
|
data/lib/match/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: match
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: security
|