compare-yml 0.1.0 → 0.2.0

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: 7204cc306fc2117b72e59e848651a61d3027482383cad5c3e65b944b8479efaa
4
- data.tar.gz: 48cd6d772e2c41ceddd6280e0cb898d6de0caac88994d8577f032ceac3812305
3
+ metadata.gz: 959136da16d180060c17ce01895c718598100fb5c3818d05dc737c3d5e5ca603
4
+ data.tar.gz: 8cc0a9a1c90fb74a232333ca67a393a1d77d64f2cbbe013b5627ff822202bb46
5
5
  SHA512:
6
- metadata.gz: 36f88cbae0a976d6aa453e9bccd8e2a0d663957f9c7ca1c0fc14d4124511421f5dafacbce6288d27f0345ee25eac30c77d3c737e6c88246a5c82bca2729776e9
7
- data.tar.gz: 7efe6efe926795cf3c3ad60ff77559bcef9d909c6b9a3d1ccff8ec04d500de14abccd0adba9af7c351ec80e4a306ea01e9b4edae5887fbf4a9f337028e0a9b4c
6
+ metadata.gz: ab5471823532bcc3cddd0448e4b3d3cb3b24542539d6862b22ba06a7d046cb078b5b78c3e6c1fffd1d9eb4249480f17a45ceb543bc898bf761ad194b95885944
7
+ data.tar.gz: df74e21bfedd06b4f9b8bcd15c471adda0147fc9726af34539c3481d86eb8038e0bd60b5aff4e7edebb58b9a7e52a4090ee035e95606844f96fd892d2a6d71ce
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- compare-yml (0.1.0)
4
+ compare-yml (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Compare::YML
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/compare/yml`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This library can be used to compare two yml or json files to understand the differences in keys of both files. This library supports comparison of deeply nested keys also.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,30 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ The usage of this gem is pretty simple. You don't need to have this in your gemfile to use this. An executable is already included.
24
+
25
+ So after doing `gem install compare-yml`, you can directly type in
26
+
27
+ ```
28
+ compare_yml source_file target_file
29
+ ```
30
+ in your terminal/command-prompt.
31
+
32
+ This library is designed to work with comparing both yaml and json files. An example usage in a rails translation situation would be:
33
+
34
+ ```
35
+ compare_yml config/locales/en.yml config/locales/de.yml
36
+ ```
37
+
38
+ This will show you the keys which are missing from `en.yml` compared to `de.yml` and vice versa. The comparision is two way meaning, we will compare `en.yml` keys with respect to `de.yml` keys and also compare `de.yml` keys with respect to `en.yml`.
39
+
40
+ An example usage for people using translation in react app would be :
41
+
42
+ ```
43
+ compare_yml public/static/locales/fr.json public/static/locales/en.json
44
+ ```
45
+
46
+ You can use this for comparing translation files, as well as for any yml or json files for that matter. Do not get fooled by the examples.
26
47
 
27
48
  ## Development
28
49
 
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['sony.mathew.pm@gmail.com']
11
11
 
12
12
  spec.summary = %q{Compare two yml files to find out the differences in keys of both.}
13
- spec.description = %q{In case of I18n files or other configuration files which could be usually in yml or json format, you might need to compare the keys of two files and understand the differences. This gem is for those occasions especillay when you are working with translation files.}
13
+ spec.description = %q{In case of I18n files or other configuration files which could be usually in yml or json format, you might need to compare the keys of two files and find out the missing ones. This gem is for those occasions, especially when you are working with translation files. This can work with both json and yml files.}
14
14
  spec.homepage = "https://sony-mathew.github.io/compare-yml.html"
15
15
  spec.license = "MIT"
16
16
 
@@ -1,3 +1,3 @@
1
1
  module Compare
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compare-yml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sony Mathew
@@ -53,9 +53,9 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
55
  description: In case of I18n files or other configuration files which could be usually
56
- in yml or json format, you might need to compare the keys of two files and understand
57
- the differences. This gem is for those occasions especillay when you are working
58
- with translation files.
56
+ in yml or json format, you might need to compare the keys of two files and find
57
+ out the missing ones. This gem is for those occasions, especially when you are working
58
+ with translation files. This can work with both json and yml files.
59
59
  email:
60
60
  - sony.mathew.pm@gmail.com
61
61
  executables: