dvla-atlas 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/lib/dvla/atlas/artefacts.rb +5 -5
- data/lib/dvla/atlas/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 622f0e79014b95f0a29a10498e2b6a37797bf520008ff620b2f7737211ec5df2
|
4
|
+
data.tar.gz: d3884f717e851c716a22c1bab2ccf95f1ef2d0f10f1d9577cbf47c16ba4def3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf6e799e603f5daac2fecda675a212b39bf2853ac6225e6ef4d960f23eb66ab10616ceed4a440c1eb49b42928985940dca89852bd5f2f1f69e0284ea6d4660d4
|
7
|
+
data.tar.gz: 425fac64c8f5c21b81dec9ca951f6474dcfea8d9acfbf83ac2ba714d0bfc2298da547de2da6c7a2cbdd1e23f4ce090202790d572599e8b50110fe96fd29842db
|
data/.rubocop.yml
ADDED
data/lib/dvla/atlas/artefacts.rb
CHANGED
@@ -7,7 +7,7 @@ module DVLA
|
|
7
7
|
class Artefacts
|
8
8
|
extend T::Sig
|
9
9
|
|
10
|
-
sig { params(vargs: String, kwargs: T.untyped).void }
|
10
|
+
sig { params(vargs: T.any(String, Symbol), kwargs: T.untyped).void }
|
11
11
|
def define_fields(*vargs, **kwargs)
|
12
12
|
vargs.each do |attr|
|
13
13
|
initialise_fields(attr)
|
@@ -25,17 +25,17 @@ module DVLA
|
|
25
25
|
def initialise_fields(name)
|
26
26
|
# Create the history of the newly defined field. This will start out empty. There is no public way to set this so
|
27
27
|
# no need to expose it by defining a method.
|
28
|
-
instance_variable_set("@#{name}_history", [])
|
28
|
+
instance_variable_set(:"@#{name}_history", [])
|
29
29
|
|
30
30
|
# Create the getter for the new field, and ensure that it is run upon call if it is a proc.
|
31
31
|
define_singleton_method :"#{name}" do
|
32
|
-
value = instance_variable_get("@#{name}")
|
32
|
+
value = instance_variable_get(:"@#{name}")
|
33
33
|
value.respond_to?(:call) ? value.call : value
|
34
34
|
end
|
35
35
|
|
36
36
|
# Define a getter for the history of the new field
|
37
37
|
define_singleton_method :"#{name}_history" do
|
38
|
-
instance_variable_get("@#{name}_history")
|
38
|
+
instance_variable_get(:"@#{name}_history")
|
39
39
|
end
|
40
40
|
|
41
41
|
# Define the setter for the new field. This also pushes the current value of the field into the history unless
|
@@ -44,7 +44,7 @@ module DVLA
|
|
44
44
|
define_singleton_method :"#{name}=" do |arg|
|
45
45
|
current_value = send(:"#{name}")
|
46
46
|
send(:"#{name}_history").push(current_value) unless send(:"#{name}_history").empty? && current_value.nil?
|
47
|
-
instance_variable_set("@#{name}", arg)
|
47
|
+
instance_variable_set(:"@#{name}", arg)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/lib/dvla/atlas/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dvla-atlas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Driver and Vehicle Licensing Agency (DVLA)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sorbet-runtime
|
@@ -39,6 +39,20 @@ dependencies:
|
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0.9'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: dvla-lint
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.7'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.7'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
57
|
name: rspec
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,6 +102,7 @@ executables: []
|
|
88
102
|
extensions: []
|
89
103
|
extra_rdoc_files: []
|
90
104
|
files:
|
105
|
+
- ".rubocop.yml"
|
91
106
|
- ".ruby-version"
|
92
107
|
- Gemfile
|
93
108
|
- LICENSE
|