grants_library 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2c7d9a7cb5c495c6ef3d45cc84f6977dafa3d958
4
+ data.tar.gz: a1117716f1969cf9eea62d35bd7389cacac8651d
5
+ SHA512:
6
+ metadata.gz: 4d6a2782d3d294b4bf1cf9d8185df764a46a96ebdf31847432cb08639b476c641483f01b99b1d8c5e21a90a720ba0470dce7f94050c2c1a773a4b4f563b9892d
7
+ data.tar.gz: 4a7db6beebb01298cdc9480c27ee93fd485348175b2cedd569fed74863a7d74ed6aab5c81957a5abe8a4bdcb30ff8bc38aa64638758cf4b29dcf016eaa32a1b6
data/.#README.md ADDED
@@ -0,0 +1 @@
1
+ ./grantriggle@grants-laptop.local.5806
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,34 @@
1
+ AllCops:
2
+ DisplayCopNames: false
3
+
4
+ Metrics/LineLength:
5
+ # This will disable the rule completely, regardless what other options you put
6
+ Enabled: false
7
+
8
+ Style/FileName:
9
+ Enabled: false
10
+
11
+ Style/SpaceInsideHashLiteralBraces:
12
+ EnforcedStyle: no_space
13
+
14
+ Style/SpaceInsideBlockBraces:
15
+ Enabled: false
16
+ EnforcedStyle: no_space
17
+
18
+
19
+ Style/SpaceBeforeBlockBraces:
20
+ EnforcedStyle: no_space
21
+
22
+ Style/EmptyLinesAroundClassBody:
23
+ Enabled: false
24
+ EnforcedStyle: empty_lines
25
+
26
+ Style/Documentation:
27
+ Enabled: false
28
+
29
+ Style/VariableNumber:
30
+ EnforcedStyle: snake_case
31
+
32
+ Style/FrozenStringLiteralComment:
33
+ Enabled: false
34
+
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.0
5
+ before_install: gem install bundler -v 1.13.6
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in grants_library.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # GrantsLibrary
2
+
3
+
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'grants_library'
10
+
11
+ ## Terminal Notification Interface
12
+
13
+ This library makes it easy to setup notifications on Mac.
14
+
15
+ ### Requirements
16
+
17
+ terminal-notifier Must be installed and working
18
+
19
+ ### Usage
20
+ ```ruby
21
+ gem 'grants_library'
22
+
23
+ require 'grants_library'
24
+
25
+ GrantsLibrary::TerminalNotifier.notify "This is a test message"
26
+
27
+ #Plays the default system sound
28
+ GrantsLibrary::TerminalNotifier.notify :sound, "This is a test message"
29
+ ```
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "grants_library"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/rubocop_auto ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/local/bin/bash
2
+ declare -A CURRENT_MD5S;
3
+
4
+ echo $*;
5
+ for i in $*; do
6
+ md5 -r $i;
7
+ CURRENT_MD5S[$i]="";
8
+ done
9
+
10
+ while true; do
11
+ for i in $*; do
12
+
13
+ NEW_MD5=$(md5 -r $i);
14
+ LAST_MD5=${CURRENT_MD5S[$i]}
15
+ if [ "$LAST_MD5" != "$NEW_MD5" ]
16
+ then
17
+ CURRENT_MD5S[$i]=$NEW_MD5;
18
+ echo "Running on $i";
19
+ rubocop -D $i;
20
+ fi
21
+ done
22
+ sleep 1
23
+ done
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,39 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'grants_library/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "grants_library"
8
+ spec.version = GrantsLibrary::VERSION
9
+ spec.authors = ["Grant Riggle"]
10
+ spec.email = ["grant@arsemporium.com"]
11
+
12
+ spec.summary = %q{Shared library for multiple projects}
13
+ spec.description = %q{Library for internal projects not really for outside use}
14
+ spec.homepage = "https://github.com/grantrig/grants_library"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against " \
22
+ "public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
+ f.match(%r{^(test|spec|features)/})
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.add_development_dependency "bundler", "~> 1.13"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "rspec", "~> 3.0"
35
+ spec.add_development_dependency "pry", "~> 0.10.4"
36
+ spec.add_development_dependency "rubocop"
37
+
38
+ spec.required_ruby_version = '>= 2.0'
39
+ end
@@ -0,0 +1,7 @@
1
+ require "grants_library/version"
2
+
3
+ require 'grants_library/terminal_notifier'
4
+
5
+ module GrantsLibrary
6
+ # Your code goes here...
7
+ end
@@ -0,0 +1,29 @@
1
+ require 'shellwords'
2
+
3
+ module GrantsLibrary
4
+ class TerminalNotifier
5
+ def self.notify(*args, **options)
6
+ shell_options = []
7
+ shell_options << 'terminal-notifier'
8
+ shell_options += get_sound_option(args, options)
9
+ shell_options += get_message(args, options)
10
+ `#{Shellwords.join(shell_options)}`
11
+ end
12
+
13
+ def self.get_sound_option(args, options)
14
+ return ['-sound', options[:sound]] if options.key?(:sound)
15
+ return ['-sound', 'default'] if args.delete(:sound)
16
+ []
17
+ end
18
+
19
+ private_class_method :get_sound_option
20
+
21
+ def self.get_message(args, options)
22
+ return ['-message', options[:message]] if options.key? :message
23
+ return ['-message', args.first.to_str] if args.first.respond_to? :to_str
24
+ []
25
+ end
26
+
27
+ private_class_method :get_message
28
+ end
29
+ end
@@ -0,0 +1,3 @@
1
+ module GrantsLibrary
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,129 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: grants_library
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Grant Riggle
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-04-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.10.4
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.10.4
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Library for internal projects not really for outside use
84
+ email:
85
+ - grant@arsemporium.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".#README.md"
91
+ - ".gitignore"
92
+ - ".rspec"
93
+ - ".rubocop.yml"
94
+ - ".travis.yml"
95
+ - Gemfile
96
+ - README.md
97
+ - Rakefile
98
+ - bin/console
99
+ - bin/rubocop_auto
100
+ - bin/setup
101
+ - grants_library.gemspec
102
+ - lib/grants_library.rb
103
+ - lib/grants_library/terminal_notifier.rb
104
+ - lib/grants_library/version.rb
105
+ homepage: https://github.com/grantrig/grants_library
106
+ licenses: []
107
+ metadata:
108
+ allowed_push_host: https://rubygems.org
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '2.0'
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ requirements: []
124
+ rubyforge_project:
125
+ rubygems_version: 2.6.11
126
+ signing_key:
127
+ specification_version: 4
128
+ summary: Shared library for multiple projects
129
+ test_files: []