forked from tenderlove/rubycommitters.org
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca34860
commit 33d79b9
Showing
27 changed files
with
190 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
class Account < ActiveRecord::Base | ||
has_many :names | ||
has_many :nicks | ||
has_many :sites | ||
has_many :services | ||
has_many :portraits | ||
has_many :books | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
class Book < ActiveRecord::Base | ||
belongs_to :account | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
class Name < ActiveRecord::Base | ||
belongs_to :account | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Nick < ActiveRecord::Base | ||
belongs_to :account | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
class Portrait < ActiveRecord::Base | ||
belongs_to :account | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
class Service < ActiveRecord::Base | ||
belongs_to :account | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
class Site < ActiveRecord::Base | ||
belongs_to :account | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ def self.up | |
t.string :url | ||
t.string :feed | ||
t.string :lang | ||
t.references :account | ||
|
||
t.timestamps | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class CreateNicks < ActiveRecord::Migration | ||
def self.up | ||
create_table :nicks do |t| | ||
t.string :value | ||
t.references :account | ||
|
||
t.timestamps | ||
end | ||
end | ||
|
||
def self.down | ||
drop_table :nicks | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# 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 => 20110101002342) do | ||
|
||
create_table "accounts", :force => true do |t| | ||
t.string "username" | ||
t.datetime "created_at" | ||
t.datetime "updated_at" | ||
end | ||
|
||
create_table "books", :force => true do |t| | ||
t.string "key" | ||
t.integer "account_id" | ||
t.datetime "created_at" | ||
t.datetime "updated_at" | ||
end | ||
|
||
create_table "names", :force => true do |t| | ||
t.string "value" | ||
t.integer "account_id" | ||
t.datetime "created_at" | ||
t.datetime "updated_at" | ||
end | ||
|
||
create_table "nicks", :force => true do |t| | ||
t.string "value" | ||
t.integer "account_id" | ||
t.datetime "created_at" | ||
t.datetime "updated_at" | ||
end | ||
|
||
create_table "portraits", :force => true do |t| | ||
t.string "url" | ||
t.integer "account_id" | ||
t.datetime "created_at" | ||
t.datetime "updated_at" | ||
end | ||
|
||
create_table "services", :force => true do |t| | ||
t.string "name" | ||
t.string "key" | ||
t.integer "account_id" | ||
t.datetime "created_at" | ||
t.datetime "updated_at" | ||
end | ||
|
||
create_table "sites", :force => true do |t| | ||
t.string "title" | ||
t.string "url" | ||
t.string "feed" | ||
t.string "lang" | ||
t.integer "account_id" | ||
t.datetime "created_at" | ||
t.datetime "updated_at" | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
matz: | ||
username: matz | ||
|
||
one: | ||
username: MyString | ||
|
||
two: | ||
username: MyString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
|
||
one: | ||
key: MyString | ||
key: '9780596516178' | ||
account: matz | ||
|
||
two: | ||
key: MyString | ||
key: '9780596002145' | ||
account: matz | ||
|
||
three: | ||
key: '9784756132543' | ||
account: matz | ||
|
||
four: | ||
key: '9784274064616' | ||
account: matz | ||
|
||
five: | ||
key: '9784873110233' | ||
account: matz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
matz_kanji: | ||
value: 松本行弘 | ||
account: matz | ||
|
||
one: | ||
value: MyString | ||
type: MyString | ||
matz_hiragana: | ||
value: まつもとゆきひろ | ||
account: matz | ||
|
||
two: | ||
value: MyString | ||
type: MyString | ||
matz_romaji: | ||
value: Yukihiro Matsumoto | ||
account: matz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
matz: | ||
value: Matz | ||
account: matz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
|
||
one: | ||
url: MyString | ||
|
||
two: | ||
url: MyString | ||
matz: | ||
url: 'http://upload.wikimedia.org/wikipedia/commons/7/76/Yukihiro_Matsumoto.JPG' | ||
account: matz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
twitter: | ||
name: twitter | ||
key: yukihiro_matz | ||
account: matz | ||
|
||
one: | ||
name: MyString | ||
type: MyString | ||
key: MyString | ||
friendfeed: | ||
name: friendfeed | ||
key: matz | ||
account: matz | ||
|
||
two: | ||
name: MyString | ||
type: MyString | ||
key: MyString | ||
facebook: | ||
name: facebook | ||
key: 650036336 | ||
account: matz | ||
|
||
mixi: | ||
name: mixi | ||
key: 1653 | ||
account: matz | ||
|
||
github: | ||
name: github | ||
key: matz | ||
account: matz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
|
||
one: | ||
title: MyString | ||
url: MyString | ||
feed: MyString | ||
lang: MyString | ||
|
||
two: | ||
title: MyString | ||
url: MyString | ||
feed: MyString | ||
lang: MyString | ||
matz_nikki: | ||
title: Matzにっき | ||
url: http://www.rubyist.net/~matz/ | ||
feed: http://www.rubyist.net/~matz/comments.rdf | ||
lang: ja | ||
account: matz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,33 @@ | ||
require 'test_helper' | ||
|
||
class AccountTest < ActiveSupport::TestCase | ||
# Replace this with your real tests. | ||
test "the truth" do | ||
assert true | ||
fixtures :accounts, :names, :nicks, :sites | ||
|
||
def setup | ||
@matz = accounts :matz | ||
end | ||
|
||
def test_has_many_names | ||
assert_operator 3, :<=, @matz.names.length | ||
end | ||
|
||
def test_has_many_nicks | ||
assert_operator 1, :<=, @matz.nicks.length | ||
end | ||
|
||
def test_has_many_sites | ||
assert_operator 1, :<=, @matz.sites.length | ||
end | ||
|
||
def test_has_many_services | ||
assert_operator 5, :<=, @matz.services.length | ||
end | ||
|
||
def test_has_many_portraits | ||
assert_operator 1, :<=, @matz.portraits.length | ||
end | ||
|
||
def test_has_many_books | ||
assert_operator 5, :<=, @matz.books.length | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.