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.
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/app/helpers/awesome_translations/views_helper.rb +2 -2
  5. data/config/locales/en.yml +3 -0
  6. data/lib/awesome_translations/cache_database_generator.rb +11 -9
  7. data/lib/awesome_translations/config.rb +2 -2
  8. data/lib/awesome_translations/engine.rb +1 -1
  9. data/lib/awesome_translations/erb_inspector/file_inspector.rb +1 -1
  10. data/lib/awesome_translations/global_translator.rb +12 -12
  11. data/lib/awesome_translations/handlers/validations_handler.rb +1 -1
  12. data/lib/awesome_translations/translate_functionality.rb +2 -2
  13. data/lib/awesome_translations/version.rb +1 -1
  14. metadata +4 -281
  15. data/spec/controllers/groups_controller_spec.rb +0 -83
  16. data/spec/controllers/handlers_controller_spec.rb +0 -51
  17. data/spec/controllers/users_controller_spec.rb +0 -21
  18. data/spec/dummy/README.rdoc +0 -28
  19. data/spec/dummy/Rakefile +0 -6
  20. data/spec/dummy/app/assets/config/manifest.js +0 -3
  21. data/spec/dummy/app/assets/javascripts/application.js +0 -0
  22. data/spec/dummy/app/assets/javascripts/translations.js +0 -3
  23. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  24. data/spec/dummy/app/controllers/application_controller.rb +0 -15
  25. data/spec/dummy/app/controllers/locales_controller.rb +0 -6
  26. data/spec/dummy/app/controllers/users_controller.rb +0 -43
  27. data/spec/dummy/app/helpers/application_helper.rb +0 -7
  28. data/spec/dummy/app/mailers/my_mailer.rb +0 -5
  29. data/spec/dummy/app/models/application_record.rb +0 -3
  30. data/spec/dummy/app/models/role.rb +0 -17
  31. data/spec/dummy/app/models/user.rb +0 -8
  32. data/spec/dummy/app/views/layouts/application.html.erb +0 -28
  33. data/spec/dummy/app/views/users/_partial_test.html.erb +0 -1
  34. data/spec/dummy/app/views/users/edit.html.liquid +0 -7
  35. data/spec/dummy/app/views/users/index.html.haml +0 -16
  36. data/spec/dummy/app/views/users/show.html.erb +0 -7
  37. data/spec/dummy/bin/bundle +0 -3
  38. data/spec/dummy/bin/rails +0 -4
  39. data/spec/dummy/bin/rake +0 -4
  40. data/spec/dummy/config/application.rb +0 -35
  41. data/spec/dummy/config/boot.rb +0 -5
  42. data/spec/dummy/config/database.yml +0 -25
  43. data/spec/dummy/config/environment.rb +0 -5
  44. data/spec/dummy/config/environments/development.rb +0 -32
  45. data/spec/dummy/config/environments/production.rb +0 -80
  46. data/spec/dummy/config/environments/test.rb +0 -39
  47. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  48. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  49. data/spec/dummy/config/initializers/inflections.rb +0 -16
  50. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  51. data/spec/dummy/config/initializers/secret_token.rb +0 -13
  52. data/spec/dummy/config/initializers/session_store.rb +0 -3
  53. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  54. data/spec/dummy/config/routes.rb +0 -7
  55. data/spec/dummy/config.ru +0 -4
  56. data/spec/dummy/db/awesome_translations.sqlite3 +0 -0
  57. data/spec/dummy/db/development.sqlite3 +0 -0
  58. data/spec/dummy/db/migrate/20141018081559_create_users.rb +0 -9
  59. data/spec/dummy/db/migrate/20141018081640_create_roles.rb +0 -10
  60. data/spec/dummy/db/migrate/20150607110245_add_price_cents_to_roles.rb +0 -5
  61. data/spec/dummy/db/schema.rb +0 -30
  62. data/spec/dummy/db/test.sqlite3 +0 -0
  63. data/spec/dummy/log/development.log +0 -52
  64. data/spec/dummy/log/test.log +0 -770
  65. data/spec/dummy/public/404.html +0 -58
  66. data/spec/dummy/public/422.html +0 -58
  67. data/spec/dummy/public/500.html +0 -57
  68. data/spec/dummy/public/favicon.ico +0 -0
  69. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/2m/2mnPY9uUnBNkGHLxtFaWv5hB3oA7sY2K1ZtwQlZLnAY.cache +0 -2
  70. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/3N/3NnKgR2TsTI1qCXKZpts0uJzp2dRJcoYp3nnFU6YE4o.cache +0 -2
  71. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/5r/5rpKlqLSFsRCibev7g6MQkIOhWuOah-1KAN3aqV_fYI.cache +0 -0
  72. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/6E/6ExTs_VkmUe-fovt99Kw8rq-xCfx0_qGsSoldSWScZI.cache +0 -1
  73. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8O/8OrG8phjC9s5-_7GAI2TEmRjsrGsuvq1gnJQPdMm8v8.cache +0 -0
  74. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8f/8f4REKYOWkNfHexyAVqGXnbOP3vky_ANapWzlRMDeQ4.cache +0 -3
  75. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8n/8n_viDw_qMQaQmqHM0ObPADed5uRyEYo3gDZIiTqUyA.cache +0 -1
  76. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/9e/9euY4B26kaHeiqfd1Qc0bsfRjpzmq36X6uqUfaRNtIs.cache +0 -1
  77. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AB/AB5PxrhEqi8qOm7AmSf-sHDs9ffj_iTsytaHas2ryPA.cache +0 -1
  78. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AI/AICJO1oM9dzlQ_N1QlHcCN9e8PC0wjtYk7-VmuNdfwg.cache +0 -0
  79. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ca/CaGQBiCuFgkHQ5gw8ZnGQqO8iP1md3GcllDsmaKBFdQ.cache +0 -2
  80. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ch/ChWez9UVXMuuBpLJMDRGuDmMuXy8gIuFo6794-wBgXc.cache +0 -1
  81. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/D9/D9eOwgl8pLlC7LJu-LL59UeHm9d-CH1mPgsA8j6xkMg.cache +0 -1
  82. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Do/Do83AoOat5W-c1g7piDGy2GMmffsY6JY0Qfuh5PY3GM.cache +0 -2
  83. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Hn/Hn53895nYKzu-g1FJKYS_yszYqCADXasTmN615R_qMQ.cache +0 -1
  84. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/It/ItV7jxV0bfHndR-H3cidDwpTFGhvs0ETLRqCTmZMXB8.cache +0 -1
  85. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/LL/LL0EenAcTXP-UNCqfcKtMF4Z8oDeWvdlwLQfuOVRPdw.cache +0 -0
  86. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Mj/MjwYGG9GkHD1fwwH2bg66EBYl3zCA_mqeDF9otey4-U.cache +0 -3
  87. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/NU/NUN9oO9gyoo-sY32AOLHdDACjLIxisCxXdKd84ou6cs.cache +0 -2
  88. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ob/ObuKkBd-camcT52YpgeuyheU-GDFLZCJnoVtq2plgW0.cache +0 -0
  89. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Og/Og_HPfE6734sqkQ0_h4EkOOx3Aoq1LABLH9ovjl6Bvw.cache +0 -0
  90. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Pw/Pwuhz_6So_JcSrxT0Uf4VaLhh_FFSJMKxLZFMbS0LNQ.cache +0 -0
  91. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/R-/R-nohuDiORrLlJJtKc5bQsjIRS8yTQFVR3EIxJx3JZw.cache +0 -1
  92. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/SX/SXA6qKBlsAQ-MLPi7-KPCPcSx9Gg2VR1xa-lCmgipgA.cache +0 -1
  93. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Sb/Sb1Vug319YfPL2Rci1PLMLXJjeIFYcNbHb5hKOvO1eo.cache +0 -2
  94. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/_f/_f0DjbdXTMEPb52THCCF5qbKkDs28tHHnap5ag4jsdU.cache +0 -0
  95. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dT/dTb1O_9BwFdhA3VT1UTxY-XIIoAGDHGHVO9bzRUNIfc.cache +0 -0
  96. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dV/dVTKOfd8qDIHT3VD-4emnl0yAIxcSF1pY0CUESPHwdM.cache +0 -0
  97. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/i0/i0TQIUsntlYrsibtn9YfB3qbI6bj8hLPom8KUfxR078.cache +0 -1
  98. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/jF/jFFXBsyFdv_TiNykX219AHs3Q7dQInYRP_80cAWZsgE.cache +0 -0
  99. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/mX/mXfx3VRudxpXrRx1aejtNA5YHOwND3kwWUfvdXHSors.cache +0 -2
  100. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/nG/nGQXdOLWsP4c926DJJBNXFUE0cKfZynnqN5aQ4T1I48.cache +0 -1
  101. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/oX/oXeqOS7RZb4eFbKrraeQtr6TUrXPTueLN_Crp7S0RLE.cache +0 -1
  102. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/p2/p27Ube4R6tciXRc0F8lpz6wUzmXIPxwqz7dKaUYVVuc.cache +0 -1
  103. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/pv/pv6tV3CDkIAmLXdU8EPLlNEkXAKJPufVD4VP30o4fWo.cache +0 -2
  104. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache +0 -2
  105. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r5/r5draRYO72lGMZZKpqYbscAWxAawJVG7uO0uyx3iw24.cache +0 -1
  106. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r7/r7kGQJTsdrqs3i-prYAVnngsoc6uAtrjLTULTJdgy9g.cache +0 -1
  107. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rI/rITk_65QtUwq61bjRPAksGeJxbLUFfz-sFPnQiZPHjw.cache +0 -3
  108. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rR/rRS9OkVGJ9Wvs1fwZH-raqD4sXkbV8WmlLGIibYpZmI.cache +0 -0
  109. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/u9/u9nsXMBU9hA4UnH4SDHgk19ev_JNeeiS1-EZDrgStCI.cache +0 -1
  110. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/un/unZXcRqhGJwHvVWJmJ1rTizBZq6H5jF28E5-FHyTYL4.cache +0 -1
  111. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/wP/wP-1NwhQC0Sp_5PHpwAI7N0_N99vLNy0TA2FcMd6zgE.cache +0 -0
  112. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache +0 -2
  113. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/xr/xrDdkyCzfXr-pIE8gfvD8iFiWPuq9EwuZIl-uU9s0_o.cache +0 -1
  114. data/spec/dummy/tmp/cache/assets/sprockets/v4.0.0/yc/yc3EXb1cvVLmwnk8aQN89bgVFeuwsVz2k2p0mvC2c3c.cache +0 -1
  115. data/spec/factories/group.rb +0 -8
  116. data/spec/factories/handler.rb +0 -11
  117. data/spec/factories/handler_translation.rb +0 -13
  118. data/spec/factories/translation_key.rb +0 -8
  119. data/spec/factories/translation_value.rb +0 -9
  120. data/spec/factories/user.rb +0 -7
  121. data/spec/features/clean_ups_spec.rb +0 -38
  122. data/spec/features/duplicates_spec.rb +0 -61
  123. data/spec/features/movals_spec.rb +0 -60
  124. data/spec/handlers/file_handler_spec.rb +0 -103
  125. data/spec/handlers/model_handler_spec.rb +0 -40
  126. data/spec/handlers/validations_handler_spec.rb +0 -31
  127. data/spec/handlers_spec.rb +0 -9
  128. data/spec/lib/cache_database_generator_spec.rb +0 -59
  129. data/spec/lib/erb_inspector/file_inspector_spec.rb +0 -46
  130. data/spec/lib/erb_inspector/translation_inspector_spec.rb +0 -33
  131. data/spec/lib/erb_inspector_spec.rb +0 -30
  132. data/spec/lib/model_inspector/attribute_spec.rb +0 -18
  133. data/spec/lib/model_inspector_spec.rb +0 -39
  134. data/spec/lib/object_extensions_spec.rb +0 -7
  135. data/spec/lib/translation_migrator_spec.rb +0 -46
  136. data/spec/models/awesome_translations/handler_spec.rb +0 -8
  137. data/spec/models/awesome_translations/translated_value_spec.rb +0 -41
  138. data/spec/models/awesome_translations/translation_spec.rb +0 -54
  139. data/spec/spec_helper.rb +0 -76
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8982155c60a5db849fe01b8007859a18edf3efb1895417bfef73e4dd525a317e
4
- data.tar.gz: 58e47453d01189a483d665074ab374e770dd8fd1d96878626bbae5de64bcb0a4
3
+ metadata.gz: e9ed16ef4e8875b37a380944c539d17d07c53a1344aa7dad547ed883cc91bbdb
4
+ data.tar.gz: f305b5327c5ac17fd9a2e3b0f5671badb9e2aa0e3c84c32813f7159682fc8387
5
5
  SHA512:
6
- metadata.gz: 87904a819f4834458e15cf6c0d470104e2dbb380d9a5cbef0b3d31eb560905b395c0ae0cc7e767f430819ce2766d661f9d2d347b7830397546ca1e89e47dba9f
7
- data.tar.gz: 91964d3d6c9916fe493d596f554792e2fa29c6eed492546123fc9483cc0496d780d1d51d22adde6de5513c95da56e98c6f59f67e829f05fa388749a408f44579
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
@@ -1,5 +1,5 @@
1
1
  module AwesomeTranslations::ViewsHelper
2
- def helper_t(key, args = {})
3
- AwesomeTranslations::GlobalTranslator.translate(key, helper: true, caller_number: 1, translation_args: [args])
2
+ def helper_t(key, *args, **opts)
3
+ AwesomeTranslations::GlobalTranslator.translate(key, helper: true, caller_number: 1, translation_args: args, translation_opts: opts)
4
4
  end
5
5
  end
@@ -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
@@ -22,22 +22,22 @@ class AwesomeTranslations::GlobalTranslator
22
22
  new(key: key, args: args, blk: blk, call: call).translation
23
23
  end
24
24
 
25
- attr_reader :key, :args, :blk, :call
26
-
27
- def initialize(init_args)
28
- @key = init_args.fetch(:key)
29
- @args = init_args.fetch(:args)
30
- @blk = init_args.fetch(:blk)
31
- @call = init_args.fetch(:call)
25
+ attr_reader :args, :blk, :call, :key, :translation_args, :translation_opts
26
+
27
+ def initialize(args:, blk:, call:, key:)
28
+ @args = args
29
+ @blk = blk
30
+ @call = call
31
+ @key = key
32
+ @translation_args = args[:translation_args] || []
33
+ @translation_opts = args[:translation_opts] || {}
32
34
  end
33
35
 
34
36
  def translation
35
- if @key.is_a?(String) && @key.start_with?(".")
36
- # Change key to full path.
37
- @key = translation_key
38
- end
37
+ # Change key to full path.
38
+ @key = translation_key if @key.is_a?(String) && @key.start_with?(".")
39
39
 
40
- I18n.t(@key, *args[:translation_args], **args[:translation_opts], &blk)
40
+ I18n.t(@key, *translation_args, **translation_opts, &blk)
41
41
  end
42
42
 
43
43
  private
@@ -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
@@ -7,8 +7,8 @@ module AwesomeTranslations::TranslateFunctionality
7
7
  end
8
8
 
9
9
  module Methods
10
- def t(key, args = {}, &blk)
11
- AwesomeTranslations::GlobalTranslator.translate(key, translation_args: [args], caller_number: 1, &blk)
10
+ def t(key, *args, **opts, &blk)
11
+ AwesomeTranslations::GlobalTranslator.translate(key, caller_number: 1, translation_args: args, translation_opts: opts, &blk)
12
12
  end
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module AwesomeTranslations
2
- VERSION = "0.0.61".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.61
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,131 +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/views/layouts/application.html.erb
248
- - spec/dummy/app/views/users/_partial_test.html.erb
249
- - spec/dummy/app/views/users/edit.html.liquid
250
- - spec/dummy/app/views/users/index.html.haml
251
- - spec/dummy/app/views/users/show.html.erb
252
- - spec/dummy/bin/bundle
253
- - spec/dummy/bin/rails
254
- - spec/dummy/bin/rake
255
- - spec/dummy/config.ru
256
- - spec/dummy/config/application.rb
257
- - spec/dummy/config/boot.rb
258
- - spec/dummy/config/database.yml
259
- - spec/dummy/config/environment.rb
260
- - spec/dummy/config/environments/development.rb
261
- - spec/dummy/config/environments/production.rb
262
- - spec/dummy/config/environments/test.rb
263
- - spec/dummy/config/initializers/backtrace_silencers.rb
264
- - spec/dummy/config/initializers/filter_parameter_logging.rb
265
- - spec/dummy/config/initializers/inflections.rb
266
- - spec/dummy/config/initializers/mime_types.rb
267
- - spec/dummy/config/initializers/secret_token.rb
268
- - spec/dummy/config/initializers/session_store.rb
269
- - spec/dummy/config/initializers/wrap_parameters.rb
270
- - spec/dummy/config/routes.rb
271
- - spec/dummy/db/awesome_translations.sqlite3
272
- - spec/dummy/db/development.sqlite3
273
- - spec/dummy/db/migrate/20141018081559_create_users.rb
274
- - spec/dummy/db/migrate/20141018081640_create_roles.rb
275
- - spec/dummy/db/migrate/20150607110245_add_price_cents_to_roles.rb
276
- - spec/dummy/db/schema.rb
277
- - spec/dummy/db/test.sqlite3
278
- - spec/dummy/log/development.log
279
- - spec/dummy/log/test.log
280
- - spec/dummy/public/404.html
281
- - spec/dummy/public/422.html
282
- - spec/dummy/public/500.html
283
- - spec/dummy/public/favicon.ico
284
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/2m/2mnPY9uUnBNkGHLxtFaWv5hB3oA7sY2K1ZtwQlZLnAY.cache
285
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/3N/3NnKgR2TsTI1qCXKZpts0uJzp2dRJcoYp3nnFU6YE4o.cache
286
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/5r/5rpKlqLSFsRCibev7g6MQkIOhWuOah-1KAN3aqV_fYI.cache
287
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/6E/6ExTs_VkmUe-fovt99Kw8rq-xCfx0_qGsSoldSWScZI.cache
288
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8O/8OrG8phjC9s5-_7GAI2TEmRjsrGsuvq1gnJQPdMm8v8.cache
289
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8f/8f4REKYOWkNfHexyAVqGXnbOP3vky_ANapWzlRMDeQ4.cache
290
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8n/8n_viDw_qMQaQmqHM0ObPADed5uRyEYo3gDZIiTqUyA.cache
291
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/9e/9euY4B26kaHeiqfd1Qc0bsfRjpzmq36X6uqUfaRNtIs.cache
292
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AB/AB5PxrhEqi8qOm7AmSf-sHDs9ffj_iTsytaHas2ryPA.cache
293
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AI/AICJO1oM9dzlQ_N1QlHcCN9e8PC0wjtYk7-VmuNdfwg.cache
294
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ca/CaGQBiCuFgkHQ5gw8ZnGQqO8iP1md3GcllDsmaKBFdQ.cache
295
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ch/ChWez9UVXMuuBpLJMDRGuDmMuXy8gIuFo6794-wBgXc.cache
296
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/D9/D9eOwgl8pLlC7LJu-LL59UeHm9d-CH1mPgsA8j6xkMg.cache
297
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Do/Do83AoOat5W-c1g7piDGy2GMmffsY6JY0Qfuh5PY3GM.cache
298
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Hn/Hn53895nYKzu-g1FJKYS_yszYqCADXasTmN615R_qMQ.cache
299
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/It/ItV7jxV0bfHndR-H3cidDwpTFGhvs0ETLRqCTmZMXB8.cache
300
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/LL/LL0EenAcTXP-UNCqfcKtMF4Z8oDeWvdlwLQfuOVRPdw.cache
301
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Mj/MjwYGG9GkHD1fwwH2bg66EBYl3zCA_mqeDF9otey4-U.cache
302
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/NU/NUN9oO9gyoo-sY32AOLHdDACjLIxisCxXdKd84ou6cs.cache
303
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ob/ObuKkBd-camcT52YpgeuyheU-GDFLZCJnoVtq2plgW0.cache
304
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Og/Og_HPfE6734sqkQ0_h4EkOOx3Aoq1LABLH9ovjl6Bvw.cache
305
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Pw/Pwuhz_6So_JcSrxT0Uf4VaLhh_FFSJMKxLZFMbS0LNQ.cache
306
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/R-/R-nohuDiORrLlJJtKc5bQsjIRS8yTQFVR3EIxJx3JZw.cache
307
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/SX/SXA6qKBlsAQ-MLPi7-KPCPcSx9Gg2VR1xa-lCmgipgA.cache
308
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Sb/Sb1Vug319YfPL2Rci1PLMLXJjeIFYcNbHb5hKOvO1eo.cache
309
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/_f/_f0DjbdXTMEPb52THCCF5qbKkDs28tHHnap5ag4jsdU.cache
310
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dT/dTb1O_9BwFdhA3VT1UTxY-XIIoAGDHGHVO9bzRUNIfc.cache
311
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dV/dVTKOfd8qDIHT3VD-4emnl0yAIxcSF1pY0CUESPHwdM.cache
312
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/i0/i0TQIUsntlYrsibtn9YfB3qbI6bj8hLPom8KUfxR078.cache
313
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/jF/jFFXBsyFdv_TiNykX219AHs3Q7dQInYRP_80cAWZsgE.cache
314
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/mX/mXfx3VRudxpXrRx1aejtNA5YHOwND3kwWUfvdXHSors.cache
315
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/nG/nGQXdOLWsP4c926DJJBNXFUE0cKfZynnqN5aQ4T1I48.cache
316
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/oX/oXeqOS7RZb4eFbKrraeQtr6TUrXPTueLN_Crp7S0RLE.cache
317
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/p2/p27Ube4R6tciXRc0F8lpz6wUzmXIPxwqz7dKaUYVVuc.cache
318
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/pv/pv6tV3CDkIAmLXdU8EPLlNEkXAKJPufVD4VP30o4fWo.cache
319
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache
320
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r5/r5draRYO72lGMZZKpqYbscAWxAawJVG7uO0uyx3iw24.cache
321
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r7/r7kGQJTsdrqs3i-prYAVnngsoc6uAtrjLTULTJdgy9g.cache
322
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rI/rITk_65QtUwq61bjRPAksGeJxbLUFfz-sFPnQiZPHjw.cache
323
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rR/rRS9OkVGJ9Wvs1fwZH-raqD4sXkbV8WmlLGIibYpZmI.cache
324
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/u9/u9nsXMBU9hA4UnH4SDHgk19ev_JNeeiS1-EZDrgStCI.cache
325
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/un/unZXcRqhGJwHvVWJmJ1rTizBZq6H5jF28E5-FHyTYL4.cache
326
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/wP/wP-1NwhQC0Sp_5PHpwAI7N0_N99vLNy0TA2FcMd6zgE.cache
327
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache
328
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/xr/xrDdkyCzfXr-pIE8gfvD8iFiWPuq9EwuZIl-uU9s0_o.cache
329
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/yc/yc3EXb1cvVLmwnk8aQN89bgVFeuwsVz2k2p0mvC2c3c.cache
330
- - spec/factories/group.rb
331
- - spec/factories/handler.rb
332
- - spec/factories/handler_translation.rb
333
- - spec/factories/translation_key.rb
334
- - spec/factories/translation_value.rb
335
- - spec/factories/user.rb
336
- - spec/features/clean_ups_spec.rb
337
- - spec/features/duplicates_spec.rb
338
- - spec/features/movals_spec.rb
339
- - spec/handlers/file_handler_spec.rb
340
- - spec/handlers/model_handler_spec.rb
341
- - spec/handlers/validations_handler_spec.rb
342
- - spec/handlers_spec.rb
343
- - spec/lib/cache_database_generator_spec.rb
344
- - spec/lib/erb_inspector/file_inspector_spec.rb
345
- - spec/lib/erb_inspector/translation_inspector_spec.rb
346
- - spec/lib/erb_inspector_spec.rb
347
- - spec/lib/model_inspector/attribute_spec.rb
348
- - spec/lib/model_inspector_spec.rb
349
- - spec/lib/object_extensions_spec.rb
350
- - spec/lib/translation_migrator_spec.rb
351
- - spec/models/awesome_translations/handler_spec.rb
352
- - spec/models/awesome_translations/translated_value_spec.rb
353
- - spec/models/awesome_translations/translation_spec.rb
354
- - spec/spec_helper.rb
355
203
  homepage: https://www.github.com/kaspernj/awesome_translations
356
204
  licenses: []
357
205
  metadata:
@@ -375,129 +223,4 @@ rubygems_version: 3.2.32
375
223
  signing_key:
376
224
  specification_version: 4
377
225
  summary: Semi-automatic maintenance of most translations in a Rails app.
378
- test_files:
379
- - spec/controllers/groups_controller_spec.rb
380
- - spec/controllers/handlers_controller_spec.rb
381
- - spec/controllers/users_controller_spec.rb
382
- - spec/dummy/README.rdoc
383
- - spec/dummy/Rakefile
384
- - spec/dummy/app/assets/config/manifest.js
385
- - spec/dummy/app/assets/javascripts/application.js
386
- - spec/dummy/app/assets/javascripts/translations.js
387
- - spec/dummy/app/assets/stylesheets/application.css
388
- - spec/dummy/app/controllers/application_controller.rb
389
- - spec/dummy/app/controllers/locales_controller.rb
390
- - spec/dummy/app/controllers/users_controller.rb
391
- - spec/dummy/app/helpers/application_helper.rb
392
- - spec/dummy/app/mailers/my_mailer.rb
393
- - spec/dummy/app/models/application_record.rb
394
- - spec/dummy/app/models/role.rb
395
- - spec/dummy/app/models/user.rb
396
- - spec/dummy/app/views/layouts/application.html.erb
397
- - spec/dummy/app/views/users/_partial_test.html.erb
398
- - spec/dummy/app/views/users/edit.html.liquid
399
- - spec/dummy/app/views/users/index.html.haml
400
- - spec/dummy/app/views/users/show.html.erb
401
- - spec/dummy/bin/bundle
402
- - spec/dummy/bin/rails
403
- - spec/dummy/bin/rake
404
- - spec/dummy/config/application.rb
405
- - spec/dummy/config/boot.rb
406
- - spec/dummy/config/database.yml
407
- - spec/dummy/config/environment.rb
408
- - spec/dummy/config/environments/development.rb
409
- - spec/dummy/config/environments/production.rb
410
- - spec/dummy/config/environments/test.rb
411
- - spec/dummy/config/initializers/backtrace_silencers.rb
412
- - spec/dummy/config/initializers/filter_parameter_logging.rb
413
- - spec/dummy/config/initializers/inflections.rb
414
- - spec/dummy/config/initializers/mime_types.rb
415
- - spec/dummy/config/initializers/secret_token.rb
416
- - spec/dummy/config/initializers/session_store.rb
417
- - spec/dummy/config/initializers/wrap_parameters.rb
418
- - spec/dummy/config/routes.rb
419
- - spec/dummy/config.ru
420
- - spec/dummy/db/awesome_translations.sqlite3
421
- - spec/dummy/db/development.sqlite3
422
- - spec/dummy/db/migrate/20141018081559_create_users.rb
423
- - spec/dummy/db/migrate/20141018081640_create_roles.rb
424
- - spec/dummy/db/migrate/20150607110245_add_price_cents_to_roles.rb
425
- - spec/dummy/db/schema.rb
426
- - spec/dummy/db/test.sqlite3
427
- - spec/dummy/log/development.log
428
- - spec/dummy/log/test.log
429
- - spec/dummy/public/404.html
430
- - spec/dummy/public/422.html
431
- - spec/dummy/public/500.html
432
- - spec/dummy/public/favicon.ico
433
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/2m/2mnPY9uUnBNkGHLxtFaWv5hB3oA7sY2K1ZtwQlZLnAY.cache
434
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/3N/3NnKgR2TsTI1qCXKZpts0uJzp2dRJcoYp3nnFU6YE4o.cache
435
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/5r/5rpKlqLSFsRCibev7g6MQkIOhWuOah-1KAN3aqV_fYI.cache
436
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/6E/6ExTs_VkmUe-fovt99Kw8rq-xCfx0_qGsSoldSWScZI.cache
437
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8O/8OrG8phjC9s5-_7GAI2TEmRjsrGsuvq1gnJQPdMm8v8.cache
438
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8f/8f4REKYOWkNfHexyAVqGXnbOP3vky_ANapWzlRMDeQ4.cache
439
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/8n/8n_viDw_qMQaQmqHM0ObPADed5uRyEYo3gDZIiTqUyA.cache
440
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/9e/9euY4B26kaHeiqfd1Qc0bsfRjpzmq36X6uqUfaRNtIs.cache
441
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AB/AB5PxrhEqi8qOm7AmSf-sHDs9ffj_iTsytaHas2ryPA.cache
442
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/AI/AICJO1oM9dzlQ_N1QlHcCN9e8PC0wjtYk7-VmuNdfwg.cache
443
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ca/CaGQBiCuFgkHQ5gw8ZnGQqO8iP1md3GcllDsmaKBFdQ.cache
444
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ch/ChWez9UVXMuuBpLJMDRGuDmMuXy8gIuFo6794-wBgXc.cache
445
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/D9/D9eOwgl8pLlC7LJu-LL59UeHm9d-CH1mPgsA8j6xkMg.cache
446
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Do/Do83AoOat5W-c1g7piDGy2GMmffsY6JY0Qfuh5PY3GM.cache
447
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Hn/Hn53895nYKzu-g1FJKYS_yszYqCADXasTmN615R_qMQ.cache
448
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/It/ItV7jxV0bfHndR-H3cidDwpTFGhvs0ETLRqCTmZMXB8.cache
449
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/LL/LL0EenAcTXP-UNCqfcKtMF4Z8oDeWvdlwLQfuOVRPdw.cache
450
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Mj/MjwYGG9GkHD1fwwH2bg66EBYl3zCA_mqeDF9otey4-U.cache
451
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/NU/NUN9oO9gyoo-sY32AOLHdDACjLIxisCxXdKd84ou6cs.cache
452
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Ob/ObuKkBd-camcT52YpgeuyheU-GDFLZCJnoVtq2plgW0.cache
453
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Og/Og_HPfE6734sqkQ0_h4EkOOx3Aoq1LABLH9ovjl6Bvw.cache
454
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Pw/Pwuhz_6So_JcSrxT0Uf4VaLhh_FFSJMKxLZFMbS0LNQ.cache
455
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/R-/R-nohuDiORrLlJJtKc5bQsjIRS8yTQFVR3EIxJx3JZw.cache
456
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/SX/SXA6qKBlsAQ-MLPi7-KPCPcSx9Gg2VR1xa-lCmgipgA.cache
457
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/Sb/Sb1Vug319YfPL2Rci1PLMLXJjeIFYcNbHb5hKOvO1eo.cache
458
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/_f/_f0DjbdXTMEPb52THCCF5qbKkDs28tHHnap5ag4jsdU.cache
459
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dT/dTb1O_9BwFdhA3VT1UTxY-XIIoAGDHGHVO9bzRUNIfc.cache
460
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/dV/dVTKOfd8qDIHT3VD-4emnl0yAIxcSF1pY0CUESPHwdM.cache
461
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/i0/i0TQIUsntlYrsibtn9YfB3qbI6bj8hLPom8KUfxR078.cache
462
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/jF/jFFXBsyFdv_TiNykX219AHs3Q7dQInYRP_80cAWZsgE.cache
463
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/mX/mXfx3VRudxpXrRx1aejtNA5YHOwND3kwWUfvdXHSors.cache
464
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/nG/nGQXdOLWsP4c926DJJBNXFUE0cKfZynnqN5aQ4T1I48.cache
465
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/oX/oXeqOS7RZb4eFbKrraeQtr6TUrXPTueLN_Crp7S0RLE.cache
466
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/p2/p27Ube4R6tciXRc0F8lpz6wUzmXIPxwqz7dKaUYVVuc.cache
467
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/pv/pv6tV3CDkIAmLXdU8EPLlNEkXAKJPufVD4VP30o4fWo.cache
468
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache
469
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r5/r5draRYO72lGMZZKpqYbscAWxAawJVG7uO0uyx3iw24.cache
470
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/r7/r7kGQJTsdrqs3i-prYAVnngsoc6uAtrjLTULTJdgy9g.cache
471
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rI/rITk_65QtUwq61bjRPAksGeJxbLUFfz-sFPnQiZPHjw.cache
472
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/rR/rRS9OkVGJ9Wvs1fwZH-raqD4sXkbV8WmlLGIibYpZmI.cache
473
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/u9/u9nsXMBU9hA4UnH4SDHgk19ev_JNeeiS1-EZDrgStCI.cache
474
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/un/unZXcRqhGJwHvVWJmJ1rTizBZq6H5jF28E5-FHyTYL4.cache
475
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/wP/wP-1NwhQC0Sp_5PHpwAI7N0_N99vLNy0TA2FcMd6zgE.cache
476
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache
477
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/xr/xrDdkyCzfXr-pIE8gfvD8iFiWPuq9EwuZIl-uU9s0_o.cache
478
- - spec/dummy/tmp/cache/assets/sprockets/v4.0.0/yc/yc3EXb1cvVLmwnk8aQN89bgVFeuwsVz2k2p0mvC2c3c.cache
479
- - spec/factories/group.rb
480
- - spec/factories/handler.rb
481
- - spec/factories/handler_translation.rb
482
- - spec/factories/translation_key.rb
483
- - spec/factories/translation_value.rb
484
- - spec/factories/user.rb
485
- - spec/features/clean_ups_spec.rb
486
- - spec/features/duplicates_spec.rb
487
- - spec/features/movals_spec.rb
488
- - spec/handlers/file_handler_spec.rb
489
- - spec/handlers/model_handler_spec.rb
490
- - spec/handlers/validations_handler_spec.rb
491
- - spec/handlers_spec.rb
492
- - spec/lib/cache_database_generator_spec.rb
493
- - spec/lib/erb_inspector/file_inspector_spec.rb
494
- - spec/lib/erb_inspector/translation_inspector_spec.rb
495
- - spec/lib/erb_inspector_spec.rb
496
- - spec/lib/model_inspector/attribute_spec.rb
497
- - spec/lib/model_inspector_spec.rb
498
- - spec/lib/object_extensions_spec.rb
499
- - spec/lib/translation_migrator_spec.rb
500
- - spec/models/awesome_translations/handler_spec.rb
501
- - spec/models/awesome_translations/translated_value_spec.rb
502
- - spec/models/awesome_translations/translation_spec.rb
503
- - 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