convore-simple 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/convore-simple.gemspec +1 -1
- data/lib/convore-simple.rb +3 -2
- metadata +2 -2
data/convore-simple.gemspec
CHANGED
data/lib/convore-simple.rb
CHANGED
@@ -5,17 +5,18 @@ module ConvoreSimple
|
|
5
5
|
def self.say(message)
|
6
6
|
user = `git config user.convore`.chomp
|
7
7
|
topic = `git config convore.topic`.chomp
|
8
|
+
err = "Error: can't set git config"
|
8
9
|
if user.empty?
|
9
10
|
puts "Setting convore username (git config user.convore <username>)."
|
10
11
|
print "Enter username: "
|
11
12
|
user = gets.chomp
|
12
|
-
|
13
|
+
puts err unless system("git config user.convore #{user}")
|
13
14
|
end
|
14
15
|
if topic.empty?
|
15
16
|
puts "Setting convore topic id number (git config convore.topic <id>)."
|
16
17
|
print "Enter topic id number: "
|
17
18
|
topic = gets.chomp
|
18
|
-
|
19
|
+
puts err unless system("git config convore.topic #{topic}")
|
19
20
|
end
|
20
21
|
url = "https://convore.com/api/topics/#{topic}/messages/create.json"
|
21
22
|
return `echo "#{message}" | curl -u "#{user}" -F message="<-" #{url}`
|