apstrings 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -3
  3. data/lib/apstrings/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 011d080462302bfd646f59aa1507c7eb4239dae7
4
- data.tar.gz: 98300de74e2dc328b3e3dfad41d1d85c924af0f5
3
+ metadata.gz: a2654ba9a832170ed36762b56735ed6ba7c07e19
4
+ data.tar.gz: ba194e889adfdcb6217d84a8f3a7d06f320d83a1
5
5
  SHA512:
6
- metadata.gz: 11a44096aec13d0ef9e5a7198707628c1f6cab0a3398f1d243faf2182fb9726e5a4d2adda38b5d16d0ef1178f1dee27743765158263a4f45fb4f7cff2893ac9a
7
- data.tar.gz: ec3749296763dcd22760cdfc53ca79affaa5fd9e22fc47661a927138dcf19f358ad6da09b163ebed90c3f7ed2bb17683027ea328cd3f6b81bfe32acd741b2ff3
6
+ metadata.gz: 6d284ad330632b177317620c1c7092bffe8ac1d84cc93e525eb59eef60c418f41b682b4138167a4bd6f5dc1b2df3413025a79dcddc8643712ae56e7bf2bd56d0
7
+ data.tar.gz: 71d4d1c27185dc11491677be60b01af6dad88e5da87edba3767dbb0ae615554162d74f2b54559940915be746b487e1aa9ebfed27335dcaa10f803e4f1565464d
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Apstrings
2
2
 
3
- An Apple dot strings file parser in ruby.
3
+ Apple dot strings file parser and validator in ruby.
4
4
 
5
5
  Valid input strings file formats :
6
6
 
@@ -31,16 +31,32 @@ Or install it yourself as:
31
31
 
32
32
  ## Usage
33
33
 
34
+
35
+ ####1. Parse a .strings file to json/hash in ruby :
34
36
  ```
35
- string_file = Apstring.parse('path/to/dotStringFile')
37
+ require 'apstrings'
38
+
39
+
40
+ string_file = Apstring.parse('path/to/dotStringFile.strings')
36
41
 
37
- string_file.to_hash
42
+ string_file.to_hash # => {key1 => value1 , key2 = > value2 ...}
38
43
 
39
44
  string_file.to_json
40
45
 
41
46
 
42
47
  ```
43
48
 
49
+
50
+ ####2. Run a validation for a .strings file and (optionally) compare a master .strings file to find missing keys.
51
+
52
+ ```
53
+ require 'apstrings'
54
+
55
+ Apstrings.validate('path/to/dotStringFile.strings','path/to/masterDotStringFile.strings')
56
+
57
+ ```
58
+
59
+
44
60
  ## Development
45
61
 
46
62
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake true` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,3 +1,3 @@
1
1
  module Apstrings
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: apstrings
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
  - JasonWorking