isbnranges 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 +4 -4
- data/LICENSE.txt +22 -0
- data/README.md +20 -12
- data/lib/isbnranges/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: beb08e709b1ef366de7bca2befb1f9dd7407fcf8c4c08ddb375b78a0bbd4fdb0
|
4
|
+
data.tar.gz: 7fdf65edcaf594a1ab80a806dd81e0d7361865ed67130aa3a32cc5057dc0addb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14ef026cff11eb1c7733eb497e10e893c3d2c477abdc72ff3e19f22ceeaf6c9a5b70545ce66b46b0012d70b1a377e14ea2b1ee9bba4f6637af484fdc2778d68e
|
7
|
+
data.tar.gz: 7619c4ef268a728f37668037f03f0d4598947e39e056151bb40e9313b452a71e35fc7293dc47adbb5b66a0e2d9c410b332a45327354d37dacbe5e069aedecad3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2024 takatoh
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,31 +1,39 @@
|
|
1
1
|
# ISBNRanges
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
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/isbnranges`. To experiment with that code, run `bin/console` for an interactive prompt.
|
3
|
+
The range definitions of ISBN registration groups and registrants.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
7
|
Install the gem and add to the application's Gemfile by executing:
|
12
8
|
|
13
|
-
$ bundle add
|
9
|
+
$ bundle add isbnranges
|
14
10
|
|
15
11
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
12
|
|
17
|
-
$ gem install
|
13
|
+
$ gem install isbnranges
|
18
14
|
|
19
15
|
## Usage
|
20
16
|
|
21
|
-
|
17
|
+
After `require 'isbnranges'`, you can refer to the following constants:
|
18
|
+
|
19
|
+
- ISBNRanges::REGISTRATION_GROUP_RANGES
|
20
|
+
- ISBNRanges::REGISTRANT_RANGES
|
21
|
+
|
22
|
+
Both constants are HASHs with the prefix as the key. The value corresponding to the key is an Array of ranges defined under the prefix. Each range is a String whose beginning and end are joined by `-`, so it can be easily modified into a form that is convenient for you.
|
22
23
|
|
23
|
-
|
24
|
+
irb(main):001:0> require 'isbnranges'
|
25
|
+
=> true
|
26
|
+
irb(main):002:0> ISBNRanges::REGISTRATION_GROUP_RANGES
|
27
|
+
=>
|
28
|
+
{"978"=>["0-5", "600-649", "65-65", "7-7", "80-94", "950-989", "9900-9989", "99900-99999"],
|
29
|
+
"979"=>["10-15", "8-8"]}
|
30
|
+
irb(main):003:0> ISBNRanges::REGISTRANT_RANGES["978-4"]
|
31
|
+
=> ["00-19", "200-699", "7000-8499", "85000-89999", "900000-949999", "9500000-9999999"]
|
24
32
|
|
25
|
-
|
33
|
+
## License
|
26
34
|
|
27
|
-
|
35
|
+
MIT License
|
28
36
|
|
29
37
|
## Contributing
|
30
38
|
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
39
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/takatoh/ISBNRanges.
|
data/lib/isbnranges/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isbnranges
|
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
|
- takatoh
|
@@ -18,6 +18,7 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- ".rspec"
|
21
|
+
- LICENSE.txt
|
21
22
|
- README.md
|
22
23
|
- Rakefile
|
23
24
|
- data/registrant_ranges.txt
|
@@ -26,8 +27,9 @@ files:
|
|
26
27
|
- lib/isbnranges/version.rb
|
27
28
|
- scripts/generate_range_files.rb
|
28
29
|
- sig/isbnranges.rbs
|
29
|
-
homepage: https://github.com/takatoh/
|
30
|
-
licenses:
|
30
|
+
homepage: https://github.com/takatoh/ISBNRanges
|
31
|
+
licenses:
|
32
|
+
- MIT
|
31
33
|
metadata: {}
|
32
34
|
post_install_message:
|
33
35
|
rdoc_options: []
|