geopolitical 0.0.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +1 -1
- data/README.md +24 -0
- data/Rakefile +3 -20
- data/app/assets/javascripts/geopolitical/application.js +3 -5
- data/app/assets/stylesheets/geopolitical/application.css +1 -1
- data/app/controllers/geopolitical/cities_controller.rb +4 -3
- data/app/controllers/geopolitical/geopolitical_controller.rb +12 -3
- data/app/controllers/geopolitical/hoods_controller.rb +8 -2
- data/app/controllers/geopolitical/nations_controller.rb +16 -0
- data/app/controllers/geopolitical/{provinces_controller.rb → regions_controller.rb} +4 -3
- data/app/controllers/geopolitical/zones_controller.rb +12 -0
- data/app/controllers/zones_controller.rb +17 -0
- data/app/models/address.rb +65 -0
- data/app/models/city.rb +28 -29
- data/app/models/hood.rb +9 -11
- data/app/models/nation.rb +24 -0
- data/app/models/region.rb +23 -0
- data/app/models/zone.rb +25 -0
- data/app/models/zone_member.rb +9 -0
- data/app/views/geopolitical/cities/_form.html.haml +11 -10
- data/app/views/geopolitical/cities/index.html.haml +32 -30
- data/app/views/geopolitical/cities/show.html.haml +17 -26
- data/app/views/geopolitical/geopolitical/edit.html.haml +1 -0
- data/app/views/geopolitical/geopolitical/index.html.haml +19 -22
- data/app/views/geopolitical/geopolitical/new.html.haml +1 -0
- data/app/views/geopolitical/hoods/_city.html.haml +7 -0
- data/app/views/geopolitical/hoods/_form.html.haml +27 -0
- data/app/views/geopolitical/hoods/index.html.haml +33 -0
- data/app/views/geopolitical/hoods/show.html.haml +14 -0
- data/app/views/geopolitical/nations/_form.html.haml +26 -0
- data/app/views/geopolitical/nations/_nation.html.haml +0 -0
- data/app/views/geopolitical/nations/index.html.haml +34 -0
- data/app/views/geopolitical/nations/show.html.haml +20 -0
- data/app/views/geopolitical/regions/_form.html.haml +23 -0
- data/app/views/geopolitical/regions/_region.html.haml +7 -0
- data/app/views/geopolitical/regions/index.html.haml +31 -0
- data/app/views/geopolitical/regions/show.html.haml +17 -0
- data/app/views/geopolitical/zones/_form.html.haml +23 -0
- data/app/views/geopolitical/zones/_region.html.haml +7 -0
- data/app/views/geopolitical/zones/index.html.haml +31 -0
- data/app/views/geopolitical/zones/show.html.haml +21 -0
- data/app/views/layouts/geopolitical.html.haml +20 -0
- data/config/routes.rb +5 -4
- data/lib/geopolitical/engine.rb +2 -2
- data/lib/geopolitical/helpers.rb +23 -0
- data/lib/geopolitical/version.rb +1 -1
- data/lib/geopolitical.rb +4 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +27 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/mongoid.yml +13 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/log/test.log +2111 -0
- data/spec/dummy/public/404.html +58 -0
- data/spec/dummy/public/422.html +58 -0
- data/spec/dummy/public/500.html +57 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/fabricators/city_fabricator.rb +6 -0
- data/spec/fabricators/hood_fabricator.rb +6 -0
- data/spec/fabricators/nation_fabricator.rb +4 -0
- data/spec/fabricators/region_fabricator.rb +5 -0
- data/spec/models/city_spec.rb +98 -0
- data/spec/models/hood_spec.rb +16 -0
- data/spec/models/nation_spec.rb +12 -0
- data/spec/models/region_spec.rb +12 -0
- data/spec/spec_helper.rb +54 -0
- metadata +198 -42
- data/README.rdoc +0 -3
- data/app/controllers/geopolitical/countries_controller.rb +0 -10
- data/app/models/country.rb +0 -20
- data/app/models/province.rb +0 -17
- data/app/views/geopolitical/cities/edit.html.haml +0 -1
- data/app/views/geopolitical/cities/new.html.haml +0 -1
- data/app/views/geopolitical/countries/_country.html.haml +0 -11
- data/app/views/geopolitical/countries/edit.html.haml +0 -7
- data/app/views/geopolitical/countries/index.html.haml +0 -28
- data/app/views/geopolitical/countries/new.html.haml +0 -5
- data/app/views/geopolitical/countries/show.html.haml +0 -10
- data/app/views/geopolitical/provinces/_province.html.haml +0 -7
- data/app/views/geopolitical/provinces/edit.html.haml +0 -7
- data/app/views/geopolitical/provinces/index.html.haml +0 -18
- data/app/views/geopolitical/provinces/new.html.haml +0 -5
- data/app/views/geopolitical/provinces/show.html.haml +0 -13
@@ -1,24 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
.right.links
|
4
|
-
= link_to "+ Estado", new_province_path, :class => "small blue nice button radius" if admin?
|
5
|
-
.content
|
6
|
-
.inner
|
7
|
-
%ul
|
8
|
-
- @provinces.each do |province|
|
9
|
-
%li= render province
|
10
|
-
%hr
|
11
|
-
.pagination
|
1
|
+
%h1 Geopolitical
|
2
|
+
%hr
|
12
3
|
|
13
|
-
.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
.
|
19
|
-
|
20
|
-
- @cities.each do |city|
|
21
|
-
%li= render city
|
22
|
-
%hr
|
23
|
-
.pagination
|
4
|
+
- [City, Region, Nation, Hood, Zone].each do |klass|
|
5
|
+
.block
|
6
|
+
%h3.title
|
7
|
+
= link_to klass.model_name.human.pluralize, send("#{klass.to_s.downcase.pluralize}_path")
|
8
|
+
%small= klass.count
|
9
|
+
.right.links
|
10
|
+
= link_to "+ #{klass.model_name.human}", send("new_#{klass.to_s.downcase}_path"), :class => "small blue nice button radius"
|
24
11
|
|
12
|
+
|
13
|
+
%br
|
14
|
+
%h4
|
15
|
+
Use Geonames_local to populate data easily!
|
16
|
+
%small= link_to "geonames_local", "http://github.com/nofxx/geonames_local"
|
17
|
+
|
18
|
+
%hr
|
19
|
+
%p Minimalist layout by NoCSS Co.
|
20
|
+
%p= link_to "fireho/geopolitical", "http://github.com/fireho/geopolitical"
|
21
|
+
%p= link_to "< Back", "/"
|
@@ -0,0 +1 @@
|
|
1
|
+
= render "form"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.page-header
|
4
|
+
%h1= @hood.new_record? ? "New Hood" : "Editing Hood"
|
5
|
+
.row
|
6
|
+
.content
|
7
|
+
= form_for(@hood, :html => {:class => "form"}) do |f|
|
8
|
+
- f.object.errors.each do |err|
|
9
|
+
= err
|
10
|
+
.grid_3
|
11
|
+
.forms_btns
|
12
|
+
.hooddata
|
13
|
+
.field{"data-role" => "fieldcontain"}
|
14
|
+
= f.label :city
|
15
|
+
= f.select :city_id, @cities
|
16
|
+
.group
|
17
|
+
= f.label :name
|
18
|
+
= f.text_field :name, :size => 30
|
19
|
+
.group
|
20
|
+
= f.label :slug
|
21
|
+
= f.text_field :slug, :size => 30
|
22
|
+
.field
|
23
|
+
= f.label :souls
|
24
|
+
= f.text_field :souls, :size => 30
|
25
|
+
= f.submit
|
26
|
+
.grid_8
|
27
|
+
#map=# gmaps(@map, false, false)
|
@@ -0,0 +1,33 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.page-header
|
4
|
+
%h1.title Hoods
|
5
|
+
=# render "shared/filter"
|
6
|
+
= link_to "New Hood", new_hood_path
|
7
|
+
.row
|
8
|
+
.content
|
9
|
+
%table.table
|
10
|
+
%thead
|
11
|
+
%tr
|
12
|
+
%th Nome
|
13
|
+
%th Region
|
14
|
+
%th Nation
|
15
|
+
%th Population
|
16
|
+
%th
|
17
|
+
%tbody
|
18
|
+
- for hood in @hoods
|
19
|
+
%tr
|
20
|
+
%td
|
21
|
+
= hood.name
|
22
|
+
= link_to hood.slug , hood
|
23
|
+
%td= hood.city.name if hood.city
|
24
|
+
%td= hood.city.name
|
25
|
+
%td= hood.souls
|
26
|
+
%td{:align => 'right'}
|
27
|
+
= link_to 'Edit', edit_hood_path(hood)
|
28
|
+
= link_to 'Destroy', hood, :confirm => 'Destroy hood?', :method => :delete
|
29
|
+
|
30
|
+
.row
|
31
|
+
.pagination= paginate @hoods
|
32
|
+
.row
|
33
|
+
= link_to 'Back', root_path
|
@@ -0,0 +1,26 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.page-header
|
4
|
+
%h1= @nation.new_record? ? "New Nation" : "Editing '#{@nation}'"
|
5
|
+
.row
|
6
|
+
|
7
|
+
= form_for(@nation) do |f|
|
8
|
+
=# f.error_messages
|
9
|
+
.form-group
|
10
|
+
= f.label :name
|
11
|
+
= f.text_field :name
|
12
|
+
.form-group
|
13
|
+
= f.label :abbr
|
14
|
+
= f.text_field :abbr
|
15
|
+
.form-group
|
16
|
+
= f.label :slug
|
17
|
+
= f.text_field :slug
|
18
|
+
.form-group
|
19
|
+
= f.label :lang
|
20
|
+
= f.text_field :lang
|
21
|
+
.form-group
|
22
|
+
= f.label :abbr
|
23
|
+
= f.text_field :abbr
|
24
|
+
|
25
|
+
.forms-buttons
|
26
|
+
= f.submit
|
File without changes
|
@@ -0,0 +1,34 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.page-header
|
4
|
+
%h1.title Nations
|
5
|
+
=# render "shared/filter"
|
6
|
+
= link_to "New Nation", new_nation_path
|
7
|
+
.row
|
8
|
+
.content
|
9
|
+
%table.table
|
10
|
+
%thead
|
11
|
+
%tr
|
12
|
+
%th Abbr
|
13
|
+
%th ISO
|
14
|
+
%th Name
|
15
|
+
%th Lang
|
16
|
+
%th Cash
|
17
|
+
%th
|
18
|
+
%tbody
|
19
|
+
- for nation in @nations
|
20
|
+
%tr
|
21
|
+
%td
|
22
|
+
=# image_tag nation.flag.nano if nation.flag?
|
23
|
+
= nation.abbr
|
24
|
+
%td= nation.code
|
25
|
+
%td
|
26
|
+
= nation.name
|
27
|
+
= link_to nation.slug, nation
|
28
|
+
%td= nation.lang
|
29
|
+
%td= nation.cash
|
30
|
+
%td.last
|
31
|
+
=# link_to "Destroy!", nation_path(nation), :method => :delete
|
32
|
+
= link_to "Edit", edit_nation_path(nation)
|
33
|
+
.row
|
34
|
+
= link_to 'Voltar', root_path
|
@@ -0,0 +1,20 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
%h1= @nation.name
|
4
|
+
.row
|
5
|
+
%p
|
6
|
+
%b Abbr:
|
7
|
+
#{@nation.abbr} #{@nation.code}
|
8
|
+
%p
|
9
|
+
%b Slug:
|
10
|
+
= @nation.slug
|
11
|
+
%p
|
12
|
+
%b Lang:
|
13
|
+
= @nation.lang
|
14
|
+
%p
|
15
|
+
%b Cash:
|
16
|
+
= @nation.cash
|
17
|
+
.row
|
18
|
+
= link_to 'Edit', edit_nation_path(@nation)
|
19
|
+
|
|
20
|
+
= link_to 'Back', nations_path
|
@@ -0,0 +1,23 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.page-header
|
4
|
+
%h1= @region.new_record? ? "New Region" : "Editing '#{@region}'"
|
5
|
+
.row
|
6
|
+
|
7
|
+
= form_for(@region) do |f|
|
8
|
+
=# f.error_messages
|
9
|
+
.form-group
|
10
|
+
= f.label :name
|
11
|
+
= f.text_field :name
|
12
|
+
.form-group
|
13
|
+
= f.label :abbr
|
14
|
+
= f.text_field :abbr
|
15
|
+
.form-group
|
16
|
+
= f.label :slug
|
17
|
+
= f.text_field :slug
|
18
|
+
.form-group
|
19
|
+
= f.label :nation_id
|
20
|
+
= f.select :nation_id, @nations
|
21
|
+
|
22
|
+
.forms-buttons
|
23
|
+
= f.submit
|
@@ -0,0 +1,31 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.page-header
|
4
|
+
%h1.title Regions
|
5
|
+
=# render "shared/filter"
|
6
|
+
= link_to "New Regions", new_region_path
|
7
|
+
.row
|
8
|
+
.content
|
9
|
+
%table.table
|
10
|
+
%thead
|
11
|
+
%tr
|
12
|
+
%th Abbr
|
13
|
+
%th Name
|
14
|
+
%th Country
|
15
|
+
%th Cities
|
16
|
+
%th
|
17
|
+
%tbody
|
18
|
+
- for region in @regions
|
19
|
+
%tr
|
20
|
+
%td
|
21
|
+
= region.abbr
|
22
|
+
%td
|
23
|
+
= region.name
|
24
|
+
= link_to region.slug, region
|
25
|
+
%td= region.nation.try(:name)
|
26
|
+
%td= region.cities.count
|
27
|
+
%td.last
|
28
|
+
=# link_to "Destroy!", nation_path(nation), :method => :delete
|
29
|
+
= link_to 'Edit', edit_region_path(region)
|
30
|
+
.row
|
31
|
+
= link_to 'Back', root_path
|
@@ -0,0 +1,17 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
%h1= @region.name
|
4
|
+
.row
|
5
|
+
%p
|
6
|
+
%b Slug:
|
7
|
+
= @region.slug
|
8
|
+
%p
|
9
|
+
%b Nation:
|
10
|
+
= link_to @region.nation, @region.nation
|
11
|
+
%p
|
12
|
+
%b Sigla:
|
13
|
+
= @region.abbr
|
14
|
+
.row
|
15
|
+
= link_to 'Edit', edit_region_path(@region)
|
16
|
+
|
|
17
|
+
= link_to 'Back', regions_path
|
@@ -0,0 +1,23 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.page-header
|
4
|
+
%h1= @zone.new_record? ? "New Zone" : "Editing '#{@zone}'"
|
5
|
+
.row
|
6
|
+
|
7
|
+
= form_for(@zone) do |f|
|
8
|
+
=# f.error_messages
|
9
|
+
.form-group
|
10
|
+
= f.label :name
|
11
|
+
= f.text_field :name
|
12
|
+
.form-group
|
13
|
+
= f.label :abbr
|
14
|
+
= f.text_field :abbr
|
15
|
+
.form-group
|
16
|
+
= f.label :slug
|
17
|
+
= f.text_field :slug
|
18
|
+
.form-group
|
19
|
+
= f.label :kind
|
20
|
+
= f.text_field :kind
|
21
|
+
|
22
|
+
.forms-buttons
|
23
|
+
= f.submit
|
@@ -0,0 +1,31 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
.page-header
|
4
|
+
%h1.title Zones
|
5
|
+
=# render "shared/filter"
|
6
|
+
= link_to "New Zones", new_zone_path
|
7
|
+
.row
|
8
|
+
.content
|
9
|
+
%table.table
|
10
|
+
%thead
|
11
|
+
%tr
|
12
|
+
%th Abbr
|
13
|
+
%th Name
|
14
|
+
%th Kind
|
15
|
+
%th Member
|
16
|
+
%th
|
17
|
+
%tbody
|
18
|
+
- for zone in @zones
|
19
|
+
%tr
|
20
|
+
%td
|
21
|
+
= zone.abbr
|
22
|
+
%td
|
23
|
+
= zone.name
|
24
|
+
= link_to zone.slug, zone
|
25
|
+
%td= zone.kind
|
26
|
+
%td= zone.members.count
|
27
|
+
%td.last
|
28
|
+
=# link_to "Destroy!", nation_path(nation), :method => :delete
|
29
|
+
= link_to 'Edit', edit_zone_path(zone)
|
30
|
+
.row
|
31
|
+
= link_to 'Back', root_path
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.container
|
2
|
+
.row
|
3
|
+
%h1= @zone.name
|
4
|
+
.row
|
5
|
+
%p
|
6
|
+
%b Slug:
|
7
|
+
= @zone.slug
|
8
|
+
%p
|
9
|
+
%b Kind:
|
10
|
+
= @zone.kind
|
11
|
+
%p
|
12
|
+
%b Abbr:
|
13
|
+
= @zone.abbr
|
14
|
+
%p
|
15
|
+
%b Members:
|
16
|
+
- @zone.members.each do |member|
|
17
|
+
= member
|
18
|
+
.row
|
19
|
+
= link_to 'Edit', edit_zone_path(@zone)
|
20
|
+
|
|
21
|
+
= link_to 'Back', zones_path
|
@@ -0,0 +1,20 @@
|
|
1
|
+
!!!
|
2
|
+
%html{:lang => "en"}
|
3
|
+
%head
|
4
|
+
/ Meta, title, CSS, favicons, etc.
|
5
|
+
%meta{:charset => "utf-8"}/
|
6
|
+
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
|
7
|
+
%meta{:content => "", :name => "description"}/
|
8
|
+
%meta{:content => "", :name => "author"}/
|
9
|
+
|
10
|
+
%title Geopolitical
|
11
|
+
/ Baccafe core CSS
|
12
|
+
= stylesheet_link_tag "geopolitical/application", media: "all"
|
13
|
+
= javascript_include_tag "geopolitical/application"
|
14
|
+
= csrf_meta_tags
|
15
|
+
//%link{:href => image_path("favicon.png?v=111119"), :rel => "shortcut icon"}/
|
16
|
+
%body
|
17
|
+
- [City, Region, Nation, Hood, Zone].each do |klass|
|
18
|
+
= link_to klass.model_name.human.pluralize, send("#{klass.to_s.downcase.pluralize}_path")
|
19
|
+
|
20
|
+
= yield
|
data/config/routes.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
+
#Rails.application.routes.draw
|
1
2
|
Geopolitical::Engine.routes.draw do
|
2
|
-
|
3
|
+
resources :zones
|
4
|
+
resources :hoods
|
3
5
|
resources :cities
|
4
|
-
resources :
|
5
|
-
resources :
|
6
|
+
resources :regions
|
7
|
+
resources :nations
|
6
8
|
|
7
9
|
resource :geopolitical
|
8
10
|
|
9
11
|
root :to => "geopolitical#index"
|
10
|
-
|
11
12
|
end
|
data/lib/geopolitical/engine.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
module Geopolitical
|
2
|
+
module Helpers
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
before_validation :set_slug
|
7
|
+
end
|
8
|
+
|
9
|
+
def to_s
|
10
|
+
name || slug
|
11
|
+
end
|
12
|
+
|
13
|
+
def set_slug
|
14
|
+
self.slug ||= name
|
15
|
+
end
|
16
|
+
|
17
|
+
def slug= txt
|
18
|
+
return unless txt
|
19
|
+
self[:slug] = txt.downcase.gsub(/\s/, '-') #.gsub(/\W/, '')
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
data/lib/geopolitical/version.rb
CHANGED
data/lib/geopolitical.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/spec/dummy/bin/rake
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
# Pick the frameworks you want:
|
4
|
+
#require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
require "action_mailer/railtie"
|
7
|
+
require "sprockets/railtie"
|
8
|
+
# require "rails/test_unit/railtie"
|
9
|
+
|
10
|
+
Bundler.require(*Rails.groups)
|
11
|
+
require "geopolitical"
|
12
|
+
|
13
|
+
module Dummy
|
14
|
+
class Application < Rails::Application
|
15
|
+
# Settings in config/environments/* take precedence over those specified here.
|
16
|
+
# Application configuration should go into files in config/initializers
|
17
|
+
# -- all .rb files in that directory are automatically loaded.
|
18
|
+
|
19
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
20
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
21
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
22
|
+
|
23
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
24
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
25
|
+
# config.i18n.default_locale = :de
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports and disable caching.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send.
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Raise an error on page load if there are pending migrations
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
end
|