geopolitical 1.0.5 → 2.0.0

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
  SHA1:
3
- metadata.gz: 3cdc5dc0608aee7e4551aa5fff07dfba18ce0082
4
- data.tar.gz: 4e7df3738dbef03c080f63438c4291a3414eb1f2
3
+ metadata.gz: 3fcaf0124ce75104648c84339eccf76ca9bef60d
4
+ data.tar.gz: cd2c77e60f52d17b1cba1ce4cd8e0d50d394bafd
5
5
  SHA512:
6
- metadata.gz: f6cc5e141efec1ca2c62eb1ac996848ca95412e8cabdf59d40142c7e73d0b9249b8c3286b89298ea5cfd4d8206cb01ee23399132fa4ef473ae739148869a522c
7
- data.tar.gz: f62c59c08282e0c87e1032fcc22e172fc2e709c633145db0e7a6de095c6fb664ff825087c0ca6f9e27c51d8c70799dcb16a5e444a86b70edfa8b04d56e681131
6
+ metadata.gz: bdcf8342b46bd934ef3a783f109cd5d7bc208cc56bda32fc5ebc1e62fe179d527570575af9e93784d76bb6b0aca47db4c41d871583df4c6c4a75916aea7bee3a
7
+ data.tar.gz: c288bdb8c35d206f49ae6c58ee35fb252a1680f7a474daf997e07b1e69dbc2f6a85b2a7655491e4ea273ed8071cc8a09cfc4ffc7c318446ff8df17fd9edff8b9
data/app/models/city.rb CHANGED
@@ -14,7 +14,7 @@ class City
14
14
 
15
15
  attr_writer :x, :y, :z
16
16
 
17
- belongs_to :region, inverse_of: :cities
17
+ belongs_to :region, inverse_of: :cities, optional: true
18
18
  belongs_to :nation, inverse_of: :cities
19
19
  has_many :hoods
20
20
 
data/app/models/nation.rb CHANGED
@@ -19,7 +19,8 @@ class Nation
19
19
 
20
20
  validates :abbr, uniqueness: true, presence: true
21
21
 
22
- belongs_to :capital, inverse_of: :nation_capital, class_name: 'City'
22
+ belongs_to :capital, inverse_of: :nation_capital, class_name: 'City',
23
+ optional: true
23
24
 
24
25
  has_many :regions, dependent: :destroy
25
26
  has_many :cities, dependent: :destroy
data/app/models/region.rb CHANGED
@@ -11,7 +11,8 @@ class Region
11
11
 
12
12
  has_many :cities, dependent: :destroy
13
13
 
14
- belongs_to :capital, inverse_of: :region_capital, class_name: 'City'
14
+ belongs_to :capital, inverse_of: :region_capital, class_name: 'City',
15
+ optional: true
15
16
 
16
17
  validates :nation, presence: true
17
18
  validates :name, uniqueness: { scope: :nation_id }
@@ -1,4 +1,4 @@
1
1
  # :nodoc:
2
2
  module Geopolitical
3
- VERSION = '1.0.5'.freeze
3
+ VERSION = '2.0.0'.freeze
4
4
  end
@@ -13,8 +13,8 @@ Dummy::Application.configure do
13
13
  config.eager_load = false
14
14
 
15
15
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_files = true
17
- config.static_cache_control = 'public, max-age=3600'
16
+ config.serve_static_files = true
17
+ config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
18
18
 
19
19
  # Show full error reports and disable caching.
20
20
  config.consider_all_requests_local = true
File without changes