nokogiri-xmlsec-instructure 0.10.3 → 0.11.0

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/ext/nokogiri_ext_xmlsec/extconf.rb +8 -16
  3. data/lib/nokogiri-xmlsec.rb +3 -1
  4. data/lib/nokogiri_ext_xmlsec.bundle +0 -0
  5. data/lib/xmlsec/version.rb +3 -1
  6. data/lib/xmlsec.rb +99 -88
  7. metadata +11 -181
  8. data/.github/workflows/push.yml +0 -40
  9. data/.gitignore +0 -23
  10. data/.rspec +0 -2
  11. data/.tool-versions +0 -1
  12. data/Appraisals +0 -9
  13. data/Gemfile +0 -4
  14. data/Guardfile +0 -13
  15. data/LICENSE.txt +0 -22
  16. data/README.md +0 -132
  17. data/Rakefile +0 -30
  18. data/ext/nokogiri_ext_xmlsec/common.h +0 -13
  19. data/ext/nokogiri_ext_xmlsec/init.c +0 -71
  20. data/ext/nokogiri_ext_xmlsec/nokogiri_decrypt_with_key.c +0 -84
  21. data/ext/nokogiri_ext_xmlsec/nokogiri_encrypt_with_key.c +0 -210
  22. data/ext/nokogiri_ext_xmlsec/nokogiri_helpers_set_attribute_id.c +0 -93
  23. data/ext/nokogiri_ext_xmlsec/nokogiri_init.c +0 -30
  24. data/ext/nokogiri_ext_xmlsec/nokogiri_sign.c +0 -254
  25. data/ext/nokogiri_ext_xmlsec/nokogiri_verify_with.c +0 -261
  26. data/ext/nokogiri_ext_xmlsec/options.c +0 -166
  27. data/ext/nokogiri_ext_xmlsec/options.h +0 -36
  28. data/ext/nokogiri_ext_xmlsec/shutdown.c +0 -12
  29. data/ext/nokogiri_ext_xmlsec/util.c +0 -140
  30. data/ext/nokogiri_ext_xmlsec/util.h +0 -42
  31. data/ext/nokogiri_ext_xmlsec/xmlsecrb.h +0 -49
  32. data/gemfiles/nokogiri_12.5.gemfile +0 -7
  33. data/gemfiles/nokogiri_13.10.gemfile +0 -7
  34. data/nokogiri-xmlsec-instructure.gemspec +0 -41
  35. data/spec/fixtures/cert/server.crt +0 -14
  36. data/spec/fixtures/cert/server.csr +0 -11
  37. data/spec/fixtures/cert/server.key.decrypted +0 -15
  38. data/spec/fixtures/cert/server.key.encrypted +0 -18
  39. data/spec/fixtures/hate.xml +0 -7
  40. data/spec/fixtures/pwned.xml +0 -1
  41. data/spec/fixtures/rsa.pem +0 -15
  42. data/spec/fixtures/rsa.pub +0 -6
  43. data/spec/fixtures/sign2-doc.xml +0 -6
  44. data/spec/fixtures/sign2-result.xml +0 -25
  45. data/spec/fixtures/sign3-result.xml +0 -39
  46. data/spec/lib/nokogiri/xml/document/encryption_and_decryption_spec.rb +0 -55
  47. data/spec/lib/nokogiri/xml/document/signing_and_verifying_spec.rb +0 -122
  48. data/spec/lib/nokogiri/xml/document/unsafe_xml_spec.rb +0 -61
  49. data/spec/spec_helper.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d80bf299c2e7900122535982dfde8b7b6ab67ea53528b0b055c3758b9b9753f
4
- data.tar.gz: 379cbbff6fc67ac23cf9d604d15aea36f79e58418b034dcf5e5b45db3c86a739
3
+ metadata.gz: 843456670b3bea9cf24ae319ed866f9e085dcbf22517d22dc335ea0754f8f1fe
4
+ data.tar.gz: 58aab0e864beb3d8fc3e9797b9e4de712af966e5ce6600d36f49f5985ca95c2f
5
5
  SHA512:
