grepo 0.1.0 → 0.1.1
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/bin/grepo +29 -0
- data/lib/grepo.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86bef628e2d8aabf6991e93fa2e221a3bb9316c2
|
4
|
+
data.tar.gz: 97d03958e79f009e44b39fd1b12ae2a7b8472a3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21b7dae915841ecf4b942a9d40fddc1c66e17a635106096cb936b41ba5a1d6f5131f66d7f63b2a8060c79c99023b764725bd21be0c9081c85142540ac1789616
|
7
|
+
data.tar.gz: a67c768e08b5e1010437457f33a70c45b0c0936e6f355a6fb2e41d30504b59f984b7a0dae0374dda1aea85e32f7fa6ace4254c0b17baf25e202a0f5233718df9
|
data/bin/grepo
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'grepo'
|
4
|
+
|
5
|
+
arg = ARGV
|
6
|
+
action_arg = arg[0]
|
7
|
+
|
8
|
+
case action_arg
|
9
|
+
when "find"
|
10
|
+
file_one = arg[1] || "config/locales/en.yml"
|
11
|
+
file_two = arg[2] || "app/"
|
12
|
+
|
13
|
+
depth = arg[3] || 1
|
14
|
+
|
15
|
+
Grepo.new.find(file_one, "file_two", {depth: depth} )
|
16
|
+
when "compare"
|
17
|
+
file_one = arg[1] || "config/locales/hr.yml"
|
18
|
+
file_two = arg[2] || "config/locales/en.yml"
|
19
|
+
|
20
|
+
depth = arg[3] || 1
|
21
|
+
|
22
|
+
Grepo.new.compare(file_one, file_two, {depth: depth})
|
23
|
+
when "find_duplicates"
|
24
|
+
file_one = arg[1] || "config/locales/en.yml"
|
25
|
+
|
26
|
+
Grepo.new.find_duplicates(file_one)
|
27
|
+
else
|
28
|
+
"Don't know what to do!"
|
29
|
+
end
|
data/lib/grepo.rb
CHANGED
@@ -211,4 +211,4 @@ end
|
|
211
211
|
#Grepo.new.find("config/locales/en.yml", "umye_cms/app/", {depth: 0})
|
212
212
|
#Grepo.new.compare("config/locales/hr.yml", "config/locales/en.yml", {depth: 1})
|
213
213
|
#Grepo.new.compare("config/locales/hr.yml")
|
214
|
-
Grepo.new.find_duplicates("config/locales/en.yml")
|
214
|
+
#Grepo.new.find_duplicates("config/locales/en.yml")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grepo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mislav Kvesić
|
@@ -17,10 +17,12 @@ description: Grepo is a small gem that helps you to clean up your yaml and json
|
|
17
17
|
It won’t remove the targeted keys neither it will alter your files in any way, just
|
18
18
|
grep for possible problems.
|
19
19
|
email: kvesic.mislav@gmail.com
|
20
|
-
executables:
|
20
|
+
executables:
|
21
|
+
- grepo
|
21
22
|
extensions: []
|
22
23
|
extra_rdoc_files: []
|
23
24
|
files:
|
25
|
+
- bin/grepo
|
24
26
|
- lib/grepo.rb
|
25
27
|
homepage: http://rubygems.org/gems/grepo
|
26
28
|
licenses:
|