dm-is-friendly 1.0.2 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -14
- data/VERSION +1 -1
- data/lib/dm-is-friendly/is/friendly.rb +27 -25
- data/spec/dm-is-friendly_spec.rb +105 -15
- data/spec/spec_helper.rb +11 -10
- metadata +102 -164
data/Rakefile
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
|
-
require 'rake/rdoctask'
|
4
3
|
|
5
4
|
begin
|
6
5
|
require 'jeweler'
|
@@ -10,13 +9,10 @@ begin
|
|
10
9
|
gemspec.email = "kabari@gmail.com"
|
11
10
|
gemspec.homepage = "http://github.com/RipTheJacker/dm-is-friendly"
|
12
11
|
gemspec.authors = ["RipTheJacker"]
|
13
|
-
|
12
|
+
|
14
13
|
gemspec.has_rdoc = 'yard'
|
15
14
|
gemspec.files = Dir['Rakefile', '{lib,spec}/**/*', 'README*', 'LICENSE*', 'VERSION'] - ['spec/log/dm.log']
|
16
|
-
|
17
|
-
gemspec.add_development_dependency("rspec", "~> 2.1.0")
|
18
|
-
gemspec.add_development_dependency("jeweler")
|
19
|
-
gemspec.add_dependency("dm-core", "~> 1.0.2")
|
15
|
+
|
20
16
|
end
|
21
17
|
Jeweler::GemcutterTasks.new
|
22
18
|
rescue LoadError => e
|
@@ -33,7 +29,7 @@ begin
|
|
33
29
|
t.rcov = true
|
34
30
|
t.rcov_opts = %[-Ilib -Ispec --exclude "spec/spec_helper.rb"]
|
35
31
|
t.rcov_opts << %[--no-html --aggregate coverage.data]
|
36
|
-
end
|
32
|
+
end
|
37
33
|
rescue LoadError
|
38
34
|
task :spec do
|
39
35
|
abort "RSpec gem is not available. In order to test use: bundle install"
|
@@ -45,13 +41,6 @@ end
|
|
45
41
|
task :default => :spec
|
46
42
|
|
47
43
|
|
48
|
-
Rake::RDocTask.new do |rdoc|
|
49
|
-
rdoc.rdoc_dir = 'rdoc'
|
50
|
-
rdoc.title = "dm-is-friendly 1.0.2"
|
51
|
-
rdoc.rdoc_files.include('README*')
|
52
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
-
end
|
54
|
-
|
55
44
|
begin
|
56
45
|
require 'reek/adapters/rake_task'
|
57
46
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.2
|
@@ -5,47 +5,49 @@ module DataMapper
|
|
5
5
|
|
6
6
|
def is_friendly(options = {})
|
7
7
|
options = {:require_acceptance => true, :friendship_class => "Friendship" }.merge(options)
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
|
9
|
+
list = self.name.split("::")
|
10
|
+
list.shift if DataMapper::Ext.blank?(list.first)
|
11
11
|
reference_model = self
|
12
|
-
reference_model_name =
|
12
|
+
reference_model_name = list.pop
|
13
|
+
reference_model_key = DataMapper::Inflector.underscore(reference_model_name).to_sym
|
13
14
|
|
14
|
-
Object.
|
15
|
-
DataMapper::Model.new do
|
16
|
-
if options[:require_acceptance]
|
17
|
-
property :accepted_at, DateTime
|
18
|
-
end
|
15
|
+
namespace = list.empty? ? ::Object : DataMapper::Ext::Object.full_const_get(list.join('::'))
|
19
16
|
|
20
|
-
|
21
|
-
|
17
|
+
@friendly_config = FriendlyConfig.new(reference_model_name, "#{namespace}::#{options[:friendship_class]}", options[:require_acceptance])
|
18
|
+
def self.friendly_config; @friendly_config; end
|
19
|
+
|
20
|
+
DataMapper::Model.new(options[:friendship_class], namespace) do
|
21
|
+
if options[:require_acceptance]
|
22
|
+
property :accepted_at, DateTime
|
22
23
|
end
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
|
25
|
+
belongs_to reference_model_key, reference_model, :key => true
|
26
|
+
belongs_to :friend, :model => reference_model, :child_key => [:friend_id], :key => true
|
27
|
+
end
|
26
28
|
|
27
29
|
has n, :friendships, :model => options[:friendship_class]
|
28
30
|
|
29
|
-
has n, :friends_by_me, self, :through => :friendships, :via =>
|
30
|
-
has n, :friended_by, self, :through => :friendships, :via =>
|
31
|
+
has n, :friends_by_me, self, :through => :friendships, :via => reference_model_key
|
32
|
+
has n, :friended_by, self, :through => :friendships, :via => reference_model_key
|
31
33
|
|
32
34
|
include DataMapper::Is::Friendly::InstanceMethods
|
33
35
|
end
|
34
36
|
|
35
37
|
# This class holds the configuration options for the plugin.
|
36
38
|
class FriendlyConfig
|
37
|
-
attr_reader :
|
39
|
+
attr_reader :reference_model_name, :friendship_foreign_key, :friend_foreign_key
|
38
40
|
|
39
|
-
def initialize(
|
40
|
-
@
|
41
|
-
@friendship_class_name =
|
42
|
-
@friendship_foreign_key = DataMapper::Inflector.foreign_key(@
|
41
|
+
def initialize(ref_model_name, friendship_class, require_acceptance)
|
42
|
+
@reference_model_name = ref_model_name
|
43
|
+
@friendship_class_name = friendship_class
|
44
|
+
@friendship_foreign_key = DataMapper::Inflector.foreign_key(@reference_model_name).to_sym
|
43
45
|
@friend_foreign_key = DataMapper::Inflector.foreign_key(@friendship_class_name).to_sym
|
44
|
-
@require_acceptance =
|
46
|
+
@require_acceptance = require_acceptance
|
45
47
|
end
|
46
48
|
|
47
49
|
def friendship_class
|
48
|
-
Object.full_const_get(@friendship_class_name)
|
50
|
+
DataMapper::Ext::Object.full_const_get(@friendship_class_name)
|
49
51
|
end
|
50
52
|
|
51
53
|
def require_acceptance?
|
@@ -84,7 +86,7 @@ module DataMapper
|
|
84
86
|
friend_scope_condition(conditions, friend, true)
|
85
87
|
|
86
88
|
conditions[:friend_id] = self.id
|
87
|
-
friendly_config.friendship_class.all(conditions).send(friendly_config.
|
89
|
+
friendly_config.friendship_class.all(conditions).send(friendly_config.reference_model_name.downcase)
|
88
90
|
end
|
89
91
|
|
90
92
|
# see if there is a pending friendship request from this person to another
|
@@ -157,4 +159,4 @@ module DataMapper
|
|
157
159
|
end
|
158
160
|
end # Friendly
|
159
161
|
end # Is
|
160
|
-
end # DataMapper
|
162
|
+
end # DataMapper
|
data/spec/dm-is-friendly_spec.rb
CHANGED
@@ -20,13 +20,15 @@ describe DataMapper::Is::Friendly do
|
|
20
20
|
|
21
21
|
module SomeModule
|
22
22
|
class Member
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
include DataMapper::Resource
|
24
|
+
property :id, Serial
|
25
|
+
property :name, String
|
26
|
+
|
27
|
+
is :friendly
|
28
28
|
end
|
29
29
|
end
|
30
|
+
|
31
|
+
DataMapper.finalize
|
30
32
|
end
|
31
33
|
|
32
34
|
describe "configuration" do
|
@@ -34,8 +36,9 @@ describe DataMapper::Is::Friendly do
|
|
34
36
|
context "default" do
|
35
37
|
it "should have proper options set" do
|
36
38
|
Person.friendly_config.friendship_class.to_s.should == "Friendship"
|
37
|
-
Person.friendly_config.
|
39
|
+
Person.friendly_config.reference_model_name.should == "Person"
|
38
40
|
Person.friendly_config.friendship_foreign_key.should == :person_id
|
41
|
+
Person.friendly_config.friend_foreign_key.should == :friendship_id
|
39
42
|
Person.friendly_config.require_acceptance?.should == true
|
40
43
|
end
|
41
44
|
end
|
@@ -43,32 +46,47 @@ describe DataMapper::Is::Friendly do
|
|
43
46
|
context "friendship_class and acceptance set" do
|
44
47
|
it "should have proper options set" do
|
45
48
|
Member.friendly_config.friendship_class.to_s.should == "Membership"
|
46
|
-
Member.friendly_config.
|
49
|
+
Member.friendly_config.reference_model_name.should == "Member"
|
47
50
|
Member.friendly_config.friendship_foreign_key.should == :member_id
|
51
|
+
Member.friendly_config.friend_foreign_key.should == :membership_id
|
48
52
|
Member.friendly_config.require_acceptance?.should == false
|
49
53
|
end
|
50
54
|
end
|
51
55
|
|
52
56
|
context "with a namespace" do
|
53
|
-
|
54
|
-
SomeModule::Member.friendly_config.friendship_class.to_s.should == "Friendship"
|
55
|
-
SomeModule::Member.friendly_config.
|
56
|
-
SomeModule::Member.friendly_config.friendship_foreign_key.should == :
|
57
|
+
it "should have proper options set" do
|
58
|
+
SomeModule::Member.friendly_config.friendship_class.to_s.should == "SomeModule::Friendship"
|
59
|
+
SomeModule::Member.friendly_config.reference_model_name.should == "Member"
|
60
|
+
SomeModule::Member.friendly_config.friendship_foreign_key.should == :member_id
|
61
|
+
SomeModule::Member.friendly_config.friend_foreign_key.should == :friendship_id
|
57
62
|
SomeModule::Member.friendly_config.require_acceptance?.should == true
|
58
63
|
end
|
59
64
|
end
|
65
|
+
|
66
|
+
it "should create DataMapper::Model classes for relationships" do
|
67
|
+
Membership.should be_kind_of(DataMapper::Model)
|
68
|
+
Friendship.should be_kind_of(DataMapper::Model)
|
69
|
+
SomeModule::Friendship.should be_kind_of(DataMapper::Model)
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should add friendship classes to DataMapper::Model.descendants" do
|
73
|
+
DataMapper::Model.descendants.should include(Membership)
|
74
|
+
DataMapper::Model.descendants.should include(Friendship)
|
75
|
+
DataMapper::Model.descendants.should include(SomeModule::Friendship)
|
76
|
+
end
|
60
77
|
end
|
61
78
|
|
62
79
|
with_adapters do
|
63
80
|
|
64
81
|
describe "default" do
|
65
82
|
before(:all) do
|
66
|
-
DataMapper.auto_migrate!
|
83
|
+
DataMapper.auto_migrate!
|
84
|
+
|
67
85
|
@quentin = Person.create(:name => "quentin")
|
68
86
|
@aaron = Person.create(:name => "aaron")
|
69
87
|
@joe = Person.create(:name => "joe")
|
70
88
|
end
|
71
|
-
|
89
|
+
|
72
90
|
it "should work" do
|
73
91
|
lambda do
|
74
92
|
@joe.request_friendship(@quentin)
|
@@ -135,12 +153,12 @@ describe DataMapper::Is::Friendly do
|
|
135
153
|
describe "without requiring acceptance" do
|
136
154
|
before(:all) do
|
137
155
|
DataMapper.auto_migrate!
|
138
|
-
|
156
|
+
|
139
157
|
@quentin = Member.create(:name => "quentin")
|
140
158
|
@aaron = Member.create(:name => "aaron")
|
141
159
|
@joe = Member.create(:name => "joe")
|
142
160
|
end
|
143
|
-
|
161
|
+
|
144
162
|
it "should work" do
|
145
163
|
lambda do
|
146
164
|
@joe.request_friendship(@quentin)
|
@@ -192,5 +210,77 @@ describe DataMapper::Is::Friendly do
|
|
192
210
|
end
|
193
211
|
|
194
212
|
end
|
213
|
+
|
214
|
+
describe "nested" do
|
215
|
+
before(:all) do
|
216
|
+
DataMapper.auto_migrate!
|
217
|
+
|
218
|
+
@quentin = SomeModule::Member.create(:name => "quentin")
|
219
|
+
@aaron = SomeModule::Member.create(:name => "aaron")
|
220
|
+
@joe = SomeModule::Member.create(:name => "joe")
|
221
|
+
end
|
222
|
+
|
223
|
+
it "should work" do
|
224
|
+
lambda do
|
225
|
+
@joe.request_friendship(@quentin)
|
226
|
+
end.should change(SomeModule::Friendship, :count).by(1)
|
227
|
+
end
|
228
|
+
|
229
|
+
it "should only recognize friends that are confirmed" do
|
230
|
+
@joe.friends.should_not include(@quentin)
|
231
|
+
@quentin.friends.should_not include(@joe)
|
232
|
+
end
|
233
|
+
|
234
|
+
it "should set the proper relationships" do
|
235
|
+
@quentin.friendship_requests.should_not include(@joe)
|
236
|
+
@joe.friendship_requests.should include(@quentin)
|
237
|
+
@quentin.friendships_to_accept.should include(@joe)
|
238
|
+
@joe.friendships_to_accept.should_not include(@quentin)
|
239
|
+
end
|
240
|
+
|
241
|
+
it "should also work with convenience methods" do
|
242
|
+
@quentin.friendship_to_accept?(@joe).should be_true
|
243
|
+
@joe.friendship_requested?(@quentin).should be_true
|
244
|
+
end
|
245
|
+
|
246
|
+
it "should have to be confirmed" do
|
247
|
+
# confirm the request
|
248
|
+
@quentin.confirm_friendship_with(@joe)
|
249
|
+
|
250
|
+
# see if associations are correct
|
251
|
+
@quentin.friends.should include(@joe)
|
252
|
+
@joe.friends.should include(@quentin)
|
253
|
+
|
254
|
+
@quentin.friendship_to_accept?(@joe).should be_false
|
255
|
+
@joe.friendship_requested?(@quentin).should be_false
|
256
|
+
end
|
257
|
+
|
258
|
+
it "should not be added twice" do
|
259
|
+
lambda do
|
260
|
+
@joe.request_friendship(@quentin)
|
261
|
+
@joe.should have(1).friends
|
262
|
+
@quentin.should have(1).friends
|
263
|
+
end.should_not change(Friendship,:count)
|
264
|
+
end
|
265
|
+
|
266
|
+
it "should be able to have multiple friends" do
|
267
|
+
@joe.request_friendship(@aaron)
|
268
|
+
@joe.friendship_requested?(@aaron).should be_true
|
269
|
+
@aaron.friendship_to_accept?(@joe).should be_true
|
270
|
+
end
|
271
|
+
|
272
|
+
it "should be able to delete friendships" do
|
273
|
+
lambda do
|
274
|
+
@quentin.end_friendship_with(@joe)
|
275
|
+
end.should change(SomeModule::Friendship,:count)
|
276
|
+
|
277
|
+
@quentin.reload; @joe.reload
|
278
|
+
|
279
|
+
@quentin.friends.should_not include(@joe)
|
280
|
+
@joe.friends.should_not include(@quentin)
|
281
|
+
end
|
282
|
+
|
283
|
+
end
|
284
|
+
|
195
285
|
end
|
196
286
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -23,16 +23,17 @@ ENV['LOG'] ||= "file"
|
|
23
23
|
|
24
24
|
ADAPTERS = ENV["ADAPTERS"].split(' ')
|
25
25
|
|
26
|
-
DRIVERS = {
|
26
|
+
DRIVERS = {
|
27
27
|
:sqlite => 'sqlite3::memory:',
|
28
|
-
:mysql => 'mysql://datamapper:datamapper@localhost/
|
29
|
-
:postgres => 'postgres://
|
28
|
+
:mysql => 'mysql://datamapper:datamapper@localhost/dm_plugin_test',
|
29
|
+
:postgres => 'postgres://datamapper:datamapper@localhost/dm_plugin_test'
|
30
30
|
}
|
31
31
|
|
32
32
|
def load_driver(name, default_uri)
|
33
33
|
return false unless DRIVERS[name]
|
34
|
-
|
34
|
+
|
35
35
|
begin
|
36
|
+
# DataMapper::Logger.new('./spec/log/dm.log')
|
36
37
|
DataMapper.setup(name, ENV["#{name.to_s.upcase}_SPEC_URI"] || default_uri)
|
37
38
|
DataMapper::Repository.adapters[:default] = DataMapper::Repository.adapters[name]
|
38
39
|
true
|
@@ -49,16 +50,16 @@ module SpecAdapterHelper
|
|
49
50
|
before(:all) do
|
50
51
|
load_driver(adapter.to_sym, ::DRIVERS[adapter.to_sym])
|
51
52
|
end
|
52
|
-
|
53
|
+
|
53
54
|
instance_eval(&block)
|
54
55
|
end
|
55
56
|
end
|
56
57
|
end
|
57
|
-
|
58
|
+
|
58
59
|
def self.extended(base)
|
59
|
-
base.class_eval do
|
60
|
+
base.class_eval do
|
60
61
|
def log(msg)
|
61
|
-
DataMapper.logger.
|
62
|
+
DataMapper.logger.debug("****** #{msg}")
|
62
63
|
end
|
63
64
|
end
|
64
65
|
end
|
@@ -66,10 +67,10 @@ module SpecAdapterHelper
|
|
66
67
|
end
|
67
68
|
|
68
69
|
RSpec.configure do |config|
|
69
|
-
|
70
|
+
|
70
71
|
config.extend( DataMapper::Spec::Adapters::Helpers)
|
71
72
|
config.extend(SpecAdapterHelper)
|
72
|
-
|
73
|
+
|
73
74
|
config.after :all do
|
74
75
|
DataMapper::Spec.cleanup_models
|
75
76
|
end
|
metadata
CHANGED
@@ -1,190 +1,136 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-is-friendly
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 2
|
10
|
-
version: 1.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.2
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- RipTheJacker
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
name: activesupport
|
25
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
12
|
+
date: 2012-11-23 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: dm-core
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
26
17
|
none: false
|
27
|
-
requirements:
|
18
|
+
requirements:
|
28
19
|
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
|
31
|
-
segments:
|
32
|
-
- 3
|
33
|
-
- 0
|
34
|
-
- 0
|
35
|
-
version: 3.0.0
|
36
|
-
requirement: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.2.0
|
38
22
|
type: :runtime
|
39
23
|
prerelease: false
|
40
|
-
|
41
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
25
|
none: false
|
43
|
-
requirements:
|
26
|
+
requirements:
|
44
27
|
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
|
47
|
-
|
48
|
-
- 1
|
49
|
-
- 0
|
50
|
-
- 2
|
51
|
-
version: 1.0.2
|
52
|
-
requirement: *id002
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.2.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
56
31
|
name: rake
|
57
|
-
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
58
33
|
none: false
|
59
|
-
requirements:
|
60
|
-
- -
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
|
63
|
-
segments:
|
64
|
-
- 0
|
65
|
-
- 8
|
66
|
-
- 7
|
67
|
-
version: 0.8.7
|
68
|
-
requirement: *id003
|
69
|
-
- !ruby/object:Gem::Dependency
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
70
38
|
type: :development
|
71
39
|
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
72
47
|
name: rspec
|
73
|
-
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
74
49
|
none: false
|
75
|
-
requirements:
|
50
|
+
requirements:
|
76
51
|
- - ~>
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
|
79
|
-
segments:
|
80
|
-
- 2
|
81
|
-
- 1
|
82
|
-
- 0
|
83
|
-
version: 2.1.0
|
84
|
-
requirement: *id004
|
85
|
-
- !ruby/object:Gem::Dependency
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 2.12.0
|
86
54
|
type: :development
|
87
55
|
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.12.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
88
63
|
name: jeweler
|
89
|
-
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
90
65
|
none: false
|
91
|
-
requirements:
|
66
|
+
requirements:
|
92
67
|
- - ~>
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
|
95
|
-
segments:
|
96
|
-
- 1
|
97
|
-
- 4
|
98
|
-
version: "1.4"
|
99
|
-
requirement: *id005
|
100
|
-
- !ruby/object:Gem::Dependency
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.4'
|
101
70
|
type: :development
|
102
71
|
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.4'
|
78
|
+
- !ruby/object:Gem::Dependency
|
103
79
|
name: dm-aggregates
|
104
|
-
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
105
81
|
none: false
|
106
|
-
requirements:
|
82
|
+
requirements:
|
107
83
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
110
|
-
segments:
|
111
|
-
- 1
|
112
|
-
- 0
|
113
|
-
- 2
|
114
|
-
version: 1.0.2
|
115
|
-
requirement: *id006
|
116
|
-
- !ruby/object:Gem::Dependency
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 1.2.0
|
117
86
|
type: :development
|
118
87
|
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.2.0
|
94
|
+
- !ruby/object:Gem::Dependency
|
119
95
|
name: dm-types
|
120
|
-
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
121
97
|
none: false
|
122
|
-
requirements:
|
98
|
+
requirements:
|
123
99
|
- - ~>
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
|
126
|
-
segments:
|
127
|
-
- 1
|
128
|
-
- 0
|
129
|
-
- 2
|
130
|
-
version: 1.0.2
|
131
|
-
requirement: *id007
|
132
|
-
- !ruby/object:Gem::Dependency
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 1.2.0
|
133
102
|
type: :development
|
134
103
|
prerelease: false
|
135
|
-
|
136
|
-
version_requirements: &id008 !ruby/object:Gem::Requirement
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
105
|
none: false
|
138
|
-
requirements:
|
106
|
+
requirements:
|
139
107
|
- - ~>
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
- 0
|
146
|
-
version: 2.1.0
|
147
|
-
requirement: *id008
|
148
|
-
- !ruby/object:Gem::Dependency
|
149
|
-
type: :development
|
150
|
-
prerelease: false
|
151
|
-
name: jeweler
|
152
|
-
version_requirements: &id009 !ruby/object:Gem::Requirement
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.2.0
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: dm-migrations
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
153
113
|
none: false
|
154
|
-
requirements:
|
155
|
-
- -
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
|
158
|
-
|
159
|
-
- 0
|
160
|
-
version: "0"
|
161
|
-
requirement: *id009
|
162
|
-
- !ruby/object:Gem::Dependency
|
163
|
-
type: :runtime
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.2.0
|
118
|
+
type: :development
|
164
119
|
prerelease: false
|
165
|
-
|
166
|
-
version_requirements: &id010 !ruby/object:Gem::Requirement
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
167
121
|
none: false
|
168
|
-
requirements:
|
122
|
+
requirements:
|
169
123
|
- - ~>
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
|
172
|
-
segments:
|
173
|
-
- 1
|
174
|
-
- 0
|
175
|
-
- 2
|
176
|
-
version: 1.0.2
|
177
|
-
requirement: *id010
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 1.2.0
|
178
126
|
description:
|
179
127
|
email: kabari@gmail.com
|
180
128
|
executables: []
|
181
|
-
|
182
129
|
extensions: []
|
183
|
-
|
184
|
-
extra_rdoc_files:
|
130
|
+
extra_rdoc_files:
|
185
131
|
- LICENSE
|
186
132
|
- README.markdown
|
187
|
-
files:
|
133
|
+
files:
|
188
134
|
- LICENSE
|
189
135
|
- README.markdown
|
190
136
|
- Rakefile
|
@@ -193,40 +139,32 @@ files:
|
|
193
139
|
- lib/dm-is-friendly/is/friendly.rb
|
194
140
|
- spec/dm-is-friendly_spec.rb
|
195
141
|
- spec/spec_helper.rb
|
196
|
-
has_rdoc: yard
|
197
142
|
homepage: http://github.com/RipTheJacker/dm-is-friendly
|
198
143
|
licenses: []
|
199
|
-
|
200
144
|
post_install_message:
|
201
145
|
rdoc_options: []
|
202
|
-
|
203
|
-
require_paths:
|
146
|
+
require_paths:
|
204
147
|
- lib
|
205
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
206
149
|
none: false
|
207
|
-
requirements:
|
208
|
-
- -
|
209
|
-
- !ruby/object:Gem::Version
|
210
|
-
|
211
|
-
segments:
|
150
|
+
requirements:
|
151
|
+
- - ! '>='
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
segments:
|
212
155
|
- 0
|
213
|
-
|
214
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
+
hash: -97200408363854928
|
157
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
158
|
none: false
|
216
|
-
requirements:
|
217
|
-
- -
|
218
|
-
- !ruby/object:Gem::Version
|
219
|
-
|
220
|
-
segments:
|
221
|
-
- 0
|
222
|
-
version: "0"
|
159
|
+
requirements:
|
160
|
+
- - ! '>='
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
223
163
|
requirements: []
|
224
|
-
|
225
164
|
rubyforge_project:
|
226
|
-
rubygems_version: 1.
|
165
|
+
rubygems_version: 1.8.24
|
227
166
|
signing_key:
|
228
167
|
specification_version: 3
|
229
|
-
summary: DataMapper plugin that adds self-referential friendship functionality to
|
230
|
-
|
231
|
-
|
232
|
-
- spec/spec_helper.rb
|
168
|
+
summary: DataMapper plugin that adds self-referential friendship functionality to
|
169
|
+
your models.
|
170
|
+
test_files: []
|