svg_guardian 0.0.5-aarch64-linux-musl

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f5fb84ca259d27a4c9617b2b32ecf18c1ae4b65ede24e3ab8392805a52e3add2
4
+ data.tar.gz: 7d614b818be935ff2bdf0ea60f1a60b34dabdeb8d6fe8859608d0f73517817cb
5
+ SHA512:
6
+ metadata.gz: f94749240398e31bea4dcccefa5c8b117e1f9a1e5912c46642b5e5d0229f5d360f33d17b50ec660150f73ed04cb05eb3fbc655837702623ee3a57b9ca6ee0bbf
7
+ data.tar.gz: 1b7c0650ceb63f4a1d9f7d8574c80ae97363e8dcd9546ac5972628b9c3285a7ba835f2c2f9a607610122ef2367b31ae4d556d2a9cb3df46b0493de6d21bbbd7c
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Alex Beznos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # SvgGuardian
2
+
3
+ Tiny wrapper around [svg-hush](https://github.com/cloudflare/svg-hush) to sanitize SVGs.
4
+
5
+ ## Usage
6
+
7
+ Add SvgGuardian to your `Gemfile`:
8
+
9
+ ```
10
+ gem 'svg_guardian'
11
+ ```
12
+
13
+ To sanitize SVG file call `#sanitize` method:
14
+
15
+ ```ruby
16
+ SvgGuardian.sanitize("your svg file content")
17
+ ```
18
+
19
+ ## Development
20
+
21
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
22
+
23
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
24
+
25
+ ## Contributing
26
+
27
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Yuma-AI/svg_guardian.
28
+
29
+ ## License
30
+
31
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+ require "rb_sys/extensiontask"
6
+
7
+ Rake::TestTask.new(:test) do |t|
8
+ t.libs << "test"
9
+ t.libs << "lib"
10
+ t.test_files = FileList["test/**/test_*.rb"]
11
+ end
12
+
13
+ spec = Bundler.load_gemspec("svg_guardian.gemspec")
14
+
15
+ RbSys::ExtensionTask.new("svg_guardian", spec) do |ext|
16
+ ext.lib_dir = "lib/svg_guardian"
17
+ ext.cross_compile = true
18
+ end
19
+
20
+ task build: :compile
21
+ task default: %i[compile test]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SvgGuardian
4
+ VERSION = "0.0.5"
5
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ # load the precompiled extension file
5
+ ruby_version = /(\d+\.\d+)/.match(::RUBY_VERSION)
6
+ require_relative "svg_guardian/#{ruby_version}/svg_guardian"
7
+ rescue LoadError
8
+ require "svg_guardian/svg_guardian"
9
+ end
10
+
11
+ require_relative "svg_guardian/version"
12
+
13
+ module SvgGuardian
14
+ class SanitizeError < StandardError; end
15
+ end
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: svg_guardian
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
5
+ platform: aarch64-linux-musl
6
+ authors:
7
+ - Alex Beznos
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-05-06 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - alex@yuma.ai
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - LICENSE.txt
21
+ - README.md
22
+ - Rakefile
23
+ - lib/svg_guardian.rb
24
+ - lib/svg_guardian/3.1/svg_guardian.so
25
+ - lib/svg_guardian/3.2/svg_guardian.so
26
+ - lib/svg_guardian/3.3/svg_guardian.so
27
+ - lib/svg_guardian/version.rb
28
+ homepage: https://github.com/Yuma-AI/svg_guardian
29
+ licenses:
30
+ - MIT
31
+ metadata:
32
+ homepage_uri: https://github.com/Yuma-AI/svg_guardian
33
+ source_code_uri: https://github.com/Yuma-AI/svg_guardian
34
+ post_install_message:
35
+ rdoc_options: []
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '3.1'
43
+ - - "<"
44
+ - !ruby/object:Gem::Version
45
+ version: 3.4.dev
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 3.3.11
51
+ requirements: []
52
+ rubygems_version: 3.4.4
53
+ signing_key:
54
+ specification_version: 4
55
+ summary: Tiny wrapper around svg-hush to sanitize SVGs.
56
+ test_files: []