we_bridge_rails_engine_nations 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/CODE_OF_CONDUCT.md +13 -0
  6. data/Gemfile +34 -0
  7. data/Gemfile.lock +254 -0
  8. data/LICENSE.txt +21 -0
  9. data/MIT-LICENSE +20 -0
  10. data/README.md +41 -0
  11. data/Rakefile +37 -0
  12. data/app/assets/javascripts/areas.js +2 -0
  13. data/app/assets/javascripts/currencies.js +2 -0
  14. data/app/assets/javascripts/nations.js +2 -0
  15. data/app/assets/javascripts/regions.js +2 -0
  16. data/app/assets/stylesheets/areas.css +4 -0
  17. data/app/assets/stylesheets/currencies.css +4 -0
  18. data/app/assets/stylesheets/nations.css +4 -0
  19. data/app/assets/stylesheets/regions.css +4 -0
  20. data/app/assets/stylesheets/scaffold.css +56 -0
  21. data/app/controllers/areas_controller.rb +7 -0
  22. data/app/controllers/currencies_controller.rb +58 -0
  23. data/app/controllers/nations_controller.rb +7 -0
  24. data/app/controllers/regions_controller.rb +7 -0
  25. data/app/helpers/areas_helper.rb +2 -0
  26. data/app/helpers/currencies_helper.rb +2 -0
  27. data/app/helpers/nations_helper.rb +2 -0
  28. data/app/helpers/regions_helper.rb +2 -0
  29. data/app/mailers/.keep +0 -0
  30. data/app/models/.keep +0 -0
  31. data/app/models/area.rb +14 -0
  32. data/app/models/area_text.rb +7 -0
  33. data/app/models/currency.rb +26 -0
  34. data/app/models/currency_nation_map.rb +4 -0
  35. data/app/models/currency_text.rb +7 -0
  36. data/app/models/nation.rb +45 -0
  37. data/app/models/nation_text.rb +7 -0
  38. data/app/models/region.rb +15 -0
  39. data/app/models/region_text.rb +7 -0
  40. data/app/views/.keep +0 -0
  41. data/app/views/areas/edit.html.builder +1 -0
  42. data/app/views/areas/index.html.builder +1 -0
  43. data/app/views/areas/new.html.builder +1 -0
  44. data/app/views/areas/show.html.builder +1 -0
  45. data/app/views/currencies/_form.html.builder +14 -0
  46. data/app/views/currencies/edit.html.builder +7 -0
  47. data/app/views/currencies/index.html.builder +25 -0
  48. data/app/views/currencies/new.html.builder +5 -0
  49. data/app/views/currencies/show.html.builder +8 -0
  50. data/app/views/nations/edit.html.builder +1 -0
  51. data/app/views/nations/index.html.builder +1 -0
  52. data/app/views/nations/new.html.builder +1 -0
  53. data/app/views/nations/show.html.builder +1 -0
  54. data/app/views/regions/edit.html.builder +1 -0
  55. data/app/views/regions/index.html.builder +1 -0
  56. data/app/views/regions/new.html.builder +1 -0
  57. data/app/views/regions/show.html.builder +1 -0
  58. data/bin/console +14 -0
  59. data/bin/rails +12 -0
  60. data/bin/setup +7 -0
  61. data/config/routes.rb +6 -0
  62. data/db/migrate/20151127040229_create_nations.rb +27 -0
  63. data/db/migrate/20151127040410_create_regions.rb +19 -0
  64. data/db/migrate/20151127040435_create_areas.rb +19 -0
  65. data/db/migrate/20151202041711_create_currencies.rb +28 -0
  66. data/db/seeds.rb +439 -0
  67. data/lib/tasks/we_bridge_rails_engine_nations_tasks.rake +4 -0
  68. data/lib/we_bridge_rails_engine_nations.rb +7 -0
  69. data/lib/we_bridge_rails_engine_nations/engine.rb +24 -0
  70. data/lib/we_bridge_rails_engine_nations/version.rb +3 -0
  71. data/spec/controllers/areas_controller_spec.rb +169 -0
  72. data/spec/controllers/currencies_controller_spec.rb +159 -0
  73. data/spec/controllers/nations_controller_spec.rb +169 -0
  74. data/spec/controllers/regions_controller_spec.rb +169 -0
  75. data/spec/dummy/README.rdoc +28 -0
  76. data/spec/dummy/Rakefile +6 -0
  77. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  78. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  79. data/spec/dummy/app/controllers/application_controller.rb +8 -0
  80. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  81. data/spec/dummy/app/views/layouts/application.html.builder +14 -0
  82. data/spec/dummy/bin/bundle +3 -0
  83. data/spec/dummy/bin/rails +4 -0
  84. data/spec/dummy/bin/rake +4 -0
  85. data/spec/dummy/bin/setup +29 -0
  86. data/spec/dummy/config.ru +4 -0
  87. data/spec/dummy/config/application.rb +28 -0
  88. data/spec/dummy/config/boot.rb +5 -0
  89. data/spec/dummy/config/database.yml +25 -0
  90. data/spec/dummy/config/environment.rb +5 -0
  91. data/spec/dummy/config/environments/development.rb +41 -0
  92. data/spec/dummy/config/environments/production.rb +79 -0
  93. data/spec/dummy/config/environments/test.rb +42 -0
  94. data/spec/dummy/config/initializers/assets.rb +11 -0
  95. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  96. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  97. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  98. data/spec/dummy/config/initializers/inflections.rb +16 -0
  99. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  100. data/spec/dummy/config/initializers/provider_settings.rb +2 -0
  101. data/spec/dummy/config/initializers/session_store.rb +3 -0
  102. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  103. data/spec/dummy/config/locales/en.yml +23 -0
  104. data/spec/dummy/config/omniauth.yml +63 -0
  105. data/spec/dummy/config/omniauth.yml.org +63 -0
  106. data/spec/dummy/config/routes.rb +56 -0
  107. data/spec/dummy/config/secrets.yml +22 -0
  108. data/spec/dummy/db/development.sqlite3 +0 -0
  109. data/spec/dummy/db/schema.rb +221 -0
  110. data/spec/dummy/db/test.sqlite3 +0 -0
  111. data/spec/dummy/log/development.log +46295 -0
  112. data/spec/dummy/log/test.log +678 -0
  113. data/spec/dummy/public/404.html +67 -0
  114. data/spec/dummy/public/422.html +67 -0
  115. data/spec/dummy/public/500.html +66 -0
  116. data/spec/dummy/public/favicon.ico +0 -0
  117. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/3qWp1cfMUMB1L1B8w4KCdPJNoktDLzCgZhyGa-eLd0g.cache +1 -0
  118. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
  119. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6VfBYgqqzYcjALfLCOpHzv3E06n_zzoM0lDBI4rnsx0.cache +0 -0
  120. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6vg_COhVhYBSY6arqzRJFOy9-rF95BfYQsFuol_UGuQ.cache +1 -0
  121. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Azqp0lWcLN5Iz5BDrWrNLqHomPvFzn6pENzB3pm95wo.cache +2 -0
  122. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/GYvDs3EBryNSEN-M5uVb3LOFo1oBWq0iDPijDjBVvUs.cache +1 -0
  123. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/H0uxW1DRyYygsm_fv_sMfVycqsGCazsfNJhSZU81CFY.cache +0 -0
  124. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/HcVN18DR0_BmshzEZLPjkeVDruXBZ9iXjboBWmO6Ozw.cache +1 -0
  125. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/JigkThideDLksj6ZrufTx6bLVyJBmNDbaouRbMbZdIA.cache +2 -0
  126. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/N2BTDMKiaaZ5__Eeqks0aWBzX-5T9Hg0d0015KmSRQo.cache +1 -0
  127. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/NrdOdaS5o4trMDBP6UBqLzFsRrmSPy7XJBBtdwktXqk.cache +1 -0
  128. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +3 -0
  129. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/bUQg5IzV2hJHu0Ua4jOdDcbaLqfzpRqx6-qq9C23sts.cache +0 -0
  130. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/boUHvgQlz503FXEZntk5rEF6Z0dNUvT4VOQquML62dQ.cache +1 -0
  131. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/g5LtU2jYJLiGyWluzwkSuH9dRStTuMGHLO-ivn8wCYE.cache +0 -0
  132. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gOWNSsYT5GN_cqGVL1MK1faY9XglwixonQVkDk9Pkvk.cache +0 -0
  133. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/h-W0KoQGAiH7Sn5Y6HjTaVkoEceKV_LeymnmENnyLYQ.cache +0 -0
  134. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/n5wUjw8Ag9zP7pgTsene8E7Lj3RyWbqUaf2apVdzwc0.cache +2 -0
  135. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/nYdpABG_YyXwDqCH1vBNjh0m2AlewuKD9vT92xFu9Qs.cache +1 -0
  136. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/nrXgDez-J-7C7rQSEpAiK0Xj5rK37sysOLNYmJIsb_Q.cache +1 -0
  137. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/r_WSE-C4C32WlhZaTBsdC4x3Mf7EQQ93zBA3xOKSw94.cache +1 -0
  138. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/s7AiRxV9LdOVAylAE38RiKCstOIGXxlkhZ15nV8_GfY.cache +2 -0
  139. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/tXQLPTRHFdkPsB5bF6KRKGiUir3uMwdTnxE0na0vmes.cache +0 -0
  140. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/vTbuVbqVUHIvOo23rSZvO1yTT8C-98lLVXe_JG_6Pr8.cache +1 -0
  141. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/x22RvUd8k76gbEMX05JmfJaBplbMc2omvEoreS8eAqg.cache +1 -0
  142. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xQIYU3iVajL0UcrfbxTB8PIxGMuRDRvRjmq0ve9-s9U.cache +2 -0
  143. data/spec/factories/areas.rb +6 -0
  144. data/spec/factories/currencies.rb +6 -0
  145. data/spec/factories/nations.rb +6 -0
  146. data/spec/factories/regions.rb +6 -0
  147. data/spec/helpers/areas_helper_spec.rb +15 -0
  148. data/spec/helpers/currencies_helper_spec.rb +15 -0
  149. data/spec/helpers/nations_helper_spec.rb +15 -0
  150. data/spec/helpers/regions_helper_spec.rb +15 -0
  151. data/spec/models/area_spec.rb +5 -0
  152. data/spec/models/currency_spec.rb +24 -0
  153. data/spec/models/nation_spec.rb +24 -0
  154. data/spec/models/region_spec.rb +5 -0
  155. data/spec/rails_helper.rb +54 -0
  156. data/spec/routing/areas_routing_spec.rb +39 -0
  157. data/spec/routing/currencies_routing_spec.rb +39 -0
  158. data/spec/routing/nations_routing_spec.rb +39 -0
  159. data/spec/routing/regions_routing_spec.rb +39 -0
  160. data/spec/spec_helper.rb +2 -0
  161. data/spec/views/areas/edit.html.builder_spec.rb +14 -0
  162. data/spec/views/areas/index.html.builder_spec.rb +14 -0
  163. data/spec/views/areas/new.html.builder_spec.rb +14 -0
  164. data/spec/views/areas/show.html.builder_spec.rb +11 -0
  165. data/spec/views/currencies/edit.html.builder_spec.rb +14 -0
  166. data/spec/views/currencies/index.html.builder_spec.rb +14 -0
  167. data/spec/views/currencies/new.html.builder_spec.rb +14 -0
  168. data/spec/views/currencies/show.html.builder_spec.rb +11 -0
  169. data/spec/views/nations/edit.html.builder_spec.rb +14 -0
  170. data/spec/views/nations/index.html.builder_spec.rb +14 -0
  171. data/spec/views/nations/new.html.builder_spec.rb +14 -0
  172. data/spec/views/nations/show.html.builder_spec.rb +11 -0
  173. data/spec/views/regions/edit.html.builder_spec.rb +14 -0
  174. data/spec/views/regions/index.html.builder_spec.rb +14 -0
  175. data/spec/views/regions/new.html.builder_spec.rb +14 -0
  176. data/spec/views/regions/show.html.builder_spec.rb +11 -0
  177. data/spec/we_bridge_rails_engine_nations_spec.rb +7 -0
  178. data/we_bridge_rails_engine_nations.gemspec +42 -0
  179. metadata +482 -0
