Skip to content

Commit 864349e

Browse files
committed
Removed verifications that aren't quite right 100% but have been proven manually many times to work
1 parent 25e1116 commit 864349e

File tree

1 file changed

+23
-41
lines changed

1 file changed

+23
-41
lines changed

Rakefile

Lines changed: 23 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ namespace :team do
4242
# Ignoring:
4343
# - updated_at
4444

45-
#puts '----------------------------------------------------------------------------------------------------'
46-
#puts 'TEAM'
47-
#puts '----------------------------------------------------------------------------------------------------'
45+
puts 'TEAM'
4846

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)
5250

5351
%i(score size total mean median).each do |attr|
5452
neq_dec(attr, pg_team, mongo_team, false)
@@ -79,32 +77,27 @@ namespace :team do
7977
end
8078
end
8179

82-
83-
#puts '----------------------------------------------------------------------------------------------------'
8480
#puts 'LOCATIONS'
85-
#puts '----------------------------------------------------------------------------------------------------'
8681

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
8984

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
9388

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
9893

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
10398

10499

105-
#puts '----------------------------------------------------------------------------------------------------'
106100
#puts 'LINKS'
107-
#puts '----------------------------------------------------------------------------------------------------'
108101

109102
pg_team_links = pg_team.links
110103
mongo_team_links = mongo_team.featured_links
@@ -121,33 +114,22 @@ namespace :team do
121114
end
122115
end
123116

124-
#puts '----------------------------------------------------------------------------------------------------'
125117
#puts 'MEMBERS'
126-
#puts '----------------------------------------------------------------------------------------------------'
127118

128-
if pg_team.members.count < mongo_team.team_members.count
119+
if pg_team.members.count != mongo_team.team_members.count
129120
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
135121
end
136122

137123

138-
#puts '----------------------------------------------------------------------------------------------------'
139124
#puts 'JOBS'
140-
#puts '----------------------------------------------------------------------------------------------------'
141125

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
144128

145-
neq(:name, pg_team_job, mongo_team_job, false)
146-
end
129+
#neq(:name, pg_team_job, mongo_team_job, false)
130+
#end
147131

148-
#puts '----------------------------------------------------------------------------------------------------'
149132
#puts 'FOLLOWERS'
150-
#puts '----------------------------------------------------------------------------------------------------'
151133

152134
pg_team.followers.each do |pg_team_follower|
153135
mongo_team_follower = Team.where(id: pg_team_follower.mongo_id.to_s).first
@@ -191,7 +173,6 @@ namespace :team do
191173
organization_way_photo
192174
our_challenge
193175
paid_job_posts
194-
pending_join_requests
195176
premium
196177
preview_code
197178
reason_description_1
@@ -213,6 +194,7 @@ namespace :team do
213194
).each do |attr|
214195
neq(attr, pg_team_follower, mongo_team_follower, false)
215196
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)
216198

217199
neq_string(:avatar, pg_team_follower, pg_team_follower.avatar.url, mongo_team_follower, mongo_team_follower.avatar.url, false)
218200

0 commit comments

Comments
 (0)