Skip to content

Commit

Permalink
Merge pull request #182 from Bo98/base64-runtime
Browse files Browse the repository at this point in the history
Avoid need for Base64 gem at runtime
  • Loading branch information
davishmcclurg committed May 25, 2024
2 parents 743f1fe + 927fa03 commit b476026
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ PATH
remote: .
specs:
json_schemer (2.2.1)
base64
bigdecimal
hana (~> 1.3)
regexp_parser (~> 2.0)
Expand Down Expand Up @@ -43,6 +42,7 @@ PLATFORMS
ruby

DEPENDENCIES
base64
bundler (~> 2.0)
csv
i18n
Expand Down
2 changes: 1 addition & 1 deletion json_schemer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 2.5'

spec.add_development_dependency "base64"
spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "minitest", "~> 5.0"
Expand All @@ -30,7 +31,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "i18n"
spec.add_development_dependency "i18n-debug"

spec.add_runtime_dependency "base64"
spec.add_runtime_dependency "bigdecimal"
spec.add_runtime_dependency "hana", "~> 1.3"
spec.add_runtime_dependency "regexp_parser", "~> 2.0"
Expand Down
1 change: 0 additions & 1 deletion lib/json_schemer.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# frozen_string_literal: true
require 'base64'
require 'bigdecimal'
require 'ipaddr'
require 'json'
Expand Down
2 changes: 1 addition & 1 deletion lib/json_schemer/content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module JSONSchemer
module ContentEncoding
BASE64 = proc do |instance|
[true, Base64.strict_decode64(instance)]
[true, instance.unpack1("m0")]
rescue
[false, nil]
end
Expand Down
1 change: 1 addition & 0 deletions test/json_schemer_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'test_helper'
require 'base64'
require 'csv'

class JSONSchemerTest < Minitest::Test
Expand Down

0 comments on commit b476026

Please sign in to comment.