@@ -42,13 +42,11 @@ namespace :team do
42
42
# Ignoring:
43
43
# - updated_at
44
44
45
- #puts '----------------------------------------------------------------------------------------------------'
46
- #puts 'TEAM'
47
- #puts '----------------------------------------------------------------------------------------------------'
45
+ puts 'TEAM'
48
46
49
- %i( slug pending_join_requests ) . each do | attr |
50
- neq ( attr , pg_team , mongo_team , false )
51
- end
47
+ neq ( : slug, pg_team , mongo_team , false )
48
+
49
+ neq_string ( :pending_join_requests , pg_team , pg_team . pending_join_requests . map ( & :to_i ) . sort . join ( ', ' ) , mongo_team , mongo_team . pending_join_requests . map ( & :to_i ) . sort . join ( ', ' ) , false )
52
50
53
51
%i( score size total mean median ) . each do |attr |
54
52
neq_dec ( attr , pg_team , mongo_team , false )
@@ -79,32 +77,27 @@ namespace :team do
79
77
end
80
78
end
81
79
82
-
83
- #puts '----------------------------------------------------------------------------------------------------'
84
80
#puts 'LOCATIONS'
85
- #puts '----------------------------------------------------------------------------------------------------'
86
81
87
- pg_team_locations = pg_team . locations
88
- mongo_team_locations = mongo_team . team_locations
82
+ # pg_team_locations = pg_team.locations
83
+ # mongo_team_locations = mongo_team.team_locations
89
84
90
- if mongo_team_locations . count != pg_team_locations . count
91
- puts "locations | pg:#{ pg_team . id } | mongo:#{ mongo_team . id } | #{ mongo_team_locations . count } != #{ pg_team_locations . count } "
92
- end
85
+ # if mongo_team_locations.count != pg_team_locations.count
86
+ # puts "locations | pg:#{pg_team.id} | mongo:#{mongo_team.id}| #{mongo_team_locations.count} != #{pg_team_locations.count}"
87
+ # end
93
88
94
- # Ignoring:
95
- # - points_of_interest
96
- pg_team . locations . each do |pg_team_location |
97
- mongo_team_location = mongo_team . team_locations . select { |tl | tl . name == pg_team_location . name } . first
89
+ ## Ignoring:
90
+ ## - points_of_interest
91
+ # pg_team.locations.each do |pg_team_location|
92
+ # mongo_team_location = mongo_team.team_locations.select { |tl| tl.name == pg_team_location.name }.first
98
93
99
- %i( address city country description name state_code ) . each do |attr |
100
- neq ( attr , pg_team_location , mongo_team_location , false )
101
- end
102
- end
94
+ # %i(address city country description name state_code).each do |attr|
95
+ # neq(attr, pg_team_location, mongo_team_location, false)
96
+ # end
97
+ # end
103
98
104
99
105
- #puts '----------------------------------------------------------------------------------------------------'
106
100
#puts 'LINKS'
107
- #puts '----------------------------------------------------------------------------------------------------'
108
101
109
102
pg_team_links = pg_team . links
110
103
mongo_team_links = mongo_team . featured_links
@@ -121,33 +114,22 @@ namespace :team do
121
114
end
122
115
end
123
116
124
- #puts '----------------------------------------------------------------------------------------------------'
125
117
#puts 'MEMBERS'
126
- #puts '----------------------------------------------------------------------------------------------------'
127
118
128
- if pg_team . members . count < mongo_team . team_members . count
119
+ if pg_team . members . count != mongo_team . team_members . count
129
120
puts "members | pg:#{ pg_team . id } | mongo:#{ mongo_team . id } | #{ pg_team . members . count } < #{ mongo_team . team_members . count } "
130
-
131
- ap pg_team . members . count
132
- ap mongo_team . team_members . count
133
-
134
- #require 'pry'; binding.pry
135
121
end
136
122
137
123
138
- #puts '----------------------------------------------------------------------------------------------------'
139
124
#puts 'JOBS'
140
- #puts '----------------------------------------------------------------------------------------------------'
141
125
142
- pg_team . jobs . each do |pg_team_job |
143
- mongo_team_job = Team . where ( id : pg_team_job . team_document_id . to_s ) . first
126
+ # pg_team.jobs.each do |pg_team_job|
127
+ # mongo_team_job = Team.where(id: pg_team_job.team_document_id.to_s).first
144
128
145
- neq ( :name , pg_team_job , mongo_team_job , false )
146
- end
129
+ # neq(:name, pg_team_job, mongo_team_job, false)
130
+ # end
147
131
148
- #puts '----------------------------------------------------------------------------------------------------'
149
132
#puts 'FOLLOWERS'
150
- #puts '----------------------------------------------------------------------------------------------------'
151
133
152
134
pg_team . followers . each do |pg_team_follower |
153
135
mongo_team_follower = Team . where ( id : pg_team_follower . mongo_id . to_s ) . first
@@ -191,7 +173,6 @@ namespace :team do
191
173
organization_way_photo
192
174
our_challenge
193
175
paid_job_posts
194
- pending_join_requests
195
176
premium
196
177
preview_code
197
178
reason_description_1
@@ -213,6 +194,7 @@ namespace :team do
213
194
) . each do |attr |
214
195
neq ( attr , pg_team_follower , mongo_team_follower , false )
215
196
end
197
+ neq_string ( :pending_join_requests , pg_team_follower , pg_team_follower . pending_join_requests . map ( &:to_i ) . sort . join ( ', ' ) , mongo_team_follower , mongo_team_follower . pending_join_requests . map ( &:to_i ) . sort . join ( ', ' ) , false )
216
198
217
199
neq_string ( :avatar , pg_team_follower , pg_team_follower . avatar . url , mongo_team_follower , mongo_team_follower . avatar . url , false )
218
200
0 commit comments