i18n-cocoa 0.0.4 → 0.0.5

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: ebbf5b1991105d808fe06a8aee71c4f192146ad6
4
- data.tar.gz: 2f6d1da8e9936f5dfdb35f1344da1708a7e1656b
3
+ metadata.gz: 211d87eb1540d27dba3ed74c5f3ab0489f84893b
4
+ data.tar.gz: 611f40a2e50f1d4dac3e3a49f6c32a3054cef3b2
5
5
  SHA512:
6
- metadata.gz: c4d709cb57f9ed0e10513938e1da168155d49a7f1a91828fafae6661e9af0aaadcee3c8acef9e749f320c9aeb4f6a2d4412aaddd3a58565579b9154b6815a39d
7
- data.tar.gz: 7c5e76c1162e9b565121db522fe6d8baa6e3b9c92c8259e9ac72bc25927f6b01cc8de7d3c93b2e9b64c3c6074d07ce0daea72e6bf7aae4b2cd1303dd7aeada15
6
+ metadata.gz: ed78a710294ff7db0633e4fa9dcb7ab1c059568f668e489ecaac88a34909492683837078d0c7d0e1f233d4347b08ee30019efda481c55c5e607ba20b62a086c2
7
+ data.tar.gz: 520c45d09e3e65ed2c3baef4e9efcb1f49c5745a855381a7ea515166dabeca34639277d4a1a192ca7becac33327d045512a81e0dd59b96c6d5cd323ffcd59cfe
@@ -51,13 +51,13 @@ module I18n
51
51
  Dir::foreach(directory_path) do |f|
52
52
  current_file_path = "#{directory_path}/#{f}"
53
53
 
54
- assort_with_extension current_file_path unless File.directory?current_file_path
54
+ _assort_with_extension current_file_path unless File.directory?current_file_path
55
55
 
56
56
  _search_file_paths current_file_path if _need_to_search_in_directory? current_file_path
57
57
  end
58
58
  end
59
59
 
60
- def assort_with_extension file_path
60
+ def _assort_with_extension file_path
61
61
  return if File.directory?file_path
62
62
 
63
63
  extension = file_path.split('.').last
@@ -65,7 +65,9 @@ module I18n
65
65
  when 'm', 'mm', 'swift'
66
66
  @method_file_paths << file_path
67
67
  when 'strings'
68
- @localized_file_paths << file_path
68
+ directory_name = file_path.split('/').last(2).first # e.g. 'en.lproj'
69
+ _extension = directory_name.split('.').last
70
+ @localized_file_paths << file_path if _extension == 'lproj'
69
71
  end
70
72
  end
71
73
 
@@ -79,7 +81,8 @@ module I18n
79
81
  xcode_extensions = ['xcodeproj', 'xcassets', 'xcworkspace']
80
82
  return false if xcode_extensions.include?extension # directory for xcode
81
83
 
82
- # TODO: support Pods, Carthage
84
+ library_directories = ['Pods', 'Carthage']
85
+ return false if library_directories.include?file_name # support Pods, Carthage
83
86
 
84
87
  true
85
88
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module I18n
4
4
  module Cocoa
5
- VERSION = "0.0.4"
5
+ VERSION = "0.0.5"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-cocoa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hirohisa Kawasaki