picolena 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (390) hide show
  1. data/History.txt +11 -4
  2. data/Manifest.txt +1 -0
  3. data/README.txt +2 -2
  4. data/bin/picolena +1 -1
  5. data/config/hoe.rb +10 -10
  6. data/lib/picolena/USAGE +1 -1
  7. data/lib/picolena/config/basic.rb +11 -11
  8. data/lib/picolena/picolena_generator.rb +15 -14
  9. data/lib/picolena/templates/app/controllers/application.rb +5 -5
  10. data/lib/picolena/templates/app/controllers/documents_controller.rb +17 -9
  11. data/lib/picolena/templates/app/helpers/documents_helper.rb +15 -14
  12. data/lib/picolena/templates/app/models/document.rb +28 -37
  13. data/lib/picolena/templates/app/models/finder.rb +12 -37
  14. data/lib/picolena/templates/app/models/indexer.rb +58 -37
  15. data/lib/picolena/templates/app/models/plain_text_extractor.rb +16 -16
  16. data/lib/picolena/templates/app/models/query.rb +5 -5
  17. data/lib/picolena/templates/app/views/documents/show.html.haml +3 -3
  18. data/lib/picolena/templates/app/views/layouts/application.html.haml +2 -2
  19. data/lib/picolena/templates/config/environment.rb +1 -1
  20. data/lib/picolena/templates/config/initializers/002_load_indexed_dirs.rb +8 -8
  21. data/lib/picolena/templates/config/initializers/003_load_white_list_IPs.rb +8 -8
  22. data/lib/picolena/templates/config/initializers/005_load_custom_title_and_names_and_links.rb +5 -5
  23. data/lib/picolena/templates/config/initializers/006_load_icons.rb +9 -7
  24. data/lib/picolena/templates/lang/ui/es.yml +1 -1
  25. data/lib/picolena/templates/lib/core_exts.rb +7 -7
  26. data/lib/picolena/templates/lib/plain_text_extractor_DSL.rb +10 -10
  27. data/lib/picolena/templates/lib/plain_text_extractors/ms.excel.rb +1 -1
  28. data/lib/picolena/templates/lib/plain_text_extractors/plain_text.rb +2 -2
  29. data/lib/picolena/templates/lib/tasks/index.rake +8 -3
  30. data/lib/picolena/templates/lib/tasks/install_dependencies.rake +2 -2
  31. data/lib/picolena/templates/lib/tasks/log.rake +1 -1
  32. data/lib/picolena/templates/public/.htaccess +3 -3
  33. data/lib/picolena/templates/public/images/flags/sv.png +0 -0
  34. data/lib/picolena/templates/public/stylesheets/style.css +2 -2
  35. data/lib/picolena/templates/script/spec_server +1 -1
  36. data/lib/picolena/templates/spec/controllers/application_controller_spec.rb +2 -2
  37. data/lib/picolena/templates/spec/controllers/documents_controller_spec.rb +17 -17
  38. data/lib/picolena/templates/spec/helpers/application_helper_spec.rb +2 -2
  39. data/lib/picolena/templates/spec/helpers/documents_helper_spec.rb +3 -3
  40. data/lib/picolena/templates/spec/models/basic_finder_spec.rb +14 -14
  41. data/lib/picolena/templates/spec/models/document_spec.rb +7 -15
  42. data/lib/picolena/templates/spec/models/finder_spec.rb +45 -38
  43. data/lib/picolena/templates/spec/models/host_indexing_system_spec.rb +5 -5
  44. data/lib/picolena/templates/spec/models/index_directories_spec.rb +2 -2
  45. data/lib/picolena/templates/spec/models/plain_text_extractor_spec.rb +6 -6
  46. data/lib/picolena/templates/spec/models/query_spec.rb +7 -7
  47. data/lib/picolena/templates/spec/rcov.opts +1 -1
  48. data/lib/picolena/templates/spec/test_dirs/indexed/basic/myfirstjavaprog.java +1 -1
  49. data/lib/picolena/templates/spec/test_dirs/indexed/basic/queens.for +1 -1
  50. data/lib/picolena/templates/spec/test_dirs/indexed/lang/hugo +74 -74
  51. data/lib/picolena/templates/spec/test_dirs/indexed/lang/lorca +56 -56
  52. data/lib/picolena/templates/spec/test_dirs/indexed/others/7.html +4 -4
  53. data/lib/picolena/templates/spec/test_dirs/indexed/others/ccmatrix1.cpp +6 -6
  54. data/lib/picolena/templates/spec/test_dirs/indexed/others/lemonde.htm +326 -326
  55. data/lib/picolena/templates/spec/test_dirs/indexed/others/nested/ReadMe.rtf +62 -62
  56. data/lib/picolena/templates/spec/test_dirs/indexed/others/xor.vee +0 -1
  57. data/lib/picolena/templates/spec/test_dirs/indexed/others/zafh.net.html +1 -1
  58. data/lib/picolena/version.rb +1 -1
  59. data/lib/rubigen_ext.rb +1 -1
  60. data/rails_plugins/globalite/CHANGELOG +1 -1
  61. data/rails_plugins/globalite/README +19 -19
  62. data/rails_plugins/globalite/lang/rails/de-DE.yml +6 -6
  63. data/rails_plugins/globalite/lang/rails/en-UK.yml +10 -10
  64. data/rails_plugins/globalite/lang/rails/en-US.yml +10 -10
  65. data/rails_plugins/globalite/lang/rails/es-ES.yml +11 -11
  66. data/rails_plugins/globalite/lang/rails/fr-FR.yml +10 -10
  67. data/rails_plugins/globalite/lang/rails/it.yml +10 -10
  68. data/rails_plugins/globalite/lang/rails/pt-BR.yml +6 -6
  69. data/rails_plugins/globalite/lang/rails/pt-PT.yml +6 -6
  70. data/rails_plugins/globalite/lib/globalite/l10n.rb +25 -25
  71. data/rails_plugins/globalite/lib/globalite/locale.rb +9 -9
  72. data/rails_plugins/globalite/lib/rails/core_ext.rb +4 -4
  73. data/rails_plugins/globalite/lib/rails/localization.rb +3 -3
  74. data/rails_plugins/globalite/lib/rails/localized_action_view.rb +17 -17
  75. data/rails_plugins/globalite/lib/rails/localized_active_record.rb +4 -4
  76. data/rails_plugins/globalite/rdoc/classes/ActionView/Helpers/DateHelper.html +19 -19
  77. data/rails_plugins/globalite/rdoc/classes/ActionView/Helpers/FormOptionsHelper.html +9 -9
  78. data/rails_plugins/globalite/rdoc/classes/ActionView/Helpers/NumberHelper.html +8 -8
  79. data/rails_plugins/globalite/rdoc/classes/ActionView/Helpers.html +5 -5
  80. data/rails_plugins/globalite/rdoc/classes/ActionView.html +5 -5
  81. data/rails_plugins/globalite/rdoc/classes/ActiveRecord/Errors.html +6 -6
  82. data/rails_plugins/globalite/rdoc/classes/ActiveRecord.html +5 -5
  83. data/rails_plugins/globalite/rdoc/classes/Array.html +6 -6
  84. data/rails_plugins/globalite/rdoc/classes/Date.html +8 -8
  85. data/rails_plugins/globalite/rdoc/classes/Globalite/L10n.html +49 -49
  86. data/rails_plugins/globalite/rdoc/classes/Globalite.html +6 -6
  87. data/rails_plugins/globalite/rdoc/classes/Kernel.html +6 -6
  88. data/rails_plugins/globalite/rdoc/classes/Locale.html +11 -11
  89. data/rails_plugins/globalite/rdoc/classes/Time.html +8 -8
  90. data/rails_plugins/globalite/rdoc/files/README.html +5 -5
  91. data/rails_plugins/globalite/rdoc/files/lib/globalite/l10n_rb.html +5 -5
  92. data/rails_plugins/globalite/rdoc/files/lib/globalite/locale_rb.html +5 -5
  93. data/rails_plugins/globalite/rdoc/files/lib/globalite_rb.html +5 -5
  94. data/rails_plugins/globalite/rdoc/files/lib/rails/core_ext_rb.html +5 -5
  95. data/rails_plugins/globalite/rdoc/files/lib/rails/localization_rb.html +5 -5
  96. data/rails_plugins/globalite/rdoc/files/lib/rails/localized_action_view_rb.html +5 -5
  97. data/rails_plugins/globalite/rdoc/files/lib/rails/localized_active_record_rb.html +5 -5
  98. data/rails_plugins/globalite/rdoc/fr_class_index.html +1 -1
  99. data/rails_plugins/globalite/rdoc/fr_file_index.html +1 -1
  100. data/rails_plugins/globalite/rdoc/fr_method_index.html +1 -1
  101. data/rails_plugins/globalite/rdoc/index.html +1 -1
  102. data/rails_plugins/globalite/spec/core_localization_spec.rb +18 -18
  103. data/rails_plugins/globalite/spec/l10n_spec.rb +25 -25
  104. data/rails_plugins/globalite/tasks/globalite_tasks.rake +6 -6
  105. data/rails_plugins/rspec/CHANGES +16 -16
  106. data/rails_plugins/rspec/README +2 -2
  107. data/rails_plugins/rspec/Rakefile +1 -1
  108. data/rails_plugins/rspec/UPGRADE +1 -1
  109. data/rails_plugins/rspec/autotest/discover.rb +1 -1
  110. data/rails_plugins/rspec/examples/pure/autogenerated_docstrings_example.rb +5 -5
  111. data/rails_plugins/rspec/examples/pure/before_and_after_example.rb +2 -2
  112. data/rails_plugins/rspec/examples/pure/behave_as_example.rb +5 -5
  113. data/rails_plugins/rspec/examples/pure/custom_expectation_matchers.rb +7 -7
  114. data/rails_plugins/rspec/examples/pure/file_accessor.rb +1 -1
  115. data/rails_plugins/rspec/examples/pure/file_accessor_spec.rb +2 -2
  116. data/rails_plugins/rspec/examples/pure/helper_method_example.rb +1 -1
  117. data/rails_plugins/rspec/examples/pure/legacy_spec.rb +2 -2
  118. data/rails_plugins/rspec/examples/pure/predicate_example.rb +2 -2
  119. data/rails_plugins/rspec/examples/pure/shared_example_group_example.rb +11 -11
  120. data/rails_plugins/rspec/examples/pure/shared_stack_examples.rb +4 -4
  121. data/rails_plugins/rspec/examples/pure/stack.rb +6 -6
  122. data/rails_plugins/rspec/examples/pure/stack_spec.rb +7 -7
  123. data/rails_plugins/rspec/examples/pure/stack_spec_with_nested_example_groups.rb +10 -10
  124. data/rails_plugins/rspec/examples/pure/stubbing_example.rb +4 -4
  125. data/rails_plugins/rspec/examples/stories/adder.rb +2 -2
  126. data/rails_plugins/rspec/examples/stories/addition +8 -8
  127. data/rails_plugins/rspec/examples/stories/calculator.rb +5 -5
  128. data/rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb +7 -7
  129. data/rails_plugins/rspec/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb +13 -13
  130. data/rails_plugins/rspec/examples/stories/game-of-life/behaviour/stories/create_a_cell.rb +5 -5
  131. data/rails_plugins/rspec/examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb +2 -2
  132. data/rails_plugins/rspec/examples/stories/game-of-life/life/game.rb +3 -3
  133. data/rails_plugins/rspec/examples/stories/game-of-life/life/grid.rb +10 -10
  134. data/rails_plugins/rspec/failing_examples/failing_autogenerated_docstrings_example.rb +5 -5
  135. data/rails_plugins/rspec/failing_examples/failure_in_setup.rb +3 -3
  136. data/rails_plugins/rspec/failing_examples/failure_in_teardown.rb +3 -3
  137. data/rails_plugins/rspec/failing_examples/mocking_example.rb +1 -1
  138. data/rails_plugins/rspec/failing_examples/raising_example.rb +11 -11
  139. data/rails_plugins/rspec/failing_examples/team_spec.rb +5 -5
  140. data/rails_plugins/rspec/lib/autotest/rspec.rb +5 -5
  141. data/rails_plugins/rspec/lib/spec/example/configuration.rb +4 -4
  142. data/rails_plugins/rspec/lib/spec/example/example_group_factory.rb +3 -3
  143. data/rails_plugins/rspec/lib/spec/example/example_group_methods.rb +1 -1
  144. data/rails_plugins/rspec/lib/spec/example/example_matcher.rb +2 -2
  145. data/rails_plugins/rspec/lib/spec/example/example_methods.rb +4 -4
  146. data/rails_plugins/rspec/lib/spec/example/pending.rb +1 -1
  147. data/rails_plugins/rspec/lib/spec/expectations/differs/default.rb +5 -5
  148. data/rails_plugins/rspec/lib/spec/expectations/errors.rb +1 -1
  149. data/rails_plugins/rspec/lib/spec/expectations/handler.rb +5 -5
  150. data/rails_plugins/rspec/lib/spec/expectations.rb +1 -1
  151. data/rails_plugins/rspec/lib/spec/extensions/main.rb +8 -8
  152. data/rails_plugins/rspec/lib/spec/interop/test/unit/ui/console/testrunner.rb +2 -2
  153. data/rails_plugins/rspec/lib/spec/matchers/be.rb +18 -18
  154. data/rails_plugins/rspec/lib/spec/matchers/be_close.rb +4 -4
  155. data/rails_plugins/rspec/lib/spec/matchers/change.rb +20 -20
  156. data/rails_plugins/rspec/lib/spec/matchers/eql.rb +4 -4
  157. data/rails_plugins/rspec/lib/spec/matchers/equal.rb +4 -4
  158. data/rails_plugins/rspec/lib/spec/matchers/has.rb +8 -8
  159. data/rails_plugins/rspec/lib/spec/matchers/have.rb +9 -9
  160. data/rails_plugins/rspec/lib/spec/matchers/include.rb +7 -7
  161. data/rails_plugins/rspec/lib/spec/matchers/match.rb +6 -6
  162. data/rails_plugins/rspec/lib/spec/matchers/operator_matcher.rb +1 -1
  163. data/rails_plugins/rspec/lib/spec/matchers/raise_error.rb +6 -6
  164. data/rails_plugins/rspec/lib/spec/matchers/respond_to.rb +7 -7
  165. data/rails_plugins/rspec/lib/spec/matchers/satisfy.rb +4 -4
  166. data/rails_plugins/rspec/lib/spec/matchers/simple_matcher.rb +3 -3
  167. data/rails_plugins/rspec/lib/spec/matchers/throw_symbol.rb +8 -8
  168. data/rails_plugins/rspec/lib/spec/matchers.rb +2 -2
  169. data/rails_plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +3 -3
  170. data/rails_plugins/rspec/lib/spec/mocks/argument_expectation.rb +32 -32
  171. data/rails_plugins/rspec/lib/spec/mocks/error_generator.rb +13 -13
  172. data/rails_plugins/rspec/lib/spec/mocks/errors.rb +1 -1
  173. data/rails_plugins/rspec/lib/spec/mocks/message_expectation.rb +38 -38
  174. data/rails_plugins/rspec/lib/spec/mocks/methods.rb +3 -3
  175. data/rails_plugins/rspec/lib/spec/mocks/mock.rb +5 -5
  176. data/rails_plugins/rspec/lib/spec/mocks/order_group.rb +5 -5
  177. data/rails_plugins/rspec/lib/spec/mocks/proxy.rb +4 -4
  178. data/rails_plugins/rspec/lib/spec/mocks/space.rb +3 -3
  179. data/rails_plugins/rspec/lib/spec/mocks/spec_methods.rb +1 -1
  180. data/rails_plugins/rspec/lib/spec/mocks.rb +13 -13
  181. data/rails_plugins/rspec/lib/spec/rake/spectask.rb +4 -4
  182. data/rails_plugins/rspec/lib/spec/rake/verify_rcov.rb +9 -9
  183. data/rails_plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +2 -2
  184. data/rails_plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +7 -7
  185. data/rails_plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +13 -13
  186. data/rails_plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb +1 -1
  187. data/rails_plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +8 -8
  188. data/rails_plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb +7 -7
  189. data/rails_plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +2 -2
  190. data/rails_plugins/rspec/lib/spec/runner/formatter/snippet_extractor.rb +5 -5
  191. data/rails_plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +4 -4
  192. data/rails_plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +6 -6
  193. data/rails_plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +12 -12
  194. data/rails_plugins/rspec/lib/spec/runner/heckle_runner.rb +6 -6
  195. data/rails_plugins/rspec/lib/spec/runner/option_parser.rb +5 -5
  196. data/rails_plugins/rspec/lib/spec/runner/options.rb +8 -8
  197. data/rails_plugins/rspec/lib/spec/runner/reporter.rb +14 -14
  198. data/rails_plugins/rspec/lib/spec/runner.rb +41 -41
  199. data/rails_plugins/rspec/lib/spec/story/extensions/main.rb +6 -6
  200. data/rails_plugins/rspec/lib/spec/story/extensions/regexp.rb +1 -1
  201. data/rails_plugins/rspec/lib/spec/story/extensions/string.rb +1 -1
  202. data/rails_plugins/rspec/lib/spec/story/given_scenario.rb +1 -1
  203. data/rails_plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb +6 -6
  204. data/rails_plugins/rspec/lib/spec/story/runner/scenario_collector.rb +2 -2
  205. data/rails_plugins/rspec/lib/spec/story/runner/scenario_runner.rb +5 -5
  206. data/rails_plugins/rspec/lib/spec/story/runner/story_mediator.rb +20 -20
  207. data/rails_plugins/rspec/lib/spec/story/runner/story_parser.rb +29 -29
  208. data/rails_plugins/rspec/lib/spec/story/runner/story_runner.rb +8 -8
  209. data/rails_plugins/rspec/lib/spec/story/runner.rb +7 -7
  210. data/rails_plugins/rspec/lib/spec/story/scenario.rb +1 -1
  211. data/rails_plugins/rspec/lib/spec/story/step.rb +5 -5
  212. data/rails_plugins/rspec/lib/spec/story/step_group.rb +12 -12
  213. data/rails_plugins/rspec/lib/spec/story/step_mother.rb +6 -6
  214. data/rails_plugins/rspec/lib/spec/story/story.rb +5 -5
  215. data/rails_plugins/rspec/lib/spec/story/world.rb +16 -16
  216. data/rails_plugins/rspec/lib/spec/translator.rb +21 -21
  217. data/rails_plugins/rspec/lib/spec/version.rb +2 -2
  218. data/rails_plugins/rspec/lib/spec.rb +1 -1
  219. data/rails_plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +1 -1
  220. data/rails_plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +6 -6
  221. data/rails_plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +6 -6
  222. data/rails_plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +1 -1
  223. data/rails_plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +1 -1
  224. data/rails_plugins/rspec/report.html +3 -3
  225. data/rails_plugins/rspec/spec/autotest/discover_spec.rb +2 -2
  226. data/rails_plugins/rspec/spec/autotest/rspec_spec.rb +30 -30
  227. data/rails_plugins/rspec/spec/autotest_matchers.rb +7 -7
  228. data/rails_plugins/rspec/spec/spec/example/configuration_spec.rb +5 -5
  229. data/rails_plugins/rspec/spec/spec/example/example_group_factory_spec.rb +5 -5
  230. data/rails_plugins/rspec/spec/spec/example/example_group_methods_spec.rb +3 -3
  231. data/rails_plugins/rspec/spec/spec/example/example_group_spec.rb +2 -2
  232. data/rails_plugins/rspec/spec/spec/example/example_matcher_spec.rb +10 -10
  233. data/rails_plugins/rspec/spec/spec/example/example_runner_spec.rb +29 -29
  234. data/rails_plugins/rspec/spec/spec/example/example_spec.rb +6 -6
  235. data/rails_plugins/rspec/spec/spec/example/nested_example_group_spec.rb +2 -2
  236. data/rails_plugins/rspec/spec/spec/example/pending_module_spec.rb +3 -3
  237. data/rails_plugins/rspec/spec/spec/example/predicate_matcher_spec.rb +1 -1
  238. data/rails_plugins/rspec/spec/spec/example/shared_example_group_spec.rb +4 -4
  239. data/rails_plugins/rspec/spec/spec/expectations/extensions/object_spec.rb +12 -12
  240. data/rails_plugins/rspec/spec/spec/expectations/fail_with_spec.rb +8 -8
  241. data/rails_plugins/rspec/spec/spec/extensions/main_spec.rb +6 -6
  242. data/rails_plugins/rspec/spec/spec/interop/test/unit/spec_spec.rb +2 -2
  243. data/rails_plugins/rspec/spec/spec/interop/test/unit/test_unit_spec_helper.rb +2 -2
  244. data/rails_plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb +2 -2
  245. data/rails_plugins/rspec/spec/spec/matchers/be_spec.rb +5 -5
  246. data/rails_plugins/rspec/spec/spec/matchers/change_spec.rb +14 -14
  247. data/rails_plugins/rspec/spec/spec/matchers/description_generation_spec.rb +25 -25
  248. data/rails_plugins/rspec/spec/spec/matchers/exist_spec.rb +5 -5
  249. data/rails_plugins/rspec/spec/spec/matchers/handler_spec.rb +16 -16
  250. data/rails_plugins/rspec/spec/spec/matchers/have_spec.rb +13 -13
  251. data/rails_plugins/rspec/spec/spec/matchers/match_spec.rb +1 -1
  252. data/rails_plugins/rspec/spec/spec/matchers/matcher_methods_spec.rb +1 -1
  253. data/rails_plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +17 -17
  254. data/rails_plugins/rspec/spec/spec/matchers/raise_error_spec.rb +20 -20
  255. data/rails_plugins/rspec/spec/spec/matchers/respond_to_spec.rb +10 -10
  256. data/rails_plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +3 -3
  257. data/rails_plugins/rspec/spec/spec/matchers/throw_symbol_spec.rb +2 -2
  258. data/rails_plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb +2 -2
  259. data/rails_plugins/rspec/spec/spec/mocks/bug_report_10263.rb +3 -3
  260. data/rails_plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +4 -4
  261. data/rails_plugins/rspec/spec/spec/mocks/bug_report_15719_spec.rb +1 -1
  262. data/rails_plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb +1 -1
  263. data/rails_plugins/rspec/spec/spec/mocks/bug_report_8302_spec.rb +1 -1
  264. data/rails_plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +12 -12
  265. data/rails_plugins/rspec/spec/spec/mocks/mock_ordering_spec.rb +3 -3
  266. data/rails_plugins/rspec/spec/spec/mocks/mock_space_spec.rb +1 -1
  267. data/rails_plugins/rspec/spec/spec/mocks/mock_spec.rb +56 -56
  268. data/rails_plugins/rspec/spec/spec/mocks/multiple_return_value_spec.rb +3 -3
  269. data/rails_plugins/rspec/spec/spec/mocks/once_counts_spec.rb +1 -1
  270. data/rails_plugins/rspec/spec/spec/mocks/options_hash_spec.rb +1 -1
  271. data/rails_plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +16 -16
  272. data/rails_plugins/rspec/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +10 -10
  273. data/rails_plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +13 -13
  274. data/rails_plugins/rspec/spec/spec/mocks/stub_spec.rb +7 -7
  275. data/rails_plugins/rspec/spec/spec/mocks/twice_counts_spec.rb +6 -6
  276. data/rails_plugins/rspec/spec/spec/package/bin_spec_spec.rb +1 -1
  277. data/rails_plugins/rspec/spec/spec/runner/class_and_argument_parser_spec.rb +2 -2
  278. data/rails_plugins/rspec/spec/spec/runner/command_line_spec.rb +1 -1
  279. data/rails_plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +2 -2
  280. data/rails_plugins/rspec/spec/spec/runner/execution_context_spec.rb +2 -2
  281. data/rails_plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +2 -2
  282. data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.4.html +1 -1
  283. data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +2 -2
  284. data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.5.html +1 -1
  285. data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +1 -1
  286. data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +3 -3
  287. data/rails_plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +1 -1
  288. data/rails_plugins/rspec/spec/spec/runner/formatter/profile_formatter_spec.rb +9 -9
  289. data/rails_plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +4 -4
  290. data/rails_plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +1 -1
  291. data/rails_plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +5 -5
  292. data/rails_plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +13 -13
  293. data/rails_plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +2 -2
  294. data/rails_plugins/rspec/spec/spec/runner/heckle_runner_spec.rb +1 -1
  295. data/rails_plugins/rspec/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +3 -3
  296. data/rails_plugins/rspec/spec/spec/runner/option_parser_spec.rb +9 -9
  297. data/rails_plugins/rspec/spec/spec/runner/options_spec.rb +13 -13
  298. data/rails_plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +1 -1
  299. data/rails_plugins/rspec/spec/spec/spec_classes.rb +8 -8
  300. data/rails_plugins/rspec/spec/spec/story/builders.rb +7 -7
  301. data/rails_plugins/rspec/spec/spec/story/extensions/main_spec.rb +6 -6
  302. data/rails_plugins/rspec/spec/spec/story/given_scenario_spec.rb +3 -3
  303. data/rails_plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb +12 -12
  304. data/rails_plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb +2 -2
  305. data/rails_plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +21 -21
  306. data/rails_plugins/rspec/spec/spec/story/runner/story_mediator_spec.rb +22 -22
  307. data/rails_plugins/rspec/spec/spec/story/runner/story_parser_spec.rb +55 -55
  308. data/rails_plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +44 -44
  309. data/rails_plugins/rspec/spec/spec/story/runner_spec.rb +18 -18
  310. data/rails_plugins/rspec/spec/spec/story/scenario_spec.rb +2 -2
  311. data/rails_plugins/rspec/spec/spec/story/step_group_spec.rb +20 -20
  312. data/rails_plugins/rspec/spec/spec/story/step_mother_spec.rb +14 -14
  313. data/rails_plugins/rspec/spec/spec/story/step_spec.rb +33 -33
  314. data/rails_plugins/rspec/spec/spec/story/story_spec.rb +12 -12
  315. data/rails_plugins/rspec/spec/spec/translator_spec.rb +12 -12
  316. data/rails_plugins/rspec/spec/spec_helper.rb +5 -5
  317. data/rails_plugins/rspec/stories/resources/helpers/story_helper.rb +1 -1
  318. data/rails_plugins/rspec/stories/resources/steps/running_rspec.rb +4 -4
  319. data/rails_plugins/rspec/stories/resources/test/spec_and_test_together.rb +2 -2
  320. data/rails_plugins/rspec/stories/resources/test/test_case_with_should_methods.rb +1 -1
  321. data/rails_plugins/rspec/story_server/prototype/javascripts/builder.js +14 -14
  322. data/rails_plugins/rspec/story_server/prototype/javascripts/controls.js +61 -61
  323. data/rails_plugins/rspec/story_server/prototype/javascripts/dragdrop.js +144 -144
  324. data/rails_plugins/rspec/story_server/prototype/javascripts/effects.js +127 -127
  325. data/rails_plugins/rspec/story_server/prototype/javascripts/rspec.js +15 -15
  326. data/rails_plugins/rspec/story_server/prototype/javascripts/scriptaculous.js +7 -7
  327. data/rails_plugins/rspec/story_server/prototype/javascripts/slider.js +37 -37
  328. data/rails_plugins/rspec/story_server/prototype/javascripts/sound.js +4 -4
  329. data/rails_plugins/rspec/story_server/prototype/javascripts/unittest.js +66 -66
  330. data/rails_plugins/rspec/story_server/prototype/stories.html +9 -9
  331. data/rails_plugins/rspec_on_rails/MIT-LICENSE +11 -11
  332. data/rails_plugins/rspec_on_rails/generators/rspec/templates/rcov.opts +1 -1
  333. data/rails_plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +1 -1
  334. data/rails_plugins/rspec_on_rails/generators/rspec_controller/USAGE +1 -1
  335. data/rails_plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +2 -2
  336. data/rails_plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +1 -1
  337. data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +12 -12
  338. data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +35 -35
  339. data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +2 -2
  340. data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +2 -2
  341. data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +1 -1
  342. data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +2 -2
  343. data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/routing_spec.rb +11 -11
  344. data/rails_plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +1 -1
  345. data/rails_plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +3 -3
  346. data/rails_plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +4 -4
  347. data/rails_plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +1 -1
  348. data/rails_plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +4 -4
  349. data/rails_plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +1 -1
  350. data/rails_plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/base.rb +1 -1
  351. data/rails_plugins/rspec_on_rails/lib/spec/rails/extensions/spec/matchers/have.rb +1 -1
  352. data/rails_plugins/rspec_on_rails/lib/spec/rails/matchers/assert_select.rb +10 -10
  353. data/rails_plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +6 -6
  354. data/rails_plugins/rspec_on_rails/lib/spec/rails/matchers/render_template.rb +7 -7
  355. data/rails_plugins/rspec_on_rails/lib/spec/rails/story_adapter.rb +1 -1
  356. data/rails_plugins/rspec_on_rails/lib/spec/rails.rb +8 -8
  357. data/rails_plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb +6 -6
  358. data/rails_plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb +1 -1
  359. data/rails_plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +22 -22
  360. data/rails_plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb +1 -1
  361. data/rails_plugins/rspec_on_rails/spec/rails/example/ivar_proxy_spec.rb +3 -3
  362. data/rails_plugins/rspec_on_rails/spec/rails/example/shared_behaviour_spec.rb +2 -2
  363. data/rails_plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +8 -8
  364. data/rails_plugins/rspec_on_rails/spec/rails/extensions/action_view_base_spec.rb +7 -7
  365. data/rails_plugins/rspec_on_rails/spec/rails/extensions/active_record_spec.rb +1 -1
  366. data/rails_plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +37 -37
  367. data/rails_plugins/rspec_on_rails/spec/rails/matchers/description_generation_spec.rb +1 -1
  368. data/rails_plugins/rspec_on_rails/spec/rails/matchers/have_text_spec.rb +4 -4
  369. data/rails_plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +26 -26
  370. data/rails_plugins/rspec_on_rails/spec/rails/matchers/render_spec.rb +18 -18
  371. data/rails_plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +2 -2
  372. data/rails_plugins/rspec_on_rails/spec/spec_helper.rb +1 -1
  373. data/rails_plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +9 -9
  374. data/rails_plugins/rspec_on_rails/spec_resources/controllers/redirect_spec_controller.rb +7 -7
  375. data/rails_plugins/rspec_on_rails/spec_resources/controllers/render_spec_controller.rb +5 -5
  376. data/rails_plugins/rspec_on_rails/spec_resources/controllers/rjs_spec_controller.rb +10 -10
  377. data/rails_plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +1 -1
  378. data/rails_plugins/rspec_on_rails/stories/transactions_should_rollback.rb +1 -1
  379. data/rails_plugins/rspec_on_rails/tasks/rspec.rake +4 -4
  380. data/script/txt2html +1 -1
  381. data/setup.rb +4 -4
  382. data/tasks/hack.rake +3 -3
  383. data/website/index.html +2 -2
  384. data/website/index.txt +1 -1
  385. data/website/index_devjavu +3 -3
  386. data/website/javascripts/rounded_corners_lite.inc.js +1 -1
  387. data/website/stylesheets/screen.css +2 -2
  388. data.tar.gz.sig +0 -0
  389. metadata +2 -1
  390. metadata.gz.sig +2 -1
