hackmac 0.4.2 → 0.5.0

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: 7b4c0a270c4ccb95e0cb89a10b52eac46bfbac9e2746c84a8e9c5ce095da9745
4
- data.tar.gz: 2d77b2635c3bca27292616da9f6cbbe485b9f5ed8a68a73882f44290ed4f4b0a
3
+ metadata.gz: e2851fee08cfaeb92db3644dbd04eecb12379c8410f10c75599601f9984d0333
4
+ data.tar.gz: 6678f56e13c11dd0914091afc54328dc10c06546e04019e37a787a37175b4ce4
5
5
  SHA512:
6
- metadata.gz: e1a2cb687120175362d2d7e71bb8352383319d87e81b691cba460854cdf6c39c5d59f6368c8ba9f87f6f92edd9db48599e96f295e3cfa7845140cda99180079b
7
- data.tar.gz: 778a43906f80bd64614efe7b2253f4bd4e35510d673edbf0b6a2114b998d06e19364c14c5979f7003164040d15cbbd5feebb94f944e22833132fb08377f09dd9
6
+ metadata.gz: 1cb71be5755a5d04960cfaf09f16f6584026a0df680e1884b16c597558769b684deb0e546deeaa51ec51d61e4860cc56357012771f1bc05bc9d3761c95e63f87
7
+ data.tar.gz: 3bc28aea413bdcbfcdf3eeb84dd31876c8d34d732a6ffa8be8daa81753214ec4b60c302bc92b6e1abb7b82be7db3bbc7ae59745798fa66313a45c4ecadbf5086
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.5.0
data/bin/efi CHANGED
@@ -92,6 +92,20 @@ def device_name(mdev)
92
92
  end
93
93
  end
94
94
 
95
+ def git_args(default:)
96
+ mdev =
97
+ if ARGV.first == '--'
98
+ ARGV.shift
99
+ device_name(nil)
100
+ else
101
+ device_name(ARGV.shift)
102
+ end
103
+ if ARGV.empty?
104
+ ARGV.unshift(*default)
105
+ end
106
+ mdev
107
+ end
108
+
95
109
  bold_head = -> h { h.sub(/\A[a-z]/) { $&.upcase }.bold }
96
110
 
97
111
  case command = ARGV.shift
@@ -108,6 +122,19 @@ when /\Aun?mount\z/
108
122
  mdev = device_name(ARGV.shift)
109
123
  x %{sudo diskutil unmount "#{mdev}"}
110
124
  # TODO remove /Volumes/mdev if it is a symlink
125
+ when /\Adiff\z/
126
+ mdev = git_args(default: %w[ --color --stat ])
127
+ x %{sudo diskutil mount "#{mdev}"}
128
+ cd "/Volumes/#{mdev}" do
129
+ x %{git diff #{Shellwords.join(ARGV)}}
130
+ end
131
+ when /\Acommit\z/
132
+ mdev = git_args(default: %w[ -v ])
133
+ x %{sudo diskutil mount "#{mdev}"}
134
+ cd "/Volumes/#{mdev}" do
135
+ system %{git commit -a #{Shellwords.join(ARGV)}} and
136
+ x %{ git push }
137
+ end
111
138
  when 'clone'
112
139
  from = ARGV.shift or fail "need from argument"
113
140
  from = device_name(from)
data/hackmac.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: hackmac 0.4.2 ruby lib
2
+ # stub: hackmac 0.5.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "hackmac".freeze
6
- s.version = "0.4.2"
6
+ s.version = "0.5.0"
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]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2020-02-12"
11
+ s.date = "2020-03-05"
12
12
  s.description = "This ruby gem provides some useful tools for working with a Hackintosh.".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["gfxmon".freeze, "usb".freeze, "efi".freeze]
data/lib/hackmac/utils.rb CHANGED
@@ -5,6 +5,7 @@ end
5
5
  require 'tabulo'
6
6
  require 'fileutils'
7
7
  require 'tmpdir'
8
+ require 'shellwords'
8
9
 
9
10
  module Hackmac
10
11
  module Utils
@@ -1,6 +1,6 @@
1
1
  module Hackmac
2
2
  # Hackmac version
3
- VERSION = '0.4.2'
3
+ VERSION = '0.5.0'
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackmac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-12 00:00:00.000000000 Z
11
+ date: 2020-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar