pair 0.0.3 → 0.0.4
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.
- data/.rvmrc +1 -12
- data/CHANGES +9 -0
- data/Gemfile.lock +4 -2
- data/lib/pair.rb +7 -0
- data/lib/pair/api.rb +1 -1
- data/lib/pair/cli.rb +5 -2
- data/lib/pair/cli/config.rb +4 -4
- data/lib/pair/cli/host.rb +1 -1
- data/lib/pair/cli/notify.rb +40 -0
- data/lib/pair/config.rb +14 -15
- data/lib/pair/notification.rb +27 -0
- data/lib/pair/notification/custom_errors.rb +5 -0
- data/lib/pair/notification/dispatcher.rb +24 -0
- data/lib/pair/notification/growl_logger.rb +6 -0
- data/lib/pair/notification/linux_dispatcher.rb +8 -0
- data/lib/pair/notification/o_s_x_dispatcher.rb +66 -0
- data/lib/pair/os.rb +4 -6
- data/lib/pair/version.rb +1 -1
- data/pair.gemspec +1 -0
- data/spec/fixtures/config/rspec.pair.yml +5 -0
- data/spec/fixtures/config/rspec_no_growl_enabled.pair.yml +4 -0
- data/spec/fixtures/config/rspec_no_ssh_enabled.pair.yml +4 -0
- data/spec/pair/config_spec.rb +55 -23
- data/spec/pair/notification/dispatcher_spec.rb +18 -0
- data/spec/pair/notification/o_s_x_dispatcher_spec.rb +50 -0
- data/spec/pair/notification_spec.rb +48 -0
- data/spec/spec_helper.rb +1 -1
- metadata +40 -11
data/.rvmrc
CHANGED
@@ -1,13 +1,2 @@
|
|
1
|
-
rvm 1.9.
|
2
|
-
|
3
|
-
bundler=`gem list bundler | grep bundler`
|
4
|
-
if [ $? -eq 1 ] ; then
|
5
|
-
echo "Installing bundler for project:\n\n";
|
6
|
-
gem install --pre bundler;
|
7
|
-
|
8
|
-
echo; read -s -n 1 -p "Run bundler install y/n" confirm; echo; echo;
|
9
|
-
if [ "$confirm" == "y" ]; then
|
10
|
-
bundle install;
|
11
|
-
fi
|
12
|
-
fi
|
1
|
+
rvm 1.9.3-p125@pair-gem --create
|
13
2
|
|
data/CHANGES
ADDED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pair (0.0.
|
4
|
+
pair (0.0.4)
|
5
5
|
httparty (~> 0.8.1)
|
6
|
+
ruby_gntp (~> 0.3.4)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: http://rubygems.org/
|
@@ -11,7 +12,7 @@ GEM
|
|
11
12
|
httparty (0.8.1)
|
12
13
|
multi_json
|
13
14
|
multi_xml
|
14
|
-
multi_json (1.0.
|
15
|
+
multi_json (1.0.4)
|
15
16
|
multi_xml (0.4.1)
|
16
17
|
rake (0.9.2.2)
|
17
18
|
rspec (2.7.0)
|
@@ -22,6 +23,7 @@ GEM
|
|
22
23
|
rspec-expectations (2.7.0)
|
23
24
|
diff-lcs (~> 1.1.2)
|
24
25
|
rspec-mocks (2.7.0)
|
26
|
+
ruby_gntp (0.3.4)
|
25
27
|
|
26
28
|
PLATFORMS
|
27
29
|
ruby
|
data/lib/pair.rb
CHANGED
@@ -1,9 +1,16 @@
|
|
1
1
|
module Pair
|
2
|
+
APPLICATION_NAME = "Pair"
|
3
|
+
APPLICATION_DOMAIN = "www.pairmill.com"
|
4
|
+
|
5
|
+
ICON_APPLICATION = "http://#{APPLICATION_DOMAIN}/images/emblem-earth.png"
|
6
|
+
ICON_SESSION_JOIN = "http://#{APPLICATION_DOMAIN}/images/pair-network-join.png"
|
7
|
+
ICON_SESSION_PART = "http://#{APPLICATION_DOMAIN}/images/pair-network-part.png"
|
2
8
|
end
|
3
9
|
|
4
10
|
require "pair/version"
|
5
11
|
|
6
12
|
require "pair/os"
|
7
13
|
require "pair/config"
|
14
|
+
require "pair/notification"
|
8
15
|
require "pair/api"
|
9
16
|
require "pair/session"
|
data/lib/pair/api.rb
CHANGED
data/lib/pair/cli.rb
CHANGED
@@ -24,14 +24,17 @@ module Pair
|
|
24
24
|
when 'config'
|
25
25
|
require "pair/cli/config"
|
26
26
|
Config.run!(arguments)
|
27
|
+
when 'notify'
|
28
|
+
require "pair/cli/notify"
|
29
|
+
Notify.run!(arguments)
|
27
30
|
else
|
28
31
|
unknown_command(command)
|
29
32
|
end
|
30
|
-
rescue ApiTokenMissingError, EnableSSHError => error
|
33
|
+
rescue ApiTokenMissingError, EnableSSHError, Pair::Notification::GNTPError => error
|
31
34
|
handle_error error.message, false
|
32
35
|
rescue SystemExit
|
33
36
|
raise
|
34
|
-
rescue
|
37
|
+
rescue Exception => except
|
35
38
|
handle_error " Please contact support@pairmill.com, there\n" +
|
36
39
|
" was an issue creating your session.", $-d
|
37
40
|
end
|
data/lib/pair/cli/config.rb
CHANGED
@@ -14,13 +14,13 @@ module Pair
|
|
14
14
|
"Options:" +
|
15
15
|
"\n"
|
16
16
|
|
17
|
-
opts.on("--api-token KEY") do |key|
|
17
|
+
opts.on("-t", "--api-token KEY") do |key|
|
18
18
|
options[:api_token] = key
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
opts.on("-g", "--growl") do
|
22
|
+
options[:growl] = true
|
23
|
+
end
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/pair/cli/host.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
module Pair
|
2
|
+
class Cli
|
3
|
+
class Notify < self
|
4
|
+
def run!
|
5
|
+
parse!
|
6
|
+
|
7
|
+
Notification.dispatcher.gntp_notify(options)
|
8
|
+
end
|
9
|
+
|
10
|
+
def parse!
|
11
|
+
opts = parse do |opts|
|
12
|
+
opts.banner = "Usage #{$0.split("/").last} notify" +
|
13
|
+
"\n\n" +
|
14
|
+
"Options:" +
|
15
|
+
"\n"
|
16
|
+
|
17
|
+
opts.on("-t", "--title title") do |title|
|
18
|
+
options[:title] = title
|
19
|
+
end
|
20
|
+
|
21
|
+
opts.on("-n", "--notification name") do |name|
|
22
|
+
options[:name] = name
|
23
|
+
end
|
24
|
+
|
25
|
+
opts.on("-m", "--message text") do |text|
|
26
|
+
options[:text] = text
|
27
|
+
end
|
28
|
+
|
29
|
+
opts.on("-i", "--icon url") do |url|
|
30
|
+
options[:icon] = url
|
31
|
+
end
|
32
|
+
|
33
|
+
opts.on("-s", "--sticky") do
|
34
|
+
options[:sticky] = true
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/pair/config.rb
CHANGED
@@ -18,13 +18,6 @@ module Pair
|
|
18
18
|
self.output = output
|
19
19
|
end
|
20
20
|
|
21
|
-
# def api_token
|
22
|
-
# self[:api_token] ||= begin
|
23
|
-
# print "Please input your API token for Pair: "
|
24
|
-
# gets.chomp
|
25
|
-
# end
|
26
|
-
# end
|
27
|
-
|
28
21
|
def method_missing(method, *args, &block)
|
29
22
|
method = method.to_s
|
30
23
|
|
@@ -39,27 +32,33 @@ module Pair
|
|
39
32
|
self[:api_token]
|
40
33
|
end
|
41
34
|
|
42
|
-
def
|
43
|
-
self[:
|
35
|
+
def ssh_enabled?
|
36
|
+
self[:ssh_enabled]
|
44
37
|
end
|
45
38
|
|
46
|
-
def
|
47
|
-
|
39
|
+
def growl_enabled?
|
40
|
+
self[:growl_enabled]
|
41
|
+
end
|
42
|
+
|
43
|
+
# FIXME: Does this belong in config?
|
44
|
+
def ssh_on?
|
45
|
+
if Pair::OS.os_x?
|
48
46
|
`systemsetup -getremotelogin`.match("Remote Login: On")
|
47
|
+
elsif Pair::OS.linux?
|
48
|
+
`ps aux | grep sshd | grep -v grep` != ""
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
52
|
def update(options = {})
|
53
53
|
if options.is_a? Hash
|
54
|
-
options.each do |
|
55
|
-
|
56
|
-
host_config[k] = v
|
57
|
-
end
|
54
|
+
options.each do |key, value|
|
55
|
+
self[key] = value
|
58
56
|
end
|
59
57
|
end
|
60
58
|
end
|
61
59
|
|
62
60
|
protected
|
61
|
+
|
63
62
|
def [](key)
|
64
63
|
config.transaction do
|
65
64
|
host_config[key]
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require "pair/notification/custom_errors"
|
2
|
+
require "pair/notification/dispatcher"
|
3
|
+
require "pair/notification/o_s_x_dispatcher"
|
4
|
+
require "pair/notification/linux_dispatcher"
|
5
|
+
|
6
|
+
module Pair
|
7
|
+
class Notification
|
8
|
+
attr_reader :dispatch
|
9
|
+
|
10
|
+
class << self
|
11
|
+
def dispatcher(options = {})
|
12
|
+
if Pair::OS.os_x?
|
13
|
+
dispatch = OSXDispatcher.new(options)
|
14
|
+
else
|
15
|
+
dispatch = LinuxDispatcher.new(options)
|
16
|
+
end
|
17
|
+
|
18
|
+
if block_given?
|
19
|
+
yield dispatch
|
20
|
+
else
|
21
|
+
dispatch
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Pair
|
2
|
+
class Notification
|
3
|
+
class Dispatcher
|
4
|
+
attr_accessor :logger, :enabled
|
5
|
+
|
6
|
+
def initialize(options = {})
|
7
|
+
@enabled = Pair.config.growl_enabled?
|
8
|
+
@logger = options[:logger] || STDOUT
|
9
|
+
end
|
10
|
+
|
11
|
+
def session_join(user, session)
|
12
|
+
raise NotImplementedError
|
13
|
+
end
|
14
|
+
|
15
|
+
def session_part(user, session)
|
16
|
+
raise NotImplementedError
|
17
|
+
end
|
18
|
+
|
19
|
+
def gntp_notify
|
20
|
+
raise NotImplementedError
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'ruby_gntp'
|
2
|
+
|
3
|
+
module Pair
|
4
|
+
class Notification
|
5
|
+
class OSXDispatcher < Dispatcher
|
6
|
+
attr_reader :growl, :app_icon
|
7
|
+
|
8
|
+
NOTIFICATIONS = [{:name => "Session Events", :enabled => true}]
|
9
|
+
|
10
|
+
def initialize(options = {})
|
11
|
+
@app_icon = options.delete(:app_icon)
|
12
|
+
super
|
13
|
+
|
14
|
+
register_growl if Pair.config.growl_enabled?
|
15
|
+
|
16
|
+
rescue Errno::ECONNREFUSED => except
|
17
|
+
raise Pair::Notification::GNTPError.new("Growl notification transfer protocol is not enabled, either start growl or disable growl via pair config")
|
18
|
+
end
|
19
|
+
|
20
|
+
def register_growl
|
21
|
+
@growl = GNTP.new(Pair::APPLICATION_NAME)
|
22
|
+
@growl.register application_hash
|
23
|
+
end
|
24
|
+
|
25
|
+
def session_join(user, session)
|
26
|
+
gntp_notify({
|
27
|
+
:name => "Session Events", :title => "Pair Message",
|
28
|
+
:text => "#{user} joined session \"#{session}\"",
|
29
|
+
:icon => Pair::ICON_SESSION_JOIN, :sticky => true
|
30
|
+
})
|
31
|
+
end
|
32
|
+
|
33
|
+
def session_part(user, session)
|
34
|
+
gntp_notify({
|
35
|
+
:name => "Session Events", :title => "Pair Message",
|
36
|
+
:text => "#{user} parted session \"#{session}\"",
|
37
|
+
:icon => Pair::ICON_SESSION_JOIN, :sticky => true
|
38
|
+
})
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
def gntp_notify(options)
|
43
|
+
if enabled
|
44
|
+
if block_given?
|
45
|
+
yield @growl
|
46
|
+
end
|
47
|
+
|
48
|
+
if options[:text]
|
49
|
+
options = {
|
50
|
+
:name => "Session Events", :title => "",
|
51
|
+
:icon => @app_icon, :sticky => false
|
52
|
+
}.merge(options)
|
53
|
+
|
54
|
+
@growl.notify(options)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
def application_hash
|
62
|
+
{ :app_icon => Pair::ICON_APPLICATION, :notifications => NOTIFICATIONS }
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
data/lib/pair/os.rb
CHANGED
@@ -1,13 +1,11 @@
|
|
1
|
-
require 'rbconfig'
|
2
|
-
|
3
1
|
module Pair
|
4
2
|
module OS
|
5
|
-
def linux?
|
6
|
-
|
3
|
+
def self.linux?
|
4
|
+
RUBY_PLATFORM =~ /linux/
|
7
5
|
end
|
8
6
|
|
9
|
-
def self.
|
10
|
-
|
7
|
+
def self.os_x?
|
8
|
+
RUBY_PLATFORM =~ /darwin/
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
data/lib/pair/version.rb
CHANGED
data/pair.gemspec
CHANGED
data/spec/pair/config_spec.rb
CHANGED
@@ -9,15 +9,58 @@ describe Pair::Config do
|
|
9
9
|
|
10
10
|
let(:config) { described_class.new(host, stdin, stdout) }
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
describe "when accessing a proper configuration yml" do
|
13
|
+
before do
|
14
|
+
yaml_store = YAML::Store.new("spec/fixtures/config/rspec.pair.yml")
|
15
|
+
YAML::Store.stub!(:new).and_return(yaml_store)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "returns the api_token" do
|
19
|
+
Pair::Config.new.api_token.should == "XXXXXXXXXXXXXXXXXXXX"
|
20
|
+
end
|
21
|
+
|
22
|
+
it "is growl enabled" do
|
23
|
+
Pair::Config.new.should be_growl_enabled
|
24
|
+
end
|
25
|
+
|
26
|
+
it "is ssh enabled" do
|
27
|
+
Pair::Config.new.should be_ssh_enabled
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "when missing growl_enabled in the config" do
|
32
|
+
before do
|
33
|
+
yaml_store = YAML::Store.new("spec/fixtures/config/rspec_no_growl_enabled.pair.yml")
|
34
|
+
YAML::Store.stub!(:new).and_return(yaml_store)
|
35
|
+
end
|
36
|
+
|
37
|
+
it "is not growl enabled" do
|
38
|
+
config = Pair::Config.new
|
39
|
+
config.should_not be_growl_enabled
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "when missing ssh_enabled in the config" do
|
44
|
+
before do
|
45
|
+
yaml_store = YAML::Store.new("spec/fixtures/config/rspec_no_ssh_enabled.pair.yml")
|
46
|
+
YAML::Store.stub!(:new).and_return(yaml_store)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "is not ssh enabled" do
|
50
|
+
config = Pair::Config.new
|
51
|
+
config.should_not be_ssh_enabled
|
17
52
|
end
|
18
53
|
end
|
19
54
|
|
20
55
|
context "for different hosts" do
|
56
|
+
before do
|
57
|
+
config_hash = {}
|
58
|
+
YAML::Store.stub!(:new => config_hash)
|
59
|
+
def config_hash.transaction
|
60
|
+
yield
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
21
64
|
it "has a different set of configs for each host" do
|
22
65
|
host1, host2 = "api.domain.com", "api.beta.domain.com"
|
23
66
|
config1 = described_class.new(host1)
|
@@ -34,24 +77,13 @@ describe Pair::Config do
|
|
34
77
|
end
|
35
78
|
|
36
79
|
describe '#api_token' do
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
#
|
45
|
-
# stdout.rewind
|
46
|
-
# stdout.read.should == "Please input your API token for Pair: "
|
47
|
-
# end
|
48
|
-
#
|
49
|
-
# it "saves the key" do
|
50
|
-
# stdin.should_receive(:gets).once.and_return("abc123\n")
|
51
|
-
# config.api_token
|
52
|
-
# config.api_token
|
53
|
-
# end
|
54
|
-
# end
|
80
|
+
before do
|
81
|
+
config_hash = {}
|
82
|
+
YAML::Store.stub!(:new => config_hash)
|
83
|
+
def config_hash.transaction
|
84
|
+
yield
|
85
|
+
end
|
86
|
+
end
|
55
87
|
|
56
88
|
context "when one is already saved" do
|
57
89
|
it "returns the saved value" do
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
2
|
+
|
3
|
+
describe Pair::Notification::Dispatcher do
|
4
|
+
before do
|
5
|
+
Pair.stub_chain(:config, :growl_enabled?).and_return(false)
|
6
|
+
end
|
7
|
+
|
8
|
+
describe "when initializing" do
|
9
|
+
it "uses the STDOUT for logging by default" do
|
10
|
+
Pair::Notification.dispatcher.logger == STDOUT
|
11
|
+
end
|
12
|
+
|
13
|
+
it "uses the logger provided as a parameter" do
|
14
|
+
logger = mock('a logger')
|
15
|
+
Pair::Notification::Dispatcher.new(:logger => logger).logger.should == logger
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
2
|
+
|
3
|
+
describe Pair::Notification::OSXDispatcher do
|
4
|
+
describe "when using lion" do
|
5
|
+
before do
|
6
|
+
@growl = mock('gntp', :register => true, :notify => true)
|
7
|
+
GNTP.stub!(:new).and_return(@growl)
|
8
|
+
Pair.stub_chain(:config, :growl_enabled?).and_return(true)
|
9
|
+
Pair::OS.stub!(:os_x?).and_return(true)
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "when initializing" do
|
13
|
+
it "is an OSXDispatcher" do
|
14
|
+
Pair::Notification.dispatcher.class.should be(Pair::Notification::OSXDispatcher)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "registers the application" do
|
18
|
+
@growl.should_receive(:register)
|
19
|
+
Pair::Notification.dispatcher
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "notifications" do
|
24
|
+
it "includes session events" do
|
25
|
+
Pair::Notification::OSXDispatcher::NOTIFICATIONS.should == [
|
26
|
+
{:name => "Session Events", :enabled => true}
|
27
|
+
]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "when registering an application" do
|
32
|
+
it "creates a growl network transfer protocol object" do
|
33
|
+
GNTP.should_receive(:new).and_return(@growl)
|
34
|
+
Pair::Notification.dispatcher
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "sending a growl network notification" do
|
39
|
+
it "calls gntp notify" do
|
40
|
+
a_message_hash = {
|
41
|
+
:text => "some text", :name => "Session Events", :title => "a title",
|
42
|
+
:icon => "http://#{Pair::APPLICATION_DOMAIN}/test.png", :sticky => false
|
43
|
+
}
|
44
|
+
|
45
|
+
@growl.should_receive(:notify).with(a_message_hash)
|
46
|
+
dispatcher = Pair::Notification.dispatcher.gntp_notify(a_message_hash)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe Pair::Notification do
|
4
|
+
describe "when using OSX lion" do
|
5
|
+
before do
|
6
|
+
@gntp = mock(GNTP, :register => true, :notify => true)
|
7
|
+
GNTP.stub!(:new).and_return(@gntp)
|
8
|
+
|
9
|
+
Pair::OS.stub!(:os_x?).and_return(true)
|
10
|
+
Pair.stub!(:config => stub(:growl_enabled? => true))
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "when initializing" do
|
14
|
+
it "returns an OSXDispatcher class" do
|
15
|
+
Pair::Notification.dispatcher.class.should == Pair::Notification::OSXDispatcher
|
16
|
+
end
|
17
|
+
|
18
|
+
it "yields the OSXDispatcher class" do
|
19
|
+
Pair::Notification.dispatcher do |dispatcher|
|
20
|
+
dispatcher.should == dispatcher
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "joining a session" do
|
26
|
+
it "notifies via growl notification transfer protocol" do
|
27
|
+
@gntp.should_receive(:notify).with({
|
28
|
+
:name => "Session Events", :title => "Pair Message",
|
29
|
+
:text => "chadwpry joined session \"SESSION_NAME\"",
|
30
|
+
:icon => Pair::ICON_SESSION_JOIN, :sticky => true
|
31
|
+
})
|
32
|
+
Pair::Notification.dispatcher.session_join("chadwpry", "SESSION_NAME")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe "parting a session" do
|
37
|
+
it "notifies via growl notification transfer protocol" do
|
38
|
+
@gntp.should_receive(:notify).with({
|
39
|
+
:name => "Session Events", :title => "Pair Message",
|
40
|
+
:text => "chadwpry parted session \"SESSION_NAME\"",
|
41
|
+
:icon => Pair::ICON_SESSION_JOIN, :sticky => true
|
42
|
+
})
|
43
|
+
Pair::Notification.dispatcher.session_part("chadwpry", "SESSION_NAME")
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pair
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,12 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
14
|
-
default_executable:
|
13
|
+
date: 2012-03-26 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: httparty
|
18
|
-
requirement: &
|
17
|
+
requirement: &70264343889540 !ruby/object:Gem::Requirement
|
19
18
|
none: false
|
20
19
|
requirements:
|
21
20
|
- - ~>
|
@@ -23,10 +22,21 @@ dependencies:
|
|
23
22
|
version: 0.8.1
|
24
23
|
type: :runtime
|
25
24
|
prerelease: false
|
26
|
-
version_requirements: *
|
25
|
+
version_requirements: *70264343889540
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: ruby_gntp
|
28
|
+
requirement: &70264343888060 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.3.4
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *70264343888060
|
27
37
|
- !ruby/object:Gem::Dependency
|
28
38
|
name: rake
|
29
|
-
requirement: &
|
39
|
+
requirement: &70264343887120 !ruby/object:Gem::Requirement
|
30
40
|
none: false
|
31
41
|
requirements:
|
32
42
|
- - ! '>='
|
@@ -34,10 +44,10 @@ dependencies:
|
|
34
44
|
version: '0'
|
35
45
|
type: :development
|
36
46
|
prerelease: false
|
37
|
-
version_requirements: *
|
47
|
+
version_requirements: *70264343887120
|
38
48
|
- !ruby/object:Gem::Dependency
|
39
49
|
name: rspec
|
40
|
-
requirement: &
|
50
|
+
requirement: &70264343885680 !ruby/object:Gem::Requirement
|
41
51
|
none: false
|
42
52
|
requirements:
|
43
53
|
- - ~>
|
@@ -45,7 +55,7 @@ dependencies:
|
|
45
55
|
version: 2.7.0
|
46
56
|
type: :development
|
47
57
|
prerelease: false
|
48
|
-
version_requirements: *
|
58
|
+
version_requirements: *70264343885680
|
49
59
|
description: Effortless remote pairing
|
50
60
|
email:
|
51
61
|
- me@bjeanes.com
|
@@ -59,6 +69,7 @@ files:
|
|
59
69
|
- .rspec
|
60
70
|
- .rvmrc
|
61
71
|
- .travis.yml
|
72
|
+
- CHANGES
|
62
73
|
- Gemfile
|
63
74
|
- Gemfile.lock
|
64
75
|
- README.rdoc
|
@@ -70,7 +81,14 @@ files:
|
|
70
81
|
- lib/pair/cli/config.rb
|
71
82
|
- lib/pair/cli/custom_errors.rb
|
72
83
|
- lib/pair/cli/host.rb
|
84
|
+
- lib/pair/cli/notify.rb
|
73
85
|
- lib/pair/config.rb
|
86
|
+
- lib/pair/notification.rb
|
87
|
+
- lib/pair/notification/custom_errors.rb
|
88
|
+
- lib/pair/notification/dispatcher.rb
|
89
|
+
- lib/pair/notification/growl_logger.rb
|
90
|
+
- lib/pair/notification/linux_dispatcher.rb
|
91
|
+
- lib/pair/notification/o_s_x_dispatcher.rb
|
74
92
|
- lib/pair/os.rb
|
75
93
|
- lib/pair/session.rb
|
76
94
|
- lib/pair/session/authorized_keys_file.rb
|
@@ -82,11 +100,16 @@ files:
|
|
82
100
|
- spec/fixture_helper.rb
|
83
101
|
- spec/fixtures/api_hosted_session.yml
|
84
102
|
- spec/fixtures/api_joined_session.yml
|
103
|
+
- spec/fixtures/config/rspec.pair.yml
|
104
|
+
- spec/fixtures/config/rspec_no_growl_enabled.pair.yml
|
105
|
+
- spec/fixtures/config/rspec_no_ssh_enabled.pair.yml
|
85
106
|
- spec/fixtures/user_keys.yml
|
86
107
|
- spec/pair/config_spec.rb
|
108
|
+
- spec/pair/notification/dispatcher_spec.rb
|
109
|
+
- spec/pair/notification/o_s_x_dispatcher_spec.rb
|
110
|
+
- spec/pair/notification_spec.rb
|
87
111
|
- spec/pair/session/authorized_keys_file_spec.rb
|
88
112
|
- spec/spec_helper.rb
|
89
|
-
has_rdoc: true
|
90
113
|
homepage: http://www.pairmill.com
|
91
114
|
licenses: []
|
92
115
|
post_install_message:
|
@@ -107,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
130
|
version: '0'
|
108
131
|
requirements: []
|
109
132
|
rubyforge_project:
|
110
|
-
rubygems_version: 1.
|
133
|
+
rubygems_version: 1.8.15
|
111
134
|
signing_key:
|
112
135
|
specification_version: 3
|
113
136
|
summary: Pair with remote programmers with a single command.
|
@@ -115,7 +138,13 @@ test_files:
|
|
115
138
|
- spec/fixture_helper.rb
|
116
139
|
- spec/fixtures/api_hosted_session.yml
|
117
140
|
- spec/fixtures/api_joined_session.yml
|
141
|
+
- spec/fixtures/config/rspec.pair.yml
|
142
|
+
- spec/fixtures/config/rspec_no_growl_enabled.pair.yml
|
143
|
+
- spec/fixtures/config/rspec_no_ssh_enabled.pair.yml
|
118
144
|
- spec/fixtures/user_keys.yml
|
119
145
|
- spec/pair/config_spec.rb
|
146
|
+
- spec/pair/notification/dispatcher_spec.rb
|
147
|
+
- spec/pair/notification/o_s_x_dispatcher_spec.rb
|
148
|
+
- spec/pair/notification_spec.rb
|
120
149
|
- spec/pair/session/authorized_keys_file_spec.rb
|
121
150
|
- spec/spec_helper.rb
|