tebako-runtime 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f44219b114dff0523c1e93f2e7b582e9f27c03d4f61ae4174153c3c194d0f3c
4
- data.tar.gz: 7d2910a4df314703a400237f0c356ad9e1745167fac0505389fb9de657193d1e
3
+ metadata.gz: '08833f4f60b15489d4d367e5724d7b1520338721b15bc3184cd0462c08d7ac65'
4
+ data.tar.gz: 4513ce6c7e65e3514214979435f97ca669866e83a379240c611e3a0772fae26e
5
5
  SHA512:
6
- metadata.gz: 442c6e5430b75eedfb7c3f2631ca4303bcb0fc21f1d3478ac86fdabe1535016c9d797d4a3557cff64dfaeaf0f43de45c4c76b72127dd905757e1f20a1a4582b8
7
- data.tar.gz: 55524bab695d5673294a3d2cf83630814fa1caf8fd31305f1f83670ff17ae775581333534d36c5d8cac861616d6803f3fdc71f4abf8defe1d7f62704ea5fd94b
6
+ metadata.gz: 7dbb52db4e62e45cb0880a1849cacb8f3cfb335bb5ab865cf010f8c5c7be4b45d2b422b8ec39247c92352ce26b025b3f84aec751880c792608df3725ef31f7b1
7
+ data.tar.gz: 39f5592af11d9a95fc0cea1e3e9e6bcd00931eb0bc82e1e52ab113860e2c5f32ae2ea86614e16618d5b2a0390f7b9b104adedf471e0ebc3e84e220a774d91f5e
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2023 [Ribose Inc](https://www.ribose.com).
3
+ # Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
4
4
  # All rights reserved.
5
5
  # This file is a part of tebako
6
6
  #
@@ -29,7 +29,30 @@ require "bundler/gem_tasks"
29
29
  require "rspec/core/rake_task"
30
30
  require "rubocop/rake_task"
31
31
 
32
+ require "net/http"
33
+ require "fileutils"
34
+
35
+ namespace :build do
36
+ desc "Download cacert.pem"
37
+ task :download_cacert do
38
+ url = URI("https://curl.se/ca/cacert.pem")
39
+ FileUtils.mkdir_p("cert")
40
+ Net::HTTP.start(url.host, url.port, use_ssl: url.scheme == "https") do |http|
41
+ request = Net::HTTP::Get.new url
42
+ http.request request do |response|
43
+ open "cert/cacert.pem.mozilla", "w" do |io|
44
+ response.read_body do |chunk|
45
+ io.write chunk
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ task build: "build:download_cacert"
54
+
55
+ task default: ["build:download_cacert", :spec]
56
+
32
57
  RSpec::Core::RakeTask.new(:spec)
33
58
  RuboCop::RakeTask.new
34
-
35
- task default: %i[spec]
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2024 [Ribose Inc](https://www.ribose.com).
4
+ # All rights reserved.
5
+ # This file is a part of tebako
6
+ #
7
+ # Redistribution and use in source and binary forms, with or without
8
+ # modification, are permitted provided that the following conditions
9
+ # are met:
10
+ # 1. Redistributions of source code must retain the above copyright
11
+ # notice, this list of conditions and the following disclaimer.
12
+ # 2. Redistributions in binary form must reproduce the above copyright
13
+ # notice, this list of conditions and the following disclaimer in the
14
+ # documentation and/or other materials provided with the distribution.
15
+ #
16
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18
+ # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
+ # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
20
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26
+ # POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ CACERT_PEM = File.expand_path("#{__dir__}/../../cert/cacert.pem.mozilla")
29
+ CACERT_PEM_TMP = TebakoRuntime.extract_memfs(CACERT_PEM)
30
+
31
+ Net::HTTP.class_eval do
32
+ alias_method :_use_ssl=, :use_ssl=
33
+
34
+ def use_ssl=(boolean)
35
+ self.ca_file = CACERT_PEM_TMP
36
+ self.verify_mode = OpenSSL::SSL::VERIFY_PEER
37
+ self._use_ssl = boolean
38
+ end
39
+ end
@@ -26,5 +26,5 @@
26
26
  # POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  module TebakoRuntime
29
- VERSION = "0.3.1"
29
+ VERSION = "0.4.0"
30
30
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2023 [Ribose Inc](https://www.ribose.com).
3
+ # Copyright (c) 2023-2024 [Ribose Inc](https://www.ribose.com).
4
4
  # All rights reserved.
5
5
  # This file is a part of tebako
6
6
  #
@@ -45,6 +45,7 @@ module TebakoRuntime
45
45
  "jing" => "tebako-runtime/adapters/jing",
46
46
  "mn2pdf" => "tebako-runtime/adapters/mn2pdf",
47
47
  "mnconvert" => "tebako-runtime/adapters/mnconvert",
48
+ "net/http" => "tebako-runtime/adapters/net-http",
48
49
  "sassc" => "tebako-runtime/adapters/sassc"
49
50
  }.freeze
50
51
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tebako-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-29 00:00:00.000000000 Z
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -156,6 +156,7 @@ files:
156
156
  - lib/tebako-runtime/adapters/jing.rb
157
157
  - lib/tebako-runtime/adapters/mn2pdf.rb
158
158
  - lib/tebako-runtime/adapters/mnconvert.rb
159
+ - lib/tebako-runtime/adapters/net-http.rb
159
160
  - lib/tebako-runtime/adapters/sassc.rb
160
161
  - lib/tebako-runtime/memfs.rb
161
162
  - lib/tebako-runtime/pre/seven-zip.rb
@@ -183,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
184
  - !ruby/object:Gem::Version
184
185
  version: '0'
185
186
  requirements: []
186
- rubygems_version: 3.5.3
187
+ rubygems_version: 3.5.9
187
188
  signing_key:
188
189
  specification_version: 4
189
190
  summary: Run-time support of tebako executable packager