fauxhai-ng 8.3.0 → 8.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fauxhai/.DS_Store +0 -0
- data/lib/fauxhai/fetcher.rb +1 -1
- data/lib/fauxhai/mocker.rb +2 -2
- data/lib/fauxhai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e547762cf60fd566149bf467f0f2b16db192bca52dbd4a1cd6a61625e19af5f6
|
4
|
+
data.tar.gz: fb6043b9da22f12bda8f40845626643a19b265ddd9b18247b934f844b1b248eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a363359b75bb388352b4384d692fc6a2740327cf9e9c28684c20c93b925c519b59abf544f31231a40044c8c98b3583ecdc0dc2db07d396b7b014817351ef69ca
|
7
|
+
data.tar.gz: f6c408a4b9cc72d3be0640bc5e193779567e01514e8e6e1760e0f42854c08f05ffed8daa14f3b86add4dacf772a7a28589eba2d5783a862b4b84c705219fb576
|
data/lib/fauxhai/.DS_Store
CHANGED
Binary file
|
data/lib/fauxhai/fetcher.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "digest/sha1"
|
2
2
|
require "json" unless defined?(JSON)
|
3
|
-
require "net/ssh" unless defined?(Net::SSH)
|
4
3
|
|
5
4
|
module Fauxhai
|
6
5
|
class Fetcher
|
@@ -10,6 +9,7 @@ module Fauxhai
|
|
10
9
|
if !force_cache_miss? && cached?
|
11
10
|
@data = cache
|
12
11
|
else
|
12
|
+
require "net/ssh" unless defined?(Net::SSH)
|
13
13
|
Net::SSH.start(host, user, @options) do |ssh|
|
14
14
|
@data = JSON.parse(ssh.exec!("ohai"))
|
15
15
|
end
|
data/lib/fauxhai/mocker.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "json" unless defined?(JSON)
|
2
2
|
require "pathname" unless defined?(Pathname)
|
3
|
-
require "open-uri"
|
4
3
|
|
5
4
|
module Fauxhai
|
6
5
|
class Mocker
|
@@ -46,8 +45,9 @@ module Fauxhai
|
|
46
45
|
elsif @options[:github_fetching]
|
47
46
|
# Try loading from github (in case someone submitted a PR with a new file, but we haven't
|
48
47
|
# yet updated the gem version). Cache the response locally so it's faster next time.
|
48
|
+
require "open-uri" unless defined?(OpenURI)
|
49
49
|
begin
|
50
|
-
response = open("#{RAW_BASE}/lib/fauxhai/platforms/#{platform}/#{version}.json")
|
50
|
+
response = URI.open("#{RAW_BASE}/lib/fauxhai/platforms/#{platform}/#{version}.json")
|
51
51
|
rescue OpenURI::HTTPError
|
52
52
|
raise Fauxhai::Exception::InvalidPlatform.new("Could not find platform '#{platform}/#{version}' on the local disk and an HTTP error was encountered when fetching from Github. #{PLATFORM_LIST_MESSAGE}")
|
53
53
|
end
|
data/lib/fauxhai/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fauxhai-ng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.3.
|
4
|
+
version: 8.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Vargo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-08-
|
12
|
+
date: 2020-08-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: net-ssh
|