Skip to content

Commit

Permalink
Release #488, #489
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr0grog committed Feb 22, 2019
2 parents bc52855 + 658ae8c commit 68a48e3
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ GEM
aws-sigv4 (1.0.3)
bcrypt (3.1.12)
bindex (0.5.0)
bootsnap (1.3.2)
bootsnap (1.4.0)
msgpack (~> 1.0)
builder (3.2.3)
byebug (10.0.2)
Expand Down Expand Up @@ -140,7 +140,7 @@ GEM
mini_portile2 (2.4.0)
minitest (5.11.3)
mono_logger (1.1.0)
msgpack (1.2.4)
msgpack (1.2.6)
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
Expand Down Expand Up @@ -336,4 +336,4 @@ RUBY VERSION
ruby 2.5.1p57

BUNDLED WITH
1.16.4
1.17.3
20 changes: 18 additions & 2 deletions app/views/invitation_mailer/invitation_email.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
<p>
Thanks for volunteering to help analyze changes to government web pages for EDGI! To set up your account, point your web browser to:
Thank you for signing up to test our website monitoring software, Scanner!
</p>
<p>
Scanner is currently a work in progress and we'd like to be upfront about various limitations and concerns that we have.
</p>
<p>
Primarily, we're concerned about erroneous interpretation of changes to webpages that may propagate through social media, news media, or the public more widely. We have seen this happen many times through our work monitoring changes to environmental, climate, and energy websites: <%= link_to "https://envirodatagov.org/website-monitoring", "https://envirodatagov.org/website-monitoring" %>
</p>
In the past, people have jumped to conclusions from the changes they see on monitored web sites, assuming data is removed based on a single missing link or a temporary bug on a government web server. The changes you see in Scanner are a great jumping-off point for further research, but remember they are not the whole story, especially if those changes are extremely recent.
</p>
<p>
Scanner may present certain changes wrongly or mislead users in ways that we cannot yet predict or anticipate. We are working to understand these limitations, but for this reason, we are being careful about who gets access to our platform early on. In the long term, we would love for Scanner to be a public platform for all to use, but we'd like to think about harms and impacts carefully before a public release.
</p>
<p>
Please do not disseminate information about Scanner or share credentials for Scanner. We'd love for you to check it out and give us feedback in any form that you see fit. You can also follow along with our software development work on GitHub: <%= link_to "https://github.com/edgi-govdata-archiving/web-monitoring", "https://github.com/edgi-govdata-archiving/web-monitoring" %> or chat with us on Slack: <%= link_to "https://archivers-slack.herokuapp.com/", "https://archivers-slack.herokuapp.com/" %>
</p>
<p>
To set up your account, point your web browser to:
</p>

<p>
<%= link_to @url, @url %>
</p>
16 changes: 14 additions & 2 deletions app/views/invitation_mailer/invitation_email.text.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Thanks for volunteering to help analyze changes to government web pages for EDGI! To set up your account, point your web browser to:
Thank you for signing up to test our website monitoring software, Scanner!

<%= @url %>
Scanner is currently a work in progress and we'd like to be upfront about various limitations and concerns that we have.

Primarily, we're concerned about erroneous interpretation of changes to webpages that may propagate through social media, news media, or the public more widely. We have seen this happen many times through our work monitoring changes to environmental, climate, and energy websites: https://envirodatagov.org/website-monitoring

In the past, people have jumped to conclusions from the changes they see on monitored web sites, assuming data is removed based on a single missing link or a temporary bug on a government web server. The changes you see in Scanner are a great jumping-off point for further research, but remember they are not the whole story, especially if those changes are extremely recent.

Scanner may present certain changes wrongly or mislead users in ways that we cannot yet predict or anticipate. We are working to understand these limitations, but for this reason, we are being careful about who gets access to our platform early on. In the long term, we would love for Scanner to be a public platform for all to use, but we'd like to think about harms and impacts carefully before a public release.

Please do not disseminate information about Scanner or share credentials for Scanner. We'd love for you to check it out and give us feedback in any form that you see fit. You can also follow along with our software development work on GitHub: https://github.com/edgi-govdata-archiving/web-monitoring -- or chat with us on Slack: https://archivers-slack.herokuapp.com/

To set up your account, point your web browser to:

<%= @url %>
31 changes: 28 additions & 3 deletions test/mailers/invitation_mailer_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
require 'test_helper'

class InvitationMailerTest < ActionMailer::TestCase
# test "the truth" do
# assert true
# end
# Make it possible to generate URLs. In mailer tests, URL helpers are missing
# the action_mailer URL configuration.
# NOTE: this is handled automatically in RSpec
include Rails.application.routes.url_helpers
def mail_url(route, options = nil)
url_for([
route,
Rails.application.config.action_mailer.default_url_options.merge(options)
])
end

def test_send_invitation_email
invitation = Invitation.create(email: "test@email.com")
invitation.update_attributes(code: "eff7df8ccc0cd0256619")
email = InvitationMailer.invitation_email(invitation)

assert_emails 1 do
email.deliver_now
end

assert_equal "Welcome to EDGI web monitoring", email.subject
assert_equal [ENV.fetch('MAIL_SENDER', 'web-monitoring-db@envirodatagov.org')], email.from
assert_equal ["test@email.com"], email.to

invite_url = mail_url(:new_user_registration, invitation: invitation.code)
assert_includes email.html_part.body.to_s, invite_url
assert_includes email.text_part.body.to_s, invite_url
end
end

0 comments on commit 68a48e3

Please sign in to comment.