awesome_translations 0.0.62 → 0.0.63

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/awesome_translations/caches_controller.rb +1 -1
  3. data/app/controllers/awesome_translations/handlers_controller.rb +3 -7
  4. data/config/locales/en.yml +3 -0
  5. data/lib/awesome_translations/cache_database_generator.rb +11 -9
  6. data/lib/awesome_translations/config.rb +2 -2
  7. data/lib/awesome_translations/engine.rb +1 -1
  8. data/lib/awesome_translations/erb_inspector/file_inspector.rb +1 -1
  9. data/lib/awesome_translations/handlers/validations_handler.rb +1 -1
  10. data/lib/awesome_translations/version.rb +1 -1
  11. metadata +4 -287
  12. data/spec/controllers/groups_controller_spec.rb +0 -83
  13. data/spec/controllers/handlers_controller_spec.rb +0 -51
  14. data/spec/controllers/users_controller_spec.rb +0 -21
  15. data/spec/dummy/README.rdoc +0 -28
  16. data/spec/dummy/Rakefile +0 -6
  17. data/spec/dummy/app/assets/config/manifest.js +0 -3
  18. data/spec/dummy/app/assets/javascripts/application.js +0 -0
  19. data/spec/dummy/app/assets/javascripts/translations.js +0 -3
  20. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  21. data/spec/dummy/app/controllers/application_controller.rb +0 -15
  22. data/spec/dummy/app/controllers/locales_controller.rb +0 -6
  23. data/spec/dummy/app/controllers/users_controller.rb +0 -43
  24. data/spec/dummy/app/helpers/application_helper.rb +0 -7
  25. data/spec/dummy/app/mailers/my_mailer.rb +0 -5
  26. data/spec/dummy/app/models/application_record.rb +0 -3
  27. data/spec/dummy/app/models/role.rb +0 -17
  28. data/spec/dummy/app/models/user.rb +0 -8
  29. data/spec/dummy/app/services/application_service.rb +0 -3
  30. data/spec/dummy/app/services/test_translate_service.rb +0 -9
  31. data/spec/dummy/app/views/layouts/application.html.erb +0 -28
  32. data/spec/dummy/app/views/users/_partial_test.html.erb +0 -1
  33. data/spec/dummy/app/views/users/edit.html.liquid +0 -7
  34. data/spec/dummy/app/views/users/index.html.haml +0 -16
  35. data/spec/dummy/app/views/users/show.html.erb +0 -7
  36. data/spec/dummy/bin/bundle +0 -3
  37. data/spec/dummy/bin/rails +0 -4
  38. data/spec/dummy/bin/rake +0 -4
  39. data/spec/dummy/config/application.rb +0 -35
  40. data/spec/dummy/config/boot.rb +0 -5
  41. data/spec/dummy/config/database.yml +0 -25
  42. data/spec/dummy/config/environment.rb +0 -5
  43. data/spec/dummy/config/environments/development.rb +0 -32
  44. data/spec/dummy/config/environments/production.rb +0 -80
  45. data/spec/dummy/config/environments/test.rb +0 -39
  46. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  47. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  48. data/spec/dummy/config/initializers/inflections.rb +0 -16
  49. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  50. data/spec/dummy/config/initializers/secret_token.rb +0 -13
  51. data/spec/dummy/config/initializers/session_store.rb +0 -3
  52. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  53. data/spec/dummy/config/routes.rb +0 -7
  54. data/spec/dummy/config.ru +0 -4
  55. data/spec/dummy/db/awesome_translations.sqlite3 +0 -0
  56. data/spec/dummy/db/development.sqlite3 +0 -0
  57. data/spec/dummy/db/migrate/20141018081559_create_users.rb +0 -9
  58. data/spec/dummy/db/migrate/20141018081640_create_roles.rb +0 -10
  59. data/spec/dummy/db/migrate/20150607110245_add_price_cents_to_roles.rb +0 -5
  60. data/spec/dummy/db/schema.rb +0 -30
  61. data/spec/dummy/db/test.sqlite3 +0 -0
  62. data/spec/dummy/log/development.log +0 -52
  63. data/spec/dummy/log/test.log +0 -1188
  64. data/spec/dummy/public/404.html +0 -58
  65. data/spec/dummy/public/422.html +0 -58
  66. data/spec/dummy/public/500.html +0 -57
  67. data/spec/dummy/public/favicon.ico +0 -0
  68. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/2m/2mnPY9uUnBNkGHLxtFaWv5hB3oA7sY2K1ZtwQlZLnAY.cache +0 -2
  69. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/3N/3NnKgR2TsTI1qCXKZpts0uJzp2dRJcoYp3nnFU6YE4o.cache +0 -2
  70. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/5r/5rpKlqLSFsRCibev7g6MQkIOhWuOah-1KAN3aqV_fYI.cache +0 -0
  71. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/6E/6ExTs_VkmUe-fovt99Kw8rq-xCfx0_qGsSoldSWScZI.cache +0 -1
  72. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8O/8OrG8phjC9s5-_7GAI2TEmRjsrGsuvq1gnJQPdMm8v8.cache +0 -0
  73. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8f/8f4REKYOWkNfHexyAVqGXnbOP3vky_ANapWzlRMDeQ4.cache +0 -3
  74. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8n/8n_viDw_qMQaQmqHM0ObPADed5uRyEYo3gDZIiTqUyA.cache +0 -1
  75. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/9e/9euY4B26kaHeiqfd1Qc0bsfRjpzmq36X6uqUfaRNtIs.cache +0 -1
  76. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AB/AB5PxrhEqi8qOm7AmSf-sHDs9ffj_iTsytaHas2ryPA.cache +0 -1
  77. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AI/AICJO1oM9dzlQ_N1QlHcCN9e8PC0wjtYk7-VmuNdfwg.cache +0 -0
  78. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ca/CaGQBiCuFgkHQ5gw8ZnGQqO8iP1md3GcllDsmaKBFdQ.cache +0 -2
  79. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ch/ChWez9UVXMuuBpLJMDRGuDmMuXy8gIuFo6794-wBgXc.cache +0 -1
  80. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/D9/D9eOwgl8pLlC7LJu-LL59UeHm9d-CH1mPgsA8j6xkMg.cache +0 -1
  81. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Do/Do83AoOat5W-c1g7piDGy2GMmffsY6JY0Qfuh5PY3GM.cache +0 -2
  82. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Hn/Hn53895nYKzu-g1FJKYS_yszYqCADXasTmN615R_qMQ.cache +0 -1
  83. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/It/ItV7jxV0bfHndR-H3cidDwpTFGhvs0ETLRqCTmZMXB8.cache +0 -1
  84. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/LL/LL0EenAcTXP-UNCqfcKtMF4Z8oDeWvdlwLQfuOVRPdw.cache +0 -0
  85. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Mj/MjwYGG9GkHD1fwwH2bg66EBYl3zCA_mqeDF9otey4-U.cache +0 -3
  86. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/NU/NUN9oO9gyoo-sY32AOLHdDACjLIxisCxXdKd84ou6cs.cache +0 -2
  87. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ob/ObuKkBd-camcT52YpgeuyheU-GDFLZCJnoVtq2plgW0.cache +0 -0
  88. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Og/Og_HPfE6734sqkQ0_h4EkOOx3Aoq1LABLH9ovjl6Bvw.cache +0 -0
  89. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Pw/Pwuhz_6So_JcSrxT0Uf4VaLhh_FFSJMKxLZFMbS0LNQ.cache +0 -0
  90. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/R-/R-nohuDiORrLlJJtKc5bQsjIRS8yTQFVR3EIxJx3JZw.cache +0 -1
  91. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/SX/SXA6qKBlsAQ-MLPi7-KPCPcSx9Gg2VR1xa-lCmgipgA.cache +0 -1
  92. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Sb/Sb1Vug319YfPL2Rci1PLMLXJjeIFYcNbHb5hKOvO1eo.cache +0 -2
  93. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/_f/_f0DjbdXTMEPb52THCCF5qbKkDs28tHHnap5ag4jsdU.cache +0 -0
  94. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dT/dTb1O_9BwFdhA3VT1UTxY-XIIoAGDHGHVO9bzRUNIfc.cache +0 -0
  95. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dV/dVTKOfd8qDIHT3VD-4emnl0yAIxcSF1pY0CUESPHwdM.cache +0 -0
  96. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/i0/i0TQIUsntlYrsibtn9YfB3qbI6bj8hLPom8KUfxR078.cache +0 -1
  97. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/jF/jFFXBsyFdv_TiNykX219AHs3Q7dQInYRP_80cAWZsgE.cache +0 -0
  98. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/mX/mXfx3VRudxpXrRx1aejtNA5YHOwND3kwWUfvdXHSors.cache +0 -2
  99. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/nG/nGQXdOLWsP4c926DJJBNXFUE0cKfZynnqN5aQ4T1I48.cache +0 -1
  100. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/oX/oXeqOS7RZb4eFbKrraeQtr6TUrXPTueLN_Crp7S0RLE.cache +0 -1
  101. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/p2/p27Ube4R6tciXRc0F8lpz6wUzmXIPxwqz7dKaUYVVuc.cache +0 -1
  102. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/pv/pv6tV3CDkIAmLXdU8EPLlNEkXAKJPufVD4VP30o4fWo.cache +0 -2
  103. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache +0 -2
  104. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r5/r5draRYO72lGMZZKpqYbscAWxAawJVG7uO0uyx3iw24.cache +0 -1
  105. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r7/r7kGQJTsdrqs3i-prYAVnngsoc6uAtrjLTULTJdgy9g.cache +0 -1
  106. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rI/rITk_65QtUwq61bjRPAksGeJxbLUFfz-sFPnQiZPHjw.cache +0 -3
  107. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rR/rRS9OkVGJ9Wvs1fwZH-raqD4sXkbV8WmlLGIibYpZmI.cache +0 -0
  108. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/u9/u9nsXMBU9hA4UnH4SDHgk19ev_JNeeiS1-EZDrgStCI.cache +0 -1
  109. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/un/unZXcRqhGJwHvVWJmJ1rTizBZq6H5jF28E5-FHyTYL4.cache +0 -1
  110. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/wP/wP-1NwhQC0Sp_5PHpwAI7N0_N99vLNy0TA2FcMd6zgE.cache +0 -0
  111. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache +0 -2
  112. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/xr/xrDdkyCzfXr-pIE8gfvD8iFiWPuq9EwuZIl-uU9s0_o.cache +0 -1
  113. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/yc/yc3EXb1cvVLmwnk8aQN89bgVFeuwsVz2k2p0mvC2c3c.cache +0 -1
  114. data/spec/factories/group.rb +0 -8
  115. data/spec/factories/handler.rb +0 -11
  116. data/spec/factories/handler_translation.rb +0 -13
  117. data/spec/factories/translation_key.rb +0 -8
  118. data/spec/factories/translation_value.rb +0 -9
  119. data/spec/factories/user.rb +0 -7
  120. data/spec/features/clean_ups_spec.rb +0 -38
  121. data/spec/features/duplicates_spec.rb +0 -61
  122. data/spec/features/movals_spec.rb +0 -60
  123. data/spec/handlers/file_handler_spec.rb +0 -103
  124. data/spec/handlers/model_handler_spec.rb +0 -40
  125. data/spec/handlers/validations_handler_spec.rb +0 -31
  126. data/spec/handlers_spec.rb +0 -9
  127. data/spec/lib/cache_database_generator_spec.rb +0 -59
  128. data/spec/lib/erb_inspector/file_inspector_spec.rb +0 -46
  129. data/spec/lib/erb_inspector/translation_inspector_spec.rb +0 -33
  130. data/spec/lib/erb_inspector_spec.rb +0 -30
  131. data/spec/lib/model_inspector/attribute_spec.rb +0 -18
  132. data/spec/lib/model_inspector_spec.rb +0 -39
  133. data/spec/lib/object_extensions_spec.rb +0 -7
  134. data/spec/lib/translation_migrator_spec.rb +0 -46
  135. data/spec/models/awesome_translations/handler_spec.rb +0 -8
  136. data/spec/models/awesome_translations/translated_value_spec.rb +0 -41
  137. data/spec/models/awesome_translations/translation_spec.rb +0 -54
  138. data/spec/services/test_translate_service_spec.rb +0 -11
  139. data/spec/spec_helper.rb +0 -76
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9451becf9071d246b02af0a69766fe0a8f3ab521993330abaccbde04b232c0bd
4
- data.tar.gz: 80217b0059a773a5b2bf06a228ede2a5eb003650970abf46122fa946839fdf6b
3
+ metadata.gz: e9ed16ef4e8875b37a380944c539d17d07c53a1344aa7dad547ed883cc91bbdb
4
+ data.tar.gz: f305b5327c5ac17fd9a2e3b0f5671badb9e2aa0e3c84c32813f7159682fc8387
5
5
  SHA512:
6
- metadata.gz: 45149faa843ac575add0745d69310e190d829862b1f0f16db511228928d801d011c2811209c5328b87b3db651d0e065ed119585b88dc50ed4cfa1996627a7710
7
- data.tar.gz: 3a7ede4524d1020287d7b3f4718b7a4a10e711a6dbd8b61950b392bfd0073a79d152e3c5813bd1ed758fec1d0d3b59950d0bb05f1816b11769b2bf01d3f96a39
6
+ metadata.gz: cdc74dbb6c544e79bb8a4d4c029b6278301556d8199f6c7d62f1f8295209e649de17cd18aaefdf674589dcb537d68e46ed3eaddfd8c9d69b9aa335cfae7917a7
7
+ data.tar.gz: 20385ca733b110411e364cfcbe475bbef097784c607496a714b4016f1a7e5b0b4e6b9a4b5f15693157c53db41d3904c5e5c72abf1bd72ed7f7307e8949996625
@@ -10,7 +10,7 @@ class AwesomeTranslations::CachesController < AwesomeTranslations::ApplicationCo
10
10
  cache_db_generator.cache_translations
11
11
  end
12
12
 
13
- flash[:notice] = "The cache was updated"
13
+ flash[:notice] = t("awesome_translations.the_cache_was_updated")
14
14
  redirect_to caches_path
15
15
  end
16
16
  end
@@ -24,13 +24,9 @@ class AwesomeTranslations::HandlersController < AwesomeTranslations::Application
24
24
  end
25
25
 
26
26
  def show
27
- if params[:q]
28
- @ransack_values = params[:q]
29
- else
30
- @ransack_values = {
31
- with_translations: "only_with"
32
- }
33
- end
27
+ @ransack_values = params[:q] || {
28
+ with_translations: "only_with"
29
+ }
34
30
 
35
31
  @ransack = @handler
36
32
  .groups
@@ -0,0 +1,3 @@
1
+ en:
2
+ awesome_translations:
3
+ the_cache_was_updated: The cache was updated
@@ -171,7 +171,7 @@ class AwesomeTranslations::CacheDatabaseGenerator
171
171
  private
172
172
 
173
173
  def debug(message)
174
- puts message.to_s if @debug # rubocop:disable Rails/Output
174
+ puts message if @debug # rubocop:disable Rails/Output
175
175
  end
176
176
 
177
177
  def execute_migrations
@@ -196,15 +196,17 @@ private
196
196
  debug "Looking for translations in #{dir_path}"
197
197
  @translation_values_found ||= {}
198
198
 
199
- Dir.foreach(dir_path) do |file|
200
- next if file == "." || file == ".."
199
+ if File.exist?(dir_path)
200
+ Dir.foreach(dir_path) do |file|
201
+ next if file == "." || file == ".."
201
202
 
202
- full_path = "#{dir_path}/#{file}"
203
+ full_path = "#{dir_path}/#{file}"
203
204
 
204
- if File.directory?(full_path)
205
- cache_translations_in_dir(full_path)
206
- elsif File.extname(full_path) == ".yml"
207
- cache_translations_in_file(full_path)
205
+ if File.directory?(full_path)
206
+ cache_translations_in_dir(full_path)
207
+ elsif File.extname(full_path) == ".yml"
208
+ cache_translations_in_file(full_path)
209
+ end
208
210
  end
209
211
  end
210
212
  end
@@ -218,7 +220,7 @@ private
218
220
  debug "Hash: #{i18n_hash}"
219
221
 
220
222
  i18n_hash.each do |locale, translations|
221
- cache_translations_in_hash(file_path, locale, translations)
223
+ cache_translations_in_hash(file_path, locale, translations) if locale && translations
222
224
  end
223
225
 
224
226
  debug "Done caching translations in #{file_path}"
@@ -6,8 +6,8 @@ class AwesomeTranslations::Config
6
6
  Rails.root.join(".git").to_s,
7
7
  Rails.root.join("config/locales").to_s,
8
8
  Rails.root.join("log").to_s,
9
- Rails.root.join("public/packs-test").to_s,
10
- Rails.root.join("public/packs").to_s,
9
+ "#{Rails.public_path}/packs-test",
10
+ "#{Rails.public_path}/packs",
11
11
  Rails.root.join("node_modules").to_s,
12
12
  Rails.root.join("tmp").to_s,
13
13
  Rails.root.join("storage").to_s,
@@ -1,5 +1,5 @@
1
1
  module AwesomeTranslations; end
2
2
 
3
- class AwesomeTranslations::Engine < ::Rails::Engine
3
+ class AwesomeTranslations::Engine < Rails::Engine
4
4
  isolate_namespace AwesomeTranslations
5
5
  end
@@ -124,6 +124,6 @@ private
124
124
  end
125
125
 
126
126
  def translation_with_key_exists?(translations_found, translation_full_key)
127
- translations_found.select { |t| t.full_key == translation_full_key }.any?
127
+ translations_found.any? { |t| t.full_key == translation_full_key }
128
128
  end
129
129
  end
@@ -79,7 +79,7 @@ private
79
79
  yielder << AwesomeTranslations::Translation.new(
80
80
  key: "activerecord.errors.models.#{snake_clazz_name}.attributes.#{attribute_name}.#{key}",
81
81
  key_show: "#{attribute_name}.#{key}",
82
- dir: "#{Rails.root}/config/locales/awesome_translations/models/#{snake_clazz_name}"
82
+ dir: Rails.root.join("config/locales/awesome_translations/models/#{snake_clazz_name}")
83
83
  )
84
84
  end
85
85
  end
@@ -1,3 +1,3 @@
1
1
  module AwesomeTranslations
2
- VERSION = "0.0.62".freeze
2
+ VERSION = "0.0.63".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome_translations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.62
4
+ version: 0.0.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Johansen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-31 00:00:00.000000000 Z
11
+ date: 2023-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-record-transactioner
@@ -122,34 +122,6 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: 0.0.3
125
- - !ruby/object:Gem::Dependency
126
- name: sassc
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: simple_form
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
125
  description: Semi-automatic maintenance of most translations in a Rails app.
154
126
  email:
155
127
  - kaspernj@gmail.com
@@ -188,6 +160,7 @@ files:
188
160
  - app/views/awesome_translations/migrations/new.html.erb
189
161
  - app/views/awesome_translations/movals/index.html.erb
190
162
  - app/views/layouts/awesome_translations/application.html.erb
163
+ - config/locales/en.yml
191
164
  - config/rails_best_practices.yml
192
165
  - config/routes.rb
193
166
  - db/baza_translations_migrations/20150902155200_create_translation_keys.rb
@@ -227,134 +200,6 @@ files:
227
200
  - lib/awesome_translations/translation_migrator.rb
228
201
  - lib/awesome_translations/version.rb
229
202
  - lib/tasks/awesome_translations_tasks.rake
230
- - spec/controllers/groups_controller_spec.rb
231
- - spec/controllers/handlers_controller_spec.rb
232
- - spec/controllers/users_controller_spec.rb
233
- - spec/dummy/README.rdoc
234
- - spec/dummy/Rakefile
235
- - spec/dummy/app/assets/config/manifest.js
236
- - spec/dummy/app/assets/javascripts/application.js
237
- - spec/dummy/app/assets/javascripts/translations.js
238
- - spec/dummy/app/assets/stylesheets/application.css
239
- - spec/dummy/app/controllers/application_controller.rb
240
- - spec/dummy/app/controllers/locales_controller.rb
241
- - spec/dummy/app/controllers/users_controller.rb
242
- - spec/dummy/app/helpers/application_helper.rb
243
- - spec/dummy/app/mailers/my_mailer.rb
244
- - spec/dummy/app/models/application_record.rb
245
- - spec/dummy/app/models/role.rb
246
- - spec/dummy/app/models/user.rb
247
- - spec/dummy/app/services/application_service.rb
248
- - spec/dummy/app/services/test_translate_service.rb
249
- - spec/dummy/app/views/layouts/application.html.erb
250
- - spec/dummy/app/views/users/_partial_test.html.erb
251
- - spec/dummy/app/views/users/edit.html.liquid
252
- - spec/dummy/app/views/users/index.html.haml
253
- - spec/dummy/app/views/users/show.html.erb
254
- - spec/dummy/bin/bundle
255
- - spec/dummy/bin/rails
256
- - spec/dummy/bin/rake
257
- - spec/dummy/config.ru
258
- - spec/dummy/config/application.rb
259
- - spec/dummy/config/boot.rb
260
- - spec/dummy/config/database.yml
261
- - spec/dummy/config/environment.rb
262
- - spec/dummy/config/environments/development.rb
263
- - spec/dummy/config/environments/production.rb
264
- - spec/dummy/config/environments/test.rb
265
- - spec/dummy/config/initializers/backtrace_silencers.rb
266
- - spec/dummy/config/initializers/filter_parameter_logging.rb
267
- - spec/dummy/config/initializers/inflections.rb
268
- - spec/dummy/config/initializers/mime_types.rb
269
- - spec/dummy/config/initializers/secret_token.rb
270
- - spec/dummy/config/initializers/session_store.rb
271
- - spec/dummy/config/initializers/wrap_parameters.rb
272
- - spec/dummy/config/routes.rb
273
- - spec/dummy/db/awesome_translations.sqlite3
274
- - spec/dummy/db/development.sqlite3
275
- - spec/dummy/db/migrate/20141018081559_create_users.rb
276
- - spec/dummy/db/migrate/20141018081640_create_roles.rb
277
- - spec/dummy/db/migrate/20150607110245_add_price_cents_to_roles.rb
278
- - spec/dummy/db/schema.rb
279
- - spec/dummy/db/test.sqlite3
280
- - spec/dummy/log/development.log
281
- - spec/dummy/log/test.log
282
- - spec/dummy/public/404.html
283
- - spec/dummy/public/422.html
284
- - spec/dummy/public/500.html
285
- - spec/dummy/public/favicon.ico
286
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/2m/2mnPY9uUnBNkGHLxtFaWv5hB3oA7sY2K1ZtwQlZLnAY.cache
287
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/3N/3NnKgR2TsTI1qCXKZpts0uJzp2dRJcoYp3nnFU6YE4o.cache
288
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/5r/5rpKlqLSFsRCibev7g6MQkIOhWuOah-1KAN3aqV_fYI.cache
289
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/6E/6ExTs_VkmUe-fovt99Kw8rq-xCfx0_qGsSoldSWScZI.cache
290
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8O/8OrG8phjC9s5-_7GAI2TEmRjsrGsuvq1gnJQPdMm8v8.cache
291
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8f/8f4REKYOWkNfHexyAVqGXnbOP3vky_ANapWzlRMDeQ4.cache
292
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8n/8n_viDw_qMQaQmqHM0ObPADed5uRyEYo3gDZIiTqUyA.cache
293
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/9e/9euY4B26kaHeiqfd1Qc0bsfRjpzmq36X6uqUfaRNtIs.cache
294
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AB/AB5PxrhEqi8qOm7AmSf-sHDs9ffj_iTsytaHas2ryPA.cache
295
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AI/AICJO1oM9dzlQ_N1QlHcCN9e8PC0wjtYk7-VmuNdfwg.cache
296
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ca/CaGQBiCuFgkHQ5gw8ZnGQqO8iP1md3GcllDsmaKBFdQ.cache
297
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ch/ChWez9UVXMuuBpLJMDRGuDmMuXy8gIuFo6794-wBgXc.cache
298
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/D9/D9eOwgl8pLlC7LJu-LL59UeHm9d-CH1mPgsA8j6xkMg.cache
299
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Do/Do83AoOat5W-c1g7piDGy2GMmffsY6JY0Qfuh5PY3GM.cache
300
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Hn/Hn53895nYKzu-g1FJKYS_yszYqCADXasTmN615R_qMQ.cache
301
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/It/ItV7jxV0bfHndR-H3cidDwpTFGhvs0ETLRqCTmZMXB8.cache
302
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/LL/LL0EenAcTXP-UNCqfcKtMF4Z8oDeWvdlwLQfuOVRPdw.cache
303
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Mj/MjwYGG9GkHD1fwwH2bg66EBYl3zCA_mqeDF9otey4-U.cache
304
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/NU/NUN9oO9gyoo-sY32AOLHdDACjLIxisCxXdKd84ou6cs.cache
305
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ob/ObuKkBd-camcT52YpgeuyheU-GDFLZCJnoVtq2plgW0.cache
306
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Og/Og_HPfE6734sqkQ0_h4EkOOx3Aoq1LABLH9ovjl6Bvw.cache
307
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Pw/Pwuhz_6So_JcSrxT0Uf4VaLhh_FFSJMKxLZFMbS0LNQ.cache
308
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/R-/R-nohuDiORrLlJJtKc5bQsjIRS8yTQFVR3EIxJx3JZw.cache
309
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/SX/SXA6qKBlsAQ-MLPi7-KPCPcSx9Gg2VR1xa-lCmgipgA.cache
310
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Sb/Sb1Vug319YfPL2Rci1PLMLXJjeIFYcNbHb5hKOvO1eo.cache
311
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/_f/_f0DjbdXTMEPb52THCCF5qbKkDs28tHHnap5ag4jsdU.cache
312
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dT/dTb1O_9BwFdhA3VT1UTxY-XIIoAGDHGHVO9bzRUNIfc.cache
313
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dV/dVTKOfd8qDIHT3VD-4emnl0yAIxcSF1pY0CUESPHwdM.cache
314
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/i0/i0TQIUsntlYrsibtn9YfB3qbI6bj8hLPom8KUfxR078.cache
315
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/jF/jFFXBsyFdv_TiNykX219AHs3Q7dQInYRP_80cAWZsgE.cache
316
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/mX/mXfx3VRudxpXrRx1aejtNA5YHOwND3kwWUfvdXHSors.cache
317
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/nG/nGQXdOLWsP4c926DJJBNXFUE0cKfZynnqN5aQ4T1I48.cache
318
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/oX/oXeqOS7RZb4eFbKrraeQtr6TUrXPTueLN_Crp7S0RLE.cache
319
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/p2/p27Ube4R6tciXRc0F8lpz6wUzmXIPxwqz7dKaUYVVuc.cache
320
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/pv/pv6tV3CDkIAmLXdU8EPLlNEkXAKJPufVD4VP30o4fWo.cache
321
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache
322
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r5/r5draRYO72lGMZZKpqYbscAWxAawJVG7uO0uyx3iw24.cache
323
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r7/r7kGQJTsdrqs3i-prYAVnngsoc6uAtrjLTULTJdgy9g.cache
324
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rI/rITk_65QtUwq61bjRPAksGeJxbLUFfz-sFPnQiZPHjw.cache
325
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rR/rRS9OkVGJ9Wvs1fwZH-raqD4sXkbV8WmlLGIibYpZmI.cache
326
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/u9/u9nsXMBU9hA4UnH4SDHgk19ev_JNeeiS1-EZDrgStCI.cache
327
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/un/unZXcRqhGJwHvVWJmJ1rTizBZq6H5jF28E5-FHyTYL4.cache
328
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/wP/wP-1NwhQC0Sp_5PHpwAI7N0_N99vLNy0TA2FcMd6zgE.cache
329
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache
330
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/xr/xrDdkyCzfXr-pIE8gfvD8iFiWPuq9EwuZIl-uU9s0_o.cache
331
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/yc/yc3EXb1cvVLmwnk8aQN89bgVFeuwsVz2k2p0mvC2c3c.cache
332
- - spec/factories/group.rb
333
- - spec/factories/handler.rb
334
- - spec/factories/handler_translation.rb
335
- - spec/factories/translation_key.rb
336
- - spec/factories/translation_value.rb
337
- - spec/factories/user.rb
338
- - spec/features/clean_ups_spec.rb
339
- - spec/features/duplicates_spec.rb
340
- - spec/features/movals_spec.rb
341
- - spec/handlers/file_handler_spec.rb
342
- - spec/handlers/model_handler_spec.rb
343
- - spec/handlers/validations_handler_spec.rb
344
- - spec/handlers_spec.rb
345
- - spec/lib/cache_database_generator_spec.rb
346
- - spec/lib/erb_inspector/file_inspector_spec.rb
347
- - spec/lib/erb_inspector/translation_inspector_spec.rb
348
- - spec/lib/erb_inspector_spec.rb
349
- - spec/lib/model_inspector/attribute_spec.rb
350
- - spec/lib/model_inspector_spec.rb
351
- - spec/lib/object_extensions_spec.rb
352
- - spec/lib/translation_migrator_spec.rb
353
- - spec/models/awesome_translations/handler_spec.rb
354
- - spec/models/awesome_translations/translated_value_spec.rb
355
- - spec/models/awesome_translations/translation_spec.rb
356
- - spec/services/test_translate_service_spec.rb
357
- - spec/spec_helper.rb
358
203
  homepage: https://www.github.com/kaspernj/awesome_translations
359
204
  licenses: []
360
205
  metadata:
@@ -378,132 +223,4 @@ rubygems_version: 3.2.32
378
223
  signing_key:
379
224
  specification_version: 4
380
225
  summary: Semi-automatic maintenance of most translations in a Rails app.
381
- test_files:
382
- - spec/controllers/groups_controller_spec.rb
383
- - spec/controllers/handlers_controller_spec.rb
384
- - spec/controllers/users_controller_spec.rb
385
- - spec/dummy/README.rdoc
386
- - spec/dummy/Rakefile
387
- - spec/dummy/app/assets/config/manifest.js
388
- - spec/dummy/app/assets/javascripts/application.js
389
- - spec/dummy/app/assets/javascripts/translations.js
390
- - spec/dummy/app/assets/stylesheets/application.css
391
- - spec/dummy/app/controllers/application_controller.rb
392
- - spec/dummy/app/controllers/locales_controller.rb
393
- - spec/dummy/app/controllers/users_controller.rb
394
- - spec/dummy/app/helpers/application_helper.rb
395
- - spec/dummy/app/mailers/my_mailer.rb
396
- - spec/dummy/app/models/application_record.rb
397
- - spec/dummy/app/models/role.rb
398
- - spec/dummy/app/models/user.rb
399
- - spec/dummy/app/services/application_service.rb
400
- - spec/dummy/app/services/test_translate_service.rb
401
- - spec/dummy/app/views/layouts/application.html.erb
402
- - spec/dummy/app/views/users/_partial_test.html.erb
403
- - spec/dummy/app/views/users/edit.html.liquid
404
- - spec/dummy/app/views/users/index.html.haml
405
- - spec/dummy/app/views/users/show.html.erb
406
- - spec/dummy/bin/bundle
407
- - spec/dummy/bin/rails
408
- - spec/dummy/bin/rake
409
- - spec/dummy/config/application.rb
410
- - spec/dummy/config/boot.rb
411
- - spec/dummy/config/database.yml
412
- - spec/dummy/config/environment.rb
413
- - spec/dummy/config/environments/development.rb
414
- - spec/dummy/config/environments/production.rb
415
- - spec/dummy/config/environments/test.rb
416
- - spec/dummy/config/initializers/backtrace_silencers.rb
417
- - spec/dummy/config/initializers/filter_parameter_logging.rb
418
- - spec/dummy/config/initializers/inflections.rb
419
- - spec/dummy/config/initializers/mime_types.rb
420
- - spec/dummy/config/initializers/secret_token.rb
421
- - spec/dummy/config/initializers/session_store.rb
422
- - spec/dummy/config/initializers/wrap_parameters.rb
423
- - spec/dummy/config/routes.rb
424
- - spec/dummy/config.ru
425
- - spec/dummy/db/awesome_translations.sqlite3
426
- - spec/dummy/db/development.sqlite3
427
- - spec/dummy/db/migrate/20141018081559_create_users.rb
428
- - spec/dummy/db/migrate/20141018081640_create_roles.rb
429
- - spec/dummy/db/migrate/20150607110245_add_price_cents_to_roles.rb
430
- - spec/dummy/db/schema.rb
431
- - spec/dummy/db/test.sqlite3
432
- - spec/dummy/log/development.log
433
- - spec/dummy/log/test.log
434
- - spec/dummy/public/404.html
435
- - spec/dummy/public/422.html
436
- - spec/dummy/public/500.html
437
- - spec/dummy/public/favicon.ico
438
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/2m/2mnPY9uUnBNkGHLxtFaWv5hB3oA7sY2K1ZtwQlZLnAY.cache
439
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/3N/3NnKgR2TsTI1qCXKZpts0uJzp2dRJcoYp3nnFU6YE4o.cache
440
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/5r/5rpKlqLSFsRCibev7g6MQkIOhWuOah-1KAN3aqV_fYI.cache
441
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/6E/6ExTs_VkmUe-fovt99Kw8rq-xCfx0_qGsSoldSWScZI.cache
442
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8O/8OrG8phjC9s5-_7GAI2TEmRjsrGsuvq1gnJQPdMm8v8.cache
443
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8f/8f4REKYOWkNfHexyAVqGXnbOP3vky_ANapWzlRMDeQ4.cache
444
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8n/8n_viDw_qMQaQmqHM0ObPADed5uRyEYo3gDZIiTqUyA.cache
445
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/9e/9euY4B26kaHeiqfd1Qc0bsfRjpzmq36X6uqUfaRNtIs.cache
446
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AB/AB5PxrhEqi8qOm7AmSf-sHDs9ffj_iTsytaHas2ryPA.cache
447
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AI/AICJO1oM9dzlQ_N1QlHcCN9e8PC0wjtYk7-VmuNdfwg.cache
448
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ca/CaGQBiCuFgkHQ5gw8ZnGQqO8iP1md3GcllDsmaKBFdQ.cache
449
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ch/ChWez9UVXMuuBpLJMDRGuDmMuXy8gIuFo6794-wBgXc.cache
450
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/D9/D9eOwgl8pLlC7LJu-LL59UeHm9d-CH1mPgsA8j6xkMg.cache
451
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Do/Do83AoOat5W-c1g7piDGy2GMmffsY6JY0Qfuh5PY3GM.cache
452
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Hn/Hn53895nYKzu-g1FJKYS_yszYqCADXasTmN615R_qMQ.cache
453
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/It/ItV7jxV0bfHndR-H3cidDwpTFGhvs0ETLRqCTmZMXB8.cache
454
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/LL/LL0EenAcTXP-UNCqfcKtMF4Z8oDeWvdlwLQfuOVRPdw.cache
455
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Mj/MjwYGG9GkHD1fwwH2bg66EBYl3zCA_mqeDF9otey4-U.cache
456
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/NU/NUN9oO9gyoo-sY32AOLHdDACjLIxisCxXdKd84ou6cs.cache
457
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ob/ObuKkBd-camcT52YpgeuyheU-GDFLZCJnoVtq2plgW0.cache
458
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Og/Og_HPfE6734sqkQ0_h4EkOOx3Aoq1LABLH9ovjl6Bvw.cache
459
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Pw/Pwuhz_6So_JcSrxT0Uf4VaLhh_FFSJMKxLZFMbS0LNQ.cache
460
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/R-/R-nohuDiORrLlJJtKc5bQsjIRS8yTQFVR3EIxJx3JZw.cache
461
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/SX/SXA6qKBlsAQ-MLPi7-KPCPcSx9Gg2VR1xa-lCmgipgA.cache
462
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Sb/Sb1Vug319YfPL2Rci1PLMLXJjeIFYcNbHb5hKOvO1eo.cache
463
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/_f/_f0DjbdXTMEPb52THCCF5qbKkDs28tHHnap5ag4jsdU.cache
464
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dT/dTb1O_9BwFdhA3VT1UTxY-XIIoAGDHGHVO9bzRUNIfc.cache
465
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dV/dVTKOfd8qDIHT3VD-4emnl0yAIxcSF1pY0CUESPHwdM.cache
466
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/i0/i0TQIUsntlYrsibtn9YfB3qbI6bj8hLPom8KUfxR078.cache
467
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/jF/jFFXBsyFdv_TiNykX219AHs3Q7dQInYRP_80cAWZsgE.cache
468
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/mX/mXfx3VRudxpXrRx1aejtNA5YHOwND3kwWUfvdXHSors.cache
469
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/nG/nGQXdOLWsP4c926DJJBNXFUE0cKfZynnqN5aQ4T1I48.cache
470
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/oX/oXeqOS7RZb4eFbKrraeQtr6TUrXPTueLN_Crp7S0RLE.cache
471
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/p2/p27Ube4R6tciXRc0F8lpz6wUzmXIPxwqz7dKaUYVVuc.cache
472
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/pv/pv6tV3CDkIAmLXdU8EPLlNEkXAKJPufVD4VP30o4fWo.cache
473
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache
474
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r5/r5draRYO72lGMZZKpqYbscAWxAawJVG7uO0uyx3iw24.cache
475
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r7/r7kGQJTsdrqs3i-prYAVnngsoc6uAtrjLTULTJdgy9g.cache
476
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rI/rITk_65QtUwq61bjRPAksGeJxbLUFfz-sFPnQiZPHjw.cache
477
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rR/rRS9OkVGJ9Wvs1fwZH-raqD4sXkbV8WmlLGIibYpZmI.cache
478
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/u9/u9nsXMBU9hA4UnH4SDHgk19ev_JNeeiS1-EZDrgStCI.cache
479
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/un/unZXcRqhGJwHvVWJmJ1rTizBZq6H5jF28E5-FHyTYL4.cache
480
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/wP/wP-1NwhQC0Sp_5PHpwAI7N0_N99vLNy0TA2FcMd6zgE.cache
481
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache
482
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/xr/xrDdkyCzfXr-pIE8gfvD8iFiWPuq9EwuZIl-uU9s0_o.cache
483
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/yc/yc3EXb1cvVLmwnk8aQN89bgVFeuwsVz2k2p0mvC2c3c.cache
484
- - spec/factories/group.rb
485
- - spec/factories/handler.rb
486
- - spec/factories/handler_translation.rb
487
- - spec/factories/translation_key.rb
488
- - spec/factories/translation_value.rb
489
- - spec/factories/user.rb
490
- - spec/features/clean_ups_spec.rb
491
- - spec/features/duplicates_spec.rb
492
- - spec/features/movals_spec.rb
493
- - spec/handlers/file_handler_spec.rb
494
- - spec/handlers/model_handler_spec.rb
495
- - spec/handlers/validations_handler_spec.rb
496
- - spec/handlers_spec.rb
497
- - spec/lib/cache_database_generator_spec.rb
498
- - spec/lib/erb_inspector/file_inspector_spec.rb
499
- - spec/lib/erb_inspector/translation_inspector_spec.rb
500
- - spec/lib/erb_inspector_spec.rb
501
- - spec/lib/model_inspector/attribute_spec.rb
502
- - spec/lib/model_inspector_spec.rb
503
- - spec/lib/object_extensions_spec.rb
504
- - spec/lib/translation_migrator_spec.rb
505
- - spec/models/awesome_translations/handler_spec.rb
506
- - spec/models/awesome_translations/translated_value_spec.rb
507
- - spec/models/awesome_translations/translation_spec.rb
508
- - spec/services/test_translate_service_spec.rb
509
- - spec/spec_helper.rb
226
+ test_files: []
@@ -1,83 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe AwesomeTranslations::GroupsController do
4
- routes { AwesomeTranslations::Engine.routes }
5
-
6
- let(:model_locales_path) { Rails.root.join("config/locales/awesome_translations/models").to_s }
7
- let(:user_yml_path) { "#{model_locales_path}/user/da.yml" }
8
- let(:role_yml_path) { "#{model_locales_path}/role/da.yml" }
9
- let(:date_time_path) { Rails.root.join("config/locales/awesome_translations/date_time/da.yml").to_s }
10
-
11
- before do
12
- AwesomeTranslations::CacheDatabaseGenerator.current.cache_translations
13
-
14
- FileUtils.rm_f(model_locales_path) if File.exist?(model_locales_path)
15
- FileUtils.rm_f(date_time_path) if File.exist?(date_time_path)
16
-
17
- I18n.load_path.delete(date_time_path)
18
- I18n.load_path.delete(model_locales_path)
19
- end
20
-
21
- render_views
22
-
23
- describe "#update" do
24
- it "updates translations" do
25
- expect(I18n.load_path).not_to include model_locales_path
26
-
27
- put :update, params: {handler_id: "model_handler", id: "User", t: {
28
- "activerecord.attributes.user.password" => {"da" => "Adgangskode", "de" => "Kenwort", "en" => "Password"}
29
- }}
30
-
31
- danish_user_translations = YAML.load_file(user_yml_path)
32
- expect(danish_user_translations["da"]["activerecord"]["attributes"]["user"]["password"]).to eq "Adgangskode"
33
- end
34
-
35
- it "updates paths" do
36
- key_to_update = "activerecord.attributes.role.role"
37
-
38
- put :update, params: {handler_id: "model_handler", id: "Role", t: {
39
- key_to_update => {"da" => "Rolle", "de" => "Die type", "en" => "Role"}
40
- }}
41
-
42
- da_translation_value = AwesomeTranslations::CacheDatabaseGenerator::TranslationValue
43
- .joins(:translation_key)
44
- .find_by(translation_keys: {key: key_to_update}, locale: "da")
45
-
46
- de_translation_value = AwesomeTranslations::CacheDatabaseGenerator::TranslationValue
47
- .joins(:translation_key)
48
- .find_by(translation_keys: {key: key_to_update}, locale: "de")
49
-
50
- expect(da_translation_value).not_to eq nil
51
- expect(da_translation_value.value).to eq "Rolle"
52
-
53
- expect(de_translation_value).not_to eq nil
54
- expect(de_translation_value.value).to eq "Die type"
55
-
56
- expect(I18n.load_path).to include role_yml_path
57
- end
58
-
59
- it "handles array translations" do
60
- put :update, params: {handler_id: "rails_handler", id: "date_time", t: {
61
- "date.day_names" => {
62
- "1" => {
63
- "da" => "Mandag"
64
- },
65
- "4" => {
66
- "da" => "Torsdag"
67
- }
68
- }
69
- }}
70
-
71
- translations = YAML.load_file(date_time_path)
72
-
73
- expect(translations["da"]["date"]["day_names"][1]).to eq "Mandag"
74
- expect(translations["da"]["date"]["day_names"][4]).to eq "Torsdag"
75
- end
76
- end
77
-
78
- it "#update_translations_cache" do
79
- request.env["HTTP_REFERER"] = handler_group_path("rails_handler", "date_time")
80
- post :update_translations_cache, params: {handler_id: "rails_handler", id: "date_time"}
81
- expect(response).to redirect_to handler_group_path("rails_handler", "date_time")
82
- end
83
- end
@@ -1,51 +0,0 @@
1
- require "spec_helper"
2
- require "fileutils"
3
-
4
- describe AwesomeTranslations::HandlersController do
5
- let!(:group) { create :group }
6
- let!(:handler_translation) { create :handler_translation, group: group }
7
-
8
- routes { AwesomeTranslations::Engine.routes }
9
-
10
- render_views
11
-
12
- describe "#index" do
13
- it "renders the page" do
14
- get :index
15
- expect(response).to be_successful
16
- end
17
- end
18
-
19
- describe "#show" do
20
- it "renders the page" do
21
- AwesomeTranslations::CacheDatabaseGenerator.current.cache_translations
22
- get :show, params: {id: "model_handler"}
23
- expect(response).to be_successful
24
- end
25
-
26
- it "filters with missing translations" do
27
- AwesomeTranslations::CacheDatabaseGenerator.current.cache_translations
28
- get :show, params: {id: "model_handler", with_missing_translations: "only_with"}
29
-
30
- all_groups = AwesomeTranslations::CacheDatabaseGenerator::Group.all
31
- groups = assigns(:groups)
32
-
33
- expect(all_groups.length).to be > groups.length
34
- expect(groups.length).to eq 5
35
- expect(response).to be_successful
36
- end
37
- end
38
-
39
- it "#update_cache" do
40
- request.env["HTTP_REFERER"] = handlers_path
41
- post :update_cache
42
- expect(response).to redirect_to :handlers
43
- end
44
-
45
- it "#update_groups_cache" do
46
- AwesomeTranslations::CacheDatabaseGenerator.current.cache_translations
47
- request.env["HTTP_REFERER"] = handler_path("rails_handler")
48
- post :update_groups_cache, params: {id: "rails_handler"}
49
- expect(response).to redirect_to handler_path("rails_handler")
50
- end
51
- end
@@ -1,21 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe UsersController do
4
- let(:user) { create :user }
5
-
6
- render_views
7
-
8
- around do |example|
9
- I18n.with_locale(:en) do
10
- example.call
11
- end
12
- end
13
-
14
- it "#update" do
15
- patch :update, params: {id: user.id, user: {email: "newemail@example.com"}}
16
- expect(response).to redirect_to user_url(user)
17
-
18
- # Ensure correct key
19
- expect(flash[:notice]).to eq "translation missing: en.users.user_was_updated"
20
- end
21
- end
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.