Skip to content

Commit 99f7a5c

Browse files
committed
use example.{org,com} as domain for example emails
* do not use existing domains for example and testing emails, but use example.org or example.com designated for examples and documentation purposes: - https://tools.ietf.org/html/rfc2606#section-3 Signed-off-by: Daniel Horak <[email protected]>
1 parent 4125cf1 commit 99f7a5c

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace :etcd do
1818
Tendrl::User.new,
1919
name: 'Admin',
2020
username: 'admin',
21-
email: 'admin@tendrl.org',
21+
email: 'admin@example.org',
2222
role: 'admin',
2323
password: password,
2424
email_notifications: false

docs/users.adoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Sample Request
2525
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer
2626
d03ebb195dbe6385a7caeda699f9930ff2e49f29c381ed82dc95aa642a7660b8'
2727
-XPOST -d '{"name":"Tom Hardy", "username":"thardy",
28-
"email":"thardy@tendrl.org", "role":"admin", "password":"pass1234",
28+
"email":"thardy@example.org", "role":"admin", "password":"pass1234",
2929
"email_notifications": true}'
3030
http://127.0.0.1/api/1.0/users
3131
----------
@@ -36,7 +36,7 @@ Sample Response
3636
Status: 201 Created
3737
3838
{
39-
"email": "thardy@tendrl.org",
39+
"email": "thardy@example.org",
4040
"username": "thardy",
4141
"name": "Tom Hardy",
4242
"role": "admin",
@@ -51,15 +51,15 @@ Update a existing user.
5151
Sample Request
5252

5353
----------
54-
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer d03ebb195dbe6385a7caeda699f9930ff2e49f29c381ed82dc95aa642a7660b8' -XPUT -d '{"name":"Tom Hardee", "username":"thardy", "email":"thardy@tendrl.org", "role":"normal"}' http://127.0.0.1/api/1.0/users/thardy
54+
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer d03ebb195dbe6385a7caeda699f9930ff2e49f29c381ed82dc95aa642a7660b8' -XPUT -d '{"name":"Tom Hardee", "username":"thardy", "email":"thardy@example.org", "role":"normal"}' http://127.0.0.1/api/1.0/users/thardy
5555
----------
5656

5757
Sample Response
5858

5959
----------
6060
Status: 200 OK
6161
{
62-
"email": "thardy@tendrl.org",
62+
"email": "thardy@example.org",
6363
"username": "thardy",
6464
"name": "Tom Hardee",
6565
"role": "normal",
@@ -99,13 +99,13 @@ Sample Response
9999
----------
100100
Status: 200 OK
101101
[{
102-
"email": "admin@tendrl.org",
102+
"email": "admin@example.org",
103103
"username": "admin",
104104
"name": "Admin",
105105
"role": "admin",
106106
"email_notitifications": true
107107
}, {
108-
"email": "thardy@tendrl.org",
108+
"email": "thardy@example.org",
109109
"username": "thardy",
110110
"name": "Tom Hardy",
111111
"role": "admin",
@@ -128,7 +128,7 @@ Sample Response
128128
----------
129129
Status: 200 OK
130130
{
131-
"email": "thardy@tendrl.org",
131+
"email": "thardy@example.org",
132132
"username": "thardy",
133133
"name": "Tom Hardy",
134134
"role": "admin",
@@ -153,7 +153,7 @@ Sample Response
153153
----------
154154
Status: 200 OK
155155
{
156-
"email": "thardy@tendrl.org",
156+
"email": "thardy@example.org",
157157
"username": "thardy",
158158
"name": "Tom Hardy",
159159
"role": "admin",

spec/controllers/users_controller_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
let(:body){
2424
{
25-
email: 'thardy@tendrl.org',
25+
email: 'thardy@example.org',
2626
username: 'thardy',
2727
name: 'Tom Hardy',
2828
password: 'temp12345',
@@ -111,7 +111,7 @@
111111
end
112112

113113
it 'self' do
114-
stub_email_notifications_index('quentin', 'quentin@tendrl.org')
114+
stub_email_notifications_index('quentin', 'quentin@example.org')
115115
body = { name: 'Quentin D' }
116116
stub_update_user_attributes('quentin', body)
117117
put "/users/quentin", body.to_json, http_env

spec/fixtures/dwarner.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"createdIndex": 197
1818
}, {
1919
"key": "/_tendrl/users/dwarner/email",
20-
"value": "dwarner@tendrl.org",
20+
"value": "dwarner@example.org",
2121
"modifiedIndex": 190,
2222
"createdIndex": 190
2323
}, {

spec/fixtures/quentin.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"createdIndex": 197
1818
}, {
1919
"key": "/_tendrl/users/quentin/email",
20-
"value": "quentin@tendrl.org",
20+
"value": "quentin@example.org",
2121
"modifiedIndex": 190,
2222
"createdIndex": 190
2323
}, {

spec/fixtures/thardy.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"createdIndex": 197
1818
}, {
1919
"key": "/_tendrl/users/thardy/email",
20-
"value": "thardy@tendrl.org",
20+
"value": "thardy@example.org",
2121
"modifiedIndex": 190,
2222
"createdIndex": 190
2323
}, {

spec/fixtures/users.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ node: !ruby/object:Etcd::Node
2323
modified_index: 65748
2424
ttl:
2525
key: /_tendrl/users/dwarner/data
26-
value: '{"name":"David Warner","username":"dwarner","password_salt":"$2a$10$2TEvrFp5cKo9dFvJSRyp6e","password_hash":"$2a$10$ACiOy8CCN57RjCP5qyd4Oe3Jokl6Jaj25vrb617NZ6xU5CUSsJTOW","email":"dwarner@tendrl.org","role":"dwarner","email_notifications":false}'
26+
value: '{"name":"David Warner","username":"dwarner","password_salt":"$2a$10$2TEvrFp5cKo9dFvJSRyp6e","password_hash":"$2a$10$ACiOy8CCN57RjCP5qyd4Oe3Jokl6Jaj25vrb617NZ6xU5CUSsJTOW","email":"dwarner@example.org","role":"dwarner","email_notifications":false}'
2727
expiration:
2828
dir:
2929
- !ruby/object:Etcd::Node
@@ -40,7 +40,7 @@ node: !ruby/object:Etcd::Node
4040
modified_index: 531720
4141
ttl:
4242
key: /_tendrl/users/quentin/data
43-
value: '{"name":"Quentin","username":"quentin","password_salt":"$2a$10$2TEvrFp5cKo9dFvJSRyp6e","password_hash":"$2a$10$2TEvrFp5cKo9dFvJSRyp6e7g5GzGzic7X4Xu1n.Cf2WCiiOuh3o.u","email":"quentin@email.com","role":"normal","email_notifications":false}'
43+
value: '{"name":"Quentin","username":"quentin","password_salt":"$2a$10$2TEvrFp5cKo9dFvJSRyp6e","password_hash":"$2a$10$2TEvrFp5cKo9dFvJSRyp6e7g5GzGzic7X4Xu1n.Cf2WCiiOuh3o.u","email":"quentin@example.com","role":"normal","email_notifications":false}'
4444
expiration:
4545
dir:
4646
etcd_index: 1039888

spec/forms/user_form_spec.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
it 'with valid attributes' do
2727
validator = UserForm.new(user, {
2828
name: 'Tom Hardy',
29-
email: 'tom@tendrl.org',
29+
email: 'tom@example.org',
3030
username: 'thardy',
3131
password: 'temp12345',
3232
role: Tendrl::User::ADMIN,
@@ -38,7 +38,7 @@
3838
it 'with existing username/email' do
3939
validator = UserForm.new(user, {
4040
name: 'David Warner',
41-
email: 'dwarner@tendrl.org',
41+
email: 'dwarner@example.org',
4242
username: 'dwarner',
4343
password: 'temp12345',
4444
email_notifications: true,
@@ -77,7 +77,7 @@
7777
it 'with valid attributes and password' do
7878
validator = UserForm.new(user, {
7979
name: 'Tom Hardy',
80-
email: 'tom@tendrl.org',
80+
email: 'tom@example.org',
8181
username: 'thardy',
8282
password: 'temp12345',
8383
role: Tendrl::User::NORMAL
@@ -88,7 +88,7 @@
8888
it 'with existing username/email' do
8989
validator = UserForm.new(user, {
9090
name: 'David Warner',
91-
email: 'dwarner@tendrl.org',
91+
email: 'dwarner@example.org',
9292
username: 'dwarner',
9393
password: 'temp12345',
9494
role: Tendrl::User::LIMITED

spec/models/user_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
RSpec.describe Tendrl::User do
44
it 'create' do
5-
stub_email_notifications_index('dwarner', 'dwarner@tendrl.org')
5+
stub_email_notifications_index('dwarner', 'dwarner@example.org')
66
stub_user('dwarner')
77
stub_user_create('dwarner')
88
attributes = {
9-
email: 'dwarner@tendrl.org',
9+
email: 'dwarner@example.org',
1010
name: 'David Warner',
1111
username: 'dwarner',
1212
password: 'temp1234'

0 commit comments

Comments
 (0)