pork_sandwich 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
data/lib/pork_sandwich.rb CHANGED
@@ -7,20 +7,9 @@ require "#{File.dirname(__FILE__)}/pork_sandwich/auth"
7
7
  require "#{File.dirname(__FILE__)}/pork_sandwich/log"
8
8
  require "#{File.dirname(__FILE__)}/pork_sandwich/search"
9
9
 
10
- require "#{File.dirname(__FILE__)}/pork_sandwich/table_classes/reaction"
11
- require "#{File.dirname(__FILE__)}/pork_sandwich/table_classes/trend"
12
- require "#{File.dirname(__FILE__)}/pork_sandwich/table_classes/tweet"
13
- require "#{File.dirname(__FILE__)}/pork_sandwich/table_classes/tweet_reaction"
14
- require "#{File.dirname(__FILE__)}/pork_sandwich/table_classes/twitter_account"
15
- require "#{File.dirname(__FILE__)}/pork_sandwich/table_classes/twitter_relationship"
16
10
 
17
11
  module Pork
18
- require 'twitter'
19
12
  #Object.send :undef_method, :id
20
-
21
-
22
- ActiveRecord::Base.send :include, ActiveRecord::Acts::TaggableOn
23
- ActiveRecord::Base.send :include, ActiveRecord::Acts::Tagger
24
13
 
25
14
  end
26
15
 
data/test/schema.rb CHANGED
@@ -114,7 +114,70 @@ ActiveRecord::Schema.define(:version => 0) do
114
114
  t.boolean :current
115
115
  t.timestamps
116
116
  end
117
+ end
118
+
119
+ class Reaction < ActiveRecord::Base
120
+ has_many :tweet_reactions
121
+ end
117
122
 
123
+ class TwitterRelationship < ActiveRecord::Base
124
+ acts_as_taggable_on :tags, :relationships
118
125
 
126
+ belongs_to :friend, :class_name => "TwitterAccount"
127
+ belongs_to :follower, :class_name => "TwitterAccount"
119
128
  end
120
129
 
130
+
131
+ class TwitterAccount < ActiveRecord::Base
132
+ acts_as_taggable_on :tags
133
+ has_many :tweets
134
+ has_and_belongs_to_many :trends
135
+
136
+
137
+ has_many :tweet_reactions
138
+
139
+ has_many :initiations, :foreign_key => 'initiator_id',
140
+ :class_name => 'TweetReaction',
141
+ :dependent => :destroy
142
+ has_many :initiators, :through => :initiations
143
+
144
+ has_many :responses, :foreign_key => 'responder_id',
145
+ :class_name => 'TweetReaction',
146
+ :dependent => :destroy
147
+ has_many :responders, :through => :responses
148
+
149
+ has_many :friendships, :foreign_key => 'friend_id',
150
+ :class_name => 'TwitterRelationship',
151
+ :dependent => :destroy
152
+ has_many :friends, :through => :followerships
153
+
154
+ has_many :followerships, :foreign_key => 'follower_id',
155
+ :class_name => 'TwitterRelationship',
156
+ :dependent => :destroy
157
+ has_many :followers, :through => :friendships
158
+
159
+ end
160
+
161
+ class TweetReaction < ActiveRecord::Base
162
+ acts_as_taggable_on :tags
163
+
164
+ belongs_to :tweet
165
+ belongs_to :initiator, :class_name => "TwitterAccount"
166
+ belongs_to :responder, :class_name => "TwitterAccount"
167
+ belongs_to :reaction
168
+ end
169
+
170
+ class Tweet < ActiveRecord::Base
171
+ acts_as_taggable_on :tags
172
+ belongs_to :twitter_account
173
+ has_and_belongs_to_many :trends
174
+
175
+ has_many :tweet_reactions
176
+
177
+ end
178
+
179
+ class Trend < ActiveRecord::Base
180
+ acts_as_taggable_on :tags
181
+ has_and_belongs_to_many :tweets
182
+ has_and_belongs_to_many :twitter_accounts
183
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pork_sandwich
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Gilbert
@@ -56,12 +56,6 @@ files:
56
56
  - lib/pork_sandwich/reaction_processor.rb
57
57
  - lib/pork_sandwich/saver.rb
58
58
  - lib/pork_sandwich/search.rb
59
- - lib/pork_sandwich/table_classes/reaction.rb
60
- - lib/pork_sandwich/table_classes/trend.rb
61
- - lib/pork_sandwich/table_classes/tweet.rb
62
- - lib/pork_sandwich/table_classes/tweet_reaction.rb
63
- - lib/pork_sandwich/table_classes/twitter_account.rb
64
- - lib/pork_sandwich/table_classes/twitter_relationship.rb
65
59
  - lib/pork_sandwich/twitter_user.rb
66
60
  has_rdoc: true
67
61
  homepage: http://github.com/sam1vp/pork_sandwich
@@ -1,3 +0,0 @@
1
- class Reaction < ActiveRecord::Base
2
- has_many :tweet_reactions
3
- end
@@ -1,5 +0,0 @@
1
- class Trend < ActiveRecord::Base
2
- acts_as_taggable_on :tags
3
- has_and_belongs_to_many :tweets
4
- has_and_belongs_to_many :twitter_accounts
5
- end
@@ -1,8 +0,0 @@
1
- class Tweet < ActiveRecord::Base
2
- acts_as_taggable_on :tags
3
- belongs_to :twitter_account
4
- has_and_belongs_to_many :trends
5
-
6
- has_many :tweet_reactions
7
-
8
- end
@@ -1,8 +0,0 @@
1
- class TweetReaction < ActiveRecord::Base
2
- acts_as_taggable_on :tags
3
-
4
- belongs_to :tweet
5
- belongs_to :initiator, :class_name => "TwitterAccount"
6
- belongs_to :responder, :class_name => "TwitterAccount"
7
- belongs_to :reaction
8
- end
@@ -1,29 +0,0 @@
1
- class TwitterAccount < ActiveRecord::Base
2
- acts_as_taggable_on :tags
3
- has_many :tweets
4
- has_and_belongs_to_many :trends
5
-
6
-
7
- has_many :tweet_reactions
8
-
9
- has_many :initiations, :foreign_key => 'initiator_id',
10
- :class_name => 'TweetReaction',
11
- :dependent => :destroy
12
- has_many :initiators, :through => :initiations
13
-
14
- has_many :responses, :foreign_key => 'responder_id',
15
- :class_name => 'TweetReaction',
16
- :dependent => :destroy
17
- has_many :responders, :through => :responses
18
-
19
- has_many :friendships, :foreign_key => 'friend_id',
20
- :class_name => 'TwitterRelationship',
21
- :dependent => :destroy
22
- has_many :friends, :through => :followerships
23
-
24
- has_many :followerships, :foreign_key => 'follower_id',
25
- :class_name => 'TwitterRelationship',
26
- :dependent => :destroy
27
- has_many :followers, :through => :friendships
28
-
29
- end
@@ -1,6 +0,0 @@
1
- class TwitterRelationship < ActiveRecord::Base
2
- acts_as_taggable_on :tags, :relationships
3
-
4
- belongs_to :friend, :class_name => "TwitterAccount"
5
- belongs_to :follower, :class_name => "TwitterAccount"
6
- end