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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +25 -4
- data/compare-yml.gemspec +1 -1
- data/lib/compare/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 959136da16d180060c17ce01895c718598100fb5c3818d05dc737c3d5e5ca603
|
|
4
|
+
data.tar.gz: 8cc0a9a1c90fb74a232333ca67a393a1d77d64f2cbbe013b5627ff822202bb46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab5471823532bcc3cddd0448e4b3d3cb3b24542539d6862b22ba06a7d046cb078b5b78c3e6c1fffd1d9eb4249480f17a45ceb543bc898bf761ad194b95885944
|
|
7
|
+
data.tar.gz: df74e21bfedd06b4f9b8bcd15c471adda0147fc9726af34539c3481d86eb8038e0bd60b5aff4e7edebb58b9a7e52a4090ee035e95606844f96fd892d2a6d71ce
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Compare::YML
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
|
data/compare-yml.gemspec
CHANGED
|
@@ -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
|
|
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
|
|
data/lib/compare/version.rb
CHANGED
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.
|
|
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
|
|
57
|
-
the
|
|
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:
|