dav...@IMSOELMPC102912  committed e13028a

moved to netbeans for editing

  • Participants
  • Parent commits 3b39026

Comments (0)

Files changed (9)

File StatusWriter/Rakefile

 require 'rake/gempackagetask'
 require 'rake/rdoctask'
 require 'rake/testtask'
+require "rubygems"
+require "active_record"
+require "yaml"
 spec = do |s| = 'StatusWriter' do |t|
   t.test_files = FileList['test/**/*.rb']
+desc "Migrate the database through scripts in migrations"
+task :migrate => :initdb do
+  ActiveRecord::Migrator.migrate("./migrations", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
+task :initdb do
+  dbconfig = YAML::load( "lib/database.yml" ))
+  ActiveRecord::Base.establish_connection(dbconfig)

File StatusWriter/lib/database.yml

+## YAML Template.
+adapter: sqlite3
+database: projects.db

File StatusWriter/lib/database_connection.rb

 require "rubygems"
 require "active_record"
+require "yaml"
-  :adapter => "sqlite3",
-  :database => "../db/task.db"
+dbconfig = YAML::load( "database.yml"))

File StatusWriter/migrations/001_create_projects.rb

+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+class CreateProjects < ActiveRecord::Migration
+  def self.up
+    create_table :projects do |t|
+      t.string :name
+      t.text :description      
+    end
+  end
+  def self.down
+    drop_table :projects
+  end

File StatusWriter/nbproject/private/.LCKrake-d.txt~


File StatusWriter/nbproject/private/rake-d.txt

-clean=Remove any temporary products.
-clobber=Remove any generated file.
-clobber_package=Remove package products
-clobber_rdoc=Remove rdoc products
-gem=Build the gem file StatusWriter-0.0.1.gem
-package=Build all the packages
-rdoc=Build the rdoc HTML Files
-repackage=Force a rebuild of the package files
-rerdoc=Force a rebuild of the RDOC files
-test=Run tests

File StatusWriter/nbproject/


File StatusWriter/nbproject/project.xml

         <data xmlns="">
+                <root id="src.migrations.dir"/>
                 <root id="src.dir"/>

File StatusWriter/projects.db

Binary file added.