Skip to content

Commit

Permalink
Basic gem work
Browse files Browse the repository at this point in the history
  • Loading branch information
barttenbrinke committed Jun 10, 2009
1 parent d385745 commit 81ab1d0
Show file tree
Hide file tree
Showing 9 changed files with 428 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
log/*.log
tmp/**/*
db/*
/log/*.log
/db/*.sqlite3
/pkg
/tmp
3 changes: 3 additions & 0 deletions bin/reception
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
rake db:migrate RAILS_ENV=production
./script/server -e production -d
16 changes: 16 additions & 0 deletions db/migrate/20090423215142_create_sources.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class CreateSources < ActiveRecord::Migration
def self.up
create_table :sources do |t|
t.string :name
t.string :url
t.string :source_type
t.boolean :enabled

t.timestamps
end
end

def self.down
drop_table :sources
end
end
20 changes: 20 additions & 0 deletions db/migrate/20090513212745_create_settings.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class CreateSettings < ActiveRecord::Migration
def self.up
create_table :settings do |t|
t.string :host
t.integer :port
t.string :user
t.string :password
t.string :path
t.integer :session_uplimit
t.integer :session_downlimit
t.float :ratio

t.timestamps
end
end

def self.down
drop_table :settings
end
end
29 changes: 29 additions & 0 deletions db/migrate/20090514221618_create_torrents.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class CreateTorrents < ActiveRecord::Migration
def self.up
create_table :torrents do |t|
t.string :name
t.string :description
t.string :torrent_url
t.string :torrent_data
t.integer :transmission_id
t.integer :transmission_total_size
t.integer :transmission_name
t.integer :transmission_downloaded_size
t.integer :transmission_upload_ratio
t.integer :transmission_status
t.integer :transmission_hash_string
t.string :imdb_url
t.integer :state, :default => 0
t.float :ratio, :default => 1.0
t.integer :uplimit
t.integer :downlimit
t.integer :source_id

t.timestamps
end
end

def self.down
drop_table :torrents
end
end
15 changes: 15 additions & 0 deletions db/migrate/20090516205122_create_filters.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class CreateFilters < ActiveRecord::Migration
def self.up
create_table :filters do |t|
t.integer :source_id
t.string :keyword
t.boolean :positive, :default => true

t.timestamps
end
end

def self.down
drop_table :filters
end
end
66 changes: 66 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
# to create the application database on another system, you should be using db:schema:load, not running
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20090516205122) do

create_table "filters", :force => true do |t|
t.integer "source_id"
t.string "keyword"
t.boolean "positive", :default => true
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "settings", :force => true do |t|
t.string "host"
t.integer "port"
t.string "user"
t.string "password"
t.string "path"
t.integer "session_uplimit"
t.integer "session_downlimit"
t.float "ratio"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "sources", :force => true do |t|
t.string "name"
t.string "url"
t.string "source_type"
t.boolean "enabled"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "torrents", :force => true do |t|
t.string "name"
t.string "description"
t.string "torrent_url"
t.string "torrent_data"
t.integer "transmission_id"
t.integer "transmission_total_size"
t.integer "transmission_name"
t.integer "transmission_downloaded_size"
t.integer "transmission_upload_ratio"
t.integer "transmission_status"
t.integer "transmission_hash_string"
t.string "imdb_url"
t.integer "state", :default => 0
t.float "ratio", :default => 1.0
t.integer "uplimit"
t.integer "downlimit"
t.integer "source_id"
t.datetime "created_at"
t.datetime "updated_at"
end

end
Loading

0 comments on commit 81ab1d0

Please sign in to comment.