trollo 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,6 +38,11 @@ class CreateTrolloTables < ActiveRecord::Migration
38
38
  t.timestamps
39
39
  end
40
40
 
41
+ create_table :trollo_subscriptions do |t|
42
+ t.references :list
43
+ t.references :subscriber, polymorphic: true
44
+ end
45
+
41
46
  add_index :trollo_lists, [:trollable_type, :trollable_id]
42
47
 
43
48
  add_index :trollo_cards, :list_id
data/lib/trollo/list.rb CHANGED
@@ -4,6 +4,7 @@ module Trollo
4
4
  include Troller
5
5
 
6
6
  has_many :cards, order: 'due_at ASC', dependent: :destroy
7
+ has_many :subscriptions, dependent: :destroy
7
8
  attr_accessible :name, :trollable
8
9
  end
9
10
 
@@ -0,0 +1,8 @@
1
+ module Trollo
2
+
3
+ class Subscription < ActiveRecord::Base
4
+ belongs_to :list
5
+ belongs_to :subscriber, polymorphic: true
6
+ end
7
+
8
+ end
@@ -1,3 +1,3 @@
1
1
  module Trollo
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -37,6 +37,11 @@ ActiveRecord::Schema.define do
37
37
  t.timestamps
38
38
  end
39
39
 
40
+ create_table :trollo_subscriptions do |t|
41
+ t.references :list
42
+ t.references :subscriber, polymorphic: true
43
+ end
44
+
40
45
  add_index :trollo_lists, [:trollable_type, :trollable_id]
41
46
 
42
47
  add_index :trollo_cards, :list_id
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ describe Trollo::Task do
4
+
5
+ it "should load" do
6
+ puts 'here'
7
+ end
8
+
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trollo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-26 00:00:00.000000000 Z
12
+ date: 2014-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -126,6 +126,7 @@ files:
126
126
  - lib/trollo.rb
127
127
  - lib/trollo/card.rb
128
128
  - lib/trollo/list.rb
129
+ - lib/trollo/subscription.rb
129
130
  - lib/trollo/task.rb
130
131
  - lib/trollo/tasklist.rb
131
132
  - lib/trollo/troller.rb
@@ -136,6 +137,7 @@ files:
136
137
  - spec/internal/db/schema.rb
137
138
  - spec/internal/log/.gitignore
138
139
  - spec/internal/public/favicon.ico
140
+ - spec/lib/trollo/task_spec.rb
139
141
  - spec/spec_helper.rb
140
142
  - trollo.gemspec
141
143
  homepage: https://github.com/teachme2/trollo
@@ -169,4 +171,5 @@ test_files:
169
171
  - spec/internal/db/schema.rb
170
172
  - spec/internal/log/.gitignore
171
173
  - spec/internal/public/favicon.ico
174
+ - spec/lib/trollo/task_spec.rb
172
175
  - spec/spec_helper.rb