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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 109ee9046094b99c7ccb3fc7b188fcca9240a61ae2d5c2091c4257483b447746
4
- data.tar.gz: 0776f0ab8215402924da52459e1336869dcc0bb9cce5288575c71e6a77e22dc0
3
+ metadata.gz: 622f0e79014b95f0a29a10498e2b6a37797bf520008ff620b2f7737211ec5df2
4
+ data.tar.gz: d3884f717e851c716a22c1bab2ccf95f1ef2d0f10f1d9577cbf47c16ba4def3f
5
5
  SHA512:
6
- metadata.gz: 511df857b1ae53375702fa50b65335a98d31a6bb8c163802cac77451cb152fc517770272378c10901a294e4e77d8234add7ae3795679a15e2aa7b0bfc750cd71
7
- data.tar.gz: 9312d564d9a86db24cdac3646645fb2fbca4ea996be8c96eaa3902defd6f3036134d5cf5de29d386dce2a7dea10ef7f0cd1ae77a09db6579cca929d4ba560d8d
6
+ metadata.gz: cf6e799e603f5daac2fecda675a212b39bf2853ac6225e6ef4d960f23eb66ab10616ceed4a440c1eb49b42928985940dca89852bd5f2f1f69e0284ea6d4660d4
7
+ data.tar.gz: 425fac64c8f5c21b81dec9ca951f6474dcfea8d9acfbf83ac2ba714d0bfc2298da547de2da6c7a2cbdd1e23f4ce090202790d572599e8b50110fe96fd29842db
data/.rubocop.yml ADDED
@@ -0,0 +1,3 @@
1
+ ---
2
+ inherit_gem:
3
+ dvla-lint: ".rubocop.yml"
@@ -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
@@ -1,5 +1,5 @@
1
1
  module DVLA
2
2
  module Atlas
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.1.0'.freeze
4
4
  end
5
5
  end
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.0.0
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: 2023-11-14 00:00:00.000000000 Z
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