translation_center 1.7.2 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -2
  3. data/Rakefile +8 -13
  4. data/app/assets/javascripts/translation_center/application.js +1 -1
  5. data/app/assets/stylesheets/translation_center/application.css +1 -1
  6. data/app/assets/stylesheets/translation_center/translation_keys.css +3 -1
  7. data/app/controllers/translation_center/application_controller.rb +2 -2
  8. data/app/controllers/translation_center/translation_keys_controller.rb +4 -4
  9. data/app/models/translation_center/activity_query.rb +2 -3
  10. data/app/models/translation_center/category.rb +7 -2
  11. data/app/models/translation_center/translation.rb +54 -32
  12. data/app/models/translation_center/translation_key.rb +29 -18
  13. data/app/views/layouts/translation_center/application.html.haml +0 -2
  14. data/app/views/translation_center/translation_keys/_translation_keys.html.haml +3 -1
  15. data/app/views/translation_center/translations/_show.html.haml +3 -3
  16. data/config/routes.rb +3 -3
  17. data/db/development.sqlite3 +0 -0
  18. data/{test/dummy/db/migrate/20130410082611_devise_create_users.rb → db/migrate/20130410082600_devise_create_users.rb} +0 -0
  19. data/{test/dummy/db/migrate/20130410082701_create_articles.rb → db/migrate/20130410082601_create_articles.rb} +0 -0
  20. data/{test/dummy/db/migrate/20130410084711234392_create_translation_center_categories.rb → db/migrate/20130410084602_create_translation_center_categories.rb} +0 -0
  21. data/{test/dummy/db/migrate/20130410084711235054_create_translation_center_translation_keys.rb → db/migrate/20130410084603_create_translation_center_translation_keys.rb} +0 -0
  22. data/{test/dummy/db/migrate/20130410084711235601_create_translation_center_translations.rb → db/migrate/20130410084604_create_translation_center_translations.rb} +0 -0
  23. data/{test/dummy/db/migrate/20130410084711_acts_as_votable_migration.rb → db/migrate/20130410084605_acts_as_votable_migration.rb} +1 -0
  24. data/{test/dummy/db/migrate/20130410084711235602_install_audited.rb → db/migrate/20130410084606_install_audited.rb} +0 -0
  25. data/{test/dummy/db/migrate/20130410113111070575_add_de_status_translation_center_translation_keys.rb → db/migrate/20130410113607_add_de_status_translation_center_translation_keys.rb} +0 -0
  26. data/{test/dummy/db/migrate/20130417134539377014_add_ar_status_translation_center_translation_keys.rb → db/migrate/20130417134608_add_ar_status_translation_center_translation_keys.rb} +0 -0
  27. data/{test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb → db/migrate/20130506103609_fix_translation_user_relation.rb} +0 -0
  28. data/{test/dummy/db/migrate/20130801102022_add_indicies.rb → db/migrate/20130801102610_add_indicies.rb} +0 -0
  29. data/{test/dummy/db → db}/schema.rb +13 -13
  30. data/{test/dummy/public/favicon.ico → db/test.sqlite3} +0 -0
  31. data/lib/generators/translation_center/add_lang/add_lang_generator.rb +5 -2
  32. data/lib/generators/translation_center/install/install_generator.rb +4 -4
  33. data/lib/translation_center/acts_as_translator.rb +1 -1
  34. data/lib/translation_center/engine.rb +7 -0
  35. data/lib/translation_center/translation_helpers.rb +1 -1
  36. data/lib/translation_center/translations_transfer.rb +6 -5
  37. data/lib/translation_center/version.rb +1 -1
  38. data/spec/controllers/categories_controller_spec.rb +47 -0
  39. data/spec/controllers/center_controller_spec.rb +77 -0
  40. data/spec/controllers/translation_keys_controller_spec.rb +87 -0
  41. data/spec/controllers/translations_controller_spec.rb +70 -0
  42. data/{test → spec}/dummy/README.rdoc +0 -0
  43. data/{test → spec}/dummy/Rakefile +0 -0
  44. data/{test → spec}/dummy/app/assets/javascripts/application.js +0 -1
  45. data/{test → spec}/dummy/app/assets/stylesheets/application.css +0 -1
  46. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  47. data/{test → spec}/dummy/app/helpers/application_helper.rb +0 -0
  48. data/{test → spec}/dummy/app/models/user.rb +2 -5
  49. data/{test → spec}/dummy/app/views/layouts/application.html.erb +0 -1
  50. data/{test → spec}/dummy/config.ru +0 -0
  51. data/{test → spec}/dummy/config/application.rb +10 -5
  52. data/{test → spec}/dummy/config/boot.rb +0 -0
  53. data/spec/dummy/config/database.yml +25 -0
  54. data/{test → spec}/dummy/config/environment.rb +2 -0
  55. data/{test → spec}/dummy/config/environments/development.rb +0 -0
  56. data/{test → spec}/dummy/config/environments/production.rb +0 -0
  57. data/{test → spec}/dummy/config/environments/test.rb +2 -2
  58. data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
  59. data/{test → spec}/dummy/config/initializers/devise.rb +3 -1
  60. data/{test → spec}/dummy/config/initializers/inflections.rb +0 -0
  61. data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -0
  62. data/{test → spec}/dummy/config/initializers/secret_token.rb +1 -1
  63. data/{test → spec}/dummy/config/initializers/session_store.rb +1 -1
  64. data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +1 -1
  65. data/{test → spec}/dummy/config/locales/devise.en.yml +0 -0
  66. data/spec/dummy/config/locales/en.yml +5 -0
  67. data/spec/dummy/config/routes.rb +7 -0
  68. data/{test → spec}/dummy/config/translation_center.yml +23 -6
  69. data/spec/dummy/db/migrate/20130410082611_devise_create_users.translation_center.rb +46 -0
  70. data/spec/dummy/db/migrate/20130410082701_create_articles.translation_center.rb +10 -0
  71. data/spec/dummy/db/migrate/20130410084702_create_translation_center_categories.translation_center.rb +9 -0
  72. data/spec/dummy/db/migrate/20130410084703_create_translation_center_translation_keys.translation_center.rb +14 -0
  73. data/spec/dummy/db/migrate/20130410084704_create_translation_center_translations.translation_center.rb +13 -0
  74. data/spec/dummy/db/migrate/20130410084711_acts_as_votable_migration.translation_center.rb +24 -0
  75. data/spec/dummy/db/migrate/20130410084712_install_audited.translation_center.rb +28 -0
  76. data/spec/dummy/db/migrate/20130410113113_add_de_status_translation_center_translation_keys.translation_center.rb +5 -0
  77. data/spec/dummy/db/migrate/20130417134534_add_ar_status_translation_center_translation_keys.rb +5 -0
  78. data/spec/dummy/db/migrate/20130506103956_fix_translation_user_relation.translation_center.rb +12 -0
  79. data/spec/dummy/db/migrate/20130801102021_add_indicies.translation_center.rb +8 -0
  80. data/spec/dummy/db/schema.rb +111 -0
  81. data/{test → spec}/dummy/public/404.html +0 -0
  82. data/{test → spec}/dummy/public/422.html +0 -0
  83. data/{test → spec}/dummy/public/500.html +0 -0
  84. data/spec/dummy/public/favicon.ico +0 -0
  85. data/{test → spec}/dummy/script/rails +0 -0
  86. data/spec/factories/category_factory.rb +5 -0
  87. data/spec/factories/translation_factory.rb +8 -0
  88. data/spec/factories/translation_key_factory.rb +5 -0
  89. data/spec/factories/user_factory.rb +6 -0
  90. data/spec/factories/vote_factory.rb +13 -0
  91. data/spec/lib/generators/translation_center/add_lang/add_lang_generator_spec.rb +26 -0
  92. data/spec/models/translation_center/category_spec.rb +39 -0
  93. data/spec/models/translation_center/translation_key_spec.rb +145 -0
  94. data/spec/models/translation_center/translation_spec.rb +117 -0
  95. data/spec/schema.rb +112 -0
  96. data/spec/spec_helper.rb +52 -0
  97. data/spec/support/devise.rb +3 -0
  98. metadata +360 -208
  99. data/test/dummy/app/assets/images/translation_center_logo.png +0 -0
  100. data/test/dummy/app/assets/javascripts/articles.js +0 -2
  101. data/test/dummy/app/assets/stylesheets/articles.css +0 -4
  102. data/test/dummy/app/assets/stylesheets/scaffold.css +0 -56
  103. data/test/dummy/app/controllers/application_controller.rb +0 -6
  104. data/test/dummy/app/controllers/articles_controller.rb +0 -85
  105. data/test/dummy/app/helpers/articles_helper.rb +0 -2
  106. data/test/dummy/app/models/article.rb +0 -7
  107. data/test/dummy/app/views/articles/_form.html.haml +0 -16
  108. data/test/dummy/app/views/articles/edit.html.haml +0 -7
  109. data/test/dummy/app/views/articles/index.html.haml +0 -32
  110. data/test/dummy/app/views/articles/new.html.haml +0 -5
  111. data/test/dummy/app/views/articles/show.html.haml +0 -14
  112. data/test/dummy/config/database.yml +0 -42
  113. data/test/dummy/config/locales/ar.yml +0 -6
  114. data/test/dummy/config/locales/de.yml +0 -2
  115. data/test/dummy/config/locales/en.yml +0 -361
  116. data/test/dummy/config/routes.rb +0 -10
  117. data/test/dummy/spec/spec_helper.rb +0 -38
  118. data/test/dummy/test/fixtures/articles.yml +0 -9
  119. data/test/dummy/test/fixtures/posts.yml +0 -9
  120. data/test/dummy/test/fixtures/users.yml +0 -11
  121. data/test/dummy/test/functional/articles_controller_test.rb +0 -49
  122. data/test/dummy/test/functional/posts_controller_test.rb +0 -49
  123. data/test/dummy/test/unit/article_test.rb +0 -7
  124. data/test/dummy/test/unit/helpers/articles_helper_test.rb +0 -4
  125. data/test/dummy/test/unit/helpers/posts_helper_test.rb +0 -4
  126. data/test/dummy/test/unit/post_test.rb +0 -7
  127. data/test/dummy/test/unit/user_test.rb +0 -7
  128. data/test/fixtures/translation_center/categories.yml +0 -7
  129. data/test/fixtures/translation_center/translation_keys.yml +0 -11
  130. data/test/fixtures/translation_center/translations.yml +0 -15
  131. data/test/functional/translation_center/categories_controller_test.rb +0 -51
  132. data/test/functional/translation_center/center_controller_test.rb +0 -9
  133. data/test/functional/translation_center/translation_keys_controller_test.rb +0 -51
  134. data/test/functional/translation_center/translations_controller_test.rb +0 -51
  135. data/test/integration/navigation_test.rb +0 -10
  136. data/test/test_helper.rb +0 -15
  137. data/test/translation_center_test.rb +0 -7
  138. data/test/unit/helpers/translation_center/categories_helper_test.rb +0 -6
  139. data/test/unit/helpers/translation_center/center_helper_test.rb +0 -6
  140. data/test/unit/helpers/translation_center/translation_keys_helper_test.rb +0 -6
  141. data/test/unit/helpers/translation_center/translations_helper_test.rb +0 -6
  142. data/test/unit/translation_center/category_test.rb +0 -9
  143. data/test/unit/translation_center/translation_key_test.rb +0 -9
  144. data/test/unit/translation_center/translation_test.rb +0 -9
data/test/test_helper.rb DELETED
@@ -1,15 +0,0 @@
1
- # Configure Rails Environment
2
- ENV["RAILS_ENV"] = "test"
3
-
4
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
- require "rails/test_help"
6
-
7
- Rails.backtrace_cleaner.remove_silencers!
8
-
9
- # Load support files
10
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
-
12
- # Load fixtures from the engine
13
- if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class TranslationCenterTest < ActiveSupport::TestCase
4
- test "truth" do
5
- assert_kind_of Module, TranslationCenter
6
- end
7
- end
@@ -1,6 +0,0 @@
1
- require 'test_helper'
2
-
3
- module TranslationCenter
4
- class CategoriesHelperTest < ActionView::TestCase
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- require 'test_helper'
2
-
3
- module TranslationCenter
4
- class CenterHelperTest < ActionView::TestCase
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- require 'test_helper'
2
-
3
- module TranslationCenter
4
- class TranslationKeysHelperTest < ActionView::TestCase
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- require 'test_helper'
2
-
3
- module TranslationCenter
4
- class TranslationsHelperTest < ActionView::TestCase
5
- end
6
- end
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
-
3
- module TranslationCenter
4
- class CategoryTest < ActiveSupport::TestCase
5
- # test "the truth" do
6
- # assert true
7
- # end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
-
3
- module TranslationCenter
4
- class TranslationKeyTest < ActiveSupport::TestCase
5
- # test "the truth" do
6
- # assert true
7
- # end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
-
3
- module TranslationCenter
4
- class TranslationTest < ActiveSupport::TestCase
5
- # test "the truth" do
6
- # assert true
7
- # end
8
- end
9
- end