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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6989e2c5c5921c29fc1f9f03d8ad56d836248ed
4
- data.tar.gz: 04dc5e1ebc48afd62acfbc9a839244019e4d7d92
3
+ metadata.gz: 3d14b0866c34dcc958061c344f250c21e66fe2b6
4
+ data.tar.gz: 8bd28a8b328297c2f055f287a59fee92a98c307a
5
5
  SHA512:
6
- metadata.gz: 966e103c845e9bf0104c5ae63d53ae7ffd8a5d0fae5c564b9da5d8da80343d84adb83e029ea17723ea9f8d85b64e253bc5ef2f788cb70e8d0de51e483faf2961
7
- data.tar.gz: a8cb67371176f366a41ff1127310ffac58de3aa55a04537d41dc986651aa74bc3233ace3799b9261382c3babae90fb82ca64c071810a5ddd18427cc880a861ae
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
@@ -1,3 +1,3 @@
1
1
  module CredentialsManager
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credentials_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause