diff options
| -rw-r--r-- | .travis.yml | 6 | ||||
| -rw-r--r-- | config/database.yml.ccontrol | 22 | ||||
| -rw-r--r-- | config/database.yml.travis | 24 | ||||
| -rw-r--r-- | lib/tasks/ci.rake | 8 | 
4 files changed, 23 insertions, 37 deletions
| diff --git a/.travis.yml b/.travis.yml index 4af63e37b..099849065 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@  language: ruby  rvm:    - 1.9.3 +  - 2.1.3    - jruby-1.7.16.1  jdk:    - oraclejdk7 @@ -9,6 +10,9 @@ matrix:    exclude:      - rvm:  1.9.3      - jdk: openjdk7 +  exclude: +    - rvm:  2.1.3 +    - jdk: openjdk7          notifications:    email:              - mflorisson@cityway.fr @@ -21,5 +25,5 @@ before_install:  before_script:    - "bundle exec rake ci:db_travis_config"    - "bundle exec rake db:create" -  - "bundle exec rake apartment:migrate" +  - "bundle exec rake db:migrate"  script: "bundle exec rake spec" diff --git a/config/database.yml.ccontrol b/config/database.yml.ccontrol deleted file mode 100644 index 1936af0e1..000000000 --- a/config/database.yml.ccontrol +++ /dev/null @@ -1,22 +0,0 @@ -development: -  adapter: jdbcpostgresql -  database: chouette2_dev -  encoding: utf8 -  username: chouette -  password: chouette - -test: -  adapter: jdbcpostgresql -  database: <%= (ENV["GIT_BRANCH"].nil? || ENV["GIT_BRANCH"] == "master") ? "chouette_test" : "chouette_" + ENV["GIT_BRANCH"] + "_test" %> -  encoding: utf8 -  username: chouette -  password: chouette - -# When war is created by jenkins -production: -  adapter: jdbcpostgresql -  database: chouette2 -  encoding: utf8 -  host: localhost -  username: chouette -  password: chouette     diff --git a/config/database.yml.travis b/config/database.yml.travis index 40a95e668..c554142f5 100644 --- a/config/database.yml.travis +++ b/config/database.yml.travis @@ -1,11 +1,19 @@ -development: -  adapter: <%= RUBY_PLATFORM == "java" ? "jdbcpostgresql" : "postgresql" %> -  database: <%= (ENV["GIT_BRANCH"].nil? || ENV["GIT_BRANCH"] == "master") ? "chouette_d" : "chouette_" + ENV["GIT_BRANCH"] + "_d" %> -  encoding: utf8 +default: &default +  adapter: postgresql +  encoding: unicode +  pool: 5 +  port: 5432 +  host: localhost +  schema_search_path: "public"    username: postgres +development: +  <<: *default +  database: chouette_dev + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production.  test: -  adapter: <%= RUBY_PLATFORM == "java" ? "jdbcpostgresql" : "postgresql" %> -  database: <%= (ENV["GIT_BRANCH"].nil? || ENV["GIT_BRANCH"] == "master") ? "chouette_test" : "chouette_" + ENV["GIT_BRANCH"] + "_test" %> -  encoding: utf8 -  username: postgres
\ No newline at end of file +  <<: *default +  database: chouette_test
\ No newline at end of file diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake index 8a59f54b9..092a4619f 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci.rake @@ -2,14 +2,10 @@ namespace :ci do    task :db_travis_config do      cp "config/database.yml.travis", "config/database.yml"    end -  task :prepare_travis => ["ci:db_travis_config", "apartment:migrate"] -  task :db_config do -    cp "config/database.yml.ccontrol", "config/database.yml" -  end -  task :prepare => ["ci:db_config", "db:migrate"] +      task :deploy do      cp "chouette2.war", "/var/lib/tomcat6/webapps/" -  end +  end      task :build => [ "war", "ci:deploy"]  end | 
