geopolitical 1.0.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/city.rb +1 -1
- data/app/models/nation.rb +2 -1
- data/app/models/region.rb +2 -1
- data/lib/geopolitical/version.rb +1 -1
- data/spec/dummy/config/environments/test.rb +2 -2
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +22849 -7051
- data/spec/models/city_spec.rb +1 -1
- data/spec/models/nation_spec.rb +10 -0
- metadata +33 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fcaf0124ce75104648c84339eccf76ca9bef60d
|
4
|
+
data.tar.gz: cd2c77e60f52d17b1cba1ce4cd8e0d50d394bafd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdcf8342b46bd934ef3a783f109cd5d7bc208cc56bda32fc5ebc1e62fe179d527570575af9e93784d76bb6b0aca47db4c41d871583df4c6c4a75916aea7bee3a
|
7
|
+
data.tar.gz: c288bdb8c35d206f49ae6c58ee35fb252a1680f7a474daf997e07b1e69dbc2f6a85b2a7655491e4ea273ed8071cc8a09cfc4ffc7c318446ff8df17fd9edff8b9
|
data/app/models/city.rb
CHANGED
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 }
|
data/lib/geopolitical/version.rb
CHANGED
@@ -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
|
17
|
-
config.
|
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
|