6
- metadata.gz: e87ccfb10dfc8d9afe6964c58f4a56179fde5faa0ab007fb8bb5b62a038d6bc609d7f96efc09fbc394d3e51af568f3134133d87d5a843d6a456fe949dca464c2
7
- data.tar.gz: 705acc4113dc8380a29c3ef001a19eceda6a128e9c08441a3ebd9f135452f5d0a22419d8cfdd64f2002841132687f10f84af09fe998d19f701aeff5d4860e21a
6
+ metadata.gz: 571f6b0e616f19ce064737e4513859b46e23cc801d567e82570b7fdfd5e76195a7ce807ba9ff1b4a96aa524d4d2a0f8fd88810788db9f4a09257f0c989cd37de
7
+ data.tar.gz: 8ee70b09587e4ac79a7202c1798c06e6c6257cdb0c63cc0ebdf20abf223b3fbb22bd95b5af72efb8db081627c53c3b64dbea8471ce5cc2472f8cfc9bb1f2244a
@@ -1,22 +1,14 @@
1
- require 'mkmf'
2
- require 'nokogiri'
1
+ # frozen_string_literal: true
3
2
 
4
- def barf message = 'dependencies not met'
5
- raise message
6
- end
3
+ require "mkmf"
4
+ require "nokogiri"
7
5
 
8
- barf unless have_header('ruby.h')
6
+ abort unless pkg_config("xmlsec1")
7
+ append_cflags("-fvisibility=hidden")
9
8
 
10
- pkg_config('xmlsec1')
11
- $CFLAGS << " " + `xmlsec1-config --cflags`.strip
12
- $CFLAGS << " -fvisibility=hidden"
13
-
14
- $CFLAGS << Dir[Gem.loaded_specs['nokogiri'].full_gem_path + "/ext/*"].map { |dir| " -I#{dir}"}.join("")
15
-
16
- puts "Cflags: #{$CFLAGS}"
17
- $libs = `xmlsec1-config --libs`.strip
9
+ abort unless find_header("nokogiri.h", *Dir["#{Gem.loaded_specs["nokogiri"].full_gem_path}/ext/*"])
18
10
 
19
11
  # We reference symbols out of nokogiri but don't link directly against it
20
- $LDFLAGS << ' -Wl,-undefined,dynamic_lookup'
12
+ append_ldflags(["-Wl", "-undefined,dynamic_lookup"])
21
13
 
22
- create_makefile('nokogiri_ext_xmlsec')
14
+ create_makefile("nokogiri_ext_xmlsec")
@@ -1 +1,3 @@
1
- require 'xmlsec'
1
+ # frozen_string_literal: true
2
+
3
+ require "xmlsec"
Binary file
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Xmlsec
2
- VERSION = '0.10.3'
4
+ VERSION = "0.11.0"
3
5
  end
data/lib/xmlsec.rb CHANGED
@@ -1,103 +1,114 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "xmlsec/version"
2
- require 'nokogiri'
3
- require 'nokogiri_ext_xmlsec'
4
+ require "nokogiri"
5
+ require "nokogiri_ext_xmlsec"
4
6
 
5
- class Nokogiri::XML::Document
6
- def sign! opts
7
- root.sign! opts
8
- self
9
- end
7
+ module Nokogiri
8
+ module XML
9
+ class Document
10
+ def sign!(opts)
11
+ root.sign! opts
12
+ self
13
+ end
10
14
 
11
- # Verifies the signature on the current document.
12
- #
13
- # Returns `true` if the signature is valid, `false` otherwise.
14
- #
15
- # Examples:
16
- #
17
- # # Try to validate with the given public or private key
18
- # doc.verify_with key: 'rsa-key'
19
- #
20
- # # Try to validate with a set of keys. It will try to match
21
- # # based on the contents of the `KeyName` element.
22
- # doc.verify_with({
23
- # 'key-name' => 'x509 certificate',
24
- # 'another-key-name' => 'rsa-public-key'
25
- # })
26
- #
27
- # # Try to validate with a trusted certificate
28
- # doc.verify_with(cert: 'certificate')
29
- #
30
- # # Try to validate with a set of certificates, any one of which
31
- # # can match
32
- # doc.verify_with(certs: ['cert1', 'cert2'])
33
- #
34
- # # Validate the signature, checking the certificate validity as of
35
- # # a certain time (anything that's convertible to an integer, such as a Time)
36
- # doc.verify_with(cert: 'certificate', verification_time: message_creation_timestamp)
37
- #
38
- # # Validate the signature, but don't validate that the certificate is valid,
39
- # # or has a full trust chain
40
- # doc.verify_with(cert: 'certificate', verify_certificates: false)
41
- #
42
- def verify_with opts_or_keys
43
- first_signature = root.at_xpath("//ds:Signature", 'ds' => "http://www.w3.org/2000/09/xmldsig#")
44
- raise XMLSec::VerificationError("start node not found") unless first_signature
15
+ # Verifies the signature on the current document.
16
+ #
17
+ # Returns `true` if the signature is valid, `false` otherwise.
18
+ #
19
+ # Examples:
20
+ #
21
+ # # Try to validate with the given public or private key
22
+ # doc.verify_with key: 'rsa-key'
23
+ #
24
+ # # Try to validate with a set of keys. It will try to match
25
+ # # based on the contents of the `KeyName` element.
26
+ # doc.verify_with({
27
+ # 'key-name' => 'x509 certificate',
28
+ # 'another-key-name' => 'rsa-public-key'
29
+ # })
30
+ #
31
+ # # Try to validate with a trusted certificate
32
+ # doc.verify_with(cert: 'certificate')
33
+ #
34
+ # # Try to validate with a set of certificates, any one of which
35
+ # # can match
36
+ # doc.verify_with(certs: ['cert1', 'cert2'])
37
+ #
38
+ # # Validate the signature, checking the certificate validity as of
39
+ # # a certain time (anything that's convertible to an integer, such as a Time)
40
+ # doc.verify_with(cert: 'certificate', verification_time: message_creation_timestamp)
41
+ #
42
+ # # Validate the signature, but don't validate that the certificate is valid,
43
+ # # or has a full trust chain
44
+ # doc.verify_with(cert: 'certificate', verify_certificates: false)
45
+ #
46
+ def verify_with(opts_or_keys)
47
+ first_signature = root.at_xpath("//ds:Signature", "ds" => "http://www.w3.org/2000/09/xmldsig#")
48
+ raise XMLSec::VerificationError("start node not found") unless first_signature
45
49
 
46
- first_signature.verify_with(opts_or_keys)
47
- end
50
+ first_signature.verify_with(opts_or_keys)
51
+ end
48
52
 
49
- # Attempts to verify the signature of this document using only certificates
50
- # installed on the system. This is equivalent to calling
51
- # `verify_with certificates: []` (that is, an empty array).
52
- #
53
- def verify_signature
54
- verify_with(certs: [])
55
- end
53
+ # Attempts to verify the signature of this document using only certificates
54
+ # installed on the system. This is equivalent to calling
55
+ # `verify_with certificates: []` (that is, an empty array).
56
+ #
57
+ def verify_signature
58
+ verify_with(certs: [])
59
+ end
56
60
 
57
- # Encrypts the current document, then returns it.
58
- #
59
- # Examples:
60
- #
61
- # # encrypt with a public key and optional key name
62
- # doc.encrypt! key: 'public-key', name: 'name'
63
- #
64
- def encrypt!(key:, name: nil, **opts)
65
- root.encrypt_with(key: key, name: name, **opts)
66
- self
67
- end
61
+ # Encrypts the current document, then returns it.
62
+ #
63
+ # Examples:
64
+ #
65
+ # # encrypt with a public key and optional key name
66
+ # doc.encrypt! key: 'public-key', name: 'name'
67
+ #
68
+ def encrypt!(key:, name: nil, **)
69
+ root.encrypt_with(key:, name:, **)
70
+ self
71
+ end
68
72
 
