murmurs 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
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
- Integrate Mingle Murmurs with Git
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
- if git_repo_path = options[:install_git_hook]
73
- hook = install_git_hook(git_repo_path, __FILE__)
74
- puts "Installed #{hook}"
75
- puts "Please setup the following git config:"
76
- puts %Q{
77
- git config hooks.minglemurmursurl "https://<your_site>.mingle.thoughtworks.com/api/v2/pro
78
- git config hooks.mingleaccesskeyid "MINGLE ACCESS KEY ID"
79
- git config hooks.mingleaccesssecretkey "MINGLE ACCESS SECRET KEY"
80
-
81
- For further information about MINGLE ACCESS KEY ID and MINGLE ACCESS SECRET KEY, please read:
82
- http://www.thoughtworks.com/products/docs/mingle/current/help/configuring_hmac_authentication.html
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 InvalidMurmursURLError < StandardError; end
10
- class UnexpectedResponseError < StandardError; end
11
- class HookExistsError < StandardError; end
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.7
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: 4595464421835208926
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: 4595464421835208926
86
+ hash: 4152477486673083389
87
87
  requirements: []
88
88
  rubyforge_project:
89
89
  rubygems_version: 1.8.23