murmurs 0.0.7 → 0.0.8
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/README.md +3 -2
- data/bin/murmurs +21 -16
- data/lib/murmurs/git.rb +1 -1
- data/lib/murmurs.rb +4 -3
- metadata +3 -3
data/README.md
CHANGED
@@ -34,14 +34,15 @@ You can also setup environment variables for the configurations needed as follow
|
|
34
34
|
export MINGLE_ACCESS_KEY_ID=mingle_access_key_id
|
35
35
|
export MINGLE_ACCESS_SECRET_KEY=mingle_access_secret_key
|
36
36
|
|
37
|
-
So that you don't need to specify them when murmur something:
|
37
|
+
So that you don't need to specify them when you murmur something:
|
38
38
|
|
39
39
|
murmurs "text"
|
40
40
|
|
41
41
|
Type "murmurs -h" for full help.
|
42
42
|
|
43
|
-
|
43
|
+
Integrating Mingle Murmurs with Git
|
44
44
|
----------------
|
45
|
+
Murmurs gem can be used to integrate with Git. Use the following instructions to setup your git server so that it murmurs everytime something has been pushed to the server.
|
45
46
|
|
46
47
|
On your Git server:
|
47
48
|
|
data/bin/murmurs
CHANGED
@@ -24,6 +24,16 @@ For further information about Mingle user access key id and secure key, please r
|
|
24
24
|
http://www.thoughtworks.com/products/docs/mingle/current/help/configuring_hmac_authentication.html
|
25
25
|
}
|
26
26
|
|
27
|
+
GIT_INTALLATION_NOTES = %Q{
|
28
|
+
Please setup the following git config:
|
29
|
+
git config hooks.minglemurmursurl "https://<your_site>.mingle.thoughtworks.com/api/v2/pro
|
30
|
+
git config hooks.mingleaccesskeyid "MINGLE ACCESS KEY ID"
|
31
|
+
git config hooks.mingleaccesssecretkey "MINGLE ACCESS SECRET KEY"
|
32
|
+
|
33
|
+
For further information about MINGLE ACCESS KEY ID and MINGLE ACCESS SECRET KEY, please read:
|
34
|
+
http://www.thoughtworks.com/products/docs/mingle/current/help/configuring_hmac_authentication.html
|
35
|
+
}
|
36
|
+
|
27
37
|
opts = OptionParser.new do |opts|
|
28
38
|
opts.banner = "Usage: murmurs [options] MESSAGE"
|
29
39
|
|
@@ -69,20 +79,15 @@ end.parse!
|
|
69
79
|
|
70
80
|
include Murmurs
|
71
81
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
}
|
84
|
-
|
85
|
-
else
|
86
|
-
msg = ARGV[0] || (STDIN.tty? ? nil : STDIN.read)
|
87
|
-
murmur(options.delete(:murmurs_url), msg, options)
|
82
|
+
begin
|
83
|
+
if git_repo_path = options[:install_git_hook]
|
84
|
+
hook = install_git_hook(git_repo_path, __FILE__)
|
85
|
+
puts "Installed #{hook}"
|
86
|
+
puts GIT_INTALLATION_NOTES
|
87
|
+
else
|
88
|
+
msg = ARGV[0] || (STDIN.tty? ? nil : STDIN.read)
|
89
|
+
murmur(options.delete(:murmurs_url), msg, options)
|
90
|
+
end
|
91
|
+
rescue Error => e
|
92
|
+
puts e.message
|
88
93
|
end
|
data/lib/murmurs/git.rb
CHANGED
@@ -31,7 +31,7 @@ mingle_murmurs_url=$(git config hooks.minglemurmursurl)
|
|
31
31
|
mingle_access_key_id=$(git config hooks.mingleaccesskeyid)
|
32
32
|
mingle_access_secret_key=$(git config hooks.mingleaccesssecretkey)
|
33
33
|
|
34
|
-
echo "$(cat)" | #{script} -g -b master -m "$mingle_murmurs_url" -k "$mingle_access_key_id" -s "$mingle_access_secret_key"
|
34
|
+
echo "$(cat)" | #{script.inspect} -g -b master -m "$mingle_murmurs_url" -k "$mingle_access_key_id" -s "$mingle_access_secret_key"
|
35
35
|
BASH
|
36
36
|
end
|
37
37
|
FileUtils.chmod('+x', hook)
|
data/lib/murmurs.rb
CHANGED
@@ -6,9 +6,10 @@ require 'json'
|
|
6
6
|
require 'murmurs/git'
|
7
7
|
|
8
8
|
module Murmurs
|
9
|
-
class
|
10
|
-
class
|
11
|
-
class
|
9
|
+
class Error < StandardError; end
|
10
|
+
class InvalidMurmursURLError < Error; end
|
11
|
+
class UnexpectedResponseError < Error; end
|
12
|
+
class HookExistsError < Error; end
|
12
13
|
|
13
14
|
include Git
|
14
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: murmurs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
hash:
|
77
|
+
hash: 4152477486673083389
|
78
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
79
|
none: false
|
80
80
|
requirements:
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
segments:
|
85
85
|
- 0
|
86
|
-
hash:
|
86
|
+
hash: 4152477486673083389
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project:
|
89
89
|
rubygems_version: 1.8.23
|