revi 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4bd64d280fb4d17ef82381162fb0da951dd3b9a
4
- data.tar.gz: 877cde470a0d528c17bbd777762e571fdc91c692
3
+ metadata.gz: 747f91419fa2a4699797bdb3a6435ad22f4f36c3
4
+ data.tar.gz: 39b76df1e55c415366a1ee73d5448d05074742af
5
5
  SHA512:
6
- metadata.gz: d0f5d493ba9af1c60294da5952ab64ae281ac60e2d85775393e66dae9d34d10b13fb5b706e8f562cb1e81a71ea0f0f52b5d6ab1ab8c2974e0bd3ad62e12af4bc
7
- data.tar.gz: d73943deb67360a924ad5ef8267cb62fa369f6306dc5d8cc5872d30eb98b4b2a7d97d9a26ced16e3c7060b59d1f899c1aad44e24e216dbfe41bf92faeb0ff326
6
+ metadata.gz: abebec0a306d9a8932bf7af3bf2cecbc501de1ac20333ba38fb6fbfd60595cdc64232e17cf0a8d695e8c87a2ab4a4ef2ef4df96b48f6675ef9da5b0d16fe80a2
7
+ data.tar.gz: a26a9ad8f3f38ae46ef967b807d86a4007cc40c1ab485d10c3ed5b93dcd281306ee3c9aba292a7560d14171c2e66eccb5e432bf49799052007cd1a347728a260
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Revi
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/revi`. 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
+ 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
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/revi. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
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
-
@@ -1,3 +1,3 @@
1
1
  module Revi
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
@@ -1,10 +1,8 @@
1
- require 'thor'
2
1
  require_relative 'char_map'
3
2
 
4
- class Revi::VietnameseSignProcessor < Thor
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.0
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
@@ -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
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'revi'
4
- Revi::VietnameseSignProcessor.start(ARGV)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here