kanji_master 0.3.2 → 0.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21743341c97306585c4e2a6ac9044a0502291545
4
- data.tar.gz: 02eb5835efc72f462e4de22e243fa25604267dc3
3
+ metadata.gz: 7edd301f2d0b8db2bce18cd536897c08c8e07d7f
4
+ data.tar.gz: a89b8ff3e66a7752c9a81f58dfcc4090cb36e713
5
5
  SHA512:
6
- metadata.gz: dab031432f8651d0f69ba8cde6685791453f58f54aa2f9c9ea89b4f5efce2ef53f6fe8b829c196e5f625aba1b92dfab948ae8564a28ab86728af1b19da7fc420
7
- data.tar.gz: 2820b92c210a632356c0cefbd066503d5f3b8a8ce0554bc70a92d653307dace48d6ed71cecb6ccfc81b34c42ca5a6d91d80cfc2dcfe9de97c28e91184dd30d63
6
+ metadata.gz: b5da0a2eeedc9c31c05605833406bf9563c3693fc6db250b8a95b0142badf22af58b2c33018cb34ce2c98cd8a9ab6b25a7c5167fdf7c607071767ada84b9c998
7
+ data.tar.gz: 38342a833435368d972e13ab3809c0d77b666c55abb49399d3e67957a3abc6f1003a72640e849ab2da0863845616e6b6308a1722b146bc680d67bcff520102a7
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,48 @@
1
+ # Contributing
2
+
3
+ ## Fork and Clone
4
+
5
+ The first step of contributing on this project is to fork the repository.
6
+ Now you can clone the repository to your local machine with code below
7
+
8
+ ```
9
+ git clone git@githuh.com:YOUR_USERNAME/kanji-master
10
+ ```
11
+
12
+ ## Create a Branch
13
+
14
+ Now, you can make changes to repository by create new branch
15
+
16
+ ```
17
+ git checkout -b YOUR_WORKING_BRANCH
18
+ ```
19
+
20
+ ## Install Required Gem
21
+
22
+ ```
23
+ bundle install
24
+ ```
25
+
26
+ ## Test Your Code
27
+
28
+ If you made changes on code, please write the spec code in `/spec/`.
29
+ You can rspec with `bundle exec rspec`, also you can specific run with filename and line number.
30
+
31
+ ```
32
+ bundle exec rspec spec/kanji_master/reader_spec.rb:8
33
+ ```
34
+
35
+ ## Send Pull Request
36
+
37
+ Once test are passed, you can create a pull request on GitHub.
38
+
39
+ First, push you cahnges
40
+
41
+ ```
42
+ git push origin YOUR_WORKING_BRANCH
43
+ ```
44
+
45
+ Now you can create pull request from [top page of this repository](https://github.com/ToUMenu/kanji-master)
46
+
47
+ That's all:)
48
+ :wq
data/README.md CHANGED
@@ -109,13 +109,9 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
109
109
 
110
110
  ## Contributing
111
111
 
112
- Fork this repository.
112
+ Details in [CONTRIBUTING](/CONTRIBUTING.md)
113
113
 
114
- ```shell
115
- $ git checkout -b your_working_branch
116
- ```
117
-
118
- Feel free to send the pull request!
114
+ Feel free to send pull request!
119
115
 
120
116
  ## License
121
117
 
data/lib/kanji_master.rb CHANGED
@@ -16,3 +16,6 @@ require "kanji_master/random"
16
16
  require "kanji_master/reader"
17
17
  require "kanji_master/counter"
18
18
  require "kanji_master/converter"
19
+
20
+ # Rails Helper
21
+ require 'kanji_master/reader_helper' if defined? ActionView
@@ -0,0 +1,20 @@
1
+ require "kanji_master/reader"
2
+
3
+ module ReaderHelper
4
+ def jp_zipcode?(text)
5
+ reader = Reader.new
6
+ reader.zipcode?(text)
7
+ end
8
+
9
+ def kanji?(text)
10
+ reader = Reader.new
11
+ reader.kanji?(text)
12
+ end
13
+
14
+ def alphabet?(text)
15
+ reader = Reader.new
16
+ reader.alphabet?(text)
17
+ end
18
+ end
19
+
20
+ ActionView::Base.send :include, ReaderHelper
@@ -1,3 +1,3 @@
1
1
  module KanjiMaster
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanji_master
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - DONGSHIH TENG
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-25 00:00:00.000000000 Z
11
+ date: 2017-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: romaji
@@ -134,6 +134,7 @@ files:
134
134
  - ".rspec"
135
135
  - ".travis.yml"
136
136
  - CODE_OF_CONDUCT.md
137
+ - CONTRIBUTING.md
137
138
  - Gemfile
138
139
  - LICENSE.txt
139
140
  - README.md
@@ -152,6 +153,7 @@ files:
152
153
  - lib/kanji_master/name.rb
153
154
  - lib/kanji_master/person.rb
154
155
  - lib/kanji_master/prefecture.rb
156
+ - lib/kanji_master/rails_helpers/reader_helper.rb
155
157
  - lib/kanji_master/random.rb
156
158
  - lib/kanji_master/reader.rb
157
159
  - lib/kanji_master/regex_constant.rb