uniq-ci-reporter 0.2.3 → 0.2.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: acae7f76527a1625e88bdeade4e7f1d1a4d01126
4
- data.tar.gz: aecd0ef249025e34c98b09ac259b4ed7edf714a1
3
+ metadata.gz: 12a61c7547643abc53101ab6008671f71a0175e4
4
+ data.tar.gz: ff85215150c9c520008959aee33fa929c36b52dd
5
5
  SHA512:
6
- metadata.gz: fae7b403e28e481adb4b20a88c5b5974e6a1de9e2e0db6b3425d8a533caa5c73f4910ae6fff1d2db64903c2f5fef9611c2ac50b8c76451898e028d6b167eaa23
7
- data.tar.gz: 4c60f212b010bba2f63a57aaff7878083c74a66e632b3d40797373bef24ef7f0010b216a33ecc6a0b24f55a0f2c51636da7450c56143539ddfb3a74c686befa1
6
+ metadata.gz: 8ba80af6477439f9f8b25a393ca683e46b14d77ad53cda0bd64808f86cb3b521a6c7675fe20dec0857bbe992b54994831da0643f895260f7aa6257bdf5d04091
7
+ data.tar.gz: d52f8e2d9f66bd856763e89c711469bd70a069feb4abed3d6ea4de5f412b220f1718e1a2670862dbb6f0316e06a4d7da5ec70355f4abd268bf93864b82233086
@@ -26,6 +26,10 @@ class Options
26
26
  ci_config["matchers"]
27
27
  end
28
28
 
29
+ def url_prefix
30
+ ci_config["url_prefix"]
31
+ end
32
+
29
33
  def valid?
30
34
  [ "fail", "success" ].include?(verb) && !ci_config.nil? &&
31
35
  hipchat_token && hipchat_room && matchers
@@ -73,15 +77,15 @@ end
73
77
  class TalkingRamil
74
78
  class << self
75
79
 
76
- def announce(what, hero)
80
+ def announce(what, hero, url_prefix=nil)
77
81
  puts "Announcing #{what} for #{hero}"
78
- send_ramil_request(what, hero: hero)
82
+ send_ramil_request(url_prefix || "http://192.168.10.32:8082/build/", what, hero: hero)
79
83
  end
80
84
 
81
85
  private
82
86
 
83
- def send_ramil_request(verb, params={})
84
- Net::HTTP.post_form(URI.parse("http://192.168.10.32:8082/build/#{verb}"), params)
87
+ def send_ramil_request(url_prefix, verb, params={})
88
+ Net::HTTP.post_form(URI.parse("#{url_prefix}/#{verb}"), params)
85
89
  end
86
90
  end
87
91
  end
@@ -123,7 +127,7 @@ end
123
127
 
124
128
  git = Git.new(opts.matchers)
125
129
  Hipchat.announce(opts.hipchat_token, opts.hipchat_room, opts.verb, git.last_commit_time, git.last_commit_sha, git.last_comitter_name)
126
- TalkingRamil.announce(opts.verb, git.last_comitter_name)
130
+ TalkingRamil.announce(opts.verb, git.last_comitter_name, opts.url_prefix)
127
131
 
128
132
  case opts.verb
129
133
  when "success"
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "uniq-ci-reporter"
7
- spec.version = "0.2.3"
7
+ spec.version = "0.2.5"
8
8
  spec.authors = ["Ivan Kasatenko"]
9
9
  spec.email = ["sky.31338@gmail.com"]
10
10
  spec.summary = %q{UNIQ systems CI reporter}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uniq-ci-reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kasatenko