@@ -1,5 +1,5 @@
1
1
  locale_name: Español (España)
2
- # Spanish translation file.
2
+ # Spanish translation file.
3
3
  # Translation by Luis Villa del Campo (www.grancomo.com)
4
4
 
5
5
  # ActiveRecord::Errors.default_error_messages
@@ -47,11 +47,11 @@ date_helper_time_formats: # DON'T TRANSLATE, RE ORDER
47
47
  # added at the end of date if your date system doesn't use a 24 hours system
48
48
  date_helper_am: am
49
49
  date_helper_pm: pm
50
-
50
+
51
51
  # used by ActionView::Helpers::NumberHelper.number_to_currency
52
52
  number_helper_unit: "€"
53
53
  number_helper_separator: "," #unit separator (between integer part and fraction part)
54
- number_helper_delimiter: "." #delimiter between each group of thousands. Example: 1.234.567
54
+ number_helper_delimiter: "." #delimiter between each group of thousands. Example: 1.234.567
55
55
  number_helper_order: [number, unit] #order is at present unsupported in Rails
56
56
  #to support for instance French format, the order is different: Unit comes last (ex. "1.234,00 €")
57
57
 
@@ -91,7 +91,7 @@ date_helper_abbr_month_names:
91
91
  - Nov
92
92
  - Dic
