awesome_translations 0.0.61 → 0.0.63
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/awesome_translations/caches_controller.rb +1 -1
- data/app/controllers/awesome_translations/handlers_controller.rb +3 -7
- data/app/helpers/awesome_translations/views_helper.rb +2 -2
- data/config/locales/en.yml +3 -0
- data/lib/awesome_translations/cache_database_generator.rb +11 -9
- data/lib/awesome_translations/config.rb +2 -2
- data/lib/awesome_translations/engine.rb +1 -1
- data/lib/awesome_translations/erb_inspector/file_inspector.rb +1 -1
- data/lib/awesome_translations/global_translator.rb +12 -12
- data/lib/awesome_translations/handlers/validations_handler.rb +1 -1
- data/lib/awesome_translations/translate_functionality.rb +2 -2
- data/lib/awesome_translations/version.rb +1 -1
- metadata +4 -281
- data/spec/controllers/groups_controller_spec.rb +0 -83
- data/spec/controllers/handlers_controller_spec.rb +0 -51
- data/spec/controllers/users_controller_spec.rb +0 -21
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/config/manifest.js +0 -3
- data/spec/dummy/app/assets/javascripts/application.js +0 -0
- data/spec/dummy/app/assets/javascripts/translations.js +0 -3
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -15
- data/spec/dummy/app/controllers/locales_controller.rb +0 -6
- data/spec/dummy/app/controllers/users_controller.rb +0 -43
- data/spec/dummy/app/helpers/application_helper.rb +0 -7
- data/spec/dummy/app/mailers/my_mailer.rb +0 -5
- data/spec/dummy/app/models/application_record.rb +0 -3
- data/spec/dummy/app/models/role.rb +0 -17
- data/spec/dummy/app/models/user.rb +0 -8
- data/spec/dummy/app/views/layouts/application.html.erb +0 -28
- data/spec/dummy/app/views/users/_partial_test.html.erb +0 -1
- data/spec/dummy/app/views/users/edit.html.liquid +0 -7
- data/spec/dummy/app/views/users/index.html.haml +0 -16
- data/spec/dummy/app/views/users/show.html.erb +0 -7
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config/application.rb +0 -35
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -32
- data/spec/dummy/config/environments/production.rb +0 -80
- data/spec/dummy/config/environments/test.rb +0 -39
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -13
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/routes.rb +0 -7
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/awesome_translations.sqlite3 +0 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141018081559_create_users.rb +0 -9
- data/spec/dummy/db/migrate/20141018081640_create_roles.rb +0 -10
- data/spec/dummy/db/migrate/20150607110245_add_price_cents_to_roles.rb +0 -5
- data/spec/dummy/db/schema.rb +0 -30
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -52
- data/spec/dummy/log/test.log +0 -770
- data/spec/dummy/public/404.html +0 -58
- data/spec/dummy/public/422.html +0 -58
- data/spec/dummy/public/500.html +0 -57
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/2m/2mnPY9uUnBNkGHLxtFaWv5hB3oA7sY2K1ZtwQlZLnAY.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/3N/3NnKgR2TsTI1qCXKZpts0uJzp2dRJcoYp3nnFU6YE4o.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/5r/5rpKlqLSFsRCibev7g6MQkIOhWuOah-1KAN3aqV_fYI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/6E/6ExTs_VkmUe-fovt99Kw8rq-xCfx0_qGsSoldSWScZI.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8O/8OrG8phjC9s5-_7GAI2TEmRjsrGsuvq1gnJQPdMm8v8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8f/8f4REKYOWkNfHexyAVqGXnbOP3vky_ANapWzlRMDeQ4.cache +0 -3
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8n/8n_viDw_qMQaQmqHM0ObPADed5uRyEYo3gDZIiTqUyA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/9e/9euY4B26kaHeiqfd1Qc0bsfRjpzmq36X6uqUfaRNtIs.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AB/AB5PxrhEqi8qOm7AmSf-sHDs9ffj_iTsytaHas2ryPA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AI/AICJO1oM9dzlQ_N1QlHcCN9e8PC0wjtYk7-VmuNdfwg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ca/CaGQBiCuFgkHQ5gw8ZnGQqO8iP1md3GcllDsmaKBFdQ.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ch/ChWez9UVXMuuBpLJMDRGuDmMuXy8gIuFo6794-wBgXc.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/D9/D9eOwgl8pLlC7LJu-LL59UeHm9d-CH1mPgsA8j6xkMg.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Do/Do83AoOat5W-c1g7piDGy2GMmffsY6JY0Qfuh5PY3GM.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Hn/Hn53895nYKzu-g1FJKYS_yszYqCADXasTmN615R_qMQ.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/It/ItV7jxV0bfHndR-H3cidDwpTFGhvs0ETLRqCTmZMXB8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/LL/LL0EenAcTXP-UNCqfcKtMF4Z8oDeWvdlwLQfuOVRPdw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Mj/MjwYGG9GkHD1fwwH2bg66EBYl3zCA_mqeDF9otey4-U.cache +0 -3
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/NU/NUN9oO9gyoo-sY32AOLHdDACjLIxisCxXdKd84ou6cs.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ob/ObuKkBd-camcT52YpgeuyheU-GDFLZCJnoVtq2plgW0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Og/Og_HPfE6734sqkQ0_h4EkOOx3Aoq1LABLH9ovjl6Bvw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Pw/Pwuhz_6So_JcSrxT0Uf4VaLhh_FFSJMKxLZFMbS0LNQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/R-/R-nohuDiORrLlJJtKc5bQsjIRS8yTQFVR3EIxJx3JZw.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/SX/SXA6qKBlsAQ-MLPi7-KPCPcSx9Gg2VR1xa-lCmgipgA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Sb/Sb1Vug319YfPL2Rci1PLMLXJjeIFYcNbHb5hKOvO1eo.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/_f/_f0DjbdXTMEPb52THCCF5qbKkDs28tHHnap5ag4jsdU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dT/dTb1O_9BwFdhA3VT1UTxY-XIIoAGDHGHVO9bzRUNIfc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dV/dVTKOfd8qDIHT3VD-4emnl0yAIxcSF1pY0CUESPHwdM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/i0/i0TQIUsntlYrsibtn9YfB3qbI6bj8hLPom8KUfxR078.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/jF/jFFXBsyFdv_TiNykX219AHs3Q7dQInYRP_80cAWZsgE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/mX/mXfx3VRudxpXrRx1aejtNA5YHOwND3kwWUfvdXHSors.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/nG/nGQXdOLWsP4c926DJJBNXFUE0cKfZynnqN5aQ4T1I48.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/oX/oXeqOS7RZb4eFbKrraeQtr6TUrXPTueLN_Crp7S0RLE.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/p2/p27Ube4R6tciXRc0F8lpz6wUzmXIPxwqz7dKaUYVVuc.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/pv/pv6tV3CDkIAmLXdU8EPLlNEkXAKJPufVD4VP30o4fWo.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r5/r5draRYO72lGMZZKpqYbscAWxAawJVG7uO0uyx3iw24.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r7/r7kGQJTsdrqs3i-prYAVnngsoc6uAtrjLTULTJdgy9g.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rI/rITk_65QtUwq61bjRPAksGeJxbLUFfz-sFPnQiZPHjw.cache +0 -3
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rR/rRS9OkVGJ9Wvs1fwZH-raqD4sXkbV8WmlLGIibYpZmI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/u9/u9nsXMBU9hA4UnH4SDHgk19ev_JNeeiS1-EZDrgStCI.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/un/unZXcRqhGJwHvVWJmJ1rTizBZq6H5jF28E5-FHyTYL4.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/wP/wP-1NwhQC0Sp_5PHpwAI7N0_N99vLNy0TA2FcMd6zgE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/xr/xrDdkyCzfXr-pIE8gfvD8iFiWPuq9EwuZIl-uU9s0_o.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/yc/yc3EXb1cvVLmwnk8aQN89bgVFeuwsVz2k2p0mvC2c3c.cache +0 -1
- data/spec/factories/group.rb +0 -8
- data/spec/factories/handler.rb +0 -11
- data/spec/factories/handler_translation.rb +0 -13
- data/spec/factories/translation_key.rb +0 -8
- data/spec/factories/translation_value.rb +0 -9
- data/spec/factories/user.rb +0 -7
- data/spec/features/clean_ups_spec.rb +0 -38
- data/spec/features/duplicates_spec.rb +0 -61
- data/spec/features/movals_spec.rb +0 -60
- data/spec/handlers/file_handler_spec.rb +0 -103
- data/spec/handlers/model_handler_spec.rb +0 -40
- data/spec/handlers/validations_handler_spec.rb +0 -31
- data/spec/handlers_spec.rb +0 -9
- data/spec/lib/cache_database_generator_spec.rb +0 -59
- data/spec/lib/erb_inspector/file_inspector_spec.rb +0 -46
- data/spec/lib/erb_inspector/translation_inspector_spec.rb +0 -33
- data/spec/lib/erb_inspector_spec.rb +0 -30
- data/spec/lib/model_inspector/attribute_spec.rb +0 -18
- data/spec/lib/model_inspector_spec.rb +0 -39
- data/spec/lib/object_extensions_spec.rb +0 -7
- data/spec/lib/translation_migrator_spec.rb +0 -46
- data/spec/models/awesome_translations/handler_spec.rb +0 -8
- data/spec/models/awesome_translations/translated_value_spec.rb +0 -41
- data/spec/models/awesome_translations/translation_spec.rb +0 -54
- data/spec/spec_helper.rb +0 -76
data/spec/dummy/public/404.html
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<style>
|
6
|
-
body {
|
7
|
-
background-color: #EFEFEF;
|
8
|
-
color: #2E2F30;
|
9
|
-
text-align: center;
|
10
|
-
font-family: arial, sans-serif;
|
11
|
-
}
|
12
|
-
|
13
|
-
div.dialog {
|
14
|
-
width: 25em;
|
15
|
-
margin: 4em auto 0 auto;
|
16
|
-
border: 1px solid #CCC;
|
17
|
-
border-right-color: #999;
|
18
|
-
border-left-color: #999;
|
19
|
-
border-bottom-color: #BBB;
|
20
|
-
border-top: #B00100 solid 4px;
|
21
|
-
border-top-left-radius: 9px;
|
22
|
-
border-top-right-radius: 9px;
|
23
|
-
background-color: white;
|
24
|
-
padding: 7px 4em 0 4em;
|
25
|
-
}
|
26
|
-
|
27
|
-
h1 {
|
28
|
-
font-size: 100%;
|
29
|
-
color: #730E15;
|
30
|
-
line-height: 1.5em;
|
31
|
-
}
|
32
|
-
|
33
|
-
body > p {
|
34
|
-
width: 33em;
|
35
|
-
margin: 0 auto 1em;
|
36
|
-
padding: 1em 0;
|
37
|
-
background-color: #F7F7F7;
|
38
|
-
border: 1px solid #CCC;
|
39
|
-
border-right-color: #999;
|
40
|
-
border-bottom-color: #999;
|
41
|
-
border-bottom-left-radius: 4px;
|
42
|
-
border-bottom-right-radius: 4px;
|
43
|
-
border-top-color: #DADADA;
|
44
|
-
color: #666;
|
45
|
-
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
-
}
|
47
|
-
</style>
|
48
|
-
</head>
|
49
|
-
|
50
|
-
<body>
|
51
|
-
<!-- This file lives in public/404.html -->
|
52
|
-
<div class="dialog">
|
53
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
54
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
55
|
-
</div>
|
56
|
-
<p>If you are the application owner check the logs for more information.</p>
|
57
|
-
</body>
|
58
|
-
</html>
|
data/spec/dummy/public/422.html
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<style>
|
6
|
-
body {
|
7
|
-
background-color: #EFEFEF;
|
8
|
-
color: #2E2F30;
|
9
|
-
text-align: center;
|
10
|
-
font-family: arial, sans-serif;
|
11
|
-
}
|
12
|
-
|
13
|
-
div.dialog {
|
14
|
-
width: 25em;
|
15
|
-
margin: 4em auto 0 auto;
|
16
|
-
border: 1px solid #CCC;
|
17
|
-
border-right-color: #999;
|
18
|
-
border-left-color: #999;
|
19
|
-
border-bottom-color: #BBB;
|
20
|
-
border-top: #B00100 solid 4px;
|
21
|
-
border-top-left-radius: 9px;
|
22
|
-
border-top-right-radius: 9px;
|
23
|
-
background-color: white;
|
24
|
-
padding: 7px 4em 0 4em;
|
25
|
-
}
|
26
|
-
|
27
|
-
h1 {
|
28
|
-
font-size: 100%;
|
29
|
-
color: #730E15;
|
30
|
-
line-height: 1.5em;
|
31
|
-
}
|
32
|
-
|
33
|
-
body > p {
|
34
|
-
width: 33em;
|
35
|
-
margin: 0 auto 1em;
|
36
|
-
padding: 1em 0;
|
37
|
-
background-color: #F7F7F7;
|
38
|
-
border: 1px solid #CCC;
|
39
|
-
border-right-color: #999;
|
40
|
-
border-bottom-color: #999;
|
41
|
-
border-bottom-left-radius: 4px;
|
42
|
-
border-bottom-right-radius: 4px;
|
43
|
-
border-top-color: #DADADA;
|
44
|
-
color: #666;
|
45
|
-
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
-
}
|
47
|
-
</style>
|
48
|
-
</head>
|
49
|
-
|
50
|
-
<body>
|
51
|
-
<!-- This file lives in public/422.html -->
|
52
|
-
<div class="dialog">
|
53
|
-
<h1>The change you wanted was rejected.</h1>
|
54
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
55
|
-
</div>
|
56
|
-
<p>If you are the application owner check the logs for more information.</p>
|
57
|
-
</body>
|
58
|
-
</html>
|
data/spec/dummy/public/500.html
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<style>
|
6
|
-
body {
|
7
|
-
background-color: #EFEFEF;
|
8
|
-
color: #2E2F30;
|
9
|
-
text-align: center;
|
10
|
-
font-family: arial, sans-serif;
|
11
|
-
}
|
12
|
-
|
13
|
-
div.dialog {
|
14
|
-
width: 25em;
|
15
|
-
margin: 4em auto 0 auto;
|
16
|
-
border: 1px solid #CCC;
|
17
|
-
border-right-color: #999;
|
18
|
-
border-left-color: #999;
|
19
|
-
border-bottom-color: #BBB;
|
20
|
-
border-top: #B00100 solid 4px;
|
21
|
-
border-top-left-radius: 9px;
|
22
|
-
border-top-right-radius: 9px;
|
23
|
-
background-color: white;
|
24
|
-
padding: 7px 4em 0 4em;
|
25
|
-
}
|
26
|
-
|
27
|
-
h1 {
|
28
|
-
font-size: 100%;
|
29
|
-
color: #730E15;
|
30
|
-
line-height: 1.5em;
|
31
|
-
}
|
32
|
-
|
33
|
-
body > p {
|
34
|
-
width: 33em;
|
35
|
-
margin: 0 auto 1em;
|
36
|
-
padding: 1em 0;
|
37
|
-
background-color: #F7F7F7;
|
38
|
-
border: 1px solid #CCC;
|
39
|
-
border-right-color: #999;
|
40
|
-
border-bottom-color: #999;
|
41
|
-
border-bottom-left-radius: 4px;
|
42
|
-
border-bottom-right-radius: 4px;
|
43
|
-
border-top-color: #DADADA;
|
44
|
-
color: #666;
|
45
|
-
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
-
}
|
47
|
-
</style>
|
48
|
-
</head>
|
49
|
-
|
50
|
-
<body>
|
51
|
-
<!-- This file lives in public/500.html -->
|
52
|
-
<div class="dialog">
|
53
|
-
<h1>We're sorry, but something went wrong.</h1>
|
54
|
-
</div>
|
55
|
-
<p>If you are the application owner check the logs for more information.</p>
|
56
|
-
</body>
|
57
|
-
</html>
|
File without changes
|
@@ -1,2 +0,0 @@
|
|
1
|
-
[o:Set:
|
2
|
-
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"1processors:type=text/css&file_type=text/scss;TTI"zfile-digest:///home/dev/Development/awesome_translations/app/assets/stylesheets/awesome_translations/application.scss;TTI"?processors:type=text/css&file_type=text/scss&pipeline=self;TTI"ufile-digest:///home/dev/Development/awesome_translations/app/assets/stylesheets/awesome_translations/groups.scss;TTF
|
@@ -1,2 +0,0 @@
|
|
1
|
-
[o:Set:
|
2
|
-
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTF
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�/home/dev/Development/awesome_translations/app/assets/stylesheets/awesome_translations/application.scss?type=text/css&pipeline=self&id=8f6d91c9e9738d7eb89b1afcb885f93d3ced675e134504178a6cab61d97d89eb:ET
|
Binary file
|
@@ -1,3 +0,0 @@
|
|
1
|
-
[o:Set:
|
2
|
-
@hash}
|
3
|
-
I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"xfile-digest:///home/dev/Development/awesome_translations/app/assets/javascripts/awesome_translations/application.js;TTF
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=cd690edccdd0a0a00aaa35f0950b77e22a23c70fa51ae6c582d5f00164093b6c:ET
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�/home/dev/Development/awesome_translations/app/assets/stylesheets/awesome_translations/application.scss?type=text/css&id=65d66091d21edab70ef798e305fbbbbf55dfeebeec31697d9df49f393c631c50:ET
|
@@ -1 +0,0 @@
|
|
1
|
-
"%+f����5���N�E�Ȼ�����@��<"���
|
Binary file
|
@@ -1,2 +0,0 @@
|
|
1
|
-
[o:Set:
|
2
|
-
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"?processors:type=text/css&file_type=text/scss&pipeline=self;TTI"zfile-digest:///home/dev/Development/awesome_translations/app/assets/stylesheets/awesome_translations/application.scss;TTI"ufile-digest:///home/dev/Development/awesome_translations/app/assets/stylesheets/awesome_translations/groups.scss;TTF
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=bade2183fbf3165fd2ea4f36670e84338d4c74f8a8be8641211f1c7cd717b4b2:ET
|
@@ -1 +0,0 @@
|
|
1
|
-
"%��Rm�v�S3.��O�L���ڹc�ƕq�=_j�
|
@@ -1,2 +0,0 @@
|
|
1
|
-
[o:Set:
|
2
|
-
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"0file-digest://app/assets/config/manifest.js;TTI"$file-digest://app/assets/images;TTI")file-digest://app/assets/javascripts;TTI"8file-digest://app/assets/javascripts/application.js;TTI"9file-digest://app/assets/javascripts/translations.js;TTI")file-digest://app/assets/stylesheets;TTI"9file-digest://app/assets/stylesheets/application.css;TTF
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�app/assets/javascripts/translations.js?type=application/javascript&id=c3be52e6babb59f49bc45b2908a64c0dcd21a814759626ae2afad501aeaee6f0:ET
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�app/assets/javascripts/application.js?type=application/javascript&id=d5186d65c547d6cd9bc78150ff19d2257c105dc3c649d86c527cbde0c077d4b0:ET
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
"%��B�����șo�$'�A�d��L���xR�U
|
@@ -1 +0,0 @@
|
|
1
|
-
I"}app/assets/stylesheets/application.css?type=text/css&id=c3c028504989adf81c83b3336a2842acb7600054c6bb11bd941d3b3625b9d4f4:ET
|
@@ -1,2 +0,0 @@
|
|
1
|
-
[o:Set:
|
2
|
-
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"9file-digest://app/assets/javascripts/translations.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTF
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
"%��B�����șo�$'�A�d��L���xR�U
|
Binary file
|
@@ -1,2 +0,0 @@
|
|
1
|
-
[o:Set:
|
2
|
-
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"xfile-digest:///home/dev/Development/awesome_translations/app/assets/javascripts/awesome_translations/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTF
|
@@ -1 +0,0 @@
|
|
1
|
-
"%*��}�yB?x��{w�KBq����5=��
|
@@ -1 +0,0 @@
|
|
1
|
-
"%�ku9FJʚ�$M���=s���:�BwbՈ%��-�
|
@@ -1 +0,0 @@
|
|
1
|
-
"%�=��=Z@��ȖV'Q��0߅ch9xJ��|K
|
@@ -1,2 +0,0 @@
|
|
1
|
-
[o:Set:
|
2
|
-
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"0file-digest://app/assets/config/manifest.js;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"9file-digest://app/assets/javascripts/translations.js;TTI"0processors:type=text/css&file_type=text/css;TTI"9file-digest://app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI")file-digest://app/assets/stylesheets;TTI"$file-digest://app/assets/images;TTI")file-digest://app/assets/javascripts;TTF
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�/home/dev/Development/awesome_translations/app/assets/javascripts/awesome_translations/application.js?type=application/javascript&id=f27330e7f810a85683dd5aa05a1801d663943594a8b1755bc2aadd421edde806:ET
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�app/assets/config/manifest.js?type=application/javascript&pipeline=self&id=95ca277002eef1086af23325a3588fe4ff8524e9b3788149a28454d2f5f4f02b:ET
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�app/assets/javascripts/translations.js?type=application/javascript&pipeline=self&id=b9dcbfb1c62c86a82e0b61ff094257970a00cd2699f9dcf1aa57864e56e505dd:ET
|
@@ -1 +0,0 @@
|
|
1
|
-
I"}app/assets/config/manifest.js?type=application/javascript&id=8acaa94dcec260a4b91495367e843c5d681fdc9146bd5f9bda713f44a78e9401:ET
|
Binary file
|
@@ -1,2 +0,0 @@
|
|
1
|
-
[o:Set:
|
2
|
-
@hash}I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"9file-digest://app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI")file-digest://app/assets/stylesheets;TTF
|
@@ -1 +0,0 @@
|
|
1
|
-
I"�/home/dev/Development/awesome_translations/app/assets/javascripts/awesome_translations/application.js?type=application/javascript&pipeline=self&id=332458c2a49c3eb7751b037ee54b84bf0cbe17a7b0cd81a6b8a96566d07ad1e9:ET
|
@@ -1 +0,0 @@
|
|
1
|
-
"%��B�����șo�$'�A�d��L���xR�U
|
data/spec/factories/group.rb
DELETED
data/spec/factories/handler.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
FactoryBot.define do
|
2
|
-
factory :handler, class: "AwesomeTranslations::CacheDatabaseGenerator::Handler" do
|
3
|
-
identifier { "rails_handler" }
|
4
|
-
name { "RailsHandler" }
|
5
|
-
|
6
|
-
factory :model_handler do
|
7
|
-
identifier { "model_handler" }
|
8
|
-
name { "ModelHandler" }
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
FactoryBot.define do
|
2
|
-
factory :handler_translation, class: "AwesomeTranslations::CacheDatabaseGenerator::HandlerTranslation" do
|
3
|
-
handler
|
4
|
-
translation_key
|
5
|
-
group
|
6
|
-
|
7
|
-
key_show { "some.key" }
|
8
|
-
file_path { nil }
|
9
|
-
line_no { nil }
|
10
|
-
full_path { nil }
|
11
|
-
dir { Rails.root.join("config/locales/awesome_translations/some/key") }
|
12
|
-
end
|
13
|
-
end
|
data/spec/factories/user.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe AwesomeTranslations::CleanUpsController do
|
4
|
-
let!(:original_file_path) { translation_value.file_path }
|
5
|
-
let!(:translation_key) { create :translation_key, key: "some.key" }
|
6
|
-
let!(:translation_value) do
|
7
|
-
create :translation_value,
|
8
|
-
translation_key: translation_key,
|
9
|
-
locale: "da",
|
10
|
-
file_path: Rails.root.join("config/locales/awesome_translations/some_file.yml")
|
11
|
-
end
|
12
|
-
let(:content) do
|
13
|
-
{
|
14
|
-
"da" => {
|
15
|
-
"some" => {
|
16
|
-
"key" => "something"
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
end
|
21
|
-
|
22
|
-
before do
|
23
|
-
FileUtils.mkdir_p(File.dirname(translation_value.file_path))
|
24
|
-
File.write(translation_value.file_path, YAML.dump(content))
|
25
|
-
end
|
26
|
-
|
27
|
-
it "works" do
|
28
|
-
visit new_clean_up_path
|
29
|
-
expect(page).to have_http_status(:success)
|
30
|
-
|
31
|
-
# Expect to find
|
32
|
-
find(".translation-value[data-id='#{translation_value.id}']")
|
33
|
-
find("input[type=submit]").click
|
34
|
-
|
35
|
-
expect { translation_value.reload }.to raise_error(BazaModels::Errors::RecordNotFound)
|
36
|
-
expect(File.exist?(original_file_path)).to eq false
|
37
|
-
end
|
38
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe AwesomeTranslations::DuplicatesController do
|
4
|
-
let!(:handler_translation) do
|
5
|
-
create :handler_translation,
|
6
|
-
translation_key: translation_key,
|
7
|
-
dir: Rails.root.join("config/locales/some/right/path")
|
8
|
-
end
|
9
|
-
let!(:translation_key) { create :translation_key, key: "some.key" }
|
10
|
-
let!(:translation_value) do
|
11
|
-
create :translation_value,
|
12
|
-
translation_key: translation_key,
|
13
|
-
file_path: Rails.root.join("config/locales/some/right/path/en.yml")
|
14
|
-
end
|
15
|
-
let!(:translation_value_duplicate) do
|
16
|
-
create :translation_value,
|
17
|
-
translation_key: translation_key,
|
18
|
-
file_path: Rails.root.join("config/locales/some/wrong/path/en.yml")
|
19
|
-
end
|
20
|
-
|
21
|
-
before do
|
22
|
-
dir_path = File.dirname(translation_value_duplicate.file_path)
|
23
|
-
FileUtils.mkdir_p(dir_path) unless File.exist?(dir_path)
|
24
|
-
|
25
|
-
translation_yaml = {
|
26
|
-
"en" => {
|
27
|
-
"some" => {
|
28
|
-
"key" => "translation"
|
29
|
-
}
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
File.write(translation_value_duplicate.file_path, YAML.dump(translation_yaml))
|
34
|
-
end
|
35
|
-
|
36
|
-
describe "#index" do
|
37
|
-
it "renders the page and shows the correct duplicates" do
|
38
|
-
visit duplicates_path
|
39
|
-
|
40
|
-
expect(page).to have_http_status(:success)
|
41
|
-
expect(page).to have_current_path duplicates_path, ignore_query: true
|
42
|
-
|
43
|
-
find("input[type=checkbox][name='d[#{translation_value_duplicate.id}]']")
|
44
|
-
|
45
|
-
expect do
|
46
|
-
find("input[type=checkbox][name='d[#{translation_value.id}]']")
|
47
|
-
end.to raise_error(Capybara::ElementNotFound)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
describe "#create" do
|
52
|
-
it "removes the checked translations" do
|
53
|
-
visit duplicates_path
|
54
|
-
|
55
|
-
find("input[type=submit]").click
|
56
|
-
|
57
|
-
expect(File.exist?(translation_value_duplicate.file_path)).to eq false
|
58
|
-
expect { translation_value_duplicate.reload }.to raise_error(BazaModels::Errors::RecordNotFound)
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe AwesomeTranslations::MovalsController do # rubocop:disable RSpec/MultipleMemoizedHelpers
|
4
|
-
let!(:handler_translation) do
|
5
|
-
create :handler_translation,
|
6
|
-
translation_key: translation_key,
|
7
|
-
dir: Rails.root.join("config/locales/some/right/path")
|
8
|
-
end
|
9
|
-
let!(:translation_key) { create :translation_key, key: "some.key" }
|
10
|
-
let!(:translation_value) do
|
11
|
-
create :translation_value,
|
12
|
-
translation_key: translation_key,
|
13
|
-
file_path: Rails.root.join("config/locales/some/wrong/path/en.yml")
|
14
|
-
end
|
15
|
-
|
16
|
-
let!(:handler_translation_right_path) { create :handler_translation, translation_key: translation_key_right_path, dir: "/some/path" }
|
17
|
-
let!(:translation_key_right_path) { create :translation_key, key: "some.right.key" }
|
18
|
-
let!(:translation_value_right_path) { create :translation_value, translation_key: translation_key_right_path, file_path: "/some/path/en.yml" }
|
19
|
-
|
20
|
-
before do
|
21
|
-
dir_path = File.dirname(translation_value.file_path)
|
22
|
-
FileUtils.mkdir_p(dir_path) unless File.exist?(dir_path)
|
23
|
-
|
24
|
-
translation_yaml = {
|
25
|
-
"en" => {
|
26
|
-
"some" => {
|
27
|
-
"key" => "translation"
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
File.write(translation_value.file_path, YAML.dump(translation_yaml))
|
33
|
-
end
|
34
|
-
|
35
|
-
describe "#index" do # rubocop:disable RSpec/MultipleMemoizedHelpers
|
36
|
-
it "renders the page and shows the correct results" do
|
37
|
-
visit movals_path
|
38
|
-
|
39
|
-
expect(page).to have_http_status(:success)
|
40
|
-
expect(page).to have_current_path movals_path, ignore_query: true
|
41
|
-
|
42
|
-
find("input[type=checkbox][value='#{handler_translation.id}']") # Expect to find
|
43
|
-
|
44
|
-
expect do
|
45
|
-
find("input[type=checkbox][value='#{handler_translation_right_path.id}']")
|
46
|
-
end.to raise_error(Capybara::ElementNotFound)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
describe "#create" do # rubocop:disable RSpec/MultipleMemoizedHelpers
|
51
|
-
it "moves the checked translations to the right path" do
|
52
|
-
visit movals_path
|
53
|
-
|
54
|
-
find("input[type=submit]").click
|
55
|
-
translation_value.reload
|
56
|
-
|
57
|
-
expect(translation_value.file_path).to eq Rails.root.join("config/locales/some/right/path/en.yml").to_s
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|