geopolitical 2.0.0 → 3.2.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 +5 -5
- data/CHANGELOG.md +28 -0
- data/README.md +152 -73
- data/app/controllers/geopolitical/application_controller.rb +8 -0
- data/app/controllers/geopolitical/cities_controller.rb +44 -10
- data/app/controllers/geopolitical/geopolitical_controller.rb +11 -9
- data/app/controllers/geopolitical/hoods_controller.rb +47 -9
- data/app/controllers/geopolitical/nations_controller.rb +45 -7
- data/app/controllers/geopolitical/regions_controller.rb +47 -7
- data/app/helpers/geopolitical/application_helper.rb +2 -0
- data/app/models/city.rb +149 -48
- data/app/models/concerns/geopolitocracy.rb +121 -34
- data/app/models/hood.rb +44 -18
- data/app/models/nation.rb +96 -17
- data/app/models/region.rb +42 -14
- data/app/views/geopolitical/cities/_city.html.haml +2 -5
- data/app/views/geopolitical/cities/_form.html.haml +25 -28
- data/app/views/geopolitical/cities/edit.html.haml +1 -0
- data/app/views/geopolitical/cities/index.html.haml +17 -20
- data/app/views/geopolitical/cities/new.html.haml +1 -0
- data/app/views/geopolitical/cities/show.html.haml +7 -7
- data/app/views/geopolitical/geopolitical/index.html.haml +7 -9
- data/app/views/geopolitical/hoods/_city.html.haml +2 -5
- data/app/views/geopolitical/hoods/_form.html.haml +21 -22
- data/app/views/geopolitical/hoods/edit.html.haml +1 -0
- data/app/views/geopolitical/hoods/index.html.haml +13 -18
- data/app/views/geopolitical/hoods/new.html.haml +1 -0
- data/app/views/geopolitical/hoods/show.html.haml +5 -5
- data/app/views/geopolitical/nations/_form.html.haml +11 -8
- data/app/views/geopolitical/nations/_nation.html.haml +5 -0
- data/app/views/geopolitical/nations/edit.html.haml +1 -0
- data/app/views/geopolitical/nations/index.html.haml +16 -20
- data/app/views/geopolitical/nations/new.html.haml +1 -0
- data/app/views/geopolitical/nations/show.html.haml +7 -7
- data/app/views/geopolitical/regions/_form.html.haml +10 -8
- data/app/views/geopolitical/regions/_region.html.haml +2 -5
- data/app/views/geopolitical/regions/edit.html.haml +1 -0
- data/app/views/geopolitical/regions/index.html.haml +12 -15
- data/app/views/geopolitical/regions/new.html.haml +1 -0
- data/app/views/geopolitical/regions/show.html.haml +5 -5
- data/app/views/layouts/geopolitical.html.haml +13 -15
- data/config/locales/geopolitical.en.yml +76 -0
- data/config/locales/geopolitical.pt.yml +77 -0
- data/geopolitical.gemspec +14 -12
- data/lib/geopolitical/engine.rb +3 -0
- data/lib/geopolitical/version.rb +3 -2
- data/lib/geopolitical.rb +23 -3
- metadata +42 -118
- data/.coveralls.yml +0 -1
- data/.gitignore +0 -11
- data/.rspec +0 -1
- data/.travis.yml +0 -26
- data/Gemfile +0 -15
- data/Guardfile +0 -24
- data/Rakefile +0 -25
- data/app/serializers/city_serializer.rb +0 -8
- data/app/serializers/nation_serializer.rb +0 -4
- data/app/serializers/region_serializer.rb +0 -4
- data/bin/rails +0 -8
- data/lib/tasks/geopolitical_tasks.rake +0 -4
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +0 -13
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config/application.rb +0 -27
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -29
- data/spec/dummy/config/environments/production.rb +0 -80
- data/spec/dummy/config/environments/test.rb +0 -36
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -12
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/mongoid.yml +0 -63
- data/spec/dummy/config/routes.rb +0 -56
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +0 -23532
- data/spec/dummy/public/404.html +0 -58
- data/spec/dummy/public/422.html +0 -58
- data/spec/dummy/public/500.html +0 -57
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/fabricators/city_fabricator.rb +0 -6
- data/spec/fabricators/hood_fabricator.rb +0 -5
- data/spec/fabricators/nation_fabricator.rb +0 -4
- data/spec/fabricators/region_fabricator.rb +0 -5
- data/spec/models/city_spec.rb +0 -158
- data/spec/models/hood_spec.rb +0 -47
- data/spec/models/nation_spec.rb +0 -53
- data/spec/models/region_spec.rb +0 -20
- data/spec/spec_helper.rb +0 -57
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
!!!
|
|
2
|
-
%html{:
|
|
2
|
+
%html{lang: I18n.locale}
|
|
3
3
|
%head
|
|
4
|
-
/
|
|
5
|
-
%meta{:
|
|
6
|
-
%
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
%title Geopolitical
|
|
11
|
-
/ Baccafe core CSS
|
|
12
|
-
= stylesheet_link_tag "geopolitical/application", media: "all"
|
|
13
|
-
= javascript_include_tag "geopolitical/application"
|
|
4
|
+
%meta{charset: 'utf-8'}/
|
|
5
|
+
%meta{content: 'width=device-width, initial-scale=1.0', name: 'viewport'}/
|
|
6
|
+
%title= t('geopolitical.title')
|
|
7
|
+
= stylesheet_link_tag 'geopolitical/application', media: 'all'
|
|
8
|
+
= javascript_include_tag 'geopolitical/application'
|
|
14
9
|
= csrf_meta_tags
|
|
15
|
-
//%link{:href => image_path("favicon.png?v=111119"), :rel => "shortcut icon"}/
|
|
16
10
|
%body
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
%nav
|
|
12
|
+
- [Nation, Region, City, Hood].each do |klass|
|
|
13
|
+
= link_to klass.model_name.human(count: 2), send("#{klass.to_s.downcase.pluralize}_path")
|
|
14
|
+
- if notice
|
|
15
|
+
%p.notice= notice
|
|
16
|
+
- if alert
|
|
17
|
+
%p.alert= alert
|
|
20
18
|
= yield
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
en:
|
|
2
|
+
mongoid:
|
|
3
|
+
models:
|
|
4
|
+
nation:
|
|
5
|
+
one: Nation
|
|
6
|
+
other: Nations
|
|
7
|
+
region:
|
|
8
|
+
one: Region
|
|
9
|
+
other: Regions
|
|
10
|
+
city:
|
|
11
|
+
one: City
|
|
12
|
+
other: Cities
|
|
13
|
+
hood:
|
|
14
|
+
one: Hood
|
|
15
|
+
other: Hoods
|
|
16
|
+
attributes:
|
|
17
|
+
nation:
|
|
18
|
+
name: Name
|
|
19
|
+
abbr: Abbr
|
|
20
|
+
slug: Slug
|
|
21
|
+
code: Code
|
|
22
|
+
code3: ISO
|
|
23
|
+
lang: Lang
|
|
24
|
+
langs: Languages
|
|
25
|
+
cash: Cash
|
|
26
|
+
tld: TLD
|
|
27
|
+
souls: Population
|
|
28
|
+
postal: Postal
|
|
29
|
+
phone: Phone
|
|
30
|
+
capital_id: Capital
|
|
31
|
+
region:
|
|
32
|
+
name: Name
|
|
33
|
+
abbr: Abbr
|
|
34
|
+
slug: Slug
|
|
35
|
+
nation_id: Nation
|
|
36
|
+
timezone: Timezone
|
|
37
|
+
souls: Population
|
|
38
|
+
postal: Postal
|
|
39
|
+
phone: Phone
|
|
40
|
+
cities: Cities
|
|
41
|
+
city:
|
|
42
|
+
name: Name
|
|
43
|
+
slug: Slug
|
|
44
|
+
nation_id: Nation
|
|
45
|
+
region_id: Region
|
|
46
|
+
area: Area
|
|
47
|
+
geom: Coordinates
|
|
48
|
+
souls: Population
|
|
49
|
+
postal: Postal
|
|
50
|
+
phone: Phone
|
|
51
|
+
hood:
|
|
52
|
+
name: Name
|
|
53
|
+
slug: Slug
|
|
54
|
+
city_id: City
|
|
55
|
+
rank: Rank
|
|
56
|
+
souls: Population
|
|
57
|
+
postal: Postal
|
|
58
|
+
phone: Phone
|
|
59
|
+
geopolitical:
|
|
60
|
+
title: Geopolitical
|
|
61
|
+
actions:
|
|
62
|
+
new: "New %{model}"
|
|
63
|
+
edit: Edit
|
|
64
|
+
destroy: Destroy
|
|
65
|
+
back: Back
|
|
66
|
+
save: Save
|
|
67
|
+
confirm_destroy: "Destroy %{model}?"
|
|
68
|
+
forms:
|
|
69
|
+
new: "New %{model}"
|
|
70
|
+
edit: "Editing %{model}"
|
|
71
|
+
flash:
|
|
72
|
+
created: "%{model} created."
|
|
73
|
+
updated: "%{model} updated."
|
|
74
|
+
destroyed: "%{model} deleted."
|
|
75
|
+
dashboard:
|
|
76
|
+
populate: Use geonames_local to populate data easily!
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
pt:
|
|
2
|
+
mongoid:
|
|
3
|
+
models:
|
|
4
|
+
nation:
|
|
5
|
+
one: País
|
|
6
|
+
other: Países
|
|
7
|
+
region:
|
|
8
|
+
one: Região
|
|
9
|
+
other: Regiões
|
|
10
|
+
city:
|
|
11
|
+
one: Cidade
|
|
12
|
+
other: Cidades
|
|
13
|
+
hood:
|
|
14
|
+
one: Bairro
|
|
15
|
+
other: Bairros
|
|
16
|
+
attributes:
|
|
17
|
+
nation:
|
|
18
|
+
name: Nome
|
|
19
|
+
abbr: Sigla
|
|
20
|
+
slug: Slug
|
|
21
|
+
code: Código
|
|
22
|
+
code3: ISO
|
|
23
|
+
lang: Idioma
|
|
24
|
+
langs: Idiomas
|
|
25
|
+
cash: Moeda
|
|
26
|
+
tld: Domínio
|
|
27
|
+
souls: População
|
|
28
|
+
postal: CEP
|
|
29
|
+
phone: Telefone
|
|
30
|
+
capital_id: Capital
|
|
31
|
+
region:
|
|
32
|
+
name: Nome
|
|
33
|
+
abbr: Sigla
|
|
34
|
+
slug: Slug
|
|
35
|
+
nation_id: País
|
|
36
|
+
timezone: Fuso horário
|
|
37
|
+
souls: População
|
|
38
|
+
postal: CEP
|
|
39
|
+
phone: Telefone
|
|
40
|
+
cities: Cidades
|
|
41
|
+
city:
|
|
42
|
+
name: Nome
|
|
43
|
+
slug: Slug
|
|
44
|
+
nation_id: País
|
|
45
|
+
region_id: Região
|
|
46
|
+
area: Área
|
|
47
|
+
geom: Coordenadas
|
|
48
|
+
souls: População
|
|
49
|
+
postal: CEP
|
|
50
|
+
phone: Telefone
|
|
51
|
+
hood:
|
|
52
|
+
name: Nome
|
|
53
|
+
slug: Slug
|
|
54
|
+
city_id: Cidade
|
|
55
|
+
rank: Ordem
|
|
56
|
+
souls: População
|
|
57
|
+
postal: CEP
|
|
58
|
+
phone: Telefone
|
|
59
|
+
geopolitical:
|
|
60
|
+
title: Geopolítico
|
|
61
|
+
actions:
|
|
62
|
+
# "Adicionar/Editando" avoid the novo/nova gender agreement of %{model}
|
|
63
|
+
new: "Adicionar %{model}"
|
|
64
|
+
edit: Editar
|
|
65
|
+
destroy: Remover
|
|
66
|
+
back: Voltar
|
|
67
|
+
save: Salvar
|
|
68
|
+
confirm_destroy: "Remover %{model}?"
|
|
69
|
+
forms:
|
|
70
|
+
new: "Adicionar %{model}"
|
|
71
|
+
edit: "Editando %{model}"
|
|
72
|
+
flash:
|
|
73
|
+
created: Registro criado com sucesso.
|
|
74
|
+
updated: Registro atualizado com sucesso.
|
|
75
|
+
destroyed: Registro removido com sucesso.
|
|
76
|
+
dashboard:
|
|
77
|
+
populate: Use o geonames_local para popular os dados facilmente!
|
data/geopolitical.gemspec
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require 'geopolitical/version'
|
|
3
|
+
require_relative 'lib/geopolitical/version'
|
|
5
4
|
|
|
6
|
-
# Describe your gem and declare its dependencies:
|
|
7
5
|
Gem::Specification.new do |s|
|
|
8
6
|
s.name = 'geopolitical'
|
|
9
7
|
s.version = Geopolitical::VERSION
|
|
10
|
-
s.platform = Gem::Platform::RUBY
|
|
11
8
|
s.authors = ['Marcos Piccinini']
|
|
12
9
|
s.email = ['x@nofxx.com']
|
|
13
|
-
s.homepage = '
|
|
14
|
-
s.summary = '
|
|
15
|
-
s.description = '
|
|
10
|
+
s.homepage = 'https://github.com/fireho/geopolitical'
|
|
11
|
+
s.summary = 'Nation, Region, City and Hood models for Mongoid.'
|
|
12
|
+
s.description = 'The whole planet as four Mongoid models: hierarchy, i18n names, ' \
|
|
13
|
+
'unicode-safe slugs, geo queries, phone/postal fallbacks and an admin engine.'
|
|
16
14
|
s.license = 'MIT'
|
|
15
|
+
s.metadata = { 'rubygems_mfa_required' => 'true', 'source_code_uri' => s.homepage }
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
s.
|
|
17
|
+
# Ship the engine (app, config, lib) and the docs. No specs, no dev tooling.
|
|
18
|
+
s.files = `git ls-files -z`.split("\x0")
|
|
19
|
+
.grep(%r{^(app|config|lib)/|^(README\.md|CHANGELOG\.md|MIT-LICENSE|geopolitical\.gemspec)$})
|
|
20
20
|
s.require_paths = ['lib']
|
|
21
|
+
s.required_ruby_version = '>= 3.2.0'
|
|
21
22
|
|
|
22
|
-
s.add_dependency '
|
|
23
|
-
s.add_dependency 'mongoid
|
|
23
|
+
s.add_dependency 'haml', '>= 6.0'
|
|
24
|
+
s.add_dependency 'mongoid', '>= 8.0.0'
|
|
25
|
+
s.add_dependency 'mongoid-geospatial', '>= 4.0.0'
|
|
24
26
|
end
|
data/lib/geopolitical/engine.rb
CHANGED
data/lib/geopolitical/version.rb
CHANGED
data/lib/geopolitical.rb
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'active_support/core_ext/module/attribute_accessors'
|
|
2
4
|
|
|
3
5
|
#
|
|
4
6
|
# Geopolitical
|
|
5
7
|
#
|
|
6
|
-
# Nations, Regions, Cities
|
|
7
|
-
#
|
|
8
|
+
# Nations, Regions, Cities and Hoods
|
|
8
9
|
#
|
|
9
10
|
module Geopolitical
|
|
11
|
+
# Controller the engine's controllers inherit from. The admin UI has no
|
|
12
|
+
# authentication of its own — point this at a controller of yours that does:
|
|
13
|
+
#
|
|
14
|
+
# # config/initializers/geopolitical.rb
|
|
15
|
+
# Geopolitical.parent_controller = 'Admin::BaseController'
|
|
16
|
+
#
|
|
17
|
+
mattr_accessor :parent_controller, default: 'ActionController::Base'
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
if Object.const_defined?('Rails')
|
|
21
|
+
require 'geopolitical/engine'
|
|
22
|
+
else
|
|
23
|
+
require 'mongoid'
|
|
24
|
+
require 'mongoid/geospatial'
|
|
25
|
+
require_relative '../app/models/concerns/geopolitocracy'
|
|
26
|
+
require_relative '../app/models/nation'
|
|
27
|
+
require_relative '../app/models/region'
|
|
28
|
+
require_relative '../app/models/city'
|
|
29
|
+
require_relative '../app/models/hood'
|
|
10
30
|
end
|
metadata
CHANGED
|
@@ -1,63 +1,72 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: geopolitical
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0
|
|
4
|
+
version: 3.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marcos Piccinini
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: haml
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '6.0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '6.0'
|
|
13
26
|
- !ruby/object:Gem::Dependency
|
|
14
27
|
name: mongoid
|
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
|
16
29
|
requirements:
|
|
17
30
|
- - ">="
|
|
18
31
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
32
|
+
version: 8.0.0
|
|
20
33
|
type: :runtime
|
|
21
34
|
prerelease: false
|
|
22
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
36
|
requirements:
|
|
24
37
|
- - ">="
|
|
25
38
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
39
|
+
version: 8.0.0
|
|
27
40
|
- !ruby/object:Gem::Dependency
|
|
28
41
|
name: mongoid-geospatial
|
|
29
42
|
requirement: !ruby/object:Gem::Requirement
|
|
30
43
|
requirements:
|
|
31
44
|
- - ">="
|
|
32
45
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
46
|
+
version: 4.0.0
|
|
34
47
|
type: :runtime
|
|
35
48
|
prerelease: false
|
|
36
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
50
|
requirements:
|
|
38
51
|
- - ">="
|
|
39
52
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
41
|
-
description:
|
|
53
|
+
version: 4.0.0
|
|
54
|
+
description: 'The whole planet as four Mongoid models: hierarchy, i18n names, unicode-safe
|
|
55
|
+
slugs, geo queries, phone/postal fallbacks and an admin engine.'
|
|
42
56
|
email:
|
|
43
57
|
- x@nofxx.com
|
|
44
58
|
executables: []
|
|
45
59
|
extensions: []
|
|
46
60
|
extra_rdoc_files: []
|
|
47
61
|
files:
|
|
48
|
-
-
|
|
49
|
-
- ".gitignore"
|
|
50
|
-
- ".rspec"
|
|
51
|
-
- ".travis.yml"
|
|
52
|
-
- Gemfile
|
|
53
|
-
- Guardfile
|
|
62
|
+
- CHANGELOG.md
|
|
54
63
|
- MIT-LICENSE
|
|
55
64
|
- README.md
|
|
56
|
-
- Rakefile
|
|
57
65
|
- app/assets/images/geopolitical/.gitkeep
|
|
58
66
|
- app/assets/images/geopolitical/.keep
|
|
59
67
|
- app/assets/javascripts/geopolitical/application.js
|
|
60
68
|
- app/assets/stylesheets/geopolitical/application.css
|
|
69
|
+
- app/controllers/geopolitical/application_controller.rb
|
|
61
70
|
- app/controllers/geopolitical/cities_controller.rb
|
|
62
71
|
- app/controllers/geopolitical/geopolitical_controller.rb
|
|
63
72
|
- app/controllers/geopolitical/hoods_controller.rb
|
|
@@ -69,89 +78,47 @@ files:
|
|
|
69
78
|
- app/models/hood.rb
|
|
70
79
|
- app/models/nation.rb
|
|
71
80
|
- app/models/region.rb
|
|
72
|
-
- app/serializers/city_serializer.rb
|
|
73
|
-
- app/serializers/nation_serializer.rb
|
|
74
|
-
- app/serializers/region_serializer.rb
|
|
75
81
|
- app/views/geopolitical/cities/_city.html.haml
|
|
76
82
|
- app/views/geopolitical/cities/_form.html.haml
|
|
83
|
+
- app/views/geopolitical/cities/edit.html.haml
|
|
77
84
|
- app/views/geopolitical/cities/index.html.haml
|
|
85
|
+
- app/views/geopolitical/cities/new.html.haml
|
|
78
86
|
- app/views/geopolitical/cities/show.html.haml
|
|
79
87
|
- app/views/geopolitical/geopolitical/edit.html.haml
|
|
80
88
|
- app/views/geopolitical/geopolitical/index.html.haml
|
|
81
89
|
- app/views/geopolitical/geopolitical/new.html.haml
|
|
82
90
|
- app/views/geopolitical/hoods/_city.html.haml
|
|
83
91
|
- app/views/geopolitical/hoods/_form.html.haml
|
|
92
|
+
- app/views/geopolitical/hoods/edit.html.haml
|
|
84
93
|
- app/views/geopolitical/hoods/index.html.haml
|
|
94
|
+
- app/views/geopolitical/hoods/new.html.haml
|
|
85
95
|
- app/views/geopolitical/hoods/show.html.haml
|
|
86
96
|
- app/views/geopolitical/nations/_form.html.haml
|
|
87
97
|
- app/views/geopolitical/nations/_nation.html.haml
|
|
98
|
+
- app/views/geopolitical/nations/edit.html.haml
|
|
88
99
|
- app/views/geopolitical/nations/index.html.haml
|
|
100
|
+
- app/views/geopolitical/nations/new.html.haml
|
|
89
101
|
- app/views/geopolitical/nations/show.html.haml
|
|
90
102
|
- app/views/geopolitical/regions/_form.html.haml
|
|
91
103
|
- app/views/geopolitical/regions/_region.html.haml
|
|
104
|
+
- app/views/geopolitical/regions/edit.html.haml
|
|
92
105
|
- app/views/geopolitical/regions/index.html.haml
|
|
106
|
+
- app/views/geopolitical/regions/new.html.haml
|
|
93
107
|
- app/views/geopolitical/regions/show.html.haml
|
|
94
108
|
- app/views/layouts/geopolitical.html.haml
|
|
95
|
-
-
|
|
109
|
+
- config/locales/geopolitical.en.yml
|
|
110
|
+
- config/locales/geopolitical.pt.yml
|
|
96
111
|
- config/routes.rb
|
|
97
112
|
- geopolitical.gemspec
|
|
98
113
|
- lib/geopolitical.rb
|
|
99
114
|
- lib/geopolitical/engine.rb
|
|
100
115
|
- lib/geopolitical/version.rb
|
|
101
|
-
|
|
102
|
-
- spec/dummy/README.rdoc
|
|
103
|
-
- spec/dummy/Rakefile
|
|
104
|
-
- spec/dummy/app/assets/images/.keep
|
|
105
|
-
- spec/dummy/app/assets/javascripts/application.js
|
|
106
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
|
107
|
-
- spec/dummy/app/controllers/concerns/.keep
|
|
108
|
-
- spec/dummy/app/helpers/application_helper.rb
|
|
109
|
-
- spec/dummy/app/mailers/.keep
|
|
110
|
-
- spec/dummy/app/models/.keep
|
|
111
|
-
- spec/dummy/app/models/concerns/.keep
|
|
112
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
|
113
|
-
- spec/dummy/bin/bundle
|
|
114
|
-
- spec/dummy/bin/rails
|
|
115
|
-
- spec/dummy/bin/rake
|
|
116
|
-
- spec/dummy/config.ru
|
|
117
|
-
- spec/dummy/config/application.rb
|
|
118
|
-
- spec/dummy/config/boot.rb
|
|
119
|
-
- spec/dummy/config/environment.rb
|
|
120
|
-
- spec/dummy/config/environments/development.rb
|
|
121
|
-
- spec/dummy/config/environments/production.rb
|
|
122
|
-
- spec/dummy/config/environments/test.rb
|
|
123
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
124
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
|
125
|
-
- spec/dummy/config/initializers/inflections.rb
|
|
126
|
-
- spec/dummy/config/initializers/mime_types.rb
|
|
127
|
-
- spec/dummy/config/initializers/secret_token.rb
|
|
128
|
-
- spec/dummy/config/initializers/session_store.rb
|
|
129
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
|
130
|
-
- spec/dummy/config/locales/en.yml
|
|
131
|
-
- spec/dummy/config/mongoid.yml
|
|
132
|
-
- spec/dummy/config/routes.rb
|
|
133
|
-
- spec/dummy/lib/assets/.keep
|
|
134
|
-
- spec/dummy/log/.keep
|
|
135
|
-
- spec/dummy/log/development.log
|
|
136
|
-
- spec/dummy/log/test.log
|
|
137
|
-
- spec/dummy/public/404.html
|
|
138
|
-
- spec/dummy/public/422.html
|
|
139
|
-
- spec/dummy/public/500.html
|
|
140
|
-
- spec/dummy/public/favicon.ico
|
|
141
|
-
- spec/fabricators/city_fabricator.rb
|
|
142
|
-
- spec/fabricators/hood_fabricator.rb
|
|
143
|
-
- spec/fabricators/nation_fabricator.rb
|
|
144
|
-
- spec/fabricators/region_fabricator.rb
|
|
145
|
-
- spec/models/city_spec.rb
|
|
146
|
-
- spec/models/hood_spec.rb
|
|
147
|
-
- spec/models/nation_spec.rb
|
|
148
|
-
- spec/models/region_spec.rb
|
|
149
|
-
- spec/spec_helper.rb
|
|
150
|
-
homepage: http://github.com/fireho/geopolitical
|
|
116
|
+
homepage: https://github.com/fireho/geopolitical
|
|
151
117
|
licenses:
|
|
152
118
|
- MIT
|
|
153
|
-
metadata:
|
|
154
|
-
|
|
119
|
+
metadata:
|
|
120
|
+
rubygems_mfa_required: 'true'
|
|
121
|
+
source_code_uri: https://github.com/fireho/geopolitical
|
|
155
122
|
rdoc_options: []
|
|
156
123
|
require_paths:
|
|
157
124
|
- lib
|
|
@@ -159,57 +126,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
159
126
|
requirements:
|
|
160
127
|
- - ">="
|
|
161
128
|
- !ruby/object:Gem::Version
|
|
162
|
-
version:
|
|
129
|
+
version: 3.2.0
|
|
163
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
131
|
requirements:
|
|
165
132
|
- - ">="
|
|
166
133
|
- !ruby/object:Gem::Version
|
|
167
134
|
version: '0'
|
|
168
135
|
requirements: []
|
|
169
|
-
|
|
170
|
-
rubygems_version: 2.5.1
|
|
171
|
-
signing_key:
|
|
136
|
+
rubygems_version: 3.6.7
|
|
172
137
|
specification_version: 4
|
|
173
|
-
summary:
|
|
174
|
-
test_files:
|
|
175
|
-
- spec/dummy/bin/rails
|
|
176
|
-
- spec/dummy/bin/rake
|
|
177
|
-
- spec/dummy/bin/bundle
|
|
178
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
|
179
|
-
- spec/dummy/app/assets/javascripts/application.js
|
|
180
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
|
181
|
-
- spec/dummy/app/helpers/application_helper.rb
|
|
182
|
-
- spec/dummy/public/favicon.ico
|
|
183
|
-
- spec/dummy/public/422.html
|
|
184
|
-
- spec/dummy/public/500.html
|
|
185
|
-
- spec/dummy/public/404.html
|
|
186
|
-
- spec/dummy/log/test.log
|
|
187
|
-
- spec/dummy/log/development.log
|
|
188
|
-
- spec/dummy/config.ru
|
|
189
|
-
- spec/dummy/README.rdoc
|
|
190
|
-
- spec/dummy/Rakefile
|
|
191
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
|
192
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
193
|
-
- spec/dummy/config/initializers/session_store.rb
|
|
194
|
-
- spec/dummy/config/initializers/secret_token.rb
|
|
195
|
-
- spec/dummy/config/initializers/mime_types.rb
|
|
196
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
|
197
|
-
- spec/dummy/config/initializers/inflections.rb
|
|
198
|
-
- spec/dummy/config/mongoid.yml
|
|
199
|
-
- spec/dummy/config/boot.rb
|
|
200
|
-
- spec/dummy/config/locales/en.yml
|
|
201
|
-
- spec/dummy/config/routes.rb
|
|
202
|
-
- spec/dummy/config/environments/development.rb
|
|
203
|
-
- spec/dummy/config/environments/test.rb
|
|
204
|
-
- spec/dummy/config/environments/production.rb
|
|
205
|
-
- spec/dummy/config/application.rb
|
|
206
|
-
- spec/dummy/config/environment.rb
|
|
207
|
-
- spec/fabricators/nation_fabricator.rb
|
|
208
|
-
- spec/fabricators/hood_fabricator.rb
|
|
209
|
-
- spec/fabricators/region_fabricator.rb
|
|
210
|
-
- spec/fabricators/city_fabricator.rb
|
|
211
|
-
- spec/models/nation_spec.rb
|
|
212
|
-
- spec/models/region_spec.rb
|
|
213
|
-
- spec/models/city_spec.rb
|
|
214
|
-
- spec/models/hood_spec.rb
|
|
215
|
-
- spec/spec_helper.rb
|
|
138
|
+
summary: Nation, Region, City and Hood models for Mongoid.
|
|
139
|
+
test_files: []
|
data/.coveralls.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
service_name: travis
|
data/.gitignore
DELETED
data/.rspec
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--color
|
data/.travis.yml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
bundler_args: --without development
|
|
3
|
-
rvm:
|
|
4
|
-
- 2.2.2
|
|
5
|
-
- ruby-head
|
|
6
|
-
- jruby
|
|
7
|
-
- jruby-head
|
|
8
|
-
- rbx-2
|
|
9
|
-
|
|
10
|
-
# jdk:
|
|
11
|
-
# - oraclejdk7
|
|
12
|
-
# - openjdk7
|
|
13
|
-
|
|
14
|
-
env: CI="travis"
|
|
15
|
-
|
|
16
|
-
matrix:
|
|
17
|
-
allow_failures:
|
|
18
|
-
- rvm: jruby
|
|
19
|
-
- rvm: ruby-head
|
|
20
|
-
|
|
21
|
-
services:
|
|
22
|
-
- mongodb
|
|
23
|
-
|
|
24
|
-
script: "bundle exec rspec"
|
|
25
|
-
|
|
26
|
-
sudo: false
|
data/Gemfile
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
gem 'mongoid', '>= 5.0.0.beta'
|
|
4
|
-
|
|
5
|
-
gemspec
|
|
6
|
-
|
|
7
|
-
gem 'rails'
|
|
8
|
-
gem 'faker'
|
|
9
|
-
gem 'fabrication'
|
|
10
|
-
gem 'rspec'
|
|
11
|
-
gem 'rspec-rails'
|
|
12
|
-
gem 'guard'
|
|
13
|
-
gem 'guard-rspec'
|
|
14
|
-
gem 'guard-rubocop'
|
|
15
|
-
gem 'coveralls', require: false
|
data/Guardfile
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# A sample Guardfile
|
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
|
3
|
-
# ignore(/\/.#.+/)
|
|
4
|
-
|
|
5
|
-
guard :rubocop, all_on_start: false, keep_failed: false, notification: false, cli: ['--format', 'emacs'] do
|
|
6
|
-
watch(/^app\/(.+)\.rb$/)
|
|
7
|
-
watch(/^lib\/(.+)\.rb$/)
|
|
8
|
-
watch(/^spec\/(.+)\.rb$/)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
guard :rspec, cmd: 'bundle exec rspec' do
|
|
12
|
-
watch(/^spec\/.+_spec\.rb$/)
|
|
13
|
-
watch(/^spec\/spec_helper\.rb$/) { 'spec' }
|
|
14
|
-
watch(/^app\/(.+)\.rb$/) { |m| "spec/#{m[1]}_spec.rb" }
|
|
15
|
-
watch(/^lib\/(.+)\.rb$/) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
|
16
|
-
watch(%r{^app/models/concerns/(.+)\.rb$}) { |_m| 'spec/models/*._spec.rb' }
|
|
17
|
-
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) do |m|
|
|
18
|
-
[
|
|
19
|
-
"spec/routing/#{m[1]}_routing_spec.rb",
|
|
20
|
-
"spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb",
|
|
21
|
-
"spec/requests/#{m[1]}_spec.rb"
|
|
22
|
-
]
|
|
23
|
-
end
|
|
24
|
-
end
|
data/Rakefile
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
begin
|
|
2
|
-
require 'bundler/setup'
|
|
3
|
-
rescue LoadError
|
|
4
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
require 'bundler/gem_tasks'
|
|
8
|
-
|
|
9
|
-
require 'rspec/core/rake_task'
|
|
10
|
-
# require 'rubocop/rake_task'
|
|
11
|
-
|
|
12
|
-
require 'rdoc/task'
|
|
13
|
-
|
|
14
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
|
15
|
-
rdoc.rdoc_dir = 'rdoc'
|
|
16
|
-
rdoc.title = 'Geopolitical'
|
|
17
|
-
rdoc.options << '--line-numbers'
|
|
18
|
-
rdoc.rdoc_files.include('README.rdoc')
|
|
19
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
|
|
23
|
-
# load 'rails/tasks/engine.rake'
|
|
24
|
-
|
|
25
|
-
# Bundler::GemHelper.install_tasks
|