aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorLuc Donnet2012-02-20 22:44:44 +0100
committerLuc Donnet2012-02-20 22:44:44 +0100
commitda3e849d4d89ffa3de2d370a30d3d5531b50ea5b (patch)
tree26d0e12a135753d0acf4a59a7007006aac5e759a /config
parenta0823f387ddea69b0f207ba35165fcfd13b169d3 (diff)
downloadchouette-core-da3e849d4d89ffa3de2d370a30d3d5531b50ea5b.tar.bz2
Add requests spec, Fix view
Diffstat (limited to 'config')
-rw-r--r--config/database.yml8
-rw-r--r--config/initializers/ninoxe.rb54
-rw-r--r--config/locales/companies.yml46
-rw-r--r--config/locales/lines.yml8
-rw-r--r--config/locales/networks.yml4
-rw-r--r--config/locales/referentials.yml4
-rw-r--r--config/warble.rb142
7 files changed, 230 insertions, 36 deletions
diff --git a/config/database.yml b/config/database.yml
index c3bfe0abf..a3e357d3a 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -7,6 +7,7 @@
development:
adapter: jdbcpostgresql
database: chouette_dev
+ encoding: utf8
username: chouette
password: chouette
@@ -16,11 +17,14 @@ development:
test:
adapter: jdbcpostgresql
database: chouette_test
+ encoding: utf8
username: chouette
password: chouette
production:
adapter: jdbcpostgresql
- database: chouette_prod
+ database: chouette2
+ encoding: utf8
+ host: localhost
username: chouette
- password: chouette
+ password: chouette
diff --git a/config/initializers/ninoxe.rb b/config/initializers/ninoxe.rb
index 5e168d549..9a4c2d7ec 100644
--- a/config/initializers/ninoxe.rb
+++ b/config/initializers/ninoxe.rb
@@ -1,32 +1,32 @@
-# class Chouette::Line
-# def self.model_name
-# name = "Line"
-# def name.name
-# self
-# end
-# ActiveModel::Name.new name
-# end
+class Chouette::Line
+ def self.model_name
+ name = "Line"
+ def name.name
+ self
+ end
+ ActiveModel::Name.new name
+ end
-# end
+end
-# class Chouette::Network
-# def self.model_name
-# name = "Network"
-# def name.name
-# self
-# end
-# ActiveModel::Name.new name
-# end
+class Chouette::Network
+ def self.model_name
+ name = "Network"
+ def name.name
+ self
+ end
+ ActiveModel::Name.new name
+ end
-# end
+end
-# class Chouette::Company
-# def self.model_name
-# name = "Company"
-# def name.name
-# self
-# end
-# ActiveModel::Name.new name
-# end
+class Chouette::Company
+ def self.model_name
+ name = "Company"
+ def name.name
+ self
+ end
+ ActiveModel::Name.new name
+ end
-# end
+end
diff --git a/config/locales/companies.yml b/config/locales/companies.yml
new file mode 100644
index 000000000..43f104418
--- /dev/null
+++ b/config/locales/companies.yml
@@ -0,0 +1,46 @@
+en:
+ companys:
+ actions:
+ new: Add a new company
+ edit: Edit this company
+ destroy: Remove this company
+ destroy_confirm: "Are you sure you want destroy this company?"
+ new:
+ title: "Add a new company"
+ edit:
+ title: "Update company"
+ show:
+ title: "Company"
+ index:
+ title: "Companies"
+
+fr:
+ companies:
+ actions:
+ new: Ajouter une compagnie
+ edit: Modifier cette compagnie
+ destroy: Supprimer cette compagnie
+ destroy_confirm: "Etes vous sûr de détruire cette compagnie ?"
+ new:
+ title: Ajouter une compagnie
+ edit:
+ title: Modifier la compagnie %{company}
+ show:
+ title: Compagnie %{company}
+ index:
+ title: Compagnies
+ activerecord:
+ models:
+ company: Compagnies
+ attributes:
+ company:
+ registration_number: Identifiant
+ name: Nom
+ short_name: Nom court
+ organizational_unit: Service
+ operating_department_name: Nom du département
+ code: Code
+ phone: Téléphone
+ fax: Fax
+ email: Adresse mail
+
diff --git a/config/locales/lines.yml b/config/locales/lines.yml
index a958858de..f2099eccf 100644
--- a/config/locales/lines.yml
+++ b/config/locales/lines.yml
@@ -20,11 +20,13 @@ fr:
destroy: Supprimer cette ligne
destroy_confirm: "Etes vous sûr de détruire cette ligne ?"
new:
- title: "Ajouter une ligne"
+ title: Ajouter une ligne
edit:
- title: "Modifier la ligne"
+ title: Modifier la ligne %{line}
show:
- title: "Ligne"
+ title: Ligne %{line}
+ index:
+ title: Lignes
activerecord:
models:
line: Lignes
diff --git a/config/locales/networks.yml b/config/locales/networks.yml
index 8878bc4c2..e03fdfe5b 100644
--- a/config/locales/networks.yml
+++ b/config/locales/networks.yml
@@ -24,9 +24,9 @@ fr:
new:
title: "Ajouter un réseau"
edit:
- title: "Modifier le réseau"
+ title: Modifier le réseau %{network}
show:
- title: "Réseau"
+ title: Réseau %{network}
index:
title: "Réseaux"
activerecord:
diff --git a/config/locales/referentials.yml b/config/locales/referentials.yml
index 624dba689..9a6c0900f 100644
--- a/config/locales/referentials.yml
+++ b/config/locales/referentials.yml
@@ -5,10 +5,10 @@ fr:
show:
title: Référentiel
new:
- title: Créer une nouveau référentiel
+ title: Créer un nouveau référentiel
submit: "Créer un référentiel"
actions:
- new: Ajouter une référentiel
+ new: Ajouter un référentiel
destroy_confirm: "Etes vous sûr de vouloir supprimer le référentiel ?"
destroy: Supprimer
edit: Modifier
diff --git a/config/warble.rb b/config/warble.rb
new file mode 100644
index 000000000..d007d2f39
--- /dev/null
+++ b/config/warble.rb
@@ -0,0 +1,142 @@
+# Disable Rake-environment-task framework detection by uncommenting/setting to false
+# Warbler.framework_detection = false
+
+# Warbler web application assembly configuration file
+Warbler::Config.new do |config|
+ # Features: additional options controlling how the jar is built.
+ # Currently the following features are supported:
+ # - gemjar: package the gem repository in a jar file in WEB-INF/lib
+ # - executable: embed a web server and make the war executable
+ # - compiled: compile .rb files to .class files
+ # config.features = %w(gemjar)
+
+ # Application directories to be included in the webapp.
+ config.dirs = %w(app config lib log vendor tmp)
+
+ # Additional files/directories to include, above those in config.dirs
+ config.includes = FileList["db"]
+
+ # Additional files/directories to exclude
+ # config.excludes = FileList["lib/tasks/*"]
+
+ # Additional Java .jar files to include. Note that if .jar files are placed
+ # in lib (and not otherwise excluded) then they need not be mentioned here.
+ # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
+ # own versions if you directly set the value
+ # config.java_libs += FileList["lib/java/*.jar"]
+
+ # Loose Java classes and miscellaneous files to be included.
+ # config.java_classes = FileList["target/classes/**.*"]
+
+ # One or more pathmaps defining how the java classes should be copied into
+ # the archive. The example pathmap below accompanies the java_classes
+ # configuration above. See http://rake.rubyforge.org/classes/String.html#M000017
+ # for details of how to specify a pathmap.
+ # config.pathmaps.java_classes << "%{target/classes/,}p"
+
+ # Bundler support is built-in. If Warbler finds a Gemfile in the
+ # project directory, it will be used to collect the gems to bundle
+ # in your application. If you wish to explicitly disable this
+ # functionality, uncomment here.
+ # config.bundler = false
+
+ # An array of Bundler groups to avoid including in the war file.
+ # Defaults to ["development", "test"].
+ # config.bundle_without = []
+
+ # Other gems to be included. If you don't use Bundler or a gemspec
+ # file, you need to tell Warbler which gems your application needs
+ # so that they can be packaged in the archive.
+ # For Rails applications, the Rails gems are included by default
+ # unless the vendor/rails directory is present.
+ # config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl"]
+ # config.gems << "tzinfo"
+
+ # Uncomment this if you don't want to package rails gem.
+ #config.gems -= ["rails"]
+
+ # The most recent versions of gems are used.
+ # You can specify versions of gems by using a hash assignment:
+ # config.gems["rails"] = "2.3.10"
+
+ # You can also use regexps or Gem::Dependency objects for flexibility or
+ # finer-grained control.
+ # config.gems << /^merb-/
+ # config.gems << Gem::Dependency.new("merb-core", "= 0.9.3")
+
+ # Include gem dependencies not mentioned specifically. Default is
+ # true, uncomment to turn off.
+ # config.gem_dependencies = false
+
+ # Array of regular expressions matching relative paths in gems to be
+ # excluded from the war. Defaults to empty, but you can set it like
+ # below, which excludes test files.
+ # config.gem_excludes = [/^(test|spec)\//]
+
+ # Pathmaps for controlling how application files are copied into the archive
+ # config.pathmaps.application = ["WEB-INF/%p"]
+
+ # Name of the archive (without the extension). Defaults to the basename
+ # of the project directory.
+ # config.jar_name = "mywar"
+
+ # Name of the MANIFEST.MF template for the war file. Defaults to a simple
+ # MANIFEST.MF that contains the version of Warbler used to create the war file.
+ # config.manifest_file = "config/MANIFEST.MF"
+
+ # When using the 'compiled' feature and specified, only these Ruby
+ # files will be compiled. Default is to compile all \.rb files in
+ # the application.
+ # config.compiled_ruby_files = FileList['app/**/*.rb']
+
+ # === War files only below here ===
+
+ # Path to the pre-bundled gem directory inside the war file. Default
+ # is 'WEB-INF/gems'. Specify path if gems are already bundled
+ # before running Warbler. This also sets 'gem.path' inside web.xml.
+ # config.gem_path = "WEB-INF/vendor/bundler_gems"
+
+ # Files for WEB-INF directory (next to web.xml). This contains
+ # web.xml by default. If there is an .erb-File it will be processed
+ # with webxml-config. You may want to exclude this file via
+ # config.excludes.
+ # config.webinf_files += FileList["jboss-web.xml"]
+
+ # Files to be included in the root of the webapp. Note that files in public
+ # will have the leading 'public/' part of the path stripped during staging.
+ # config.public_html = FileList["public/**/*", "doc/**/*"]
+
+ # Pathmaps for controlling how public HTML files are copied into the .war
+ # config.pathmaps.public_html = ["%{public/,}p"]
+
+ # Value of RAILS_ENV for the webapp -- default as shown below
+ # config.webxml.rails.env = ENV['RAILS_ENV'] || 'production'
+
+ # Application booter to use, one of :rack, :rails, or :merb (autodetected by default)
+ # config.webxml.booter = :rails
+
+ # Set JRuby to run in 1.9 mode.
+ # config.webxml.jruby.compat.version = "1.9"
+
+ # When using the :rack booter, "Rackup" script to use.
+ # - For 'rackup.path', the value points to the location of the rackup
+ # script in the web archive file. You need to make sure this file
+ # gets included in the war, possibly by adding it to config.includes
+ # or config.webinf_files above.
+ # - For 'rackup', the rackup script you provide as an inline string
+ # is simply embedded in web.xml.
+ # The script is evaluated in a Rack::Builder to load the application.
+ # Examples:
+ # config.webxml.rackup.path = 'WEB-INF/hello.ru'
+ # config.webxml.rackup = %{require './lib/demo'; run Rack::Adapter::Camping.new(Demo)}
+ # config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru"))
+
+ # Control the pool of Rails runtimes. Leaving unspecified means
+ # the pool will grow as needed to service requests. It is recommended
+ # that you fix these values when running a production server!
+ # config.webxml.jruby.min.runtimes = 2
+ # config.webxml.jruby.max.runtimes = 4
+
+ # JNDI data source name
+ # config.webxml.jndi = 'jdbc/rails'
+end