radiant 0.9.0.rc2 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of radiant might be problematic. Click here for more details.
- data/CHANGELOG +18 -6
- data/CONTRIBUTORS +7 -1
- data/INSTALL +0 -5
- data/README +21 -0
- data/app/controllers/admin/layouts_controller.rb +1 -0
- data/app/controllers/admin/preferences_controller.rb +4 -3
- data/app/controllers/admin/resource_controller.rb +62 -8
- data/app/controllers/admin/snippets_controller.rb +1 -0
- data/app/controllers/admin/users_controller.rb +1 -0
- data/app/controllers/application_controller.rb +0 -17
- data/app/controllers/site_controller.rb +6 -4
- data/app/helpers/application_helper.rb +19 -0
- data/app/models/standard_tags.rb +212 -18
- data/app/models/status.rb +1 -1
- data/app/models/user.rb +2 -2
- data/app/views/admin/extensions/index.html.haml +1 -1
- data/app/views/admin/layouts/_form.html.haml +4 -4
- data/app/views/admin/layouts/index.html.haml +2 -2
- data/app/views/admin/page_parts/_page_part.html.haml +2 -2
- data/app/views/admin/pages/_fields.html.haml +5 -5
- data/app/views/admin/preferences/edit.html.haml +3 -3
- data/app/views/admin/snippets/_form.html.haml +5 -5
- data/app/views/admin/snippets/index.html.haml +3 -3
- data/app/views/admin/users/_form.html.haml +3 -4
- data/app/views/admin/users/index.html.haml +2 -1
- data/app/views/layouts/application.html.haml +1 -1
- data/config/environment.rb +2 -2
- data/config/environments/cucumber.rb +3 -3
- data/config/locales/en.yml +10 -10
- data/config/locales/en_available_tags.yml +80 -1
- data/db/migrate/20081203140407_add_indexes.rb +10 -10
- data/db/schema.rb +1 -1
- data/features/admin/resource_pagination.feature +27 -0
- data/features/admin/user_preferences.feature +17 -0
- data/features/step_definitions/admin/pagination_steps.rb +46 -0
- data/features/step_definitions/web_steps.rb +13 -3
- data/features/support/env.rb +7 -3
- data/features/support/paths.rb +1 -1
- data/lib/generators/instance/templates/instance_environment.rb +2 -2
- data/lib/generators/language_extension/templates/lang.yml +6 -6
- data/lib/plugins/active_record_extensions/lib/active_record_extensions.rb +0 -29
- data/lib/radiant.rb +3 -3
- data/lib/radiant/admin_ui.rb +1 -1
- data/lib/radiant/extension/script.rb +20 -5
- data/lib/radiant/extension_loader.rb +1 -1
- data/lib/radiant/initializer.rb +9 -3
- data/lib/radiant/pagination/controller.rb +34 -0
- data/lib/radiant/pagination/link_renderer.rb +7 -4
- data/lib/task_support.rb +6 -1
- data/lib/tasks/cucumber.rake +1 -1
- data/lib/tasks/framework.rake +1 -2
- data/lib/tasks/release.rake +11 -3
- data/lib/tasks/rspec.rake +1 -1
- data/public/images/admin/shadow.png +0 -0
- data/public/images/admin/shadow_grey.png +0 -0
- data/public/javascripts/admin/application.js +4 -1
- data/public/javascripts/admin/cookie.js +2 -2
- data/public/javascripts/admin/validationerror.js +18 -0
- data/public/stylesheets/admin/main.css +110 -37
- data/public/stylesheets/sass/admin/main.sass +3 -2
- data/public/stylesheets/sass/admin/modules/_grid.sass +56 -0
- data/public/stylesheets/sass/admin/partials/_actions.sass +74 -34
- data/public/stylesheets/sass/admin/partials/{_depreciated.sass → _deprecated.sass} +1 -1
- data/public/stylesheets/sass/admin/partials/_popup.sass +1 -1
- data/public/stylesheets/sass/admin/partials/_validations.sass +21 -0
- data/spec/controllers/admin/paginated_controller_spec.rb +26 -0
- data/spec/controllers/admin/preferences_controller_spec.rb +14 -0
- data/spec/controllers/application_controller_spec.rb +1 -11
- data/spec/controllers/site_controller_spec.rb +9 -0
- data/spec/datasets/users_dataset.rb +1 -1
- data/spec/generators/instance_generator_spec.rb +1 -1
- data/spec/helpers/application_helper_spec.rb +38 -0
- data/spec/lib/radiant/extension/script_spec.rb +5 -1
- data/spec/lib/radiant/initializer_spec.rb +7 -0
- data/spec/lib/radiant_spec.rb +1 -1
- data/spec/lib/task_support_spec.rb +14 -0
- data/spec/matchers/render_matcher.rb +14 -1
- data/spec/models/layout_spec.rb +3 -3
- data/spec/models/page_part_spec.rb +3 -3
- data/spec/models/page_spec.rb +8 -9
- data/spec/models/snippet_spec.rb +3 -3
- data/spec/models/standard_tags_spec.rb +99 -5
- data/spec/models/user_spec.rb +11 -11
- data/vendor/extensions/archive/app/models/archive_finder.rb +5 -0
- data/vendor/extensions/french_language_pack/config/locales/fr.yml +31 -25
- data/vendor/extensions/german_language_pack/README +2 -1
- data/vendor/extensions/german_language_pack/config/locales/de.yml +47 -45
- data/vendor/extensions/german_language_pack/config/locales/de_available_tags.yml +375 -304
- data/vendor/extensions/german_language_pack/german_language_pack_extension.rb +2 -2
- data/vendor/extensions/markdown_filter/README +1 -1
- data/vendor/extensions/markdown_filter/lib/markdown_filter.rb +4 -4
- data/vendor/extensions/markdown_filter/lib/markdown_tags.rb +0 -15
- data/vendor/extensions/markdown_filter/markdown_filter_extension.rb +1 -10
- data/vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/CONTRIBUTERS +4 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/ChangeLog +1332 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/README +10 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/Rakefile +97 -38
- data/vendor/extensions/markdown_filter/vendor/kramdown/VERSION +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/generate_data.rb +6 -4
- data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-jruby-1.4.0.dat +7 -7
- data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-ruby-1.8.6.dat +7 -7
- data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-ruby-1.8.7.dat +7 -7
- data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-ruby-1.9.1p243.dat +7 -7
- data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/historic-ruby-1.9.2dev.dat +7 -7
- data/vendor/extensions/markdown_filter/vendor/kramdown/benchmark/testing.sh +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/bin/kramdown +11 -4
- data/vendor/extensions/markdown_filter/vendor/kramdown/data/kramdown/document.html +9 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/data/kramdown/document.latex +43 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/default.less.css +510 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/default.template +26 -33
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/documentation.page +72 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/index.page +21 -49
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/installation.page +6 -6
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/links.markdown +6 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/news.page +3 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/quickref.page +140 -127
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/syntax.page +501 -431
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/tests.page +3 -3
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown.rb +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/compatibility.rb +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter.rb +8 -3
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter/base.rb +40 -4
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter/html.rb +99 -27
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter/latex.rb +57 -18
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/document.rb +32 -13
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/error.rb +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/options.rb +34 -14
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser.rb +9 -3
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/base.rb +95 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/html.rb +387 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown.rb +74 -65
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/abbreviation.rb +65 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/attribute_list.rb +3 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/autolink.rb +8 -3
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/blank_line.rb +2 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/blockquote.rb +2 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/codeblock.rb +3 -3
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/codespan.rb +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/emphasis.rb +4 -3
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/eob.rb +2 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/escaped_chars.rb +2 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/extension.rb +47 -55
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/footnote.rb +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/header.rb +3 -18
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/horizontal_rule.rb +2 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/html.rb +69 -149
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/html_entity.rb +4 -4
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/line_break.rb +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/link.rb +2 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/list.rb +12 -9
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/math.rb +53 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/paragraph.rb +2 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/smart_quotes.rb +5 -4
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/table.rb +4 -3
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/typographic_symbol.rb +7 -3
- data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/version.rb +2 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/man/man1/kramdown.1 +222 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/run_tests.rb +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/test_files.rb +68 -7
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/with_auto_id_prefix.html +3 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/with_auto_id_prefix.options +2 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/with_auto_id_prefix.text +3 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/item_ial.html +9 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/item_ial.text +5 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/mixed.html +9 -3
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/special_cases.html +49 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/special_cases.text +29 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/comment.html +5 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/comment.text +3 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/content_model/tables.html +2 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/code.html +10 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/code.text +9 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/comment.html +7 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/comment.text +8 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/emphasis.html +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/emphasis.text +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/entity.html +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/entity.text +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/header.html +6 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/header.options +2 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/header.text +6 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_dl.html +8 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_dl.text +8 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_ol.html +15 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_ol.text +17 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_ul.html +19 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/list_ul.text +22 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/options +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/paragraph.html +3 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/paragraph.text +4 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_normal.html +13 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_normal.text +12 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_simple.html +10 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_simple.text +14 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/typography.html +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/typography.text +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_raw.html +3 -5
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_raw.text +0 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/auto_id_and_ial.html +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/auto_id_and_ial.text +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/simple.html +5 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/simple.text +7 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/comment.text +5 -5
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/ignored.html +0 -2
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/ignored.text +3 -6
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/nomarkdown.text +4 -4
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options.html +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options.text +5 -6
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options2.text +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options3.text +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/15_math/normal.html +19 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/15_math/normal.text +18 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/errors.html +1 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/nesting.html +4 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/02_emphasis/nesting.text +3 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/definitions.latex +18 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/footnote_nr.latex +6 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/markers.latex +32 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/invalid.html +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/invalid.text +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/abbreviations/abbrev.html +8 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/abbreviations/abbrev.text +15 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/abbreviations/abbrev_defs.html +2 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/abbreviations/abbrev_defs.text +5 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/autolinks/url_links.html +3 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/autolinks/url_links.text +3 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/comment.html +6 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/comment.text +6 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/ignored.html +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/ignored.text +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/nomarkdown.html +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/nomarkdown.text +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/options.html +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/options.text +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/ial/simple.html +2 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/ial/simple.text +1 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/math/normal.html +5 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/math/normal.text +5 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/typography.html +3 -0
- data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/typography.text +3 -0
- data/vendor/extensions/smarty_pants_filter/README +1 -0
- data/vendor/extensions/smarty_pants_filter/Rakefile +136 -0
- data/vendor/extensions/{markdown_filter → smarty_pants_filter}/lib/smarty_pants_filter.rb +0 -0
- data/vendor/extensions/smarty_pants_filter/lib/smarty_pants_tags.rb +18 -0
- data/vendor/extensions/smarty_pants_filter/lib/tasks/smarty_pants_filter_extension_tasks.rake +28 -0
- data/vendor/extensions/smarty_pants_filter/smarty_pants_filter_extension.rb +18 -0
- data/vendor/extensions/{markdown_filter → smarty_pants_filter}/smartypants.html +0 -0
- data/vendor/extensions/{markdown_filter → smarty_pants_filter}/spec/models/smarty_pants_filter_spec.rb +0 -0
- data/vendor/extensions/smarty_pants_filter/spec/spec.opts +6 -0
- data/vendor/extensions/smarty_pants_filter/spec/spec_helper.rb +36 -0
- data/vendor/extensions/smarty_pants_filter/test/test_helper.rb +19 -0
- data/vendor/extensions/{markdown_filter → smarty_pants_filter}/test/unit/smarty_pants_filter_test.rb +0 -0
- data/vendor/extensions/{markdown_filter → smarty_pants_filter}/vendor/rubypants/README +0 -0
- data/vendor/extensions/{markdown_filter → smarty_pants_filter}/vendor/rubypants/Rakefile +0 -0
- data/vendor/extensions/{markdown_filter → smarty_pants_filter}/vendor/rubypants/install.rb +0 -0
- data/vendor/extensions/{markdown_filter → smarty_pants_filter}/vendor/rubypants/rubypants.rb +0 -0
- data/vendor/extensions/{markdown_filter → smarty_pants_filter}/vendor/rubypants/test_rubypants.rb +0 -0
- data/vendor/plugins/haml/Rakefile +84 -52
- data/vendor/plugins/haml/VERSION +1 -1
- data/vendor/plugins/haml/doc-src/HAML_CHANGELOG.md +77 -0
- data/vendor/plugins/haml/doc-src/SASS_CHANGELOG.md +60 -0
- data/vendor/plugins/haml/extra/haml-mode.el +15 -12
- data/vendor/plugins/haml/extra/sass-mode.el +2 -2
- data/vendor/plugins/haml/haml.gemspec +16 -7
- data/vendor/plugins/haml/init.rb +3 -1
- data/vendor/plugins/haml/lib/haml.rb +1 -0
- data/vendor/plugins/haml/lib/haml/filters.rb +14 -2
- data/vendor/plugins/haml/lib/haml/helpers.rb +34 -14
- data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rb +6 -4
- data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +74 -34
- data/vendor/plugins/haml/lib/haml/helpers/xss_mods.rb +37 -8
- data/vendor/plugins/haml/lib/haml/html.rb +1 -1
- data/vendor/plugins/haml/lib/haml/precompiler.rb +3 -2
- data/vendor/plugins/haml/lib/haml/railtie.rb +18 -0
- data/vendor/plugins/haml/lib/haml/template.rb +15 -4
- data/vendor/plugins/haml/lib/haml/template/plugin.rb +37 -2
- data/vendor/plugins/haml/lib/haml/util.rb +56 -2
- data/vendor/plugins/haml/lib/haml/version.rb +29 -14
- data/vendor/plugins/haml/lib/sass/files.rb +10 -2
- data/vendor/plugins/haml/lib/sass/plugin.rb +7 -2
- data/vendor/plugins/haml/lib/sass/plugin/rack.rb +2 -2
- data/vendor/plugins/haml/lib/sass/plugin/rails.rb +2 -1
- data/vendor/plugins/haml/lib/sass/script/number.rb +2 -2
- data/vendor/plugins/haml/lib/sass/tree/if_node.rb +1 -0
- data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +9 -1
- data/vendor/plugins/haml/test/haml/engine_test.rb +24 -2
- data/vendor/plugins/haml/test/haml/helper_test.rb +60 -9
- data/vendor/plugins/haml/test/haml/template_test.rb +80 -3
- data/vendor/plugins/haml/test/haml/templates/helpers.haml +26 -0
- data/vendor/plugins/haml/test/haml/templates/partial_layout.haml +6 -2
- data/vendor/plugins/haml/test/sass/engine_test.rb +6 -1
- data/vendor/plugins/haml/test/test_helper.rb +16 -1
- data/vendor/radius/LICENSE +19 -0
- data/vendor/radius/QUICKSTART.rdoc +7 -7
- data/vendor/radius/README.rdoc +9 -25
- data/vendor/radius/Rakefile +4 -27
- data/vendor/radius/VERSION +1 -0
- data/vendor/radius/lib/radius/parser.rb +4 -4
- data/vendor/radius/lib/radius/parser/scan.rb +371 -940
- data/vendor/radius/lib/radius/parser/scan.rl +2 -1
- data/vendor/radius/lib/radius/version.rb +5 -11
- data/vendor/radius/radius.gemspec +55 -22
- data/vendor/radius/tasks/jeweler.rake +21 -0
- data/vendor/radius/tasks/rdoc.rake +13 -0
- data/vendor/radius/tasks/test.rake +7 -0
- data/vendor/radius/test/parser_test.rb +5 -0
- data/vendor/radius/test/test_helper.rb +1 -0
- data/vendor/rails/actionmailer/CHANGELOG +18 -0
- data/vendor/rails/actionmailer/MIT-LICENSE +1 -1
- data/vendor/rails/actionmailer/Rakefile +1 -1
- data/vendor/rails/actionmailer/lib/action_mailer.rb +1 -1
- data/vendor/rails/actionmailer/lib/action_mailer/base.rb +2 -2
- data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +1 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail.rb +1 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/Makefile +18 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/address.rb +4 -38
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb +65 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/base64.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/compat.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/config.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/core_extensions.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/encode.rb +9 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/header.rb +4 -2
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/index.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/interface.rb +33 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/loader.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/mail.rb +1 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/mailbox.rb +3 -2
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/main.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/mbox.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/net.rb +3 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/obsolete.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.rb +1060 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.y +416 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/port.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/quoting.rb +47 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/require_arch.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/scanner.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/scanner_r.rb +2 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/stringio.rb +0 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/utils.rb +50 -25
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/COPYING +504 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/README +12 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet.rb +67 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb +927 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb +42 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb +238 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb +112 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb +75 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb +64 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb +42 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb +89 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb +244 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb +88 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb +596 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb +42 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb +430 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb +42 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb +474 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb +42 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb +289 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb +570 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb +229 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb +229 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb +330 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb +227 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb +202 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb +226 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb +201 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb +147 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb +89 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb +45 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb +542 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb +124 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb +56 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb +88 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb +168 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb +87 -0
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/{tmail-1.2.3 → tmail-1.2.7}/tmail/version.rb +1 -1
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail.rb +2 -2
- data/vendor/rails/actionmailer/lib/action_mailer/version.rb +1 -1
- data/vendor/rails/actionmailer/test/abstract_unit.rb +4 -4
- data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +1 -1
- data/vendor/rails/actionmailer/test/mail_service_test.rb +66 -2
- data/vendor/rails/actionmailer/test/quoting_test.rb +10 -4
- data/vendor/rails/actionpack/CHANGELOG +55 -0
- data/vendor/rails/actionpack/MIT-LICENSE +1 -1
- data/vendor/rails/actionpack/README +7 -7
- data/vendor/rails/actionpack/Rakefile +2 -2
- data/vendor/rails/actionpack/lib/action_controller.rb +2 -2
- data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +18 -9
- data/vendor/rails/actionpack/lib/action_controller/base.rb +14 -14
- data/vendor/rails/actionpack/lib/action_controller/caching/fragments.rb +6 -6
- data/vendor/rails/actionpack/lib/action_controller/cookies.rb +96 -0
- data/vendor/rails/actionpack/lib/action_controller/failsafe.rb +1 -0
- data/vendor/rails/actionpack/lib/action_controller/flash.rb +42 -0
- data/vendor/rails/actionpack/lib/action_controller/integration.rb +5 -1
- data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/rack_lint_patch.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/rescue.rb +2 -2
- data/vendor/rails/actionpack/lib/action_controller/response.rb +4 -7
- data/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb +1 -0
- data/vendor/rails/actionpack/lib/action_controller/session/abstract_store.rb +6 -0
- data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +6 -0
- data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb +2 -2
- data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +4 -1
- data/vendor/rails/actionpack/lib/action_pack.rb +1 -1
- data/vendor/rails/actionpack/lib/action_pack/version.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view.rb +3 -3
- data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +11 -11
- data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +2 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +2 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +12 -11
- data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +2 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +49 -12
- data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +3 -4
- data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +7 -4
- data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +2 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/raw_output_helper.rb +2 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +2 -10
- data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +6 -5
- data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +5 -5
- data/vendor/rails/actionpack/lib/action_view/helpers/translation_helper.rb +37 -9
- data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +9 -11
- data/vendor/rails/actionpack/lib/action_view/partials.rb +2 -1
- data/vendor/rails/actionpack/lib/action_view/paths.rb +8 -0
- data/vendor/rails/actionpack/lib/action_view/renderable.rb +16 -2
- data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +7 -4
- data/vendor/rails/actionpack/lib/action_view/test_case.rb +1 -1
- data/vendor/rails/actionpack/test/abstract_unit.rb +8 -8
- data/vendor/rails/actionpack/test/active_record_unit.rb +1 -1
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +3 -1
- data/vendor/rails/actionpack/test/controller/assert_select_test.rb +6 -5
- data/vendor/rails/actionpack/test/controller/caching_test.rb +16 -2
- data/vendor/rails/actionpack/test/controller/capture_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/cookie_test.rb +37 -1
- data/vendor/rails/actionpack/test/controller/flash_test.rb +28 -1
- data/vendor/rails/actionpack/test/controller/helper_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/integration_test.rb +0 -1
- data/vendor/rails/actionpack/test/controller/localized_templates_test.rb +24 -0
- data/vendor/rails/actionpack/test/controller/output_escaping_test.rb +19 -0
- data/vendor/rails/actionpack/test/controller/rack_test.rb +1 -4
- data/vendor/rails/actionpack/test/controller/render_test.rb +11 -2
- data/vendor/rails/actionpack/test/controller/rescue_test.rb +8 -2
- data/vendor/rails/actionpack/test/controller/routing_test.rb +1 -0
- data/vendor/rails/actionpack/test/controller/send_file_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +2 -2
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +10 -6
- data/vendor/rails/actionpack/test/fixtures/localized/hello_world.de.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/localized/hello_world.en.html +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_customer_counter_with_as.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_utf8_partial.html.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/_utf8_partial_magic.html.erb +2 -0
- data/vendor/rails/actionpack/test/fixtures/test/array_translation.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/capturing.erb +2 -2
- data/vendor/rails/actionpack/test/fixtures/test/scoped_array_translation.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/translation.erb +1 -0
- data/vendor/rails/actionpack/test/fixtures/test/utf8.html.erb +4 -2
- data/vendor/rails/actionpack/test/fixtures/test/utf8_magic.html.erb +5 -0
- data/vendor/rails/actionpack/test/fixtures/test/utf8_magic_with_bare_partial.html.erb +5 -0
- data/vendor/rails/actionpack/test/template/active_record_helper_i18n_test.rb +9 -2
- data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +0 -1
- data/vendor/rails/actionpack/test/template/date_helper_test.rb +118 -0
- data/vendor/rails/actionpack/test/template/erb_util_test.rb +12 -0
- data/vendor/rails/actionpack/test/template/form_helper_test.rb +57 -3
- data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +21 -9
- data/vendor/rails/actionpack/test/template/render_test.rb +47 -8
- data/vendor/rails/actionpack/test/template/text_helper_test.rb +26 -1
- data/vendor/rails/actionpack/test/template/translation_helper_test.rb +72 -9
- data/vendor/rails/actionpack/test/template/url_helper_test.rb +20 -1
- data/vendor/rails/actionpack/test/view/test_case_test.rb +2 -2
- data/vendor/rails/activerecord/CHANGELOG +43 -0
- data/vendor/rails/activerecord/Rakefile +1 -1
- data/vendor/rails/activerecord/examples/performance.sql +85 -0
- data/vendor/rails/activerecord/lib/active_record.rb +1 -2
- data/vendor/rails/activerecord/lib/active_record/association_preload.rb +9 -2
- data/vendor/rails/activerecord/lib/active_record/associations.rb +48 -38
- data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +15 -11
- data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +16 -6
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +11 -1
- data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +34 -10
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +5 -0
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +5 -5
- data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +10 -1
- data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +5 -1
- data/vendor/rails/activerecord/lib/active_record/autosave_association.rb +66 -35
- data/vendor/rails/activerecord/lib/active_record/base.rb +77 -36
- data/vendor/rails/activerecord/lib/active_record/batches.rb +13 -9
- data/vendor/rails/activerecord/lib/active_record/calculations.rb +6 -3
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +3 -3
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb +57 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +3 -7
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +64 -10
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +2 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +31 -1
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +31 -66
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +5 -5
- data/vendor/rails/activerecord/lib/active_record/dirty.rb +2 -2
- data/vendor/rails/activerecord/lib/active_record/fixtures.rb +1 -0
- data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +34 -1
- data/vendor/rails/activerecord/lib/active_record/migration.rb +5 -0
- data/vendor/rails/activerecord/lib/active_record/nested_attributes.rb +64 -52
- data/vendor/rails/activerecord/lib/active_record/reflection.rb +66 -1
- data/vendor/rails/activerecord/lib/active_record/schema.rb +5 -1
- data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +3 -0
- data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record/validations.rb +13 -1
- data/vendor/rails/activerecord/lib/active_record/version.rb +1 -1
- data/vendor/rails/activerecord/test/cases/active_schema_test_mysql.rb +22 -0
- data/vendor/rails/activerecord/test/cases/associations/belongs_to_associations_test.rb +13 -0
- data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_include_test.rb +8 -7
- data/vendor/rails/activerecord/test/cases/associations/eager_test.rb +7 -1
- data/vendor/rails/activerecord/test/cases/associations/has_many_associations_test.rb +26 -0
- data/vendor/rails/activerecord/test/cases/associations/inverse_associations_test.rb +566 -0
- data/vendor/rails/activerecord/test/cases/associations_test.rb +10 -0
- data/vendor/rails/activerecord/test/cases/autosave_association_test.rb +86 -10
- data/vendor/rails/activerecord/test/cases/base_test.rb +29 -0
- data/vendor/rails/activerecord/test/cases/batches_test.rb +20 -0
- data/vendor/rails/activerecord/test/cases/calculations_test.rb +2 -3
- data/vendor/rails/activerecord/test/cases/encoding_test.rb +6 -0
- data/vendor/rails/activerecord/test/cases/finder_test.rb +19 -3
- data/vendor/rails/activerecord/test/cases/fixtures_test.rb +5 -0
- data/vendor/rails/activerecord/test/cases/json_serialization_test.rb +14 -0
- data/vendor/rails/activerecord/test/cases/locking_test.rb +48 -3
- data/vendor/rails/activerecord/test/cases/migration_test.rb +115 -0
- data/vendor/rails/activerecord/test/cases/modules_test.rb +28 -0
- data/vendor/rails/activerecord/test/cases/named_scope_test.rb +1 -1
- data/vendor/rails/activerecord/test/cases/nested_attributes_test.rb +239 -7
- data/vendor/rails/activerecord/test/cases/query_cache_test.rb +7 -1
- data/vendor/rails/activerecord/test/cases/reflection_test.rb +47 -7
- data/vendor/rails/activerecord/test/cases/schema_test_postgresql.rb +2 -2
- data/vendor/rails/activerecord/test/cases/validations_i18n_test.rb +6 -36
- data/vendor/rails/activerecord/test/cases/validations_test.rb +33 -1
- data/vendor/rails/activerecord/test/cases/yaml_serialization_test.rb +11 -0
- data/vendor/rails/activerecord/test/fixtures/faces.yml +11 -0
- data/vendor/rails/{pkg/rails-3.0.pre.gem → activerecord/test/fixtures/fixture_database.sqlite} +0 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite3 +0 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite +0 -0
- data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite3 +0 -0
- data/vendor/rails/activerecord/test/fixtures/interests.yml +33 -0
- data/vendor/rails/activerecord/test/fixtures/men.yml +5 -0
- data/vendor/rails/activerecord/test/fixtures/zines.yml +5 -0
- data/vendor/rails/activerecord/test/models/author.rb +3 -0
- data/vendor/rails/activerecord/test/models/bird.rb +6 -0
- data/vendor/rails/activerecord/test/models/company_in_module.rb +17 -0
- data/vendor/rails/activerecord/test/models/event_author.rb +5 -0
- data/vendor/rails/activerecord/test/models/face.rb +7 -0
- data/vendor/rails/activerecord/test/models/interest.rb +5 -0
- data/vendor/rails/activerecord/test/models/invoice.rb +4 -0
- data/vendor/rails/activerecord/test/models/line_item.rb +3 -0
- data/vendor/rails/activerecord/test/models/man.rb +9 -0
- data/vendor/rails/activerecord/test/models/parrot.rb +6 -0
- data/vendor/rails/activerecord/test/models/pirate.rb +10 -0
- data/vendor/rails/activerecord/test/models/ship.rb +10 -1
- data/vendor/rails/activerecord/test/models/ship_part.rb +3 -1
- data/vendor/rails/activerecord/test/models/zine.rb +3 -0
- data/vendor/rails/activerecord/test/schema/schema.rb +41 -0
- data/vendor/rails/activeresource/CHANGELOG +15 -0
- data/vendor/rails/activeresource/Rakefile +1 -1
- data/vendor/rails/activeresource/lib/active_resource/base.rb +11 -2
- data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +2 -2
- data/vendor/rails/activeresource/lib/active_resource/validations.rb +3 -3
- data/vendor/rails/activeresource/lib/active_resource/version.rb +1 -1
- data/vendor/rails/activeresource/test/abstract_unit.rb +2 -2
- data/vendor/rails/activeresource/test/base_errors_test.rb +13 -0
- data/vendor/rails/activeresource/test/base_test.rb +49 -0
- data/vendor/rails/activeresource/test/debug.log +80350 -0
- data/vendor/rails/activesupport/CHANGELOG +37 -0
- data/vendor/rails/activesupport/lib/active_support.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/cache/memory_store.rb +7 -1
- data/vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +11 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +35 -28
- data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +14 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +14 -3
- data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +6 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/file/atomic.rb +2 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +33 -26
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/synchronization.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/conversions.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +1 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/blank.rb +20 -2
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb +6 -5
- data/vendor/rails/activesupport/lib/active_support/core_ext/object/singleton_class.rb +13 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +0 -1
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/output_safety.rb +108 -44
- data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +2 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +8 -4
- data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +12 -3
- data/vendor/rails/activesupport/lib/active_support/deprecation.rb +3 -2
- data/vendor/rails/activesupport/lib/active_support/inflections.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/inflector.rb +5 -2
- data/vendor/rails/activesupport/lib/active_support/json/backends/yajl.rb +40 -0
- data/vendor/rails/activesupport/lib/active_support/json/backends/yaml.rb +10 -7
- data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +16 -1
- data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +11 -2
- data/vendor/rails/activesupport/lib/active_support/memoizable.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/multibyte/unicode_database.rb +2 -2
- data/vendor/rails/activesupport/lib/active_support/multibyte/utils.rb +6 -7
- data/vendor/rails/activesupport/lib/active_support/ordered_hash.rb +28 -11
- data/vendor/rails/activesupport/lib/active_support/testing/assertions.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +84 -76
- data/vendor/rails/activesupport/lib/active_support/vendor.rb +10 -2
- data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.1.3/lib → i18n-0.3.7}/i18n.rb +175 -39
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend.rb +19 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record.rb +66 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record/missing.rb +67 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record/store_procs.rb +38 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record/translation.rb +88 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/base.rb +266 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/cache.rb +76 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/cascade.rb +58 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/chain.rb +75 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/cldr.rb +100 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/fallbacks.rb +69 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/fast.rb +69 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/gettext.rb +75 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/helpers.rb +68 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/interpolation_compiler.rb +119 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/links.rb +34 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/metadata.rb +73 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/pluralization.rb +57 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/simple.rb +22 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/except.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/slice.rb +8 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/object/meta_class.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/string/interpolate.rb +99 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.1.3/lib → i18n-0.3.7}/i18n/exceptions.rb +15 -7
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb +25 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/gettext/po_parser.rb +329 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/helpers.rb +5 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/helpers/gettext.rb +65 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale.rb +6 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/fallbacks.rb +98 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag.rb +28 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag/parents.rb +24 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag/rfc4646.rb +76 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag/simple.rb +41 -0
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/version.rb +3 -0
- data/vendor/rails/activesupport/lib/active_support/version.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +1 -1
- data/vendor/rails/activesupport/lib/active_support/xml_mini/libxml.rb +23 -83
- data/vendor/rails/activesupport/lib/active_support/xml_mini/libxmlsax.rb +74 -0
- data/vendor/rails/activesupport/lib/active_support/xml_mini/nokogiri.rb +25 -22
- data/vendor/rails/activesupport/lib/active_support/xml_mini/nokogirisax.rb +73 -0
- data/vendor/rails/railties/CHANGELOG +18 -2
- data/vendor/rails/railties/MIT-LICENSE +1 -1
- data/vendor/rails/railties/Rakefile +5 -5
- data/vendor/rails/railties/bin/rails +6 -5
- data/vendor/rails/railties/builtin/rails_info/rails/info.rb +1 -1
- data/vendor/rails/railties/configs/initializers/cookie_verification_secret.rb +7 -0
- data/vendor/rails/railties/guides/source/getting_started.textile +2 -2
- data/vendor/rails/railties/lib/commands/dbconsole.rb +1 -1
- data/vendor/rails/railties/lib/commands/runner.rb +1 -1
- data/vendor/rails/railties/lib/dispatcher.rb +1 -1
- data/vendor/rails/railties/lib/rails/gem_dependency.rb +11 -4
- data/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb +1 -1
- data/vendor/rails/railties/lib/rails/version.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator.rb +5 -2
- data/vendor/rails/railties/lib/rails_generator/generated_attribute.rb +7 -6
- data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +3 -0
- data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +9 -5
- data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +2 -2
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +2 -4
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +1 -1
- data/vendor/rails/railties/lib/tasks/databases.rake +14 -14
- data/vendor/rails/railties/lib/tasks/framework.rake +4 -1
- data/vendor/rails/railties/lib/tasks/rails.rb +6 -1
- metadata +276 -321
- data/config/initializers/pagination.rb +0 -1
- data/vendor/extensions/markdown_filter/vendor/kramdown/doc/default.css +0 -293
- data/vendor/plugins/haml/FAQ +0 -138
- data/vendor/plugins/haml/README.rdoc +0 -319
- data/vendor/plugins/haml/REVISION +0 -1
- data/vendor/plugins/haml/lib/sass/constant.rb +0 -216
- data/vendor/plugins/haml/lib/sass/constant/color.rb +0 -101
- data/vendor/plugins/haml/lib/sass/constant/literal.rb +0 -54
- data/vendor/plugins/haml/lib/sass/constant/nil.rb +0 -9
- data/vendor/plugins/haml/lib/sass/constant/number.rb +0 -87
- data/vendor/plugins/haml/lib/sass/constant/operation.rb +0 -30
- data/vendor/plugins/haml/lib/sass/constant/string.rb +0 -22
- data/vendor/plugins/haml/lib/sass/tree/attr_node.rb +0 -57
- data/vendor/plugins/haml/lib/sass/tree/value_node.rb +0 -20
- data/vendor/plugins/haml/test/sass/results/constants.css +0 -16
- data/vendor/plugins/haml/test/sass/templates/constants.sass +0 -100
- data/vendor/radius/Manifest.txt +0 -21
- data/vendor/rails/Rakefile +0 -81
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb +0 -46
- data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/parser.rb +0 -1478
- data/vendor/rails/actionmailer/pkg/actionmailer-3.0.pre.gem +0 -0
- data/vendor/rails/actionpack/lib/action_view/erb/util.rb +0 -44
- data/vendor/rails/actionpack/lib/action_view/safe_buffer.rb +0 -28
- data/vendor/rails/actionpack/pkg/actionpack-3.0.pre.gem +0 -0
- data/vendor/rails/actionpack/test/view/safe_buffer_test.rb +0 -36
- data/vendor/rails/activemodel/CHANGES +0 -12
- data/vendor/rails/activemodel/README +0 -21
- data/vendor/rails/activemodel/Rakefile +0 -24
- data/vendor/rails/activemodel/lib/active_model.rb +0 -5
- data/vendor/rails/activemodel/lib/active_model/base.rb +0 -8
- data/vendor/rails/activemodel/lib/active_model/callbacks.rb +0 -7
- data/vendor/rails/activemodel/lib/active_model/core.rb +0 -7
- data/vendor/rails/activemodel/lib/active_model/deprecated_error_methods.rb +0 -38
- data/vendor/rails/activemodel/lib/active_model/errors.rb +0 -82
- data/vendor/rails/activemodel/lib/active_model/observing.rb +0 -98
- data/vendor/rails/activemodel/lib/active_model/state_machine.rb +0 -68
- data/vendor/rails/activemodel/lib/active_model/state_machine/event.rb +0 -64
- data/vendor/rails/activemodel/lib/active_model/state_machine/machine.rb +0 -78
- data/vendor/rails/activemodel/lib/active_model/state_machine/state.rb +0 -47
- data/vendor/rails/activemodel/lib/active_model/state_machine/state_transition.rb +0 -40
- data/vendor/rails/activemodel/lib/active_model/validations.rb +0 -126
- data/vendor/rails/activemodel/lib/active_model/validations/acceptance.rb +0 -45
- data/vendor/rails/activemodel/lib/active_model/validations/associated.rb +0 -46
- data/vendor/rails/activemodel/lib/active_model/validations/confirmation.rb +0 -44
- data/vendor/rails/activemodel/lib/active_model/validations/exclusion.rb +0 -37
- data/vendor/rails/activemodel/lib/active_model/validations/format.rb +0 -39
- data/vendor/rails/activemodel/lib/active_model/validations/inclusion.rb +0 -37
- data/vendor/rails/activemodel/lib/active_model/validations/length.rb +0 -95
- data/vendor/rails/activemodel/lib/active_model/validations/numericality.rb +0 -80
- data/vendor/rails/activemodel/lib/active_model/validations/presence.rb +0 -42
- data/vendor/rails/activemodel/lib/active_model/validations/uniqueness.rb +0 -104
- data/vendor/rails/activemodel/pkg/activemodel-3.0.pre.gem +0 -0
- data/vendor/rails/activemodel/test/observing_test.rb +0 -121
- data/vendor/rails/activemodel/test/state_machine/event_test.rb +0 -49
- data/vendor/rails/activemodel/test/state_machine/machine_test.rb +0 -43
- data/vendor/rails/activemodel/test/state_machine/state_test.rb +0 -72
- data/vendor/rails/activemodel/test/state_machine/state_transition_test.rb +0 -84
- data/vendor/rails/activemodel/test/state_machine_test.rb +0 -312
- data/vendor/rails/activemodel/test/test_helper.rb +0 -21
- data/vendor/rails/activerecord/MIT-LICENSE +0 -20
- data/vendor/rails/activerecord/lib/active_record/i18n_interpolation_deprecation.rb +0 -26
- data/vendor/rails/activerecord/pkg/activerecord-3.0.pre.gem +0 -0
- data/vendor/rails/activeresource/MIT-LICENSE +0 -20
- data/vendor/rails/activeresource/pkg/activeresource-3.0.pre.gem +0 -0
- data/vendor/rails/activesupport/MIT-LICENSE +0 -20
- data/vendor/rails/activesupport/Rakefile +0 -175
- data/vendor/rails/activesupport/bin/generate_tables +0 -147
- data/vendor/rails/activesupport/install.rb +0 -30
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/MIT-LICENSE +0 -20
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/README.textile +0 -20
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/Rakefile +0 -5
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/i18n.gemspec +0 -27
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb +0 -214
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/all.rb +0 -5
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_exceptions_test.rb +0 -99
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/i18n_test.rb +0 -124
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/locale/en.rb +0 -1
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/locale/en.yml +0 -3
- data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb +0 -567
- data/vendor/rails/activesupport/pkg/activesupport-3.0.pre.gem +0 -0
- data/vendor/rails/activesupport/test/abstract_unit.rb +0 -36
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/b.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/d.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/e/f.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/application.rb +0 -1
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder.rb +0 -3
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +0 -3
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +0 -7
- data/vendor/rails/activesupport/test/autoloading_fixtures/conflict.rb +0 -1
- data/vendor/rails/activesupport/test/autoloading_fixtures/counting_loader.rb +0 -5
- data/vendor/rails/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/e.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +0 -4
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +0 -1
- data/vendor/rails/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +0 -2
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_name_error.rb +0 -3
- data/vendor/rails/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +0 -3
- data/vendor/rails/activesupport/test/buffered_logger_test.rb +0 -146
- data/vendor/rails/activesupport/test/caching_test.rb +0 -348
- data/vendor/rails/activesupport/test/callbacks_test.rb +0 -188
- data/vendor/rails/activesupport/test/clean_backtrace_test.rb +0 -47
- data/vendor/rails/activesupport/test/clean_logger_test.rb +0 -57
- data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +0 -363
- data/vendor/rails/activesupport/test/core_ext/base64_ext_test.rb +0 -8
- data/vendor/rails/activesupport/test/core_ext/bigdecimal.rb +0 -10
- data/vendor/rails/activesupport/test/core_ext/blank_test.rb +0 -24
- data/vendor/rails/activesupport/test/core_ext/cgi_ext_test.rb +0 -14
- data/vendor/rails/activesupport/test/core_ext/class/attribute_accessor_test.rb +0 -31
- data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +0 -224
- data/vendor/rails/activesupport/test/core_ext/class/delegating_attributes_test.rb +0 -115
- data/vendor/rails/activesupport/test/core_ext/class_test.rb +0 -46
- data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +0 -278
- data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +0 -359
- data/vendor/rails/activesupport/test/core_ext/duplicable_test.rb +0 -22
- data/vendor/rails/activesupport/test/core_ext/duration_test.rb +0 -121
- data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +0 -97
- data/vendor/rails/activesupport/test/core_ext/exception_test.rb +0 -68
- data/vendor/rails/activesupport/test/core_ext/file_test.rb +0 -67
- data/vendor/rails/activesupport/test/core_ext/float_ext_test.rb +0 -25
- data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +0 -1014
- data/vendor/rails/activesupport/test/core_ext/integer_ext_test.rb +0 -37
- data/vendor/rails/activesupport/test/core_ext/kernel_test.rb +0 -43
- data/vendor/rails/activesupport/test/core_ext/load_error_test.rb +0 -16
- data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +0 -30
- data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +0 -52
- data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +0 -33
- data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +0 -58
- data/vendor/rails/activesupport/test/core_ext/module/model_naming_test.rb +0 -27
- data/vendor/rails/activesupport/test/core_ext/module/synchronization_test.rb +0 -85
- data/vendor/rails/activesupport/test/core_ext/module_test.rb +0 -363
- data/vendor/rails/activesupport/test/core_ext/name_error_test.rb +0 -20
- data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +0 -162
- data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +0 -282
- data/vendor/rails/activesupport/test/core_ext/object_ext_test.rb +0 -8
- data/vendor/rails/activesupport/test/core_ext/pathname_test.rb +0 -9
- data/vendor/rails/activesupport/test/core_ext/proc_test.rb +0 -11
- data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +0 -63
- data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +0 -369
- data/vendor/rails/activesupport/test/core_ext/symbol_test.rb +0 -9
- data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +0 -744
- data/vendor/rails/activesupport/test/core_ext/time_with_zone_test.rb +0 -845
- data/vendor/rails/activesupport/test/core_ext/uri_ext_test.rb +0 -12
- data/vendor/rails/activesupport/test/dependencies/check_warnings.rb +0 -2
- data/vendor/rails/activesupport/test/dependencies/conflict.rb +0 -1
- data/vendor/rails/activesupport/test/dependencies/cross_site_depender.rb +0 -3
- data/vendor/rails/activesupport/test/dependencies/mutual_one.rb +0 -4
- data/vendor/rails/activesupport/test/dependencies/mutual_two.rb +0 -4
- data/vendor/rails/activesupport/test/dependencies/raises_exception.rb +0 -3
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent0.rb +0 -1
- data/vendor/rails/activesupport/test/dependencies/requires_nonexistent1.rb +0 -1
- data/vendor/rails/activesupport/test/dependencies/service_one.rb +0 -5
- data/vendor/rails/activesupport/test/dependencies/service_two.rb +0 -2
- data/vendor/rails/activesupport/test/dependencies_test.rb +0 -782
- data/vendor/rails/activesupport/test/deprecation_test.rb +0 -167
- data/vendor/rails/activesupport/test/flush_cache_on_private_memoization_test.rb +0 -43
- data/vendor/rails/activesupport/test/gzip_test.rb +0 -7
- data/vendor/rails/activesupport/test/i18n_test.rb +0 -98
- data/vendor/rails/activesupport/test/inflector_test.rb +0 -298
- data/vendor/rails/activesupport/test/inflector_test_cases.rb +0 -252
- data/vendor/rails/activesupport/test/json/decoding_test.rb +0 -73
- data/vendor/rails/activesupport/test/json/encoding_test.rb +0 -160
- data/vendor/rails/activesupport/test/memoizable_test.rb +0 -247
- data/vendor/rails/activesupport/test/message_encryptor_test.rb +0 -46
- data/vendor/rails/activesupport/test/message_verifier_test.rb +0 -31
- data/vendor/rails/activesupport/test/multibyte_chars_test.rb +0 -606
- data/vendor/rails/activesupport/test/multibyte_conformance.rb +0 -129
- data/vendor/rails/activesupport/test/multibyte_test_helpers.rb +0 -19
- data/vendor/rails/activesupport/test/multibyte_unicode_database_test.rb +0 -22
- data/vendor/rails/activesupport/test/multibyte_utils_test.rb +0 -137
- data/vendor/rails/activesupport/test/option_merger_test.rb +0 -85
- data/vendor/rails/activesupport/test/ordered_hash_test.rb +0 -201
- data/vendor/rails/activesupport/test/ordered_options_test.rb +0 -53
- data/vendor/rails/activesupport/test/rescuable_test.rb +0 -75
- data/vendor/rails/activesupport/test/secure_random_test.rb +0 -19
- data/vendor/rails/activesupport/test/string_inquirer_test.rb +0 -15
- data/vendor/rails/activesupport/test/test_test.rb +0 -148
- data/vendor/rails/activesupport/test/time_zone_test.rb +0 -266
- data/vendor/rails/activesupport/test/whiny_nil_test.rb +0 -50
- data/vendor/rails/activesupport/test/xml_mini/jdom_engine_test.rb +0 -153
- data/vendor/rails/activesupport/test/xml_mini/nokogiri_engine_test.rb +0 -168
- data/vendor/rails/activesupport/test/xml_mini/rexml_engine_test.rb +0 -15
- data/vendor/rails/ci/ci_build.rb +0 -119
- data/vendor/rails/ci/ci_setup_notes.txt +0 -131
- data/vendor/rails/ci/cruise_config.rb +0 -9
- data/vendor/rails/ci/geminstaller.yml +0 -24
- data/vendor/rails/ci/site.css +0 -13
- data/vendor/rails/ci/site_config.rb +0 -72
- data/vendor/rails/doc/template/horo.rb +0 -613
- data/vendor/rails/pushgems.rb +0 -14
- data/vendor/rails/railties/pkg/railties-3.0.pre.gem +0 -0
- data/vendor/rails/railties/test/abstract_unit.rb +0 -27
- data/vendor/rails/railties/test/backtrace_cleaner_test.rb +0 -61
- data/vendor/rails/railties/test/boot_test.rb +0 -178
- data/vendor/rails/railties/test/console_app_test.rb +0 -42
- data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +0 -266
- data/vendor/rails/railties/test/fixtures/about_yml_plugins/bad_about_yml/about.yml +0 -1
- data/vendor/rails/railties/test/fixtures/about_yml_plugins/bad_about_yml/init.rb +0 -1
- data/vendor/rails/railties/test/fixtures/about_yml_plugins/plugin_without_about_yml/init.rb +0 -1
- data/vendor/rails/railties/test/fixtures/eager/zoo.rb +0 -3
- data/vendor/rails/railties/test/fixtures/eager/zoo/reptile_house.rb +0 -2
- data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +0 -1
- data/vendor/rails/railties/test/fixtures/lib/generators/missing_class/missing_class_generator.rb +0 -0
- data/vendor/rails/railties/test/fixtures/lib/generators/working/working_generator.rb +0 -2
- data/vendor/rails/railties/test/fixtures/metal/multiplemetals/app/metal/metal_a.rb +0 -5
- data/vendor/rails/railties/test/fixtures/metal/multiplemetals/app/metal/metal_b.rb +0 -5
- data/vendor/rails/railties/test/fixtures/metal/pluralmetal/app/metal/legacy_routes.rb +0 -5
- data/vendor/rails/railties/test/fixtures/metal/singlemetal/app/metal/foo_metal.rb +0 -5
- data/vendor/rails/railties/test/fixtures/metal/subfolders/app/metal/Folder/metal_a.rb +0 -7
- data/vendor/rails/railties/test/fixtures/metal/subfolders/app/metal/Folder/metal_b.rb +0 -7
- data/vendor/rails/railties/test/fixtures/plugins/alternate/a/generators/a_generator/a_generator.rb +0 -4
- data/vendor/rails/railties/test/fixtures/plugins/default/gemlike/init.rb +0 -1
- data/vendor/rails/railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb +0 -2
- data/vendor/rails/railties/test/fixtures/plugins/default/gemlike/rails/init.rb +0 -7
- data/vendor/rails/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/about.yml +0 -2
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/generators/stubby_generator/stubby_generator.rb +0 -4
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/init.rb +0 -7
- data/vendor/rails/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +0 -2
- data/vendor/rails/railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb +0 -2
- data/vendor/rails/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb +0 -10
- data/vendor/rails/railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb +0 -2
- data/vendor/rails/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml +0 -2
- data/vendor/rails/railties/test/fixtures/plugins/engines/engine/config/routes.rb +0 -3
- data/vendor/rails/railties/test/fixtures/plugins/engines/engine/init.rb +0 -3
- data/vendor/rails/railties/test/fixtures/public/foo/bar.html +0 -1
- data/vendor/rails/railties/test/fixtures/public/foo/index.html +0 -1
- data/vendor/rails/railties/test/fixtures/public/index.html +0 -1
- data/vendor/rails/railties/test/gem_dependency_test.rb +0 -219
- data/vendor/rails/railties/test/generator_lookup_test.rb +0 -40
- data/vendor/rails/railties/test/generators/generator_test_helper.rb +0 -310
- data/vendor/rails/railties/test/generators/rails_controller_generator_test.rb +0 -44
- data/vendor/rails/railties/test/generators/rails_helper_generator_test.rb +0 -36
- data/vendor/rails/railties/test/generators/rails_mailer_generator_test.rb +0 -29
- data/vendor/rails/railties/test/generators/rails_model_generator_test.rb +0 -96
- data/vendor/rails/railties/test/generators/rails_resource_generator_test.rb +0 -29
- data/vendor/rails/railties/test/generators/rails_scaffold_generator_test.rb +0 -151
- data/vendor/rails/railties/test/generators/rails_template_runner_test.rb +0 -216
- data/vendor/rails/railties/test/initializer_test.rb +0 -416
- data/vendor/rails/railties/test/metal_test.rb +0 -72
- data/vendor/rails/railties/test/mocks/routes.rb +0 -6
- data/vendor/rails/railties/test/plugin_loader_test.rb +0 -172
- data/vendor/rails/railties/test/plugin_locator_test.rb +0 -62
- data/vendor/rails/railties/test/plugin_test.rb +0 -162
- data/vendor/rails/railties/test/plugin_test_helper.rb +0 -29
- data/vendor/rails/railties/test/rack_static_test.rb +0 -46
- data/vendor/rails/railties/test/rails_generator_test.rb +0 -145
- data/vendor/rails/railties/test/rails_info_controller_test.rb +0 -52
- data/vendor/rails/railties/test/rails_info_test.rb +0 -99
- data/vendor/rails/railties/test/secret_key_generation_test.rb +0 -38
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-a-0.4.0/lib/dummy-gem-a.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-b-0.4.0/lib/dummy-gem-b.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-b-0.6.0/lib/dummy-gem-b.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-c-0.4.0/lib/dummy-gem-c.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-c-0.6.0/lib/dummy-gem-c.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-d-1.0.0/lib/dummy-gem-d.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-e-1.0.0/lib/dummy-gem-e.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-f-1.0.0/lib/dummy-gem-f.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-g-1.0.0/lib/dummy-gem-g.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-i-1.0.0/ext/dummy-gem-i/Makefile +0 -0
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-i-1.0.0/lib/dummy-gem-i.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-j-1.0.0/lib/dummy-gem-j.rb +0 -1
- data/vendor/rails/railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb +0 -1
- data/vendor/rails/release.rb +0 -25
@@ -1,9 +0,0 @@
|
|
1
|
-
require 'abstract_unit'
|
2
|
-
|
3
|
-
class SymbolTests < Test::Unit::TestCase
|
4
|
-
def test_to_proc
|
5
|
-
assert_equal %w(one two three), [:one, :two, :three].map(&:to_s)
|
6
|
-
assert_equal(%w(one two three),
|
7
|
-
{1 => "one", 2 => "two", 3 => "three"}.sort_by(&:first).map(&:last))
|
8
|
-
end
|
9
|
-
end
|
@@ -1,744 +0,0 @@
|
|
1
|
-
require 'abstract_unit'
|
2
|
-
|
3
|
-
class TimeExtCalculationsTest < Test::Unit::TestCase
|
4
|
-
def test_seconds_since_midnight
|
5
|
-
assert_equal 1,Time.local(2005,1,1,0,0,1).seconds_since_midnight
|
6
|
-
assert_equal 60,Time.local(2005,1,1,0,1,0).seconds_since_midnight
|
7
|
-
assert_equal 3660,Time.local(2005,1,1,1,1,0).seconds_since_midnight
|
8
|
-
assert_equal 86399,Time.local(2005,1,1,23,59,59).seconds_since_midnight
|
9
|
-
assert_equal 60.00001,Time.local(2005,1,1,0,1,0,10).seconds_since_midnight
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_seconds_since_midnight_at_daylight_savings_time_start
|
13
|
-
with_env_tz 'US/Eastern' do
|
14
|
-
# dt: US: 2005 April 3rd 2:00am ST => April 3rd 3:00am DT
|
15
|
-
assert_equal 2*3600-1, Time.local(2005,4,3,1,59,59).seconds_since_midnight, 'just before DST start'
|
16
|
-
assert_equal 2*3600+1, Time.local(2005,4,3,3, 0, 1).seconds_since_midnight, 'just after DST start'
|
17
|
-
end
|
18
|
-
|
19
|
-
with_env_tz 'NZ' do
|
20
|
-
# dt: New Zealand: 2006 October 1st 2:00am ST => October 1st 3:00am DT
|
21
|
-
assert_equal 2*3600-1, Time.local(2006,10,1,1,59,59).seconds_since_midnight, 'just before DST start'
|
22
|
-
assert_equal 2*3600+1, Time.local(2006,10,1,3, 0, 1).seconds_since_midnight, 'just after DST start'
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_seconds_since_midnight_at_daylight_savings_time_end
|
27
|
-
with_env_tz 'US/Eastern' do
|
28
|
-
# st: US: 2005 October 30th 2:00am DT => October 30th 1:00am ST
|
29
|
-
# avoid setting a time between 1:00 and 2:00 since that requires specifying whether DST is active
|
30
|
-
assert_equal 1*3600-1, Time.local(2005,10,30,0,59,59).seconds_since_midnight, 'just before DST end'
|
31
|
-
assert_equal 3*3600+1, Time.local(2005,10,30,2, 0, 1).seconds_since_midnight, 'just after DST end'
|
32
|
-
|
33
|
-
# now set a time between 1:00 and 2:00 by specifying whether DST is active
|
34
|
-
# uses: Time.local( sec, min, hour, day, month, year, wday, yday, isdst, tz )
|
35
|
-
assert_equal 1*3600+30*60, Time.local(0,30,1,30,10,2005,0,0,true,ENV['TZ']).seconds_since_midnight, 'before DST end'
|
36
|
-
assert_equal 2*3600+30*60, Time.local(0,30,1,30,10,2005,0,0,false,ENV['TZ']).seconds_since_midnight, 'after DST end'
|
37
|
-
end
|
38
|
-
|
39
|
-
with_env_tz 'NZ' do
|
40
|
-
# st: New Zealand: 2006 March 19th 3:00am DT => March 19th 2:00am ST
|
41
|
-
# avoid setting a time between 2:00 and 3:00 since that requires specifying whether DST is active
|
42
|
-
assert_equal 2*3600-1, Time.local(2006,3,19,1,59,59).seconds_since_midnight, 'just before DST end'
|
43
|
-
assert_equal 4*3600+1, Time.local(2006,3,19,3, 0, 1).seconds_since_midnight, 'just after DST end'
|
44
|
-
|
45
|
-
# now set a time between 2:00 and 3:00 by specifying whether DST is active
|
46
|
-
# uses: Time.local( sec, min, hour, day, month, year, wday, yday, isdst, tz )
|
47
|
-
assert_equal 2*3600+30*60, Time.local(0,30,2,19,3,2006,0,0,true, ENV['TZ']).seconds_since_midnight, 'before DST end'
|
48
|
-
assert_equal 3*3600+30*60, Time.local(0,30,2,19,3,2006,0,0,false,ENV['TZ']).seconds_since_midnight, 'after DST end'
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_beginning_of_week
|
53
|
-
assert_equal Time.local(2005,1,31), Time.local(2005,2,4,10,10,10).beginning_of_week
|
54
|
-
assert_equal Time.local(2005,11,28), Time.local(2005,11,28,0,0,0).beginning_of_week #monday
|
55
|
-
assert_equal Time.local(2005,11,28), Time.local(2005,11,29,0,0,0).beginning_of_week #tuesday
|
56
|
-
assert_equal Time.local(2005,11,28), Time.local(2005,11,30,0,0,0).beginning_of_week #wednesday
|
57
|
-
assert_equal Time.local(2005,11,28), Time.local(2005,12,01,0,0,0).beginning_of_week #thursday
|
58
|
-
assert_equal Time.local(2005,11,28), Time.local(2005,12,02,0,0,0).beginning_of_week #friday
|
59
|
-
assert_equal Time.local(2005,11,28), Time.local(2005,12,03,0,0,0).beginning_of_week #saturday
|
60
|
-
assert_equal Time.local(2005,11,28), Time.local(2005,12,04,0,0,0).beginning_of_week #sunday
|
61
|
-
end
|
62
|
-
|
63
|
-
def test_beginning_of_day
|
64
|
-
assert_equal Time.local(2005,2,4,0,0,0), Time.local(2005,2,4,10,10,10).beginning_of_day
|
65
|
-
with_env_tz 'US/Eastern' do
|
66
|
-
assert_equal Time.local(2006,4,2,0,0,0), Time.local(2006,4,2,10,10,10).beginning_of_day, 'start DST'
|
67
|
-
assert_equal Time.local(2006,10,29,0,0,0), Time.local(2006,10,29,10,10,10).beginning_of_day, 'ends DST'
|
68
|
-
end
|
69
|
-
with_env_tz 'NZ' do
|
70
|
-
assert_equal Time.local(2006,3,19,0,0,0), Time.local(2006,3,19,10,10,10).beginning_of_day, 'ends DST'
|
71
|
-
assert_equal Time.local(2006,10,1,0,0,0), Time.local(2006,10,1,10,10,10).beginning_of_day, 'start DST'
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
def test_beginning_of_month
|
76
|
-
assert_equal Time.local(2005,2,1,0,0,0), Time.local(2005,2,22,10,10,10).beginning_of_month
|
77
|
-
end
|
78
|
-
|
79
|
-
def test_beginning_of_quarter
|
80
|
-
assert_equal Time.local(2005,1,1,0,0,0), Time.local(2005,2,15,10,10,10).beginning_of_quarter
|
81
|
-
assert_equal Time.local(2005,1,1,0,0,0), Time.local(2005,1,1,0,0,0).beginning_of_quarter
|
82
|
-
assert_equal Time.local(2005,10,1,0,0,0), Time.local(2005,12,31,10,10,10).beginning_of_quarter
|
83
|
-
assert_equal Time.local(2005,4,1,0,0,0), Time.local(2005,6,30,23,59,59).beginning_of_quarter
|
84
|
-
end
|
85
|
-
|
86
|
-
def test_end_of_day
|
87
|
-
assert_equal Time.local(2007,8,12,23,59,59,999999.999), Time.local(2007,8,12,10,10,10).end_of_day
|
88
|
-
with_env_tz 'US/Eastern' do
|
89
|
-
assert_equal Time.local(2007,4,2,23,59,59,999999.999), Time.local(2007,4,2,10,10,10).end_of_day, 'start DST'
|
90
|
-
assert_equal Time.local(2007,10,29,23,59,59,999999.999), Time.local(2007,10,29,10,10,10).end_of_day, 'ends DST'
|
91
|
-
end
|
92
|
-
with_env_tz 'NZ' do
|
93
|
-
assert_equal Time.local(2006,3,19,23,59,59,999999.999), Time.local(2006,3,19,10,10,10).end_of_day, 'ends DST'
|
94
|
-
assert_equal Time.local(2006,10,1,23,59,59,999999.999), Time.local(2006,10,1,10,10,10).end_of_day, 'start DST'
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
def test_end_of_week
|
99
|
-
assert_equal Time.local(2008,1,6,23,59,59,999999.999), Time.local(2007,12,31,10,10,10).end_of_week
|
100
|
-
assert_equal Time.local(2007,9,2,23,59,59,999999.999), Time.local(2007,8,27,0,0,0).end_of_week #monday
|
101
|
-
assert_equal Time.local(2007,9,2,23,59,59,999999.999), Time.local(2007,8,28,0,0,0).end_of_week #tuesday
|
102
|
-
assert_equal Time.local(2007,9,2,23,59,59,999999.999), Time.local(2007,8,29,0,0,0).end_of_week #wednesday
|
103
|
-
assert_equal Time.local(2007,9,2,23,59,59,999999.999), Time.local(2007,8,30,0,0,0).end_of_week #thursday
|
104
|
-
assert_equal Time.local(2007,9,2,23,59,59,999999.999), Time.local(2007,8,31,0,0,0).end_of_week #friday
|
105
|
-
assert_equal Time.local(2007,9,2,23,59,59,999999.999), Time.local(2007,9,01,0,0,0).end_of_week #saturday
|
106
|
-
assert_equal Time.local(2007,9,2,23,59,59,999999.999), Time.local(2007,9,02,0,0,0).end_of_week #sunday
|
107
|
-
end
|
108
|
-
|
109
|
-
def test_end_of_month
|
110
|
-
assert_equal Time.local(2005,3,31,23,59,59,999999.999), Time.local(2005,3,20,10,10,10).end_of_month
|
111
|
-
assert_equal Time.local(2005,2,28,23,59,59,999999.999), Time.local(2005,2,20,10,10,10).end_of_month
|
112
|
-
assert_equal Time.local(2005,4,30,23,59,59,999999.999), Time.local(2005,4,20,10,10,10).end_of_month
|
113
|
-
end
|
114
|
-
|
115
|
-
def test_end_of_quarter
|
116
|
-
assert_equal Time.local(2007,3,31,23,59,59,999999.999), Time.local(2007,2,15,10,10,10).end_of_quarter
|
117
|
-
assert_equal Time.local(2007,3,31,23,59,59,999999.999), Time.local(2007,3,31,0,0,0).end_of_quarter
|
118
|
-
assert_equal Time.local(2007,12,31,23,59,59,999999.999), Time.local(2007,12,21,10,10,10).end_of_quarter
|
119
|
-
assert_equal Time.local(2007,6,30,23,59,59,999999.999), Time.local(2007,4,1,0,0,0).end_of_quarter
|
120
|
-
assert_equal Time.local(2008,6,30,23,59,59,999999.999), Time.local(2008,5,31,0,0,0).end_of_quarter
|
121
|
-
end
|
122
|
-
|
123
|
-
def test_end_of_year
|
124
|
-
assert_equal Time.local(2007,12,31,23,59,59,999999.999), Time.local(2007,2,22,10,10,10).end_of_year
|
125
|
-
assert_equal Time.local(2007,12,31,23,59,59,999999.999), Time.local(2007,12,31,10,10,10).end_of_year
|
126
|
-
end
|
127
|
-
|
128
|
-
def test_beginning_of_year
|
129
|
-
assert_equal Time.local(2005,1,1,0,0,0), Time.local(2005,2,22,10,10,10).beginning_of_year
|
130
|
-
end
|
131
|
-
|
132
|
-
def test_months_ago
|
133
|
-
assert_equal Time.local(2005,5,5,10), Time.local(2005,6,5,10,0,0).months_ago(1)
|
134
|
-
assert_equal Time.local(2004,11,5,10), Time.local(2005,6,5,10,0,0).months_ago(7)
|
135
|
-
assert_equal Time.local(2004,12,5,10), Time.local(2005,6,5,10,0,0).months_ago(6)
|
136
|
-
assert_equal Time.local(2004,6,5,10), Time.local(2005,6,5,10,0,0).months_ago(12)
|
137
|
-
assert_equal Time.local(2003,6,5,10), Time.local(2005,6,5,10,0,0).months_ago(24)
|
138
|
-
end
|
139
|
-
|
140
|
-
def test_months_since
|
141
|
-
assert_equal Time.local(2005,7,5,10), Time.local(2005,6,5,10,0,0).months_since(1)
|
142
|
-
assert_equal Time.local(2006,1,5,10), Time.local(2005,12,5,10,0,0).months_since(1)
|
143
|
-
assert_equal Time.local(2005,12,5,10), Time.local(2005,6,5,10,0,0).months_since(6)
|
144
|
-
assert_equal Time.local(2006,6,5,10), Time.local(2005,12,5,10,0,0).months_since(6)
|
145
|
-
assert_equal Time.local(2006,1,5,10), Time.local(2005,6,5,10,0,0).months_since(7)
|
146
|
-
assert_equal Time.local(2006,6,5,10), Time.local(2005,6,5,10,0,0).months_since(12)
|
147
|
-
assert_equal Time.local(2007,6,5,10), Time.local(2005,6,5,10,0,0).months_since(24)
|
148
|
-
assert_equal Time.local(2005,4,30,10), Time.local(2005,3,31,10,0,0).months_since(1)
|
149
|
-
assert_equal Time.local(2005,2,28,10), Time.local(2005,1,29,10,0,0).months_since(1)
|
150
|
-
assert_equal Time.local(2005,2,28,10), Time.local(2005,1,30,10,0,0).months_since(1)
|
151
|
-
assert_equal Time.local(2005,2,28,10), Time.local(2005,1,31,10,0,0).months_since(1)
|
152
|
-
end
|
153
|
-
|
154
|
-
def test_years_ago
|
155
|
-
assert_equal Time.local(2004,6,5,10), Time.local(2005,6,5,10,0,0).years_ago(1)
|
156
|
-
assert_equal Time.local(1998,6,5,10), Time.local(2005,6,5,10,0,0).years_ago(7)
|
157
|
-
assert_equal Time.local(2003,2,28,10), Time.local(2004,2,29,10,0,0).years_ago(1) # 1 year ago from leap day
|
158
|
-
end
|
159
|
-
|
160
|
-
def test_years_since
|
161
|
-
assert_equal Time.local(2006,6,5,10), Time.local(2005,6,5,10,0,0).years_since(1)
|
162
|
-
assert_equal Time.local(2012,6,5,10), Time.local(2005,6,5,10,0,0).years_since(7)
|
163
|
-
assert_equal Time.local(2005,2,28,10), Time.local(2004,2,29,10,0,0).years_since(1) # 1 year since leap day
|
164
|
-
# Failure because of size limitations of numeric?
|
165
|
-
# assert_equal Time.local(2182,6,5,10), Time.local(2005,6,5,10,0,0).years_since(177)
|
166
|
-
end
|
167
|
-
|
168
|
-
def test_last_year
|
169
|
-
assert_equal Time.local(2004,6,5,10), Time.local(2005,6,5,10,0,0).last_year
|
170
|
-
end
|
171
|
-
|
172
|
-
def test_next_year
|
173
|
-
assert_equal Time.local(2006,6,5,10), Time.local(2005,6,5,10,0,0).next_year
|
174
|
-
end
|
175
|
-
|
176
|
-
def test_ago
|
177
|
-
assert_equal Time.local(2005,2,22,10,10,9), Time.local(2005,2,22,10,10,10).ago(1)
|
178
|
-
assert_equal Time.local(2005,2,22,9,10,10), Time.local(2005,2,22,10,10,10).ago(3600)
|
179
|
-
assert_equal Time.local(2005,2,20,10,10,10), Time.local(2005,2,22,10,10,10).ago(86400*2)
|
180
|
-
assert_equal Time.local(2005,2,20,9,9,45), Time.local(2005,2,22,10,10,10).ago(86400*2 + 3600 + 25)
|
181
|
-
end
|
182
|
-
|
183
|
-
def test_daylight_savings_time_crossings_backward_start
|
184
|
-
with_env_tz 'US/Eastern' do
|
185
|
-
# dt: US: 2005 April 3rd 4:18am
|
186
|
-
assert_equal Time.local(2005,4,2,4,18,0), Time.local(2005,4,3,4,18,0).ago(86400), 'dt-1.day=>st'
|
187
|
-
assert_equal Time.local(2005,4,1,4,18,0), Time.local(2005,4,2,4,18,0).ago(86400), 'st-1.day=>st'
|
188
|
-
end
|
189
|
-
with_env_tz 'NZ' do
|
190
|
-
# dt: New Zealand: 2006 October 1st 4:18am
|
191
|
-
assert_equal Time.local(2006,9,30,4,18,0), Time.local(2006,10,1,4,18,0).ago(86400), 'dt-1.day=>st'
|
192
|
-
assert_equal Time.local(2006,9,29,4,18,0), Time.local(2006,9,30,4,18,0).ago(86400), 'st-1.day=>st'
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
def test_daylight_savings_time_crossings_backward_end
|
197
|
-
with_env_tz 'US/Eastern' do
|
198
|
-
# st: US: 2005 October 30th 4:03am
|
199
|
-
assert_equal Time.local(2005,10,29,4,3), Time.local(2005,10,30,4,3,0).ago(86400), 'st-1.day=>dt'
|
200
|
-
assert_equal Time.local(2005,10,28,4,3), Time.local(2005,10,29,4,3,0).ago(86400), 'dt-1.day=>dt'
|
201
|
-
end
|
202
|
-
with_env_tz 'NZ' do
|
203
|
-
# st: New Zealand: 2006 March 19th 4:03am
|
204
|
-
assert_equal Time.local(2006,3,18,4,3), Time.local(2006,3,19,4,3,0).ago(86400), 'st-1.day=>dt'
|
205
|
-
assert_equal Time.local(2006,3,17,4,3), Time.local(2006,3,18,4,3,0).ago(86400), 'dt-1.day=>dt'
|
206
|
-
end
|
207
|
-
end
|
208
|
-
|
209
|
-
def test_daylight_savings_time_crossings_backward_start_1day
|
210
|
-
with_env_tz 'US/Eastern' do
|
211
|
-
# dt: US: 2005 April 3rd 4:18am
|
212
|
-
assert_equal Time.local(2005,4,2,4,18,0), Time.local(2005,4,3,4,18,0).ago(1.day), 'dt-1.day=>st'
|
213
|
-
assert_equal Time.local(2005,4,1,4,18,0), Time.local(2005,4,2,4,18,0).ago(1.day), 'st-1.day=>st'
|
214
|
-
end
|
215
|
-
with_env_tz 'NZ' do
|
216
|
-
# dt: New Zealand: 2006 October 1st 4:18am
|
217
|
-
assert_equal Time.local(2006,9,30,4,18,0), Time.local(2006,10,1,4,18,0).ago(1.day), 'dt-1.day=>st'
|
218
|
-
assert_equal Time.local(2006,9,29,4,18,0), Time.local(2006,9,30,4,18,0).ago(1.day), 'st-1.day=>st'
|
219
|
-
end
|
220
|
-
end
|
221
|
-
|
222
|
-
def test_daylight_savings_time_crossings_backward_end_1day
|
223
|
-
with_env_tz 'US/Eastern' do
|
224
|
-
# st: US: 2005 October 30th 4:03am
|
225
|
-
assert_equal Time.local(2005,10,29,4,3), Time.local(2005,10,30,4,3,0).ago(1.day), 'st-1.day=>dt'
|
226
|
-
assert_equal Time.local(2005,10,28,4,3), Time.local(2005,10,29,4,3,0).ago(1.day), 'dt-1.day=>dt'
|
227
|
-
end
|
228
|
-
with_env_tz 'NZ' do
|
229
|
-
# st: New Zealand: 2006 March 19th 4:03am
|
230
|
-
assert_equal Time.local(2006,3,18,4,3), Time.local(2006,3,19,4,3,0).ago(1.day), 'st-1.day=>dt'
|
231
|
-
assert_equal Time.local(2006,3,17,4,3), Time.local(2006,3,18,4,3,0).ago(1.day), 'dt-1.day=>dt'
|
232
|
-
end
|
233
|
-
end
|
234
|
-
def test_since
|
235
|
-
assert_equal Time.local(2005,2,22,10,10,11), Time.local(2005,2,22,10,10,10).since(1)
|
236
|
-
assert_equal Time.local(2005,2,22,11,10,10), Time.local(2005,2,22,10,10,10).since(3600)
|
237
|
-
assert_equal Time.local(2005,2,24,10,10,10), Time.local(2005,2,22,10,10,10).since(86400*2)
|
238
|
-
assert_equal Time.local(2005,2,24,11,10,35), Time.local(2005,2,22,10,10,10).since(86400*2 + 3600 + 25)
|
239
|
-
# when out of range of Time, returns a DateTime
|
240
|
-
assert_equal DateTime.civil(2038,1,20,11,59,59), Time.utc(2038,1,18,11,59,59).since(86400*2)
|
241
|
-
end
|
242
|
-
|
243
|
-
def test_daylight_savings_time_crossings_forward_start
|
244
|
-
with_env_tz 'US/Eastern' do
|
245
|
-
# st: US: 2005 April 2nd 7:27pm
|
246
|
-
assert_equal Time.local(2005,4,3,19,27,0), Time.local(2005,4,2,19,27,0).since(86400), 'st+1.day=>dt'
|
247
|
-
assert_equal Time.local(2005,4,4,19,27,0), Time.local(2005,4,3,19,27,0).since(86400), 'dt+1.day=>dt'
|
248
|
-
end
|
249
|
-
with_env_tz 'NZ' do
|
250
|
-
# st: New Zealand: 2006 September 30th 7:27pm
|
251
|
-
assert_equal Time.local(2006,10,1,19,27,0), Time.local(2006,9,30,19,27,0).since(86400), 'st+1.day=>dt'
|
252
|
-
assert_equal Time.local(2006,10,2,19,27,0), Time.local(2006,10,1,19,27,0).since(86400), 'dt+1.day=>dt'
|
253
|
-
end
|
254
|
-
end
|
255
|
-
|
256
|
-
def test_daylight_savings_time_crossings_forward_start_1day
|
257
|
-
with_env_tz 'US/Eastern' do
|
258
|
-
# st: US: 2005 April 2nd 7:27pm
|
259
|
-
assert_equal Time.local(2005,4,3,19,27,0), Time.local(2005,4,2,19,27,0).since(1.day), 'st+1.day=>dt'
|
260
|
-
assert_equal Time.local(2005,4,4,19,27,0), Time.local(2005,4,3,19,27,0).since(1.day), 'dt+1.day=>dt'
|
261
|
-
end
|
262
|
-
with_env_tz 'NZ' do
|
263
|
-
# st: New Zealand: 2006 September 30th 7:27pm
|
264
|
-
assert_equal Time.local(2006,10,1,19,27,0), Time.local(2006,9,30,19,27,0).since(1.day), 'st+1.day=>dt'
|
265
|
-
assert_equal Time.local(2006,10,2,19,27,0), Time.local(2006,10,1,19,27,0).since(1.day), 'dt+1.day=>dt'
|
266
|
-
end
|
267
|
-
end
|
268
|
-
|
269
|
-
def test_daylight_savings_time_crossings_forward_start_tomorrow
|
270
|
-
with_env_tz 'US/Eastern' do
|
271
|
-
# st: US: 2005 April 2nd 7:27pm
|
272
|
-
assert_equal Time.local(2005,4,3,19,27,0), Time.local(2005,4,2,19,27,0).tomorrow, 'st+1.day=>dt'
|
273
|
-
assert_equal Time.local(2005,4,4,19,27,0), Time.local(2005,4,3,19,27,0).tomorrow, 'dt+1.day=>dt'
|
274
|
-
end
|
275
|
-
with_env_tz 'NZ' do
|
276
|
-
# st: New Zealand: 2006 September 30th 7:27pm
|
277
|
-
assert_equal Time.local(2006,10,1,19,27,0), Time.local(2006,9,30,19,27,0).tomorrow, 'st+1.day=>dt'
|
278
|
-
assert_equal Time.local(2006,10,2,19,27,0), Time.local(2006,10,1,19,27,0).tomorrow, 'dt+1.day=>dt'
|
279
|
-
end
|
280
|
-
end
|
281
|
-
|
282
|
-
def test_daylight_savings_time_crossings_backward_start_yesterday
|
283
|
-
with_env_tz 'US/Eastern' do
|
284
|
-
# st: US: 2005 April 2nd 7:27pm
|
285
|
-
assert_equal Time.local(2005,4,2,19,27,0), Time.local(2005,4,3,19,27,0).yesterday, 'dt-1.day=>st'
|
286
|
-
assert_equal Time.local(2005,4,3,19,27,0), Time.local(2005,4,4,19,27,0).yesterday, 'dt-1.day=>dt'
|
287
|
-
end
|
288
|
-
with_env_tz 'NZ' do
|
289
|
-
# st: New Zealand: 2006 September 30th 7:27pm
|
290
|
-
assert_equal Time.local(2006,9,30,19,27,0), Time.local(2006,10,1,19,27,0).yesterday, 'dt-1.day=>st'
|
291
|
-
assert_equal Time.local(2006,10,1,19,27,0), Time.local(2006,10,2,19,27,0).yesterday, 'dt-1.day=>dt'
|
292
|
-
end
|
293
|
-
end
|
294
|
-
|
295
|
-
def test_daylight_savings_time_crossings_forward_end
|
296
|
-
with_env_tz 'US/Eastern' do
|
297
|
-
# dt: US: 2005 October 30th 12:45am
|
298
|
-
assert_equal Time.local(2005,10,31,0,45,0), Time.local(2005,10,30,0,45,0).since(86400), 'dt+1.day=>st'
|
299
|
-
assert_equal Time.local(2005,11, 1,0,45,0), Time.local(2005,10,31,0,45,0).since(86400), 'st+1.day=>st'
|
300
|
-
end
|
301
|
-
with_env_tz 'NZ' do
|
302
|
-
# dt: New Zealand: 2006 March 19th 1:45am
|
303
|
-
assert_equal Time.local(2006,3,20,1,45,0), Time.local(2006,3,19,1,45,0).since(86400), 'dt+1.day=>st'
|
304
|
-
assert_equal Time.local(2006,3,21,1,45,0), Time.local(2006,3,20,1,45,0).since(86400), 'st+1.day=>st'
|
305
|
-
end
|
306
|
-
end
|
307
|
-
|
308
|
-
def test_daylight_savings_time_crossings_forward_end_1day
|
309
|
-
with_env_tz 'US/Eastern' do
|
310
|
-
# dt: US: 2005 October 30th 12:45am
|
311
|
-
assert_equal Time.local(2005,10,31,0,45,0), Time.local(2005,10,30,0,45,0).since(1.day), 'dt+1.day=>st'
|
312
|
-
assert_equal Time.local(2005,11, 1,0,45,0), Time.local(2005,10,31,0,45,0).since(1.day), 'st+1.day=>st'
|
313
|
-
end
|
314
|
-
with_env_tz 'NZ' do
|
315
|
-
# dt: New Zealand: 2006 March 19th 1:45am
|
316
|
-
assert_equal Time.local(2006,3,20,1,45,0), Time.local(2006,3,19,1,45,0).since(1.day), 'dt+1.day=>st'
|
317
|
-
assert_equal Time.local(2006,3,21,1,45,0), Time.local(2006,3,20,1,45,0).since(1.day), 'st+1.day=>st'
|
318
|
-
end
|
319
|
-
end
|
320
|
-
|
321
|
-
def test_daylight_savings_time_crossings_forward_end_tomorrow
|
322
|
-
with_env_tz 'US/Eastern' do
|
323
|
-
# dt: US: 2005 October 30th 12:45am
|
324
|
-
assert_equal Time.local(2005,10,31,0,45,0), Time.local(2005,10,30,0,45,0).tomorrow, 'dt+1.day=>st'
|
325
|
-
assert_equal Time.local(2005,11, 1,0,45,0), Time.local(2005,10,31,0,45,0).tomorrow, 'st+1.day=>st'
|
326
|
-
end
|
327
|
-
with_env_tz 'NZ' do
|
328
|
-
# dt: New Zealand: 2006 March 19th 1:45am
|
329
|
-
assert_equal Time.local(2006,3,20,1,45,0), Time.local(2006,3,19,1,45,0).tomorrow, 'dt+1.day=>st'
|
330
|
-
assert_equal Time.local(2006,3,21,1,45,0), Time.local(2006,3,20,1,45,0).tomorrow, 'st+1.day=>st'
|
331
|
-
end
|
332
|
-
end
|
333
|
-
|
334
|
-
def test_daylight_savings_time_crossings_backward_end_yesterday
|
335
|
-
with_env_tz 'US/Eastern' do
|
336
|
-
# dt: US: 2005 October 30th 12:45am
|
337
|
-
assert_equal Time.local(2005,10,30,0,45,0), Time.local(2005,10,31,0,45,0).yesterday, 'st-1.day=>dt'
|
338
|
-
assert_equal Time.local(2005,10, 31,0,45,0), Time.local(2005,11,1,0,45,0).yesterday, 'st-1.day=>st'
|
339
|
-
end
|
340
|
-
with_env_tz 'NZ' do
|
341
|
-
# dt: New Zealand: 2006 March 19th 1:45am
|
342
|
-
assert_equal Time.local(2006,3,19,1,45,0), Time.local(2006,3,20,1,45,0).yesterday, 'st-1.day=>dt'
|
343
|
-
assert_equal Time.local(2006,3,20,1,45,0), Time.local(2006,3,21,1,45,0).yesterday, 'st-1.day=>st'
|
344
|
-
end
|
345
|
-
end
|
346
|
-
|
347
|
-
def test_yesterday
|
348
|
-
assert_equal Time.local(2005,2,21,10,10,10), Time.local(2005,2,22,10,10,10).yesterday
|
349
|
-
assert_equal Time.local(2005,2,28,10,10,10), Time.local(2005,3,2,10,10,10).yesterday.yesterday
|
350
|
-
end
|
351
|
-
|
352
|
-
def test_tomorrow
|
353
|
-
assert_equal Time.local(2005,2,23,10,10,10), Time.local(2005,2,22,10,10,10).tomorrow
|
354
|
-
assert_equal Time.local(2005,3,2,10,10,10), Time.local(2005,2,28,10,10,10).tomorrow.tomorrow
|
355
|
-
end
|
356
|
-
|
357
|
-
def test_change
|
358
|
-
assert_equal Time.local(2006,2,22,15,15,10), Time.local(2005,2,22,15,15,10).change(:year => 2006)
|
359
|
-
assert_equal Time.local(2005,6,22,15,15,10), Time.local(2005,2,22,15,15,10).change(:month => 6)
|
360
|
-
assert_equal Time.local(2012,9,22,15,15,10), Time.local(2005,2,22,15,15,10).change(:year => 2012, :month => 9)
|
361
|
-
assert_equal Time.local(2005,2,22,16), Time.local(2005,2,22,15,15,10).change(:hour => 16)
|
362
|
-
assert_equal Time.local(2005,2,22,16,45), Time.local(2005,2,22,15,15,10).change(:hour => 16, :min => 45)
|
363
|
-
assert_equal Time.local(2005,2,22,15,45), Time.local(2005,2,22,15,15,10).change(:min => 45)
|
364
|
-
|
365
|
-
assert_equal Time.local(2005,1,2, 5, 0, 0, 0), Time.local(2005,1,2,11,22,33,44).change(:hour => 5)
|
366
|
-
assert_equal Time.local(2005,1,2,11, 6, 0, 0), Time.local(2005,1,2,11,22,33,44).change(:min => 6)
|
367
|
-
assert_equal Time.local(2005,1,2,11,22, 7, 0), Time.local(2005,1,2,11,22,33,44).change(:sec => 7)
|
368
|
-
assert_equal Time.local(2005,1,2,11,22,33, 8), Time.local(2005,1,2,11,22,33,44).change(:usec => 8)
|
369
|
-
end
|
370
|
-
|
371
|
-
def test_utc_change
|
372
|
-
assert_equal Time.utc(2006,2,22,15,15,10), Time.utc(2005,2,22,15,15,10).change(:year => 2006)
|
373
|
-
assert_equal Time.utc(2005,6,22,15,15,10), Time.utc(2005,2,22,15,15,10).change(:month => 6)
|
374
|
-
assert_equal Time.utc(2012,9,22,15,15,10), Time.utc(2005,2,22,15,15,10).change(:year => 2012, :month => 9)
|
375
|
-
assert_equal Time.utc(2005,2,22,16), Time.utc(2005,2,22,15,15,10).change(:hour => 16)
|
376
|
-
assert_equal Time.utc(2005,2,22,16,45), Time.utc(2005,2,22,15,15,10).change(:hour => 16, :min => 45)
|
377
|
-
assert_equal Time.utc(2005,2,22,15,45), Time.utc(2005,2,22,15,15,10).change(:min => 45)
|
378
|
-
end
|
379
|
-
|
380
|
-
def test_advance
|
381
|
-
assert_equal Time.local(2006,2,28,15,15,10), Time.local(2005,2,28,15,15,10).advance(:years => 1)
|
382
|
-
assert_equal Time.local(2005,6,28,15,15,10), Time.local(2005,2,28,15,15,10).advance(:months => 4)
|
383
|
-
assert_equal Time.local(2005,3,21,15,15,10), Time.local(2005,2,28,15,15,10).advance(:weeks => 3)
|
384
|
-
assert_equal Time.local(2005,3,25,3,15,10), Time.local(2005,2,28,15,15,10).advance(:weeks => 3.5)
|
385
|
-
assert_in_delta Time.local(2005,3,26,12,51,10), Time.local(2005,2,28,15,15,10).advance(:weeks => 3.7), 1
|
386
|
-
assert_equal Time.local(2005,3,5,15,15,10), Time.local(2005,2,28,15,15,10).advance(:days => 5)
|
387
|
-
assert_equal Time.local(2005,3,6,3,15,10), Time.local(2005,2,28,15,15,10).advance(:days => 5.5)
|
388
|
-
assert_in_delta Time.local(2005,3,6,8,3,10), Time.local(2005,2,28,15,15,10).advance(:days => 5.7), 1
|
389
|
-
assert_equal Time.local(2012,9,28,15,15,10), Time.local(2005,2,28,15,15,10).advance(:years => 7, :months => 7)
|
390
|
-
assert_equal Time.local(2013,10,3,15,15,10), Time.local(2005,2,28,15,15,10).advance(:years => 7, :months => 19, :days => 5)
|
391
|
-
assert_equal Time.local(2013,10,17,15,15,10), Time.local(2005,2,28,15,15,10).advance(:years => 7, :months => 19, :weeks => 2, :days => 5)
|
392
|
-
assert_equal Time.local(2001,12,27,15,15,10), Time.local(2005,2,28,15,15,10).advance(:years => -3, :months => -2, :days => -1)
|
393
|
-
assert_equal Time.local(2005,2,28,15,15,10), Time.local(2004,2,29,15,15,10).advance(:years => 1) #leap day plus one year
|
394
|
-
assert_equal Time.local(2005,2,28,20,15,10), Time.local(2005,2,28,15,15,10).advance(:hours => 5)
|
395
|
-
assert_equal Time.local(2005,2,28,15,22,10), Time.local(2005,2,28,15,15,10).advance(:minutes => 7)
|
396
|
-
assert_equal Time.local(2005,2,28,15,15,19), Time.local(2005,2,28,15,15,10).advance(:seconds => 9)
|
397
|
-
assert_equal Time.local(2005,2,28,20,22,19), Time.local(2005,2,28,15,15,10).advance(:hours => 5, :minutes => 7, :seconds => 9)
|
398
|
-
assert_equal Time.local(2005,2,28,10,8,1), Time.local(2005,2,28,15,15,10).advance(:hours => -5, :minutes => -7, :seconds => -9)
|
399
|
-
assert_equal Time.local(2013,10,17,20,22,19), Time.local(2005,2,28,15,15,10).advance(:years => 7, :months => 19, :weeks => 2, :days => 5, :hours => 5, :minutes => 7, :seconds => 9)
|
400
|
-
end
|
401
|
-
|
402
|
-
def test_utc_advance
|
403
|
-
assert_equal Time.utc(2006,2,22,15,15,10), Time.utc(2005,2,22,15,15,10).advance(:years => 1)
|
404
|
-
assert_equal Time.utc(2005,6,22,15,15,10), Time.utc(2005,2,22,15,15,10).advance(:months => 4)
|
405
|
-
assert_equal Time.utc(2005,3,21,15,15,10), Time.utc(2005,2,28,15,15,10).advance(:weeks => 3)
|
406
|
-
assert_equal Time.utc(2005,3,25,3,15,10), Time.utc(2005,2,28,15,15,10).advance(:weeks => 3.5)
|
407
|
-
assert_in_delta Time.utc(2005,3,26,12,51,10), Time.utc(2005,2,28,15,15,10).advance(:weeks => 3.7), 1
|
408
|
-
assert_equal Time.utc(2005,3,5,15,15,10), Time.utc(2005,2,28,15,15,10).advance(:days => 5)
|
409
|
-
assert_equal Time.utc(2005,3,6,3,15,10), Time.utc(2005,2,28,15,15,10).advance(:days => 5.5)
|
410
|
-
assert_in_delta Time.utc(2005,3,6,8,3,10), Time.utc(2005,2,28,15,15,10).advance(:days => 5.7), 1
|
411
|
-
assert_equal Time.utc(2012,9,22,15,15,10), Time.utc(2005,2,22,15,15,10).advance(:years => 7, :months => 7)
|
412
|
-
assert_equal Time.utc(2013,10,3,15,15,10), Time.utc(2005,2,22,15,15,10).advance(:years => 7, :months => 19, :days => 11)
|
413
|
-
assert_equal Time.utc(2013,10,17,15,15,10), Time.utc(2005,2,28,15,15,10).advance(:years => 7, :months => 19, :weeks => 2, :days => 5)
|
414
|
-
assert_equal Time.utc(2001,12,27,15,15,10), Time.utc(2005,2,28,15,15,10).advance(:years => -3, :months => -2, :days => -1)
|
415
|
-
assert_equal Time.utc(2005,2,28,15,15,10), Time.utc(2004,2,29,15,15,10).advance(:years => 1) #leap day plus one year
|
416
|
-
assert_equal Time.utc(2005,2,28,20,15,10), Time.utc(2005,2,28,15,15,10).advance(:hours => 5)
|
417
|
-
assert_equal Time.utc(2005,2,28,15,22,10), Time.utc(2005,2,28,15,15,10).advance(:minutes => 7)
|
418
|
-
assert_equal Time.utc(2005,2,28,15,15,19), Time.utc(2005,2,28,15,15,10).advance(:seconds => 9)
|
419
|
-
assert_equal Time.utc(2005,2,28,20,22,19), Time.utc(2005,2,28,15,15,10).advance(:hours => 5, :minutes => 7, :seconds => 9)
|
420
|
-
assert_equal Time.utc(2005,2,28,10,8,1), Time.utc(2005,2,28,15,15,10).advance(:hours => -5, :minutes => -7, :seconds => -9)
|
421
|
-
assert_equal Time.utc(2013,10,17,20,22,19), Time.utc(2005,2,28,15,15,10).advance(:years => 7, :months => 19, :weeks => 2, :days => 5, :hours => 5, :minutes => 7, :seconds => 9)
|
422
|
-
end
|
423
|
-
|
424
|
-
def test_next_week
|
425
|
-
with_env_tz 'US/Eastern' do
|
426
|
-
assert_equal Time.local(2005,2,28), Time.local(2005,2,22,15,15,10).next_week
|
427
|
-
assert_equal Time.local(2005,3,1), Time.local(2005,2,22,15,15,10).next_week(:tuesday)
|
428
|
-
assert_equal Time.local(2005,3,4), Time.local(2005,2,22,15,15,10).next_week(:friday)
|
429
|
-
assert_equal Time.local(2006,10,30), Time.local(2006,10,23,0,0,0).next_week
|
430
|
-
assert_equal Time.local(2006,11,1), Time.local(2006,10,23,0,0,0).next_week(:wednesday)
|
431
|
-
end
|
432
|
-
end
|
433
|
-
|
434
|
-
def test_next_week_near_daylight_start
|
435
|
-
with_env_tz 'US/Eastern' do
|
436
|
-
assert_equal Time.local(2006,4,3), Time.local(2006,4,2,23,1,0).next_week, 'just crossed standard => daylight'
|
437
|
-
end
|
438
|
-
with_env_tz 'NZ' do
|
439
|
-
assert_equal Time.local(2006,10,2), Time.local(2006,10,1,23,1,0).next_week, 'just crossed standard => daylight'
|
440
|
-
end
|
441
|
-
end
|
442
|
-
|
443
|
-
def test_next_week_near_daylight_end
|
444
|
-
with_env_tz 'US/Eastern' do
|
445
|
-
assert_equal Time.local(2006,10,30), Time.local(2006,10,29,23,1,0).next_week, 'just crossed daylight => standard'
|
446
|
-
end
|
447
|
-
with_env_tz 'NZ' do
|
448
|
-
assert_equal Time.local(2006,3,20), Time.local(2006,3,19,23,1,0).next_week, 'just crossed daylight => standard'
|
449
|
-
end
|
450
|
-
end
|
451
|
-
|
452
|
-
def test_to_s
|
453
|
-
time = Time.utc(2005, 2, 21, 17, 44, 30)
|
454
|
-
assert_equal time.to_default_s, time.to_s
|
455
|
-
assert_equal time.to_default_s, time.to_s(:doesnt_exist)
|
456
|
-
assert_equal "2005-02-21 17:44:30", time.to_s(:db)
|
457
|
-
assert_equal "21 Feb 17:44", time.to_s(:short)
|
458
|
-
assert_equal "17:44", time.to_s(:time)
|
459
|
-
assert_equal "February 21, 2005 17:44", time.to_s(:long)
|
460
|
-
assert_equal "February 21st, 2005 17:44", time.to_s(:long_ordinal)
|
461
|
-
with_env_tz "UTC" do
|
462
|
-
assert_equal "Mon, 21 Feb 2005 17:44:30 +0000", time.to_s(:rfc822)
|
463
|
-
end
|
464
|
-
with_env_tz "US/Central" do
|
465
|
-
assert_equal "Thu, 05 Feb 2009 14:30:05 -0600", Time.local(2009, 2, 5, 14, 30, 5).to_s(:rfc822)
|
466
|
-
assert_equal "Mon, 09 Jun 2008 04:05:01 -0500", Time.local(2008, 6, 9, 4, 5, 1).to_s(:rfc822)
|
467
|
-
end
|
468
|
-
end
|
469
|
-
|
470
|
-
def test_custom_date_format
|
471
|
-
Time::DATE_FORMATS[:custom] = '%Y%m%d%H%M%S'
|
472
|
-
assert_equal '20050221143000', Time.local(2005, 2, 21, 14, 30, 0).to_s(:custom)
|
473
|
-
Time::DATE_FORMATS.delete(:custom)
|
474
|
-
end
|
475
|
-
|
476
|
-
def test_to_date
|
477
|
-
assert_equal Date.new(2005, 2, 21), Time.local(2005, 2, 21, 17, 44, 30).to_date
|
478
|
-
end
|
479
|
-
|
480
|
-
def test_to_datetime
|
481
|
-
assert_equal Time.utc(2005, 2, 21, 17, 44, 30).to_datetime, DateTime.civil(2005, 2, 21, 17, 44, 30, 0, 0)
|
482
|
-
with_env_tz 'US/Eastern' do
|
483
|
-
assert_equal Time.local(2005, 2, 21, 17, 44, 30).to_datetime, DateTime.civil(2005, 2, 21, 17, 44, 30, Rational(Time.local(2005, 2, 21, 17, 44, 30).utc_offset, 86400), 0)
|
484
|
-
end
|
485
|
-
with_env_tz 'NZ' do
|
486
|
-
assert_equal Time.local(2005, 2, 21, 17, 44, 30).to_datetime, DateTime.civil(2005, 2, 21, 17, 44, 30, Rational(Time.local(2005, 2, 21, 17, 44, 30).utc_offset, 86400), 0)
|
487
|
-
end
|
488
|
-
assert_equal ::Date::ITALY, Time.utc(2005, 2, 21, 17, 44, 30).to_datetime.start # use Ruby's default start value
|
489
|
-
end
|
490
|
-
|
491
|
-
def test_to_time
|
492
|
-
assert_equal Time.local(2005, 2, 21, 17, 44, 30), Time.local(2005, 2, 21, 17, 44, 30).to_time
|
493
|
-
end
|
494
|
-
|
495
|
-
# NOTE: this test seems to fail (changeset 1958) only on certain platforms,
|
496
|
-
# like OSX, and FreeBSD 5.4.
|
497
|
-
def test_fp_inaccuracy_ticket_1836
|
498
|
-
midnight = Time.local(2005, 2, 21, 0, 0, 0)
|
499
|
-
assert_equal midnight.midnight, (midnight + 1.hour + 0.000001).midnight
|
500
|
-
end
|
501
|
-
|
502
|
-
def test_days_in_month_with_year
|
503
|
-
assert_equal 31, Time.days_in_month(1, 2005)
|
504
|
-
|
505
|
-
assert_equal 28, Time.days_in_month(2, 2005)
|
506
|
-
assert_equal 29, Time.days_in_month(2, 2004)
|
507
|
-
assert_equal 29, Time.days_in_month(2, 2000)
|
508
|
-
assert_equal 28, Time.days_in_month(2, 1900)
|
509
|
-
|
510
|
-
assert_equal 31, Time.days_in_month(3, 2005)
|
511
|
-
assert_equal 30, Time.days_in_month(4, 2005)
|
512
|
-
assert_equal 31, Time.days_in_month(5, 2005)
|
513
|
-
assert_equal 30, Time.days_in_month(6, 2005)
|
514
|
-
assert_equal 31, Time.days_in_month(7, 2005)
|
515
|
-
assert_equal 31, Time.days_in_month(8, 2005)
|
516
|
-
assert_equal 30, Time.days_in_month(9, 2005)
|
517
|
-
assert_equal 31, Time.days_in_month(10, 2005)
|
518
|
-
assert_equal 30, Time.days_in_month(11, 2005)
|
519
|
-
assert_equal 31, Time.days_in_month(12, 2005)
|
520
|
-
end
|
521
|
-
|
522
|
-
def test_days_in_month_feb_in_common_year_without_year_arg
|
523
|
-
Time.stubs(:now).returns(Time.utc(2007))
|
524
|
-
assert_equal 28, Time.days_in_month(2)
|
525
|
-
end
|
526
|
-
|
527
|
-
def test_days_in_month_feb_in_leap_year_without_year_arg
|
528
|
-
Time.stubs(:now).returns(Time.utc(2008))
|
529
|
-
assert_equal 29, Time.days_in_month(2)
|
530
|
-
end
|
531
|
-
|
532
|
-
def test_time_with_datetime_fallback
|
533
|
-
assert_equal Time.time_with_datetime_fallback(:utc, 2005, 2, 21, 17, 44, 30), Time.utc(2005, 2, 21, 17, 44, 30)
|
534
|
-
assert_equal Time.time_with_datetime_fallback(:local, 2005, 2, 21, 17, 44, 30), Time.local(2005, 2, 21, 17, 44, 30)
|
535
|
-
assert_equal Time.time_with_datetime_fallback(:utc, 2039, 2, 21, 17, 44, 30), DateTime.civil(2039, 2, 21, 17, 44, 30, 0, 0)
|
536
|
-
assert_equal Time.time_with_datetime_fallback(:local, 2039, 2, 21, 17, 44, 30), DateTime.civil(2039, 2, 21, 17, 44, 30, DateTime.local_offset, 0)
|
537
|
-
assert_equal Time.time_with_datetime_fallback(:utc, 1900, 2, 21, 17, 44, 30), DateTime.civil(1900, 2, 21, 17, 44, 30, 0, 0)
|
538
|
-
assert_equal Time.time_with_datetime_fallback(:utc, 2005), Time.utc(2005)
|
539
|
-
assert_equal Time.time_with_datetime_fallback(:utc, 2039), DateTime.civil(2039, 1, 1, 0, 0, 0, 0, 0)
|
540
|
-
assert_equal Time.time_with_datetime_fallback(:utc, 2005, 2, 21, 17, 44, 30, 1), Time.utc(2005, 2, 21, 17, 44, 30, 1) #with usec
|
541
|
-
# This won't overflow on 64bit linux
|
542
|
-
unless time_is_64bits?
|
543
|
-
assert_equal Time.time_with_datetime_fallback(:local, 1900, 2, 21, 17, 44, 30), DateTime.civil(1900, 2, 21, 17, 44, 30, DateTime.local_offset, 0)
|
544
|
-
assert_equal Time.time_with_datetime_fallback(:utc, 2039, 2, 21, 17, 44, 30, 1),
|
545
|
-
DateTime.civil(2039, 2, 21, 17, 44, 30, 0, 0)
|
546
|
-
assert_equal ::Date::ITALY, Time.time_with_datetime_fallback(:utc, 2039, 2, 21, 17, 44, 30, 1).start # use Ruby's default start value
|
547
|
-
end
|
548
|
-
end
|
549
|
-
|
550
|
-
def test_utc_time
|
551
|
-
assert_equal Time.utc_time(2005, 2, 21, 17, 44, 30), Time.utc(2005, 2, 21, 17, 44, 30)
|
552
|
-
assert_equal Time.utc_time(2039, 2, 21, 17, 44, 30), DateTime.civil(2039, 2, 21, 17, 44, 30, 0, 0)
|
553
|
-
assert_equal Time.utc_time(1901, 2, 21, 17, 44, 30), DateTime.civil(1901, 2, 21, 17, 44, 30, 0, 0)
|
554
|
-
end
|
555
|
-
|
556
|
-
def test_local_time
|
557
|
-
assert_equal Time.local_time(2005, 2, 21, 17, 44, 30), Time.local(2005, 2, 21, 17, 44, 30)
|
558
|
-
assert_equal Time.local_time(2039, 2, 21, 17, 44, 30), DateTime.civil(2039, 2, 21, 17, 44, 30, DateTime.local_offset, 0)
|
559
|
-
|
560
|
-
unless time_is_64bits?
|
561
|
-
assert_equal Time.local_time(1901, 2, 21, 17, 44, 30), DateTime.civil(1901, 2, 21, 17, 44, 30, DateTime.local_offset, 0)
|
562
|
-
end
|
563
|
-
end
|
564
|
-
|
565
|
-
def test_next_month_on_31st
|
566
|
-
assert_equal Time.local(2005, 9, 30), Time.local(2005, 8, 31).next_month
|
567
|
-
end
|
568
|
-
|
569
|
-
def test_last_month_on_31st
|
570
|
-
assert_equal Time.local(2004, 2, 29), Time.local(2004, 3, 31).last_month
|
571
|
-
end
|
572
|
-
|
573
|
-
def test_xmlschema_is_available
|
574
|
-
assert_nothing_raised { Time.now.xmlschema }
|
575
|
-
end
|
576
|
-
|
577
|
-
def test_today_with_time_local
|
578
|
-
Date.stubs(:current).returns(Date.new(2000, 1, 1))
|
579
|
-
assert_equal false, Time.local(1999,12,31,23,59,59).today?
|
580
|
-
assert_equal true, Time.local(2000,1,1,0).today?
|
581
|
-
assert_equal true, Time.local(2000,1,1,23,59,59).today?
|
582
|
-
assert_equal false, Time.local(2000,1,2,0).today?
|
583
|
-
end
|
584
|
-
|
585
|
-
def test_today_with_time_utc
|
586
|
-
Date.stubs(:current).returns(Date.new(2000, 1, 1))
|
587
|
-
assert_equal false, Time.utc(1999,12,31,23,59,59).today?
|
588
|
-
assert_equal true, Time.utc(2000,1,1,0).today?
|
589
|
-
assert_equal true, Time.utc(2000,1,1,23,59,59).today?
|
590
|
-
assert_equal false, Time.utc(2000,1,2,0).today?
|
591
|
-
end
|
592
|
-
|
593
|
-
def test_past_with_time_current_as_time_local
|
594
|
-
with_env_tz 'US/Eastern' do
|
595
|
-
Time.stubs(:current).returns(Time.local(2005,2,10,15,30,45))
|
596
|
-
assert_equal true, Time.local(2005,2,10,15,30,44).past?
|
597
|
-
assert_equal false, Time.local(2005,2,10,15,30,45).past?
|
598
|
-
assert_equal false, Time.local(2005,2,10,15,30,46).past?
|
599
|
-
assert_equal true, Time.utc(2005,2,10,20,30,44).past?
|
600
|
-
assert_equal false, Time.utc(2005,2,10,20,30,45).past?
|
601
|
-
assert_equal false, Time.utc(2005,2,10,20,30,46).past?
|
602
|
-
end
|
603
|
-
end
|
604
|
-
|
605
|
-
def test_past_with_time_current_as_time_with_zone
|
606
|
-
with_env_tz 'US/Eastern' do
|
607
|
-
twz = Time.utc(2005,2,10,15,30,45).in_time_zone('Central Time (US & Canada)')
|
608
|
-
Time.stubs(:current).returns(twz)
|
609
|
-
assert_equal true, Time.local(2005,2,10,10,30,44).past?
|
610
|
-
assert_equal false, Time.local(2005,2,10,10,30,45).past?
|
611
|
-
assert_equal false, Time.local(2005,2,10,10,30,46).past?
|
612
|
-
assert_equal true, Time.utc(2005,2,10,15,30,44).past?
|
613
|
-
assert_equal false, Time.utc(2005,2,10,15,30,45).past?
|
614
|
-
assert_equal false, Time.utc(2005,2,10,15,30,46).past?
|
615
|
-
end
|
616
|
-
end
|
617
|
-
|
618
|
-
def test_future_with_time_current_as_time_local
|
619
|
-
with_env_tz 'US/Eastern' do
|
620
|
-
Time.stubs(:current).returns(Time.local(2005,2,10,15,30,45))
|
621
|
-
assert_equal false, Time.local(2005,2,10,15,30,44).future?
|
622
|
-
assert_equal false, Time.local(2005,2,10,15,30,45).future?
|
623
|
-
assert_equal true, Time.local(2005,2,10,15,30,46).future?
|
624
|
-
assert_equal false, Time.utc(2005,2,10,20,30,44).future?
|
625
|
-
assert_equal false, Time.utc(2005,2,10,20,30,45).future?
|
626
|
-
assert_equal true, Time.utc(2005,2,10,20,30,46).future?
|
627
|
-
end
|
628
|
-
end
|
629
|
-
|
630
|
-
def test_future_with_time_current_as_time_with_zone
|
631
|
-
with_env_tz 'US/Eastern' do
|
632
|
-
twz = Time.utc(2005,2,10,15,30,45).in_time_zone('Central Time (US & Canada)')
|
633
|
-
Time.stubs(:current).returns(twz)
|
634
|
-
assert_equal false, Time.local(2005,2,10,10,30,44).future?
|
635
|
-
assert_equal false, Time.local(2005,2,10,10,30,45).future?
|
636
|
-
assert_equal true, Time.local(2005,2,10,10,30,46).future?
|
637
|
-
assert_equal false, Time.utc(2005,2,10,15,30,44).future?
|
638
|
-
assert_equal false, Time.utc(2005,2,10,15,30,45).future?
|
639
|
-
assert_equal true, Time.utc(2005,2,10,15,30,46).future?
|
640
|
-
end
|
641
|
-
end
|
642
|
-
|
643
|
-
def test_acts_like_time
|
644
|
-
assert Time.new.acts_like_time?
|
645
|
-
end
|
646
|
-
|
647
|
-
def test_formatted_offset_with_utc
|
648
|
-
assert_equal '+00:00', Time.utc(2000).formatted_offset
|
649
|
-
assert_equal '+0000', Time.utc(2000).formatted_offset(false)
|
650
|
-
assert_equal 'UTC', Time.utc(2000).formatted_offset(true, 'UTC')
|
651
|
-
end
|
652
|
-
|
653
|
-
def test_formatted_offset_with_local
|
654
|
-
with_env_tz 'US/Eastern' do
|
655
|
-
assert_equal '-05:00', Time.local(2000).formatted_offset
|
656
|
-
assert_equal '-0500', Time.local(2000).formatted_offset(false)
|
657
|
-
assert_equal '-04:00', Time.local(2000, 7).formatted_offset
|
658
|
-
assert_equal '-0400', Time.local(2000, 7).formatted_offset(false)
|
659
|
-
end
|
660
|
-
end
|
661
|
-
|
662
|
-
def test_compare_with_time
|
663
|
-
assert_equal 1, Time.utc(2000) <=> Time.utc(1999, 12, 31, 23, 59, 59, 999)
|
664
|
-
assert_equal 0, Time.utc(2000) <=> Time.utc(2000, 1, 1, 0, 0, 0)
|
665
|
-
assert_equal(-1, Time.utc(2000) <=> Time.utc(2000, 1, 1, 0, 0, 0, 001))
|
666
|
-
end
|
667
|
-
|
668
|
-
def test_compare_with_datetime
|
669
|
-
assert_equal 1, Time.utc(2000) <=> DateTime.civil(1999, 12, 31, 23, 59, 59)
|
670
|
-
assert_equal 0, Time.utc(2000) <=> DateTime.civil(2000, 1, 1, 0, 0, 0)
|
671
|
-
assert_equal(-1, Time.utc(2000) <=> DateTime.civil(2000, 1, 1, 0, 0, 1))
|
672
|
-
end
|
673
|
-
|
674
|
-
def test_compare_with_time_with_zone
|
675
|
-
assert_equal 1, Time.utc(2000) <=> ActiveSupport::TimeWithZone.new( Time.utc(1999, 12, 31, 23, 59, 59), ActiveSupport::TimeZone['UTC'] )
|
676
|
-
assert_equal 0, Time.utc(2000) <=> ActiveSupport::TimeWithZone.new( Time.utc(2000, 1, 1, 0, 0, 0), ActiveSupport::TimeZone['UTC'] )
|
677
|
-
assert_equal(-1, Time.utc(2000) <=> ActiveSupport::TimeWithZone.new( Time.utc(2000, 1, 1, 0, 0, 1), ActiveSupport::TimeZone['UTC'] ))
|
678
|
-
end
|
679
|
-
|
680
|
-
def test_minus_with_time_with_zone
|
681
|
-
assert_equal 86_400.0, Time.utc(2000, 1, 2) - ActiveSupport::TimeWithZone.new( Time.utc(2000, 1, 1), ActiveSupport::TimeZone['UTC'] )
|
682
|
-
end
|
683
|
-
|
684
|
-
def test_time_created_with_local_constructor_cannot_represent_times_during_hour_skipped_by_dst
|
685
|
-
with_env_tz 'US/Eastern' do
|
686
|
-
# On Apr 2 2006 at 2:00AM in US, clocks were moved forward to 3:00AM.
|
687
|
-
# Therefore, 2AM EST doesn't exist for this date; Time.local fails over to 3:00AM EDT
|
688
|
-
assert_equal Time.local(2006, 4, 2, 3), Time.local(2006, 4, 2, 2)
|
689
|
-
assert Time.local(2006, 4, 2, 2).dst?
|
690
|
-
end
|
691
|
-
end
|
692
|
-
|
693
|
-
def test_case_equality
|
694
|
-
assert Time === Time.utc(2000)
|
695
|
-
assert Time === ActiveSupport::TimeWithZone.new(Time.utc(2000), ActiveSupport::TimeZone['UTC'])
|
696
|
-
assert_equal false, Time === DateTime.civil(2000)
|
697
|
-
end
|
698
|
-
|
699
|
-
protected
|
700
|
-
def with_env_tz(new_tz = 'US/Eastern')
|
701
|
-
old_tz, ENV['TZ'] = ENV['TZ'], new_tz
|
702
|
-
yield
|
703
|
-
ensure
|
704
|
-
old_tz ? ENV['TZ'] = old_tz : ENV.delete('TZ')
|
705
|
-
end
|
706
|
-
|
707
|
-
def time_is_64bits?
|
708
|
-
Time.time_with_datetime_fallback(:utc, 2039, 2, 21, 17, 44, 30, 1).is_a?(Time)
|
709
|
-
end
|
710
|
-
end
|
711
|
-
|
712
|
-
class TimeExtMarshalingTest < Test::Unit::TestCase
|
713
|
-
def test_marshaling_with_utc_instance
|
714
|
-
t = Time.utc(2000)
|
715
|
-
marshaled = Marshal.dump t
|
716
|
-
unmarshaled = Marshal.load marshaled
|
717
|
-
assert_equal t, unmarshaled
|
718
|
-
assert_equal t.zone, unmarshaled.zone
|
719
|
-
end
|
720
|
-
|
721
|
-
def test_marshaling_with_local_instance
|
722
|
-
t = Time.local(2000)
|
723
|
-
marshaled = Marshal.dump t
|
724
|
-
unmarshaled = Marshal.load marshaled
|
725
|
-
assert_equal t, unmarshaled
|
726
|
-
assert_equal t.zone, unmarshaled.zone
|
727
|
-
end
|
728
|
-
|
729
|
-
def test_marshaling_with_frozen_utc_instance
|
730
|
-
t = Time.utc(2000).freeze
|
731
|
-
marshaled = Marshal.dump t
|
732
|
-
unmarshaled = Marshal.load marshaled
|
733
|
-
assert_equal t, unmarshaled
|
734
|
-
assert_equal t.zone, unmarshaled.zone
|
735
|
-
end
|
736
|
-
|
737
|
-
def test_marshaling_with_frozen_local_instance
|
738
|
-
t = Time.local(2000).freeze
|
739
|
-
marshaled = Marshal.dump t
|
740
|
-
unmarshaled = Marshal.load marshaled
|
741
|
-
assert_equal t, unmarshaled
|
742
|
-
assert_equal t.zone, unmarshaled.zone
|
743
|
-
end
|
744
|
-
end
|