hackmac 1.4.1 → 1.4.2

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: 52eecabaaacf4b30bdfd2c2d49ca2521d45dd81da1c75f1b3a02af4b94a0d01c
4
- data.tar.gz: d84925f226ff82966a7a42f21143ee273715f013ed7907ab3f28273797b241f6
3
+ metadata.gz: 6edb17b3e73dbb6bc5112bfd85a8bb50c32c9be7e860cc97d11f98bb6a2e9d04
4
+ data.tar.gz: 120072142fb649a5d2cd933e27c0f9b0aeaa6c0d68721ed392e1b39478ae66dd
5
5
  SHA512:
6
- metadata.gz: 0b13786a08e87c4f162d3ce6090115c286f3feaa476aedf354d94e6a74f4e4fb225769d4fb2a3c304eec4fa77423b96e19b5f401ee0631604e4fda816d1c51b8
7
- data.tar.gz: b6bb795279266902645e82382f253c050d2eb0d74c0f2c3ad91f7cf02334f28767727baa86b49d99d9c46081f987c3f12034330b87a7e6a4dd6a5581ef1f57fd
6
+ metadata.gz: 5e78be62b57bdfe29961dd9ce3d334cfa7d6e1abdad8b30be9ecc9c2cd265d5543f992e0eaaf234b490e681e63c5b3f93252cd3c924c43ca3df1beb21df7d814
7
+ data.tar.gz: 219d7eaa6be7ad7776bc13417d5b6314f4b7cfaa99df876b84c33b2960cc60a331577abed1e6d7825feb4209e549de5eacf64c40fbe8b9535da40019f08a8d28
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.1
1
+ 1.4.2
data/hackmac.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: hackmac 1.4.1 ruby lib
2
+ # stub: hackmac 1.4.2 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "hackmac".freeze
6
- s.version = "1.4.1"
6
+ s.version = "1.4.2"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
@@ -2,22 +2,24 @@ require 'complex_config/shortcuts'
2
2
  require 'tins/xt/secure_write'
3
3
  require 'fileutils'
4
4
  require 'pathname'
5
+ require 'term/ansicolor'
5
6
 
6
7
  module Hackmac
7
8
  module Config
8
9
  extend FileUtils
9
10
  extend ComplexConfig::Provider::Shortcuts
11
+ extend Term::ANSIColor
10
12
 
11
13
  DEFAULT = File.read(File.join(File.dirname(__FILE__), 'hackmac.yml'))
12
14
 
13
- def self.load(path: ENV.fetch('CONFIG_PATH', '~/.config/hackmac/hackmac.yml'))
15
+ def self.load(path: ENV.fetch('HACKMAC_CONFIG', '~/.config/hackmac/hackmac.yml'))
14
16
  path = Pathname.new(path).expand_path
15
17
  mkdir_p path.dirname
16
18
  ComplexConfig::Provider.config_dir = path.dirname
17
19
  unless path.exist?
18
20
  File.secure_write(path.to_s, DEFAULT)
19
21
  end
20
- puts "Loading config from #{path.to_s.inspect}."
22
+ puts "Loading config from #{color(33) { path.to_s.inspect} }."
21
23
  ComplexConfig::Provider[path.basename.to_s.sub(/\..*?\z/, '')]
22
24
  end
23
25
  end
data/lib/hackmac/utils.rb CHANGED
@@ -20,6 +20,7 @@ module Hackmac
20
20
  puts "✅ Command succeded!".green
21
21
  else
22
22
  puts "⚠️ Command #{cmd.inspect} failed with exit status #{$?.exitstatus}".on_red.white
23
+ exit $?.exitstatus
23
24
  end
24
25
  if verbose
25
26
  puts output.italic
@@ -1,6 +1,6 @@
1
1
  module Hackmac
2
2
  # Hackmac version
3
- VERSION = '1.4.1'
3
+ VERSION = '1.4.2'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackmac
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank