revi 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/README.md +18 -13
- data/lib/revi/version.rb +1 -1
- data/lib/revi/vietnamese_sign_processor.rb +1 -3
- metadata +2 -8
- data/bin/console +0 -14
- data/bin/revi +0 -4
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 747f91419fa2a4699797bdb3a6435ad22f4f36c3
|
4
|
+
data.tar.gz: 39b76df1e55c415366a1ee73d5448d05074742af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abebec0a306d9a8932bf7af3bf2cecbc501de1ac20333ba38fb6fbfd60595cdc64232e17cf0a8d695e8c87a2ab4a4ef2ef4df96b48f6675ef9da5b0d16fe80a2
|
7
|
+
data.tar.gz: a26a9ad8f3f38ae46ef967b807d86a4007cc40c1ab485d10c3ed5b93dcd281306ee3c9aba292a7560d14171c2e66eccb5e432bf49799052007cd1a347728a260
|
data/README.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
# Revi
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
The utility to remove Vietnamese sign.
|
4
|
+
Ex: `CAO Quảng Bình` -> `CAO Quang Binh`.
|
6
5
|
|
7
6
|
## Installation
|
8
7
|
|
@@ -22,20 +21,26 @@ Or install it yourself as:
|
|
22
21
|
|
23
22
|
## Usage
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
24
|
+
```ruby
|
25
|
+
class MyAwesomeClass
|
26
|
+
include Revi::VietnameseSignProcessor
|
27
|
+
|
28
|
+
def my_awesome_function
|
29
|
+
vietnamese_string = 'CAO Quảng Bình'
|
30
|
+
unsigned = replace_vietnamese_sign(vietnamese_string)
|
31
|
+
# unsigned => 'CAO Quang Binh'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
```
|
32
35
|
|
33
36
|
## Contributing
|
34
37
|
|
35
|
-
|
36
|
-
|
38
|
+
1. Fork [https://gitlab.com/binh.cao/revi](https://gitlab.com/binh.cao/revi)
|
39
|
+
2. Create your feature branch (`git checkout -b my-awesome-feature`)
|
40
|
+
3. Commit your changes (`git commit -m 'Add some feature'`)
|
41
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
42
|
+
5. Create a new pull request with a description of your changes
|
37
43
|
|
38
44
|
## License
|
39
45
|
|
40
46
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
-
|
data/lib/revi/version.rb
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
require 'thor'
|
2
1
|
require_relative 'char_map'
|
3
2
|
|
4
|
-
|
3
|
+
module Revi::VietnameseSignProcessor
|
5
4
|
include Revi::CharMap
|
6
5
|
|
7
|
-
desc 'replace_vietnamese_sign', 'Remove Vietnamese sign'
|
8
6
|
def replace_vietnamese_sign(source)
|
9
7
|
replaced_string = ''
|
10
8
|
source.split('').each do |char|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: revi
|
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
|
- CAO Quang Binh
|
@@ -69,10 +69,7 @@ dependencies:
|
|
69
69
|
description: Remove Vietnamese sign
|
70
70
|
email:
|
71
71
|
- caoquangbinh@gmail.com
|
72
|
-
executables:
|
73
|
-
- console
|
74
|
-
- revi
|
75
|
-
- setup
|
72
|
+
executables: []
|
76
73
|
extensions: []
|
77
74
|
extra_rdoc_files: []
|
78
75
|
files:
|
@@ -85,9 +82,6 @@ files:
|
|
85
82
|
- LICENSE.txt
|
86
83
|
- README.md
|
87
84
|
- Rakefile
|
88
|
-
- bin/console
|
89
|
-
- bin/revi
|
90
|
-
- bin/setup
|
91
85
|
- lib/revi.rb
|
92
86
|
- lib/revi/char_map.rb
|
93
87
|
- lib/revi/version.rb
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "revi"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
data/bin/revi
DELETED