deputy 0.1.31 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/deputy.gemspec +3 -3
  3. data/lib/deputy.rb +6 -2
  4. metadata +8 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.31
1
+ 0.1.33
data/deputy.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{deputy}
8
- s.version = "0.1.31"
8
+ s.version = "0.1.33"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.homepage = %q{http://github.com/dawanda/deputy}
27
27
  s.rdoc_options = ["--charset=UTF-8"]
28
28
  s.require_paths = ["lib"]
29
- s.rubygems_version = %q{1.3.6}
29
+ s.rubygems_version = %q{1.3.7}
30
30
  s.summary = %q{Report to the sheriff}
31
31
  s.test_files = [
32
32
  "spec/deputy_spec.rb",
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
37
37
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
38
38
  s.specification_version = 3
39
39
 
40
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
40
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
41
  else
42
42
  end
43
43
  else
data/lib/deputy.rb CHANGED
@@ -118,10 +118,14 @@ module Deputy
118
118
  get "/notify?group=#{CGI.escape group}&value=#{CGI.escape value.to_s}"
119
119
  end
120
120
 
121
- def self.get(path)
121
+ def self.get(path, options = {})
122
+
122
123
  url = "#{sheriff_url}#{path}"
124
+ url = url.sub(%r{(.*?):.(*?)@}, '')
125
+ auth = [$1, $2].compact
126
+ options = {:http_basic_authentication => auth} if auth.size == 2
123
127
  Timeout.timeout(config['timeout']||10) do
124
- open(url).read
128
+ open(url, options).read
125
129
  end
126
130
  rescue => e
127
131
  e.message << url.to_s
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deputy
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 89
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 31
9
- version: 0.1.31
9
+ - 33
10
+ version: 0.1.33
10
11
  platform: ruby
11
12
  authors:
12
13
  - Michael Grosser
@@ -45,23 +46,27 @@ rdoc_options:
45
46
  require_paths:
46
47
  - lib
47
48
  required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
48
50
  requirements:
49
51
  - - ">="
50
52
  - !ruby/object:Gem::Version
53
+ hash: 3
51
54
  segments:
52
55
  - 0
53
56
  version: "0"
54
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
+ none: false
55
59
  requirements:
56
60
  - - ">="
57
61
  - !ruby/object:Gem::Version
62
+ hash: 3
58
63
  segments:
59
64
  - 0
60
65
  version: "0"
61
66
  requirements: []
62
67
 
63
68
  rubyforge_project:
64
- rubygems_version: 1.3.6
69
+ rubygems_version: 1.3.7
65
70
  signing_key:
66
71
  specification_version: 3
67
72
  summary: Report to the sheriff