fastlane-plugin-properties 1.0.2 → 1.1.0

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
- SHA1:
3
- metadata.gz: 41e1fcbc676fede7d89674400c2a137287c8e2b2
4
- data.tar.gz: 41aa0af6925ac7f043f419479483ab1631305b9e
2
+ SHA256:
3
+ metadata.gz: 83cc41668123748946ece3e9a6130b567b791f198cbd56ecfafe413179e4f17d
4
+ data.tar.gz: 1632a72d065d56d10b2e823ce07111918ffd9393e76b0a5b0e89030d1b786a4a
5
5
  SHA512:
6
- metadata.gz: df69fdc24d01d4b5782e563ab50c7c1bb2b0df49cf3645d2fb2eadd7e3632bc1f7e4bdf16066cfdcf1d796784221f823ea4aff656fa5883b4ad9df998d0f75ed
7
- data.tar.gz: 653f6ceb0e8b15fc45c6c1fa56eb7f21312234cd2eb9b0da1d4c4e51d7894844dbbd27c6a187b7fd94181a6fe2cbed11b6f19df4a021e26cf208a1f0c13b5fb0
6
+ metadata.gz: 04d8ab1e6b020cb59c14234b6b7598ff74622421add28ad4b94130642e9431230f80fee805c1a71f394b3925f447ef4f68dadeee3647bf72f978e995ebac29e5
7
+ data.tar.gz: bdd607dd1f1c7025d327dbf68878cc81d3564b4f4a2d42edbad6afb33650d190b5f869a20dfe7f1aca4dc806c7b1d5ec1e6f154f959731285b7247ac2036e50d
data/README.md CHANGED
@@ -13,6 +13,7 @@ fastlane add_plugin properties
13
13
  ## About properties
14
14
 
15
15
  Adds 2 actions to fastlane to read and update properties files.
16
+ Adds 2 actions to read/write the whole properties file.
16
17
  Adds 2 more actions to increase versionCode and versionName fast.
17
18
 
18
19
  ## Example
@@ -48,6 +49,16 @@ lane :test do
48
49
  update_type: "minor"
49
50
  )
50
51
 
52
+ content = parse_properties_file(
53
+ path: "./Configs/versions.properties"
54
+ )
55
+
56
+ increment_version_name_in_properties_file(
57
+ key: "VERSION_NAME",
58
+ path: "./Configs/versions.properties",
59
+ update_type: "minor"
60
+ )
61
+
51
62
  end
52
63
  ```
53
64
 
@@ -0,0 +1,51 @@
1
+ require 'fastlane/action'
2
+ require 'java-properties'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class ParsePropertiesFileAction < Action
7
+ def self.run(params)
8
+ content = JavaProperties.load(params[:path])
9
+ return content
10
+ end
11
+
12
+ def self.description
13
+ "Load .properties file and returns it as a ruby hash-map."
14
+ end
15
+
16
+ def self.authors
17
+ ["Pavlo Pakholka"]
18
+ end
19
+
20
+ def self.return_value
21
+ 'Content of properties file.'
22
+ end
23
+
24
+ def self.details
25
+ # Optional:
26
+ ""
27
+ end
28
+
29
+ def self.available_options
30
+ [
31
+ FastlaneCore::ConfigItem.new(key: :path,
32
+ env_name: "PROPERIES_READ_HASH_PATH",
33
+ description: "Path to .properies file you want to read",
34
+ type: String,
35
+ optional: false,
36
+ verify_block: proc do |value|
37
+ UI.user_error!("Couldn't find .properties file at path '#{value}'") unless File.exist?(File.expand_path(value))
38
+ end)
39
+ ]
40
+ end
41
+
42
+ def self.is_supported?(platform)
43
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
44
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
45
+ #
46
+ # [:ios, :mac, :android].include?(platform)
47
+ true
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,56 @@
1
+ require 'fastlane/action'
2
+ require 'java-properties'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class ParsePropertiesFileAction < Action
7
+ def self.run(params)
8
+ content = JavaProperties.write(params[:hash], params[:path])
9
+ return content
10
+ end
11
+
12
+ def self.description
13
+ "Write any Hash-like structure as a properties file. This action won't create a new file."
14
+ end
15
+
16
+ def self.authors
17
+ ["Pavlo Pakholka"]
18
+ end
19
+
20
+ def self.return_value
21
+ ''
22
+ end
23
+
24
+ def self.details
25
+ # Optional:
26
+ ""
27
+ end
28
+
29
+ def self.available_options
30
+ [
31
+ FastlaneCore::ConfigItem.new(key: :key,
32
+ env_name: "PROPERIES_WRITE_HASH_MAP",
33
+ description: "Hashmap you want to convert and write to file",
34
+ optional: false,
35
+ type: Hash),
36
+ FastlaneCore::ConfigItem.new(key: :path,
37
+ env_name: "PROPERIES_WRITE_HASH_PATH",
38
+ description: "Path to .properies file you want to update",
39
+ type: String,
40
+ optional: false,
41
+ verify_block: proc do |value|
42
+ UI.user_error!("Couldn't find .properties file at path '#{value}'") unless File.exist?(File.expand_path(value))
43
+ end)
44
+ ]
45
+ end
46
+
47
+ def self.is_supported?(platform)
48
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
49
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
50
+ #
51
+ # [:ios, :mac, :android].include?(platform)
52
+ true
53
+ end
54
+ end
55
+ end
56
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Properties
3
- VERSION = "1.0.2"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-properties
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavlo Pakholka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-11 00:00:00.000000000 Z
11
+ date: 2019-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: java-properties
@@ -162,7 +162,9 @@ files:
162
162
  - lib/fastlane/plugin/properties/actions/get_properties_value.rb
163
163
  - lib/fastlane/plugin/properties/actions/increment_version_code_in_properties_file.rb
164
164
  - lib/fastlane/plugin/properties/actions/increment_version_name_in_properties_file.rb
165
+ - lib/fastlane/plugin/properties/actions/parse_properties_file.rb
165
166
  - lib/fastlane/plugin/properties/actions/set_properties_value.rb
167
+ - lib/fastlane/plugin/properties/actions/write_properties_file.rb
166
168
  - lib/fastlane/plugin/properties/helper/properties_helper.rb
167
169
  - lib/fastlane/plugin/properties/version.rb
168
170
  homepage: https://github.com/Kerizer/fastlane-plugin-properties
@@ -184,8 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
186
  - !ruby/object:Gem::Version
185
187
  version: '0'
186
188
  requirements: []
187
- rubyforge_project:
188
- rubygems_version: 2.5.2.3
189
+ rubygems_version: 3.0.3
189
190
  signing_key:
190
191
  specification_version: 4
191
192
  summary: Adds 4 actions to fastlane to read and update properties files.