watchdoge 0.1.5 → 0.1.6

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
  SHA256:
3
- metadata.gz: 6bbea0942ea0ec77d65de759549b4fe4424fad15ed93b90334c4ce55bb82a19b
4
- data.tar.gz: bf7a691395dfb78b147d3fc0cd26c1f182268c484f240c4ad641e6b44058a07f
3
+ metadata.gz: 52f1684d0e1df194ec63148666c3521b2aefe6d45487856aa3ddc635571f969b
4
+ data.tar.gz: 7aa8813c72f767d42a519880321614f13c7b126febf03506ac4e4e2efe24827c
5
5
  SHA512:
6
- metadata.gz: b57a2f32f4b698d0166e9ec65603cfe3dc28e5c0b4c121392d9259bf8a7d73273a8f0098274a26b81dbed7422d1fd5c6cadd466c0ed13c575804c13870f7c337
7
- data.tar.gz: 389b07819187d124daf610d66bcc1aae3db33f00bad613b19921b69d6f93f867a95aeaec45ac9f83640868c3517856f8b5072f426779c5eaeaa792a8595c0ddf
6
+ metadata.gz: 2acb9f4d48a18d0ed10460a549698725915d52f513d23091df00cbcc7fb112b959bae22cbf3e995337f85e6d1559ef394934d65247c1b456212daa3396ce1fb6
7
+ data.tar.gz: 0cfd2e6ba9ea0f1f16d45fb7709b4e51faf3ff3944f5e8276e7e49bce595c67f86478db9296732d7b66e389828c910408ee069a9f824d65c82a37017b6f9b1e5
@@ -76,11 +76,11 @@ module WatchDoge
76
76
  # key: must be stringify of its class name
77
77
  # value: hash struct, will passed to constructor while push message
78
78
  @notifications = {
79
- # 'SlackWebhook': {
79
+ # slack_webhook: {
80
80
  # incoming_url: SLACK_WEBHOOK
81
81
  # }
82
82
 
83
- # 'MatterMost': {
83
+ # mattermost: {
84
84
  # host: HOST,
85
85
  # channel_id: CHANNEL_ID,
86
86
  # auth_token: AUTH_TOKEN
@@ -6,7 +6,7 @@ require 'uri'
6
6
 
7
7
  module WatchDoge
8
8
  module Notification
9
- class MatterMost
9
+ class Mattermost
10
10
  def initialize args
11
11
  @host = args[:host]
12
12
  @channel_id = args[:channel_id]
@@ -32,8 +32,8 @@ module WatchDoge
32
32
 
33
33
  raise "can't find notification sources in configuration" if sources.empty?
34
34
 
35
- sources.each do |klass, source_args|
36
- source_class = get_source_class klass
35
+ sources.each do |klass_sym, source_args|
36
+ source_class = get_source_class klass_sym
37
37
  source = source_class.new source_args
38
38
  source.push message
39
39
  end
@@ -41,7 +41,9 @@ module WatchDoge
41
41
 
42
42
  private
43
43
 
44
- def get_source_class klass
44
+ def get_source_class klass_sym
45
+ klass = klass_sym.to_s.split('_').collect(&:capitalize).join
46
+
45
47
  "WatchDoge::Notification::#{klass}".constantize
46
48
  end
47
49
  end
@@ -1,4 +1,4 @@
1
1
  # Version of WatchDoge
2
2
  module WatchDoge
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
data/watchdoge.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'watchdoge'
3
- s.version = '0.1.5'
3
+ s.version = '0.1.6'
4
4
  s.date = '2019-07-22'
5
5
  s.summary = "dogi"
6
6
  s.description = "WatchDoge is Ruby on Rails friendly frontend regression test tool"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchdoge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shen Lee
@@ -116,7 +116,7 @@ files:
116
116
  - lib/watchdoge/cookie_pool.rb
117
117
  - lib/watchdoge/image_diff.rb
118
118
  - lib/watchdoge/notification.rb
119
- - lib/watchdoge/notification/matter_most.rb
119
+ - lib/watchdoge/notification/mattermost.rb
120
120
  - lib/watchdoge/notification/slack_webhook.rb
121
121
  - lib/watchdoge/rails/generator.rb
122
122
  - lib/watchdoge/rails/railtie.rb