habluhablu 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/exe/habluhablu +21 -0
- data/lib/habluhablu/version.rb +1 -1
- metadata +4 -3
- data/bin/habluhablu +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bba18ca9ad12e5201bf1c04bcddd0126c6f2460bd2dd26de70d14d8adf24ce30
|
4
|
+
data.tar.gz: 7781750dd34afec7824b7843f92a5f706204fa843fb3dbee7621d43bbe030be7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86166bafe69e1170d89b7b707aa74f758a57c531ff995a6142a58345794d9f209759edb8d53425ff839cc3027bef7d57cb49e1feeb4bc7d6f4d465bf084d65a6
|
7
|
+
data.tar.gz: 68491643a1b65056d969dd08aedcca4d7b3724418b939e244bd5f923e9cc4fa6978d6150836400cfe27fe3a357418d2d73bed4bf3d8251e137f5e5546a06be89
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -35,7 +35,7 @@ Or install it yourself as:
|
|
35
35
|
|
36
36
|
### Usage
|
37
37
|
|
38
|
-
Generate file for a specific language using `habluhablu
|
38
|
+
Generate file for a specific language using `habluhablu -l <symbol>` command.
|
39
39
|
[List of symbols](https://www.w3.org/International/O-charset-lang.html)
|
40
40
|
|
41
41
|
### Contributing
|
data/exe/habluhablu
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "optparse"
|
5
|
+
require "habluhablu"
|
6
|
+
|
7
|
+
args = {}
|
8
|
+
OptionParser.new do |opts|
|
9
|
+
opts.banner = "Generate files including basic phrases translations (using with I18n gem)"
|
10
|
+
|
11
|
+
opts.on("-l", "--language SYMBOL", "The unit of the unnamed, first amount argument")
|
12
|
+
end.parse!(into: args)
|
13
|
+
|
14
|
+
Habluhablu.hablu(args[:language])
|
15
|
+
if File.exist?("config/locales/#{args[:language]}.yml")
|
16
|
+
puts "..."
|
17
|
+
sleep 0.5
|
18
|
+
puts "File for #{args[:language].upcase} language has been generated successfully!"
|
19
|
+
else
|
20
|
+
puts "Something went wrong!"
|
21
|
+
end
|
data/lib/habluhablu/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: habluhablu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Gramatowski
|
@@ -14,7 +14,8 @@ description: The gem allows you to generate language file with translations of t
|
|
14
14
|
most useful phrases.
|
15
15
|
email:
|
16
16
|
- patrick.gramatowski@gmail.com
|
17
|
-
executables:
|
17
|
+
executables:
|
18
|
+
- habluhablu
|
18
19
|
extensions: []
|
19
20
|
extra_rdoc_files: []
|
20
21
|
files:
|
@@ -29,8 +30,8 @@ files:
|
|
29
30
|
- README.md
|
30
31
|
- Rakefile
|
31
32
|
- bin/console
|
32
|
-
- bin/habluhablu
|
33
33
|
- bin/setup
|
34
|
+
- exe/habluhablu
|
34
35
|
- habluhablu.gemspec
|
35
36
|
- languages/Countries_Flags.md
|
36
37
|
- languages/ar.yml
|
data/bin/habluhablu
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "thor"
|
5
|
-
require "habluhablu"
|
6
|
-
|
7
|
-
# Class comment
|
8
|
-
class CLI < Thor
|
9
|
-
desc "help", "some"
|
10
|
-
desc "<language>", "Generate file .yml"
|
11
|
-
long_desc <<-LONGDESC
|
12
|
-
Generate files including basic phrases translations (using with I18n gem).
|
13
|
-
LONGDESC
|
14
|
-
def language(symbol)
|
15
|
-
Habluhablu.hablu(symbol)
|
16
|
-
if File.exist?("config/locales/#{symbol}.yml")
|
17
|
-
puts "..."
|
18
|
-
sleep 0.5
|
19
|
-
puts "File for #{symbol.upcase} language has been generated successfully!"
|
20
|
-
else
|
21
|
-
puts "Something went wrong!"
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
CLI.start(ARGV)
|