93
93
 
94
- date_helper_day_names:
94
+ date_helper_day_names:
95
95
  - domingo
96
96
  - lunes
97
97
  - martes
@@ -100,16 +100,16 @@ date_helper_day_names:
100
100
  - viernes
101
101
  - sábado
102
102
 
103
- date_helper_abbr_day_names:
103
+ date_helper_abbr_day_names:
104
104
  - Dom
105
105
  - Lun
106
106
  - Mar
107
107
  - Mié
108
108
  - Jue
109
- - Vie
109
+ - Vie
110
110
  - Sáb
111
111
 
112
- # STILL NEEDS TRANSLATIONS
112
+ # STILL NEEDS TRANSLATIONS
113
113
  countries_list:
114
114
  - Afghanistan
115
115
  - Albanie
@@ -130,7 +130,7 @@ countries_list:
130
130
  - Bahrain
131
131
  - Bangladesh
132
132
  - Barbados
133
- - Belarus
133
+ - Belarus
134
134
  - Belgium
135
135
  - Belize
136
136
  - Benin
@@ -141,7 +141,7 @@ countries_list:
141
141
  - Botswana
142
142
  - Bouvet Island
143
143
  - Brazil
144
- - British Indian Ocean Territory
144
+ - British Indian Ocean Territory
145
145
  - Brunei Darussalam
