chrome-fetcher 0.0.2 → 0.0.8

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/extconf.rb +6 -0
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94852b23c3f66657f8e61aef4fd5cca13afc653f10cc3e21ea250df919a4ee15
4
- data.tar.gz: c757bd3cbd40f0798ca8d2ec86b0d27e7d3c70698a7302b5ccd599d2ce82ded6
3
+ metadata.gz: a260d07b6f23cb0d2430ad56a2eadc7deac80b45d230d02b8ea050d11585367c
4
+ data.tar.gz: fdc8bb70c2dea3230899fd0150c9af497020a8c42e8f3a3ac85cbe72fa01d128
5
5
  SHA512:
6
- metadata.gz: c6af5a9a50badb9b55468192249933391fca6144080f72180a959b46fa614d1b7eba993751cb490d9703312199559f9b51a5581c969188899a1abc701b8012fd
7
- data.tar.gz: b02be94ed07fca31214f8668cab681e4b875236ce39f10b83846149b0099acf5fbd50bd3033b270c6857ce0c2504632980e51a1cf356c5cc2a6c021fc3372961
6
+ metadata.gz: '0844d555dcbd6946af8d3eed050922a5782ad405b298a1de0448b082b9a06c4e5770319eb46f530ad8ea94da56506fd202eceaeae5cddf6e5ff47bd3b6720112'
7
+ data.tar.gz: 71953da08feaf7fa084ffefabe0478b93182f9cf5861e59c867d2b2e00b6d19207b1545fb9fb38b13526b540b81f7e7d1bc46630c15f2ff276d32f8ce2b1f046
data/lib/extconf.rb CHANGED
@@ -4,6 +4,8 @@ chromium_url = "http://commondatastorage.googleapis.com/chromium-browser-snapsho
4
4
  latest_version = Excon.get("#{chromium_url}/LAST_CHANGE").body
5
5
  latest_version_url = "#{chromium_url}/#{latest_version}/chrome-linux.zip"
6
6
 
7
+ # url = "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F961656%2Fchrome-linux.zip?generation=1642723767466615&alt=media"
8
+
7
9
  File.open("#{Dir.pwd}/chrome-linux.zip", "w") { |f| f.write Excon.get(latest_version_url).body }
8
10
  Zip::File.open("#{Dir.pwd}/chrome-linux.zip") do |zip_file|
9
11
  zip_file.each do |f|
@@ -11,7 +13,10 @@ Zip::File.open("#{Dir.pwd}/chrome-linux.zip") do |zip_file|
11
13
  zip_file.extract(f, fpath) unless File.exist?(fpath)
12
14
  end
13
15
  end
16
+
14
17
  File.delete("#{Dir.pwd}/chrome-linux.zip") if File.exist?("#{Dir.pwd}/chrome-linux.zip")
18
+ bin = "#{Dir.pwd}/chrome-linux/chrome"
19
+ `chmod a+x #{bin}`
15
20
  dummy_make_content = "make:\n" \
16
21
  "\t:\n" \
17
22
  "install:\n" \
@@ -20,3 +25,4 @@ dummy_make_content = "make:\n" \
20
25
  "\t:\n"
21
26
  File.write('Makefile', dummy_make_content)
22
27
 
28
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chrome-fetcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marchi Lau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-06 00:00:00.000000000 Z
11
+ date: 2022-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 3.1.6
69
+ rubygems_version: 3.1.4
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: Hola!