69
- # Decrypts the current document, then returns it.
70
- #
71
- # Examples:
72
- #
73
- # # decrypt with a specific private key
74
- # doc.decrypt! key: 'private-key'
75
- # # pass the key as an OpenSSL PKey object
76
- # doc.decrypt! key: OpenSSL::PKey.read('private-key')
77
- #
78
- def decrypt! opts
79
- first_encrypted_node = root.at_xpath("//xenc:EncryptedData", 'xenc' => "http://www.w3.org/2001/04/xmlenc#")
80
- raise XMLSec::DecryptionError("start node not found") unless first_encrypted_node
73
+ # Decrypts the current document, then returns it.
74
+ #
75
+ # Examples:
76
+ #
77
+ # # decrypt with a specific private key
78
+ # doc.decrypt! key: 'private-key'
79
+ # # pass the key as an OpenSSL PKey object
80
+ # doc.decrypt! key: OpenSSL::PKey.read('private-key')
81
+ #
82
+ def decrypt!(opts)
83
+ first_encrypted_node = root.at_xpath("//xenc:EncryptedData", "xenc" => "http://www.w3.org/2001/04/xmlenc#")
84
+ raise XMLSec::DecryptionError("start node not found") unless first_encrypted_node
81
85
 
82
- first_encrypted_node.decrypt_with opts
83
- self
86
+ first_encrypted_node.decrypt_with opts
87
+ self
88
+ end
89
+ end
84
90
  end
85
91
  end
86
92
 
87
- class Nokogiri::XML::Node
88
- def encrypt_with(key:, name: nil, **opts)
89
- raise ArgumentError("public :key is required for encryption") unless key
90
- encrypt_with_key(name, key, opts)
91
- end
93
+ module Nokogiri
94
+ module XML
95
+ class Node
96
+ def encrypt_with(key:, name: nil, **opts)
97
+ raise ArgumentError("public :key is required for encryption") unless key
98
+
99
+ encrypt_with_key(name, key, opts)
100
+ end
92
101
 
93
- def decrypt_with(opts)
94
- raise 'inadequate options specified for decryption' unless opts[:key]
102
+ def decrypt_with(opts)
103
+ raise "inadequate options specified for decryption" unless opts[:key]
95
104
 
96
- parent = self.parent
97
- previous = self.previous
98
- key = opts[:key]
99
- key = key.to_pem if key.respond_to?(:to_pem)
100
- decrypt_with_key(opts[:name].to_s, key)
101
- previous ? previous.next : parent.children.first
105
+ parent = self.parent
106
+ previous = self.previous
107
+ key = opts[:key]
108
+ key = key.to_pem if key.respond_to?(:to_pem)
109
+ decrypt_with_key(opts[:name].to_s, key)
110
+ previous ? previous.next : parent.children.first
111
+ end
112
+ end
102
113
  end
103
114
  end
metadata CHANGED
@@ -1,142 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri-xmlsec-instructure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert J. Wong
8
8
  - Cody Cutrer
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2025-01-08 00:00:00.000000000 Z
11
+ date: 2025-07-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nokogiri
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: 1.11.2
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- version: 1.11.2
28
- - !ruby/object:Gem::Dependency
29
- name: appraisal
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- version: '0'
42
- - !ruby/object:Gem::Dependency
43
- name: bundler
44
15
  requirement: !ruby/object:Gem::Requirement
45
16
  requirements:
46
17
  - - "~>"
47
18
  - !ruby/object:Gem::Version
48
- version: '2.1'
49
- type: :development
19
+ version: '1.13'
20
+ type: :runtime
50
21
  prerelease: false
51
22
  version_requirements: !ruby/object:Gem::Requirement
52
23
  requirements:
53
24
  - - "~>"
54
25
  - !ruby/object:Gem::Version
55
- version: '2.1'
56
- - !ruby/object:Gem::Dependency
57
- name: byebug
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- - !ruby/object:Gem::Dependency
71
- name: rake
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: rake-compiler
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- - !ruby/object:Gem::Dependency
99
- name: rspec
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
- - !ruby/object:Gem::Dependency
113
- name: guard-rspec
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: guard-rake
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- version: '0'
133
- type: :development
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- version: '0'
26
+ version: '1.13'
140
27
  description: |-
