aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/decorators/chouette/company_decorator.rb (renamed from app/decorators/company_decorator.rb)2
-rw-r--r--app/decorators/chouette/line_decorator.rb (renamed from app/decorators/line_decorator.rb)2
-rw-r--r--app/decorators/chouette/network_decorator.rb (renamed from app/decorators/network_decorator.rb)2
-rw-r--r--app/decorators/chouette/route_decorator.rb (renamed from app/decorators/route_decorator.rb)2
-rw-r--r--app/decorators/chouette/routing_constraint_zone_decorator.rb (renamed from app/decorators/routing_constraint_zone_decorator.rb)2
-rw-r--r--app/decorators/chouette/stop_area_decorator.rb (renamed from app/decorators/stop_area_decorator.rb)2
-rw-r--r--app/decorators/chouette/stop_point_decorator.rb (renamed from app/decorators/stop_point_decorator.rb)2
-rw-r--r--app/decorators/chouette/time_table_decorator.rb (renamed from app/decorators/time_table_decorator.rb)2
-rw-r--r--app/policies/chouette/access_link_policy.rb (renamed from app/policies/access_link_policy.rb)2
-rw-r--r--app/policies/chouette/access_point_policy.rb (renamed from app/policies/access_point_policy.rb)2
-rw-r--r--app/policies/chouette/company_policy.rb (renamed from app/policies/company_policy.rb)2
-rw-r--r--app/policies/chouette/connection_link_policy.rb (renamed from app/policies/connection_link_policy.rb)2
-rw-r--r--app/policies/chouette/group_of_line_policy.rb (renamed from app/policies/group_of_line_policy.rb)2
-rw-r--r--app/policies/chouette/journey_pattern_policy.rb (renamed from app/policies/journey_pattern_policy.rb)2
-rw-r--r--app/policies/chouette/line_policy.rb (renamed from app/policies/line_policy.rb)2
-rw-r--r--app/policies/chouette/network_policy.rb (renamed from app/policies/network_policy.rb)2
-rw-r--r--app/policies/chouette/route_policy.rb (renamed from app/policies/route_policy.rb)4
-rw-r--r--app/policies/chouette/routing_constraint_zone_policy.rb (renamed from app/policies/routing_constraint_zone_policy.rb)2
-rw-r--r--app/policies/chouette/stop_area_policy.rb (renamed from app/policies/stop_area_policy.rb)2
-rw-r--r--app/policies/chouette/time_table_policy.rb (renamed from app/policies/time_table_policy.rb)2
-rw-r--r--app/policies/chouette/vehicle_journey_policy.rb (renamed from app/policies/vehicle_journey_policy.rb)2
-rw-r--r--spec/factories/chouette_lines.rb5
22 files changed, 26 insertions, 23 deletions
diff --git a/app/decorators/company_decorator.rb b/app/decorators/chouette/company_decorator.rb
index 764cce3a0..adf1e856f 100644
--- a/app/decorators/company_decorator.rb
+++ b/app/decorators/chouette/company_decorator.rb
@@ -1,4 +1,4 @@
-class CompanyDecorator < Draper::Decorator
+class Chouette::CompanyDecorator < Draper::Decorator
decorates Chouette::Company
delegate_all
diff --git a/app/decorators/line_decorator.rb b/app/decorators/chouette/line_decorator.rb
index f351103b2..02caaed56 100644
--- a/app/decorators/line_decorator.rb
+++ b/app/decorators/chouette/line_decorator.rb
@@ -1,4 +1,4 @@
-class LineDecorator < Draper::Decorator
+class Chouette::LineDecorator < Draper::Decorator
decorates Chouette::Line
delegate_all
diff --git a/app/decorators/network_decorator.rb b/app/decorators/chouette/network_decorator.rb
index 1f62fe512..b674d3f27 100644
--- a/app/decorators/network_decorator.rb
+++ b/app/decorators/chouette/network_decorator.rb
@@ -1,4 +1,4 @@
-class NetworkDecorator < Draper::Decorator
+class Chouette::NetworkDecorator < Draper::Decorator
decorates Chouette::Network
delegate_all
diff --git a/app/decorators/route_decorator.rb b/app/decorators/chouette/route_decorator.rb
index 510c941a3..b03b03607 100644
--- a/app/decorators/route_decorator.rb
+++ b/app/decorators/chouette/route_decorator.rb
@@ -1,4 +1,4 @@
-class RouteDecorator < Draper::Decorator
+class Chouette::RouteDecorator < Draper::Decorator
decorates Chouette::Route
delegate_all
diff --git a/app/decorators/routing_constraint_zone_decorator.rb b/app/decorators/chouette/routing_constraint_zone_decorator.rb
index 0b438a554..83f3411b2 100644
--- a/app/decorators/routing_constraint_zone_decorator.rb
+++ b/app/decorators/chouette/routing_constraint_zone_decorator.rb
@@ -1,4 +1,4 @@
-class RoutingConstraintZoneDecorator < Draper::Decorator
+class Chouette::RoutingConstraintZoneDecorator < Draper::Decorator
decorates Chouette::RoutingConstraintZone
delegate_all
diff --git a/app/decorators/stop_area_decorator.rb b/app/decorators/chouette/stop_area_decorator.rb
index 4e777292d..132b6320a 100644
--- a/app/decorators/stop_area_decorator.rb
+++ b/app/decorators/chouette/stop_area_decorator.rb
@@ -1,4 +1,4 @@
-class StopAreaDecorator < Draper::Decorator
+class Chouette::StopAreaDecorator < Draper::Decorator
decorates Chouette::StopArea
delegate_all
diff --git a/app/decorators/stop_point_decorator.rb b/app/decorators/chouette/stop_point_decorator.rb
index 196d6d490..9e540ff50 100644
--- a/app/decorators/stop_point_decorator.rb
+++ b/app/decorators/chouette/stop_point_decorator.rb
@@ -1,4 +1,4 @@
-class StopPointDecorator < StopAreaDecorator
+class Chouette::StopPointDecorator < StopAreaDecorator
decorates Chouette::StopPoint
delegate_all
diff --git a/app/decorators/time_table_decorator.rb b/app/decorators/chouette/time_table_decorator.rb
index c6eeac176..419a0942e 100644
--- a/app/decorators/time_table_decorator.rb
+++ b/app/decorators/chouette/time_table_decorator.rb
@@ -1,4 +1,4 @@
-class TimeTableDecorator < Draper::Decorator
+class Chouette::TimeTableDecorator < Draper::Decorator
decorates Chouette::TimeTable
delegate_all
diff --git a/app/policies/access_link_policy.rb b/app/policies/chouette/access_link_policy.rb
index 1f1147f60..bee7984c0 100644
--- a/app/policies/access_link_policy.rb
+++ b/app/policies/chouette/access_link_policy.rb
@@ -1,4 +1,4 @@
-class AccessLinkPolicy < ApplicationPolicy
+class Chouette::AccessLinkPolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
diff --git a/app/policies/access_point_policy.rb b/app/policies/chouette/access_point_policy.rb
index 41436e77c..6a570c812 100644
--- a/app/policies/access_point_policy.rb
+++ b/app/policies/chouette/access_point_policy.rb
@@ -1,4 +1,4 @@
-class AccessPointPolicy < ApplicationPolicy
+class Chouette::AccessPointPolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
diff --git a/app/policies/company_policy.rb b/app/policies/chouette/company_policy.rb
index 6106798be..8fa22b5df 100644
--- a/app/policies/company_policy.rb
+++ b/app/policies/chouette/company_policy.rb
@@ -1,4 +1,4 @@
-class CompanyPolicy < ApplicationPolicy
+class Chouette::CompanyPolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
diff --git a/app/policies/connection_link_policy.rb b/app/policies/chouette/connection_link_policy.rb
index 240c2a804..65c4101f0 100644
--- a/app/policies/connection_link_policy.rb
+++ b/app/policies/chouette/connection_link_policy.rb
@@ -1,4 +1,4 @@
-class ConnectionLinkPolicy < ApplicationPolicy
+class Chouette::ConnectionLinkPolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
diff --git a/app/policies/group_of_line_policy.rb b/app/policies/chouette/group_of_line_policy.rb
index 03e94449d..9b4fbb4d8 100644
--- a/app/policies/group_of_line_policy.rb
+++ b/app/policies/chouette/group_of_line_policy.rb
@@ -1,4 +1,4 @@
-class GroupOfLinePolicy < ApplicationPolicy
+class Chouette::GroupOfLinePolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
diff --git a/app/policies/journey_pattern_policy.rb b/app/policies/chouette/journey_pattern_policy.rb
index 507a364b6..2fb1c9fd4 100644
--- a/app/policies/journey_pattern_policy.rb
+++ b/app/policies/chouette/journey_pattern_policy.rb
@@ -1,4 +1,4 @@
-class JourneyPatternPolicy < ApplicationPolicy
+class Chouette::JourneyPatternPolicy < ApplicationPolicy
class Scope < Scope
def resolve
diff --git a/app/policies/line_policy.rb b/app/policies/chouette/line_policy.rb
index acb0d79e7..d07ad775c 100644
--- a/app/policies/line_policy.rb
+++ b/app/policies/chouette/line_policy.rb
@@ -1,4 +1,4 @@
-class LinePolicy < ApplicationPolicy
+class Chouette::LinePolicy < ApplicationPolicy
class Scope < Scope
def resolve
diff --git a/app/policies/network_policy.rb b/app/policies/chouette/network_policy.rb
index 9f86451a5..faea4bb79 100644
--- a/app/policies/network_policy.rb
+++ b/app/policies/chouette/network_policy.rb
@@ -1,4 +1,4 @@
-class NetworkPolicy < ApplicationPolicy
+class Chouette::NetworkPolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
diff --git a/app/policies/route_policy.rb b/app/policies/chouette/route_policy.rb
index 7e9fe251a..5f467d98f 100644
--- a/app/policies/route_policy.rb
+++ b/app/policies/chouette/route_policy.rb
@@ -1,4 +1,4 @@
-class RoutePolicy < ApplicationPolicy
+class Chouette::RoutePolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
@@ -20,4 +20,4 @@ class RoutePolicy < ApplicationPolicy
def duplicate?
create?
end
-end
+end \ No newline at end of file
diff --git a/app/policies/routing_constraint_zone_policy.rb b/app/policies/chouette/routing_constraint_zone_policy.rb
index 3cfcf46ff..955ae21e6 100644
--- a/app/policies/routing_constraint_zone_policy.rb
+++ b/app/policies/chouette/routing_constraint_zone_policy.rb
@@ -1,4 +1,4 @@
-class RoutingConstraintZonePolicy < ApplicationPolicy
+class Chouette::RoutingConstraintZonePolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
diff --git a/app/policies/stop_area_policy.rb b/app/policies/chouette/stop_area_policy.rb
index de8ecda8d..75cbf15a3 100644
--- a/app/policies/stop_area_policy.rb
+++ b/app/policies/chouette/stop_area_policy.rb
@@ -1,4 +1,4 @@
-class StopAreaPolicy < ApplicationPolicy
+class Chouette::StopAreaPolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
diff --git a/app/policies/time_table_policy.rb b/app/policies/chouette/time_table_policy.rb
index 92d3aef3e..2eb21ddf1 100644
--- a/app/policies/time_table_policy.rb
+++ b/app/policies/chouette/time_table_policy.rb
@@ -1,4 +1,4 @@
-class TimeTablePolicy < ApplicationPolicy
+class Chouette::TimeTablePolicy < ApplicationPolicy
class Scope < Scope
def resolve
diff --git a/app/policies/vehicle_journey_policy.rb b/app/policies/chouette/vehicle_journey_policy.rb
index 24040455f..646b0c07d 100644
--- a/app/policies/vehicle_journey_policy.rb
+++ b/app/policies/chouette/vehicle_journey_policy.rb
@@ -1,4 +1,4 @@
-class VehicleJourneyPolicy < ApplicationPolicy
+class Chouette::VehicleJourneyPolicy < ApplicationPolicy
class Scope < Scope
def resolve
scope
diff --git a/spec/factories/chouette_lines.rb b/spec/factories/chouette_lines.rb
index fb15e12de..f6542bf82 100644
--- a/spec/factories/chouette_lines.rb
+++ b/spec/factories/chouette_lines.rb
@@ -8,7 +8,10 @@ FactoryGirl.define do
association :network, :factory => :network
association :company, :factory => :company
- association :line_referential, :factory => :line_referential
+
+ before(:create) do |line|
+ line.line_referential ||= LineReferential.find_by! name: "first"
+ end
sequence(:registration_number) { |n| "test-#{n}" }