ninoxe 1.1.5 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +9 -12
  3. data/app/models/chouette/access_link.rb +52 -51
  4. data/app/models/chouette/access_point.rb +7 -7
  5. data/app/models/chouette/active_record.rb +28 -28
  6. data/app/models/chouette/company.rb +3 -3
  7. data/app/models/chouette/connection_link.rb +3 -3
  8. data/app/models/chouette/footnote.rb +1 -1
  9. data/app/models/chouette/group_of_line.rb +2 -2
  10. data/app/models/chouette/journey_pattern.rb +7 -3
  11. data/app/models/chouette/line.rb +11 -9
  12. data/app/models/chouette/network.rb +2 -2
  13. data/app/models/chouette/pt_link.rb +1 -1
  14. data/app/models/chouette/route.rb +9 -10
  15. data/app/models/chouette/stop_area.rb +8 -8
  16. data/app/models/chouette/stop_point.rb +3 -3
  17. data/app/models/chouette/time_table.rb +25 -122
  18. data/app/models/chouette/time_table_date.rb +1 -1
  19. data/app/models/chouette/time_table_period.rb +1 -1
  20. data/app/models/chouette/vehicle_journey.rb +82 -77
  21. data/app/models/chouette/vehicle_journey_at_stop.rb +1 -1
  22. data/config/database.yml +16 -8
  23. data/config/database.yml.travis +15 -6
  24. data/db/migrate/20150526075108_add_foreign_key_to_routes.rb +28 -0
  25. data/lib/ninoxe/engine.rb +4 -0
  26. data/lib/ninoxe/version.rb +1 -1
  27. data/lib/ninoxe.rb +3 -0
  28. data/spec/dummy/README.rdoc +15 -248
  29. data/spec/dummy/Rakefile +1 -1
  30. data/spec/dummy/app/{mailers/.gitkeep → assets/images/.keep} +0 -0
  31. data/spec/dummy/app/assets/javascripts/application.js +3 -5
  32. data/spec/dummy/app/assets/stylesheets/application.css +1 -1
  33. data/spec/dummy/app/controllers/application_controller.rb +3 -1
  34. data/spec/dummy/app/{models/.gitkeep → controllers/concerns/.keep} +0 -0
  35. data/spec/dummy/{lib/assets/.gitkeep → app/mailers/.keep} +0 -0
  36. data/spec/dummy/{log/.gitkeep → app/models/.keep} +0 -0
  37. data/spec/dummy/app/models/concerns/.keep +0 -0
  38. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  39. data/spec/dummy/bin/bundle +3 -0
  40. data/spec/dummy/bin/rails +4 -0
  41. data/spec/dummy/bin/rake +4 -0
  42. data/spec/dummy/config/application.rb +8 -36
  43. data/spec/dummy/config/boot.rb +4 -9
  44. data/spec/dummy/config/database.yml +16 -8
  45. data/spec/dummy/config/environment.rb +2 -4
  46. data/spec/dummy/config/environments/development.rb +11 -19
  47. data/spec/dummy/config/environments/production.rb +41 -28
  48. data/spec/dummy/config/environments/test.rb +13 -14
  49. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/spec/dummy/config/initializers/inflections.rb +6 -5
  51. data/spec/dummy/config/initializers/secret_token.rb +7 -2
  52. data/spec/dummy/config/initializers/session_store.rb +1 -6
  53. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  54. data/spec/dummy/config/locales/en.yml +20 -2
  55. data/spec/dummy/config/locales/fr.yml +23 -0
  56. data/spec/dummy/config.ru +1 -1
  57. data/spec/dummy/db/schema.rb +147 -143
  58. data/spec/dummy/lib/assets/.keep +0 -0
  59. data/spec/dummy/log/.keep +0 -0
  60. data/spec/dummy/public/404.html +43 -11
  61. data/spec/dummy/public/422.html +43 -11
  62. data/spec/dummy/public/500.html +43 -11
  63. data/spec/dummy/script/rails +1 -1
  64. data/spec/factories/chouette_access_links.rb +13 -0
  65. data/spec/factories/chouette_access_points.rb +12 -0
  66. data/spec/factories/chouette_companies.rb +9 -0
  67. data/spec/factories/chouette_connection_links.rb +13 -0
  68. data/spec/factories/chouette_footnotes.rb +10 -0
  69. data/spec/factories/chouette_group_of_lines.rb +9 -0
  70. data/spec/factories/chouette_journey_pattern.rb +40 -0
  71. data/spec/factories/chouette_lines.rb +44 -0
  72. data/spec/factories/chouette_networks.rb +9 -0
  73. data/spec/factories/chouette_routes.rb +26 -0
  74. data/spec/factories/chouette_stop_areas.rb +12 -0
  75. data/spec/factories/chouette_stop_points.rb +10 -0
  76. data/spec/factories/chouette_time_table.rb +37 -0
  77. data/spec/factories/chouette_vehicle_journey.rb +66 -0
  78. data/spec/factories/chouette_vehicle_journey_at_stop.rb +8 -0
  79. data/spec/models/chouette/access_link_spec.rb +17 -13
  80. data/spec/models/chouette/access_point_spec.rb +106 -103
  81. data/spec/models/chouette/active_record_spec.rb +57 -57
  82. data/spec/models/chouette/area_type_spec.rb +8 -8
  83. data/spec/models/chouette/company_spec.rb +18 -18
  84. data/spec/models/chouette/connection_link_spec.rb +19 -15
  85. data/spec/models/chouette/direction_spec.rb +8 -8
  86. data/spec/models/chouette/exporter_spec.rb +4 -4
  87. data/spec/models/chouette/file_validator_spec.rb +4 -4
  88. data/spec/models/chouette/footnote_spec.rb +1 -1
  89. data/spec/models/chouette/group_of_line_spec.rb +11 -11
  90. data/spec/models/chouette/journey_pattern_spec.rb +16 -14
  91. data/spec/models/chouette/line_spec.rb +36 -32
  92. data/spec/models/chouette/loader_spec.rb +9 -9
  93. data/spec/models/chouette/network_spec.rb +9 -9
  94. data/spec/models/chouette/object_id_spec.rb +31 -28
  95. data/spec/models/chouette/route_spec.rb +51 -47
  96. data/spec/models/chouette/stop_area_spec.rb +191 -188
  97. data/spec/models/chouette/stop_point_spec.rb +13 -10
  98. data/spec/models/chouette/time_table_period_spec.rb +18 -18
  99. data/spec/models/chouette/time_table_spec.rb +303 -255
  100. data/spec/models/chouette/transport_mode_spec.rb +10 -10
  101. data/spec/models/chouette/trident_active_record_spec.rb +17 -17
  102. data/spec/models/chouette/vehicle_journey_at_stop_spec.rb +13 -12
  103. data/spec/models/chouette/vehicle_journey_spec.rb +46 -46
  104. data/spec/presenters/chouette/geometry/line_presenter_spec.rb +2 -2
  105. data/spec/spec_helper.rb +22 -9
  106. metadata +102 -87
  107. data/config/database.yml.ci +0 -14
  108. data/lib/factories/chouette_access_links.rb +0 -11
  109. data/lib/factories/chouette_access_points.rb +0 -8
  110. data/lib/factories/chouette_companies.rb +0 -5
  111. data/lib/factories/chouette_connection_links.rb +0 -11
  112. data/lib/factories/chouette_footnotes.rb +0 -6
  113. data/lib/factories/chouette_group_of_lines.rb +0 -5
  114. data/lib/factories/chouette_journey_pattern.rb +0 -32
  115. data/lib/factories/chouette_lines.rb +0 -31
  116. data/lib/factories/chouette_networks.rb +0 -5
  117. data/lib/factories/chouette_routes.rb +0 -20
  118. data/lib/factories/chouette_stop_areas.rb +0 -8
  119. data/lib/factories/chouette_stop_points.rb +0 -7
  120. data/lib/factories/chouette_time_table.rb +0 -23
  121. data/lib/factories/chouette_vehicle_journey.rb +0 -51
  122. data/lib/factories/chouette_vehicle_journey_at_stop.rb +0 -5
  123. data/spec/dummy/config/initializers/active_record.rb +0 -2
