fastlane-plugin-poesie 0.3.0 → 0.4.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
2
  SHA256:
3
- metadata.gz: 522a64de11d89de80904b62e34f3bb822cab0c428e113109efda313d2067ef28
4
- data.tar.gz: 0b012087e2270ba93254f83291c73f2c9461e0c5b6c710306c481c89fbad6074
3
+ metadata.gz: 4488e95f4c4d7d8de17f0ef032e5e1d07501e221a2b6697c5f8f7e4ca7bdc4ff
4
+ data.tar.gz: 87e40ef66a4e2d2b123e112a08f48a2ac742ba8495af97ad43b36ee1c3736b1b
5
5
  SHA512:
6
- metadata.gz: '073924908b39e144b542b310a4b40e2b27bed0bb293adeb3d05ee0b179781a914a36b1474e9b5e40c5847a18534c29776829c8f0feb1aa6d8878eec92cb24d35'
7
- data.tar.gz: a2de6fa0f345dbece8548f8f656c715cc2fe5a33effdc0529712c79011d7e563eb0c8421018b5259c1a4f52fb2d43cba8736df395fc88cfe000e0fd328071378
6
+ metadata.gz: 3e598095e64fbc5d72167c7f48d58e0f1c3fff9cbc2039087cb99f2739183bd120a0fb30a7ad26d8c5ab53917c0802c2d211a6526ea96a74b2a712cc6833600a
7
+ data.tar.gz: 67401ae10784a51cbc645bf36c81009516b1692f84a2a9d5820585a12f9dc41a6f16dcd4da7b2b9105f84f1b361e3c76c439818014fad8e3b2738a44126a04f6
@@ -10,7 +10,7 @@ module Fastlane
10
10
  languages = Helper::PoesieHelper.list_of_languages(params[:api_token], params[:project_id])
11
11
  end
12
12
 
13
- paths = Helper::PoesieHelper.path_for_localized_file(languages, params[:strings_file_name])
13
+ paths = Helper::PoesieHelper.path_for_localized_file(languages, params[:strings_file_name], params[:strings_path])
14
14
 
15
15
  if paths.count != languages.count
16
16
  ::Poesie.exit_with_error("Error while finding localized files.\nSearching for languages: #{languages}\nFound: #{paths.keys
@@ -46,7 +46,7 @@ module Fastlane
46
46
  end
47
47
 
48
48
  def self.authors
49
- ["Patrik Potoček"]
49
+ ["Patrik Potoček", "Adam Bezák"]
50
50
  end
51
51
 
52
52
  def self.available_options
@@ -70,6 +70,11 @@ module Fastlane
70
70
  env_name: "PROJECT_STRING_FILE_NAME",
71
71
  description: "Name of a localized .strings file. Default is Localizable.strings",
72
72
  optional: true,
73
+ type: String),
74
+ FastlaneCore::ConfigItem.new(key: :strings_path,
75
+ env_name: "PROJECT_STRING_PATH",
76
+ description: "Path to a directory where poesie will search for .string files",
77
+ optional: true,
73
78
  type: String)
74
79
  ]
75
80
  end
@@ -20,14 +20,18 @@ module Fastlane
20
20
  json["result"]["languages"].map { |lan| lan["code"] }
21
21
  end
22
22
 
23
- def self.path_for_localized_file(languages, filename = nil)
23
+ def self.path_for_localized_file(languages, filename = nil, strings_path = nil)
24
24
  require 'find'
25
-
26
25
  if filename.nil?
27
26
  filename = "Localizable.strings"
28
27
  end
28
+
29
+ if strings_path.nil?
30
+ strings_path = Dir.pwd
31
+ end
32
+
29
33
  paths = {}
30
- Find.find(Dir.pwd) do |path|
34
+ Find.find(strings_path) do |path|
31
35
  if FileTest.file?(path) && File.basename(path) == filename
32
36
  languages.each { |lang|
33
37
  if File.basename(File.dirname(path)) == "#{lang}.lproj"
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Poesie
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-poesie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Potoček
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-14 00:00:00.000000000 Z
11
+ date: 2020-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: poesie