typo 5.1.3 → 5.1.98
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/MAINTAINERS +5 -1
- data/README +3 -10
- data/app/apis/meta_weblog_service.rb +1 -1
- data/app/controllers/accounts_controller.rb +20 -9
- data/app/controllers/admin/base_controller.rb +21 -1
- data/app/controllers/admin/blacklist_controller.rb +6 -15
- data/app/controllers/admin/cache_controller.rb +2 -6
- data/app/controllers/admin/categories_controller.rb +32 -26
- data/app/controllers/admin/content_controller.rb +40 -54
- data/app/controllers/admin/dashboard_controller.rb +58 -5
- data/app/controllers/admin/feedback_controller.rb +88 -17
- data/app/controllers/admin/pages_controller.rb +9 -30
- data/app/controllers/admin/profiles_controller.rb +7 -10
- data/app/controllers/admin/resources_controller.rb +13 -12
- data/app/controllers/admin/settings_controller.rb +9 -42
- data/app/controllers/admin/sidebar_controller.rb +21 -8
- data/app/controllers/admin/tags_controller.rb +7 -13
- data/app/controllers/admin/textfilters_controller.rb +1 -99
- data/app/controllers/admin/themes_controller.rb +8 -5
- data/app/controllers/admin/users_controller.rb +13 -11
- data/app/controllers/application.rb +1 -0
- data/app/controllers/articles_controller.rb +64 -16
- data/app/controllers/backend_controller.rb +8 -2
- data/app/controllers/grouping_controller.rb +16 -10
- data/app/controllers/redirect_controller.rb +2 -2
- data/app/controllers/users_controller.rb +4 -0
- data/app/controllers/xml_controller.rb +3 -1
- data/app/helpers/admin/base_helper.rb +60 -113
- data/app/helpers/admin/content_helper.rb +19 -1
- data/app/helpers/admin/feedback_helper.rb +0 -31
- data/app/helpers/admin/pages_helper.rb +0 -20
- data/app/helpers/admin/settings_helper.rb +5 -0
- data/app/helpers/application_helper.rb +43 -27
- data/app/helpers/authors_helper.rb +1 -3
- data/app/helpers/content_helper.rb +1 -18
- data/app/helpers/sidebar_helper.rb +12 -0
- data/app/helpers/theme_helper.rb +0 -20
- data/app/helpers/xml_helper.rb +1 -9
- data/app/models/article.rb +73 -9
- data/app/models/blog.rb +24 -3
- data/app/models/blog_sweeper.rb +4 -13
- data/app/models/category.rb +1 -0
- data/app/models/content.rb +45 -4
- data/app/models/feedback/states.rb +21 -2
- data/app/models/feedback.rb +2 -0
- data/app/models/page.rb +7 -0
- data/app/models/page_cache.rb +1 -1
- data/app/models/profile.rb +2 -0
- data/app/models/tag.rb +3 -1
- data/app/models/theme.rb +1 -1
- data/app/models/user.rb +35 -6
- data/app/views/accounts/login.html.erb +7 -9
- data/app/views/accounts/signup.html.erb +1 -1
- data/app/views/admin/base/_recent_comments.html.erb +3 -3
- data/app/views/admin/base/_recent_trackbacks.html.erb +3 -3
- data/app/views/admin/blacklist/_blacklist_patterns.html.erb +2 -5
- data/app/views/admin/blacklist/_quick_post.html.erb +1 -1
- data/app/views/admin/blacklist/edit.html.erb +2 -3
- data/app/views/admin/blacklist/index.html.erb +2 -2
- data/app/views/admin/categories/_categories.html.erb +8 -10
- data/app/views/admin/categories/_form.html.erb +12 -3
- data/app/views/admin/categories/index.html.erb +1 -5
- data/app/views/admin/categories/new.html.erb +9 -0
- data/app/views/admin/content/_article_list.html.erb +16 -0
- data/app/views/admin/content/_drafts.html.erb +3 -3
- data/app/views/admin/content/_form.html.erb +29 -53
- data/app/views/admin/content/index.html.erb +49 -9
- data/app/views/admin/content/new.html.erb +1 -1
- data/app/views/admin/dashboard/_comments.html.erb +1 -3
- data/app/views/admin/dashboard/_inbound.html.erb +19 -0
- data/app/views/admin/dashboard/_overview.html.erb +7 -2
- data/app/views/admin/dashboard/_sysinfo.html.erb +5 -5
- data/app/views/admin/dashboard/_typo_dev.html.erb +21 -0
- data/app/views/admin/dashboard/_welcome.html.erb +1 -1
- data/app/views/admin/dashboard/index.html.erb +14 -17
- data/app/views/admin/feedback/_button.html.erb +5 -4
- data/app/views/admin/{comments → feedback}/_form.html.erb +1 -0
- data/app/views/admin/feedback/_item.html.erb +3 -5
- data/app/views/admin/feedback/article.html.erb +33 -0
- data/app/views/admin/feedback/edit.html.erb +10 -0
- data/app/views/admin/feedback/index.html.erb +21 -24
- data/app/views/admin/pages/_form.html.erb +20 -28
- data/app/views/admin/pages/_pages.html.erb +14 -25
- data/app/views/admin/resources/_metadata_edit.html.erb +1 -1
- data/app/views/admin/resources/_resources.html.erb +8 -5
- data/app/views/admin/resources/index.html.erb +1 -3
- data/app/views/admin/settings/_submit.html.erb +2 -2
- data/app/views/admin/settings/feedback.html.erb +86 -49
- data/app/views/admin/settings/index.html.erb +54 -58
- data/app/views/admin/settings/read.html.erb +2 -1
- data/app/views/admin/settings/seo.html.erb +46 -0
- data/app/views/admin/settings/update_database.html.erb +27 -29
- data/app/views/admin/settings/write.html.erb +41 -11
- data/app/views/admin/shared/_edit.html.erb +2 -1
- data/app/views/admin/sidebar/index.html.erb +4 -4
- data/app/views/admin/sidebar/set_active.rjs +1 -1
- data/app/views/admin/tags/_tags.html.erb +7 -8
- data/app/views/admin/tags/edit.html.erb +2 -2
- data/app/views/admin/tags/index.html.erb +1 -3
- data/app/views/admin/users/_form.html.erb +14 -3
- data/app/views/admin/users/edit.html.erb +1 -1
- data/app/views/admin/users/index.html.erb +16 -16
- data/app/views/admin/users/new.html.erb +1 -1
- data/app/views/articles/_comment_failed.html.erb +1 -0
- data/app/views/articles/_rss20_feed.rss.builder +1 -1
- data/app/views/articles/groupings.html.erb +4 -3
- data/app/views/articles/index.html.erb +1 -3
- data/app/views/articles/search.html.erb +8 -0
- data/app/views/layouts/accounts.html.erb +2 -3
- data/app/views/layouts/administration.html.erb +44 -40
- data/app/views/shared/_loginform.html.erb +9 -3
- data/app/views/shared/_search.html.erb +3 -8
- data/config/boot.rb +96 -32
- data/config/environment.rb +14 -7
- data/config/environments/development.rb +2 -0
- data/config/initializers/access_rules.rb +41 -48
- data/config/initializers/inflector.rb +1 -0
- data/config/routes.rb +11 -21
- data/db/migrate/001_initial_schema.rb +0 -1
- data/db/migrate/003_add_article_user_id.rb +11 -0
- data/db/migrate/020_superclass_articles.rb +4 -3
- data/db/migrate/021_superclass_comments.rb +2 -2
- data/db/migrate/022_superclass_trackbacks.rb +2 -1
- data/db/migrate/028_rename_redirect_to.rb +5 -1
- data/db/migrate/057_add_categorization_model.rb +12 -6
- data/db/migrate/072_add_remember_token.rb +9 -0
- data/db/migrate/073_add_meta_and_subcategories.rb +13 -0
- data/db/migrate/074_add_remember_token_expires_at.rb +9 -0
- data/db/migrate/075_move_editor_to_user.rb +20 -0
- data/db/migrate/076_fix_users_empty_email.rb +15 -0
- data/db/migrate/077_fix_userless_articles.rb +20 -0
- data/db/schema.rb +38 -38
- data/doc/typo-5.2-release-notes.txt +52 -0
- data/lang/fr_FR.rb +35 -15
- data/lang/he_IL.rb +715 -0
- data/lib/tasks/release.rake +7 -7
- data/lib/tasks/rspec.rake +142 -0
- data/lib/text_filter_plugin.rb +5 -0
- data/lib/typo_version.rb +1 -1
- data/public/images/admin/typologo.gif +0 -0
- data/public/javascripts/administration.js +12 -0
- data/public/javascripts/controls.js +1 -3
- data/public/javascripts/dragdrop.js +1 -3
- data/public/javascripts/effects.js +5 -7
- data/public/javascripts/fckcustom.js +9 -8
- data/public/javascripts/fckeditor/fckconfig.js +2 -2
- data/public/javascripts/fckeditor/fckeditor.js +1 -1
- data/public/javascripts/prototype.js +317 -167
- data/public/javascripts/quicktags.js +511 -0
- data/public/robots.txt +16 -1
- data/public/sources/javascripts/administration.js +12 -0
- data/public/sources/javascripts/application.js +2 -0
- data/public/sources/javascripts/codecollapse.js +8 -0
- data/public/sources/javascripts/controls.js +963 -0
- data/public/sources/javascripts/cookies.js +60 -0
- data/public/sources/javascripts/dragdrop.js +972 -0
- data/public/sources/javascripts/effects.js +1120 -0
- data/public/sources/javascripts/fckcustom.js +28 -0
- data/public/sources/javascripts/lang/default.js +21 -0
- data/public/sources/javascripts/lang/en_US.js +21 -0
- data/public/sources/javascripts/lang/fr_FR.js +21 -0
- data/public/sources/javascripts/lightbox.js +202 -0
- data/public/sources/javascripts/prototype.js +4320 -0
- data/public/sources/javascripts/quicktags.js +511 -0
- data/public/sources/javascripts/scriptaculous.js +58 -0
- data/public/sources/javascripts/slider.js +258 -0
- data/public/sources/javascripts/typo.js +136 -0
- data/public/sources/stylesheets/administration.css +955 -0
- data/public/sources/stylesheets/administration_rtl.css +1026 -0
- data/public/sources/stylesheets/codecollapse.css +3 -0
- data/public/sources/stylesheets/coderay.css +126 -0
- data/public/sources/stylesheets/lightbox.css +62 -0
- data/public/sources/stylesheets/rss.css +54 -0
- data/public/sources/stylesheets/textmate/dawn.css +209 -0
- data/public/sources/stylesheets/textmate/iplastic.css +142 -0
- data/public/sources/stylesheets/textmate/space_cadet.css +99 -0
- data/public/sources/stylesheets/textmate/textmate.css +48 -0
- data/public/sources/stylesheets/textmate/twilight.css +227 -0
- data/public/sources/stylesheets/user-styles.css +22 -0
- data/public/stylesheets/administration.css +146 -214
- data/public/stylesheets/administration_rtl.css +1026 -0
- data/public/stylesheets/coderay.css +128 -0
- data/script/autospec +5 -0
- data/script/dbconsole +3 -0
- data/script/performance/request +3 -0
- data/script/spec_server +18 -4
- data/spec/controllers/accounts_controller_spec.rb +24 -11
- data/spec/controllers/admin/blacklist_controller_spec.rb +4 -4
- data/spec/controllers/admin/cache_controller_spec.rb +32 -0
- data/spec/controllers/admin/categories_controller_spec.rb +8 -16
- data/spec/controllers/admin/content_controller_spec.rb +327 -171
- data/spec/controllers/admin/feedback_controller_spec.rb +278 -26
- data/spec/controllers/admin/pages_controller_spec.rb +0 -6
- data/spec/controllers/admin/resources_controller_spec.rb +3 -6
- data/spec/controllers/admin/settings_controller_spec.rb +21 -1
- data/spec/controllers/admin/tags_controller_spec.rb +35 -0
- data/spec/controllers/admin/textfilters_controller_spec.rb +10 -9
- data/spec/controllers/admin/users_controller_spec.rb +17 -18
- data/spec/controllers/articles_controller_spec.rb +4 -1
- data/spec/controllers/authors_controller_spec.rb +3 -6
- data/spec/controllers/backend_controller_spec.rb +26 -3
- data/spec/controllers/categories_controller_spec.rb +3 -6
- data/spec/controllers/comments_controller_spec.rb +4 -3
- data/spec/controllers/redirect_controller_spec.rb +5 -5
- data/spec/controllers/routes/articles_routing_spec.rb +31 -0
- data/spec/controllers/tags_controller_spec.rb +3 -6
- data/spec/controllers/textfilter_controller_spec.rb +37 -21
- data/spec/controllers/xml_controller_spec.rb +4 -1
- data/spec/helpers/application_helper_spec.rb +25 -0
- data/spec/helpers/content_helper_spec.rb +2 -0
- data/spec/lib/text_filter_plugin_spec.rb +15 -0
- data/spec/models/article_closing_spec.rb +4 -0
- data/spec/models/article_spec.rb +72 -3
- data/spec/models/blog_spec.rb +12 -0
- data/spec/models/comment_spec.rb +155 -127
- data/spec/models/metafragment_spec.rb +12 -0
- data/spec/models/resource_spec.rb +1 -0
- data/spec/models/tag_spec.rb +2 -2
- data/spec/models/theme_spec.rb +2 -2
- data/spec/models/user_spec.rb +14 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/views/articles/index_spec.rb +57 -0
- data/test/fixtures/contents.yml +18 -0
- data/test/fixtures/feedback.yml +27 -0
- data/test/fixtures/profiles.yml +4 -0
- data/test/mocks/themes/typographic/views/articles/_article.html.erb +1 -1
- data/test/mocks/themes/typographic/views/articles/index.html.erb +1 -1
- data/themes/dirtylicious/layouts/default.html.erb +1 -1
- data/themes/dirtylicious/views/articles/index.html.erb +1 -3
- data/themes/scribbish/views/articles/index.html.erb +1 -3
- data/themes/standard_issue/views/articles/_article.html.erb +1 -1
- data/themes/standard_issue/views/articles/index.html.erb +1 -3
- data/themes/typographic/views/articles/_article.html.erb +1 -1
- data/themes/typographic/views/articles/index.html.erb +1 -3
- data/vendor/actionwebservice/CHANGELOG +63 -8
- data/vendor/actionwebservice/README +17 -0
- data/vendor/actionwebservice/Rakefile +12 -11
- data/vendor/actionwebservice/actionwebservice.gemspec +26 -0
- data/vendor/actionwebservice/generators/web_service/USAGE +28 -0
- data/vendor/actionwebservice/generators/web_service/templates/api_definition.rb +5 -0
- data/vendor/actionwebservice/generators/web_service/templates/controller.rb +8 -0
- data/vendor/actionwebservice/generators/web_service/templates/functional_test.rb +19 -0
- data/vendor/actionwebservice/generators/web_service/web_service_generator.rb +29 -0
- data/vendor/actionwebservice/install.rb +1 -1
- data/vendor/actionwebservice/lib/action_web_service/api.rb +1 -1
- data/vendor/actionwebservice/lib/action_web_service/casting.rb +7 -1
- data/vendor/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +2 -2
- data/vendor/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +7 -0
- data/vendor/actionwebservice/lib/action_web_service/scaffolding.rb +8 -8
- data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/{layout.erb → layout.html.erb} +0 -0
- data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/{methods.erb → methods.html.erb} +0 -0
- data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/{parameters.erb → parameters.html.erb} +0 -0
- data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/{result.erb → result.html.erb} +0 -0
- data/vendor/actionwebservice/lib/action_web_service/version.rb +3 -3
- data/vendor/actionwebservice/lib/action_web_service.rb +3 -3
- data/vendor/actionwebservice/test/abstract_client.rb +1 -1
- data/vendor/actionwebservice/test/abstract_dispatcher.rb +0 -4
- data/vendor/actionwebservice/test/abstract_unit.rb +6 -18
- data/vendor/actionwebservice/test/client_xmlrpc_test.rb +0 -1
- data/vendor/actionwebservice/test/gencov +0 -0
- data/vendor/actionwebservice/test/run +0 -0
- data/vendor/actionwebservice/test/scaffolded_controller_test.rb +5 -5
- data/vendor/gems/coderay-0.8.260/.specification +114 -0
- data/vendor/gems/coderay-0.8.260/FOLDERS +53 -0
- data/vendor/gems/coderay-0.8.260/LICENSE +504 -0
- data/vendor/gems/coderay-0.8.260/README +128 -0
- data/vendor/gems/coderay-0.8.260/bin/coderay +82 -0
- data/vendor/gems/coderay-0.8.260/bin/coderay_stylesheet +4 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/duo.rb +87 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoder.rb +182 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/_map.rb +9 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/count.rb +21 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/debug.rb +49 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/div.rb +20 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/html/css.rb +70 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/html/numerization.rb +124 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/html/output.rb +197 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/html.rb +287 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/null.rb +26 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/page.rb +21 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/span.rb +20 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/statistic.rb +77 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/text.rb +32 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/tokens.rb +44 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/xml.rb +70 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/encoders/yaml.rb +22 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/for_redcloth.rb +72 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/helpers/file_type.rb +211 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/helpers/gzip_simple.rb +123 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/helpers/plugin.rb +333 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/helpers/word_list.rb +123 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanner.rb +255 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/_map.rb +15 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/c.rb +165 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/css.rb +181 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/debug.rb +61 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/delphi.rb +150 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/diff.rb +104 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/html.rb +177 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/java/builtin_types.rb +419 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/java.rb +179 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/java_script.rb +187 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/json.rb +106 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/nitro_xhtml.rb +134 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/plaintext.rb +18 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/rhtml.rb +73 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/ruby/patterns.rb +226 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/ruby.rb +381 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/scheme.rb +142 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/sql.Keith.rb +143 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/sql.rb +154 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/scanners/xml.rb +19 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/style.rb +20 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/styles/_map.rb +7 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/styles/cycnus.rb +146 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/styles/murphy.rb +132 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/token_classes.rb +82 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay/tokens.rb +387 -0
- data/vendor/gems/coderay-0.8.260/lib/coderay.rb +321 -0
- data/vendor/gems/coderay-0.8.260/lib/term/ansicolor.rb +220 -0
- data/vendor/plugins/acts_as_tree/README +26 -0
- data/vendor/plugins/{classic_pagination → acts_as_tree}/Rakefile +3 -3
- data/vendor/plugins/acts_as_tree/init.rb +1 -0
- data/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
- data/vendor/{actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml → plugins/acts_as_tree/test/abstract_unit.rb} +0 -0
- data/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
- data/vendor/{actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml → plugins/acts_as_tree/test/database.yml} +0 -0
- data/vendor/{actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml → plugins/acts_as_tree/test/fixtures/mixin.rb} +0 -0
- data/vendor/{actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml → plugins/acts_as_tree/test/fixtures/mixins.yml} +0 -0
- data/vendor/plugins/{rspec_on_rails/generators/rspec/templates/previous_failures.txt → acts_as_tree/test/schema.rb} +0 -0
- data/vendor/plugins/expiring_action_cache/lib/metafragment.rb +1 -1
- data/vendor/plugins/fckeditor/lib/fckeditor.rb +1 -1
- data/vendor/plugins/livesearch_sidebar/init.rb +4 -0
- data/vendor/plugins/livesearch_sidebar/lib/livesearch_sidebar.rb +5 -0
- data/vendor/plugins/livesearch_sidebar/views/content.rhtml +15 -0
- data/vendor/plugins/localization/bin/make_language.rb +78 -0
- data/vendor/plugins/localization/lib/localization.rb +14 -0
- data/vendor/plugins/rspec/.autotest +1 -0
- data/vendor/plugins/rspec/{CHANGES → History.txt} +215 -62
- data/vendor/plugins/rspec/{MIT-LICENSE → License.txt} +3 -1
- data/vendor/plugins/rspec/Manifest.txt +403 -0
- data/vendor/plugins/rspec/README.txt +39 -0
- data/vendor/plugins/rspec/Rakefile +39 -229
- data/vendor/plugins/rspec/TODO.txt +10 -0
- data/vendor/plugins/rspec/bin/autospec +4 -0
- data/vendor/plugins/rspec/bin/spec +1 -1
- data/vendor/plugins/rspec/examples/pure/autogenerated_docstrings_example.rb +4 -4
- data/vendor/plugins/rspec/examples/pure/partial_mock_example.rb +1 -0
- data/vendor/plugins/rspec/examples/pure/shared_example_group_example.rb +2 -2
- data/vendor/plugins/rspec/examples/pure/yielding_example.rb +33 -0
- data/vendor/plugins/rspec/examples/stories/calculator.rb +1 -1
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/everything.rb +1 -1
- data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story +17 -17
- data/vendor/plugins/rspec/lib/autotest/discover.rb +1 -1
- data/vendor/plugins/rspec/lib/autotest/rspec.rb +10 -38
- data/vendor/plugins/rspec/lib/spec/adapters/ruby_engine/mri.rb +8 -0
- data/vendor/plugins/rspec/lib/spec/adapters/ruby_engine/rubinius.rb +8 -0
- data/vendor/plugins/rspec/lib/spec/adapters/ruby_engine.rb +26 -0
- data/vendor/plugins/rspec/lib/spec/adapters.rb +1 -0
- data/vendor/plugins/rspec/lib/spec/example/before_and_after_hooks.rb +93 -0
- data/vendor/plugins/rspec/lib/spec/example/configuration.rb +40 -17
- data/vendor/plugins/rspec/lib/spec/example/errors.rb +23 -2
- data/vendor/plugins/rspec/lib/spec/example/example_group.rb +12 -3
- data/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb +41 -22
- data/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb +88 -144
- data/vendor/plugins/rspec/lib/spec/example/example_matcher.rb +2 -0
- data/vendor/plugins/rspec/lib/spec/example/example_methods.rb +19 -20
- data/vendor/plugins/rspec/lib/spec/example/shared_example_group.rb +6 -12
- data/vendor/plugins/rspec/lib/spec/example.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb +4 -12
- data/vendor/plugins/rspec/lib/spec/expectations/handler.rb +10 -10
- data/vendor/plugins/rspec/lib/spec/extensions/main.rb +3 -18
- data/vendor/plugins/rspec/lib/spec/extensions/metaclass.rb +7 -0
- data/vendor/plugins/rspec/lib/spec/extensions/object.rb +0 -4
- data/vendor/plugins/rspec/lib/spec/extensions.rb +1 -0
- data/vendor/plugins/rspec/lib/spec/interop/test/unit/testcase.rb +12 -2
- data/vendor/plugins/rspec/lib/spec/matchers/be.rb +18 -21
- data/vendor/plugins/rspec/lib/spec/matchers/be_close.rb +5 -5
- data/vendor/plugins/rspec/lib/spec/matchers/change.rb +45 -41
- data/vendor/plugins/rspec/lib/spec/matchers/eql.rb +6 -6
- data/vendor/plugins/rspec/lib/spec/matchers/equal.rb +6 -6
- data/vendor/plugins/rspec/lib/spec/matchers/exist.rb +10 -5
- data/vendor/plugins/rspec/lib/spec/matchers/has.rb +2 -12
- data/vendor/plugins/rspec/lib/spec/matchers/have.rb +25 -20
- data/vendor/plugins/rspec/lib/spec/matchers/include.rb +12 -5
- data/vendor/plugins/rspec/lib/spec/matchers/match.rb +9 -9
- data/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb +25 -19
- data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +60 -37
- data/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb +5 -4
- data/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb +5 -5
- data/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb +115 -12
- data/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb +3 -3
- data/vendor/plugins/rspec/lib/spec/matchers.rb +8 -2
- data/vendor/plugins/rspec/lib/spec/mocks/argument_constraints.rb +165 -0
- data/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb +24 -158
- data/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/mocks/extensions.rb +1 -0
- data/vendor/plugins/rspec/lib/spec/mocks/framework.rb +15 -0
- data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +74 -10
- data/vendor/plugins/rspec/lib/spec/mocks/methods.rb +15 -3
- data/vendor/plugins/rspec/lib/spec/mocks/mock.rb +13 -7
- data/vendor/plugins/rspec/lib/spec/mocks/proxy.rb +71 -17
- data/vendor/plugins/rspec/lib/spec/mocks/spec_methods.rb +9 -1
- data/vendor/plugins/rspec/lib/spec/mocks.rb +1 -12
- data/vendor/plugins/rspec/lib/spec/rake/spectask.rb +19 -27
- data/vendor/plugins/rspec/lib/spec/rake/verify_rcov.rb +3 -3
- data/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +7 -8
- data/vendor/plugins/rspec/lib/spec/runner/command_line.rb +6 -17
- data/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +4 -3
- data/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +5 -9
- data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb +4 -8
- data/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +18 -14
- data/vendor/plugins/rspec/lib/spec/runner/formatter/nested_text_formatter.rb +65 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb +4 -0
- data/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +6 -2
- data/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +62 -16
- data/vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +81 -18
- data/vendor/plugins/rspec/lib/spec/runner/formatter/story/progress_bar_formatter.rb +42 -0
- data/vendor/plugins/rspec/lib/spec/runner/heckle_runner.rb +2 -2
- data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +49 -45
- data/vendor/plugins/rspec/lib/spec/runner/options.rb +54 -20
- data/vendor/plugins/rspec/lib/spec/runner/reporter.rb +36 -12
- data/vendor/plugins/rspec/lib/spec/runner/spec_parser.rb +1 -1
- data/vendor/plugins/rspec/lib/spec/runner.rb +17 -6
- data/vendor/plugins/rspec/lib/spec/story/extensions/regexp.rb +2 -2
- data/vendor/plugins/rspec/lib/spec/story/extensions/string.rb +2 -2
- data/vendor/plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb +2 -2
- data/vendor/plugins/rspec/lib/spec/story/runner/scenario_runner.rb +8 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb +15 -1
- data/vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb +20 -0
- data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +3 -1
- data/vendor/plugins/rspec/lib/spec/story/runner.rb +8 -5
- data/vendor/plugins/rspec/lib/spec/story/step.rb +43 -31
- data/vendor/plugins/rspec/lib/spec/story/step_mother.rb +2 -1
- data/vendor/plugins/rspec/lib/spec/story/story.rb +8 -11
- data/vendor/plugins/rspec/lib/spec/story/world.rb +6 -3
- data/vendor/plugins/rspec/lib/spec/version.rb +13 -22
- data/vendor/plugins/rspec/lib/spec.rb +15 -13
- data/vendor/plugins/rspec/plugins/mock_frameworks/rspec.rb +2 -0
- data/vendor/plugins/rspec/rake_tasks/failing_examples_with_html.rake +1 -1
- data/vendor/plugins/rspec/rake_tasks/verify_rcov.rake +2 -2
- data/vendor/plugins/rspec/rspec.gemspec +22 -0
- data/vendor/plugins/rspec/spec/{autotest_helper.rb → autotest/autotest_helper.rb} +2 -2
- data/vendor/plugins/rspec/spec/{autotest_matchers.rb → autotest/autotest_matchers.rb} +0 -0
- data/vendor/plugins/rspec/spec/autotest/discover_spec.rb +1 -1
- data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +94 -139
- data/vendor/plugins/rspec/spec/rspec_suite.rb +0 -1
- data/vendor/plugins/rspec/spec/spec/adapters/ruby_engine_spec.rb +16 -0
- data/vendor/plugins/rspec/spec/spec/example/configuration_spec.rb +229 -215
- data/vendor/plugins/rspec/spec/spec/example/example_group_class_definition_spec.rb +9 -9
- data/vendor/plugins/rspec/spec/spec/example/example_group_factory_spec.rb +137 -101
- data/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb +456 -361
- data/vendor/plugins/rspec/spec/spec/example/example_group_spec.rb +460 -488
- data/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb +117 -52
- data/vendor/plugins/rspec/spec/spec/example/nested_example_group_spec.rb +12 -0
- data/vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb +114 -0
- data/vendor/plugins/rspec/spec/spec/example/shared_example_group_spec.rb +219 -203
- data/vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb +27 -9
- data/vendor/plugins/rspec/spec/spec/expectations/extensions/object_spec.rb +0 -12
- data/vendor/plugins/rspec/spec/spec/extensions/main_spec.rb +23 -28
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/resources/spec_with_options_hash.rb +13 -0
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/spec_spec.rb +15 -8
- data/vendor/plugins/rspec/spec/spec/interop/test/unit/testcase_spec.rb +4 -0
- data/vendor/plugins/rspec/spec/spec/matchers/be_spec.rb +24 -0
- data/vendor/plugins/rspec/spec/spec/matchers/change_spec.rb +16 -6
- data/vendor/plugins/rspec/spec/spec/matchers/handler_spec.rb +58 -37
- data/vendor/plugins/rspec/spec/spec/matchers/has_spec.rb +26 -0
- data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +105 -2
- data/vendor/plugins/rspec/spec/spec/matchers/include_spec.rb +19 -0
- data/vendor/plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +35 -2
- data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +124 -0
- data/vendor/plugins/rspec/spec/spec/matchers/respond_to_spec.rb +6 -6
- data/vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +64 -2
- data/vendor/plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb +7 -0
- data/vendor/plugins/rspec/spec/spec/mocks/{bug_report_10263.rb → bug_report_10263_spec.rb} +0 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +2 -0
- data/vendor/plugins/rspec/spec/spec/mocks/bug_report_496.rb +17 -0
- data/vendor/plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +10 -30
- data/vendor/plugins/rspec/spec/spec/mocks/hash_including_matcher_spec.rb +53 -0
- data/vendor/plugins/rspec/spec/spec/mocks/mock_spec.rb +123 -43
- data/vendor/plugins/rspec/spec/spec/mocks/nil_expectation_warning_spec.rb +53 -0
- data/vendor/plugins/rspec/spec/spec/mocks/null_object_mock_spec.rb +14 -0
- data/vendor/plugins/rspec/spec/spec/mocks/options_hash_spec.rb +18 -28
- data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +50 -7
- data/vendor/plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +26 -50
- data/vendor/plugins/rspec/spec/spec/mocks/stub_spec.rb +7 -0
- data/vendor/plugins/rspec/spec/spec/package/bin_spec_spec.rb +8 -0
- data/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb +102 -108
- data/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +11 -6
- data/vendor/plugins/rspec/spec/spec/runner/formatter/base_formatter_spec.rb +112 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +3 -2
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +30 -25
- data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +1 -6
- data/vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb +318 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +30 -2
- data/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +4 -4
- data/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb +133 -100
- data/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +76 -2
- data/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +266 -1
- data/vendor/plugins/rspec/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb +82 -0
- data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +33 -28
- data/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb +8 -8
- data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +104 -61
- data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +103 -17
- data/vendor/plugins/rspec/spec/spec/runner/output_one_time_fixture_runner.rb +1 -1
- data/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +6 -0
- data/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb +59 -10
- data/vendor/plugins/rspec/spec/spec/runner/spec_drb.opts +1 -0
- data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +10 -4
- data/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb +15 -17
- data/vendor/plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +124 -52
- data/vendor/plugins/rspec/spec/spec/story/runner/story_mediator_spec.rb +12 -2
- data/vendor/plugins/rspec/spec/spec/story/runner/story_parser_spec.rb +23 -6
- data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +43 -5
- data/vendor/plugins/rspec/spec/spec/story/runner_spec.rb +59 -72
- data/vendor/plugins/rspec/spec/spec/story/scenario_spec.rb +1 -3
- data/vendor/plugins/rspec/spec/spec/story/step_mother_spec.rb +12 -0
- data/vendor/plugins/rspec/spec/spec/story/step_spec.rb +76 -4
- data/vendor/plugins/rspec/spec/spec/story/story_spec.rb +3 -5
- data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +8 -8
- data/vendor/plugins/rspec/spec/spec_helper.rb +40 -66
- data/vendor/plugins/rspec/stories/all.rb +1 -1
- data/vendor/plugins/rspec/stories/configuration/before_blocks.story +21 -0
- data/vendor/plugins/rspec/stories/configuration/stories.rb +7 -0
- data/vendor/plugins/rspec/stories/mock_framework_integration/stories.rb +7 -0
- data/vendor/plugins/rspec/stories/mock_framework_integration/use_flexmock.story +9 -0
- data/vendor/plugins/rspec/stories/resources/spec/before_blocks_example.rb +32 -0
- data/vendor/plugins/rspec/stories/resources/spec/spec_with_flexmock.rb +18 -0
- data/vendor/plugins/rspec/stories/stories/multiline_steps.story +23 -0
- data/vendor/plugins/rspec/stories/stories/steps/multiline_steps.rb +13 -0
- data/vendor/plugins/rspec/stories/stories/stories.rb +6 -0
- data/vendor/plugins/rspec-rails/History.txt +93 -0
- data/vendor/plugins/{rspec_on_rails/MIT-LICENSE → rspec-rails/License.txt} +7 -5
- data/vendor/plugins/rspec-rails/Manifest.txt +161 -0
- data/vendor/plugins/rspec-rails/README.txt +46 -0
- data/vendor/plugins/rspec-rails/Rakefile +39 -0
- data/vendor/plugins/rspec-rails/UPGRADE +7 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/CHANGES +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/rspec_generator.rb +9 -4
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/all_stories.rb +0 -0
- data/vendor/plugins/{rspec_on_rails/spec_resources/views/controller_spec/_partial.rhtml → rspec-rails/generators/rspec/templates/previous_failures.txt} +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/rcov.opts +0 -0
- data/vendor/plugins/{rspec_on_rails/tasks → rspec-rails/generators/rspec/templates}/rspec.rake +6 -11
- data/vendor/plugins/rspec-rails/generators/rspec/templates/script/autospec +5 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/script/spec +1 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/script/spec_server +18 -4
- data/vendor/plugins/rspec-rails/generators/rspec/templates/spec.opts +4 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/spec_helper.rb +8 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/stories_helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_controller/USAGE +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_controller/rspec_controller_generator.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_controller/templates/controller_spec.rb +1 -1
- data/vendor/plugins/rspec-rails/generators/rspec_controller/templates/helper_spec.rb +11 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_controller/templates/view_spec.rb +2 -2
- data/vendor/plugins/rspec-rails/generators/rspec_default_values.rb +19 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_model/USAGE +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_model/rspec_model_generator.rb +7 -2
- data/vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb +15 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_scaffold/rspec_scaffold_generator.rb +2 -15
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/controller_spec.rb +173 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_scaffold/templates/edit_erb_spec.rb +8 -7
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/helper_spec.rb +11 -0
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/index_erb_spec.rb +27 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_scaffold/templates/new_erb_spec.rb +7 -7
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_scaffold/templates/routing_spec.rb +15 -17
- data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/show_erb_spec.rb +23 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/init.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/autotest/discover.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/autotest/rails_rspec.rb +1 -6
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/assigns_hash_proxy.rb +40 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/example/controller_example_group.rb +56 -55
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/cookies_proxy.rb +25 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/example/functional_example_group.rb +31 -10
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/helper_example_group.rb +170 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/example/model_example_group.rb +0 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/rails_example_group.rb +33 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/example/render_observer.rb +93 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/example/view_example_group.rb +18 -6
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/example.rb +1 -1
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_controller/base.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_controller/rescue.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_controller/test_response.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_view/base.rb +8 -4
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/active_record/base.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/object.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/spec/example/configuration.rb +6 -1
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/spec/matchers/have.rb +2 -2
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions.rb +0 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/interop/testcase.rb +14 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/matchers/assert_select.rb +1 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/matchers/change.rb +11 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/matchers/have_text.rb +4 -2
- data/vendor/plugins/rspec-rails/lib/spec/rails/matchers/include_text.rb +54 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/matchers/redirect_to.rb +1 -1
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/matchers/render_template.rb +26 -6
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/matchers.rb +2 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails/mocks.rb +132 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/story_adapter.rb +11 -3
- data/vendor/plugins/rspec-rails/lib/spec/rails/version.rb +15 -0
- data/vendor/plugins/rspec-rails/lib/spec/rails.rb +15 -0
- data/vendor/plugins/rspec-rails/rspec-rails.gemspec +28 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/autotest/mappings_spec.rb +1 -1
- data/vendor/plugins/rspec-rails/spec/rails/example/assigns_hash_proxy_spec.rb +96 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/configuration_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/controller_isolation_spec.rb +20 -1
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/controller_spec_spec.rb +119 -27
- data/vendor/plugins/rspec-rails/spec/rails/example/cookies_proxy_spec.rb +74 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/example_group_factory_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/helper_spec_spec.rb +60 -4
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/model_spec_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/shared_behaviour_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/test_unit_assertion_accessibility_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/view_spec_spec.rb +75 -51
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/extensions/action_controller_rescue_action_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/extensions/action_view_base_spec.rb +10 -10
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/extensions/active_record_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/interop/testcase_spec.rb +66 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/assert_select_spec.rb +34 -3
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/description_generation_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/matchers/errors_on_spec.rb +25 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/have_text_spec.rb +0 -0
- data/vendor/plugins/rspec-rails/spec/rails/matchers/include_text_spec.rb +64 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/redirect_to_spec.rb +7 -1
- data/vendor/plugins/{rspec_on_rails/spec/rails/matchers/render_spec.rb → rspec-rails/spec/rails/matchers/render_template_spec.rb} +21 -14
- data/vendor/plugins/rspec-rails/spec/rails/matchers/should_change_spec.rb +15 -0
- data/vendor/plugins/rspec-rails/spec/rails/mocks/ar_classes.rb +10 -0
- data/vendor/plugins/rspec-rails/spec/rails/mocks/mock_model_spec.rb +106 -0
- data/vendor/plugins/rspec-rails/spec/rails/mocks/stub_model_spec.rb +80 -0
- data/vendor/plugins/rspec-rails/spec/rails/sample_modified_fixture.rb +8 -0
- data/vendor/plugins/rspec-rails/spec/rails/sample_spec.rb +8 -0
- data/vendor/plugins/rspec-rails/spec/rails/spec_server_spec.rb +96 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/spec_spec.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails_suite.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/spec_helper.rb +13 -1
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/action_view_base_spec_controller.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/controller_spec_controller.rb +46 -3
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/redirect_spec_controller.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/render_spec_controller.rb +4 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/rjs_spec_controller.rb +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/helpers/addition_helper.rb +5 -0
- data/vendor/plugins/rspec-rails/spec_resources/helpers/explicit_helper.rb +38 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/helpers/more_explicit_helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/helpers/plugin_application_helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/helpers/view_spec_helper.rb +0 -0
- data/vendor/plugins/{rspec_on_rails/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml → rspec-rails/spec_resources/views/controller_spec/_partial.rhtml} +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails/spec_resources/views/render_spec/_a_partial.rhtml → rspec-rails/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml} +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_with_errors_in_template.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_with_template.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails/spec_resources/views/render_spec/some_action.rhtml → rspec-rails/spec_resources/views/layouts/application.rhtml} +0 -0
- data/vendor/plugins/{rspec_on_rails/spec_resources/views/view_spec/_partial_used_twice.rhtml → rspec-rails/spec_resources/views/layouts/simple.rhtml} +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/views/objects/_object.html.erb +1 -0
- data/vendor/plugins/rspec-rails/spec_resources/views/render_spec/_a_partial.rhtml +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/views/render_spec/action_with_alternate_layout.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/some_action.js.rjs +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/views/render_spec/some_action.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/some_action.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/_replacement_partial.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/hide_div.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/hide_page_element.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/insert_html.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/replace.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/replace_html.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/replace_html_with_partial.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/visual_effect.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/visual_toggle_effect.rjs +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/tag_spec/no_tags.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial.rhtml +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/views/view_spec/_partial_used_twice.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial_with_local_variable.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial_with_sub_partial.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_spacer.rhtml +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/views/view_spec/accessor.rhtml +5 -0
- data/vendor/plugins/rspec-rails/spec_resources/views/view_spec/block_helper.rhtml +3 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/entry_form.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/explicit_helper.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/foo/show.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/implicit_helper.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/multiple_helpers.rhtml +0 -0
- data/vendor/plugins/rspec-rails/spec_resources/views/view_spec/should_not_receive.rhtml +3 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/template_with_partial.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/template_with_partial_using_collection.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/template_with_partial_with_array.rhtml +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/all.rb +0 -0
- data/vendor/plugins/rspec-rails/stories/configuration/stories.rb +5 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/helper.rb +1 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/steps/people.rb +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/transactions_should_rollback +0 -0
- data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/transactions_should_rollback.rb +0 -0
- data/vendor/plugins/typo_textfilter_code/lib/typo_textfilter_code.rb +25 -20
- data/vendor/plugins/typo_textfilter_flickr/lib/typo_textfilter_flickr.rb +1 -1
- data/vendor/plugins/typo_textfilter_lightbox/lib/typo_textfilter_lightbox.rb +1 -1
- data/vendor/plugins/will_paginate/.manifest +49 -0
- data/vendor/plugins/will_paginate/CHANGELOG.rdoc +110 -0
- data/vendor/plugins/will_paginate/LICENSE +18 -0
- data/vendor/plugins/will_paginate/README.rdoc +107 -0
- data/vendor/plugins/will_paginate/Rakefile +62 -0
- data/vendor/plugins/will_paginate/examples/apple-circle.gif +0 -0
- data/vendor/plugins/will_paginate/examples/index.haml +69 -0
- data/vendor/plugins/will_paginate/examples/index.html +92 -0
- data/vendor/plugins/will_paginate/examples/pagination.css +90 -0
- data/vendor/plugins/will_paginate/examples/pagination.sass +91 -0
- data/vendor/plugins/will_paginate/init.rb +1 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/array.rb +16 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +146 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +32 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +260 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb +170 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb +37 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/version.rb +9 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +383 -0
- data/vendor/plugins/will_paginate/lib/will_paginate.rb +82 -0
- data/vendor/plugins/will_paginate/test/boot.rb +21 -0
- data/vendor/plugins/will_paginate/test/collection_test.rb +143 -0
- data/vendor/plugins/will_paginate/test/console +8 -0
- data/vendor/plugins/will_paginate/test/database.yml +22 -0
- data/vendor/plugins/will_paginate/test/finder_test.rb +476 -0
- data/vendor/plugins/will_paginate/test/fixtures/admin.rb +3 -0
- data/vendor/plugins/will_paginate/test/fixtures/developer.rb +14 -0
- data/vendor/plugins/{classic_pagination → will_paginate}/test/fixtures/developers_projects.yml +0 -0
- data/vendor/plugins/will_paginate/test/fixtures/project.rb +15 -0
- data/vendor/plugins/{classic_pagination → will_paginate}/test/fixtures/projects.yml +3 -4
- data/vendor/plugins/will_paginate/test/fixtures/replies.yml +29 -0
- data/vendor/plugins/{classic_pagination → will_paginate}/test/fixtures/reply.rb +2 -0
- data/vendor/plugins/will_paginate/test/fixtures/schema.rb +38 -0
- data/vendor/plugins/will_paginate/test/fixtures/topic.rb +10 -0
- data/vendor/plugins/{classic_pagination → will_paginate}/test/fixtures/topics.yml +9 -1
- data/vendor/plugins/will_paginate/test/fixtures/user.rb +2 -0
- data/vendor/plugins/{classic_pagination/test/fixtures/developers.yml → will_paginate/test/fixtures/users.yml} +15 -1
- data/vendor/plugins/will_paginate/test/helper.rb +37 -0
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb +36 -0
- data/vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb +73 -0
- data/vendor/plugins/will_paginate/test/lib/load_fixtures.rb +11 -0
- data/vendor/plugins/will_paginate/test/lib/view_test_process.rb +165 -0
- data/vendor/plugins/will_paginate/test/tasks.rake +59 -0
- data/vendor/plugins/will_paginate/test/view_test.rb +363 -0
- data/vendor/plugins/will_paginate/will_paginate.gemspec +22 -0
- data/vendor/plugins/xml_sidebar/views/content.rhtml +3 -3
- metadata +614 -542
- data/CHANGES-5.1.3 +0 -21
- data/app/controllers/admin/comments_controller.rb +0 -57
- data/app/controllers/admin/trackbacks_controller.rb +0 -45
- data/app/views/accounts/logout.html.erb +0 -12
- data/app/views/accounts/welcome.html.erb +0 -13
- data/app/views/admin/categories/_quick_post.html.erb +0 -11
- data/app/views/admin/categories/edit.html.erb +0 -11
- data/app/views/admin/comments/destroy.html.erb +0 -11
- data/app/views/admin/comments/edit.html.erb +0 -14
- data/app/views/admin/comments/index.html.erb +0 -30
- data/app/views/admin/comments/show.html.erb +0 -28
- data/app/views/admin/content/_articles.html.erb +0 -47
- data/app/views/admin/content/_pages.html.erb +0 -3
- data/app/views/admin/content/edit.html.erb +0 -3
- data/app/views/admin/pages/_quick_post.html.erb +0 -21
- data/app/views/admin/settings/podcast.html.erb +0 -44
- data/app/views/admin/settings/spam.html.erb +0 -42
- data/app/views/admin/textfilters/_form.html.erb +0 -60
- data/app/views/admin/textfilters/_macros.html.erb +0 -16
- data/app/views/admin/textfilters/_textfilters.html.erb +0 -20
- data/app/views/admin/textfilters/destroy.html.erb +0 -10
- data/app/views/admin/textfilters/edit.html.erb +0 -14
- data/app/views/admin/textfilters/index.html.erb +0 -12
- data/app/views/admin/textfilters/macro_help.html.erb +0 -3
- data/app/views/admin/textfilters/new.html.erb +0 -12
- data/app/views/admin/textfilters/preview.html.erb +0 -3
- data/app/views/admin/textfilters/show.html.erb +0 -29
- data/app/views/admin/textfilters/show_help.html.erb +0 -4
- data/app/views/admin/trackbacks/_form.html.erb +0 -19
- data/app/views/admin/trackbacks/destroy.html.erb +0 -6
- data/app/views/admin/trackbacks/edit.html.erb +0 -11
- data/app/views/admin/trackbacks/index.html.erb +0 -22
- data/app/views/admin/trackbacks/show.html.erb +0 -14
- data/app/views/admin/users/_user.html.erb +0 -20
- data/doc/typo-4.0-release-notes.txt +0 -135
- data/public/images/admin/arrow_comment_group.gif +0 -0
- data/public/images/admin/bc-bg.gif +0 -0
- data/public/images/admin/bgdivider.png +0 -0
- data/public/images/admin/bgoff.png +0 -0
- data/public/images/admin/bgover.png +0 -0
- data/public/images/admin/bgselected.png +0 -0
- data/public/images/admin/cancel.png +0 -0
- data/public/images/admin/checked.png +0 -0
- data/public/images/admin/delete.png +0 -0
- data/public/images/admin/edit.png +0 -0
- data/public/images/admin/help.png +0 -0
- data/public/images/admin/loginformbg.png +0 -0
- data/public/images/admin/show.png +0 -0
- data/public/images/admin/table-header-first.png +0 -0
- data/public/stylesheets/typo_code.css +0 -62
- data/spec/controllers/admin/comments_controller_spec.rb +0 -74
- data/spec/controllers/admin/trackbacks_controller_spec.rb +0 -57
- data/spec/helpers/admin_base_helper_spec.rb +0 -13
- data/themes/dirtylicious/views/shared/_search.html.erb +0 -16
- data/themes/scribbish/views/shared/_search.html.erb +0 -16
- data/themes/standard_issue/views/shared/_search.html.erb +0 -17
- data/themes/typographic/views/shared/_search.html.erb +0 -17
- data/vendor/plugins/classic_pagination/CHANGELOG +0 -152
- data/vendor/plugins/classic_pagination/README +0 -18
- data/vendor/plugins/classic_pagination/init.rb +0 -33
- data/vendor/plugins/classic_pagination/install.rb +0 -1
- data/vendor/plugins/classic_pagination/lib/pagination.rb +0 -405
- data/vendor/plugins/classic_pagination/lib/pagination_helper.rb +0 -135
- data/vendor/plugins/classic_pagination/test/fixtures/companies.yml +0 -24
- data/vendor/plugins/classic_pagination/test/fixtures/company.rb +0 -9
- data/vendor/plugins/classic_pagination/test/fixtures/developer.rb +0 -7
- data/vendor/plugins/classic_pagination/test/fixtures/project.rb +0 -3
- data/vendor/plugins/classic_pagination/test/fixtures/replies.yml +0 -13
- data/vendor/plugins/classic_pagination/test/fixtures/schema.sql +0 -42
- data/vendor/plugins/classic_pagination/test/fixtures/topic.rb +0 -3
- data/vendor/plugins/classic_pagination/test/helper.rb +0 -117
- data/vendor/plugins/classic_pagination/test/pagination_helper_test.rb +0 -38
- data/vendor/plugins/classic_pagination/test/pagination_test.rb +0 -177
- data/vendor/plugins/rspec/README +0 -71
- data/vendor/plugins/rspec/TODO +0 -2
- data/vendor/plugins/rspec/UPGRADE +0 -31
- data/vendor/plugins/rspec/autotest/discover.rb +0 -6
- data/vendor/plugins/rspec/autotest/rspec.rb +0 -1
- data/vendor/plugins/rspec/bin/spec_translator +0 -8
- data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +0 -27
- data/vendor/plugins/rspec/lib/spec/translator.rb +0 -114
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/core.rb +0 -50
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +0 -54
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +0 -111
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +0 -313
- data/vendor/plugins/rspec/pre_commit/lib/pre_commit.rb +0 -4
- data/vendor/plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +0 -15
- data/vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +0 -36
- data/vendor/plugins/rspec/pre_commit/spec/spec_helper.rb +0 -3
- data/vendor/plugins/rspec/pre_commit/spec/spec_suite.rb +0 -11
- data/vendor/plugins/rspec/report.html +0 -4358
- data/vendor/plugins/rspec/spec/spec/example/example_spec.rb +0 -53
- data/vendor/plugins/rspec/spec/spec/runner/execution_context_spec.rb +0 -31
- data/vendor/plugins/rspec/spec/spec/translator_spec.rb +0 -265
- data/vendor/plugins/rspec_on_rails/README +0 -3
- data/vendor/plugins/rspec_on_rails/Rakefile +0 -9
- data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec.opts +0 -6
- data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/generators/rspec_model/templates/model_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +0 -313
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +0 -11
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +0 -22
- data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +0 -22
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/assigns_hash_proxy.rb +0 -42
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +0 -82
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/ivar_proxy.rb +0 -62
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +0 -68
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +0 -90
- data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +0 -23
- data/vendor/plugins/rspec_on_rails/lib/spec/rails.rb +0 -51
- data/vendor/plugins/rspec_on_rails/spec/rails/autotest/rails_rspec_spec.rb +0 -8
- data/vendor/plugins/rspec_on_rails/spec/rails/example/assigns_hash_proxy_spec.rb +0 -55
- data/vendor/plugins/rspec_on_rails/spec/rails/example/ivar_proxy_spec.rb +0 -64
- data/vendor/plugins/rspec_on_rails/spec/rails/matchers/errors_on_spec.rb +0 -13
- data/vendor/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +0 -65
- data/vendor/plugins/rspec_on_rails/spec/rails/sample_spec.rb +0 -7
- data/vendor/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb +0 -89
- data/vendor/plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +0 -10
- data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/accessor.rhtml +0 -3
- data/vendor/syntax/LICENSE +0 -27
- data/vendor/syntax/NEWS +0 -16
- data/vendor/syntax/README +0 -38
- data/vendor/syntax/Rakefile +0 -194
- data/vendor/syntax/api/classes/Syntax/Convertors/Abstract.html +0 -159
- data/vendor/syntax/api/classes/Syntax/Convertors/HTML.html +0 -149
- data/vendor/syntax/api/classes/Syntax/Convertors.html +0 -91
- data/vendor/syntax/api/classes/Syntax/Default.html +0 -123
- data/vendor/syntax/api/classes/Syntax/Ruby.html +0 -319
- data/vendor/syntax/api/classes/Syntax/Token.html +0 -151
- data/vendor/syntax/api/classes/Syntax/Tokenizer.html +0 -324
- data/vendor/syntax/api/classes/Syntax/Version.html +0 -109
- data/vendor/syntax/api/classes/Syntax/XML.html +0 -205
- data/vendor/syntax/api/classes/Syntax/YAML.html +0 -189
- data/vendor/syntax/api/classes/Syntax.html +0 -173
- data/vendor/syntax/api/created.rid +0 -1
- data/vendor/syntax/api/files/README.html +0 -155
- data/vendor/syntax/api/files/lib/syntax/common_rb.html +0 -96
- data/vendor/syntax/api/files/lib/syntax/convertors/abstract_rb.html +0 -96
- data/vendor/syntax/api/files/lib/syntax/convertors/html_rb.html +0 -96
- data/vendor/syntax/api/files/lib/syntax/lang/ruby_rb.html +0 -96
- data/vendor/syntax/api/files/lib/syntax/lang/xml_rb.html +0 -96
- data/vendor/syntax/api/files/lib/syntax/lang/yaml_rb.html +0 -96
- data/vendor/syntax/api/files/lib/syntax/version_rb.html +0 -92
- data/vendor/syntax/api/files/lib/syntax_rb.html +0 -96
- data/vendor/syntax/api/fr_class_index.html +0 -56
- data/vendor/syntax/api/fr_file_index.html +0 -54
- data/vendor/syntax/api/fr_method_index.html +0 -65
- data/vendor/syntax/api/index.html +0 -26
- data/vendor/syntax/api/rdoc-style.css +0 -175
- data/vendor/syntax/doc/manual/chapter.erb +0 -38
- data/vendor/syntax/doc/manual/example.erb +0 -18
- data/vendor/syntax/doc/manual/index.erb +0 -29
- data/vendor/syntax/doc/manual/manual.rb +0 -311
- data/vendor/syntax/doc/manual/manual.yml +0 -43
- data/vendor/syntax/doc/manual/page.erb +0 -87
- data/vendor/syntax/doc/manual/parts/0000.txt +0 -5
- data/vendor/syntax/doc/manual/parts/0001.txt +0 -16
- data/vendor/syntax/doc/manual/parts/0002.txt +0 -24
- data/vendor/syntax/doc/manual/parts/0003.txt +0 -6
- data/vendor/syntax/doc/manual/parts/0004.txt +0 -32
- data/vendor/syntax/doc/manual/parts/0005.txt +0 -18
- data/vendor/syntax/doc/manual/parts/0006.txt +0 -62
- data/vendor/syntax/doc/manual/parts/0007.txt +0 -3
- data/vendor/syntax/doc/manual/parts/0008.txt +0 -5
- data/vendor/syntax/doc/manual/parts/0009.txt +0 -29
- data/vendor/syntax/doc/manual/parts/0010.txt +0 -21
- data/vendor/syntax/doc/manual/stylesheets/manual.css +0 -270
- data/vendor/syntax/doc/manual/stylesheets/ruby.css +0 -17
- data/vendor/syntax/doc/manual/tutorial.erb +0 -30
- data/vendor/syntax/doc/manual-html/chapter-1.html +0 -198
- data/vendor/syntax/doc/manual-html/chapter-2.html +0 -262
- data/vendor/syntax/doc/manual-html/chapter-3.html +0 -266
- data/vendor/syntax/doc/manual-html/chapter-4.html +0 -267
- data/vendor/syntax/doc/manual-html/index.html +0 -152
- data/vendor/syntax/doc/manual-html/stylesheets/manual.css +0 -270
- data/vendor/syntax/doc/manual-html/stylesheets/ruby.css +0 -17
- data/vendor/syntax/lib/syntax/common.rb +0 -163
- data/vendor/syntax/lib/syntax/convertors/abstract.rb +0 -27
- data/vendor/syntax/lib/syntax/convertors/html.rb +0 -51
- data/vendor/syntax/lib/syntax/lang/ruby.rb +0 -317
- data/vendor/syntax/lib/syntax/lang/xml.rb +0 -108
- data/vendor/syntax/lib/syntax/lang/yaml.rb +0 -105
- data/vendor/syntax/lib/syntax/version.rb +0 -9
- data/vendor/syntax/lib/syntax.rb +0 -38
- data/vendor/syntax/setup.rb +0 -1331
- data/vendor/syntax/syntax.gemspec +0 -24
- data/vendor/syntax/test/ALL-TESTS.rb +0 -5
- data/vendor/syntax/test/syntax/tc_ruby.rb +0 -871
- data/vendor/syntax/test/syntax/tc_xml.rb +0 -202
- data/vendor/syntax/test/syntax/tc_yaml.rb +0 -228
- data/vendor/syntax/test/syntax/tokenizer_testcase.rb +0 -40
- data/vendor/syntax/test/tc_syntax.rb +0 -22
@@ -0,0 +1,321 @@
|
|
1
|
+
# = CodeRay Library
|
2
|
+
#
|
3
|
+
# $Id: coderay.rb 260 2008-10-08 20:18:31Z murphy $
|
4
|
+
#
|
5
|
+
# CodeRay is a Ruby library for syntax highlighting.
|
6
|
+
#
|
7
|
+
# I try to make CodeRay easy to use and intuitive, but at the same time fully featured, complete,
|
8
|
+
# fast and efficient.
|
9
|
+
#
|
10
|
+
# See README.
|
11
|
+
#
|
12
|
+
# It consists mainly of
|
13
|
+
# * the main engine: CodeRay (Scanners::Scanner, Tokens/TokenStream, Encoders::Encoder), PluginHost
|
14
|
+
# * the scanners in CodeRay::Scanners
|
15
|
+
# * the encoders in CodeRay::Encoders
|
16
|
+
#
|
17
|
+
# Here's a fancy graphic to light up this gray docu:
|
18
|
+
#
|
19
|
+
# http://rd.cYcnus.de/coderay/scheme.png
|
20
|
+
#
|
21
|
+
# == Documentation
|
22
|
+
#
|
23
|
+
# See CodeRay, Encoders, Scanners, Tokens.
|
24
|
+
#
|
25
|
+
# == Usage
|
26
|
+
#
|
27
|
+
# Remember you need RubyGems to use CodeRay, unless you have it in your load path. Run Ruby with
|
28
|
+
# -rubygems option if required.
|
29
|
+
#
|
30
|
+
# === Highlight Ruby code in a string as html
|
31
|
+
#
|
32
|
+
# require 'coderay'
|
33
|
+
# print CodeRay.scan('puts "Hello, world!"', :ruby).html
|
34
|
+
#
|
35
|
+
# # prints something like this:
|
36
|
+
# puts <span class="s">"Hello, world!"</span>
|
37
|
+
#
|
38
|
+
#
|
39
|
+
# === Highlight C code from a file in a html div
|
40
|
+
#
|
41
|
+
# require 'coderay'
|
42
|
+
# print CodeRay.scan(File.read('ruby.h'), :c).div
|
43
|
+
# print CodeRay.scan_file('ruby.h').html.div
|
44
|
+
#
|
45
|
+
# You can include this div in your page. The used CSS styles can be printed with
|
46
|
+
#
|
47
|
+
# % coderay_stylesheet
|
48
|
+
#
|
49
|
+
# === Highlight without typing too much
|
50
|
+
#
|
51
|
+
# If you are one of the hasty (or lazy, or extremely curious) people, just run this file:
|
52
|
+
#
|
53
|
+
# % ruby -rubygems /path/to/coderay/coderay.rb > example.html
|
54
|
+
#
|
55
|
+
# and look at the file it created in your browser.
|
56
|
+
#
|
57
|
+
# = CodeRay Module
|
58
|
+
#
|
59
|
+
# The CodeRay module provides convenience methods for the engine.
|
60
|
+
#
|
61
|
+
# * The +lang+ and +format+ arguments select Scanner and Encoder to use. These are
|
62
|
+
# simply lower-case symbols, like <tt>:python</tt> or <tt>:html</tt>.
|
63
|
+
# * All methods take an optional hash as last parameter, +options+, that is send to
|
64
|
+
# the Encoder / Scanner.
|
65
|
+
# * Input and language are always sorted in this order: +code+, +lang+.
|
66
|
+
# (This is in alphabetical order, if you need a mnemonic ;)
|
67
|
+
#
|
68
|
+
# You should be able to highlight everything you want just using these methods;
|
69
|
+
# so there is no need to dive into CodeRay's deep class hierarchy.
|
70
|
+
#
|
71
|
+
# The examples in the demo directory demonstrate common cases using this interface.
|
72
|
+
#
|
73
|
+
# = Basic Access Ways
|
74
|
+
#
|
75
|
+
# Read this to get a general view what CodeRay provides.
|
76
|
+
#
|
77
|
+
# == Scanning
|
78
|
+
#
|
79
|
+
# Scanning means analysing an input string, splitting it up into Tokens.
|
80
|
+
# Each Token knows about what type it is: string, comment, class name, etc.
|
81
|
+
#
|
82
|
+
# Each +lang+ (language) has its own Scanner; for example, <tt>:ruby</tt> code is
|
83
|
+
# handled by CodeRay::Scanners::Ruby.
|
84
|
+
#
|
85
|
+
# CodeRay.scan:: Scan a string in a given language into Tokens.
|
86
|
+
# This is the most common method to use.
|
87
|
+
# CodeRay.scan_file:: Scan a file and guess the language using FileType.
|
88
|
+
#
|
89
|
+
# The Tokens object you get from these methods can encode itself; see Tokens.
|
90
|
+
#
|
91
|
+
# == Encoding
|
92
|
+
#
|
93
|
+
# Encoding means compiling Tokens into an output. This can be colored HTML or
|
94
|
+
# LaTeX, a textual statistic or just the number of non-whitespace tokens.
|
95
|
+
#
|
96
|
+
# Each Encoder provides output in a specific +format+, so you select Encoders via
|
97
|
+
# formats like <tt>:html</tt> or <tt>:statistic</tt>.
|
98
|
+
#
|
99
|
+
# CodeRay.encode:: Scan and encode a string in a given language.
|
100
|
+
# CodeRay.encode_tokens:: Encode the given tokens.
|
101
|
+
# CodeRay.encode_file:: Scan a file, guess the language using FileType and encode it.
|
102
|
+
#
|
103
|
+
# == Streaming
|
104
|
+
#
|
105
|
+
# Streaming saves RAM by running Scanner and Encoder in some sort of
|
106
|
+
# pipe mode; see TokenStream.
|
107
|
+
#
|
108
|
+
# CodeRay.scan_stream:: Scan in stream mode.
|
109
|
+
#
|
110
|
+
# == All-in-One Encoding
|
111
|
+
#
|
112
|
+
# CodeRay.encode:: Highlight a string with a given input and output format.
|
113
|
+
#
|
114
|
+
# == Instanciating
|
115
|
+
#
|
116
|
+
# You can use an Encoder instance to highlight multiple inputs. This way, the setup
|
117
|
+
# for this Encoder must only be done once.
|
118
|
+
#
|
119
|
+
# CodeRay.encoder:: Create an Encoder instance with format and options.
|
120
|
+
# CodeRay.scanner:: Create an Scanner instance for lang, with '' as default code.
|
121
|
+
#
|
122
|
+
# To make use of CodeRay.scanner, use CodeRay::Scanner::code=.
|
123
|
+
#
|
124
|
+
# The scanning methods provide more flexibility; we recommend to use these.
|
125
|
+
#
|
126
|
+
# == Reusing Scanners and Encoders
|
127
|
+
#
|
128
|
+
# If you want to re-use scanners and encoders (because that is faster), see
|
129
|
+
# CodeRay::Duo for the most convenient (and recommended) interface.
|
130
|
+
module CodeRay
|
131
|
+
|
132
|
+
# Version: Major.Minor.Teeny[.Revision]
|
133
|
+
# Major: 0 for pre-release
|
134
|
+
# Minor: odd for beta, even for stable
|
135
|
+
# Teeny: development state
|
136
|
+
# Revision: Subversion Revision number (generated on rake)
|
137
|
+
VERSION = '0.8'
|
138
|
+
|
139
|
+
require 'coderay/tokens'
|
140
|
+
require 'coderay/scanner'
|
141
|
+
require 'coderay/encoder'
|
142
|
+
require 'coderay/duo'
|
143
|
+
require 'coderay/style'
|
144
|
+
|
145
|
+
|
146
|
+
class << self
|
147
|
+
|
148
|
+
# Scans the given +code+ (a String) with the Scanner for +lang+.
|
149
|
+
#
|
150
|
+
# This is a simple way to use CodeRay. Example:
|
151
|
+
# require 'coderay'
|
152
|
+
# page = CodeRay.scan("puts 'Hello, world!'", :ruby).html
|
153
|
+
#
|
154
|
+
# See also demo/demo_simple.
|
155
|
+
def scan code, lang, options = {}, &block
|
156
|
+
scanner = Scanners[lang].new code, options, &block
|
157
|
+
scanner.tokenize
|
158
|
+
end
|
159
|
+
|
160
|
+
# Scans +filename+ (a path to a code file) with the Scanner for +lang+.
|
161
|
+
#
|
162
|
+
# If +lang+ is :auto or omitted, the CodeRay::FileType module is used to
|
163
|
+
# determine it. If it cannot find out what type it is, it uses
|
164
|
+
# CodeRay::Scanners::Plaintext.
|
165
|
+
#
|
166
|
+
# Calls CodeRay.scan.
|
167
|
+
#
|
168
|
+
# Example:
|
169
|
+
# require 'coderay'
|
170
|
+
# page = CodeRay.scan_file('some_c_code.c').html
|
171
|
+
def scan_file filename, lang = :auto, options = {}, &block
|
172
|
+
file = IO.read filename
|
173
|
+
if lang == :auto
|
174
|
+
require 'coderay/helpers/file_type'
|
175
|
+
lang = FileType.fetch filename, :plaintext, true
|
176
|
+
end
|
177
|
+
scan file, lang, options = {}, &block
|
178
|
+
end
|
179
|
+
|
180
|
+
# Scan the +code+ (a string) with the scanner for +lang+.
|
181
|
+
#
|
182
|
+
# Calls scan.
|
183
|
+
#
|
184
|
+
# See CodeRay.scan.
|
185
|
+
def scan_stream code, lang, options = {}, &block
|
186
|
+
options[:stream] = true
|
187
|
+
scan code, lang, options, &block
|
188
|
+
end
|
189
|
+
|
190
|
+
# Encode a string in Streaming mode.
|
191
|
+
#
|
192
|
+
# This starts scanning +code+ with the the Scanner for +lang+
|
193
|
+
# while encodes the output with the Encoder for +format+.
|
194
|
+
# +options+ will be passed to the Encoder.
|
195
|
+
#
|
196
|
+
# See CodeRay::Encoder.encode_stream
|
197
|
+
def encode_stream code, lang, format, options = {}
|
198
|
+
encoder(format, options).encode_stream code, lang, options
|
199
|
+
end
|
200
|
+
|
201
|
+
# Encode a string.
|
202
|
+
#
|
203
|
+
# This scans +code+ with the the Scanner for +lang+ and then
|
204
|
+
# encodes it with the Encoder for +format+.
|
205
|
+
# +options+ will be passed to the Encoder.
|
206
|
+
#
|
207
|
+
# See CodeRay::Encoder.encode
|
208
|
+
def encode code, lang, format, options = {}
|
209
|
+
encoder(format, options).encode code, lang, options
|
210
|
+
end
|
211
|
+
|
212
|
+
# Highlight a string into a HTML <div>.
|
213
|
+
#
|
214
|
+
# CSS styles use classes, so you have to include a stylesheet
|
215
|
+
# in your output.
|
216
|
+
#
|
217
|
+
# See encode.
|
218
|
+
def highlight code, lang, options = { :css => :class }, format = :div
|
219
|
+
encode code, lang, format, options
|
220
|
+
end
|
221
|
+
|
222
|
+
# Encode pre-scanned Tokens.
|
223
|
+
# Use this together with CodeRay.scan:
|
224
|
+
#
|
225
|
+
# require 'coderay'
|
226
|
+
#
|
227
|
+
# # Highlight a short Ruby code example in a HTML span
|
228
|
+
# tokens = CodeRay.scan '1 + 2', :ruby
|
229
|
+
# puts CodeRay.encode_tokens(tokens, :span)
|
230
|
+
#
|
231
|
+
def encode_tokens tokens, format, options = {}
|
232
|
+
encoder(format, options).encode_tokens tokens, options
|
233
|
+
end
|
234
|
+
|
235
|
+
# Encodes +filename+ (a path to a code file) with the Scanner for +lang+.
|
236
|
+
#
|
237
|
+
# See CodeRay.scan_file.
|
238
|
+
# Notice that the second argument is the output +format+, not the input language.
|
239
|
+
#
|
240
|
+
# Example:
|
241
|
+
# require 'coderay'
|
242
|
+
# page = CodeRay.encode_file 'some_c_code.c', :html
|
243
|
+
def encode_file filename, format, options = {}
|
244
|
+
tokens = scan_file filename, :auto, get_scanner_options(options)
|
245
|
+
encode_tokens tokens, format, options
|
246
|
+
end
|
247
|
+
|
248
|
+
# Highlight a file into a HTML <div>.
|
249
|
+
#
|
250
|
+
# CSS styles use classes, so you have to include a stylesheet
|
251
|
+
# in your output.
|
252
|
+
#
|
253
|
+
# See encode.
|
254
|
+
def highlight_file filename, options = { :css => :class }, format = :div
|
255
|
+
encode_file filename, format, options
|
256
|
+
end
|
257
|
+
|
258
|
+
# Finds the Encoder class for +format+ and creates an instance, passing
|
259
|
+
# +options+ to it.
|
260
|
+
#
|
261
|
+
# Example:
|
262
|
+
# require 'coderay'
|
263
|
+
#
|
264
|
+
# stats = CodeRay.encoder(:statistic)
|
265
|
+
# stats.encode("puts 17 + 4\n", :ruby)
|
266
|
+
#
|
267
|
+
# puts '%d out of %d tokens have the kind :integer.' % [
|
268
|
+
# stats.type_stats[:integer].count,
|
269
|
+
# stats.real_token_count
|
270
|
+
# ]
|
271
|
+
# #-> 2 out of 4 tokens have the kind :integer.
|
272
|
+
def encoder format, options = {}
|
273
|
+
Encoders[format].new options
|
274
|
+
end
|
275
|
+
|
276
|
+
# Finds the Scanner class for +lang+ and creates an instance, passing
|
277
|
+
# +options+ to it.
|
278
|
+
#
|
279
|
+
# See Scanner.new.
|
280
|
+
def scanner lang, options = {}
|
281
|
+
Scanners[lang].new '', options
|
282
|
+
end
|
283
|
+
|
284
|
+
# Extract the options for the scanner from the +options+ hash.
|
285
|
+
#
|
286
|
+
# Returns an empty Hash if <tt>:scanner_options</tt> is not set.
|
287
|
+
#
|
288
|
+
# This is used if a method like CodeRay.encode has to provide options
|
289
|
+
# for Encoder _and_ scanner.
|
290
|
+
def get_scanner_options options
|
291
|
+
options.fetch :scanner_options, {}
|
292
|
+
end
|
293
|
+
|
294
|
+
end
|
295
|
+
|
296
|
+
# This Exception is raised when you try to stream with something that is not
|
297
|
+
# capable of streaming.
|
298
|
+
class NotStreamableError < Exception
|
299
|
+
def initialize obj
|
300
|
+
@obj = obj
|
301
|
+
end
|
302
|
+
|
303
|
+
def to_s
|
304
|
+
'%s is not Streamable!' % @obj.class
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
# A dummy module that is included by subclasses of CodeRay::Scanner an CodeRay::Encoder
|
309
|
+
# to show that they are able to handle streams.
|
310
|
+
module Streamable
|
311
|
+
end
|
312
|
+
|
313
|
+
end
|
314
|
+
|
315
|
+
# Run a test script.
|
316
|
+
if $0 == __FILE__
|
317
|
+
$stderr.print 'Press key to print demo.'; gets
|
318
|
+
# Just use this file as an example of Ruby code.
|
319
|
+
code = File.read(__FILE__)[/module CodeRay.*/m]
|
320
|
+
print CodeRay.scan(code, :ruby).html
|
321
|
+
end
|
@@ -0,0 +1,220 @@
|
|
1
|
+
# = Term::ANSIColor - ANSI escape sequences in Ruby
|
2
|
+
#
|
3
|
+
# == Description
|
4
|
+
#
|
5
|
+
# This library can be used to color/uncolor strings using ANSI escape sequences.
|
6
|
+
#
|
7
|
+
# == Author
|
8
|
+
#
|
9
|
+
# Florian Frank mailto:flori@ping.de
|
10
|
+
#
|
11
|
+
# == License
|
12
|
+
#
|
13
|
+
# This is free software; you can redistribute it and/or modify it under the
|
14
|
+
# terms of the GNU General Public License Version 2 as published by the Free
|
15
|
+
# Software Foundation: www.gnu.org/copyleft/gpl.html
|
16
|
+
#
|
17
|
+
# == Download
|
18
|
+
#
|
19
|
+
# The latest version of this library can be downloaded at
|
20
|
+
#
|
21
|
+
# * http://rubyforge.org/frs?group_id=391
|
22
|
+
#
|
23
|
+
# The homepage of this library is located at
|
24
|
+
#
|
25
|
+
# * http://term-ansicolor.rubyforge.org
|
26
|
+
#
|
27
|
+
# == Examples
|
28
|
+
#
|
29
|
+
# The file examples/example.rb in the source/gem-distribution shows how
|
30
|
+
# this library can be used:
|
31
|
+
# require 'term/ansicolor'
|
32
|
+
#
|
33
|
+
# # Use this trick to work around namespace cluttering that
|
34
|
+
# # happens if you just include Term::ANSIColor:
|
35
|
+
#
|
36
|
+
# class Color
|
37
|
+
# class << self
|
38
|
+
# include Term::ANSIColor
|
39
|
+
# end
|
40
|
+
# end
|
41
|
+
#
|
42
|
+
# print Color.red, Color.bold, "No Namespace cluttering:", Color.clear, "\n"
|
43
|
+
# print Color.green + "green" + Color.clear, "\n"
|
44
|
+
# print Color.on_red(Color.green("green")), "\n"
|
45
|
+
# print Color.yellow { Color.on_black { "yellow on_black" } }, "\n\n"
|
46
|
+
#
|
47
|
+
# # Or shortcut Term::ANSIColor by assignment:
|
48
|
+
# c = Term::ANSIColor
|
49
|
+
#
|
50
|
+
# print c.red, c.bold, "No Namespace cluttering (alternative):", c.clear, "\n"
|
51
|
+
# print c.green + "green" + c.clear, "\n"
|
52
|
+
# print c.on_red(c.green("green")), "\n"
|
53
|
+
# print c.yellow { c.on_black { "yellow on_black" } }, "\n\n"
|
54
|
+
#
|
55
|
+
# # Anyway, I don't define any of Term::ANSIColor's methods in this example
|
56
|
+
# # and I want to keep it short:
|
57
|
+
# include Term::ANSIColor
|
58
|
+
#
|
59
|
+
# print red, bold, "Usage as constants:", reset, "\n"
|
60
|
+
# print clear, "clear", reset, reset, "reset", reset,
|
61
|
+
# bold, "bold", reset, dark, "dark", reset,
|
62
|
+
# underscore, "underscore", reset, blink, "blink", reset,
|
63
|
+
# negative, "negative", reset, concealed, "concealed", reset, "|\n",
|
64
|
+
# black, "black", reset, red, "red", reset, green, "green", reset,
|
65
|
+
# yellow, "yellow", reset, blue, "blue", reset, magenta, "magenta", reset,
|
66
|
+
# cyan, "cyan", reset, white, "white", reset, "|\n",
|
67
|
+
# on_black, "on_black", reset, on_red, "on_red", reset,
|
68
|
+
# on_green, "on_green", reset, on_yellow, "on_yellow", reset,
|
69
|
+
# on_blue, "on_blue", reset, on_magenta, "on_magenta", reset,
|
70
|
+
# on_cyan, "on_cyan", reset, on_white, "on_white", reset, "|\n\n"
|
71
|
+
#
|
72
|
+
# print red, bold, "Usage as unary argument methods:", reset, "\n"
|
73
|
+
# print clear("clear"), reset("reset"), bold("bold"), dark("dark"),
|
74
|
+
# underscore("underscore"), blink("blink"), negative("negative"),
|
75
|
+
# concealed("concealed"), "|\n",
|
76
|
+
# black("black"), red("red"), green("green"), yellow("yellow"),
|
77
|
+
# blue("blue"), magenta("magenta"), cyan("cyan"), white("white"), "|\n",
|
78
|
+
# on_black("on_black"), on_red("on_red"), on_green("on_green"),#
|
79
|
+
# on_yellow("on_yellow"), on_blue("on_blue"), on_magenta("on_magenta"),
|
80
|
+
# on_cyan("on_cyan"), on_white("on_white"), "|\n\n"
|
81
|
+
#
|
82
|
+
# print red { bold { "Usage as block forms:" } }, "\n"
|
83
|
+
# print clear { "clear" }, reset { "reset" }, bold { "bold" },
|
84
|
+
# dark { "dark" }, underscore { "underscore" }, blink { "blink" },
|
85
|
+
# negative { "negative" }, concealed { "concealed" }, "|\n",
|
86
|
+
# black { "black" }, red { "red" }, green { "green" },
|
87
|
+
# yellow { "yellow" }, blue { "blue" }, magenta { "magenta" },
|
88
|
+
# cyan { "cyan" }, white { "white" }, "|\n",
|
89
|
+
# on_black { "on_black" }, on_red { "on_red" }, on_green { "on_green" },
|
90
|
+
# on_yellow { "on_yellow" }, on_blue { "on_blue" },
|
91
|
+
# on_magenta { "on_magenta" }, on_cyan { "on_cyan" },
|
92
|
+
# on_white { "on_white" }, "|\n\n"
|
93
|
+
#
|
94
|
+
# # Usage as Mixin into String or its Subclasses
|
95
|
+
# class String
|
96
|
+
# include Term::ANSIColor
|
97
|
+
# end
|
98
|
+
#
|
99
|
+
# print "Usage as String Mixins:".red.bold, "\n"
|
100
|
+
# print "clear".clear, "reset".reset, "bold".bold, "dark".dark,
|
101
|
+
# "underscore".underscore, "blink".blink, "negative".negative,
|
102
|
+
# "concealed".concealed, "|\n",
|
103
|
+
# "black".black, "red".red, "green".green, "yellow".yellow,
|
104
|
+
# "blue".blue, "magenta".magenta, "cyan".cyan, "white".white, "|\n",
|
105
|
+
# "on_black".on_black, "on_red".on_red, "on_green".on_green,
|
106
|
+
# "on_yellow".on_yellow, "on_blue".on_blue, "on_magenta".on_magenta,
|
107
|
+
# "on_cyan".on_cyan, "on_white".on_white, "|\n\n"
|
108
|
+
#
|
109
|
+
# symbols = Term::ANSIColor::attributes
|
110
|
+
# print red { bold { "All supported attributes = " } },
|
111
|
+
# blue { symbols.inspect }, "\n\n"
|
112
|
+
#
|
113
|
+
# print "Send symbols to strings:".send(:red).send(:bold), "\n"
|
114
|
+
# print symbols[12, 8].map { |c| c.to_s.send(c) }, "\n\n"
|
115
|
+
#
|
116
|
+
# print red { bold { "Make strings monochromatic again:" } }, "\n"
|
117
|
+
# print [ "red".red, "not red anymore".red.uncolored,
|
118
|
+
# uncolored { "not red anymore".red }, uncolored("not red anymore".red)
|
119
|
+
# ].map { |x| x + "\n" }
|
120
|
+
module Term
|
121
|
+
# The ANSIColor module can be used for namespacing and mixed into your own
|
122
|
+
# classes.
|
123
|
+
module ANSIColor
|
124
|
+
# :stopdoc:
|
125
|
+
ATTRIBUTES = [
|
126
|
+
[ :clear , 0 ],
|
127
|
+
[ :reset , 0 ], # synonym for :clear
|
128
|
+
[ :bold , 1 ],
|
129
|
+
[ :dark , 2 ],
|
130
|
+
[ :italic , 3 ], # not widely implemented
|
131
|
+
[ :underline , 4 ],
|
132
|
+
[ :underscore , 4 ], # synonym for :underline
|
133
|
+
[ :blink , 5 ],
|
134
|
+
[ :rapid_blink , 6 ], # not widely implemented
|
135
|
+
[ :negative , 7 ], # no reverse because of String#reverse
|
136
|
+
[ :concealed , 8 ],
|
137
|
+
[ :strikethrough, 9 ], # not widely implemented
|
138
|
+
[ :black , 30 ],
|
139
|
+
[ :red , 31 ],
|
140
|
+
[ :green , 32 ],
|
141
|
+
[ :yellow , 33 ],
|
142
|
+
[ :blue , 34 ],
|
143
|
+
[ :magenta , 35 ],
|
144
|
+
[ :cyan , 36 ],
|
145
|
+
[ :white , 37 ],
|
146
|
+
[ :on_black , 40 ],
|
147
|
+
[ :on_red , 41 ],
|
148
|
+
[ :on_green , 42 ],
|
149
|
+
[ :on_yellow , 43 ],
|
150
|
+
[ :on_blue , 44 ],
|
151
|
+
[ :on_magenta , 45 ],
|
152
|
+
[ :on_cyan , 46 ],
|
153
|
+
[ :on_white , 47 ],
|
154
|
+
]
|
155
|
+
|
156
|
+
ATTRIBUTE_NAMES = ATTRIBUTES.transpose.first
|
157
|
+
# :startdoc:
|
158
|
+
|
159
|
+
# Returns true, if the coloring function of this module
|
160
|
+
# is switched on, false otherwise.
|
161
|
+
def self.coloring?
|
162
|
+
@coloring
|
163
|
+
end
|
164
|
+
|
165
|
+
# Turns the coloring on or off globally, so you can easily do
|
166
|
+
# this for example:
|
167
|
+
# Term::ANSIColor::coloring = STDOUT.isatty
|
168
|
+
def self.coloring=(val)
|
169
|
+
@coloring = val
|
170
|
+
end
|
171
|
+
self.coloring = true
|
172
|
+
|
173
|
+
ATTRIBUTES.each do |c, v|
|
174
|
+
eval %Q{
|
175
|
+
def #{c}(string = nil)
|
176
|
+
result = ''
|
177
|
+
result << "\e[#{v}m" if Term::ANSIColor.coloring?
|
178
|
+
if block_given?
|
179
|
+
result << yield
|
180
|
+
elsif string
|
181
|
+
result << string
|
182
|
+
elsif respond_to?(:to_str)
|
183
|
+
result << self
|
184
|
+
else
|
185
|
+
return result #only switch on
|
186
|
+
end
|
187
|
+
result << "\e[0m" if Term::ANSIColor.coloring?
|
188
|
+
result
|
189
|
+
end
|
190
|
+
}
|
191
|
+
end
|
192
|
+
|
193
|
+
# Regular expression that is used to scan for ANSI-sequences while
|
194
|
+
# uncoloring strings.
|
195
|
+
COLORED_REGEXP = /\e\[([34][0-7]|[0-9])m/
|
196
|
+
|
197
|
+
# Returns an uncolored version of the string, that is all
|
198
|
+
# ANSI-sequences are stripped from the string.
|
199
|
+
def uncolored(string = nil) # :yields:
|
200
|
+
if block_given?
|
201
|
+
yield.gsub(COLORED_REGEXP, '')
|
202
|
+
elsif string
|
203
|
+
string.gsub(COLORED_REGEXP, '')
|
204
|
+
elsif respond_to?(:to_str)
|
205
|
+
gsub(COLORED_REGEXP, '')
|
206
|
+
else
|
207
|
+
''
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
module_function
|
212
|
+
|
213
|
+
# Returns an array of all Term::ANSIColor attributes as symbols.
|
214
|
+
def attributes
|
215
|
+
ATTRIBUTE_NAMES
|
216
|
+
end
|
217
|
+
extend self
|
218
|
+
end
|
219
|
+
end
|
220
|
+
# vim: set et sw=2 ts=2:
|
@@ -0,0 +1,26 @@
|
|
1
|
+
acts_as_tree
|
2
|
+
============
|
3
|
+
|
4
|
+
Specify this +acts_as+ extension if you want to model a tree structure by providing a parent association and a children
|
5
|
+
association. This requires that you have a foreign key column, which by default is called +parent_id+.
|
6
|
+
|
7
|
+
class Category < ActiveRecord::Base
|
8
|
+
acts_as_tree :order => "name"
|
9
|
+
end
|
10
|
+
|
11
|
+
Example:
|
12
|
+
root
|
13
|
+
\_ child1
|
14
|
+
\_ subchild1
|
15
|
+
\_ subchild2
|
16
|
+
|
17
|
+
root = Category.create("name" => "root")
|
18
|
+
child1 = root.children.create("name" => "child1")
|
19
|
+
subchild1 = child1.children.create("name" => "subchild1")
|
20
|
+
|
21
|
+
root.parent # => nil
|
22
|
+
child1.parent # => root
|
23
|
+
root.children # => [child1]
|
24
|
+
root.children.first.children.first # => subchild1
|
25
|
+
|
26
|
+
Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license
|
@@ -5,17 +5,17 @@ require 'rake/rdoctask'
|
|
5
5
|
desc 'Default: run unit tests.'
|
6
6
|
task :default => :test
|
7
7
|
|
8
|
-
desc 'Test
|
8
|
+
desc 'Test acts_as_tree plugin.'
|
9
9
|
Rake::TestTask.new(:test) do |t|
|
10
10
|
t.libs << 'lib'
|
11
11
|
t.pattern = 'test/**/*_test.rb'
|
12
12
|
t.verbose = true
|
13
13
|
end
|
14
14
|
|
15
|
-
desc 'Generate documentation for
|
15
|
+
desc 'Generate documentation for acts_as_tree plugin.'
|
16
16
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
17
17
|
rdoc.rdoc_dir = 'rdoc'
|
18
|
-
rdoc.title = '
|
18
|
+
rdoc.title = 'acts_as_tree'
|
19
19
|
rdoc.options << '--line-numbers' << '--inline-source'
|
20
20
|
rdoc.rdoc_files.include('README')
|
21
21
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
@@ -0,0 +1 @@
|
|
1
|
+
ActiveRecord::Base.send :include, ActiveRecord::Acts::Tree
|
@@ -0,0 +1,96 @@
|
|
1
|
+
module ActiveRecord
|
2
|
+
module Acts
|
3
|
+
module Tree
|
4
|
+
def self.included(base)
|
5
|
+
base.extend(ClassMethods)
|
6
|
+
end
|
7
|
+
|
8
|
+
# Specify this +acts_as+ extension if you want to model a tree structure by providing a parent association and a children
|
9
|
+
# association. This requires that you have a foreign key column, which by default is called +parent_id+.
|
10
|
+
#
|
11
|
+
# class Category < ActiveRecord::Base
|
12
|
+
# acts_as_tree :order => "name"
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# Example:
|
16
|
+
# root
|
17
|
+
# \_ child1
|
18
|
+
# \_ subchild1
|
19
|
+
# \_ subchild2
|
20
|
+
#
|
21
|
+
# root = Category.create("name" => "root")
|
22
|
+
# child1 = root.children.create("name" => "child1")
|
23
|
+
# subchild1 = child1.children.create("name" => "subchild1")
|
24
|
+
#
|
25
|
+
# root.parent # => nil
|
26
|
+
# child1.parent # => root
|
27
|
+
# root.children # => [child1]
|
28
|
+
# root.children.first.children.first # => subchild1
|
29
|
+
#
|
30
|
+
# In addition to the parent and children associations, the following instance methods are added to the class
|
31
|
+
# after calling <tt>acts_as_tree</tt>:
|
32
|
+
# * <tt>siblings</tt> - Returns all the children of the parent, excluding the current node (<tt>[subchild2]</tt> when called on <tt>subchild1</tt>)
|
33
|
+
# * <tt>self_and_siblings</tt> - Returns all the children of the parent, including the current node (<tt>[subchild1, subchild2]</tt> when called on <tt>subchild1</tt>)
|
34
|
+
# * <tt>ancestors</tt> - Returns all the ancestors of the current node (<tt>[child1, root]</tt> when called on <tt>subchild2</tt>)
|
35
|
+
# * <tt>root</tt> - Returns the root of the current node (<tt>root</tt> when called on <tt>subchild2</tt>)
|
36
|
+
module ClassMethods
|
37
|
+
# Configuration options are:
|
38
|
+
#
|
39
|
+
# * <tt>foreign_key</tt> - specifies the column name to use for tracking of the tree (default: +parent_id+)
|
40
|
+
# * <tt>order</tt> - makes it possible to sort the children according to this SQL snippet.
|
41
|
+
# * <tt>counter_cache</tt> - keeps a count in a +children_count+ column if set to +true+ (default: +false+).
|
42
|
+
def acts_as_tree(options = {})
|
43
|
+
configuration = { :foreign_key => "parent_id", :order => nil, :counter_cache => nil }
|
44
|
+
configuration.update(options) if options.is_a?(Hash)
|
45
|
+
|
46
|
+
belongs_to :parent, :class_name => name, :foreign_key => configuration[:foreign_key], :counter_cache => configuration[:counter_cache]
|
47
|
+
has_many :children, :class_name => name, :foreign_key => configuration[:foreign_key], :order => configuration[:order], :dependent => :destroy
|
48
|
+
|
49
|
+
class_eval <<-EOV
|
50
|
+
include ActiveRecord::Acts::Tree::InstanceMethods
|
51
|
+
|
52
|
+
def self.roots
|
53
|
+
find(:all, :conditions => "#{configuration[:foreign_key]} IS NULL", :order => #{configuration[:order].nil? ? "nil" : %Q{"#{configuration[:order]}"}})
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.root
|
57
|
+
find(:first, :conditions => "#{configuration[:foreign_key]} IS NULL", :order => #{configuration[:order].nil? ? "nil" : %Q{"#{configuration[:order]}"}})
|
58
|
+
end
|
59
|
+
EOV
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
module InstanceMethods
|
64
|
+
# Returns list of ancestors, starting from parent until root.
|
65
|
+
#
|
66
|
+
# subchild1.ancestors # => [child1, root]
|
67
|
+
def ancestors
|
68
|
+
node, nodes = self, []
|
69
|
+
nodes << node = node.parent while node.parent
|
70
|
+
nodes
|
71
|
+
end
|
72
|
+
|
73
|
+
# Returns the root node of the tree.
|
74
|
+
def root
|
75
|
+
node = self
|
76
|
+
node = node.parent while node.parent
|
77
|
+
node
|
78
|
+
end
|
79
|
+
|
80
|
+
# Returns all siblings of the current node.
|
81
|
+
#
|
82
|
+
# subchild1.siblings # => [subchild2]
|
83
|
+
def siblings
|
84
|
+
self_and_siblings - [self]
|
85
|
+
end
|
86
|
+
|
87
|
+
# Returns all siblings and a reference to the current node.
|
88
|
+
#
|
89
|
+
# subchild1.self_and_siblings # => [subchild1, subchild2]
|
90
|
+
def self_and_siblings
|
91
|
+
parent ? parent.children : self.class.roots
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|