141
28
  Adds support to Ruby for encrypting, decrypting,
142
29
  signing and validating the signatures of XML documents, according to the
@@ -154,57 +41,16 @@ extensions:
154
41
  - ext/nokogiri_ext_xmlsec/extconf.rb
155
42
  extra_rdoc_files: []
156
43
  files:
157
- - ".github/workflows/push.yml"
158
- - ".gitignore"
159
- - ".rspec"
160
- - ".tool-versions"
161
- - Appraisals
162
- - Gemfile
163
- - Guardfile
164
- - LICENSE.txt
165
- - README.md
166
- - Rakefile
167
- - ext/nokogiri_ext_xmlsec/common.h
168
44
  - ext/nokogiri_ext_xmlsec/extconf.rb
169
- - ext/nokogiri_ext_xmlsec/init.c
170
- - ext/nokogiri_ext_xmlsec/nokogiri_decrypt_with_key.c
171
- - ext/nokogiri_ext_xmlsec/nokogiri_encrypt_with_key.c
172
- - ext/nokogiri_ext_xmlsec/nokogiri_helpers_set_attribute_id.c
173
- - ext/nokogiri_ext_xmlsec/nokogiri_init.c
174
- - ext/nokogiri_ext_xmlsec/nokogiri_sign.c
175
- - ext/nokogiri_ext_xmlsec/nokogiri_verify_with.c
176
- - ext/nokogiri_ext_xmlsec/options.c
177
- - ext/nokogiri_ext_xmlsec/options.h
178
- - ext/nokogiri_ext_xmlsec/shutdown.c
179
- - ext/nokogiri_ext_xmlsec/util.c
180
- - ext/nokogiri_ext_xmlsec/util.h
181
- - ext/nokogiri_ext_xmlsec/xmlsecrb.h
182
- - gemfiles/nokogiri_12.5.gemfile
183
- - gemfiles/nokogiri_13.10.gemfile
184
45
  - lib/nokogiri-xmlsec.rb
46
+ - lib/nokogiri_ext_xmlsec.bundle
185
47
  - lib/xmlsec.rb
186
48
  - lib/xmlsec/version.rb
187
- - nokogiri-xmlsec-instructure.gemspec
188
- - spec/fixtures/cert/server.crt
189
- - spec/fixtures/cert/server.csr
190
- - spec/fixtures/cert/server.key.decrypted
191
- - spec/fixtures/cert/server.key.encrypted
192
- - spec/fixtures/hate.xml
193
- - spec/fixtures/pwned.xml
194
- - spec/fixtures/rsa.pem
195
- - spec/fixtures/rsa.pub
196
- - spec/fixtures/sign2-doc.xml
197
- - spec/fixtures/sign2-result.xml
198
- - spec/fixtures/sign3-result.xml
199
- - spec/lib/nokogiri/xml/document/encryption_and_decryption_spec.rb
200
- - spec/lib/nokogiri/xml/document/signing_and_verifying_spec.rb
201
- - spec/lib/nokogiri/xml/document/unsafe_xml_spec.rb
202
- - spec/spec_helper.rb
203
49
  homepage: https://github.com/instructure/nokogiri-xmlsec-instructure
204
50
  licenses:
205
51
  - MIT
206
- metadata: {}
207
- post_install_message:
52
+ metadata:
53
+ rubygems_mfa_required: 'true'
208
54
  rdoc_options: []
209
55
  require_paths:
210
56
  - lib
@@ -212,31 +58,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
212
58
  requirements:
213
59
  - - ">="
214
60
  - !ruby/object:Gem::Version
215
- version: '0'
61
+ version: '3.2'
216
62
  required_rubygems_version: !ruby/object:Gem::Requirement
217
63
  requirements:
218
64
  - - ">="
219
65
  - !ruby/object:Gem::Version
220
66
  version: '0'
221
67
  requirements: []
