ann-flavor-flutter 0.1.12 → 0.1.13

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
  SHA256:
3
- metadata.gz: 815a329fc3fb31c9cec3e8482b5023c68c2951eb73ba10331ac910e3dc1ba0f2
4
- data.tar.gz: 32d4865b2b969ba4296609a480608c1bbb68b1e1959c1c2d38084c6d3027136b
3
+ metadata.gz: 16d7f58e4027292d95f6a258d4ff3c3ac7b26b76c6cfc60c9406af289fa97fdc
4
+ data.tar.gz: 4027de193deef4a6293fef30bf505fe57412f82255dcc7d036b62c6de28d55d3
5
5
  SHA512:
6
- metadata.gz: 228523643e49ee2bace67ce3dd706c6411de3d4558d04326dfa9447964c56a5780a0657910345d9392ef999c034dd4ae22264bc4cf90151801d38394e5f830ea
7
- data.tar.gz: 168799e6071ec946faf8c77a40cf40e4c04dee8d8b917f2bf0eb6b546af6c74e1cae5bc17a4812107ee852b6af31181cc85f1709c635960faa03d779a9481681
6
+ metadata.gz: 19f6a97ecde33b1d933bf4ae0e4a0e7016214a04c0f52c9d5940cc0625a04637ad65b0fd87fdf1be848843e20b23bbb110135c41a33b99fb59a04ac07199c26e
7
+ data.tar.gz: 1972bfc4ba0b631a6551214620d5f94afff4e2d2871ee4229cc9024e60216ec57ce2475e316bc312f733cef12853a54fc4d1fa4b26d71cc39b0f5bf6586fd368
@@ -1,3 +1,3 @@
1
1
  module AnnFlavorFlutter
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.13"
3
3
  end
@@ -71,6 +71,11 @@ module FastlaneFlutterFlavor
71
71
  return current_data
72
72
  end
73
73
 
74
+ def enabled?
75
+ return false unless @spec_data
76
+ @spec_data.fetch('enabled', true) != false
77
+ end
78
+
74
79
  # Retrieves the configuration for a specific flavor, merged with the platform defaults.
75
80
  # This function uses the spec data loaded into the instance variable @spec_data.
76
81
  #
@@ -78,7 +83,7 @@ module FastlaneFlutterFlavor
78
83
  # @param flavor_name [String] The name of the flavor (e.g., 'dev', 'staging').
79
84
  # @return [Hash, nil] The fully merged configuration for the flavor, or nil if missing.
80
85
  def get_merged_flavor_config(platform, flavor_name)
81
- return nil unless @spec_data # Check if file was loaded successfully
86
+ return nil unless @spec_data && enabled?
82
87
 
83
88
  platform_key = platform.to_s
84
89
  flavor_key = flavor_name.to_s
@@ -120,7 +125,7 @@ module FastlaneFlutterFlavor
120
125
  # @param platform [Symbol] The target platform (:ios or :android).
121
126
  # @return [Hash] A hash where keys are flavor names (String) and values are their raw configs (Hash).
122
127
  def get_platform_flavors(platform)
123
- return {} unless @spec_data
128
+ return {} unless @spec_data && enabled?
124
129
  platform_key = platform.to_s
125
130
 
126
131
  # Use dig to safely retrieve the flavors hash from @spec_data
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ann-flavor-flutter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - ANN Solutions