ninoxe 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +13 -5
  2. data/app/models/chouette/company.rb +3 -4
  3. data/app/models/chouette/line.rb +0 -1
  4. data/app/models/chouette/network.rb +4 -5
  5. data/app/models/chouette/stop_area.rb +25 -26
  6. data/config/database.yml.me +11 -0
  7. data/db/migrate/20150630135517_remove_uniqueness_for_registration_number.rb +22 -0
  8. data/lib/ninoxe.rb~ +7 -0
  9. data/lib/ninoxe/version.rb +1 -1
  10. metadata +45 -212
  11. data/spec/dummy/README.rdoc +0 -28
  12. data/spec/dummy/Rakefile +0 -6
  13. data/spec/dummy/app/assets/images/.keep +0 -0
  14. data/spec/dummy/app/assets/javascripts/application.js +0 -13
  15. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  16. data/spec/dummy/app/controllers/application_controller.rb +0 -5
  17. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  18. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  19. data/spec/dummy/app/mailers/.keep +0 -0
  20. data/spec/dummy/app/models/.keep +0 -0
  21. data/spec/dummy/app/models/concerns/.keep +0 -0
  22. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  23. data/spec/dummy/bin/bundle +0 -3
  24. data/spec/dummy/bin/rails +0 -4
  25. data/spec/dummy/bin/rake +0 -4
  26. data/spec/dummy/config.ru +0 -4
  27. data/spec/dummy/config/application.rb +0 -28
  28. data/spec/dummy/config/boot.rb +0 -5
  29. data/spec/dummy/config/database.yml +0 -19
  30. data/spec/dummy/config/environment.rb +0 -5
  31. data/spec/dummy/config/environments/development.rb +0 -29
  32. data/spec/dummy/config/environments/production.rb +0 -80
  33. data/spec/dummy/config/environments/test.rb +0 -36
  34. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  35. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  36. data/spec/dummy/config/initializers/inflections.rb +0 -16
  37. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  38. data/spec/dummy/config/initializers/secret_token.rb +0 -12
  39. data/spec/dummy/config/initializers/session_store.rb +0 -3
  40. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  41. data/spec/dummy/config/locales/en.yml +0 -23
  42. data/spec/dummy/config/locales/fr.yml +0 -23
  43. data/spec/dummy/config/routes.rb +0 -4
  44. data/spec/dummy/db/schema.rb +0 -489
  45. data/spec/dummy/db/test.sqlite3 +0 -0
  46. data/spec/dummy/lib/assets/.keep +0 -0
  47. data/spec/dummy/log/.keep +0 -0
  48. data/spec/dummy/public/404.html +0 -58
  49. data/spec/dummy/public/422.html +0 -58
  50. data/spec/dummy/public/500.html +0 -57
  51. data/spec/dummy/public/favicon.ico +0 -0
  52. data/spec/dummy/script/rails +0 -6
  53. data/spec/factories/chouette_access_links.rb +0 -13
  54. data/spec/factories/chouette_access_points.rb +0 -12
  55. data/spec/factories/chouette_companies.rb +0 -9
  56. data/spec/factories/chouette_connection_links.rb +0 -13
  57. data/spec/factories/chouette_footnotes.rb +0 -10
  58. data/spec/factories/chouette_group_of_lines.rb +0 -9
  59. data/spec/factories/chouette_journey_pattern.rb +0 -40
  60. data/spec/factories/chouette_lines.rb +0 -44
  61. data/spec/factories/chouette_networks.rb +0 -9
  62. data/spec/factories/chouette_routes.rb +0 -26
  63. data/spec/factories/chouette_stop_areas.rb +0 -12
  64. data/spec/factories/chouette_stop_points.rb +0 -10
  65. data/spec/factories/chouette_time_table.rb +0 -37
  66. data/spec/factories/chouette_vehicle_journey.rb +0 -66
  67. data/spec/factories/chouette_vehicle_journey_at_stop.rb +0 -8
  68. data/spec/models/chouette/access_link_spec.rb +0 -82
  69. data/spec/models/chouette/access_point_spec.rb +0 -269
  70. data/spec/models/chouette/active_record_spec.rb +0 -121
  71. data/spec/models/chouette/area_type_spec.rb +0 -53
  72. data/spec/models/chouette/company_spec.rb +0 -51
  73. data/spec/models/chouette/connection_link_spec.rb +0 -60
  74. data/spec/models/chouette/direction_spec.rb +0 -60
  75. data/spec/models/chouette/exporter_spec.rb +0 -28
  76. data/spec/models/chouette/file_validator_spec.rb +0 -28
  77. data/spec/models/chouette/footnote_spec.rb +0 -9
  78. data/spec/models/chouette/group_of_line_spec.rb +0 -31
  79. data/spec/models/chouette/journey_pattern_spec.rb +0 -64
  80. data/spec/models/chouette/line_spec.rb +0 -123
  81. data/spec/models/chouette/loader_spec.rb +0 -69
  82. data/spec/models/chouette/network_spec.rb +0 -22
  83. data/spec/models/chouette/object_id_spec.rb +0 -149
  84. data/spec/models/chouette/route_spec.rb +0 -238
  85. data/spec/models/chouette/stop_area_spec.rb +0 -443
  86. data/spec/models/chouette/stop_point_spec.rb +0 -41
  87. data/spec/models/chouette/time_table_period_spec.rb +0 -66
  88. data/spec/models/chouette/time_table_spec.rb +0 -1266
  89. data/spec/models/chouette/transport_mode_spec.rb +0 -64
  90. data/spec/models/chouette/trident_active_record_spec.rb +0 -115
  91. data/spec/models/chouette/vehicle_journey_at_stop_spec.rb +0 -47
  92. data/spec/models/chouette/vehicle_journey_spec.rb +0 -223
  93. data/spec/presenters/chouette/geometry/general_presenter.rb +0 -1
  94. data/spec/presenters/chouette/geometry/line_presenter_spec.rb +0 -13
  95. data/spec/spec_helper.rb +0 -58