146
146
  - Bulgaria
147
147
  - Burkina Faso
@@ -192,7 +192,7 @@ countries_list:
192
192
  - French Polynesia
193
193
  - French Southern Territories
194
194
  - Gabon
195
- - Gambia
195
+ - Gambia
196
196
  - Georgia
197
197
  - Germany
198
198
  - Ghana
@@ -212,7 +212,7 @@ countries_list:
212
212
  - Honduras
213
213
  - Hong Kong
214
214
  - Hungary
215
- - Iceland
215
+ - Iceland
216
216
  - India
217
217
  - Indonesia
218
218
  - Ireland
@@ -46,11 +46,11 @@ date_helper_time_formats: # DON'T TRANSLATE, RE ORDER
46
46
  # added at the end of date if your date system doesn't use a 24 hours system
47
47
  date_helper_am: am
48
48
  date_helper_pm: pm
49
-
49
+
50
50
  # used by ActionView::Helpers::NumberHelper.number_to_currency
51
51
  number_helper_unit: "€"
52
52
  number_helper_separator: "," #unit separator (between integer part and fraction part)
53
- number_helper_delimiter: "" #delimiter between each group of thousands. Example: 1.234.567
53
+ number_helper_delimiter: "" #delimiter between each group of thousands. Example: 1.234.567
54
54
  number_helper_order: [number, unit] #order is at present unsupported in Rails
55
55
  #to support for instance French format, the order is different: Unit comes last (ex. "1.234,00 €")
56
56
 
@@ -94,7 +94,7 @@ date_helper_abbr_month_names:
94
94
  - Nov
95
95
  - Déc
96
96
 
97
- date_helper_day_names:
97
+ date_helper_day_names:
98
98
  - Dimanche
99
99
  - Lundi
100
100
  - Mardi
@@ -103,15 +103,15 @@ date_helper_day_names:
103
103
  - Vendredi
104
104
  - Samedi
105
105
 
106
- date_helper_abbr_day_names:
106
+ date_helper_abbr_day_names:
107
107
  - Dim
108
108
  - Lun
109
109
  - Mar
110
110
  - Mer
111
111
  - Jeu
112
- - Ven
112
+ - Ven
113
113
  - Sam
114
-
114
+
115
115
  countries_list:
116
116
  - Afghanistan
117
117
  - Albanie
@@ -132,7 +132,7 @@ countries_list:
132
132
  - Bahrain
133
133
  - Bangladesh
134
134
  - Barbados
135
- - Belarus
135
+ - Belarus
136
136
  - Belgium
137
137
  - Belize
138
138
  - Benin
@@ -143,7 +143,7 @@ countries_list:
143
143
  - Botswana
144
144
  - Bouvet Island
145
145
  - Brazil
146
- - British Indian Ocean Territory
146
+ - British Indian Ocean Territory
147
147
  - Brunei Darussalam
148
148
  - Bulgaria
149
149
  - Burkina Faso
@@ -194,7 +194,7 @@ countries_list:
194
194
  - French Polynesia
195
195
  - French Southern Territories
196
196
  - Gabon
197
- - Gambia
197
+ - Gambia
198
198
  - Georgia
199
199
  - Germany
200
200
  - Ghana
@@ -214,7 +214,7 @@ countries_list:
214
214
  - Honduras
215
215
  - Hong Kong
216
216
  - Hungary
217
- - Iceland
217
+ - Iceland
218
218
  - India
219
219
  - Indonesia
220
220
  - Ireland
@@ -45,11 +45,11 @@ date_helper_time_formats: # DON'T TRANSLATE, RE ORDER
45
45
  # added at the end of date if your date system doesn't use a 24 hours system
46
46
  date_helper_am: am
47
47
  date_helper_pm: pm
48
-
48
+
49
49
  # used by ActionView::Helpers::NumberHelper.number_to_currency
50
50
  number_helper_unit: "€"
51
51
  number_helper_separator: "," #unit separator (between integer part and fraction part)
52
- number_helper_delimiter: "." #delimiter between each group of thousands. Example: 1.234.567
52
+ number_helper_delimiter: "." #delimiter between each group of thousands. Example: 1.234.567
53
53
  number_helper_order: [number, unit] #order is at present unsupported in Rails
54
54
  #to support for instance French format, the order is different: Unit comes last (ex. "1.234,00 €")
55
55
 
@@ -92,7 +92,7 @@ date_helper_abbr_month_names:
92
92
  - Nov
93
93
  - Dic
94
94
 
95
- date_helper_day_names:
95
+ date_helper_day_names:
96
96
  - Domenica
97
97
  - Lunedì
98
98
  - Martedì
@@ -101,16 +101,16 @@ date_helper_day_names:
101
101
  - Venerdì
102
102
  - Sabato
103
103
 
104
- date_helper_abbr_day_names:
104
+ date_helper_abbr_day_names:
105
105
  - Dom
106
106
  - Lun
107
107
  - Mar
108
108
  - Mer
109
109
  - Gio
110
- - Ven
110
+ - Ven
111
111
  - Sab
112
112
 
113
- # STILL NOT TRANSLATED IN ITALIAN
113
+ # STILL NOT TRANSLATED IN ITALIAN
114
114
  countries_list:
115
115
  - Afghanistan
116
116
  - Albanie
@@ -131,7 +131,7 @@ countries_list:
131
131
  - Bahrain
132
132
  - Bangladesh
133
133
  - Barbados
134
- - Belarus
134
+ - Belarus
135
135
  - Belgium
136
136
  - Belize
137
137
  - Benin
@@ -142,7 +142,7 @@ countries_list:
142
142
  - Botswana
143
143
  - Bouvet Island
144
144
  - Brazil
145
- - British Indian Ocean Territory
145
+ - British Indian Ocean Territory
146
146
  - Brunei Darussalam
147
147
  - Bulgaria
148
148
  - Burkina Faso
@@ -193,7 +193,7 @@ countries_list:
193
193
  - French Polynesia
194
194
  - French Southern Territories
195
195
  - Gabon
196
- - Gambia
196
+ - Gambia
197
197
  - Georgia
198
198
  - Germany
199
199
  - Ghana
@@ -213,7 +213,7 @@ countries_list:
213
213
  - Honduras
214
214
  - Hong Kong
215
215
  - Hungary
216
- - Iceland
216
+ - Iceland
217
217
  - India
218
218
  - Indonesia
219
219
  - Ireland
@@ -46,12 +46,12 @@ date_helper_time_formats: # DON'T TRANSLATE, RE ORDER
46
46
  # added at the end of date if your date system doesn't use a 24 hours system
47
47
  date_helper_am: am
48
48
  date_helper_pm: pm
49
-
49
+
50
50
  # used by ActionView::Helpers::NumberHelper.number_to_currency
51
51
  number_helper_unit: "R$"
52
52
  number_helper_separator: "," #unit separator (between integer part and fraction part)
53
- number_helper_delimiter: "." #delimiter between each group of thousands. Example: 1.234.567
54
- number_helper_order: [ unit, number ]
53
+ number_helper_delimiter: "." #delimiter between each group of thousands. Example: 1.234.567
54
+ number_helper_order: [ unit, number ]
55
55
  #to support for instance French format, the order is different: Unit comes last (ex. "1.234,00 €")
56
56
 
57
57
  # use by +Array#to_sentence()+
@@ -93,7 +93,7 @@ date_helper_abbr_month_names:
93
93
  - Nov
94
94
  - Dez
95
95
 
96
- date_helper_day_names:
96
+ date_helper_day_names:
97
97
  - Domingo
98
98
  - Segunda-feira
99
99
  - Terça-feira
@@ -102,13 +102,13 @@ date_helper_day_names:
102
102
  - Sexta-feira
103
103
  - Sábado
104
104
 
105
- date_helper_abbr_day_names:
105
+ date_helper_abbr_day_names:
106
106
  - Dom
107
107
  - Seg
108
108
  - Ter
109
109
  - Qua
110
110
  - Qui
111
- - Sex
111
+ - Sex
112
112
  - Sab
113
113
 
114
114
  countries_list:
@@ -46,12 +46,12 @@ date_helper_time_formats: # DON'T TRANSLATE, RE ORDER
46
46
  # added at the end of date if your date system doesn't use a 24 hours system
47
47
  date_helper_am: am
48
48
  date_helper_pm: pm
49
-
49
+
50
50
  # used by ActionView::Helpers::NumberHelper.number_to_currency
51
51
  number_helper_unit: "€"
52
52
  number_helper_separator: "," #unit separator (between integer part and fraction part)
53
- number_helper_delimiter: "." #delimiter between each group of thousands. Example: 1.234.567
54
- number_helper_order: [ unit, number ]
53
+ number_helper_delimiter: "." #delimiter between each group of thousands. Example: 1.234.567
54
+ number_helper_order: [ unit, number ]
55
55
  #to support for instance French format, the order is different: Unit comes last (ex. "1.234,00 €")
56
56
 
57
57
  # use by +Array#to_sentence()+
@@ -93,7 +93,7 @@ date_helper_abbr_month_names:
93
93
  - Nov
94
94
  - Dez
95
95
 
96
- date_helper_day_names:
96
+ date_helper_day_names:
97
97
  - Domingo
98
98
  - Segunda-feira
99
99
  - Terça-feira
@@ -102,13 +102,13 @@ date_helper_day_names:
102
102
  - Sexta-feira
103
103
  - Sábado
104
104
 
105
- date_helper_abbr_day_names:
105
+ date_helper_abbr_day_names:
106
106
  - Dom
107
107
  - Seg
108
108
  - Ter
109
109
  - Qua
110
110
  - Qui
111
- - Sex
111
+ - Sex
112
112
  - Sab
113
113
 
114
114
  countries_list:
@@ -1,7 +1,7 @@
1
- module Globalite
1
+ module Globalite
2
2
 
3
3
  module L10n
4
-
4
+
5
5
  @@default_language = :en
6
6
  attr_reader :default_language
7
7
 
@@ -50,7 +50,7 @@ module Globalite
50
50
  def country
51
51
  @@current_country || default_country
52
52
  end
53
- alias :current_country :country
53
+ alias :current_country :country
54
54
 
55
55
  def current_locale
56
56
  "#{current_language}-#{current_country}".to_sym
@@ -78,12 +78,12 @@ module Globalite
78
78
  localize_rails
79
79
  @@current_language
80
80
  end
81
- alias :current_language= :language=
81
+ alias :current_language= :language=
82
82
 
83
83
  # Set the current country code (ISO 3166 country code in uppercase letters)
84
84
  # Usage:
85
85
  # Globalite.country = 'US' or Globalite.country = :fr
86
- # Will store the current country code if supported
86
+ # Will store the current country code if supported
87
87
  # Will try to automatically find the language for your country
88
88
  # If the country isn't unknown to the system, the country will be set as :*
89
89
  #
@@ -95,16 +95,16 @@ module Globalite
95
95
  if @@locales.include?("#{current_language}-#{country}".to_sym)
96
96
  @@current_country = country
97
97
  elsif locales.each {|locale| locale =~ /[a-z][a-z]-#{country.to_s}/ }
98
- locales.each do |key|
99
- if key.to_s.include?(country.to_s)
98
+ locales.each do |key|
99
+ if key.to_s.include?(country.to_s)
100
100
  @new_language = key.to_s.split('-')[0].downcase.to_sym
101
101
  end
102
102
  end
103
103
  if @new_language && @@locales.include?("#{@new_language}-#{country}".to_sym)
104
- @@current_language = @new_language
105
- @@current_country = country
104
+ @@current_language = @new_language
105
+ @@current_country = country
106
106
  end
107
- else
107
+ else
108
108
  @@current_country = :*
109
109
  end
110
110
  #Locale.update_session_locale
@@ -128,8 +128,8 @@ module Globalite
128
128
  end
129
129
 
130
130
  # List localizations for the current locale
131
- def localizations
132
- @@locales[Locale.code] || {}
131
+ def localizations
132
+ @@locales[Locale.code] || {}
133
133
  end
134
134
 
135
135
  # Return the translation for the key, a string can be passed to replaced a missing translation
@@ -146,26 +146,26 @@ module Globalite
146
146
  # Get translations from another country but in the same language if Globalite can't find a translation for my locale
147
147
  #
148
148
  if localized == error_msg
149
- locales.each do |t_locale|
149
+ locales.each do |t_locale|
150
150
  if t_locale.to_s.include?("#{current_language.to_s}-") && t_locale != Locale.code
151
151
  localized = @@locales[t_locale][key] || error_msg
152
- end
152
+ end
153
153
  end
154
- end
154
+ end
155
155
  localized = interpolate_string(localized.dup, args.dup) if localized.class == String && localized != error_msg
156
-
156
+
157
157
  # let's handle pluralization if needed
158
158
  # the translation must include pluralize{count, singular string} to be translated
159
159
  # the translator can also pass the plural form if needed:
160
160
  # pluralize{3, goose, geese}
161
161
  localized = localized.gsub( /pluralize\{(.*)\}/){ |erb| pluralize(Regexp.last_match(1)) } if localized.is_a?(String) && (localized=~ /pluralize\{(.*)\}/)
162
-
162
+
163
163
  # Set the locale back to normal
164
164
  #
165
165
  unless locale.nil?
166
166
  Locale.code = @original_locale
167
167
  end
168
-
168
+
169
169
  return localized
170
170
  end
171
171
  alias :loc :localize
@@ -185,7 +185,7 @@ module Globalite
185
185
  def pluralize(l_string) #count, singular, plural = nil)
186
186
  # map the arguments like in the original pluralize method
187
187
  count, singular, plural = l_string.split(',').map{ |arg| arg.strip}
188
-
188
+
189
189
  "#{count} " + if count == 1 || count == '1'
190
190
  singular
191
191
  elsif plural
@@ -196,7 +196,7 @@ module Globalite
196
196
  singular + "s"
197
197
  end
198
198
  end
199
-
199
+
200
200
  def reset_l10n_data
201
201
  @@languages = []
202
202
  @@countries = []
@@ -205,7 +205,7 @@ module Globalite
205
205
  @@ui_locales = {}
206
206
  end
207
207
 
208
- # Loads ALL the UI localization in memory, I might want to refactor this later on.
208
+ # Loads ALL the UI localization in memory, I might want to refactor this later on.
209
209
  # (can be hard on the memory if you load 25 languages with 900 entries each)
210
210
  def load_localization!
211
211
  reset_l10n_data
@@ -226,7 +226,7 @@ module Globalite
226
226
  end
227
227
  @@languages << lang unless @@languages.include? lang
228
228
  else
229
- @@languages << lang unless @@languages.include? lang
229
+ @@languages << lang unless @@languages.include? lang
230
230
  @f_locale = "#{lang}-*".to_sym
231
231
  @@locales[@f_locale] = @@locales[@f_locale].merge(YAML.load_file(file).symbolize_keys) if locales.include?(@f_locale)
232
232
  @@locales[@f_locale] = YAML.load_file(file).symbolize_keys unless locales.include?(@f_locale)
@@ -235,10 +235,10 @@ module Globalite
235
235
  end
236
236
  alias :load_translations! :load_localization!
237
237
  alias :load_localizations! :load_localization!
238
-
238
+
239
239
  # Load the UI localization
240
240
  if ui_localization_files
241
- ui_localization_files.each do |file|
241
+ ui_localization_files.each do |file|
242
242
  lang = File.basename(file, '.*')[0,2].downcase.to_sym
243
243
  if File.basename(file, '.*')[3,5]
244
244
  country = File.basename(file, '.*')[3,5].upcase.to_sym
@@ -251,7 +251,7 @@ module Globalite
251
251
  if locales.include?(@file_locale)
252
252
  @@locales[@file_locale] = @@locales[@file_locale].merge(YAML.load_file(file).symbolize_keys)
253
253
  @@ui_locales[locale_name("#{lang}-#{country}")] = "#{lang}-#{country}".to_sym
254
- else
254
+ else
255
255
  @@locales[@file_locale] = YAML.load_file(file).symbolize_keys
256
256
  @@ui_locales[locale_name("#{lang}-#{country}")] = "#{lang}-#{country}".to_sym
257
257
  end
@@ -15,35 +15,35 @@ class Locale
15
15
  def self.code
16
16
  "#{Globalite.language}-#{Globalite.country}".to_sym
17
17
  end
18
-
18
+
19
19
  #
20
20
  def self.set_code(locale)
21
- if locale.to_s.split('-') && locale.to_s.length.between?(4,5) && Globalite.locales.include?(locale.to_sym)
21
+ if locale.to_s.split('-') && locale.to_s.length.between?(4,5) && Globalite.locales.include?(locale.to_sym)
22
22
  Globalite.language = locale.to_s.split('-')[0].downcase.to_sym if locale.to_s.split('-')[0]
23
23
  Globalite.country = locale.to_s.split('-')[1].upcase.to_sym if locale.to_s.split('-')[1]
24
24
  end
25
25
  end
26
-
26
+
27
27
  def self.code=(locale)
28
28
  self.set_code(locale)
29
29
  end
30
-
30
+
31
31
  # Return the available locales
32
32
  def self.codes
33
33
  Globalite.locales
34
34
  end
35
-
35
+
36
36
  # Return the locale name in its own language for instance fr-FR => Français
37
37
  def self.name(locale)
38
38
  Globalite.locale_name(locale)
39
39
  end
40
-
40
+
41
41
  # Return the list of the UI locales with their name
42
42
  def self.ui_locales
43
43
  Globalite.ui_locales
44
44
  end
45
-
46
- # Return the list of the Rails locales with their name
45
+
46
+ # Return the list of the Rails locales with their name
47
47
  def self.rails_locales
48
48
  Globalite.rails_locales
49
49
  end
@@ -52,5 +52,5 @@ class Locale
52
52
  def self.reset!
53
53
  Locale.set_code("#{Globalite.default_language}-#{Globalite.default_country}")
54
54
  end
55
-
55
+
56
56
  end
@@ -1,19 +1,19 @@
1
1
  module SymbolExtension # :nodoc:
2
- # Localizes the symbol into the current locale.
2
+ # Localizes the symbol into the current locale.
3
3
  # If there is no translation available, the replacement string will be returned
4
4
  def localize(replacement_string = '__localization_missing__', args={})
5
5
  Globalite.localize(self, replacement_string, args)
6
6
  end
7
7
  alias :l :localize
8
-
8
+
9
9
  def l_in(locale, args={})
10
10
  Globalite.localize(self, '_localization_missing_', args, locale) unless locale.nil?
11
11
  end
12
-
12
+
13
13
  # Note that this method takes the replacement string after the args hash unlike other Globalite methods
14
14
  def localize_with_args(args={}, replacement_string = '__localization_missing__')
15
15
  Globalite.localize(self, replacement_string, args)
16
16
  end
17
17
  alias :l_with_args :localize_with_args
18
-
18
+
19
19
  end
@@ -20,7 +20,7 @@ class Time
20
20
  cc = c.sub(/^%[EO]?(.)$/o, '%\\1')
21
21
  case cc
22
22
  when '%A'; o << :date_helper_day_names.l[wday]
23
- when '%a'; o << :date_helper_abbr_day_names.l[wday]
23
+ when '%a'; o << :date_helper_abbr_day_names.l[wday]
24
24
  when '%B'; o << :date_helper_month_names.l[mon]
25
25
  when '%b'; o << :date_helper_abbr_month_names.l[mon]
26
26
  #when '%c'; o << :date_helper_time_formats.l[:default] ? :date_helper_date_formats.l[:default] : strftime('%Y-%m-%d')
@@ -43,7 +43,7 @@ class Date
43
43
  cc = c.sub(/^%[EO]?(.)$/o, '%\\1')
44
44
  case cc
45
45
  when '%A'; o << :date_helper_day_names.l[wday]
46
- when '%a'; o << :date_helper_abbr_day_names.l[wday]
46
+ when '%a'; o << :date_helper_abbr_day_names.l[wday]
47
47
  when '%B'; o << :date_helper_month_names.l[mon]
48
48
  when '%b'; o << :date_helper_abbr_month_names.l[mon]
49
49
  #when '%c'; o << :date_helper_time_formats.l[:default] ? :date_helper_date_formats.l[:default] : strftime('%Y-%m-%d')
@@ -54,5 +54,5 @@ class Date
54
54
  strftime(o)
55
55
  end
56
56
  alias :l :localize
57
-
57
+
58
58
  end
@@ -1,11 +1,11 @@
1
1
  module ActionView
2
-
2
+
3
3
  # Modify DateHelper to use localization keys
4
4
  module Helpers
5
-
5
+
6
6
  #Modify DateHelper distance_of_time_in_words
7
7
  module DateHelper
8
-
8
+
9
9
  def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false)
10
10
  from_time = from_time.to_time if from_time.respond_to?(:to_time)
11
11
  to_time = to_time.to_time if to_time.respond_to?(:to_time)
@@ -19,32 +19,32 @@ module ActionView
19
19
  when 0..5 then format( :date_helper_less_than_x_seconds.l , 5 )
20
20
  when 6..10 then format( :date_helper_less_than_x_seconds.l , 10 )
21
21
  when 11..20 then format( :date_helper_less_than_x_seconds.l , 20 )
22
- when 21..40 then :date_helper_half_a_minute.l
23
- when 41..59 then :date_helper_less_than_a_minute.l
24
- else :date_helper_one_minute.l
22
+ when 21..40 then :date_helper_half_a_minute.l
23
+ when 41..59 then :date_helper_less_than_a_minute.l
24
+ else :date_helper_one_minute.l
25
25
  end
26
26
 
27
27
  when 2..44 then format(:date_helper_x_minutes.l, distance_in_minutes)
28
- when 45..89 then :date_helper_one_hour.l
28
+ when 45..89 then :date_helper_one_hour.l
29
29
  when 90..1439 then format( :date_helper_x_hours.l , (distance_in_minutes.to_f / 60.0).round )
30
- when 1440..2879 then :date_helper_one_day.l
30
+ when 1440..2879 then :date_helper_one_day.l
31
31
  when 2880..43199 then format( :date_helper_x_days.l , (distance_in_minutes / 1440).round )
32
- when 43200..86399 then :date_helper_one_month.l
32
+ when 43200..86399 then :date_helper_one_month.l
33
33
  when 86400..525959 then format( :date_helper_x_months.l , (distance_in_minutes / 43200).round )
34
- when 525960..1051919 then :date_helper_one_year.l
34
+ when 525960..1051919 then :date_helper_one_year.l
35
35
  else format( :date_helper_x_years.l , (distance_in_minutes / 525960).round )
36
36
  end
37
37
  end
38
38
  end
39
39
 
40
40
  module NumberHelper
41
-
41
+
42
42
  # modify number_to_currency to accept :order option
43
43
  def number_to_currency(number, options = {})
44
44
  # Blend default options with localized currency options
45
45
  options.reverse_merge!({:unit => :number_helper_unit.l, :separator => :number_helper_separator.l, :delimiter => :number_helper_delimiter.l, :order => :number_helper_order.l})
46
46
  options = options.stringify_keys
47
-
47
+
48
48
  precision, unit, separator, delimiter = options.delete("precision") { 2 }, options.delete("unit") { "$" }, options.delete("separator") { "." }, options.delete("delimiter") { "," }
49
49
  separator = "" unless precision > 0
50
50
 
@@ -69,7 +69,7 @@ module ActionView
69
69
  end# module NumberHelper
70
70
 
71
71
  module DateHelper
72
-
72
+
73
73
  # Blend default options with localized :order option and add locale support
74
74
  # Example:
75
75
  # <% form_for(@page) do |f| %>
@@ -82,7 +82,7 @@ module ActionView
82
82
  if options[:locale]
83
83
  @original_locale = Locale.code
84
84
  Locale.code = options[:locale]
85
- end
85
+ end
86
86
  options.reverse_merge!( :order => :date_helper_order.l )
87
87
  @selector = InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_date_select_tag(options)
88
88
  Locale.code = @original_locale if options[:locale]
@@ -135,12 +135,12 @@ module ActionView
135
135
  Locale.code = @original_locale if options[:locale]
136
136
  return @selector
137
137
  end
138
-
138
+
139
139
  end #module DateHelper
140
140
 
141
141
 
142
142
  module FormOptionsHelper
143
-
143
+
144
144
  def country_options_for_select(selected = nil, priority_countries = nil)
145
145
  country_options = ""
146
146
 
@@ -157,7 +157,7 @@ module ActionView
157
157
 
158
158
  return country_options
159
159
  end
160
-
160
+
161
161
  end #module FormOptionsHelper
162
162
 
163
163
  module ActiveRecordHelper