number_to_kanji 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +1 -1
- data/README.md +16 -16
- data/doc/README_EN.md +54 -0
- data/lib/number_to_kanji/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9937701e3083cbd9cd46fce1b956541d027e12716288744ef3fa28f3645df04c
|
4
|
+
data.tar.gz: dec86cf31c96ff1561138767325d1c21357d9144f555f2443fcb5941a3be7b6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aae80ec14608fcb73015723f4ddb95be44d9624bd5ed1a5eec6dadfc59266c77904d9bc674d1b1f4ae305bd58858a3520105c5460c72c4232d88473e84318cf5
|
7
|
+
data.tar.gz: 7e3db96a2f0ed0c79ea510a8c7b538dd37f52e97cfaca678458dfae2c6cda507ae6b13e1ed79b60cf6860eb62e6f7b857947d9ba8ede9d3dcab1517f176c096d
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,28 @@
|
|
1
|
+
# Change Log
|
2
|
+
原則、NumberToKanji に関する全ての変更はこのファイルに記載されます。
|
3
|
+
|
4
|
+
Change Log の形式は [Keep a Changelog](http://keepachangelog.com/) に従います。
|
5
|
+
またバージョンの付け方は [Semantic Versioning](https://semver.org/) に従います。
|
6
|
+
|
1
7
|
## [Unreleased]
|
8
|
+
### Added
|
9
|
+
|
10
|
+
- [#2](https://github.com/yamat47/number_to_kanji/pull/2) 日本語の README を追加した。([@yamat47](https://github.com/yamat47))
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
### Deprecated
|
15
|
+
|
16
|
+
### Removed
|
17
|
+
|
18
|
+
### Fixed
|
19
|
+
|
20
|
+
### Security
|
21
|
+
|
22
|
+
## [1.0.1] - 2022-01-03
|
23
|
+
### Added
|
24
|
+
|
25
|
+
- [#2](https://github.com/yamat47/number_to_kanji/pull/2) 日本語の README を追加した。([@yamat47](https://github.com/yamat47))
|
2
26
|
|
3
27
|
## [1.0.0] - 2022-01-02
|
4
28
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,27 +1,29 @@
|
|
1
1
|
# NumberToKanji
|
2
|
-
|
3
|
-
It supports numbers between 0 to 10^24 ("垓").
|
2
|
+
日本語 | [English](./doc/README_EN.md)
|
4
3
|
|
5
|
-
|
6
|
-
|
4
|
+
NumberToKanji は英数字を日本語に変換する Ruby gem です。
|
5
|
+
現在は「垓」までの正の整数をサポートしています。
|
6
|
+
|
7
|
+
## インストール
|
8
|
+
`Gemfile` にこの行を追加してください:
|
7
9
|
|
8
10
|
```ruby
|
9
11
|
gem 'number_to_kanji'
|
10
12
|
```
|
11
13
|
|
12
|
-
|
14
|
+
次にこのコマンドを実行してください:
|
13
15
|
|
14
16
|
```
|
15
17
|
$ bundle install
|
16
18
|
```
|
17
19
|
|
18
|
-
|
20
|
+
もしくは `gem install` をして直接インストールすることもできます:
|
19
21
|
|
20
22
|
```
|
21
23
|
$ gem install number_to_kanji
|
22
24
|
```
|
23
25
|
|
24
|
-
##
|
26
|
+
## 使い方
|
25
27
|
```ruby
|
26
28
|
require 'number_to_kanji'
|
27
29
|
|
@@ -30,23 +32,21 @@ NumberToKanji.call(123456) #=> "十二万三千四百五十六"
|
|
30
32
|
NumberToKanji.call(123456789) #=> "一億二千三百四十五万六千七百八十九"
|
31
33
|
```
|
32
34
|
|
33
|
-
##
|
34
|
-
|
35
|
+
## 開発
|
36
|
+
開発に必要なライブラリをインストールするには、このコマンドを実行してください:
|
35
37
|
|
36
38
|
```
|
37
39
|
bin/setup
|
38
40
|
```
|
39
41
|
|
40
|
-
|
42
|
+
自動テストやリンターを実行するには、このコマンドを実行してください:
|
41
43
|
|
42
44
|
```
|
43
45
|
rake
|
44
46
|
```
|
45
47
|
|
46
|
-
##
|
47
|
-
|
48
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
49
|
-
|
50
|
-
## Code of Conduct
|
48
|
+
## ライセンス
|
49
|
+
この gem は [MIT ライセンス](https://opensource.org/licenses/MIT) の下でオープンソースとして利用可能です。
|
51
50
|
|
52
|
-
|
51
|
+
## 行動規範
|
52
|
+
NumberToKanji に関してコードを書いたりイシューを追加したりする際は [行動規範](https://github.com/yamat47/number_to_kanji/blob/main/CODE_OF_CONDUCT.md) に従ってください。
|
data/doc/README_EN.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# NumberToKanji
|
2
|
+
[日本語](../README.md) | English
|
3
|
+
|
4
|
+
NumberToKanji is a Ruby Gem that translates number (integer) to Japanese Kanji.
|
5
|
+
It supports numbers between 0 to 10^24 ("垓").
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
Add this line to your application's `Gemfile`:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'number_to_kanji'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
```
|
17
|
+
$ bundle install
|
18
|
+
```
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
```
|
23
|
+
$ gem install number_to_kanji
|
24
|
+
```
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
```ruby
|
28
|
+
require 'number_to_kanji'
|
29
|
+
|
30
|
+
NumberToKanji.call(123) #=> "百二十三"
|
31
|
+
NumberToKanji.call(123456) #=> "十二万三千四百五十六"
|
32
|
+
NumberToKanji.call(123456789) #=> "一億二千三百四十五万六千七百八十九"
|
33
|
+
```
|
34
|
+
|
35
|
+
## Development
|
36
|
+
To install dependencies, run:
|
37
|
+
|
38
|
+
```
|
39
|
+
bin/setup
|
40
|
+
```
|
41
|
+
|
42
|
+
To run the tests and the linters, run:
|
43
|
+
|
44
|
+
```
|
45
|
+
rake
|
46
|
+
```
|
47
|
+
|
48
|
+
## License
|
49
|
+
|
50
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
51
|
+
|
52
|
+
## Code of Conduct
|
53
|
+
|
54
|
+
Everyone interacting in the NumberToKanji project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yamat47/number_to_kanji/blob/main/CODE_OF_CONDUCT.md).
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: number_to_kanji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yamaguchi Takuya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- Rakefile
|
101
101
|
- bin/console
|
102
102
|
- bin/setup
|
103
|
+
- doc/README_EN.md
|
103
104
|
- lib/number_to_kanji.rb
|
104
105
|
- lib/number_to_kanji/exceptions.rb
|
105
106
|
- lib/number_to_kanji/exceptions/negative_number_error.rb
|