hotdog 0.1.3 → 0.1.4

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: 55a9182f8b6f286b99a6d76bd70db231d1e04945
4
- data.tar.gz: e3eda56735a69185bf33faa2f1bc027b3573464c
3
+ metadata.gz: d5814468d246a0a23d4258b4a371ebf2b5f59dc0
4
+ data.tar.gz: 3911eafd56a1e4b63d379cb3a252af932daf2b3d
5
5
  SHA512:
6
- metadata.gz: 2fa9df74864b65781ddf36978fabfaed7c002e86173e9cb50b7a504addee6862d42d27b1d9b2ac397316080f9cb6e73529cc7bdea1904be69ff0222bf6b2174a
7
- data.tar.gz: 28d70713ab309b7383f830f9d9fcf3431bf0f30c37a4ebfdc3b55592a4a0fd4dbe497712f5ed3dd0ded0da5568c4ea680484ada4e11d5aaff2ffc7361eacdcb0
6
+ metadata.gz: 54d974364fc3fcf36157aa8caabdf88c86b77c2fb7e6ab7e91c7e911a31ea3d76f40fe11ae1d18b123a196a1070c0ed43a84b6f87c8e97d4f7360725db00fc89
7
+ data.tar.gz: a30026d51aa4fe2134ad8d3b392f3c7b4664c15abbbe90f6e384251cc7fbd79b49b8ed6b95b413929231b4208f0200b9923f92fee930177c6e4c701d4ab6e7cd
@@ -208,8 +208,12 @@ module Hotdog
208
208
 
209
209
  class TagExpressionNode < ExpressionNode
210
210
  def initialize(identifier, attribute)
211
- @identifier = identifier
212
- @attribute = attribute
211
+ if identifier == "host"
212
+ @identifier = attribute
213
+ else
214
+ @identifier = identifier
215
+ @attribute = attribute
216
+ end
213
217
  end
214
218
  attr_reader :identifier
215
219
  attr_reader :attribute
@@ -154,6 +154,9 @@ module Hotdog
154
154
  }.reduce(:+)
155
155
  downs ||= []
156
156
 
157
+ # for case-insensitive match of hostname
158
+ downs = downs.map { |down| down.downcase }
159
+
157
160
  if not downs.empty?
158
161
  logger.info("ignore host(s) with scheduled downtimes: #{downs.inspect}")
159
162
  end
@@ -163,7 +166,7 @@ module Hotdog
163
166
  tag_value ||= ""
164
167
  insert_or_ignore_into_tags(memory_db, tag_name, tag_value)
165
168
  hosts.each do |host_name|
166
- if not downs.include?(host_name)
169
+ if not downs.include?(host_name.downcase)
167
170
  insert_or_ignore_into_hosts(memory_db, host_name)
168
171
  insert_or_replace_into_hosts_tags(memory_db, host_name, tag_name, tag_value)
169
172
  end
@@ -1,3 +1,3 @@
1
1
  module Hotdog
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotdog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yamashita Yuu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-28 00:00:00.000000000 Z
11
+ date: 2015-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler