jabber-tee 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/VERSION +1 -1
- data/lib/jabber-tee/cli.rb +19 -11
- data/lib/jabber-tee/configuration.rb +2 -1
- data/spec/cli_spec.rb +2 -2
- metadata +5 -5
data/Rakefile
CHANGED
@@ -23,7 +23,7 @@ begin
|
|
23
23
|
gem.version = JabberTee::Version.to_s
|
24
24
|
gem.executables = %W{jabber-tee}
|
25
25
|
gem.summary = 'Simple command line utility for piping the output from one command to both the console and a remote jabber server.'
|
26
|
-
gem.description = "Installs the 'jabber-
|
26
|
+
gem.description = "Installs the 'jabber-tee' utility for sending messages to a remote jabber server. Instead of a standard client, it reads from standard in and continues to write to the console."
|
27
27
|
gem.email = ['madeonamac@gmail.com']
|
28
28
|
gem.authors = ['Gabe McArthur']
|
29
29
|
gem.homepage = 'http://github.com/gabemc/jabber-tee'
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/jabber-tee/cli.rb
CHANGED
@@ -59,32 +59,39 @@ Options:
|
|
59
59
|
DESC
|
60
60
|
opts.separator " Connecting:"
|
61
61
|
opts.on('-u', '--username USERNAME',
|
62
|
-
"The user@host.org name to connect
|
62
|
+
"The user@host.org name to connect",
|
63
|
+
"to the jabber server.") do |u|
|
63
64
|
options[:username] = u
|
64
65
|
end
|
65
66
|
opts.on('-p', '--password PASSWORD',
|
66
|
-
"The password for the user to connect
|
67
|
-
"
|
68
|
-
"it
|
67
|
+
"The password for the user to connect",
|
68
|
+
"to the jabber server. If not given",
|
69
|
+
"it must be defined in your",
|
70
|
+
"~/.jabber-tee.yml file.") do |p|
|
69
71
|
options[:password] = p
|
70
72
|
end
|
71
73
|
opts.on('-n', '--nick NICKNAME',
|
72
|
-
"The nickname to use when connecting
|
74
|
+
"The nickname to use when connecting",
|
75
|
+
"to the server.") do |n|
|
73
76
|
options[:nick] = n
|
74
77
|
end
|
78
|
+
=begin
|
75
79
|
opts.on('-a', '--anonymous',
|
76
|
-
"Disregards the username information and
|
77
|
-
"
|
78
|
-
"flag are required.") do |a|
|
80
|
+
"Disregards the username information and",
|
81
|
+
"logs in using anonymous authentication.") do |a|
|
79
82
|
options[:anonymous] = true
|
80
83
|
end
|
84
|
+
=end
|
81
85
|
opts.on('-P', '--profile PROFILE',
|
82
|
-
"The name of the profile, as defined in
|
83
|
-
"file to use to
|
86
|
+
"The name of the profile, as defined in",
|
87
|
+
"the ~/.jabber-tee.yml file to use to",
|
88
|
+
"connect with.") do |p|
|
84
89
|
options[:profile] = p
|
85
90
|
end
|
91
|
+
=begin
|
86
92
|
opts.on('--sasl',
|
87
|
-
"By default, the connection does not
|
93
|
+
"By default, the connection does not",
|
94
|
+
"use SASL authentication.",
|
88
95
|
"This enables SASL connections") do |s|
|
89
96
|
options[:sasl] = true
|
90
97
|
end
|
@@ -93,6 +100,7 @@ DESC
|
|
93
100
|
"authentication mechanism.") do |d|
|
94
101
|
options[:digest] = true
|
95
102
|
end
|
103
|
+
=end
|
96
104
|
opts.separator ""
|
97
105
|
|
98
106
|
opts.separator " Output: (One required)"
|
@@ -27,7 +27,7 @@ module JabberTee
|
|
27
27
|
raise JabberTee::ConfigurationError.new("Unable to load an profiles from your home configuration.")
|
28
28
|
end
|
29
29
|
profile = profiles[name]
|
30
|
-
if
|
30
|
+
if profile.nil?
|
31
31
|
raise JabberTee::ConfigurationError.new("Unable to load the #{name} profile from your home configuration.")
|
32
32
|
end
|
33
33
|
config.merge(profile)
|
@@ -47,6 +47,7 @@ module JabberTee
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def merge(options)
|
50
|
+
#self if options.nil?
|
50
51
|
ATTRIBUTES.each do |attr|
|
51
52
|
if options.has_key?(attr.to_sym) || options.has_key?(attr)
|
52
53
|
value = options[attr.to_sym] || options[attr]
|
data/spec/cli_spec.rb
CHANGED
@@ -39,7 +39,7 @@ module JabberTee
|
|
39
39
|
it "should parse the password correctly" do
|
40
40
|
check(:password, ['-p', '--password'], 'super_!!_secret')
|
41
41
|
end
|
42
|
-
|
42
|
+
=begin
|
43
43
|
it "should parse the sasl flag correctly" do
|
44
44
|
check(:sasl, ['--sasl'], true)
|
45
45
|
end
|
@@ -47,10 +47,10 @@ module JabberTee
|
|
47
47
|
it "should parse the digest flag correctly" do
|
48
48
|
check(:digest, ['--digest'], true)
|
49
49
|
end
|
50
|
-
|
51
50
|
it "should parse the anonymous flag correctly" do
|
52
51
|
check(:anonymous, ['-a', '--anonymous'], true)
|
53
52
|
end
|
53
|
+
=end
|
54
54
|
|
55
55
|
it "should parse the room flag correctly" do
|
56
56
|
check(:room, ['-r', '--room'], 'ROOM')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jabber-tee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Gabe McArthur
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-24 00:00:00 -07:00
|
19
19
|
default_executable: jabber-tee
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: 1.3.0
|
66
66
|
type: :development
|
67
67
|
version_requirements: *id003
|
68
|
-
description: Installs the 'jabber-
|
68
|
+
description: Installs the 'jabber-tee' utility for sending messages to a remote jabber server. Instead of a standard client, it reads from standard in and continues to write to the console.
|
69
69
|
email:
|
70
70
|
- madeonamac@gmail.com
|
71
71
|
executables:
|