adhd_osx 0.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/adhd_osx.rb +18 -0
  3. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 769e5701b127dfc3d8b55be22c1d02e4c7b98993
4
+ data.tar.gz: 9a66693253316d68ef3ae219c27f0b2e184e76f4
5
+ SHA512:
6
+ metadata.gz: 0ad8e03203080c29dc7ad44abdaa6cad03112dc53c3d32e05d1e99f832c6065e49323ae01759aeb37cd03ab9a6a6f19ae0b09c5b86e7612aed7ae9eb9e5f354e
7
+ data.tar.gz: 245f230c41db53ccb440b138b3f9cdef0d50ede10771b3ec78c2e7a1fbf2066c56d2975054951edd4eb71b7880fcc8533305d208a3ee0b4a6aa70b9411c78321
data/lib/adhd_osx.rb ADDED
@@ -0,0 +1,18 @@
1
+ module Adhd_Osx
2
+ class Adhd_Osx::Notification
3
+
4
+ # Displays a notification in OS X Notification Center
5
+ #
6
+ def self.notify(text, **hash)
7
+ command = 'osascript -e \'display notification "%s"' % text
8
+ command += 'with title "%s"' % hash[:title] if hash[:title]
9
+ command += 'subtitle "%s"' % hash[:subtitle] if hash[:subtitle]
10
+ command += 'sound name "%s"' % hash[:sound] if hash[:sound]
11
+ command += "\'"
12
+ exec command
13
+ end
14
+
15
+ end
16
+
17
+ end
18
+
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: adhd_osx
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Matthias Winkelmann
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A minimal ruby interface to the OS X Notification Center. It uses the
14
+ shell execution of Applescript
15
+ email: matthias.winkelmann@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/adhd_osx.rb
21
+ homepage: https://github.com/MatthiasWinkelmann/adhd-osx
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.4.8
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Ruby Interface to the OS X Notification Center
45
+ test_files: []