credentials_manager 0.8.2 → 0.8.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: bc7166006a0bf54c2079403ad61a660000a79c64
4
- data.tar.gz: 4385afe5df2d0ff20032dea7af44b269e0105fee
3
+ metadata.gz: 3d78b0195ce80a141e4d6f76fcec5e9552f75c21
4
+ data.tar.gz: c3ab586b367d43002a9ee1286813eaffedd822f4
5
5
  SHA512:
6
- metadata.gz: 6b3243a07120a2102db66ca70d857bad5624f77f999c2a13e8338b1c572a01faab9673a81e6a617854babe959fa361c076d9639a7dc59b26b3a90ae924011ec6
7
- data.tar.gz: 9222fcc58c448fa68f2d10bbf16421c47e79165938adab8eebc6ee68a29499bd04b2ac5065e18849299361acce6eab5b20d54155aeb0452cd7a9c196ed11b924
6
+ metadata.gz: b5d0fc2ca0a5cb6c856f1237693c21cd1450a0fa7ec1d9696cb57b5620e7078a2612f21d3b5156433402263f7edd968ed21708f8c272b9aa47c76f90db760371
7
+ data.tar.gz: 82e0c208c0eb03d0f8b9187aef4d47a4cbc5c05c4709062868be3fbd4bb80d37c8450b82f2dca317b6789291c52a6689f993b1a2106d9f63c5d4618b59ee4bda
data/README.md CHANGED
@@ -7,13 +7,19 @@ All code related to your username and password can be found here: [password_mana
7
7
 
8
8
  ## Storing in the keychain
9
9
 
10
- By default, your Apple credentials are stored in the OS X Keychain. You can easily delete them by opening the "Keychain Access" app, switching to *All Items*, and searching for "*deliver*".
10
+ By default, your Apple credentials are stored in the OS X Keychain.
11
+
12
+ Your password is only stored locally on your computer.
13
+
14
+ ## Change Password
15
+
16
+ You can easily delete the stored password by opening the "Keychain Access" app, switching to *All Items*, and searching for "*deliver*". Select the item you want to change and delete it. Next time running one of the tools, you'll be asked for the new password.
11
17
 
12
18
  ## Using environment variables
13
19
 
14
20
  ```
15
- DELIVER_USER
16
- DELIVER_PASSWORD
21
+ FASTLANE_USER
22
+ FASTLANE_PASSWORD
17
23
  ```
18
24
 
19
25
  If you don't want to have your password stored in the Keychain use `FASTLANE_DONT_STORE_PASSWORD`.
@@ -22,7 +28,13 @@ If you don't want to have your password stored in the Keychain use `FASTLANE_DON
22
28
 
23
29
  All ```fastlane``` tools are Ruby-based, and you can take a look at the source code to easily implement your own authentication solution.
24
30
 
25
- Your password is only stored locally on your computer.
31
+ ```ruby
32
+ require 'credentials_manager'
33
+
34
+ data = CredentialsManager::AccountManager.new(user: user, password: password)
35
+ puts data.user
36
+ puts data.password
37
+ ```
26
38
 
27
39
  # License
28
40
 
@@ -43,6 +43,7 @@ module CredentialsManager
43
43
  def ask_for_login
44
44
  puts "-------------------------------------------------------------------------------------".green
45
45
  puts "The login information you enter will be stored in your Mac OS Keychain".green
46
+ puts "You can also pass the password using the `FASTLANE_PASSWORD` env variable".green
46
47
  puts "More information about it on GitHub: https://github.com/fastlane/CredentialsManager".green
47
48
  puts "-------------------------------------------------------------------------------------".green
48
49
 
@@ -57,6 +58,7 @@ module CredentialsManager
57
58
  end
58
59
 
59
60
  return true if ENV["FASTLANE_DONT_STORE_PASSWORD"]
61
+ return true unless Helper.mac?
60
62
 
61
63
  # Now we store this information in the keychain
62
64
  if Security::InternetPassword.add(server_name, user, password)
@@ -29,8 +29,18 @@ module CredentialsManager
29
29
  if path and File.exist?(path) # it might not exist, we still want to use the default values
30
30
  full_path = File.expand_path(path)
31
31
  Dir.chdir(File.expand_path('..', path)) do
32
+ content = File.read(full_path)
33
+
34
+ # From https://github.com/orta/danger/blob/master/lib/danger/Dangerfile.rb
35
+ if content.tr!('“”‘’‛', %(""'''))
36
+ Helper.log.error "Your #{File.basename(path)} has had smart quotes sanitised. " \
37
+ 'To avoid issues in the future, you should not use ' \
38
+ 'TextEdit for editing it. If you are not using TextEdit, ' \
39
+ 'you should turn off smart quotes in your editor of choice.'.red
40
+ end
41
+
32
42
  # rubocop:disable Lint/Eval
33
- eval(File.read(full_path))
43
+ eval(content)
34
44
  # rubocop:enable Lint/Eval
35
45
  end
36
46
  end
@@ -108,7 +118,7 @@ module CredentialsManager
108
118
  else
109
119
  value = args.shift
110
120
  end
111
- data[key] = value if value
121
+ data[key] = value if value && value.to_s.length > 0
112
122
  end
113
123
  end
114
124
  end
@@ -1,3 +1,3 @@
1
1
  module CredentialsManager
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credentials_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.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-09-10 00:00:00.000000000 Z
11
+ date: 2015-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -108,6 +108,62 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 3.1.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: webmock
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 1.19.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 1.19.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: coveralls
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: fastlane
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.34'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.34'
111
167
  description: Password manager used in fastlane.tools
112
168
  email:
113
169
  - fastlane@krausefx.com