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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8731c16240a9a73c7596318b4ff10ba07041f5ad781b035e3cd09c4939e82cee
4
- data.tar.gz: d78fa0d273ef2cad336cec103443b00c7ee41dcd0d5289a30059804b13e5fa43
3
+ metadata.gz: fcf999be5f47b3ee417e783de5b54be7efe27c8123d0b2becaa8263587d224e6
4
+ data.tar.gz: 86c5c3679003d3b6ff1c96674ba10b7dc5ca6e92b39200b3729170185b030c2f
5
5
  SHA512:
6
- metadata.gz: 5e5412a35878e93a86f678d836b723a3ae02f5adc4b5bd1be9b1f1dff4d8ed8f83c6838665ca7d20e8adf3adb1d502d4a97e0c09b4988082fdd20c3cc9c3988f
7
- data.tar.gz: 477ddf5857421cc2eff7444faee2f9becd8afc1e759bed1de6c4e8e657f3a5b8a6e34b573b5f0b347ae401c93cb70d70479db3b0f51ea32f0d8b7a9da91ad460
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-07-29 13:58:20 UTC using RuboCop version 1.79.0.
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.
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Canon
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
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.2
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-07-29 00:00:00.000000000 Z
11
+ date: 2025-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: compare-xml