lisbn 0.3.1 → 0.3.2
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/.github/workflows/push.yml +32 -0
- data/.github/workflows/ruby.yml +30 -0
- data/README.md +1 -1
- data/lib/lisbn/lisbn.rb +5 -1
- data/lisbn.gemspec +1 -1
- metadata +5 -5
- data/.travis.yml +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 742d628ed486e4a58b4a01ae14ac5cf787086d2a8fc959befad5035068d421d4
|
4
|
+
data.tar.gz: 0adcb74adcc213b17da88387af3364e21f107b6b82148ece1bc1062ddc100799
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bd00a3e7d0c3ac98f87ff3a43ab1b4486b2bcdadd42f63ab8cf17dd9767e9be85bbeb38f30824260922f26d5a7426d6365050493ecbb0c57a6bc19b36963358
|
7
|
+
data.tar.gz: 5f2f7c3b23512c1ac167822efbef8cbe1a5faabc7f6a2cbb339473bd5e6862b48745585840b430438cfc09cc30aeb86f717cba9537e7e69388f9aa7ec0f92b02
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- '*'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Build + Publish
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
permissions:
|
13
|
+
contents: read
|
14
|
+
packages: write
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
- name: Set up Ruby 3.1
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: 3.1
|
22
|
+
|
23
|
+
- name: Publish to RubyGems
|
24
|
+
run: |
|
25
|
+
mkdir -p $HOME/.gem
|
26
|
+
touch $HOME/.gem/credentials
|
27
|
+
chmod 0600 $HOME/.gem/credentials
|
28
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
29
|
+
gem build *.gemspec
|
30
|
+
gem push *.gem
|
31
|
+
env:
|
32
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
|
6
|
+
name: Ruby CI
|
7
|
+
|
8
|
+
on:
|
9
|
+
pull_request:
|
10
|
+
push:
|
11
|
+
branches: [main]
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
test:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
|
17
|
+
strategy:
|
18
|
+
matrix:
|
19
|
+
ruby-version: [3.1, '3.0', 2.7]
|
20
|
+
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.ruby-version }}
|
27
|
+
- name: Install dependencies
|
28
|
+
run: bundle install
|
29
|
+
- name: Run tests
|
30
|
+
run: bundle exec rake
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Lisbn
|
2
2
|
|
3
|
-
[](https://github.com/ragalie/lisbn/actions/workflows/ruby.yml)
|
4
4
|
|
5
5
|
Lisbn (pronounced "Lisbon") is a wrapper around String that adds methods for manipulating
|
6
6
|
[ISBNs](http://en.wikipedia.org/wiki/International_Standard_Book_Number).
|
data/lib/lisbn/lisbn.rb
CHANGED
@@ -154,5 +154,9 @@ private
|
|
154
154
|
isbn[-1..-1] == isbn_13_checksum
|
155
155
|
end
|
156
156
|
|
157
|
-
RANGES =
|
157
|
+
RANGES = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('4.0.0')
|
158
|
+
YAML::load_file(File.dirname(__FILE__) + "/../../data/ranges.yml", permitted_classes: [Range, Symbol])
|
159
|
+
else
|
160
|
+
YAML::load_file(File.dirname(__FILE__) + "/../../data/ranges.yml")
|
161
|
+
end
|
158
162
|
end
|
data/lisbn.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
13
|
gem.name = "lisbn"
|
14
14
|
gem.require_paths = ["lib"]
|
15
|
-
gem.version = "0.3.
|
15
|
+
gem.version = "0.3.2"
|
16
16
|
|
17
17
|
gem.add_dependency "nori", "~> 2.0"
|
18
18
|
gem.add_dependency "nokogiri"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lisbn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Ragalie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nori
|
@@ -88,9 +88,10 @@ executables: []
|
|
88
88
|
extensions: []
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
|
+
- ".github/workflows/push.yml"
|
92
|
+
- ".github/workflows/ruby.yml"
|
91
93
|
- ".gitignore"
|
92
94
|
- ".rspec"
|
93
|
-
- ".travis.yml"
|
94
95
|
- Gemfile
|
95
96
|
- LICENSE
|
96
97
|
- README.md
|
@@ -124,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
125
|
- !ruby/object:Gem::Version
|
125
126
|
version: '0'
|
126
127
|
requirements: []
|
127
|
-
|
128
|
-
rubygems_version: 2.7.7
|
128
|
+
rubygems_version: 3.3.3
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Provides methods for converting between ISBN-10 and ISBN-13, checking validity
|
data/.travis.yml
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 2.5
|
4
|
-
deploy:
|
5
|
-
provider: rubygems
|
6
|
-
api_key:
|
7
|
-
secure: fAmrDgaEj29FTiwB/Iy4pX+QiLHTo4MbUw1JeUqMAK/RgDlx0OnTK7J25hfZYScb2tr7xliooC4abQAIzzdrT8J1Pb4qp53G4pwiVcbvf+bXWHJDZDGxNAeGDsvB4EEHhPWJCajIOkx7qEf1+R7Je82MjppeqC0EXx+AO3tDTfQ=
|
8
|
-
gem: lisbn
|
9
|
-
on:
|
10
|
-
tags: true
|
11
|
-
repo: ragalie/lisbn
|