murmurs 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/murmurs +10 -0
  2. data/lib/murmurs.rb +3 -1
  3. metadata +2 -8
@@ -60,6 +60,16 @@ opts = OptionParser.new do |opts|
60
60
  options[:git_branch] = v
61
61
  end
62
62
 
63
+ opts.on("-u", "--user basic_auth_user_login", "Mingle user login for posting murmur by basic auth instead of HMAC") do |v|
64
+ options[:basic_auth] ||= {}
65
+ options[:basic_auth][:user] = v
66
+ end
67
+
68
+ opts.on("-p", "--password basic_auth_user_password", "Mingle user password for posting murmur by basic auth instead of HMAC") do |v|
69
+ options[:basic_auth] ||= {}
70
+ options[:basic_auth][:password] = v
71
+ end
72
+
63
73
  opts.on_tail("-i", "--skip_ssl_verify", "Skip SSL verify in case the server is using self signed SSL certificate, default is false") do
64
74
  options[:skip_ssl_verify] = true
65
75
  end
@@ -69,7 +69,9 @@ module Murmurs
69
69
  request['Content-Type'] = 'application/json'
70
70
  request['Content-Length'] = body.bytesize
71
71
 
72
-
72
+ if options[:basic_auth]
73
+ request.basic_auth(options[:basic_auth][:user], options[:basic_auth][:password])
74
+ end
73
75
  if options[:access_key_id]
74
76
  ApiAuth.sign!(request, options[:access_key_id], options[:access_secret_key])
75
77
  end
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.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-30 00:00:00.000000000 Z
12
+ date: 2014-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: api-auth
@@ -58,18 +58,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
58
  - - ! '>='
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
- segments:
62
- - 0
63
- hash: 4020071613335990687
64
61
  required_rubygems_version: !ruby/object:Gem::Requirement
65
62
  none: false
66
63
  requirements:
67
64
  - - ! '>='
68
65
  - !ruby/object:Gem::Version
69
66
  version: '0'
70
- segments:
71
- - 0
72
- hash: 4020071613335990687
73
67
  requirements: []
74
68
  rubyforge_project:
75
69
  rubygems_version: 1.8.23