From 6a1f49abe8b7ad5ddf18a3dec5cbcea0e2d89184 Mon Sep 17 00:00:00 2001 From: danigirl329 Date: Thu, 24 Sep 2020 09:33:28 -0400 Subject: [PATCH 1/2] Adds override method binmode to temp_file to make sure the encoding in ASCII-8BIT Refer to https://github.com/frozon/passbook/issues/75 --- .gitignore | 1 + lib/passbook/pkpass.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 155f329..4d2cc8c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ coverage pkg *.gem .bundle +.idea/ diff --git a/lib/passbook/pkpass.rb b/lib/passbook/pkpass.rb index fbd48c0..0608586 100644 --- a/lib/passbook/pkpass.rb +++ b/lib/passbook/pkpass.rb @@ -48,8 +48,8 @@ def create # Return a Tempfile containing our ZipStream def file(options = {}) options[:file_name] ||= 'pass.pkpass' - temp_file = Tempfile.new(options[:file_name]) + temp_file.binmode temp_file.write self.stream.string temp_file.close From e12649ca47e5456c9c129495552337ad27e34cee Mon Sep 17 00:00:00 2001 From: danigirl329 Date: Thu, 24 Sep 2020 10:01:05 -0400 Subject: [PATCH 2/2] Update dependencies: --- Gemfile.lock | 146 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 86 insertions(+), 60 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 22307ad..e683f86 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,79 +1,102 @@ GEM remote: https://rubygems.org/ specs: - activesupport (3.2.14) - i18n (~> 0.6, >= 0.6.4) - multi_json (~> 1.0) - addressable (2.3.6) - builder (3.2.2) - commander (4.1.5) - highline (~> 1.6.11) + activesupport (6.0.3.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) + addressable (2.4.0) + builder (3.2.4) + commander (4.5.2) + highline (~> 2.0.0) + concurrent-ruby (1.1.7) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - diff-lcs (1.2.4) - faraday (0.9.0) + diff-lcs (1.4.4) + docile (1.3.2) + faraday (0.9.2) multipart-post (>= 1.2, < 3) - git (1.2.8) - github_api (0.12.2) - addressable (~> 2.3) + git (1.7.0) + rchardet (~> 1.8) + github_api (0.16.0) + addressable (~> 2.4.0) descendants_tracker (~> 0.0.4) faraday (~> 0.8, < 0.10) - hashie (>= 3.3) - multi_json (>= 1.7.5, < 2.0) - nokogiri (~> 1.6.3) - oauth2 - grocer (0.4.1) - hashie (3.3.2) - highline (1.6.19) - i18n (0.6.5) - jeweler (2.0.1) + hashie (>= 3.4) + mime-types (>= 1.16, < 3.0) + oauth2 (~> 1.0) + grocer (0.7.1) + hashie (4.1.0) + highline (2.0.3) + i18n (1.8.5) + concurrent-ruby (~> 1.0) + jar-dependencies (0.4.1) + jeweler (2.3.9) builder - bundler (>= 1.0) + bundler git (>= 1.2.5) - github_api + github_api (~> 0.16.0) highline (>= 1.6.15) nokogiri (>= 1.5.10) + psych rake rdoc - json (1.8.1) - json (1.8.1-java) - jwt (1.2.0) - mini_portile (0.6.1) - multi_json (1.8.0) - multi_xml (0.5.5) - multipart-post (2.0.0) - nokogiri (1.6.5) - mini_portile (~> 0.6.0) - nokogiri (1.6.5-java) - oauth2 (1.0.0) - faraday (>= 0.8, < 0.10) - jwt (~> 1.0) + semver2 + jwt (2.2.2) + mime-types (2.99.3) + mini_portile2 (2.4.0) + minitest (5.14.2) + multi_json (1.15.0) + multi_xml (0.6.0) + multipart-post (2.1.1) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) + nokogiri (1.10.10-java) + oauth2 (1.4.4) + faraday (>= 0.8, < 2.0) + jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) - rack (~> 1.2) - rack (1.5.2) - rack-test (0.6.2) - rack (>= 1.0) - rake (10.1.0) - rdoc (4.2.0) - json (~> 1.4) - rspec (2.14.1) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - rspec-core (2.14.5) - rspec-expectations (2.14.3) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.3) - rubyzip (1.0.0) - simplecov (0.7.1) - multi_json (~> 1.0) - simplecov-html (~> 0.7.1) - simplecov-html (0.7.1) - terminal-table (1.4.5) - thread_safe (0.3.4) - thread_safe (0.3.4-java) - yard (0.8.7.2) + rack (>= 1.2, < 3) + psych (3.2.0) + psych (3.2.0-java) + jar-dependencies (>= 0.1.7) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rake (13.0.1) + rchardet (1.8.0) + rdoc (6.2.1) + rspec (3.9.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-core (3.9.2) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.3) + rubyzip (2.3.0) + semver2 (3.4.2) + simplecov (0.19.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov-html (0.12.3) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + thread_safe (0.3.6-java) + tzinfo (1.2.7) + thread_safe (~> 0.1) + unicode-display_width (1.7.0) + yard (0.9.25) + zeitwerk (2.4.0) PLATFORMS java @@ -91,3 +114,6 @@ DEPENDENCIES simplecov terminal-table yard + +BUNDLED WITH + 2.1.4