tdc 0.3.2 → 0.3.3

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: d440b515dda7b3c95c5ddabd279894b4bd6c93ac81a17c47fe0191d25fb72391
4
- data.tar.gz: 6878b050a7fc779362fe8b7f3d95e1e0337742e060df42899827a2743290a174
3
+ metadata.gz: e58c0fcfbfa32aa0dde6627786e39bbfaff4140d3326f144925113031163faf8
4
+ data.tar.gz: e9b5f186a199bd2cc3479fd9fd48087fd0f1d433006c03f2502c2cb48c6f300d
5
5
  SHA512:
6
- metadata.gz: 9a54735b2c05f8cbacee18ba4ea5721a0ebeb2be1c8dca6020384ff6088255333f1e2ff1ec708f9446036c851bb55c3b2ad23e528c7c5e79ca5199272bd1e625
7
- data.tar.gz: 487e92c5064480bfe3f2a00a98b1e3e427d15ba3d53619b8e2f96275d7279a1f1b74cbf4c867060f466fbfdc018b9d8d15f85700e6f1b0dbca861c0eaf92fad0
6
+ metadata.gz: 10a3a536987b80e57169defc47b65496550fc3c9ba4fa91d9c6ec448b8debd77d24d44cf5dbe047d708979fd4d29e4b1186ef712d0cfcb0b094cd0418d6d2524
7
+ data.tar.gz: cfd63f4adcb438992e71a4e9ac8c20024c9b1f0d68d4a8eda5765456cb7054c602a3b7f97178f66f5c5e0876314180fd42404c7100d29382d544834e2239f010
@@ -10,6 +10,9 @@ AllCops:
10
10
  Layout/EmptyLinesAroundAttributeAccessor:
11
11
  Enabled: true
12
12
 
13
+ Metrics/LineLength:
14
+ Max: 120
15
+
13
16
  # Rubocop and I cannot agree.
14
17
  Layout/MultilineMethodCallBraceLayout:
15
18
  Enabled: false
@@ -26,7 +29,6 @@ Lint/DuplicateElsifCondition:
26
29
  Lint/MixedRegexpCaptureTypes:
27
30
  Enabled: true
28
31
 
29
-
30
32
  Lint/RaiseException:
31
33
  Enabled: true
32
34
 
@@ -45,9 +47,6 @@ RSpec/AnyInstance:
45
47
  RSpec/ExampleLength:
46
48
  Max: 15
47
49
 
48
- Metrics/LineLength:
49
- Max: 120
50
-
51
50
  RSpec/DescribeClass:
52
51
  Enabled: false
53
52
 
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.3] - 2020-08-04
10
+
11
+ - Add the `empty?` method to `CatalogEntries`
12
+ - Evaluate `_atx` attribute values against a `Time.zone` instance
13
+
9
14
  ## [0.3.2] - 2020-07-27
10
15
 
11
16
  - Return `self` from `DefinitionResolver#configure_current_catalog` to make it chainable
@@ -8,6 +8,10 @@ module Tdc
8
8
  def add_catalog_entry(tag, entry)
9
9
  send("#{tag}=", entry)
10
10
  end
11
+
12
+ def empty?
13
+ to_h.empty?
14
+ end
11
15
  end
12
16
  end
13
17
  end
@@ -44,12 +44,15 @@ module Tdc
44
44
  def run_atx_resolvers(instance_definition)
45
45
  atx_definitions = instance_definition.select { |k, _v| /_atx$/ =~ k }
46
46
 
47
+ # ARM (2020-08-04): Move all the way out so that all generators use the same atx_context.
48
+ atx_context = Time.zone
49
+
47
50
  atx_definitions.each do |k, v|
48
51
  # Remove the original _atx attribute.
49
52
  instance_definition.delete(k)
50
53
 
51
54
  # Add a standard _at attribute.
52
- instance_definition[k.delete_suffix("x")] = eval(v) # rubocop:disable Security/Eval
55
+ instance_definition[k.delete_suffix("x")] = atx_context.instance_eval(v)
53
56
  end
54
57
  end
55
58
  end
@@ -1,3 +1,3 @@
1
1
  module Tdc
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
8
8
 
9
9
  spec.summary = "A simple framework for creating a Test Data Catalog"
10
10
  spec.homepage = "https://github.com/nulogy/tdc"
11
+ spec.license = "MIT"
11
12
 
12
13
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
13
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alistair McKinnell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-28 00:00:00.000000000 Z
11
+ date: 2020-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -146,7 +146,8 @@ files:
146
146
  - lib/tdc/with_indifferent_access_decorator.rb
147
147
  - tdc.gemspec
148
148
  homepage: https://github.com/nulogy/tdc
149
- licenses: []
149
+ licenses:
150
+ - MIT
150
151
  metadata:
151
152
  homepage_uri: https://github.com/nulogy/tdc
152
153
  changelog_uri: https://github.com/nulogy/tdc/blob/master/CHANGELOG.md