party_boy 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/generators/party_boy/templates/model.rb +4 -4
- data/lib/party_boy.rb +0 -10
- data/party_boy.gemspec +22 -34
- metadata +16 -16
- data/.gitignore +0 -23
- data/social_lite.gemspec +0 -63
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class Relationship < ActiveRecord::Base
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
scope :restricted, :conditions => ['relationships.restricted = ?', true]
|
4
|
+
scope :unrestricted, :conditions => ['relationships.restricted = ?', false]
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
scope :to_type, lambda {|rtype| rtype = [rtype].flatten.compact; rtype.size > 0 && {:conditions => ['relationships.requestee_type IN (?)', [rtype].flatten]} || {}}
|
7
|
+
scope :from_type, lambda {|rtype| rtype = [rtype].flatten.compact; rtype.size > 0 && {:conditions => ['relationships.requestor_type IN (?)', [rtype].flatten]} || {}}
|
8
8
|
|
9
9
|
default_scope :order => 'created_at DESC'
|
10
10
|
|
data/lib/party_boy.rb
CHANGED
@@ -228,14 +228,4 @@ module Party
|
|
228
228
|
end
|
229
229
|
end
|
230
230
|
|
231
|
-
class String
|
232
|
-
def classify
|
233
|
-
if self[(self.length - 2)...self.length] == 'ss'
|
234
|
-
"#{self[0...(self.length-2)].classify}ss"
|
235
|
-
else
|
236
|
-
super
|
237
|
-
end
|
238
|
-
end
|
239
|
-
end
|
240
|
-
|
241
231
|
::ActiveRecord::Base.send :include, Party::Boy
|
data/party_boy.gemspec
CHANGED
@@ -1,61 +1,49 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{party_boy}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mike Nelson"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2012-01-17}
|
13
13
|
s.description = %q{Models relationships between AR models. Allows you to follow, friend, and block other AR's. Consists of two mixins: acts_as_followable and acts_as_friend. These options allow an AR to inherit either a twitter-like follower system or a facebook-like friend system.}
|
14
14
|
s.email = %q{mdnelson30@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.rdoc"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
"spec/spec.opts",
|
38
|
-
"spec/spec_helper.rb"
|
21
|
+
"LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"generators/party_boy/party_boy_generator.rb",
|
26
|
+
"generators/party_boy/templates/migration.rb",
|
27
|
+
"generators/party_boy/templates/model.rb",
|
28
|
+
"lib/party_boy.rb",
|
29
|
+
"party_boy.gemspec",
|
30
|
+
"spec/models/both_class.rb",
|
31
|
+
"spec/models/follower_class.rb",
|
32
|
+
"spec/models/friend_class.rb",
|
33
|
+
"spec/party_boy_spec.rb",
|
34
|
+
"spec/schema.rb",
|
35
|
+
"spec/spec.opts",
|
36
|
+
"spec/spec_helper.rb"
|
39
37
|
]
|
40
38
|
s.homepage = %q{http://github.com/mnelson/party_boy}
|
41
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
42
39
|
s.require_paths = ["lib"]
|
43
|
-
s.rubygems_version = %q{1.3
|
40
|
+
s.rubygems_version = %q{1.5.3}
|
44
41
|
s.summary = %q{Models relationships between AR models. Allows you to follow, friend, and block other AR's.}
|
45
|
-
s.test_files = [
|
46
|
-
"spec/models/both_class.rb",
|
47
|
-
"spec/models/follower_class.rb",
|
48
|
-
"spec/models/friend_class.rb",
|
49
|
-
"spec/party_boy_spec.rb",
|
50
|
-
"spec/schema.rb",
|
51
|
-
"spec/spec_helper.rb"
|
52
|
-
]
|
53
42
|
|
54
43
|
if s.respond_to? :specification_version then
|
55
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
56
44
|
s.specification_version = 3
|
57
45
|
|
58
|
-
if Gem::Version.new(Gem::
|
46
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
59
47
|
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
60
48
|
else
|
61
49
|
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: party_boy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Mike Nelson
|
@@ -14,16 +15,18 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
+
date: 2012-01-17 00:00:00 -05:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: rspec
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 13
|
27
30
|
segments:
|
28
31
|
- 1
|
29
32
|
- 2
|
@@ -42,7 +45,6 @@ extra_rdoc_files:
|
|
42
45
|
- README.rdoc
|
43
46
|
files:
|
44
47
|
- .document
|
45
|
-
- .gitignore
|
46
48
|
- LICENSE
|
47
49
|
- README.rdoc
|
48
50
|
- Rakefile
|
@@ -52,7 +54,6 @@ files:
|
|
52
54
|
- generators/party_boy/templates/model.rb
|
53
55
|
- lib/party_boy.rb
|
54
56
|
- party_boy.gemspec
|
55
|
-
- social_lite.gemspec
|
56
57
|
- spec/models/both_class.rb
|
57
58
|
- spec/models/follower_class.rb
|
58
59
|
- spec/models/friend_class.rb
|
@@ -65,35 +66,34 @@ homepage: http://github.com/mnelson/party_boy
|
|
65
66
|
licenses: []
|
66
67
|
|
67
68
|
post_install_message:
|
68
|
-
rdoc_options:
|
69
|
-
|
69
|
+
rdoc_options: []
|
70
|
+
|
70
71
|
require_paths:
|
71
72
|
- lib
|
72
73
|
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
73
75
|
requirements:
|
74
76
|
- - ">="
|
75
77
|
- !ruby/object:Gem::Version
|
78
|
+
hash: 3
|
76
79
|
segments:
|
77
80
|
- 0
|
78
81
|
version: "0"
|
79
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
80
84
|
requirements:
|
81
85
|
- - ">="
|
82
86
|
- !ruby/object:Gem::Version
|
87
|
+
hash: 3
|
83
88
|
segments:
|
84
89
|
- 0
|
85
90
|
version: "0"
|
86
91
|
requirements: []
|
87
92
|
|
88
93
|
rubyforge_project:
|
89
|
-
rubygems_version: 1.3
|
94
|
+
rubygems_version: 1.5.3
|
90
95
|
signing_key:
|
91
96
|
specification_version: 3
|
92
97
|
summary: Models relationships between AR models. Allows you to follow, friend, and block other AR's.
|
93
|
-
test_files:
|
94
|
-
|
95
|
-
- spec/models/follower_class.rb
|
96
|
-
- spec/models/friend_class.rb
|
97
|
-
- spec/party_boy_spec.rb
|
98
|
-
- spec/schema.rb
|
99
|
-
- spec/spec_helper.rb
|
98
|
+
test_files: []
|
99
|
+
|
data/.gitignore
DELETED
data/social_lite.gemspec
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{social_lite}
|
8
|
-
s.version = "0.1.0"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Mike Nelson"]
|
12
|
-
s.date = %q{2010-01-28}
|
13
|
-
s.description = %q{Models relationships between AR models. Allows you to follow, friend, and block other AR's. Consists of two acts_as: acts_as_followable and acts_as_friend. These options allow an AR to inherit either a twitter-like follower system or a facebook-like friend system.}
|
14
|
-
s.email = %q{mdnelson30@gmail.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".gitignore",
|
22
|
-
"LICENSE",
|
23
|
-
"README.rdoc",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION",
|
26
|
-
"generators/party_boy/party_boy_generator.rb",
|
27
|
-
"generators/party_boy/templates/migration.rb",
|
28
|
-
"generators/party_boy/templates/model.rb",
|
29
|
-
"lib/party_boy.rb",
|
30
|
-
"spec/models/follower_class.rb",
|
31
|
-
"spec/models/friend_class.rb",
|
32
|
-
"spec/party_boy_spec.rb",
|
33
|
-
"spec/schema.rb",
|
34
|
-
"spec/spec.opts",
|
35
|
-
"spec/spec_helper.rb"
|
36
|
-
]
|
37
|
-
s.homepage = %q{http://github.com/mnelson/social_lite}
|
38
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
39
|
-
s.require_paths = ["lib"]
|
40
|
-
s.rubygems_version = %q{1.3.5}
|
41
|
-
s.summary = %q{Models relationships between AR models. Allows you to follow, friend, and block other AR's.}
|
42
|
-
s.test_files = [
|
43
|
-
"spec/models/follower_class.rb",
|
44
|
-
"spec/models/friend_class.rb",
|
45
|
-
"spec/party_boy_spec.rb",
|
46
|
-
"spec/schema.rb",
|
47
|
-
"spec/spec_helper.rb"
|
48
|
-
]
|
49
|
-
|
50
|
-
if s.respond_to? :specification_version then
|
51
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
52
|
-
s.specification_version = 3
|
53
|
-
|
54
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
55
|
-
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
56
|
-
else
|
57
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
58
|
-
end
|
59
|
-
else
|
60
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|