canon 0.1.2 → 0.1.3
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/.rubocop_todo.yml +7 -1
- data/lib/canon/rspec_matchers.rb +5 -2
- data/lib/canon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcf999be5f47b3ee417e783de5b54be7efe27c8123d0b2becaa8263587d224e6
|
4
|
+
data.tar.gz: 86c5c3679003d3b6ff1c96674ba10b7dc5ca6e92b39200b3729170185b030c2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 592cb969e6c55b8b19081f19a412746409b01113bdb1ec638931638606a301d0de360fd25a227681068f3ffbece325b180a85ccc9b5087bebd0b22ee24d67677
|
7
|
+
data.tar.gz: 0e96447cef7283e641218d3be17511d5fb49fa1995013136af1b3c8281d90feada43bcd95316621af01e69b7a065f4dc1635701b0991668a15f72bbdfe81819e
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2025-
|
3
|
+
# on 2025-08-24 10:22:06 UTC using RuboCop version 1.79.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -13,6 +13,12 @@ Gemspec/RequiredRubyVersion:
|
|
13
13
|
Exclude:
|
14
14
|
- 'canon.gemspec'
|
15
15
|
|
16
|
+
# Offense count: 1
|
17
|
+
# This cop supports safe autocorrection (--autocorrect).
|
18
|
+
Layout/EmptyLineAfterGuardClause:
|
19
|
+
Exclude:
|
20
|
+
- 'lib/canon/rspec_matchers.rb'
|
21
|
+
|
16
22
|
# Offense count: 2
|
17
23
|
# This cop supports safe autocorrection (--autocorrect).
|
18
24
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
data/lib/canon/rspec_matchers.rb
CHANGED
@@ -15,14 +15,17 @@ module Canon
|
|
15
15
|
class SerializationMatcher
|
16
16
|
def initialize(expected, format = :xml)
|
17
17
|
@expected = expected
|
18
|
+
unless SUPPORTED_FORMATS.include?(format.to_sym)
|
19
|
+
raise Canon::Error, "Unsupported format: #{format}"
|
20
|
+
end
|
21
|
+
|
18
22
|
@format = format.to_sym
|
19
23
|
@result = nil
|
20
24
|
end
|
21
25
|
|
22
26
|
def matches?(target)
|
23
27
|
@target = target
|
24
|
-
send("match_#{@format}")
|
25
|
-
raise(Canon::Error, "Unsupported format: #{@format}")
|
28
|
+
send("match_#{@format}")
|
26
29
|
rescue NoMethodError
|
27
30
|
raise Canon::Error, "Unsupported format: #{@format}"
|
28
31
|
end
|
data/lib/canon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: compare-xml
|