credentials_manager 0.2.0 → 0.2.1
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/credentials_manager/appfile_config.rb +19 -0
- data/lib/credentials_manager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d14b0866c34dcc958061c344f250c21e66fe2b6
|
4
|
+
data.tar.gz: 8bd28a8b328297c2f055f287a59fee92a98c307a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f7e653abaed357d1438d7bf578eb8b1c8efafae42f84daf3fd12239f9850ddc3044eadd644a620865706775e187c269e6bf00d3e8c46e0561e81a84ae48191f
|
7
|
+
data.tar.gz: 601df2e93c515fcd648de2cf03880ba5fb8b65c7ff4c462866ada8b29609f54705010ebacbc0150f0019c572f9c03afde328690b45fdedb5a6bc50d48f7d89d8
|
@@ -25,6 +25,13 @@ module CredentialsManager
|
|
25
25
|
Dir.chdir(File.expand_path('..', path)) do
|
26
26
|
eval(File.read(full_path))
|
27
27
|
end
|
28
|
+
|
29
|
+
# If necessary override per lane configuration
|
30
|
+
blocks[ENV["FASTLANE_LANE_NAME"].to_sym].call if (ENV["FASTLANE_LANE_NAME"] && blocks[ENV["FASTLANE_LANE_NAME"].to_sym])
|
31
|
+
end
|
32
|
+
|
33
|
+
def blocks
|
34
|
+
@blocks ||= {}
|
28
35
|
end
|
29
36
|
|
30
37
|
def data
|
@@ -52,5 +59,17 @@ module CredentialsManager
|
|
52
59
|
value ||= yield if block_given?
|
53
60
|
data[:team_name] = value if value
|
54
61
|
end
|
62
|
+
|
63
|
+
# Override Appfile configuration for a specific lane.
|
64
|
+
#
|
65
|
+
# lane_name - Symbol representing a lane name.
|
66
|
+
# block - Block to execute to override configuration values.
|
67
|
+
#
|
68
|
+
# Discussion If received lane name does not match the lane name available as environment variable, no changes will
|
69
|
+
# be applied.
|
70
|
+
def for_lane(lane_name, &block)
|
71
|
+
raise "Configuration for lane '#{lane_name}' was defined multiple times!".red if blocks[lane_name]
|
72
|
+
blocks[lane_name] = block
|
73
|
+
end
|
55
74
|
end
|
56
75
|
end
|