File tree 1 file changed +33
-10
lines changed
1 file changed +33
-10
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,19 @@ namespace :team do
21
21
right = mongo . send ( attr )
22
22
23
23
if left != right
24
- puts "#{ attr } #{ left } != #{ right } (#{ pg . id } |#{ mongo . id } )"
25
-
26
- if fail_if_neq
27
- require 'pry' ; binding . pry
28
- end
24
+ puts "#{ attr } | #{ left } != #{ right } | pg:#{ pg . id } | mongo:#{ mongo . id } "
29
25
end
26
+ rescue => ex
27
+ puts '*' *80
28
+ puts
29
+ puts ex
30
+ puts
31
+ puts '-' *80
32
+ puts
33
+ ap ex . backtrace
34
+ puts
35
+ puts '*' *80
36
+ require 'pry' ; binding . pry
30
37
end
31
38
32
39
task verify : :environment do
@@ -35,20 +42,36 @@ namespace :team do
35
42
mongo_id = pg_team . mongo_id
36
43
mongo_team = Team . find ( mongo_id )
37
44
38
-
45
+ # Team
39
46
%i( updated_at median score total slug mean pending_join_requests ) . each do |attr |
40
47
neq ( attr , pg_team , mongo_team , false )
41
48
end
42
49
43
-
44
50
%i( about achievement_count analytics benefit_description_1 benefit_description_2 benefit_description_3 benefit_name_1 benefit_name_2 benefit_name_3 big_image big_quote blog_feed branding country_id created_at endorsement_count facebook featured_banner_image featured_links_title github github_organization_name headline hide_from_featured highlight_tags hiring_tagline interview_steps invited_emails link_to_careers_page location monthly_subscription name number_of_jobs_to_show office_photos organization_way organization_way_name organization_way_photo our_challenge paid_job_posts premium preview_code reason_description_1 reason_description_2 reason_description_3 reason_name_1 reason_name_2 reason_name_3 size stack_list twitter upcoming_events upgraded_at valid_jobs website why_work_image your_impact youtube_url ) . each do |attr |
45
51
neq ( attr , pg_team , mongo_team )
46
52
end
47
- rescue => ex
48
53
49
- ap ex
54
+ # TODO: Account
55
+ unless mongo_team . account . nil? || pg_team . account . nil?
56
+ %i( stripe_card_token stripe_customer_token admin_id ) . each do |attr |
57
+ neq ( attr , pg_team . account , mongo_team . account )
58
+ end
59
+ end
60
+
61
+ # TODO: Plans
62
+
63
+ # TODO: Locations
64
+
65
+ # TODO: Links
66
+
67
+ # TODO: Members
68
+
69
+ # TODO: Jobs
70
+
71
+ # TODO: Followers
72
+
73
+ # TODO: Pending Requests
50
74
51
- require 'pry' ; binding . pry
52
75
end
53
76
end
54
77
end
You can’t perform that action at this time.
0 commit comments