guard-notifier-gntp_only-darwin 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE +20 -0
- data/README.md +34 -0
- data/Rakefile +6 -0
- data/guard-notifier-gntp_only-darwin.gemspec +25 -0
- data/lib/guard-notifier-gntp_only-darwin.rb +17 -0
- data/spec/lib/guard-notifier-gntp_only-darwin_spec.rb +83 -0
- data/spec/spec_helper.rb +2 -0
- metadata +115 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 777d0c88d07faae0b21c7469e520adee523a5294
|
4
|
+
data.tar.gz: 6d7114dba03ce1bada5f71295d3510d1485e54f8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d84e8a5bb85d6b4e8dffd6be645053eb9261bd85858c7a0816b2a68a5f11e304705ec04b62861c389472cd770f0425a9015e8dd1a859039f86ebd1aafece9a81
|
7
|
+
data.tar.gz: 7a9e92964437cb7ec0ce4c376bc905ebdf741c260393422d3fd42ce3aa3288b2a8a4bf0d5709cb5f46d71816cba2ef96b33770d4045a41939eee744011c11438
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
global
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.0.0
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Michael Nowak
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Guard::Notifier::GntpOnly::Darwin
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/guard-notifier-gntp_only-darwin.png)](http://badge.fury.io/rb/guard-notifier-gntp_only-darwin)
|
4
|
+
[![Build Status](https://api.travis-ci.org/mmichaa/guard-notifier-gntp_only-darwin.png?branch=master)](http://travis-ci.org/mmichaa/guard-notifier-gntp_only-darwin)
|
5
|
+
|
6
|
+
Mades Guard::Notifier::GNTP available only on Mac OS X (darwin)
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
gem 'guard-notifier-gntp_only-darwin', :require => false
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install guard-notifier-gntp_only-darwin
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Add this line to your application's Guardfile:
|
25
|
+
|
26
|
+
require 'guard-notifier-gntp_only-darwin'
|
27
|
+
|
28
|
+
## Contributing
|
29
|
+
|
30
|
+
1. Fork it
|
31
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
32
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
33
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
34
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "guard-notifier-gntp_only-darwin"
|
7
|
+
spec.version = "1.0"
|
8
|
+
spec.authors = ["Michael Nowak"]
|
9
|
+
spec.email = ["thexsystem@gmail.com"]
|
10
|
+
spec.description = %q{Mades Guard::Notifier::GNTP available only on Mac OS X (darwin)}
|
11
|
+
spec.summary = spec.description
|
12
|
+
spec.homepage = "https://github.com/mmichaa/guard-notifier-gntp_only-darwin"
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
|
20
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
21
|
+
spec.add_development_dependency "rake"
|
22
|
+
spec.add_development_dependency "rspec"
|
23
|
+
|
24
|
+
spec.add_dependency "guard"
|
25
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'guard/notifiers/gntp'
|
2
|
+
|
3
|
+
Guard::Notifier::GNTP.module_eval do
|
4
|
+
unless respond_to?(:available_only_darwin?)
|
5
|
+
def available_only_darwin?(silent = false, options = {})
|
6
|
+
if RbConfig::CONFIG['host_os'] =~ /darwin/i
|
7
|
+
available_not_only_darwin?(silent, options)
|
8
|
+
else
|
9
|
+
::Guard::UI.error 'The :gntp notifier runs only on Mac OS X.' unless silent
|
10
|
+
false
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
alias :available_not_only_darwin? :available?
|
15
|
+
alias :available? :available_only_darwin?
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Guard::Notifier::GNTP do
|
4
|
+
before(:each) do
|
5
|
+
Guard::UI.stub(:error).and_return(nil) # be silent!
|
6
|
+
|
7
|
+
subject.stub(:require).and_return(true)
|
8
|
+
end
|
9
|
+
|
10
|
+
context ".available_only_darwin?" do
|
11
|
+
it "returns true on host_os darwin" do
|
12
|
+
with_host_os "darwin10" do
|
13
|
+
subject.should be_available_only_darwin
|
14
|
+
end
|
15
|
+
|
16
|
+
with_host_os "darwin11" do
|
17
|
+
subject.should be_available_only_darwin
|
18
|
+
end
|
19
|
+
|
20
|
+
with_host_os "darwin12" do
|
21
|
+
subject.should be_available_only_darwin
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
it "returns false on host_os linux" do
|
26
|
+
with_host_os "linux-gnu" do
|
27
|
+
subject.should_not be_available_only_darwin
|
28
|
+
end
|
29
|
+
|
30
|
+
with_host_os "linux" do
|
31
|
+
subject.should_not be_available_only_darwin
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
it "returns false on host_os bsd" do
|
36
|
+
with_host_os "freebsd" do
|
37
|
+
subject.should_not be_available_only_darwin
|
38
|
+
end
|
39
|
+
|
40
|
+
with_host_os "openbsd" do
|
41
|
+
subject.should_not be_available_only_darwin
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
it "returns false on host_os windows" do
|
46
|
+
with_host_os "mswin" do
|
47
|
+
subject.should_not be_available_only_darwin
|
48
|
+
end
|
49
|
+
|
50
|
+
with_host_os "mswin32" do
|
51
|
+
subject.should_not be_available_only_darwin
|
52
|
+
end
|
53
|
+
|
54
|
+
with_host_os "dos" do
|
55
|
+
subject.should_not be_available_only_darwin
|
56
|
+
end
|
57
|
+
|
58
|
+
with_host_os "mingw" do
|
59
|
+
subject.should_not be_available_only_darwin
|
60
|
+
end
|
61
|
+
|
62
|
+
with_host_os "cygwin" do
|
63
|
+
subject.should_not be_available_only_darwin
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
context ".available?" do
|
69
|
+
it "aliases .available_only_darwin?" do
|
70
|
+
subject.method(:available?).should eql subject.method(:available_only_darwin?)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
private
|
75
|
+
|
76
|
+
def with_host_os(this_host_os, &block)
|
77
|
+
original_host_os = RbConfig::CONFIG['host_os']
|
78
|
+
RbConfig::CONFIG['host_os'] = this_host_os
|
79
|
+
block.call
|
80
|
+
RbConfig::CONFIG['host_os'] = original_host_os
|
81
|
+
return nil
|
82
|
+
end
|
83
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: guard-notifier-gntp_only-darwin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Nowak
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-08-29 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.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '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: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Mades Guard::Notifier::GNTP available only on Mac OS X (darwin)
|
70
|
+
email:
|
71
|
+
- thexsystem@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- .gitignore
|
77
|
+
- .rspec
|
78
|
+
- .ruby-gemset
|
79
|
+
- .ruby-version
|
80
|
+
- .travis.yml
|
81
|
+
- Gemfile
|
82
|
+
- LICENSE
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- guard-notifier-gntp_only-darwin.gemspec
|
86
|
+
- lib/guard-notifier-gntp_only-darwin.rb
|
87
|
+
- spec/lib/guard-notifier-gntp_only-darwin_spec.rb
|
88
|
+
- spec/spec_helper.rb
|
89
|
+
homepage: https://github.com/mmichaa/guard-notifier-gntp_only-darwin
|
90
|
+
licenses:
|
91
|
+
- MIT
|
92
|
+
metadata: {}
|
93
|
+
post_install_message:
|
94
|
+
rdoc_options: []
|
95
|
+
require_paths:
|
96
|
+
- lib
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
requirements: []
|
108
|
+
rubyforge_project:
|
109
|
+
rubygems_version: 2.0.3
|
110
|
+
signing_key:
|
111
|
+
specification_version: 4
|
112
|
+
summary: Mades Guard::Notifier::GNTP available only on Mac OS X (darwin)
|
113
|
+
test_files:
|
114
|
+
- spec/lib/guard-notifier-gntp_only-darwin_spec.rb
|
115
|
+
- spec/spec_helper.rb
|