@@ -1,5 +1,5 @@
1
1
  Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # The test environment is used exclusively to run your application's
5
5
  # test suite. You never need to work with it otherwise. Remember that
@@ -7,31 +7,30 @@ Dummy::Application.configure do
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
- # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
12
- config.static_cache_control = "public, max-age=3600"
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
13
14
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
16
18
 
17
- # Show full error reports and disable caching
19
+ # Show full error reports and disable caching.
18
20
  config.consider_all_requests_local = true
19
21
  config.action_controller.perform_caching = false
20
22
 
21
- # Raise exceptions instead of rendering exception templates
23
+ # Raise exceptions instead of rendering exception templates.
22
24
  config.action_dispatch.show_exceptions = false
23
25
 
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
26
28
 
27
29
  # Tell Action Mailer not to deliver emails to the real world.
28
30
  # The :test delivery method accumulates sent emails in the
29
31
  # ActionMailer::Base.deliveries array.
30
32
  config.action_mailer.delivery_method = :test
31
33
 
32
- # Raise exception on mass assignment protection for Active Record models
33
- #config.active_record.mass_assignment_sanitizer = :strict
34
-
35
- # Print deprecation notices to the stderr
34
+ # Print deprecation notices to the stderr.
36
35
  config.active_support.deprecation = :stderr