@@ -0,0 +1,42 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
36
+
37
+ # Print deprecation notices to the stderr.
38
+ config.active_support.deprecation = :stderr
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
42
+ end
@@ -0,0 +1,11 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,2 @@
1
+ require 'we_bridge_rails_engine_users'
2
+ WeBridgeRailsEngineUsers::ProviderSettings.reload!
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,63 @@
1
+ production: &production
2
+ twitter:
3
+ key:
4
+ secret:
5
+ facebook:
6
+ key:
7
+ secret:
8
+ scope: ""
9
+ google_oauth2:
10
+ key: "446117111635-2gvvjj221h9l44fiif8gjmolug3n9g3d.apps.googleusercontent.com"
11
+ secret: "dHgcfcfCfRRjeIwQo3giMM5x"
12
+ scope: "email,profile"
13
+ name: "google"
14
+ github:
15
+ key:
16
+ secret:
17
+ scope: "user,public_repo"
18
+ hatena:
19
+ key:
20
+ secret:
21
+ linkedin:
22
+ key:
23
+ secret:
24
+ scope: 'r_basicprofile r_emailaddress r_network'
25
+ fields:
26
+ - "id"
27
+ - "first-name"
28
+ - "last-name"
29
+ - "formatted-name"
30
+ - "headline"
31
+ - "location"
32
+ - "industry"
33
+ - "summary"
34
+ - "specialties"
35
+ - "positions"
36
+ - "picture-url"
37
+ - "public-profile-url" # in r_basicprofile
38
+ - "email-address" # in r_emailaddress
39
+ - "connections" # in r_network
40
+ mixi:
41
+ key:
42
+ secret:
43
+
44
+ development: &development
45
+ <<: *production
46
+ twitter:
47
+ key:
48
+ secret:
49
+ facebook:
50
+ key:
51
+ secret:
52
+ google_oauth2:
53
+ key: "446117111635-bihg2co22471kd3p1tqt9q2bi7v70up1.apps.googleusercontent.com"
54
+ secret: "TheED76u6qV8T71TZ4PTuhwH"
55
+ name: "google"
56
+ github:
57
+ key:
58
+ secret:
59
+ mixi:
60
+ key:
61
+ secret:
62
+ test:
63
+ <<: *development
@@ -0,0 +1,63 @@
1
+ production: &production
2
+ twitter:
3
+ key:
4
+ secret:
5
+ facebook:
6
+ key:
7
+ secret:
8
+ scope: ""
9
+ google_oauth2:
10
+ key: "dummy.apps.googleusercontent.com"
11
+ secret: "secret"
12
+ scope: "email,profile"
13
+ name: "google"
14
+ github:
15
+ key:
16
+ secret:
17
+ scope: "user,public_repo"
18
+ hatena:
19
+ key:
20
+ secret:
21
+ linkedin:
22
+ key:
23
+ secret:
24
+ scope: 'r_basicprofile r_emailaddress r_network'
25
+ fields:
26
+ - "id"
27
+ - "first-name"
28
+ - "last-name"
29
+ - "formatted-name"
30
+ - "headline"
31
+ - "location"
32
+ - "industry"
33
+ - "summary"
34
+ - "specialties"
35
+ - "positions"
36
+ - "picture-url"
37
+ - "public-profile-url" # in r_basicprofile
38
+ - "email-address" # in r_emailaddress
39
+ - "connections" # in r_network
40
+ mixi:
41
+ key:
42
+ secret:
43
+
44
+ development: &development
45
+ <<: *production
46
+ twitter:
47
+ key:
48
+ secret:
49
+ facebook:
50
+ key:
51
+ secret:
52
+ google_oauth2:
53
+ key: "dummy.apps.googleusercontent.com"
54
+ secret: "secret"
55
+ name: "google"
56
+ github:
57
+ key:
58
+ secret:
59
+ mixi:
60
+ key:
61
+ secret:
62
+ test:
63
+ <<: *development
@@ -0,0 +1,56 @@
1
+ Rails.application.routes.draw do
2
+ # The priority is based upon order of creation: first created -> highest priority.
3
+ # See how all your routes lay out with "rake routes".
4
+
5
+ # You can have the root of your site routed with "root"
6
+ # root 'welcome#index'
7
+
8
+ # Example of regular route:
9
+ # get 'products/:id' => 'catalog#view'
10
+
11
+ # Example of named route that can be invoked with purchase_url(id: product.id)
12
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13
+
14
+ # Example resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Example resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Example resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Example resource route with more complex sub-resources:
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', on: :collection
40
+ # end
41
+ # end
42
+
43
+ # Example resource route with concerns:
44
+ # concern :toggleable do
45
+ # post 'toggle'
46
+ # end
47
+ # resources :posts, concerns: :toggleable
48
+ # resources :photos, concerns: :toggleable
49
+
50
+ # Example resource route within a namespace:
51
+ # namespace :admin do
52
+ # # Directs /admin/products/* to Admin::ProductsController
53
+ # # (app/controllers/admin/products_controller.rb)
54
+ # resources :products
55
+ # end
56
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: 775d0130371accf41709da8ad0ebe55635d75b5bb1e748b1ee9473f22d0479ea7ccde2370d91c610e4e9ed0ec33d49d7bd8cfaceea3a22d8fa7dbe2cf3a67609
15
+
16
+ test:
17
+ secret_key_base: 569fa4cba91b35e19bd97625a5d65fe14faa06585c6b744029ccb532484939299a65befbeb248456edca2e7d6b1328e0c528e4cf653ea3a5f9de607dbee8a640
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
Binary file
@@ -0,0 +1,221 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20151202041711) do
15
+
16
+ create_table "area_texts", force: :cascade do |t|
17
+ t.integer "lang_id", null: false
18
+ t.integer "parent_id", null: false
19
+ t.string "name"
20
+ t.datetime "created_at", null: false
21
+ t.datetime "updated_at", null: false
22
+ end
23
+
24
+ add_index "area_texts", ["name", "lang_id"], name: "index_area_texts_on_name_and_lang_id", unique: true
25
+ add_index "area_texts", ["parent_id", "lang_id"], name: "index_area_texts_on_parent_id_and_lang_id", unique: true
26
+
27
+ create_table "areas", force: :cascade do |t|
28
+ t.string "name", null: false
29
+ t.datetime "created_at", null: false
30
+ t.datetime "updated_at", null: false
31
+ end
32
+
33
+ add_index "areas", ["name"], name: "index_areas_on_name", unique: true
34
+
35
+ create_table "currencies", force: :cascade do |t|
36
+ t.string "name", null: false
37
+ t.string "iso_code", limit: 3, null: false
38
+ t.string "unit_chars"
39
+ t.datetime "created_at", null: false
40
+ t.datetime "updated_at", null: false
41
+ end
42
+
43
+ add_index "currencies", ["iso_code"], name: "index_currencies_on_iso_code", unique: true
44
+ add_index "currencies", ["name"], name: "index_currencies_on_name", unique: true
45
+
46
+ create_table "currency_nation_maps", force: :cascade do |t|
47
+ t.integer "currency_id", null: false
48
+ t.integer "nation_id", null: false
49
+ t.datetime "started_at"
50
+ t.datetime "finished_at"
51
+ t.datetime "created_at", null: false
52
+ t.datetime "updated_at", null: false
53
+ end
54
+
55
+ create_table "currency_texts", force: :cascade do |t|
56
+ t.integer "lang_id", null: false
57
+ t.integer "parent_id", null: false
58
+ t.string "name", default: "", null: false
59
+ t.datetime "created_at", null: false
60
+ t.datetime "updated_at", null: false
61
+ end
62
+
63
+ add_index "currency_texts", ["parent_id", "lang_id"], name: "index_currency_texts_on_parent_id_and_lang_id", unique: true
64
+
65
+ create_table "lang_texts", force: :cascade do |t|
66
+ t.integer "parent_id", null: false
67
+ t.integer "lang_id", null: false
68
+ t.string "label"
69
+ t.datetime "created_at", null: false
70
+ t.datetime "updated_at", null: false
71
+ end
72
+
73
+ add_index "lang_texts", ["parent_id", "lang_id"], name: "index_lang_texts_on_parent_id_and_lang_id", unique: true
74
+
75
+ create_table "langs", force: :cascade do |t|
76
+ t.string "code", limit: 5, null: false
77
+ t.boolean "east", default: false, null: false
78
+ t.integer "position", default: 10000, null: false
79
+ t.boolean "enable", default: true, null: false
80
+ t.datetime "created_at", null: false
81
+ t.datetime "updated_at", null: false
82
+ end
83
+
84
+ add_index "langs", ["code"], name: "index_langs_on_code", unique: true
85
+
86
+ create_table "nation_texts", force: :cascade do |t|
87
+ t.integer "lang_id", null: false
88
+ t.integer "parent_id", null: false
89
+ t.string "name"
90
+ t.datetime "created_at", null: false
91
+ t.datetime "updated_at", null: false
92
+ end
93
+
94
+ add_index "nation_texts", ["name", "lang_id"], name: "index_nation_texts_on_name_and_lang_id", unique: true
95
+ add_index "nation_texts", ["parent_id", "lang_id"], name: "index_nation_texts_on_parent_id_and_lang_id", unique: true
96
+
97
+ create_table "nations", force: :cascade do |t|
98
+ t.integer "region_id"
99
+ t.string "code_alpha2", limit: 2
100
+ t.string "code_alpha3", limit: 3
101
+ t.integer "code_numeric", limit: 3
102
+ t.string "name", null: false
103
+ t.decimal "lat", precision: 10, scale: 7
104
+ t.decimal "lon", precision: 10, scale: 7
105
+ t.datetime "created_at", null: false
106
+ t.datetime "updated_at", null: false
107
+ end
108
+
109
+ add_index "nations", ["code_alpha2"], name: "index_nations_on_code_alpha2", unique: true
110
+ add_index "nations", ["code_alpha3"], name: "index_nations_on_code_alpha3", unique: true
111
+ add_index "nations", ["code_numeric"], name: "index_nations_on_code_numeric", unique: true
112
+ add_index "nations", ["name"], name: "index_nations_on_name", unique: true
113
+
114
+ create_table "people", force: :cascade do |t|
115
+ t.integer "sex", default: 1, null: false
116
+ t.integer "birth_year", default: 0, null: false
117
+ t.integer "birth_month", default: 0, null: false
118
+ t.integer "birth_day", default: 0, null: false
119
+ t.string "blood_type"
120
+ t.integer "created_by", null: false
121
+ t.integer "updated_by", null: false
122
+ t.datetime "created_at"
123
+ t.datetime "updated_at"
124
+ end
125
+
126
+ create_table "person_name_texts", force: :cascade do |t|
127
+ t.integer "parent_id", null: false
128
+ t.integer "lang_id", null: false
129
+ t.string "first_name"
130
+ t.string "first_name_pron"
131
+ t.string "last_name"
132
+ t.string "last_name_pron"
133
+ end
134
+
135
+ add_index "person_name_texts", ["parent_id", "lang_id"], name: "idx_person_name_texts", unique: true
136
+
137
+ create_table "person_names", force: :cascade do |t|
138
+ t.integer "person_id", null: false
139
+ t.integer "revision", default: 0, null: false
140
+ t.date "modified_on", null: false
141
+ t.datetime "created_at"
142
+ t.datetime "updated_at"
143
+ end
144
+
145
+ add_index "person_names", ["person_id", "revision"], name: "index_person_names_on_person_id_and_revision", unique: true
146
+
147
+ create_table "person_texts", force: :cascade do |t|
148
+ t.integer "parent_id", null: false
149
+ t.integer "lang_id", null: false
150
+ t.integer "created_by", null: false
151
+ t.integer "updated_by", null: false
152
+ t.datetime "created_at"
153
+ t.datetime "updated_at"
154
+ end
155
+
156
+ add_index "person_texts", ["parent_id", "lang_id"], name: "index_person_texts_on_parent_id_and_lang_id", unique: true
157
+
158
+ create_table "region_texts", force: :cascade do |t|
159
+ t.integer "lang_id", null: false
160
+ t.integer "parent_id", null: false
161
+ t.string "name"
162
+ t.datetime "created_at", null: false
163
+ t.datetime "updated_at", null: false
164
+ end
165
+
166
+ add_index "region_texts", ["name", "lang_id"], name: "index_region_texts_on_name_and_lang_id", unique: true
167
+ add_index "region_texts", ["parent_id", "lang_id"], name: "index_region_texts_on_parent_id_and_lang_id", unique: true
168
+
169
+ create_table "regions", force: :cascade do |t|
170
+ t.integer "area_id"
171
+ t.string "name", null: false
172
+ t.datetime "created_at", null: false
173
+ t.datetime "updated_at", null: false
174
+ end
175
+
176
+ add_index "regions", ["name"], name: "index_regions_on_name", unique: true
177
+
178
+ create_table "user_accounts", force: :cascade do |t|
179
+ t.integer "user_id", null: false
180
+ t.string "provider", null: false
181
+ t.string "uid", null: false
182
+ t.string "token"
183
+ t.string "name"
184
+ t.string "nickname"
185
+ t.string "email"
186
+ t.string "url"
187
+ t.string "image_url"
188
+ t.string "description"
189
+ t.text "other"
190
+ t.text "credentials"
191
+ t.text "raw_info"
192
+ t.datetime "deleted_at"
193
+ t.datetime "created_at"
194
+ t.datetime "updated_at"
195
+ end
196
+
197
+ add_index "user_accounts", ["uid"], name: "index_user_accounts_on_uid", unique: true
198
+
199
+ create_table "user_texts", force: :cascade do |t|
200
+ t.integer "parent_id", null: false
201
+ t.integer "lang_id", null: false
202
+ t.string "nick_name"
203
+ t.string "nick_name_pron"
204
+ t.datetime "deleted_at"
205
+ t.datetime "created_at"
206
+ t.datetime "updated_at"
207
+ end
208
+
209
+ add_index "user_texts", ["lang_id", "parent_id"], name: "index_user_texts_on_lang_id_and_parent_id", unique: true
210
+
211
+ create_table "users", force: :cascade do |t|
212
+ t.integer "person_id"
213
+ t.string "email"
214
+ t.string "user_img_url"
215
+ t.integer "lang_id", null: false
216
+ t.datetime "deleted_at"
217
+ t.datetime "created_at"
218
+ t.datetime "updated_at"
219
+ end
220
+
221
+ end