Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <web-client> use-activeresource : added dummy-host for Sinatra
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Mon, 24 Aug 2009 15:37:53 +0200
  • Message-id: <E1MoJ2E-00030v-5k@xxxxxxxxxxxxxxxx>
ref: refs/heads/use-activeresource
commit 8d856834589953f1be87485f2d0a856e37aa9554
Author: Stefan Schubert <schubi@xxxxxxx>
Date: Mon Aug 17 15:15:21 2009 +0200

added dummy-host for Sinatra
---
.../db/migrate/20090817130056_insert_dummy_host.rb | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/webclient/db/migrate/20090817130056_insert_dummy_host.rb
b/webclient/db/migrate/20090817130056_insert_dummy_host.rb
new file mode 100644
index 0000000..64d3777
--- /dev/null
+++ b/webclient/db/migrate/20090817130056_insert_dummy_host.rb
@@ -0,0 +1,16 @@
+class InsertDummyHost < ActiveRecord::Migration
+ def self.up
+ Host.create(
+ :url => 'http://localhost:4567',
+ :name => 'dummy-host',
+ :updated_at => Time.now.utc,
+ :description => 'Dummy REST service(host)',
+ :created_at => Time.now.utc
+ ) if ENV['RAILS_ENV'] != 'production'
+ end
+
+ def self.down
+ host = Host.find_by_name('dummy-host')
+ host.destroy if host
+ end
+end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages