pork_sandwich 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ task :environment => :connect do
24
24
  ActiveRecord::Base.send :include, ActiveRecord::Acts::TaggableOn
25
25
  ActiveRecord::Base.send :include, ActiveRecord::Acts::Tagger
26
26
 
27
- require 'lib/pork'
27
+ require 'lib/pork_sandwich'
28
28
  end
29
29
 
30
30
  task :connect do
@@ -69,7 +69,7 @@ begin
69
69
  gemspec.authors = ["Sam Gilbert", "Evan Burchard"]
70
70
  gemspec.add_dependency('acts-as-taggable-on', '>= 1.0.12')
71
71
  gemspec.add_dependency('twitter', '>= 0.7.9')
72
- gemspec.files = FileList['lib/pork/*.rb', 'lib/pork.rb', 'lib/table_classes/*.rb', 'generators/pork_sandwich_migration/*.rb', 'generators/pork_sandwich_migration/templates/*.rb', 'Rakefile', 'README', 'VERSION' ]
72
+ gemspec.files = FileList['lib/pork_sandwich/*.rb', 'lib/pork_sandwich.rb', 'lib/pork_sandwich/table_classes/*.rb', 'generators/pork_sandwich_migration/*.rb', 'generators/pork_sandwich_migration/templates/*.rb', 'Rakefile', 'README', 'VERSION' ]
73
73
  gemspec.test_files = ['test/*.rb']
74
74
  end
75
75
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -1,11 +1,11 @@
1
- require "#{File.dirname(__FILE__)}/pork/twitter_user"
2
- require "#{File.dirname(__FILE__)}/pork/puller"
3
- require "#{File.dirname(__FILE__)}/pork/crawler"
4
- require "#{File.dirname(__FILE__)}/pork/saver"
5
- require "#{File.dirname(__FILE__)}/pork/reaction_processor"
6
- require "#{File.dirname(__FILE__)}/pork/auth"
7
- require "#{File.dirname(__FILE__)}/pork/log"
8
- require "#{File.dirname(__FILE__)}/pork/search"
1
+ require "#{File.dirname(__FILE__)}/pork_sandwich/twitter_user"
2
+ require "#{File.dirname(__FILE__)}/pork_sandwich/puller"
3
+ require "#{File.dirname(__FILE__)}/pork_sandwich/crawler"
4
+ require "#{File.dirname(__FILE__)}/pork_sandwich/saver"
5
+ require "#{File.dirname(__FILE__)}/pork_sandwich/reaction_processor"
6
+ require "#{File.dirname(__FILE__)}/pork_sandwich/auth"
7
+ require "#{File.dirname(__FILE__)}/pork_sandwich/log"
8
+ require "#{File.dirname(__FILE__)}/pork_sandwich/search"
9
9
 
10
10
  require "#{File.dirname(__FILE__)}/pork/table_classes/reaction"
11
11
  require "#{File.dirname(__FILE__)}/pork/table_classes/trend"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ class Reaction < ActiveRecord::Base
2
+ has_many :tweet_reactions
3
+ end
@@ -0,0 +1,5 @@
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
@@ -0,0 +1,8 @@
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
@@ -0,0 +1,8 @@
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
@@ -0,0 +1,29 @@
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
@@ -0,0 +1,6 @@
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
File without changes
data/test/test_helper.rb CHANGED
@@ -11,7 +11,7 @@ require 'rr'
11
11
 
12
12
 
13
13
 
14
- require "#{File.dirname(__FILE__)}/../lib/pork"
14
+ require "#{File.dirname(__FILE__)}/../lib/pork_sandwich"
15
15
 
16
16
  class Test::Unit::TestCase
17
17
  include RR::Adapters::TestUnit
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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Gilbert
@@ -47,16 +47,22 @@ files:
47
47
  - VERSION
48
48
  - generators/pork_sandwich_migration/pork_sandwich_migration_generator.rb
49
49
  - generators/pork_sandwich_migration/templates/pork_sandwich_migration.rb
50
- - lib/pork.rb
51
- - lib/pork/auth.rb
52
- - lib/pork/config.rb
53
- - lib/pork/crawler.rb
54
- - lib/pork/log.rb
55
- - lib/pork/puller.rb
56
- - lib/pork/reaction_processor.rb
57
- - lib/pork/saver.rb
58
- - lib/pork/search.rb
59
- - lib/pork/twitter_user.rb
50
+ - lib/pork_sandwich.rb
51
+ - lib/pork_sandwich/auth.rb
52
+ - lib/pork_sandwich/config.rb
53
+ - lib/pork_sandwich/crawler.rb
54
+ - lib/pork_sandwich/log.rb
55
+ - lib/pork_sandwich/puller.rb
56
+ - lib/pork_sandwich/reaction_processor.rb
57
+ - lib/pork_sandwich/saver.rb
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
+ - lib/pork_sandwich/twitter_user.rb
60
66
  has_rdoc: true
61
67
  homepage: http://github.com/sam1vp/pork_sandwich
62
68
  licenses: []