fauxhai 2.1.1 → 2.1.2

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
  SHA1:
3
- metadata.gz: 94a25c817bafd214aef8f069de0ae9c560e3153f
4
- data.tar.gz: 265de3dd520bb26449a41832b5be7f6006e5b76f
3
+ metadata.gz: 89a168b6305590051f991c7c0bc6f72d0807d497
4
+ data.tar.gz: e1fa0dcbfd8ccd671f6c208217ce74ad0c52aae7
5
5
  SHA512:
6
- metadata.gz: a78f4d09650f2a14a2cba85cb852c6e61567455ccda7eaf0373654f7eacf46a254df2b5dc1bfd27956db7efab9b906bc0f22a132a3bfae65fb712fede6ad7038
7
- data.tar.gz: 8efcb5a014d2e8fdec79333a663bed52ed84311d6cdc71fb3ea1389af9ab2e5fbaa4b7e6e5b85446da7ae6fa512f67045e864ebdbf217df89637012a5071310e
6
+ metadata.gz: 12154628b7941446e92800f4468be6ae51f08fbfd737bdfe93a1cc9f9e0b2df59e11e0082d2128b9f44fbca03e4ddd80776a2a246a5c4da59be02c087dd9355f
7
+ data.tar.gz: 9a77c47e7ba4a12fec6a64d44a733b413f79e142acf17c50725ff39653e00c38ad97426d867ed4882440b2f424095389cfdf47743ea1ace30575b3c829e52e8b
@@ -1,6 +1,12 @@
1
1
  Fauxhai Changelog
2
2
  =================
3
3
 
4
+ v2.1.2
5
+ ------
6
+ - Fix an issue when Chef is not installed on the system
7
+ - Add basic --version and --help flags
8
+ - Use fauxhai/version
9
+
4
10
  v2.1.1
5
11
  ------
6
12
  - Switch to OpenURI (#99)
@@ -3,10 +3,21 @@
3
3
  lib = File.expand_path(File.dirname(__FILE__) + '../../lib')
4
4
  $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
5
5
 
6
- require 'fauxhai'
7
- require 'fauxhai/runner'
8
-
9
6
  args = ARGV.dup
10
7
  ARGV.clear
11
8
 
9
+ unless (args & ['-v', '--version']).empty?
10
+ require 'fauxhai/version'
11
+ puts Fauxhai::VERSION
12
+ exit(0)
13
+ end
14
+
15
+ unless (args & ['-h', '--help']).empty?
16
+ puts "Usage: fauxhai"
17
+ puts "(There are no flags or options)"
18
+ exit(0)
19
+ end
20
+
21
+ require 'fauxhai'
22
+ require 'fauxhai/runner'
12
23
  Fauxhai::Runner.new(args)
@@ -1,9 +1,10 @@
1
1
  lib = File.expand_path('../lib', __FILE__)
2
2
  $:.unshift(lib) unless $:.include?(lib)
3
+ require 'fauxhai/version'
3
4
 
4
5
  Gem::Specification.new do |spec|
5
6
  spec.name = 'fauxhai'
6
- spec.version = '2.1.1'
7
+ spec.version = Fauxhai::VERSION
7
8
  spec.authors = ['Seth Vargo']
8
9
  spec.email = ['sethvargo@gmail.com']
9
10
  spec.description = %q{Easily mock out ohai data}
@@ -2,6 +2,7 @@ module Fauxhai
2
2
  require 'fauxhai/exception'
3
3
  require 'fauxhai/fetcher'
4
4
  require 'fauxhai/mocker'
5
+ require 'fauxhai/version'
5
6
 
6
7
  def self.root
7
8
  @@root ||= File.expand_path('../../', __FILE__)
@@ -33,6 +33,8 @@ module Fauxhai
33
33
  end
34
34
 
35
35
  def chef_packages
36
+ return {} if @system.data['chef_packages'].nil?
37
+
36
38
  chef_version = @system.data['chef_packages']['chef']['version']
37
39
  ohai_version = @system.data['chef_packages']['ohai']['version']
38
40
 
@@ -0,0 +1,3 @@
1
+ module Fauxhai
2
+ VERSION = '2.1.2'
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fauxhai
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Vargo
@@ -135,6 +135,7 @@ files:
135
135
  - lib/fauxhai/platforms/ubuntu/14.04.json
136
136
  - lib/fauxhai/platforms/windows/2008R2.json
137
137
  - lib/fauxhai/runner.rb
138
+ - lib/fauxhai/version.rb
138
139
  - tmp/.gitkeep
139
140
  homepage: https://github.com/customink/fauxhai
140
141
  licenses: