hotdog 0.18.1 → 0.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hotdog/commands/down.rb +7 -3
- data/lib/hotdog/commands/tag.rb +7 -3
- data/lib/hotdog/commands/untag.rb +6 -2
- data/lib/hotdog/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41826771eee978718b934da22818cc2da5d0e3c6
|
4
|
+
data.tar.gz: abc210a02a3a1b571ec5013bbb4b62791221cecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a150d41cbbe3090ef6c8fc53fb03a183e9ddfdcf25ddc2056096adf3718b8830b8e4be3b25faeae658cdcfbd6d324f9b00c964c1ecf96d7dd02dfa19a734c9bf
|
7
|
+
data.tar.gz: b555bb6321256c117b764c2f65bcbc635dce11f6510554484e1ad3316098bdaa0d3089a345b29d31989332956570e41ed8967bd416c437b5d51399233e78f44d
|
data/lib/hotdog/commands/down.rb
CHANGED
@@ -41,9 +41,13 @@ module Hotdog
|
|
41
41
|
}
|
42
42
|
if 0 < hosts.length
|
43
43
|
if open_db
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
with_retry do
|
45
|
+
@db.transaction do
|
46
|
+
hosts.each_slice(SQLITE_LIMIT_COMPOUND_SELECT) do |hosts|
|
47
|
+
execute_db(@db, "DELETE FROM hosts_tags WHERE host_id IN ( SELECT id FROM hosts WHERE name IN (%s) )" % hosts.map { "?" }.join(", "), hosts)
|
48
|
+
execute_db(@db, "DELETE FROM hosts WHERE name IN (%s)" % hosts.map { "?" }.join(", "), hosts)
|
49
|
+
end
|
50
|
+
end
|
47
51
|
end
|
48
52
|
end
|
49
53
|
end
|
data/lib/hotdog/commands/tag.rb
CHANGED
@@ -38,9 +38,13 @@ module Hotdog
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
if open_db
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
with_retry do
|
42
|
+
@db.transaction do
|
43
|
+
create_tags(@db, options[:tags])
|
44
|
+
options[:tags].each do |tag|
|
45
|
+
associae_tag_hosts(@db, tag, hosts)
|
46
|
+
end
|
47
|
+
end
|
44
48
|
end
|
45
49
|
end
|
46
50
|
end
|
@@ -53,8 +53,12 @@ module Hotdog
|
|
53
53
|
remove_db
|
54
54
|
else
|
55
55
|
if open_db
|
56
|
-
|
57
|
-
|
56
|
+
with_retry do
|
57
|
+
@db.transaction do
|
58
|
+
options[:tags].each do |tag|
|
59
|
+
disassociate_tag_hosts(@db, tag, hosts)
|
60
|
+
end
|
61
|
+
end
|
58
62
|
end
|
59
63
|
end
|
60
64
|
end
|
data/lib/hotdog/version.rb
CHANGED
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.18.
|
4
|
+
version: 0.18.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yamashita Yuu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -263,4 +263,3 @@ test_files:
|
|
263
263
|
- spec/parser/regexp_expression_spec.rb
|
264
264
|
- spec/parser/string_expression_spec.rb
|
265
265
|
- spec/spec_helper.rb
|
266
|
-
has_rdoc:
|