user_stamp 3.0.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/MIT-LICENSE +2 -2
- data/README.rdoc +3 -3
- data/Rakefile +6 -9
- data/config/routes.rb +22 -21
- data/lib/generators/user_stamp/USAGE +5 -6
- data/lib/generators/user_stamp/templates/user_stamp.template +16 -21
- data/lib/generators/user_stamp/user_stamp_generator.rb +23 -23
- data/lib/user_stamp.rb +23 -22
- data/lib/user_stamp/app_controller.rb +22 -24
- data/lib/user_stamp/config.rb +29 -33
- data/lib/user_stamp/engine.rb +27 -28
- data/lib/user_stamp/user.rb +23 -24
- data/lib/user_stamp/user_stamp.rb +33 -35
- data/lib/user_stamp/version.rb +23 -22
- data/test/dummy/README.rdoc +15 -248
- data/test/dummy/Rakefile +1 -2
- data/test/dummy/app/assets/javascripts/application.js +4 -6
- data/test/dummy/app/assets/stylesheets/application.css +6 -4
- data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -30
- data/test/dummy/app/controllers/materials_controller.rb +27 -51
- data/test/dummy/app/controllers/products_controller.rb +27 -51
- data/test/dummy/app/helpers/application_helper.rb +0 -26
- data/test/dummy/app/helpers/materials_helper.rb +0 -26
- data/test/dummy/app/helpers/products_helper.rb +0 -26
- data/test/dummy/app/models/material.rb +2 -33
- data/test/dummy/app/models/product.rb +3 -30
- data/test/dummy/app/models/user.rb +0 -30
- data/test/dummy/app/views/layouts/application.html.erb +2 -2
- data/test/dummy/app/views/materials/_form.html.erb +9 -9
- data/test/dummy/app/views/materials/edit.html.erb +2 -2
- data/test/dummy/app/views/materials/index.html.erb +27 -23
- data/test/dummy/app/views/materials/new.html.erb +1 -2
- data/test/dummy/app/views/materials/show.html.erb +4 -8
- data/test/dummy/app/views/products/_form.html.erb +6 -6
- data/test/dummy/app/views/products/edit.html.erb +1 -1
- data/test/dummy/app/views/products/index.html.erb +26 -22
- data/test/dummy/app/views/products/new.html.erb +1 -1
- data/test/dummy/app/views/products/show.html.erb +4 -5
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +2 -2
- data/test/dummy/config/application.rb +2 -35
- data/test/dummy/config/boot.rb +4 -9
- data/test/dummy/config/database.yml +8 -8
- data/test/dummy/config/environment.rb +3 -3
- data/test/dummy/config/environments/development.rb +22 -18
- data/test/dummy/config/environments/production.rb +46 -34
- data/test/dummy/config/environments/test.rb +19 -14
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/devise.rb +5 -5
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +6 -5
- data/test/dummy/config/initializers/mime_types.rb +0 -1
- data/test/dummy/config/initializers/session_store.rb +1 -6
- data/test/dummy/config/initializers/user_stamp.rb +16 -21
- data/test/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/test/dummy/config/locales/en.yml +20 -2
- data/test/dummy/config/routes.rb +56 -4
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/{20150418012302_devise_create_users.rb → 20150427152452_devise_create_users.rb} +1 -1
- data/test/dummy/db/migrate/{20150420023321_create_materials.rb → 20150427153058_create_materials.rb} +2 -2
- data/test/dummy/db/migrate/{20150418013334_create_products.rb → 20150427153126_create_products.rb} +5 -5
- data/test/dummy/db/schema.rb +19 -19
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/public/404.html +54 -13
- data/test/dummy/public/422.html +54 -13
- data/test/dummy/public/500.html +53 -12
- data/test/dummy/test/{functional → controllers}/materials_controller_test.rb +6 -36
- data/test/dummy/test/{functional → controllers}/products_controller_test.rb +9 -39
- data/test/dummy/test/models/material_test.rb +7 -0
- data/test/dummy/test/models/product_test.rb +7 -0
- data/test/dummy/test/models/user_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/-uBri7P4oa8-cPDbuxBzrBh6f_6YgmRETeF1cPQ98BI.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/0HaE6Po_aJLoGCREH2pm0GVz0rQO2AnHYN5WxfxRAdk.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/4WkO5ZKNyqFfwe0aMDO40zL7WuG01_LUMIo_Z1VIwIM.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/6sjvyZUWlu55-3XP-5yZfxjfXvbrvxsg-E3Q7B_t8pk.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/8Z_hEjtyPSQN4opQbT6RkcCNBCF-CFQybzoSs5Aq6KI.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9-HUlJkF3jRyupEtKfWn1dlmpPkguFR6iptppjOucgg.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/A7WZdZGirgPer7eGsq2mJfHio6N9R9HJJxM4hkuItJo.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/DzCB5KQSlVUBNf_tlBgnzTbS3b_pMkzkuqihSfNHe4s.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/GIw-liLL0pp9xX_VtZkZToKgqPr4koaqbpG9bROGWQQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/IgADW9PKfRr6TSWEm1ipKSMaJ4DwdbJMYiKMXWP2qvw.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/MEs_AIdrjZ9MYzLES9uOroxBGNjY9Stpe19ohy0z1lA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/SDZR43ZDx01ZzCRNeIhjSx_9kJO78HCK8YMJAKnWIaI.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/U2SInYmDs_pipNOzdogCHPXzyUyc1h5jAls6xbWSGs4.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UL1xczCpSxV6CONGlfaMEdE5KwKA9o56RLp2QZxGstA.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UReuCl2zv3Z3nGvte7lUGu7979JxkuCRbDNv6-HtTZU.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/WT1n2kS2FLNKA6DHRX7THVlGIGzgTC8je4MMzBQtSmg.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/XgTwbFt01e5bfNNba5Gr83GNRea9MoFlqP2rJGW_rjk.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ZAc9zFuIs2cKSfQZVtEkV3u4_RLFxLSP55C0RqqhZ1w.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Zea97tHycA5aXYbZ9DHtFHTu4bhAZcIhb0RlckVvzXI.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ZwP9zS5ft5ww816BPhmhQPqMPKbbgPdjBrz5VnSZ5oo.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hwZcJkZ_YQ4hjBA1FzHIvGWudWHtQDZW7h8zUJslBQM.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/iqtLgHvtAikgr0-aW1Vqy4KeUsVmzgOz9YVG2_2RVeY.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/jpKzE4ZVMG4ynSLgDB76TOPEZbHNqYF8BQRy94ioeQE.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/kM0liVKuJ_BZI9HenUEa6OO9pOnT4KuC-zzXot34reU.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/nGfH8igMEHxuQWcDKD23EjWqmSvgxI2sVXhNOC5wE8I.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ni5fBgQoTXajLTgoWS8nd8LoiucG5krt3YIpbrx1mIY.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oVvP3smTURXlapOzr_iUN4Ew_m3EEy3CQ4M0cOkTsm0.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oX6WZjQtAOkKXBohDgfcjs0cda8wFDGnkwJDGkJoytI.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oeTdUtI5qsh1Nn2Hy6_wmjtPV25O-RCQPcNjCwoSCKA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ov953wmqzp_9OaWCaoMLlOSWzHeF9kLApt4aCcW-Bgk.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/sg6mpEMI9L65gEc7QFaXG534feyjIGE29SE7B_RTQNY.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/uJ8m6b9jypIn4pSuuaKkFBW9E2Ifcx2ulcERIa1q1dA.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/uYPgal6XAaVE9q7oz6jQS5nmQKM3IwZ8tnsE-__Oweo.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/vXJI-yUwt8d552Mj63nmnTx46YY7-GUrYuFzLUT9hMI.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/xs2cSdXmo8vitmiaAo7fhDSGbrVPUKN17Ue3aTCUseE.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/yCPG4xJ4TDzj7Mbcm2B0wDN_Jqlu2dKg8bFLKqW-pBI.cache +0 -0
- data/test/fixtures/materials.yml +1 -1
- data/test/fixtures/products.yml +1 -1
- data/test/fixtures/users.yml +5 -26
- data/test/test_helper.rb +7 -33
- data/test/user_stamp_test.rb +0 -26
- metadata +124 -40
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/log/test.log +0 -414
- data/test/dummy/script/rails +0 -6
- data/test/dummy/test/unit/helpers/materials_helper_test.rb +0 -30
- data/test/dummy/test/unit/helpers/products_helper_test.rb +0 -30
- data/test/dummy/test/unit/material_test.rb +0 -33
- data/test/dummy/test/unit/product_test.rb +0 -33
- data/test/dummy/test/unit/user_test.rb +0 -33
data/test/dummy/public/500.html
CHANGED
@@ -2,24 +2,65 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
16
54
|
</style>
|
17
55
|
</head>
|
18
56
|
|
19
57
|
<body>
|
20
58
|
<!-- This file lives in public/500.html -->
|
21
59
|
<div class="dialog">
|
22
|
-
<
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
23
64
|
</div>
|
24
65
|
</body>
|
25
66
|
</html>
|
@@ -1,29 +1,3 @@
|
|
1
|
-
# This file is part of the UserStamp library that provides tools to
|
2
|
-
# track who created, updated, or destroyed a record in the database.
|
3
|
-
#
|
4
|
-
# https://github.com/mjpete3/user_stamp
|
5
|
-
#
|
6
|
-
# Copyright (C) 2015 PD Technology Solutions, LLC
|
7
|
-
#
|
8
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
9
|
-
# a copy of this software and associated documentation files (the
|
10
|
-
# "Software"), to deal in the Software without restriction, including
|
11
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
12
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
13
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
14
|
-
# the following conditions:
|
15
|
-
#
|
16
|
-
# The above copyright notice and this permission notice shall be
|
17
|
-
# included in all copies or substantial portions of the Software.
|
18
|
-
#
|
19
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
20
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
21
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
22
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
23
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
24
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
25
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
26
|
-
|
27
1
|
require 'test_helper'
|
28
2
|
|
29
3
|
class MaterialsControllerTest < ActionController::TestCase
|
@@ -31,15 +5,15 @@ class MaterialsControllerTest < ActionController::TestCase
|
|
31
5
|
|
32
6
|
setup do
|
33
7
|
@admin = users(:one)
|
34
|
-
@user = users(:two)
|
8
|
+
@user = users(:two)
|
35
9
|
@material = materials(:one)
|
36
|
-
|
10
|
+
|
37
11
|
# set the user_field to :id
|
38
12
|
UserStamp.configure do |config|
|
39
13
|
config.user_field = :id
|
40
|
-
end
|
14
|
+
end
|
41
15
|
end
|
42
|
-
|
16
|
+
|
43
17
|
test "should get index" do
|
44
18
|
sign_in @admin
|
45
19
|
get :index
|
@@ -56,9 +30,8 @@ class MaterialsControllerTest < ActionController::TestCase
|
|
56
30
|
test "should create material" do
|
57
31
|
sign_in @admin
|
58
32
|
assert_difference('Material.count') do
|
59
|
-
post :create, material: {
|
33
|
+
post :create, material: { name: @material.name }
|
60
34
|
end
|
61
|
-
|
62
35
|
material = assigns(:material)
|
63
36
|
assert_equal material.created_user, @admin.id
|
64
37
|
assert_equal material.updated_user, @admin.id
|
@@ -79,12 +52,10 @@ class MaterialsControllerTest < ActionController::TestCase
|
|
79
52
|
|
80
53
|
test "should update material" do
|
81
54
|
sign_in @user
|
82
|
-
|
83
|
-
|
55
|
+
patch :update, id: @material, material: { name: @material.name }
|
84
56
|
material = assigns(:material)
|
85
57
|
assert_equal material.created_user, @admin.id
|
86
58
|
assert_equal material.updated_user, @user.id
|
87
|
-
|
88
59
|
assert_redirected_to material_path(assigns(:material))
|
89
60
|
end
|
90
61
|
|
@@ -93,7 +64,6 @@ class MaterialsControllerTest < ActionController::TestCase
|
|
93
64
|
assert_difference('Material.not_deleted.count', -1) do
|
94
65
|
delete :destroy, id: @material
|
95
66
|
end
|
96
|
-
|
97
67
|
material = assigns(:material)
|
98
68
|
assert_equal material.destroy_user, @admin.id
|
99
69
|
assert_redirected_to materials_path
|
@@ -1,29 +1,3 @@
|
|
1
|
-
# This file is part of the UserStamp library that provides tools to
|
2
|
-
# track who created, updated, or destroyed a record in the database.
|
3
|
-
#
|
4
|
-
# https://github.com/mjpete3/user_stamp
|
5
|
-
#
|
6
|
-
# Copyright (C) 2015 PD Technology Solutions, LLC
|
7
|
-
#
|
8
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
9
|
-
# a copy of this software and associated documentation files (the
|
10
|
-
# "Software"), to deal in the Software without restriction, including
|
11
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
12
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
13
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
14
|
-
# the following conditions:
|
15
|
-
#
|
16
|
-
# The above copyright notice and this permission notice shall be
|
17
|
-
# included in all copies or substantial portions of the Software.
|
18
|
-
#
|
19
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
20
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
21
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
22
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
23
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
24
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
25
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
26
|
-
|
27
1
|
require 'test_helper'
|
28
2
|
|
29
3
|
class ProductsControllerTest < ActionController::TestCase
|
@@ -31,16 +5,15 @@ class ProductsControllerTest < ActionController::TestCase
|
|
31
5
|
|
32
6
|
setup do
|
33
7
|
@admin = users(:one)
|
34
|
-
@user = users(:two)
|
8
|
+
@user = users(:two)
|
35
9
|
@product = products(:one)
|
36
|
-
|
37
|
-
# set the user_field to :
|
10
|
+
|
11
|
+
# set the user_field to :login_name
|
38
12
|
UserStamp.configure do |config|
|
39
13
|
config.user_field = :login_name
|
40
|
-
end
|
41
|
-
|
14
|
+
end
|
42
15
|
end
|
43
|
-
|
16
|
+
|
44
17
|
test "should get index" do
|
45
18
|
sign_in @admin
|
46
19
|
get :index
|
@@ -57,9 +30,8 @@ class ProductsControllerTest < ActionController::TestCase
|
|
57
30
|
test "should create product" do
|
58
31
|
sign_in @admin
|
59
32
|
assert_difference('Product.count') do
|
60
|
-
post :create, product: {
|
33
|
+
post :create, product: { name: @product.name }
|
61
34
|
end
|
62
|
-
|
63
35
|
product = assigns(:product)
|
64
36
|
assert_equal product.created_user, @admin.login_name
|
65
37
|
assert_equal product.updated_user, @admin.login_name
|
@@ -80,12 +52,11 @@ class ProductsControllerTest < ActionController::TestCase
|
|
80
52
|
|
81
53
|
test "should update product" do
|
82
54
|
sign_in @user
|
83
|
-
|
84
|
-
|
55
|
+
patch :update, id: @product, product: { name: @product.name }
|
56
|
+
|
85
57
|
product = assigns(:product)
|
86
58
|
assert_equal product.created_user, @admin.login_name
|
87
59
|
assert_equal product.updated_user, @user.login_name
|
88
|
-
|
89
60
|
assert_redirected_to product_path(assigns(:product))
|
90
61
|
end
|
91
62
|
|
@@ -93,8 +64,7 @@ class ProductsControllerTest < ActionController::TestCase
|
|
93
64
|
sign_in @admin
|
94
65
|
assert_difference('Product.not_deleted.count', -1) do
|
95
66
|
delete :destroy, id: @product
|
96
|
-
end
|
97
|
-
|
67
|
+
end
|
98
68
|
product = assigns(:product)
|
99
69
|
assert_equal product.destroy_user, @admin.login_name
|
100
70
|
assert_redirected_to products_path
|
@@ -0,0 +1,2 @@
|
|
1
|
+
[o:Set:
|
2
|
+
@hash{I"environment-version:ETTI"environment-paths;TTI"0processors:type=text/css&file_type=text/css;TTI"efile-digest:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"cfile-digest:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets/materials.css;TTI"bfile-digest:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets/products.css;TTI"bfile-digest:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets/scaffold.css;TTI"Ufile-digest:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets;TT
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�file:///home/marty/workspace/user_stamp/test/dummy/app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=0c718dd25d9bfd7792fc564b0f73e0320fef482a3ea300f7dbbe6c0edece0bb4:ET
|
@@ -0,0 +1,2 @@
|
|
1
|
+
[o:Set:
|
2
|
+
@hash{I"environment-version:ETTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"dfile-digest:///home/marty/workspace/user_stamp/test/dummy/app/assets/javascripts/application.js;TTI"Ufile-digest:///home/marty/workspace/user_stamp/test/dummy/app/assets/javascripts;TTI"bfile-digest:///home/marty/workspace/user_stamp/test/dummy/app/assets/javascripts/materials.js;TTI"afile-digest:///home/marty/workspace/user_stamp/test/dummy/app/assets/javascripts/products.js;TT
|
@@ -0,0 +1 @@
|
|
1
|
+
"%�W\�yho9S���ƫ˥��)|�~���(���
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�file:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=6fdd14607f61929e76dfa8650f199fe85e05145a0276b59dfed13ccbbcafacab:ET
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�file:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets/materials.css?type=text/css&pipeline=self&id=96410bb4977abc056bb6b66d733be6a18f6552e0db206bdb45b3141251998455:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�file:///home/marty/workspace/user_stamp/test/dummy/app/assets/javascripts/products.js?type=application/javascript&pipeline=self&id=3230789bce2c21452832ed4c68d36d550042e3e3099e75d8f242d3950576072e:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
"%Ѱč@�����6H�uZoX�Z�gbh0W��V
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
"%fc@l���7R�����2_?��?�=0�JW�
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�file:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets/scaffold.css?type=text/css&pipeline=self&id=9056216b84293776f327392bd2ee1b863419693d3988d9f06e23c373682a8b5f:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
"%֧�NTZq�בH�L��#p3��Jg!��)
|
@@ -0,0 +1 @@
|
|
1
|
+
"%֧�NTZq�בH�L��#p3��Jg!��)
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�file:///home/marty/workspace/user_stamp/test/dummy/app/assets/javascripts/materials.js?type=application/javascript&pipeline=self&id=f5901296aa0f73d7c473a186bc0a9fd5bbcd97460951eb21e41760d3988fa565:ET
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�file:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets/application.css?type=text/css&id=a86ccf969a5127a71ffc78ac2c279328b46422ddecdf24668a1477135a4cac67:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
"%��A�I8���߅�u7�!��H���j���\��|x
|
@@ -0,0 +1 @@
|
|
1
|
+
"%�GmS�Ii�>Gb����d����=&i��]
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�file:///home/marty/workspace/user_stamp/test/dummy/app/assets/javascripts/application.js?type=application/javascript&id=63f743631153cc757ced6b8c5378dfbd5c51fe405b4a2045f0dfe57139c902ae:ET
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�file:///home/marty/workspace/user_stamp/test/dummy/app/assets/stylesheets/products.css?type=text/css&pipeline=self&id=93213b2037b0fe5e3d1e862d1e7ce475b4d42879e5d1e2d20bf675be13defb6b:ET
|
Binary file
|
data/test/fixtures/materials.yml
CHANGED
data/test/fixtures/products.yml
CHANGED
data/test/fixtures/users.yml
CHANGED
@@ -1,30 +1,9 @@
|
|
1
|
-
#
|
2
|
-
# track who created, updated, or destroyed a record in the database.
|
3
|
-
#
|
4
|
-
# https://github.com/mjpete3/user_stamp
|
5
|
-
#
|
6
|
-
# Copyright (C) 2015 PD Technology Solutions, LLC
|
7
|
-
#
|
8
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
9
|
-
# a copy of this software and associated documentation files (the
|
10
|
-
# "Software"), to deal in the Software without restriction, including
|
11
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
12
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
13
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
14
|
-
# the following conditions:
|
15
|
-
#
|
16
|
-
# The above copyright notice and this permission notice shall be
|
17
|
-
# included in all copies or substantial portions of the Software.
|
18
|
-
#
|
19
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
20
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
21
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
22
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
23
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
24
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
25
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
26
2
|
|
27
|
-
#
|
3
|
+
# This model initially had no columns defined. If you add columns to the
|
4
|
+
# model remove the '{}' from the fixture names and add the columns immediately
|
5
|
+
# below each fixture, per the syntax in the comments below
|
6
|
+
#
|
28
7
|
|
29
8
|
one:
|
30
9
|
id: 1
|
data/test/test_helper.rb
CHANGED
@@ -1,45 +1,19 @@
|
|
1
|
-
# This file is part of the UserStamp library that provides tools to
|
2
|
-
# track who created, updated, or destroyed a record in the database.
|
3
|
-
#
|
4
|
-
# https://github.com/mjpete3/user_stamp
|
5
|
-
#
|
6
|
-
# Copyright (C) 2015 PD Technology Solutions, LLC
|
7
|
-
#
|
8
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
9
|
-
# a copy of this software and associated documentation files (the
|
10
|
-
# "Software"), to deal in the Software without restriction, including
|
11
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
12
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
13
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
14
|
-
# the following conditions:
|
15
|
-
#
|
16
|
-
# The above copyright notice and this permission notice shall be
|
17
|
-
# included in all copies or substantial portions of the Software.
|
18
|
-
#
|
19
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
20
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
21
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
22
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
23
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
24
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
25
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
26
|
-
|
27
1
|
# Configure Rails Environment
|
28
2
|
ENV["RAILS_ENV"] = "test"
|
29
3
|
|
30
|
-
require File.expand_path("
|
4
|
+
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
31
6
|
require "rails/test_help"
|
32
7
|
|
33
|
-
|
8
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
9
|
+
# to be shown.
|
10
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
34
11
|
|
35
12
|
# Load support files
|
36
13
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
37
14
|
|
38
15
|
# Load fixtures from the engine
|
39
|
-
if ActiveSupport::TestCase.
|
16
|
+
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
40
17
|
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
18
|
+
ActiveSupport::TestCase.fixtures :all
|
41
19
|
end
|
42
|
-
|
43
|
-
class ActiveSupport::TestCase
|
44
|
-
fixtures :all
|
45
|
-
end
|