kennel 1.10.0 → 1.10.1

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: 572605900165245c9537fea47b745878290b7a4b7d8dd43bab4ca64734a0a896
4
- data.tar.gz: 9c14dd660b67749199624c278e8a2e8560a1d3103cb01c07e96be67a591c7a8a
3
+ metadata.gz: 07c472c465c330e2237bcf73dba38c6f2d69a6f9778358eba1fca4d2ff1aab6b
4
+ data.tar.gz: 02d44b26f289f60013cc78e70a54eb56a2ac3283cf91cbf7b49e75728631c44a
5
5
  SHA512:
6
- metadata.gz: 8b7cfe486cad42e6dfe9ff81f4d8f006f84c3778a3c5b9a13f57ec9039120721a2488cc00b7d4de196ed2e5d3e77e32b7f9bc35c74149276bca4a52c2f50e193
7
- data.tar.gz: 44a0db2b5dd65255ff5eb030d0a2b21a6ba9e8e7a9c359742a0d71c4a6ba19571295e9c67fa56887f9a12a42ec3bbdd810476f3f731a9af7797406866ec942ae
6
+ metadata.gz: 741b5c7f1d393630b1fae59a9dcca3d447dbb570972941dcce1a4ecd5e200f876899b2e66c33f7be84d7068f10fbf01b0c9311af4d704ede546b6e4bc0344026
7
+ data.tar.gz: e13f42a61cbe8f97443b1513e2d79848a90003c9a57e021d3b0f1f78c45912fe96e736d12e23996c1b5cc49cb444bb84ab2390d39aaa52e37fc4d41bc054505f
data/lib/kennel/syncer.rb CHANGED
@@ -54,11 +54,9 @@ module Kennel
54
54
  def calculate_diff
55
55
  @update = []
56
56
  @delete = []
57
-
58
57
  actual = Progress.progress "Downloading definitions" do
59
- download_definitions
58
+ filter_by_project! download_definitions
60
59
  end
61
- actual.select! { |a| tracking_id(a)&.start_with?("#{@project_filter}:") } if @project_filter
62
60
 
63
61
  Progress.progress "Diffing" do
64
62
  details_cache do |cache|
@@ -170,6 +168,16 @@ module Kennel
170
168
  end
171
169
  end
172
170
 
171
+ def filter_by_project!(definitions)
172
+ if @project_filter
173
+ definitions.select! do |a|
174
+ id = tracking_id(a)
175
+ !id || id.start_with?("#{@project_filter}:")
176
+ end
177
+ end
178
+ definitions
179
+ end
180
+
173
181
  def add_tracking_id(e)
174
182
  e.as_json[tracking_field(e.as_json)] +=
175
183
  "\n-- Managed by kennel #{e.tracking_id} in #{e.project.class.file_location}, do not modify manually"
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.10.0"
3
+ VERSION = "1.10.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-02 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday