transient_objects 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,5 +24,15 @@ module TransientObjects
24
24
  families
25
25
  end
26
26
 
27
+ def merge_duplicate_users structure
28
+ u1 = structure[1][0][1][0][0]
29
+ u2 = structure[1][0][1][0][1]
30
+ if u2.links.empty?
31
+ u1.merge u2
32
+ else
33
+ u2.merge u1
34
+ end
35
+ end
36
+
27
37
  end
28
38
  end
@@ -1,3 +1,3 @@
1
1
  module TransientObjects
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -44,6 +44,13 @@ module TransientObjects
44
44
  test "families" do
45
45
  assert_equal 1, @um.families.size
46
46
  end
47
+
48
+ # This needs to be tested in the main app
49
+ test "merge duplicate users" do
50
+ # @um.merge_duplicate_users @um.families[0]
51
+ # @flintstones.reload
52
+ # assert_equal 1, @flintstones.members.count
53
+ end
47
54
  end
48
55
 
49
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transient_objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-04 00:00:00.000000000 Z
12
+ date: 2013-01-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &76405080 !ruby/object:Gem::Requirement
16
+ requirement: &80613090 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.10
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *76405080
24
+ version_requirements: *80613090
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &76402990 !ruby/object:Gem::Requirement
27
+ requirement: &80610920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *76402990
35
+ version_requirements: *80610920
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &76402260 !ruby/object:Gem::Requirement
38
+ requirement: &80610310 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *76402260
46
+ version_requirements: *80610310
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec-rails
49
- requirement: &76401870 !ruby/object:Gem::Requirement
49
+ requirement: &80609780 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *76401870
57
+ version_requirements: *80609780
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: supermodel
60
- requirement: &76400920 !ruby/object:Gem::Requirement
60
+ requirement: &80609020 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *76400920
68
+ version_requirements: *80609020
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: spork
71
- requirement: &76398680 !ruby/object:Gem::Requirement
71
+ requirement: &80608000 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *76398680
79
+ version_requirements: *80608000
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: spork-rails
82
- requirement: &76423880 !ruby/object:Gem::Requirement
82
+ requirement: &80631450 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *76423880
90
+ version_requirements: *80631450
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: spork-testunit
93
- requirement: &76422200 !ruby/object:Gem::Requirement
93
+ requirement: &80630430 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *76422200
101
+ version_requirements: *80630430
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: guard-spork
104
- requirement: &76420910 !ruby/object:Gem::Requirement
104
+ requirement: &80628940 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *76420910
112
+ version_requirements: *80628940
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: guard-test
115
- requirement: &76418900 !ruby/object:Gem::Requirement
115
+ requirement: &80627020 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *76418900
123
+ version_requirements: *80627020
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: rb-inotify
126
- requirement: &76417870 !ruby/object:Gem::Requirement
126
+ requirement: &80626130 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *76417870
134
+ version_requirements: *80626130
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: libnotify
137
- requirement: &76441870 !ruby/object:Gem::Requirement
137
+ requirement: &80649920 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,7 +142,7 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *76441870
145
+ version_requirements: *80649920
146
146
  description: These objects are non-persistent, and only support persistent objects,
147
147
  controllers or views.
148
148
  email:
@@ -218,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  segments:
220
220
  - 0
221
- hash: 941647983
221
+ hash: 391946497
222
222
  required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  none: false
224
224
  requirements:
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  version: '0'
228
228
  segments:
229
229
  - 0
230
- hash: 941647983
230
+ hash: 391946497
231
231
  requirements: []
232
232
  rubyforge_project:
233
233
  rubygems_version: 1.8.15