lisbn 0.2.3 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/push.yml +32 -0
- data/.github/workflows/ruby.yml +30 -0
- data/README.md +8 -0
- data/Rakefile +8 -2
- data/data/RangeMessage.xml +804 -178
- data/data/ranges.yml +632 -124
- data/lib/lisbn/cache_method.rb +1 -1
- data/lib/lisbn/lisbn.rb +53 -21
- data/lisbn.gemspec +3 -1
- data/spec/cache_method_spec.rb +19 -6
- data/spec/lisbn_spec.rb +89 -30
- data/spec/spec_helper.rb +0 -1
- metadata +33 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
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,5 +1,7 @@
|
|
1
1
|
# Lisbn
|
2
2
|
|
3
|
+
[![CI](https://github.com/ragalie/lisbn/actions/workflows/ruby.yml/badge.svg)](https://github.com/ragalie/lisbn/actions/workflows/ruby.yml)
|
4
|
+
|
3
5
|
Lisbn (pronounced "Lisbon") is a wrapper around String that adds methods for manipulating
|
4
6
|
[ISBNs](http://en.wikipedia.org/wiki/International_Standard_Book_Number).
|
5
7
|
|
@@ -58,3 +60,9 @@ Then run:
|
|
58
60
|
3. Commit your changes (`git commit -am 'Added some feature'`)
|
59
61
|
4. Push to the branch (`git push origin my-new-feature`)
|
60
62
|
5. Create new Pull Request
|
63
|
+
|
64
|
+
## Releasing
|
65
|
+
|
66
|
+
1. Update the version in lisbn.gemspec using [semver](https://semver.org).
|
67
|
+
2. Tag the version update commit as `vX.X.X` on the master branch.
|
68
|
+
3. Push to github.
|
data/Rakefile
CHANGED
@@ -3,5 +3,11 @@ require "bundler/gem_tasks"
|
|
3
3
|
|
4
4
|
Dir["tasks/**/*.rake"].each { |ext| load ext }
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
begin
|
7
|
+
require 'rspec/core/rake_task'
|
8
|
+
RSpec::Core::RakeTask.new('spec')
|
9
|
+
|
10
|
+
task :default => :spec
|
11
|
+
rescue LoadError
|
12
|
+
# nop
|
13
|
+
end
|