defra_ruby_companies_house 1.0.0 → 1.0.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: b916c7f7519769a21a038a9f8aad59c9bac9fe370c0d97c39679722f80c21ed0
4
- data.tar.gz: 23c12287100df332cf28a65a1f82600d73f75f0ef0c1ad255828a632356f4804
3
+ metadata.gz: 9eb2868d4b1e99ad1cc0d587001183b0e537db29faf84669790d2c6c6b60856e
4
+ data.tar.gz: 7c0f5eae22c1b8bf10952a840637b944b82587d8e121b4d4c726e49328a6a78f
5
5
  SHA512:
6
- metadata.gz: 55feda28269d6f06426f2adaaf9a502e0c60a29cba2413e4d48740595c5ab03dff94fa70aa994af05e80bf5b34412bbf0e63bac09661eb6e1dfc474ed6666195
7
- data.tar.gz: d6d45480e0aac478a41a27496fa8b4d34f4ba17671c83970abd0097815a061b094f7759fd85406238a273b3ae263e074122fa54fad4fad0cff878c5d9c6aea22
6
+ metadata.gz: 706e0000775bc861cdb6f87db5703f0125a24b222dee562d977c95791b77b4384f3a54c4a3c9a475b0fa23559d2e42a07152919bea06bfc76a2f7fba59d94325
7
+ data.tar.gz: 0e72ce1972abf42694ce0dc78d66cf38c648e311109a61823b45dbd8b8d2bfdff14872fa0ccf455faa800e6eaba025d67a70db8437ef2c5fe3c90387ebb47115
@@ -105,10 +105,10 @@ module DefraRuby
105
105
  address = companies_house_api_response[:registered_office_address]
106
106
 
107
107
  [
108
- address[:address_line_1],
109
- address[:address_line_2],
110
- address[:locality],
111
- address[:postal_code]
108
+ address&.dig(:address_line_1),
109
+ address&.dig(:address_line_2),
110
+ address&.dig(:locality),
111
+ address&.dig(:postal_code)
112
112
  ].compact
113
113
  end
114
114
  # rubocop:enable Naming/VariableNumber
@@ -127,7 +127,7 @@ module DefraRuby
127
127
  end
128
128
 
129
129
  def log_error(error)
130
- logged_error = "Error getting details for company \"#{company_number}\": #{error}"
130
+ logged_error = "Error (#{error.class}) getting details for company \"#{company_number}\": #{error}"
131
131
  DefraRuby::CompaniesHouse.logger.error logged_error
132
132
  Airbrake.notify(logged_error) if defined?(Airbrake)
133
133
  end
@@ -12,7 +12,7 @@ module DefraRuby
12
12
  # This means values in the host app can override those in the engine
13
13
  config.before_initialize do
14
14
  # engine_locales = Dir["#{config.root}/config/locales/**/*.yml"]
15
- engine_locales = Dir.glob( File.dirname(__FILE__) + "lib/locales/*.{rb,yml}" )
15
+ engine_locales = Dir.glob("#{File.dirname(__FILE__)}lib/locales/*.{rb,yml}")
16
16
  config.i18n.load_path = engine_locales + config.i18n.load_path
17
17
  end
18
18
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module DefraRuby
4
4
  module CompaniesHouse
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: defra_ruby_companies_house
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Defra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-21 00:00:00.000000000 Z
11
+ date: 2024-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n