match 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3191630b2d913ab97297fed63a6ea84d4888c47
4
- data.tar.gz: 9bdac85feac579c4f7b92a640c478bdf5f18ab19
3
+ metadata.gz: b5be00b2f40c0abbfb617e63df232a870ccf4420
4
+ data.tar.gz: 2dea3eceaf91c17fc1e8931009496b7b17ca7fd4
5
5
  SHA512:
6
- metadata.gz: 253cbe0a08b1933bcc25bb3d7aeaa8f594c05ff4aa4d9701fca6082ca7f322039598781041d44761db1e22745e3c6988a57030efc863488cafa3d2c4dd569215
7
- data.tar.gz: f6f61a1d063ba1720913dbee0ae9da63541d8df99bf77a94f69ecf213c63d7d0dde1ff3f31ea59ea123f657db9179deb1bc24fcf0565327341a9c72ed8361218
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 ||= UI.password("New password: ")
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 password"
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
- while password.to_s.length == 0
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 delete profiles for all your apps!" if had_app_identifier
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
@@ -1,4 +1,4 @@
1
1
  module Match
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  DESCRIPTION = "Easily sync your certificates and profiles across your team using git"
4
4
  end
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.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: 2015-12-22 00:00:00.000000000 Z
11
+ date: 2016-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: security