muck-activities 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +23 -0
- data/MIT-LICENSE +1 -1
- data/Rakefile +4 -4
- data/VERSION +1 -1
- data/muck-activities.gemspec +5 -12
- data/public/stylesheets/muck-activities.css +1 -1
- data/test/rails_root/config/environment.rb +3 -3
- data/test/rails_root/config/environments/test.rb +1 -10
- data/test/rails_root/config/routes.rb +3 -0
- data/test/rails_root/test/test_helper.rb +4 -30
- metadata +5 -11
- data/test/rails_root/Capfile +0 -3
- data/test/rails_root/test/factories.rb +0 -60
- data/test/rails_root/test/mocks/development/.keep +0 -0
- data/test/rails_root/test/mocks/test/.keep +0 -0
- data/test/rails_root/test/shoulda_macros/controller.rb +0 -43
data/.gitignore
CHANGED
@@ -1,6 +1,29 @@
|
|
1
|
+
**/*.pid
|
2
|
+
log/*.log
|
3
|
+
log/*.pid
|
4
|
+
tmp
|
5
|
+
.DS_Store
|
6
|
+
public/cache/**/*
|
7
|
+
public/system/**/*
|
8
|
+
doc/**/*
|
9
|
+
db/*.sqlite3
|
10
|
+
.project
|
11
|
+
.loadpath
|
12
|
+
nbproject/
|
13
|
+
.idea
|
14
|
+
testjour.log
|
15
|
+
*.so
|
16
|
+
*.o
|
17
|
+
Makefile
|
18
|
+
mkmf.log
|
19
|
+
*.bundle
|
20
|
+
conftest
|
21
|
+
content/
|
22
|
+
.idea
|
1
23
|
*.sw?
|
2
24
|
.DS_Store
|
3
25
|
coverage
|
4
26
|
rdoc
|
5
27
|
pkg
|
28
|
+
pkg/*
|
6
29
|
log/*
|
data/MIT-LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -49,10 +49,10 @@ begin
|
|
49
49
|
Jeweler::Tasks.new do |gemspec|
|
50
50
|
gemspec.name = "muck-activities"
|
51
51
|
gemspec.summary = "Activity engine for the muck system"
|
52
|
-
gemspec.email = "
|
53
|
-
gemspec.homepage = "http://github.com/
|
52
|
+
gemspec.email = "justin@tatemae.com"
|
53
|
+
gemspec.homepage = "http://github.com/tatemae/muck_activities"
|
54
54
|
gemspec.description = "Activity engine for the muck system."
|
55
|
-
gemspec.authors = ["Justin Ball"]
|
55
|
+
gemspec.authors = ["Justin Ball", "Joel Duffin"]
|
56
56
|
gemspec.rubyforge_project = 'muck-activities'
|
57
57
|
gemspec.add_dependency "muck-engine"
|
58
58
|
gemspec.add_dependency "muck-users"
|
@@ -63,5 +63,5 @@ begin
|
|
63
63
|
rubyforge.doc_task = "rdoc"
|
64
64
|
end
|
65
65
|
rescue LoadError
|
66
|
-
puts "Jeweler not available. Install it with: sudo gem install
|
66
|
+
puts "Jeweler not available. Install it with: sudo gem install jeweler"
|
67
67
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.24
|
data/muck-activities.gemspec
CHANGED
@@ -5,13 +5,13 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{muck-activities}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.24"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Justin Ball"]
|
12
|
-
s.date = %q{2009-
|
11
|
+
s.authors = ["Justin Ball", "Joel Duffin"]
|
12
|
+
s.date = %q{2009-11-13}
|
13
13
|
s.description = %q{Activity engine for the muck system.}
|
14
|
-
s.email = %q{
|
14
|
+
s.email = %q{justin@tatemae.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.rdoc"
|
17
17
|
]
|
@@ -100,7 +100,6 @@ Gem::Specification.new do |s|
|
|
100
100
|
"tasks/muck_activity_tasks.rake",
|
101
101
|
"test/rails_root/.gitignore",
|
102
102
|
"test/rails_root/.rake_tasks",
|
103
|
-
"test/rails_root/Capfile",
|
104
103
|
"test/rails_root/Rakefile",
|
105
104
|
"test/rails_root/app/controllers/application_controller.rb",
|
106
105
|
"test/rails_root/app/controllers/default_controller.rb",
|
@@ -300,14 +299,10 @@ Gem::Specification.new do |s|
|
|
300
299
|
"test/rails_root/script/process/spawner",
|
301
300
|
"test/rails_root/script/runner",
|
302
301
|
"test/rails_root/script/server",
|
303
|
-
"test/rails_root/test/factories.rb",
|
304
302
|
"test/rails_root/test/functional/.keep",
|
305
303
|
"test/rails_root/test/functional/activities_controller_test.rb",
|
306
304
|
"test/rails_root/test/functional/default_controller_test.rb",
|
307
305
|
"test/rails_root/test/integration/.keep",
|
308
|
-
"test/rails_root/test/mocks/development/.keep",
|
309
|
-
"test/rails_root/test/mocks/test/.keep",
|
310
|
-
"test/rails_root/test/shoulda_macros/controller.rb",
|
311
306
|
"test/rails_root/test/test_helper.rb",
|
312
307
|
"test/rails_root/test/unit/.keep",
|
313
308
|
"test/rails_root/test/unit/activity_feed_test.rb",
|
@@ -316,7 +311,7 @@ Gem::Specification.new do |s|
|
|
316
311
|
"test/rails_root/test/unit/user_test.rb",
|
317
312
|
"uninstall.rb"
|
318
313
|
]
|
319
|
-
s.homepage = %q{http://github.com/
|
314
|
+
s.homepage = %q{http://github.com/tatemae/muck_activities}
|
320
315
|
s.rdoc_options = ["--charset=UTF-8"]
|
321
316
|
s.require_paths = ["lib"]
|
322
317
|
s.rubyforge_project = %q{muck-activities}
|
@@ -360,10 +355,8 @@ Gem::Specification.new do |s|
|
|
360
355
|
"test/rails_root/features/support/paths.rb",
|
361
356
|
"test/rails_root/public/dispatch.rb",
|
362
357
|
"test/rails_root/script/create_project.rb",
|
363
|
-
"test/rails_root/test/factories.rb",
|
364
358
|
"test/rails_root/test/functional/activities_controller_test.rb",
|
365
359
|
"test/rails_root/test/functional/default_controller_test.rb",
|
366
|
-
"test/rails_root/test/shoulda_macros/controller.rb",
|
367
360
|
"test/rails_root/test/test_helper.rb",
|
368
361
|
"test/rails_root/test/unit/activity_feed_test.rb",
|
369
362
|
"test/rails_root/test/unit/activity_test.rb",
|
@@ -15,7 +15,7 @@ ul#activity-filter li.current a{color:#5EAC18;}
|
|
15
15
|
#activity-feed{margin:15px 0 0 0;}
|
16
16
|
#activity-feed-content .activity{margin:8px 0 4px 0;}
|
17
17
|
#activity-feed-content .activity-time{font-size:1em;font-color:#eee;clear:left;}
|
18
|
-
#activity-icon, .actor-icon{width:50px;float:left;margin:0 10px 10px 0;}
|
18
|
+
#activity-icon, .actor-icon{width:50px;float:left;margin:0 10px 10px 0;overflow:hidden;}
|
19
19
|
#activity-feed-content .actor, #current-status-name{font-weight:bolder;font-size:1.3em;}
|
20
20
|
.activity-time, .status-time{color:#777777;font-size:.9em;}
|
21
21
|
p#current-status-text, .activity-content p{margin:0;}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
RAILS_GEM_VERSION = '2.3.
|
1
|
+
RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
|
2
2
|
|
3
3
|
require File.join(File.dirname(__FILE__), 'boot')
|
4
4
|
|
@@ -15,11 +15,11 @@ end
|
|
15
15
|
|
16
16
|
Rails::Initializer.run do |config|
|
17
17
|
config.time_zone = 'UTC'
|
18
|
-
config.gem
|
18
|
+
config.gem "will_paginate"
|
19
19
|
config.gem "authlogic"
|
20
20
|
config.gem "binarylogic-searchlogic", :lib => 'searchlogic', :source => 'http://gems.github.com'
|
21
21
|
config.gem "bcrypt-ruby", :lib => "bcrypt"
|
22
|
-
config.gem "
|
22
|
+
config.gem "awesome_nested_set"
|
23
23
|
config.gem 'thoughtbot-paperclip', :lib => 'paperclip', :source => "http://gems.github.com"
|
24
24
|
config.gem 'muck-engine', :lib => 'muck_engine'
|
25
25
|
config.gem 'muck-users', :lib => 'muck_users'
|
@@ -21,13 +21,4 @@ config.action_controller.allow_forgery_protection = false
|
|
21
21
|
# ActionMailer::Base.deliveries array.
|
22
22
|
config.action_mailer.delivery_method = :test
|
23
23
|
|
24
|
-
HOST = "localhost"
|
25
|
-
|
26
|
-
config.gem 'thoughtbot-shoulda',
|
27
|
-
:lib => 'shoulda',
|
28
|
-
:source => "http://gems.github.com",
|
29
|
-
:version => '>= 2.9.1'
|
30
|
-
config.gem 'thoughtbot-factory_girl',
|
31
|
-
:lib => 'factory_girl',
|
32
|
-
:source => "http://gems.github.com",
|
33
|
-
:version => '>= 1.2.0'
|
24
|
+
HOST = "localhost"
|
@@ -1,5 +1,8 @@
|
|
1
1
|
ActionController::Routing::Routes.draw do |map|
|
2
2
|
|
3
|
+
map.home '', :controller => 'default', :action => 'index'
|
4
|
+
map.root :controller => 'default', :action => 'index'
|
5
|
+
|
3
6
|
# Install the default routes as the lowest priority.
|
4
7
|
map.connect ':controller/:action/:id'
|
5
8
|
map.connect ':controller/:action/:id.:format'
|
@@ -1,37 +1,11 @@
|
|
1
1
|
$:.reject! { |e| e.include? 'TextMate' }
|
2
2
|
ENV["RAILS_ENV"] = "test"
|
3
3
|
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
4
|
-
|
5
|
-
|
6
|
-
require 'factory_girl'
|
7
|
-
require 'mocha'
|
4
|
+
gem 'muck-engine'
|
5
|
+
require 'muck_test_helper'
|
8
6
|
require 'authlogic/test_case'
|
9
|
-
require 'redgreen' rescue LoadError
|
10
|
-
require File.expand_path(File.dirname(__FILE__) + '/factories')
|
11
|
-
require File.join(File.dirname(__FILE__), 'shoulda_macros', 'controller')
|
12
|
-
|
13
|
-
class ActiveSupport::TestCase
|
14
|
-
self.use_transactional_fixtures = true
|
15
|
-
self.use_instantiated_fixtures = false
|
16
7
|
|
8
|
+
class ActiveSupport::TestCase
|
9
|
+
include MuckTestMethods
|
17
10
|
include Authlogic::TestCase
|
18
|
-
|
19
|
-
def login_as(user)
|
20
|
-
success = UserSession.create(user)
|
21
|
-
if !success
|
22
|
-
errors = user.errors.full_messages.to_sentence
|
23
|
-
message = 'User has not been activated' if !user.active?
|
24
|
-
raise "could not login as #{user.to_param}. Please make sure the user is valid. #{message} #{errors}"
|
25
|
-
end
|
26
|
-
UserSession.find
|
27
|
-
end
|
28
|
-
|
29
|
-
def assure_logout
|
30
|
-
user_session = UserSession.find
|
31
|
-
user_session.destroy if user_session
|
32
|
-
end
|
33
|
-
|
34
|
-
def ensure_flash(val)
|
35
|
-
assert_contains flash.values, val, ", Flash: #{flash.inspect}"
|
36
|
-
end
|
37
11
|
end
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muck-activities
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Ball
|
8
|
+
- Joel Duffin
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
|
12
|
-
date: 2009-
|
13
|
+
date: 2009-11-13 00:00:00 -07:00
|
13
14
|
default_executable:
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
@@ -43,7 +44,7 @@ dependencies:
|
|
43
44
|
version: "0"
|
44
45
|
version:
|
45
46
|
description: Activity engine for the muck system.
|
46
|
-
email:
|
47
|
+
email: justin@tatemae.com
|
47
48
|
executables: []
|
48
49
|
|
49
50
|
extensions: []
|
@@ -135,7 +136,6 @@ files:
|
|
135
136
|
- tasks/muck_activity_tasks.rake
|
136
137
|
- test/rails_root/.gitignore
|
137
138
|
- test/rails_root/.rake_tasks
|
138
|
-
- test/rails_root/Capfile
|
139
139
|
- test/rails_root/Rakefile
|
140
140
|
- test/rails_root/app/controllers/application_controller.rb
|
141
141
|
- test/rails_root/app/controllers/default_controller.rb
|
@@ -335,14 +335,10 @@ files:
|
|
335
335
|
- test/rails_root/script/process/spawner
|
336
336
|
- test/rails_root/script/runner
|
337
337
|
- test/rails_root/script/server
|
338
|
-
- test/rails_root/test/factories.rb
|
339
338
|
- test/rails_root/test/functional/.keep
|
340
339
|
- test/rails_root/test/functional/activities_controller_test.rb
|
341
340
|
- test/rails_root/test/functional/default_controller_test.rb
|
342
341
|
- test/rails_root/test/integration/.keep
|
343
|
-
- test/rails_root/test/mocks/development/.keep
|
344
|
-
- test/rails_root/test/mocks/test/.keep
|
345
|
-
- test/rails_root/test/shoulda_macros/controller.rb
|
346
342
|
- test/rails_root/test/test_helper.rb
|
347
343
|
- test/rails_root/test/unit/.keep
|
348
344
|
- test/rails_root/test/unit/activity_feed_test.rb
|
@@ -351,7 +347,7 @@ files:
|
|
351
347
|
- test/rails_root/test/unit/user_test.rb
|
352
348
|
- uninstall.rb
|
353
349
|
has_rdoc: true
|
354
|
-
homepage: http://github.com/
|
350
|
+
homepage: http://github.com/tatemae/muck_activities
|
355
351
|
licenses: []
|
356
352
|
|
357
353
|
post_install_message:
|
@@ -416,10 +412,8 @@ test_files:
|
|
416
412
|
- test/rails_root/features/support/paths.rb
|
417
413
|
- test/rails_root/public/dispatch.rb
|
418
414
|
- test/rails_root/script/create_project.rb
|
419
|
-
- test/rails_root/test/factories.rb
|
420
415
|
- test/rails_root/test/functional/activities_controller_test.rb
|
421
416
|
- test/rails_root/test/functional/default_controller_test.rb
|
422
|
-
- test/rails_root/test/shoulda_macros/controller.rb
|
423
417
|
- test/rails_root/test/test_helper.rb
|
424
418
|
- test/rails_root/test/unit/activity_feed_test.rb
|
425
419
|
- test/rails_root/test/unit/activity_test.rb
|
data/test/rails_root/Capfile
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
Factory.sequence :email do |n|
|
2
|
-
"somebody#{n}@example.com"
|
3
|
-
end
|
4
|
-
|
5
|
-
Factory.sequence :login do |n|
|
6
|
-
"inquire#{n}"
|
7
|
-
end
|
8
|
-
|
9
|
-
Factory.sequence :name do |n|
|
10
|
-
"a_name#{n}"
|
11
|
-
end
|
12
|
-
|
13
|
-
Factory.sequence :title do |n|
|
14
|
-
"a_title#{n}"
|
15
|
-
end
|
16
|
-
|
17
|
-
Factory.sequence :abbr do |n|
|
18
|
-
"abbr#{n}"
|
19
|
-
end
|
20
|
-
|
21
|
-
Factory.sequence :description do |n|
|
22
|
-
"This is the description: #{n}"
|
23
|
-
end
|
24
|
-
|
25
|
-
Factory.define :user do |f|
|
26
|
-
f.login { Factory.next(:login) }
|
27
|
-
f.email { Factory.next(:email) }
|
28
|
-
f.password 'inquire_pass'
|
29
|
-
f.password_confirmation 'inquire_pass'
|
30
|
-
f.first_name 'test'
|
31
|
-
f.last_name 'guy'
|
32
|
-
f.terms_of_service true
|
33
|
-
f.activated_at DateTime.now
|
34
|
-
end
|
35
|
-
|
36
|
-
Factory.define :activity do |f|
|
37
|
-
f.item {|a| a.association(:user)}
|
38
|
-
f.template ''
|
39
|
-
f.source {|a| a.association(:user)}
|
40
|
-
f.content ''
|
41
|
-
f.title ''
|
42
|
-
f.is_status_update false
|
43
|
-
f.is_public true
|
44
|
-
f.created_at DateTime.now
|
45
|
-
end
|
46
|
-
|
47
|
-
Factory.define :comment do |f|
|
48
|
-
f.body 'test comment'
|
49
|
-
f.user {|a| a.association(:user)}
|
50
|
-
end
|
51
|
-
|
52
|
-
Factory.define :share do |f|
|
53
|
-
f.uri { Factory.next(:uri) }
|
54
|
-
f.title { Factory.next(:title) }
|
55
|
-
f.shared_by {|a| a.association(:user)}
|
56
|
-
end
|
57
|
-
|
58
|
-
Factory.sequence :uri do |n|
|
59
|
-
"n#{n}.example.com"
|
60
|
-
end
|
File without changes
|
File without changes
|
@@ -1,43 +0,0 @@
|
|
1
|
-
ActiveSupport::TestCase.class_eval do
|
2
|
-
|
3
|
-
def self.should_require_login(*args)
|
4
|
-
args = Hash[*args]
|
5
|
-
login_url = args.delete :login_url
|
6
|
-
args.each do |action, verb|
|
7
|
-
should "Require login for '#{action}' action" do
|
8
|
-
send(verb, action)
|
9
|
-
assert_redirected_to(login_url)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.should_require_role(role, redirect_url, *actions)
|
15
|
-
actions.each do |action|
|
16
|
-
should "require role for '#{action}' action" do
|
17
|
-
get(action)
|
18
|
-
ensure_flash(/permission/i)
|
19
|
-
assert_response :redirect
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
#from: http://blog.internautdesign.com/2008/9/11/more-on-custom-shoulda-macros-scoping-of-instance-variables
|
25
|
-
def self.should_not_allow action, object, url= "/login", msg=nil
|
26
|
-
msg ||= "a #{object.class.to_s.downcase}"
|
27
|
-
should "not be able to #{action} #{msg}" do
|
28
|
-
object = eval(object, self.send(:binding), __FILE__, __LINE__)
|
29
|
-
get action, :id => object.id
|
30
|
-
assert_redirected_to url
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def self.should_allow action, object, msg=nil
|
35
|
-
msg ||= "a #{object.class.to_s.downcase}"
|
36
|
-
should "be able to #{action} #{msg}" do
|
37
|
-
object = eval(object, self.send(:binding), __FILE__, __LINE__)
|
38
|
-
get action, :id => object.id
|
39
|
-
assert_response :success
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|