pork_sandwich 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/generators/pork_sandwich_models/pork_sandwich_models_generator.rb +12 -0
- data/generators/pork_sandwich_models/templates/models/reaction.rb +3 -0
- data/generators/pork_sandwich_models/templates/models/trend.rb +5 -0
- data/generators/pork_sandwich_models/templates/models/tweet.rb +8 -0
- data/generators/pork_sandwich_models/templates/models/tweet_reaction.rb +8 -0
- data/generators/pork_sandwich_models/templates/models/twitter_account.rb +29 -0
- data/generators/pork_sandwich_models/templates/models/twitter_relationship.rb +6 -0
- metadata +9 -2
data/Rakefile
CHANGED
@@ -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_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' ]
|
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', 'generators/pork_sandwich_models/*.rb', 'generators/pork_sandwich_models/templates/*.rb', 'generators/pork_sandwich_models/templates/models/*.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.4.
|
1
|
+
0.4.4
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class PorkSandwichModelsGenerator < Rails::Generator::Base
|
2
|
+
def manifest
|
3
|
+
record do |m|
|
4
|
+
m.file "models/reaction.rb", "app/models/reaction.rb"
|
5
|
+
m.file "models/trend.rb", "app/models/trend.rb"
|
6
|
+
m.file "models/tweet.rb", "app/models/tweet.rb"
|
7
|
+
m.file "models/tweet_reaction.rb", "app/models/tweet_reaction.rb"
|
8
|
+
m.file "models/twitter_account.rb", "app/models/twitter_account.rb"
|
9
|
+
m.file "models/twitter_relationship.rb", "app/models/twitter_relationship.rb"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
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
|
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.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Gilbert
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-02-
|
13
|
+
date: 2010-02-06 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -47,6 +47,13 @@ files:
|
|
47
47
|
- VERSION
|
48
48
|
- generators/pork_sandwich_migration/pork_sandwich_migration_generator.rb
|
49
49
|
- generators/pork_sandwich_migration/templates/migration.rb
|
50
|
+
- generators/pork_sandwich_models/pork_sandwich_models_generator.rb
|
51
|
+
- generators/pork_sandwich_models/templates/models/reaction.rb
|
52
|
+
- generators/pork_sandwich_models/templates/models/trend.rb
|
53
|
+
- generators/pork_sandwich_models/templates/models/tweet.rb
|
54
|
+
- generators/pork_sandwich_models/templates/models/tweet_reaction.rb
|
55
|
+
- generators/pork_sandwich_models/templates/models/twitter_account.rb
|
56
|
+
- generators/pork_sandwich_models/templates/models/twitter_relationship.rb
|
50
57
|
- lib/pork_sandwich.rb
|
51
58
|
- lib/pork_sandwich/auth.rb
|
52
59
|
- lib/pork_sandwich/config.rb
|