File without changes
File without changes
data/spec/dummy/log/.keep DELETED
File without changes
@@ -1,58 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/404.html -->
52
- <div class="dialog">
53
- <h1>The page you were looking for doesn't exist.</h1>
54
- <p>You may have mistyped the address or the page may have moved.</p>
55
- </div>
56
- <p>If you are the application owner check the logs for more information.</p>
57
- </body>
58
- </html>
@@ -1,58 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/422.html -->
52
- <div class="dialog">
53
- <h1>The change you wanted was rejected.</h1>
54
- <p>Maybe you tried to change something you didn't have access to.</p>
55
- </div>
56
- <p>If you are the application owner check the logs for more information.</p>
57
- </body>
58
- </html>
@@ -1,57 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/500.html -->
52
- <div class="dialog">
53
- <h1>We're sorry, but something went wrong.</h1>
54
- </div>
55
- <p>If you are the application owner check the logs for more information.</p>
56
- </body>
57
- </html>
File without changes
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env jruby
2
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
-
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
6
- require 'rails/commands'
@@ -1,13 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :access_link, :class => Chouette::AccessLink do
4
- sequence(:name) { |n| "Access link #{n}" }
5
- sequence(:objectid) { |n| "test:AccessLink:#{n}" }
6
- link_type "Mixed"
7
- link_orientation "AccessPointToStopArea"
8
-
9
- association :stop_area, :factory => :stop_area
10
- association :access_point, :factory => :access_point
11
- end
12
-
13
- end
@@ -1,12 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :access_point, :class => Chouette::AccessPoint do
4
- latitude {10.0 * rand}
5
- longitude {10.0 * rand}
6
- sequence(:name) { |n| "AccessPoint #{n}" }
7
- access_type "InOut"
8
- sequence(:objectid) { |n| "test:AccessPoint:#{n}" }
9
- association :stop_area, :factory => :stop_area
10
- end
11
-
12
- end
@@ -1,9 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :company, :class => Chouette::Company do
4
- sequence(:name) { |n| "Company #{n}" }
5
- sequence(:objectid) { |n| "test:Company:#{n}" }
6
- sequence(:registration_number) { |n| "test-#{n}" }
7
- end
8
-
9
- end
@@ -1,13 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :connection_link, :class => Chouette::ConnectionLink do
4
- sequence(:name) { |n| "Connection link #{n}" }
5
- sequence(:link_type) { |n| "Mixed" }
6
- sequence(:objectid) { |n| "test:ConnectionLink:#{n}" }
7
-
8
- association :departure, :factory => :stop_area
9
- association :arrival, :factory => :stop_area
10
- end
11
-
12
- end
13
-
@@ -1,10 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :footnote, :class => Chouette::Footnote do
4
- sequence(:code) { |n| "#{n}" }
5
- sequence(:label) { |n| "footnote #{n}" }
6
- association :line, :factory => :line
7
- end
8
-
9
- end
10
-
@@ -1,9 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :group_of_line, :class => Chouette::GroupOfLine do
4
- sequence(:name) { |n| "Group Of Line #{n}" }
5
- sequence(:objectid) { |n| "test:GroupOfLine:#{n}" }
6
- sequence(:registration_number) { |n| "#{n}" }
7
- end
8
-
9
- end
@@ -1,40 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :journey_pattern_common, :class => Chouette::JourneyPattern do
4
- sequence(:name) { |n| "jp name #{n}" }
5
- sequence(:published_name) { |n| "jp publishedname #{n}" }
6
- sequence(:comment) { |n| "jp comment #{n}" }
7
- sequence(:registration_number) { |n| "jp registration_number #{n}" }
8
- sequence(:objectid) { |n| "test:JourneyPattern:#{n}" }
9
-
10
- association :route, :factory => :route
11
-
12
- factory :journey_pattern do
13
- after(:create) do |j|
14
- j.stop_point_ids = j.route.stop_points.map(&:id)
15
- j.departure_stop_point_id = j.route.stop_points.first.id
16
- j.arrival_stop_point_id = j.route.stop_points.last.id
17
- end
18
- end
19
-
20
- factory :journey_pattern_odd do
21
- after(:create) do |j|
22
- j.stop_point_ids = j.route.stop_points.select { |sp| sp.position%2==0}.map(&:id)
23
- j.departure_stop_point_id = j.stop_point_ids.first
24
- j.arrival_stop_point_id = j.stop_point_ids.last
25
- end
26
- end
27
-
28
- factory :journey_pattern_even do
29
- after(:create) do |j|
30
- j.stop_point_ids = j.route.stop_points.select { |sp| sp.position%2==1}.map(&:id)
31
- j.departure_stop_point_id = j.stop_point_ids.first
32
- j.arrival_stop_point_id = j.stop_point_ids.last
33
- end
34
- end
35
-
36
- end
37
-
38
- end
39
-
40
-
@@ -1,44 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :line, :class => Chouette::Line do
4
- sequence(:name) { |n| "Line #{n}" }
5
- sequence(:objectid) { |n| "test:Line:#{n}" }
6
- sequence(:transport_mode_name) { |n| "Bus" }
7
-
8
- association :network, :factory => :network
9
- association :company, :factory => :company
10
-
11
- sequence(:registration_number) { |n| "test-#{n}" }
12
-
13
- factory :line_with_stop_areas do
14
-
15
- transient do
16
- routes_count 2
17
- stop_areas_count 5
18
- end
19
-
20
- after(:create) do |line, evaluator|
21
- create_list(:route, evaluator.routes_count, :line => line) do |route|
22
- create_list(:stop_area, evaluator.stop_areas_count, area_type: "Quay") do |stop_area|
23
- create(:stop_point, :stop_area => stop_area, :route => route)
24
- end
25
- end
26
- end
27
-
28
- factory :line_with_stop_areas_having_parent do
29
-
30
- after(:create) do |line|
31
- line.routes.each do |route|
32
- route.stop_points.each do |stop_point|
33
- comm = create(:stop_area, :area_type => "CommercialStopPoint")
34
- stop_point.stop_area.update_attributes(:parent_id => comm.id)
35
- end
36
- end
37
- end
38
- end
39
-
40
- end
41
-
42
- end
43
-
44
- end
@@ -1,9 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :network, :class => Chouette::Network do
4
- sequence(:name) { |n| "Network #{n}" }
5
- sequence(:objectid) { |n| "test:GroupOfLine:#{n}" }
6
- sequence(:registration_number) { |n| "test-#{n}" }
7
- end
8
-
9
- end
@@ -1,26 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :route_common, :class => Chouette::Route do
4
- sequence(:name) { |n| "Route #{n}" }
5
- sequence(:published_name) { |n| "Long route #{n}" }
6
- sequence(:number) { |n| "#{n}" }
7
- sequence(:wayback_code) { |n| Chouette::Wayback.new( n % 2) }
8
- sequence(:direction_code) { |n| Chouette::Direction.new( n % 12) }
9
- sequence(:objectid) { |n| "test:Route:#{n}" }
10
-
11
- association :line, :factory => :line
12
-
13
- factory :route do
14
-
15
- transient do
16
- stop_points_count 5
17
- end
18
-
19
- after(:create) do |route, evaluator|
20
- create_list(:stop_point, evaluator.stop_points_count, route: route)
21
- end
22
-
23
- end
24
- end
25
-
26
- end
@@ -1,12 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :stop_area, :class => Chouette::StopArea do
4
- sequence(:objectid) { |n| "test:StopArea:#{n}" }
5
- sequence(:name) { |n| "stop_area_#{n}" }
6
- sequence(:registration_number) { |n| "test-#{n}" }
7
- area_type "CommercialStopPoint"
8
- latitude {10.0 * rand}
9
- longitude {10.0 * rand}
10
- end
11
-
12
- end
@@ -1,10 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :stop_point, :class => Chouette::StopPoint do
4
- sequence(:objectid) { |n| "test:StopPoint:#{n}" }
5
- association :route, :factory => :route
6
- association :stop_area, :factory => :stop_area
7
- end
8
-
9
- end
10
-
@@ -1,37 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :time_table_date, :class => Chouette::TimeTableDate do
4
- end
5
-
6
- factory :time_table_period, :class => Chouette::TimeTablePeriod do
7
- end
8
-
9
- factory :time_table, :class => Chouette::TimeTable do
10
- sequence(:comment) { |n| "Timetable #{n}" }
11
- sequence(:objectid) { |n| "test:Timetable:#{n}" }
12
- sequence(:int_day_types) { (1..7).to_a.map{ |n| 2**(n+1)}.sum }
13
-
14
- transient do
15
- dates_count 4
16
- periods_count 4
17
- end
18
-
19
- after(:create) do |time_table, evaluator|
20
-
21
- 0.upto(4) do |i|
22
- time_table.dates << create(:time_table_date, :time_table => time_table, :date => i.days.since.to_date, :in_out => true)
23
- end
24
-
25
- start_date = Date.today
26
- end_date = start_date + 10
27
-
28
- 0.upto(4) do |i|
29
- time_table.periods << create(:time_table_period, :time_table => time_table, :period_start => start_date, :period_end => end_date)
30
- start_date = start_date + 20
31
- end_date = start_date + 10
32
- end
33
- time_table.save_shortcuts
34
- end
35
- end
36
-
37
- end