chris_lib 1.1.4 → 1.1.5

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: 26df390957f20f20441a3da82c65e6fa68731a8068125770243351728e1308ff
4
- data.tar.gz: 5c13712b08730ed559809aeba40b7e804c9a7a60e1244512c88ee1ca5338fb84
3
+ metadata.gz: f27e8c1d357690c572ec24efd5ef5933d0699f514808b9cc0ee6b9852e772edb
4
+ data.tar.gz: fb46802d3e5ea9a3075f7667e9eaa0a3fd9095f88c956146e305b6f8bbfa61ab
5
5
  SHA512:
6
- metadata.gz: 5ac1fa114466fbc2cdd5b3cd023e36150ad78914b90df118a94fc9005a097a68832757e18e6ad97f021c347d323b75cfaad2d4ae7dce2b124a42ce64399b23f9
7
- data.tar.gz: c3f5f7bc4dbc27bbc5be8234b71801a4d52cdb7ee001c812ed69309ae1e749e3b7eaf0579e8e195f7f80af03917d87cd78b7293009e822d2e9afc824a0316b79
6
+ metadata.gz: 8d0ed857fef8a490066f28941d994a0f3175dded021f6fcdcd6f28c2ab6b228a57bb4aa1fe45fa65330dcd19cf6602b83357413fe8e49dde9d37a2fd67a31161
7
+ data.tar.gz: c6e1ba3d37f9b0c1cc10fa6ad40f5708c04ea245acf941f2faeb1f135ceae942e90c39a121c0327f6027480d9c94e9a79a981ca7b111fafb995ebd4e3852de44
@@ -9,7 +9,7 @@ module ShellMethods
9
9
  `stat -f%z #{file_path}`.to_i
10
10
  end
11
11
 
12
- def imessage_admin(msg)
12
+ def osx_imessage_admin(msg)
13
13
  `osascript -e 'tell application "Messages" to send "#{msg}" to buddy "admin"'`
14
14
  end
15
15
 
@@ -17,6 +17,16 @@ module ShellMethods
17
17
  `osascript -e 'display notification "#{msg}" with title "#{title}"'`
18
18
  end
19
19
 
20
+ def osx_hostname
21
+ `hostname`
22
+ end
23
+
24
+ # mail to osx user
25
+ # https://stackoverflow.com/q/41602984/1299362
26
+ def osx_send_mail(subject, body = nil)
27
+ `echo "#{body}" | mail -s "#{subject}" 'Chris'`
28
+ end
29
+
20
30
  def parse_options
21
31
  @options = {}
22
32
  OptionParser.new do |opts|
@@ -1,3 +1,3 @@
1
1
  module ChrisLib
2
- VERSION = "1.1.4"
2
+ VERSION = "1.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chris_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-30 00:00:00.000000000 Z
11
+ date: 2019-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv