ninoxe 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Njg5Yzg4YjEzOWIyZGUxNjc2MWU5YTEzMWYyOThiZTVjZmFlZjI1Yg==
4
+ MjI5NWI3ODA1YWU1ZDQyNGNlNmE5NGRiOWFlOWJhMTczYjk1MDA1OQ==
5
5
  data.tar.gz: !binary |-
6
- N2YzZmUzM2Y1MzYyNWYwMDI0MWViOGQzODQzNGEyYjY5MzY2NDY0Yg==
6
+ YjM0Nzg2MjNmMDI4YTM3NDJlNjY0ODkxNDAzMmRjMGIzODYzYTM5OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzUzNWM2ZWQwMmE4ODkzODYxZGZjNmE2MzViOGUzY2U4NDFiNTE0ZmQ5MDg5
10
- ODkzZTJmNjY0YjU2MDdhNThiZWUzYzAxNTQ0N2VlN2U2Y2Q4NTI2NmRhZDJj
11
- YjY3MTk5Y2Y4MmQzM2Q0MTJkODUyOTJlMDQzNDVlOGU3ZmJkZTA=
9
+ MjA4M2E1NjkxMDg5Zjk2N2YwYjNlZGY0ZTZjYWU1NDZkNDIyNTQ2YTIyZTQ4
10
+ MTJlOWRmMWM4YTFjNjc4YjUzNTNjZDdjMzQyYjUyYjJhMmNmMWQzN2Y0NDlh
11
+ YzU3ZTM3NjczN2RkYTM4ZTk0YzQyYjExYWUxNTlkNzkyMWNiMzU=
12
12
  data.tar.gz: !binary |-
13
- MDYwZWI4OTZmMDUzNzE0NjRhZjI5OGQ0NzVmZDg4ZjlmMTc2M2Q3ODY5Njk1
14
- MTU3YzQ2OWIwYzZiODczMTUyNzQ2ZTBjNWE3OTIwYjlmYjcwZWE1NTA1ZDk3
15
- ZGMwOTQzNmEwNzY2NTY4MTYxZDFiOGZlZTFlZjVjMjNlMGY2ZDg=
13
+ YWM1MmUwY2IwMmVkYmIxZjM1MGUxMjNkY2U4MWM5NTRhM2Y3ZWYwZjRlMDBm
14
+ NjIzYmNlNjk4N2E1YWEwM2MwZjI5ZDdkYmRkNGY1ZWViNmY1NmY2Y2IzNGEz
15
+ ZGU3ZTYzNTAwMTJlNjZiMjc4ZGM5YWI2YmMxMTQ3MTkxZGJmMzc=
@@ -9,9 +9,12 @@ class Chouette::Company < Chouette::TridentActiveRecord
9
9
 
10
10
  attr_accessible :objectid, :object_version, :creation_time, :creator_id, :name, :short_name
11
11
  attr_accessible :organizational_unit, :operating_department_name, :code, :phone, :fax, :email, :registration_number
12
+ attr_accessible :url, :time_zone
13
+
14
+ validates_format_of :url, :with => %r{\Ahttps?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?\Z}, :allow_nil => true, :allow_blank => true
12
15
 
13
16
  def self.nullable_attributes
14
- [:organizational_unit, :operating_department_name, :code, :phone, :fax, :email]
17
+ [:organizational_unit, :operating_department_name, :code, :phone, :fax, :email, :url, :time_zone]
15
18
  end
16
19
 
17
20
 
@@ -16,6 +16,7 @@ class Chouette::Line < Chouette::TridentActiveRecord
16
16
 
17
17
  has_and_belongs_to_many :group_of_lines, :class_name => 'Chouette::GroupOfLine', :order => 'group_of_lines.name'
18
18
  attr_accessible :group_of_lines, :group_of_line_ids, :group_of_line_tokens
19
+ attr_accessible :url, :color, :text_color
19
20
  attr_reader :group_of_line_tokens
20
21
 
21
22
  validates_presence_of :network
@@ -23,12 +24,15 @@ class Chouette::Line < Chouette::TridentActiveRecord
23
24
 
24
25
  validates_presence_of :registration_number
25
26
  validates_uniqueness_of :registration_number
26
- validates_format_of :registration_number, :with => %r{\A[0-9A-Za-z_-]+\Z}
27
+ validates_format_of :registration_number, :with => %r{\A[\d\w_\-]+\Z}
28
+ validates_format_of :url, :with => %r{\Ahttps?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?\Z}, :allow_nil => true, :allow_blank => true
29
+ validates_format_of :color, :with => %r{\A[0-9a-fA-F]{6}\Z}, :allow_nil => true, :allow_blank => true
30
+ validates_format_of :text_color, :with => %r{\A[0-9a-fA-F]{6}\Z}, :allow_nil => true, :allow_blank => true
27
31
 
28
32
  validates_presence_of :name
29
33
 
30
34
  def self.nullable_attributes
31
- [:published_name, :number, :comment]
35
+ [:published_name, :number, :comment, :url, :color, :text_color]
32
36
  end
33
37
 
34
38
  def geometry_presenter
@@ -23,9 +23,10 @@ class Chouette::StopArea < Chouette::TridentActiveRecord
23
23
  attr_accessible :country_code, :street_name, :zip_code, :city_name
24
24
  attr_accessible :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs
25
25
  attr_accessible :coordinates
26
+ attr_accessible :url, :time_zone
26
27
 
27
28
  validates_uniqueness_of :registration_number, :allow_nil => true, :allow_blank => true
28
- validates_format_of :registration_number, :with => %r{\A[0-9A-Za-z_-]+\Z}, :allow_blank => true
29
+ validates_format_of :registration_number, :with => %r{\A[\d\w_\-]+\Z}, :allow_blank => true
29
30
  validates_presence_of :name
30
31
  validates_presence_of :area_type
31
32
 
@@ -35,9 +36,11 @@ class Chouette::StopArea < Chouette::TridentActiveRecord
35
36
  validates_numericality_of :longitude, :less_than_or_equal_to => 180, :greater_than_or_equal_to => -180, :allow_nil => true
36
37
 
37
38
  validates_format_of :coordinates, :with => %r{\A *-?(0?[0-9](\.[0-9]*)?|[0-8][0-9](\.[0-9]*)?|90(\.[0]*)?) *\, *-?(0?[0-9]?[0-9](\.[0-9]*)?|1[0-7][0-9](\.[0-9]*)?|180(\.[0]*)?) *\Z}, :allow_nil => true, :allow_blank => true
39
+ validates_format_of :url, :with => %r{\Ahttps?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?\Z}, :allow_nil => true, :allow_blank => true
38
40
 
39
41
  def self.nullable_attributes
40
- [:registration_number, :street_name, :country_code, :fare_code, :nearest_topic_name, :comment, :long_lat_type, :zip_code, :city_name]
42
+ [:registration_number, :street_name, :country_code, :fare_code,
43
+ :nearest_topic_name, :comment, :long_lat_type, :zip_code, :city_name, :url, :time_zone]
41
44
  end
42
45
 
43
46
  after_update :clean_invalid_access_links
@@ -0,0 +1,11 @@
1
+ development:
2
+ adapter: postgresql
3
+ database: ninoxe_dev
4
+ username: <%= ENV['USER'] %>
5
+ password: <%= ENV['USER'] %>
6
+
7
+ test:
8
+ adapter: postgresql
9
+ database: ninoxe_test
10
+ username: <%= ENV['USER'] %>
11
+ password: <%= ENV['USER'] %>
@@ -0,0 +1,8 @@
1
+ class AddGtfsFieldsToCompanies < ActiveRecord::Migration
2
+ def change
3
+ change_table :companies do |t|
4
+ t.string :url
5
+ t.string :time_zone
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ class AddGtfsFieldsToStopAreas < ActiveRecord::Migration
2
+ def change
3
+ change_table :stop_areas do |t|
4
+ t.string :url
5
+ t.string :time_zone
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ class AddGtfsFieldsToLines < ActiveRecord::Migration
2
+ def change
3
+ change_table :lines do |t|
4
+ t.string :url
5
+ t.string :color, :limit => 6
6
+ t.string :text_color, :limit => 6
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Ninoxe
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
data/lib/ninoxe.rb~ ADDED
@@ -0,0 +1,7 @@
1
+ require "ninoxe/engine"
2
+
3
+ require "acts_as_list"
4
+ require "composite_primary_keys"
5
+
6
+ module Ninoxe
7
+ end
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.1.0
4
+ version: 1.1.1
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: 2014-11-13 00:00:00.000000000 Z
14
+ date: 2014-11-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: georuby-ext
@@ -325,6 +325,7 @@ files:
325
325
  - app/views/layouts/ninoxe/application.html.erb
326
326
  - config/database.yml
327
327
  - config/database.yml.ci
328
+ - config/database.yml.me
328
329
  - config/database.yml.travis
329
330
  - config/locales/en.yml
330
331
  - config/locales/fr.yml
@@ -374,6 +375,9 @@ files:
374
375
  - db/migrate/20140718141706_add_missing_taggable_index.acts_as_taggable_on_engine.rb
375
376
  - db/migrate/20140820060801_add_zip_code_and_city_name_to_stop_area.rb
376
377
  - db/migrate/20140820060814_add_zip_code_and_city_name_to_access_point.rb
378
+ - db/migrate/20141017075349_add_gtfs_fields_to_companies.rb
379
+ - db/migrate/20141017075515_add_gtfs_fields_to_stop_areas.rb
380
+ - db/migrate/20141017075627_add_gtfs_fields_to_lines.rb
377
381
  - lib/chouette_factories.rb
378
382
  - lib/factories/chouette_access_links.rb
379
383
  - lib/factories/chouette_access_points.rb
@@ -390,6 +394,7 @@ files:
390
394
  - lib/factories/chouette_vehicle_journey.rb
391
395
  - lib/factories/chouette_vehicle_journey_at_stop.rb
392
396
  - lib/ninoxe.rb
397
+ - lib/ninoxe.rb~
393
398
  - lib/ninoxe/engine.rb
394
399
  - lib/ninoxe/version.rb
395
400
  homepage: http://github.com/afimb/ninoxe