pdf_matcher-testing 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +16 -13
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -0
- data/README.md +5 -4
- data/lib/pdf_matcher/testing/version.rb +1 -1
- data/pdf_matcher-testing.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fc709aa1d3fcdff97ab18b23b3803810defc0afe5f5d92b517ec40a016e31a2
|
4
|
+
data.tar.gz: f07b245586d3579b66d8f8fe089ebee20e2836ff7d346611e04a74f94f8fe8f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46e9e9bb12d1772169632f39213e5aff778ef7fba747ef33af4dd78e795b6b0f04d7014c54fff54b7ab54ddcf1030317ac4d89a6e2831f8b7e7d41cfaef9fb86
|
7
|
+
data.tar.gz: 6c18e12fcef5483785a2afbc29225887fa54a6ccfe6bb4c57168b9209c27a13e63f69f405ca1cf002a0a9d0dd030eb4fc08a28e26920ee7d23834876617157b7
|
data/.github/workflows/test.yml
CHANGED
@@ -1,35 +1,38 @@
|
|
1
1
|
name: Test
|
2
2
|
|
3
|
-
on:
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
- 'dev**'
|
8
|
+
pull_request:
|
4
9
|
|
5
10
|
jobs:
|
6
11
|
test:
|
7
12
|
name: Test on ruby ${{ matrix.ruby_version }}
|
8
|
-
runs-on: ubuntu-latest
|
9
13
|
|
10
|
-
|
14
|
+
runs-on: ubuntu-latest
|
11
15
|
|
12
16
|
strategy:
|
13
17
|
matrix:
|
14
18
|
ruby_version:
|
15
|
-
-
|
16
|
-
-
|
17
|
-
- 3.
|
19
|
+
- '3.0'
|
20
|
+
- '3.1'
|
21
|
+
- '3.2'
|
22
|
+
- '3.3'
|
18
23
|
|
19
24
|
steps:
|
20
|
-
- uses: actions/checkout@
|
25
|
+
- uses: actions/checkout@v4
|
21
26
|
|
22
|
-
- uses: hidakatsuya/setup-diff-pdf@v1
|
27
|
+
- uses: hidakatsuya/action-setup-diff-pdf@v1
|
23
28
|
with:
|
24
|
-
diff-pdf-version: 0.5
|
29
|
+
diff-pdf-version: '0.5'
|
25
30
|
|
26
31
|
- name: Set up Ruby ${{ matrix.ruby_version }}
|
27
32
|
uses: ruby/setup-ruby@v1
|
28
33
|
with:
|
29
34
|
ruby-version: ${{ matrix.ruby_version }}
|
30
|
-
|
31
|
-
- name: Install dependencies
|
32
|
-
run: bundle install --jobs 4 --retry 3
|
35
|
+
bundler-cache: true
|
33
36
|
|
34
37
|
- name: Run Tests
|
35
|
-
run: bundle exec rake test
|
38
|
+
run: xvfb-run -a bundle exec rake test
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# PdfMatcher::Testing
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/pdf_matcher-testing.svg)](https://badge.fury.io/rb/pdf_matcher-testing)
|
3
4
|
[![Test](https://github.com/hidakatsuya/pdf_matcher-testing/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/hidakatsuya/pdf_matcher-testing/actions/workflows/test.yml)
|
4
5
|
|
5
6
|
This gem allows testing frameworks such as [Test::Unit](https://github.com/test-unit/test-unit), [RSpec](https://github.com/rspec/rspec) and [Minitest](https://github.com/seattlerb/minitest) to perform PDF matching tests with the [pdf_matcher gem](https://github.com/hidakatsuya/pdf_matcher).
|
@@ -74,12 +75,12 @@ assert_match_pdf expected_pdf_data, actual_pdf_data
|
|
74
75
|
|
75
76
|
Expectation:
|
76
77
|
```ruby
|
77
|
-
|
78
|
-
|
79
|
-
|
78
|
+
_(actual_pdf_data).must_match_pdf(expected_pdf_data)
|
79
|
+
_('/path/to/actual.pdf').must_match_pdf('/path/to/expected.pdf')
|
80
|
+
_(Pathname('/path/to/actual.pdf')).must_match_pdf(Pathname('/path/to/expected.pdf'))
|
80
81
|
|
81
82
|
# Generating a difference PDF
|
82
|
-
|
83
|
+
_(actual_pdf_data).must_match_pdf(expected_pdf_data, output_diff: '/path/to/diff.pdf')
|
83
84
|
```
|
84
85
|
|
85
86
|
Or, you can setup the assertion manually as described in Test::Unit.
|
data/pdf_matcher-testing.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.summary = spec.description
|
11
11
|
spec.homepage = 'https://github.com/hidakatsuya/pdf_matcher-testing'
|
12
12
|
spec.license = 'MIT'
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.0.0')
|
14
14
|
|
15
15
|
spec.metadata['homepage_uri'] = spec.homepage
|
16
16
|
spec.metadata['source_code_uri'] = spec.homepage
|
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
|
|
21
21
|
end
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.add_dependency 'pdf_matcher', '>=
|
24
|
+
spec.add_dependency 'pdf_matcher', '>= 2.2.0'
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf_matcher-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katsuya Hidaka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pdf_matcher
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.0
|
27
27
|
description: This gem allows testing frameworks such as Test::Unit, RSpec and Minitest
|
28
28
|
to perform PDF matching tests with the pdf_matcher gem.
|
29
29
|
email:
|
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
62
|
requirements:
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version:
|
65
|
+
version: 3.0.0
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
72
|
+
rubygems_version: 3.4.6
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: This gem allows testing frameworks such as Test::Unit, RSpec and Minitest
|