pfeed 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/.document +5 -0
  2. data/Gemfile +13 -0
  3. data/Gemfile.lock +20 -0
  4. data/LICENSE.txt +20 -0
  5. data/MIT-LICENSE +20 -0
  6. data/README.markdown +115 -0
  7. data/README.rdoc +231 -0
  8. data/Rakefile +44 -0
  9. data/VERSION +1 -0
  10. data/app/models/pfeed_delivery.rb +4 -0
  11. data/app/models/pfeed_item.rb +172 -0
  12. data/app/models/pfeeds/user_updated_attribute.rb +14 -0
  13. data/app/views/pfeeds/_pfeed.html.erb +14 -0
  14. data/app/views/pfeeds/_pfeed_item.html.erb +3 -0
  15. data/app/views/pfeeds/_user_updated_attribute.html.erb +4 -0
  16. data/db/migrate/0000_create_pfeed_items.rb +18 -0
  17. data/db/migrate/0001_create_pfeed_deliveries.rb +15 -0
  18. data/init.rb +18 -0
  19. data/install.rb +1 -0
  20. data/lib/generator/pfeed_customization/USAGE +10 -0
  21. data/lib/generator/pfeed_customization/pfeed_customization_generator.rb +29 -0
  22. data/lib/generator/pfeed_customization/templates/pfeed_model.rb +5 -0
  23. data/lib/generator/pfeed_customization/templates/pfeed_view.html.erb +5 -0
  24. data/lib/pfeed.rb +29 -0
  25. data/lib/pfeed/pfeed.rb +102 -0
  26. data/lib/pfeed/pfeed_utils.rb +21 -0
  27. data/lib/pfeed_utils.rb +21 -0
  28. data/lib/tasks/pfeed.rake +54 -0
  29. data/pfeed.gemspec +93 -0
  30. data/pfeed/.document +5 -0
  31. data/pfeed/Gemfile +13 -0
  32. data/pfeed/LICENSE.txt +20 -0
  33. data/pfeed/Rakefile +53 -0
  34. data/pfeed/test/helper.rb +18 -0
  35. data/pfeed/test/test_pfeed.rb +7 -0
  36. data/test/bk_lib/pfeed_test.rb +57 -0
  37. data/test/bk_lib/pfeed_utils_test.rb +11 -0
  38. data/test/helper.rb +20 -0
  39. data/test/lib/pfeed_test.rb +57 -0
  40. data/test/lib/pfeed_utils_test.rb +11 -0
  41. data/test/test_helper.rb +71 -0
  42. data/test/test_pfeed.rb +9 -0
  43. data/uninstall.rb +1 -0
  44. metadata +164 -0
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+
3
+ context 'attempting past tense' do
4
+ def _(verb, past_tense)
5
+ asserts('') {ParolkarInnovationLab::SocialNet::PfeedUtils.attempt_pass_tense(verb)}.equals(past_tense)
6
+ end
7
+
8
+ _ "addFriend", "added_friend"
9
+ _ "fightWithFriend", "fought_with_friend"
10
+ _ "buy_item", "bought_item"
11
+ end
@@ -0,0 +1,71 @@
1
+ =begin
2
+ ENV['RAILS_ENV'] = 'test'
3
+
4
+ require 'rubygems'
5
+ require 'active_record'
6
+ require 'action_controller'
7
+ require 'active_support'
8
+ ENV['RAILS_ENV'] = 'test'
9
+
10
+ require 'rubygems'
11
+ require 'active_record'
12
+ require 'action_controller'
13
+ require 'active_support'
14
+
15
+ def __DIR__
16
+ File.dirname(__FILE__)
17
+ end
18
+ require "#{__DIR__}/../init"
19
+
20
+ require 'riot'
21
+
22
+ # ?
23
+ class String
24
+ unless methods.include? 'normalize'
25
+ def normalize *args
26
+ self
27
+ end
28
+ end
29
+ end
30
+
31
+ begin # infletionist dependency
32
+ require "#{__DIR__}/../../inflectionist/init"
33
+ rescue LoadError
34
+ puts "\n\n\nplease install the inflectionist plugin\n\n\n"
35
+ exit(1)
36
+ end
37
+
38
+
39
+ def load_schema
40
+ Dir["#{__DIR__}/../app/models/**/*.rb"].each { |f| require f }
41
+
42
+ ActiveRecord::Base.establish_connection(
43
+ :adapter => "sqlite3",
44
+ :database => ":memory:"
45
+ )
46
+
47
+ ActiveRecord::Schema.define do
48
+ create_table "emitters", :force => true do |t|
49
+ t.string 'name'
50
+ end
51
+
52
+ create_table "pfeed_items", :force => true do |t|
53
+ t.string "type"
54
+ t.integer "originator_id"
55
+ t.string "originator_type"
56
+ t.integer "participant_id"
57
+ t.string "participant_type"
58
+ t.text "data"
59
+ t.datetime 'expiry'
60
+ t.timestamps
61
+ end
62
+
63
+ create_table "pfeed_deliveries", :force => true do |t|
64
+ t.integer :pfeed_receiver_id
65
+ t.integer :pfeed_receiver_type
66
+ t.integer :pfeed_item_id
67
+ t.timestamps
68
+ end
69
+ end
70
+ end
71
+ =end
@@ -0,0 +1,9 @@
1
+ =begin
2
+ require 'helper'
3
+
4
+ class TestPfeed < Test::Unit::TestCase
5
+ should "probably rename this file and start testing for real" do
6
+ flunk "hey buddy, you should probably rename this file and start testing for real"
7
+ end
8
+ end
9
+ =end
@@ -0,0 +1 @@
1
+ # Uninstall hook code here
metadata ADDED
@@ -0,0 +1,164 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pfeed
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 0
9
+ segments_generated: true
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Naveed Ahmad
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-12-21 00:00:00 +05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ segments:
27
+ - 0
28
+ segments_generated: true
29
+ version: "0"
30
+ requirement: *id001
31
+ prerelease: false
32
+ type: :development
33
+ name: shoulda
34
+ - !ruby/object:Gem::Dependency
35
+ version_requirements: &id002 !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ~>
38
+ - !ruby/object:Gem::Version
39
+ segments:
40
+ - 1
41
+ - 0
42
+ - 0
43
+ segments_generated: true
44
+ version: 1.0.0
45
+ requirement: *id002
46
+ prerelease: false
47
+ type: :development
48
+ name: bundler
49
+ - !ruby/object:Gem::Dependency
50
+ version_requirements: &id003 !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ segments:
55
+ - 1
56
+ - 6
57
+ - 4
58
+ segments_generated: true
59
+ version: 1.6.4
60
+ requirement: *id003
61
+ prerelease: false
62
+ type: :development
63
+ name: jeweler
64
+ - !ruby/object:Gem::Dependency
65
+ version_requirements: &id004 !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ segments:
70
+ - 0
71
+ segments_generated: true
72
+ version: "0"
73
+ requirement: *id004
74
+ prerelease: false
75
+ type: :development
76
+ name: rcov
77
+ description: ""
78
+ email: naveed.ahmad@7vals.com
79
+ executables: []
80
+
81
+ extensions: []
82
+
83
+ extra_rdoc_files:
84
+ - LICENSE.txt
85
+ - README.markdown
86
+ - README.rdoc
87
+ files:
88
+ - .document
89
+ - Gemfile
90
+ - Gemfile.lock
91
+ - LICENSE.txt
92
+ - MIT-LICENSE
93
+ - README.markdown
94
+ - README.rdoc
95
+ - Rakefile
96
+ - VERSION
97
+ - app/models/pfeed_delivery.rb
98
+ - app/models/pfeed_item.rb
99
+ - app/models/pfeeds/user_updated_attribute.rb
100
+ - app/views/pfeeds/_pfeed.html.erb
101
+ - app/views/pfeeds/_pfeed_item.html.erb
102
+ - app/views/pfeeds/_user_updated_attribute.html.erb
103
+ - db/migrate/0000_create_pfeed_items.rb
104
+ - db/migrate/0001_create_pfeed_deliveries.rb
105
+ - init.rb
106
+ - install.rb
107
+ - lib/generator/pfeed_customization/USAGE
108
+ - lib/generator/pfeed_customization/pfeed_customization_generator.rb
109
+ - lib/generator/pfeed_customization/templates/pfeed_model.rb
110
+ - lib/generator/pfeed_customization/templates/pfeed_view.html.erb
111
+ - lib/pfeed.rb
112
+ - lib/pfeed/pfeed.rb
113
+ - lib/pfeed/pfeed_utils.rb
114
+ - lib/pfeed_utils.rb
115
+ - lib/tasks/pfeed.rake
116
+ - pfeed.gemspec
117
+ - pfeed/.document
118
+ - pfeed/Gemfile
119
+ - pfeed/LICENSE.txt
120
+ - pfeed/Rakefile
121
+ - pfeed/test/helper.rb
122
+ - pfeed/test/test_pfeed.rb
123
+ - test/bk_lib/pfeed_test.rb
124
+ - test/bk_lib/pfeed_utils_test.rb
125
+ - test/helper.rb
126
+ - test/lib/pfeed_test.rb
127
+ - test/lib/pfeed_utils_test.rb
128
+ - test/test_helper.rb
129
+ - test/test_pfeed.rb
130
+ - uninstall.rb
131
+ has_rdoc: true
132
+ homepage: http://github.com/naveed-ahmad/pfeed
133
+ licenses:
134
+ - MIT
135
+ post_install_message:
136
+ rdoc_options: []
137
+
138
+ require_paths:
139
+ - lib
140
+ required_ruby_version: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ segments:
145
+ - 0
146
+ segments_generated: true
147
+ version: "0"
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ segments:
153
+ - 0
154
+ segments_generated: true
155
+ version: "0"
156
+ requirements: []
157
+
158
+ rubyforge_project:
159
+ rubygems_version: 1.3.6
160
+ signing_key:
161
+ specification_version: 3
162
+ summary: Automagically create fancy logs / activity updates in your rails app, asynchronously
163
+ test_files: []
164
+