ninoxe 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/chouette/vehicle_journey_at_stop.rb +5 -5
- data/lib/ninoxe/version.rb +1 -1
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/images/.keep +0 -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/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- 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 +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.ru +4 -0
- data/spec/dummy/config/application.rb +28 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +19 -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/locales/fr.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/db/schema.rb +490 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -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/dummy/script/rails +6 -0
- data/spec/factories/chouette_access_links.rb +13 -0
- data/spec/factories/chouette_access_points.rb +12 -0
- data/spec/factories/chouette_companies.rb +9 -0
- data/spec/factories/chouette_connection_links.rb +13 -0
- data/spec/factories/chouette_footnotes.rb +10 -0
- data/spec/factories/chouette_group_of_lines.rb +9 -0
- data/spec/factories/chouette_journey_pattern.rb +40 -0
- data/spec/factories/chouette_lines.rb +44 -0
- data/spec/factories/chouette_networks.rb +9 -0
- data/spec/factories/chouette_routes.rb +26 -0
- data/spec/factories/chouette_stop_areas.rb +12 -0
- data/spec/factories/chouette_stop_points.rb +10 -0
- data/spec/factories/chouette_time_table.rb +37 -0
- data/spec/factories/chouette_vehicle_journey.rb +66 -0
- data/spec/factories/chouette_vehicle_journey_at_stop.rb +8 -0
- data/spec/models/chouette/access_link_spec.rb +82 -0
- data/spec/models/chouette/access_point_spec.rb +269 -0
- data/spec/models/chouette/active_record_spec.rb +121 -0
- data/spec/models/chouette/area_type_spec.rb +53 -0
- data/spec/models/chouette/company_spec.rb +48 -0
- data/spec/models/chouette/connection_link_spec.rb +60 -0
- data/spec/models/chouette/direction_spec.rb +60 -0
- data/spec/models/chouette/exporter_spec.rb +28 -0
- data/spec/models/chouette/file_validator_spec.rb +28 -0
- data/spec/models/chouette/footnote_spec.rb +9 -0
- data/spec/models/chouette/group_of_line_spec.rb +31 -0
- data/spec/models/chouette/journey_pattern_spec.rb +64 -0
- data/spec/models/chouette/line_spec.rb +120 -0
- data/spec/models/chouette/loader_spec.rb +69 -0
- data/spec/models/chouette/network_spec.rb +19 -0
- data/spec/models/chouette/object_id_spec.rb +149 -0
- data/spec/models/chouette/route_spec.rb +238 -0
- data/spec/models/chouette/stop_area_spec.rb +443 -0
- data/spec/models/chouette/stop_point_spec.rb +41 -0
- data/spec/models/chouette/time_table_period_spec.rb +66 -0
- data/spec/models/chouette/time_table_spec.rb +1266 -0
- data/spec/models/chouette/transport_mode_spec.rb +64 -0
- data/spec/models/chouette/trident_active_record_spec.rb +115 -0
- data/spec/models/chouette/vehicle_journey_at_stop_spec.rb +47 -0
- data/spec/models/chouette/vehicle_journey_spec.rb +223 -0
- data/spec/presenters/chouette/geometry/general_presenter.rb +1 -0
- data/spec/presenters/chouette/geometry/line_presenter_spec.rb +13 -0
- data/spec/spec_helper.rb +58 -0
- metadata +178 -10
- data/config/database.yml.me +0 -11
- data/lib/ninoxe.rb~ +0 -7
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Chouette::Geometry::LinePresenter do
|
4
|
+
let!(:line) { create(:line_with_stop_areas_having_parent) }
|
5
|
+
subject { Chouette::Geometry::LinePresenter.new(line)}
|
6
|
+
|
7
|
+
describe "#routes_localized_commercials" do
|
8
|
+
it "should return 3 stop_areas" do
|
9
|
+
expect(subject.routes_localized_commercials(line.routes.first).size).to eq(10)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Configure Rails Envinronment
|
2
|
+
ENV["RAILS_ENV"] ||= "test"
|
3
|
+
require 'spec_helper'
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require 'rspec/rails'
|
6
|
+
|
7
|
+
# Add additional requires below this line. Rails is not loaded until this point!
|
8
|
+
require 'shoulda-matchers'
|
9
|
+
require 'factory_girl_rails'
|
10
|
+
require 'geo_ruby'
|
11
|
+
|
12
|
+
# Requires supporting ruby files with custom matchers and macros, etc, in
|
13
|
+
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
14
|
+
# run as spec files by default. This means that files in spec/support that end
|
15
|
+
# in _spec.rb will both be required and run as specs, causing the specs to be
|
16
|
+
# run twice. It is recommended that you do not name files matching this glob to
|
17
|
+
# end with _spec.rb. You can configure this pattern with the --pattern
|
18
|
+
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
|
19
|
+
#
|
20
|
+
# The following line is provided for convenience purposes. It has the downside
|
21
|
+
# of increasing the boot-up time by auto-requiring all files in the support
|
22
|
+
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
23
|
+
# require only the support files necessary.
|
24
|
+
#
|
25
|
+
ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
|
26
|
+
|
27
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
28
|
+
# in spec/support/ and its subdirectories.
|
29
|
+
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
|
30
|
+
Dir[File.join(ENGINE_RAILS_ROOT, "lib/factories/**/*.rb")].each {|f| require f }
|
31
|
+
|
32
|
+
# Checks for pending migrations before tests are run.
|
33
|
+
# If you are not using ActiveRecord, you can remove this line.
|
34
|
+
ActiveRecord::Migration.maintain_test_schema!
|
35
|
+
|
36
|
+
RSpec.configure do |config|
|
37
|
+
config.include FactoryGirl::Syntax::Methods
|
38
|
+
|
39
|
+
# == Mock Framework
|
40
|
+
#
|
41
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
42
|
+
#
|
43
|
+
# config.mock_with :mocha
|
44
|
+
# config.mock_with :flexmock
|
45
|
+
# config.mock_with :rr
|
46
|
+
config.mock_with :rspec
|
47
|
+
|
48
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
49
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
50
|
+
|
51
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
52
|
+
# examples within a transaction, remove the following line or assign false
|
53
|
+
# instead of true.
|
54
|
+
config.use_transactional_fixtures = true
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ninoxe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Florisson
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-10-
|
14
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: georuby-ext
|
@@ -275,9 +275,6 @@ executables: []
|
|
275
275
|
extensions: []
|
276
276
|
extra_rdoc_files: []
|
277
277
|
files:
|
278
|
-
- MIT-LICENSE
|
279
|
-
- README.md
|
280
|
-
- Rakefile
|
281
278
|
- app/assets/javascripts/ninoxe/application.js
|
282
279
|
- app/assets/stylesheets/ninoxe/application.css
|
283
280
|
- app/controllers/ninoxe/application_controller.rb
|
@@ -327,7 +324,6 @@ files:
|
|
327
324
|
- app/presenters/chouette/geometry/stop_area_presenter.rb
|
328
325
|
- app/views/layouts/ninoxe/application.html.erb
|
329
326
|
- config/database.yml
|
330
|
-
- config/database.yml.me
|
331
327
|
- config/database.yml.travis
|
332
328
|
- config/locales/en.yml
|
333
329
|
- config/locales/fr.yml
|
@@ -388,10 +384,97 @@ files:
|
|
388
384
|
- db/migrate/20150630135517_remove_uniqueness_for_registration_number.rb
|
389
385
|
- db/migrate/20150922093109_add_stable_id_to_line.rb
|
390
386
|
- lib/chouette_factories.rb
|
391
|
-
- lib/ninoxe.rb
|
392
|
-
- lib/ninoxe.rb~
|
393
387
|
- lib/ninoxe/engine.rb
|
394
388
|
- lib/ninoxe/version.rb
|
389
|
+
- lib/ninoxe.rb
|
390
|
+
- MIT-LICENSE
|
391
|
+
- Rakefile
|
392
|
+
- README.md
|
393
|
+
- spec/dummy/README.rdoc
|
394
|
+
- spec/dummy/Rakefile
|
395
|
+
- spec/dummy/app/assets/images/.keep
|
396
|
+
- spec/dummy/app/assets/javascripts/application.js
|
397
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
398
|
+
- spec/dummy/app/controllers/application_controller.rb
|
399
|
+
- spec/dummy/app/controllers/concerns/.keep
|
400
|
+
- spec/dummy/app/helpers/application_helper.rb
|
401
|
+
- spec/dummy/app/mailers/.keep
|
402
|
+
- spec/dummy/app/models/.keep
|
403
|
+
- spec/dummy/app/models/concerns/.keep
|
404
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
405
|
+
- spec/dummy/bin/bundle
|
406
|
+
- spec/dummy/bin/rails
|
407
|
+
- spec/dummy/bin/rake
|
408
|
+
- spec/dummy/config.ru
|
409
|
+
- spec/dummy/config/application.rb
|
410
|
+
- spec/dummy/config/boot.rb
|
411
|
+
- spec/dummy/config/database.yml
|
412
|
+
- spec/dummy/config/environment.rb
|
413
|
+
- spec/dummy/config/environments/development.rb
|
414
|
+
- spec/dummy/config/environments/production.rb
|
415
|
+
- spec/dummy/config/environments/test.rb
|
416
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
417
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
418
|
+
- spec/dummy/config/initializers/inflections.rb
|
419
|
+
- spec/dummy/config/initializers/mime_types.rb
|
420
|
+
- spec/dummy/config/initializers/secret_token.rb
|
421
|
+
- spec/dummy/config/initializers/session_store.rb
|
422
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
423
|
+
- spec/dummy/config/locales/en.yml
|
424
|
+
- spec/dummy/config/locales/fr.yml
|
425
|
+
- spec/dummy/config/routes.rb
|
426
|
+
- spec/dummy/db/schema.rb
|
427
|
+
- spec/dummy/db/test.sqlite3
|
428
|
+
- spec/dummy/lib/assets/.keep
|
429
|
+
- spec/dummy/log/.keep
|
430
|
+
- spec/dummy/public/404.html
|
431
|
+
- spec/dummy/public/422.html
|
432
|
+
- spec/dummy/public/500.html
|
433
|
+
- spec/dummy/public/favicon.ico
|
434
|
+
- spec/dummy/script/rails
|
435
|
+
- spec/factories/chouette_access_links.rb
|
436
|
+
- spec/factories/chouette_access_points.rb
|
437
|
+
- spec/factories/chouette_companies.rb
|
438
|
+
- spec/factories/chouette_connection_links.rb
|
439
|
+
- spec/factories/chouette_footnotes.rb
|
440
|
+
- spec/factories/chouette_group_of_lines.rb
|
441
|
+
- spec/factories/chouette_journey_pattern.rb
|
442
|
+
- spec/factories/chouette_lines.rb
|
443
|
+
- spec/factories/chouette_networks.rb
|
444
|
+
- spec/factories/chouette_routes.rb
|
445
|
+
- spec/factories/chouette_stop_areas.rb
|
446
|
+
- spec/factories/chouette_stop_points.rb
|
447
|
+
- spec/factories/chouette_time_table.rb
|
448
|
+
- spec/factories/chouette_vehicle_journey.rb
|
449
|
+
- spec/factories/chouette_vehicle_journey_at_stop.rb
|
450
|
+
- spec/models/chouette/access_link_spec.rb
|
451
|
+
- spec/models/chouette/access_point_spec.rb
|
452
|
+
- spec/models/chouette/active_record_spec.rb
|
453
|
+
- spec/models/chouette/area_type_spec.rb
|
454
|
+
- spec/models/chouette/company_spec.rb
|
455
|
+
- spec/models/chouette/connection_link_spec.rb
|
456
|
+
- spec/models/chouette/direction_spec.rb
|
457
|
+
- spec/models/chouette/exporter_spec.rb
|
458
|
+
- spec/models/chouette/file_validator_spec.rb
|
459
|
+
- spec/models/chouette/footnote_spec.rb
|
460
|
+
- spec/models/chouette/group_of_line_spec.rb
|
461
|
+
- spec/models/chouette/journey_pattern_spec.rb
|
462
|
+
- spec/models/chouette/line_spec.rb
|
463
|
+
- spec/models/chouette/loader_spec.rb
|
464
|
+
- spec/models/chouette/network_spec.rb
|
465
|
+
- spec/models/chouette/object_id_spec.rb
|
466
|
+
- spec/models/chouette/route_spec.rb
|
467
|
+
- spec/models/chouette/stop_area_spec.rb
|
468
|
+
- spec/models/chouette/stop_point_spec.rb
|
469
|
+
- spec/models/chouette/time_table_period_spec.rb
|
470
|
+
- spec/models/chouette/time_table_spec.rb
|
471
|
+
- spec/models/chouette/transport_mode_spec.rb
|
472
|
+
- spec/models/chouette/trident_active_record_spec.rb
|
473
|
+
- spec/models/chouette/vehicle_journey_at_stop_spec.rb
|
474
|
+
- spec/models/chouette/vehicle_journey_spec.rb
|
475
|
+
- spec/presenters/chouette/geometry/general_presenter.rb
|
476
|
+
- spec/presenters/chouette/geometry/line_presenter_spec.rb
|
477
|
+
- spec/spec_helper.rb
|
395
478
|
homepage: http://github.com/afimb/ninoxe
|
396
479
|
licenses: []
|
397
480
|
metadata: {}
|
@@ -411,8 +494,93 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
411
494
|
version: '0'
|
412
495
|
requirements: []
|
413
496
|
rubyforge_project:
|
414
|
-
rubygems_version: 2.
|
497
|
+
rubygems_version: 2.1.11
|
415
498
|
signing_key:
|
416
499
|
specification_version: 4
|
417
500
|
summary: Library dedicated to Chouette access.
|
418
|
-
test_files:
|
501
|
+
test_files:
|
502
|
+
- spec/dummy/README.rdoc
|
503
|
+
- spec/dummy/Rakefile
|
504
|
+
- spec/dummy/app/assets/images/.keep
|
505
|
+
- spec/dummy/app/assets/javascripts/application.js
|
506
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
507
|
+
- spec/dummy/app/controllers/application_controller.rb
|
508
|
+
- spec/dummy/app/controllers/concerns/.keep
|
509
|
+
- spec/dummy/app/helpers/application_helper.rb
|
510
|
+
- spec/dummy/app/mailers/.keep
|
511
|
+
- spec/dummy/app/models/.keep
|
512
|
+
- spec/dummy/app/models/concerns/.keep
|
513
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
514
|
+
- spec/dummy/bin/bundle
|
515
|
+
- spec/dummy/bin/rails
|
516
|
+
- spec/dummy/bin/rake
|
517
|
+
- spec/dummy/config.ru
|
518
|
+
- spec/dummy/config/application.rb
|
519
|
+
- spec/dummy/config/boot.rb
|
520
|
+
- spec/dummy/config/database.yml
|
521
|
+
- spec/dummy/config/environment.rb
|
522
|
+
- spec/dummy/config/environments/development.rb
|
523
|
+
- spec/dummy/config/environments/production.rb
|
524
|
+
- spec/dummy/config/environments/test.rb
|
525
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
526
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
527
|
+
- spec/dummy/config/initializers/inflections.rb
|
528
|
+
- spec/dummy/config/initializers/mime_types.rb
|
529
|
+
- spec/dummy/config/initializers/secret_token.rb
|
530
|
+
- spec/dummy/config/initializers/session_store.rb
|
531
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
532
|
+
- spec/dummy/config/locales/en.yml
|
533
|
+
- spec/dummy/config/locales/fr.yml
|
534
|
+
- spec/dummy/config/routes.rb
|
535
|
+
- spec/dummy/db/schema.rb
|
536
|
+
- spec/dummy/db/test.sqlite3
|
537
|
+
- spec/dummy/lib/assets/.keep
|
538
|
+
- spec/dummy/log/.keep
|
539
|
+
- spec/dummy/public/404.html
|
540
|
+
- spec/dummy/public/422.html
|
541
|
+
- spec/dummy/public/500.html
|
542
|
+
- spec/dummy/public/favicon.ico
|
543
|
+
- spec/dummy/script/rails
|
544
|
+
- spec/factories/chouette_access_links.rb
|
545
|
+
- spec/factories/chouette_access_points.rb
|
546
|
+
- spec/factories/chouette_companies.rb
|
547
|
+
- spec/factories/chouette_connection_links.rb
|
548
|
+
- spec/factories/chouette_footnotes.rb
|
549
|
+
- spec/factories/chouette_group_of_lines.rb
|
550
|
+
- spec/factories/chouette_journey_pattern.rb
|
551
|
+
- spec/factories/chouette_lines.rb
|
552
|
+
- spec/factories/chouette_networks.rb
|
553
|
+
- spec/factories/chouette_routes.rb
|
554
|
+
- spec/factories/chouette_stop_areas.rb
|
555
|
+
- spec/factories/chouette_stop_points.rb
|
556
|
+
- spec/factories/chouette_time_table.rb
|
557
|
+
- spec/factories/chouette_vehicle_journey.rb
|
558
|
+
- spec/factories/chouette_vehicle_journey_at_stop.rb
|
559
|
+
- spec/models/chouette/access_link_spec.rb
|
560
|
+
- spec/models/chouette/access_point_spec.rb
|
561
|
+
- spec/models/chouette/active_record_spec.rb
|
562
|
+
- spec/models/chouette/area_type_spec.rb
|
563
|
+
- spec/models/chouette/company_spec.rb
|
564
|
+
- spec/models/chouette/connection_link_spec.rb
|
565
|
+
- spec/models/chouette/direction_spec.rb
|
566
|
+
- spec/models/chouette/exporter_spec.rb
|
567
|
+
- spec/models/chouette/file_validator_spec.rb
|
568
|
+
- spec/models/chouette/footnote_spec.rb
|
569
|
+
- spec/models/chouette/group_of_line_spec.rb
|
570
|
+
- spec/models/chouette/journey_pattern_spec.rb
|
571
|
+
- spec/models/chouette/line_spec.rb
|
572
|
+
- spec/models/chouette/loader_spec.rb
|
573
|
+
- spec/models/chouette/network_spec.rb
|
574
|
+
- spec/models/chouette/object_id_spec.rb
|
575
|
+
- spec/models/chouette/route_spec.rb
|
576
|
+
- spec/models/chouette/stop_area_spec.rb
|
577
|
+
- spec/models/chouette/stop_point_spec.rb
|
578
|
+
- spec/models/chouette/time_table_period_spec.rb
|
579
|
+
- spec/models/chouette/time_table_spec.rb
|
580
|
+
- spec/models/chouette/transport_mode_spec.rb
|
581
|
+
- spec/models/chouette/trident_active_record_spec.rb
|
582
|
+
- spec/models/chouette/vehicle_journey_at_stop_spec.rb
|
583
|
+
- spec/models/chouette/vehicle_journey_spec.rb
|
584
|
+
- spec/presenters/chouette/geometry/general_presenter.rb
|
585
|
+
- spec/presenters/chouette/geometry/line_presenter_spec.rb
|
586
|
+
- spec/spec_helper.rb
|
data/config/database.yml.me
DELETED