37
36
  end
@@ -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]
@@ -1,15 +1,16 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
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|
6
7
  # inflect.plural /^(ox)$/i, '\1en'
7
8
  # inflect.singular /^(ox)en/i, '\1'
8
9
  # inflect.irregular 'person', 'people'
9
10
  # inflect.uncountable %w( fish sheep )
10
11
  # end
11
- #
12
+
12
13
  # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
14
15
  # inflect.acronym 'RESTful'
15
16
  # end
@@ -1,7 +1,12 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Your secret key for verifying the integrity of signed cookies.
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
4
  # If you change this key, all old signed cookies will become invalid!
5
+
5
6
  # Make sure the secret is at least 30 characters and all random,
6
7
  # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = '1d0189a5af958cad469930557a3057cf1e8f8eec7cee5743100c1fa98901b49581c3a346745bda1e2033b00a0e62b65002e553b341b5583356eca538c31d010c'
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_key_base = 'a4c412090e8d88391e3d22ecb109a4b942badd989b19b7e481e9fa656f93d5411490e030da39cbb9c8adc5664bb6b626299ef5004a7ea76d8ba512c4910c990a'
@@ -1,8 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
4
-
5
- # Use the database for sessions instead of the cookie-based default,
6
- # which shouldn't be used to store highly confidential information
7
- # (create the session table with "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,14 +1,14 @@
1
1
  # Be sure to restart your server when you modify this file.
2
- #
2
+
3
3
  # This file contains settings for ActionController::ParamsWrapper which
4
4
  # is enabled by default.
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters :format => [:json]
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
9
  end
10
10
 
11
- # Disable root element in JSON by default.
12
- ActiveSupport.on_load(:active_record) do
13
- self.include_root_in_json = false
14
- end
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
@@ -1,5 +1,23 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
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.
3
21
 
4
22
  en:
5
23
  hello: "Hello world"
@@ -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
+ fr:
23
+ hello: "Bonjour le monde"
data/spec/dummy/config.ru CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
3
  require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application
4
+ run Rails.application