murmurs 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +61 -0
- data/lib/murmurs.rb +8 -1
- metadata +21 -13
- checksums.yaml +0 -7
data/README.md
CHANGED
@@ -0,0 +1,61 @@
|
|
1
|
+
Murmurs
|
2
|
+
================
|
3
|
+
|
4
|
+
Murmurs is a rubygem provides commands to post a murmur message to your Mingle project.
|
5
|
+
|
6
|
+
Ruby 1.9+ is required.
|
7
|
+
|
8
|
+
Installation
|
9
|
+
----------------
|
10
|
+
|
11
|
+
gem install murmurs
|
12
|
+
|
13
|
+
A command 'murmurs' will be installed.
|
14
|
+
|
15
|
+
Usage
|
16
|
+
----------------
|
17
|
+
|
18
|
+
For posting a murmur on your Mingle project, you need specify:
|
19
|
+
|
20
|
+
1. Mingle murmurs URL. It is pointing to your Mingle site and project murmurs api endpoint.
|
21
|
+
Example: https://site-name.mingle-api.thoughtworks.com/api/v2/projects/your_project/murmurs.xml
|
22
|
+
2. Mingle uses HMAC auth access key id and HMAC auth access secret key. Every user can generate one HMAC secret key from his or her profile page under the HMAC Auth Key tab.
|
23
|
+
For further information about Mingle user access key id and secret key, please read:
|
24
|
+
http://www.thoughtworks.com/products/docs/mingle/current/help/configuring_hmac_authentication.html
|
25
|
+
|
26
|
+
Example:
|
27
|
+
|
28
|
+
murmurs -m https://site-name.mingle-api.thoughtworks.com/api/v2/projects/your_project/murmurs.xml -k mingle_access_key_id -s mingle_access_secure_key "Murmurs Git integration is done. Our git commits will stream to our project's Murmurs."
|
29
|
+
|
30
|
+
You can also setup environment variables for the configurations needed as follows:
|
31
|
+
|
32
|
+
export MINGLE_MURMURS_URL=https://site-name.mingle-api.thoughtworks.com/api/v2/projects/your_project/murmurs.xml
|
33
|
+
export MINGLE_ACCESS_KEY_ID=mingle_access_key_id
|
34
|
+
export MINGLE_ACCESS_SECRET_KEY=mingle_access_secret_key
|
35
|
+
|
36
|
+
So that you don't need to specify them when murmur something:
|
37
|
+
|
38
|
+
murmurs "text"
|
39
|
+
|
40
|
+
Type "murmurs -h" for full help.
|
41
|
+
|
42
|
+
Integrate Mingle Murmurs with Git
|
43
|
+
----------------
|
44
|
+
|
45
|
+
On your Git server:
|
46
|
+
|
47
|
+
install ruby 1.9+
|
48
|
+
install rubygems if there was no one installed with ruby
|
49
|
+
gem install murmurs
|
50
|
+
|
51
|
+
murmurs gem should install a new command 'murmurs-git' (In some OS, the script name maybe changed to murmurs-git1.9 for ruby 1.9)
|
52
|
+
|
53
|
+
Install the git hook for post-receive:
|
54
|
+
|
55
|
+
murmurs-git <mingle repository path>
|
56
|
+
|
57
|
+
Then, in the git repository, setup the following configs:
|
58
|
+
|
59
|
+
git config hooks.minglemurmursurl "https://your-site.mingle-api.thoughtworks.com/api/v2/projects/your_project/murmurs.xml"
|
60
|
+
git config hooks.mingleaccesskeyid <Mingle user access key id>
|
61
|
+
git config hooks.mingleaccesssecretkey <Mingle user access secret key>
|
data/lib/murmurs.rb
CHANGED
@@ -6,6 +6,7 @@ require 'json'
|
|
6
6
|
|
7
7
|
module Murmurs
|
8
8
|
class InvalidMurmursURLError < StandardError; end
|
9
|
+
class UnexpectedResponseError < StandardError; end
|
9
10
|
|
10
11
|
def murmur(url, msg, options={})
|
11
12
|
if options[:git]
|
@@ -70,6 +71,8 @@ module Murmurs
|
|
70
71
|
end
|
71
72
|
`git rev-list #{revs}`.split("\n").map do |rev|
|
72
73
|
`git log -n 1 #{rev}`
|
74
|
+
end.reverse.map do |msg|
|
75
|
+
"Repository: #{File.basename(Dir.getwd)}\n#{msg}"
|
73
76
|
end
|
74
77
|
end
|
75
78
|
end
|
@@ -99,7 +102,11 @@ module Murmurs
|
|
99
102
|
response = http.request(request)
|
100
103
|
|
101
104
|
if response.code.to_i > 300
|
102
|
-
|
105
|
+
raise UnexpectedResponseError, <<-ERROR
|
106
|
+
\nRequest URL: #{url}
|
107
|
+
Response: #{response.code} #{response.message}
|
108
|
+
Response Headers: #{response.to_hash.inspect}\nResponse Body: #{response.body}"
|
109
|
+
ERROR
|
103
110
|
end
|
104
111
|
end
|
105
112
|
end
|
metadata
CHANGED
@@ -1,46 +1,53 @@
|
|
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.4
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- ThoughtWorks Mingle Team
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-07 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: api-auth
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: 1.1.0
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 1.1.0
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: json
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: 1.8.1
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: 1.8.1
|
41
|
-
description:
|
42
|
-
|
46
|
+
description: ! 'Use HMAC to create murmur in Mingle project.
|
47
|
+
|
43
48
|
Git post-receive hook to post murmurs when new commits pushed to Git server.
|
49
|
+
|
50
|
+
'
|
44
51
|
email:
|
45
52
|
- mingle-dev@thoughtworks.com
|
46
53
|
executables:
|
@@ -56,25 +63,26 @@ files:
|
|
56
63
|
homepage: https://github.com/ThoughtWorksStudios/murmurs
|
57
64
|
licenses:
|
58
65
|
- MIT
|
59
|
-
metadata: {}
|
60
66
|
post_install_message:
|
61
67
|
rdoc_options: []
|
62
68
|
require_paths:
|
63
69
|
- lib
|
64
70
|
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
65
72
|
requirements:
|
66
|
-
- -
|
73
|
+
- - ! '>='
|
67
74
|
- !ruby/object:Gem::Version
|
68
75
|
version: '0'
|
69
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
70
78
|
requirements:
|
71
|
-
- -
|
79
|
+
- - ! '>='
|
72
80
|
- !ruby/object:Gem::Version
|
73
81
|
version: '0'
|
74
82
|
requirements: []
|
75
83
|
rubyforge_project:
|
76
|
-
rubygems_version:
|
84
|
+
rubygems_version: 1.8.23
|
77
85
|
signing_key:
|
78
|
-
specification_version:
|
86
|
+
specification_version: 3
|
79
87
|
summary: Post murmur to Mingle project murmurs
|
80
88
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 5ceb67cfc3d4fb198e351f552d210920b5a4782c
|
4
|
-
data.tar.gz: 13873e634d77ec001d70ce537e8420da3ac25618
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: ea6cabec5e53fc13b741d9a2c7b8864e98196d8c39f46d78b7e560d03cb718f2178d30e5ae269f64ee11fb5b69dfa5dc8ff934ed8fa32eb4b5507e735acb2be4
|
7
|
-
data.tar.gz: ddf79b99bc3ee18f5e9987c771bf5fe05e8bf6f5da8c585c59686860559dd0898a7cc1857c739a8081646a9aaff436fb70356a906bee8199fe5e1a99707831ca
|