222
- rubygems_version: 3.5.11
223
- signing_key:
68
+ rubygems_version: 3.6.2
224
69
  specification_version: 4
225
70
  summary: Wrapper around http://www.aleksey.com/xmlsec to support XML encryption, decryption,
226
71
  signing and signature validation in Ruby
227
- test_files:
228
- - spec/fixtures/cert/server.crt
229
- - spec/fixtures/cert/server.csr
230
- - spec/fixtures/cert/server.key.decrypted
231
- - spec/fixtures/cert/server.key.encrypted
232
- - spec/fixtures/hate.xml
233
- - spec/fixtures/pwned.xml
234
- - spec/fixtures/rsa.pem
235
- - spec/fixtures/rsa.pub
236
- - spec/fixtures/sign2-doc.xml
237
- - spec/fixtures/sign2-result.xml
238
- - spec/fixtures/sign3-result.xml
239
- - spec/lib/nokogiri/xml/document/encryption_and_decryption_spec.rb
240
- - spec/lib/nokogiri/xml/document/signing_and_verifying_spec.rb
241
- - spec/lib/nokogiri/xml/document/unsafe_xml_spec.rb
242
- - spec/spec_helper.rb
72
+ test_files: []
@@ -1,40 +0,0 @@
1
- name: Ruby
2
-
3
- on:
4
- push:
5
- branches: [ master ]
6
- pull_request:
7
- branches: [ master ]
8
-
9
- jobs:
10
- test:
11
-
12
- runs-on: ubuntu-latest
13
-
14
- strategy:
15
- fail-fast: false
16
- matrix:
17
- ruby-version: [3.0, 2.7]
18
- gemfile: ['gemfiles/nokogiri_13.10.gemfile', 'gemfiles/nokogiri_12.5.gemfile']
19
-
20
- steps:
21
- - name: Install libxmlsec
22
- run: |
23
- sudo apt-get update
24
- sudo apt-get install -y libxmlsec1-dev
25
- - uses: actions/checkout@v3
26
- - name: Set up Ruby
27
- uses: ruby/setup-ruby@v1
28
- with:
29
- ruby-version: ${{ matrix.ruby-version }}
30
- bundler-cache: true
31
- env:
32
- BUNDLE_GEMFILE: ${{ matrix.gemfile }}
33
- - name: Install dependencies
34
- run: bundle install
35
- env:
36
- BUNDLE_GEMFILE: ${{ matrix.gemfile }}
37
- - name: Run tests
38
- run: bundle exec rake
39
- env:
40
- BUNDLE_GEMFILE: ${{ matrix.gemfile }}
data/.gitignore DELETED
@@ -1,23 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .byebug_history
5
- .config
6
- .yardoc
7
- Gemfile.lock
8
- InstalledFiles
9
- _yardoc
10
- coverage
11
- doc/
12
- lib/bundler/man
13
- lib/nokogiri_ext_xmlsec.bundle
14
- pkg
15
- rdoc
16
- spec/reports
17
- test/tmp
18
- test/version_tmp
19
- tmp
20
- spec/old
21
- *.so
22
- *.sw[opn]
23
- *.gemfile.lock
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
-
data/.tool-versions DELETED
@@ -1 +0,0 @@
1
- ruby 3.0.4
data/Appraisals DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- appraise "nokogiri-13.10" do
4
- gem "nokogiri", "1.13.10"
5
- end
6
-
7
- appraise "nokogiri-12.5" do
8
- gem "nokogiri", "1.12.5"
9
- end
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in xmlsec.gemspec
4
- gemspec
data/Guardfile DELETED
@@ -1,13 +0,0 @@
1
- # A sample Guardfile
2
- # More info at https://github.com/guard/guard#readme
3
-
4
- guard 'rake', :task => 'default' do
5
- watch(/^ext\//)
6
- end
7
-
8
- guard 'rspec' do
9
- watch(%r{^spec/.+_spec\.rb$})
10
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
11
- watch('spec/spec_helper.rb') { "spec" }
12
- # watch(/^ext\//) { "spec" }
13
- end
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2013 TODO: Write your name
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.