chromate-rb 0.0.5.pre → 0.0.6.pre

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a6e0c59bba0d3151b4c9410a45b0451a794d671a0ec2ef31f45c896fcc8105e
4
- data.tar.gz: 826cc7d89807105021ef7c7ae46b6fad6883184e7f37cfa5ebc91d63a7c5238b
3
+ metadata.gz: adcd20017c87a89e95877b60e3841a0a1b198bc37adedbfe0f4278c7b61b2946
4
+ data.tar.gz: cbaaca5361715c5683804007b5bb305417056924e37f4d08da224a8f014abee5
5
5
  SHA512:
6
- metadata.gz: 582e41f8faa35e13e2375e54461183b755df726bce5127de7994e6b355839148ab7b33f6500ac52688c3f202c5a80f03482cf02e671c60ae93f6f83dc1eb49e8
7
- data.tar.gz: dd086276079a8e70509e5805c9a24464237dcc8347aedd8a02e65117b08ff1e0ed09a8e2381342373f06e85c6a34cbbd71b2cc96230b0c9ff0a35972d601edda
6
+ metadata.gz: c084f6add0ca1a8333cbd567707bc3d2e640bd964d9cfd965bb7a3182517d8b9343c62279f14600802d1e9ac5509f2b73aa74696f49348fcd3d40987ec68221b
7
+ data.tar.gz: be9688e57273b947e08bc4c1091f0632036001e21067db5bc6a63cbe1947d1b87a496a806a5d0ea95fdc704ca3fe6ecef81e04c07ffecd4b1dfc95ce77eea8c8
@@ -12,7 +12,7 @@ module BotBrowser
12
12
  version ||= versions.keys.first
13
13
  profile ||= profiles[version].keys.first
14
14
  version = version.to_sym
15
- binary_path = download_file(versions[version][platform], "/tmp/botbrowser_#{version}_#{platform}.dmg")
15
+ binary_path = download_file(versions[version][platform], "/tmp/botbrowser_#{version}_#{platform}.#{extension(platform)}")
16
16
  profile_path = download_file(profiles[version][profile], "/tmp/botbrowser_#{version}_#{platform}.json")
17
17
 
18
18
  [binary_path, profile_path]
@@ -25,6 +25,19 @@ module BotBrowser
25
25
  path
26
26
  end
27
27
 
28
+ def extension(platform)
29
+ case platform
30
+ when :mac
31
+ 'dmg'
32
+ when :linux
33
+ 'deb'
34
+ when :windows
35
+ '7z'
36
+ else
37
+ raise 'Unsupported platform'
38
+ end
39
+ end
40
+
28
41
  def versions
29
42
  {
30
43
  v132: {
@@ -86,8 +86,8 @@ module BotBrowser
86
86
  end
87
87
 
88
88
  def install_binary_linux(binary_path)
89
- Chromate::Binary.run('sudo', ['dpkg', '-i', binary_path])
90
- Chromate::Binary.run('sudo', ['apt-get', 'install', '-f'])
89
+ Chromate::Binary.run('dpkg', ['-i', binary_path])
90
+ Chromate::Binary.run('apt-get', ['install', '-f'])
91
91
 
92
92
  '/usr/bin/chromium'
93
93
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chromate
4
- VERSION = '0.0.5.pre'
4
+ VERSION = '0.0.6.pre'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chromate-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.pre
4
+ version: 0.0.6.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eth3rnit3