Skip to content

Commit

Permalink
Rails 3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
atd committed Nov 17, 2010
1 parent e47f029 commit 836f1b8
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 47 deletions.
81 changes: 40 additions & 41 deletions Gemfile.lock
Expand Up @@ -17,38 +17,37 @@ GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.1)
actionpack (= 3.0.1)
mail (~> 2.2.5)
actionpack (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
actionmailer (3.0.3)
actionpack (= 3.0.3)
mail (~> 2.2.9)
actionpack (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4.1)
i18n (~> 0.4)
rack (~> 1.2.1)
rack-mount (~> 0.6.12)
rack-test (~> 0.5.4)
rack-mount (~> 0.6.13)
rack-test (~> 0.5.6)
tzinfo (~> 0.3.23)
activemodel (3.0.1)
activesupport (= 3.0.1)
activemodel (3.0.3)
activesupport (= 3.0.3)
builder (~> 2.1.2)
i18n (~> 0.4.1)
activerecord (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
arel (~> 1.0.0)
i18n (~> 0.4)
activerecord (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
activeresource (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
activesupport (3.0.1)
arel (1.0.1)
activesupport (~> 3.0.0)
activeresource (3.0.3)
activemodel (= 3.0.3)
activesupport (= 3.0.3)
activesupport (3.0.3)
arel (2.0.3)
atd-ancestry (1.3.0)
bcrypt-ruby (2.1.2)
builder (2.1.2)
cancan (1.4.0)
cancan (1.4.1)
capybara (0.3.9)
culerity (>= 0.2.4)
mime-types (>= 1.16)
Expand Down Expand Up @@ -81,16 +80,16 @@ GEM
thor (~> 0.14.4)
json_pure (1.4.6)
linecache (0.43)
mail (2.2.9)
mail (2.2.10)
activesupport (>= 2.3.6)
i18n (~> 0.4.1)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
nested_set (1.5.3)
nested_set (1.5.4)
activerecord (>= 3.0.0)
railties (>= 3.0.0)
nokogiri (1.4.3.1)
nokogiri (1.4.4)
paperclip (2.3.5)
activerecord
activesupport
Expand All @@ -100,19 +99,19 @@ GEM
rack (>= 1.0.0)
rack-test (0.5.6)
rack (>= 1.0)
rails (3.0.1)
actionmailer (= 3.0.1)
actionpack (= 3.0.1)
activerecord (= 3.0.1)
activeresource (= 3.0.1)
activesupport (= 3.0.1)
bundler (~> 1.0.0)
railties (= 3.0.1)
railties (3.0.1)
actionpack (= 3.0.1)
activesupport (= 3.0.1)
rake (>= 0.8.4)
thor (~> 0.14.0)
rails (3.0.3)
actionmailer (= 3.0.3)
actionpack (= 3.0.3)
activerecord (= 3.0.3)
activeresource (= 3.0.3)
activesupport (= 3.0.3)
bundler (~> 1.0)
railties (= 3.0.3)
railties (3.0.3)
actionpack (= 3.0.3)
activesupport (= 3.0.3)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
responders (0.6.2)
rspec (2.0.1)
Expand Down Expand Up @@ -141,7 +140,7 @@ GEM
sqlite3-ruby (1.3.2)
stringex (1.2.0)
thor (0.14.4)
treetop (1.4.8)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.23)
warden (0.10.7)
Expand All @@ -163,7 +162,7 @@ DEPENDENCIES
jquery-rails (~> 0.2.5)
nested_set (~> 1.5.3)
paperclip (~> 2.3.4)
rails (~> 3.0.1)
rails (~> 3.0.3)
rspec-rails (~> 2.0.0)
ruby-debug (~> 0.10.3)
social_stream!
Expand Down
10 changes: 5 additions & 5 deletions app/models/permission.rb
Expand Up @@ -30,13 +30,13 @@ class Permission < ActiveRecord::Base
# The same sender and receiver, but a stronger or equal relation
as[:sender_id].eq(t.sender_id).and(
as[:receiver_id].eq(t.receiver_id)).and(
as[:relation_id].in(t.relation.stronger_or_equal.all))
as[:relation_id].in(t.relation.stronger_or_equal.map(&:id)))
},
'inverse_weak_set' => lambda { |as, t|
# Senders and receivers interchanged, with a stronger or equal relation of the inverse
as[:sender_id].eq(t.receiver_id).and(
as[:receiver_id].eq(t.sender_id)).and(
as[:relation_id].in(t.relation.inverse.try(:stronger_or_equal).try(:all)))
as[:relation_id].in(Array(t.relation.inverse.try(:stronger_or_equal)).map(&:id)))
},
'group_set' => lambda { |as, t|
# The same receiver and relation
Expand All @@ -46,17 +46,17 @@ class Permission < ActiveRecord::Base
'inverse_group_set' => lambda { |as, t|
# Senders to the common receiver in the same relation
as[:sender_id].eq(t.receiver_id).and(
as[:relation_id].eq(t.relation.inverse))
as[:relation_id].eq(t.relation.inverse_id))
},
'weak_group_set' => lambda { |as, t|
# The same receiver with stronger or equal relations
as[:receiver_id].eq(t.receiver_id).and(
as[:relation_id].in(t.relation.stronger_or_equal.all))
as[:relation_id].in(t.relation.stronger_or_equal.map(&:id)))
},
'inverse_weak_group_set' => lambda { |as, t|
# Senders to the common receiver with stronger or equal relations
as[:sender_id].eq(t.receiver_id).and(
as[:relation_id].in(t.relation.inverse.try(:stronger_or_equal).try(:all)))
as[:relation_id].in(Array(t.relation.inverse.try(:stronger_or_equal)).map(&:id)))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion social_stream.gemspec
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('jquery-rails', '~> 0.2.5')
s.add_runtime_dependency('cancan', '~> 1.4.0')
s.add_runtime_dependency('will_paginate', '~> 2.3.15')
s.add_development_dependency('rails', '~> 3.0.1')
s.add_development_dependency('rails', '~> 3.0.3')
s.add_development_dependency('capybara', '~> 0.3.9')
s.add_development_dependency('sqlite3-ruby')
if RUBY_VERSION < '1.9'
Expand Down

0 comments on commit 836f1b8

Please sign in to comment.