redcar 0.3.2dev → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +49 -2
- data/README.md +2 -7
- data/ROADMAP.md +8 -9
- data/Rakefile +29 -44
- data/bin/redcar +11 -2
- data/lib/openssl/History.txt +75 -0
- data/lib/openssl/License.txt +30 -0
- data/lib/openssl/Manifest.txt +99 -0
- data/lib/openssl/README.txt +24 -0
- data/lib/openssl/Rakefile +71 -0
- data/lib/openssl/build.properties.SAMPLE +7 -0
- data/lib/openssl/build.xml +57 -0
- data/lib/openssl/lib/jopenssl/version.rb +5 -0
- data/lib/openssl/lib/openssl.rb +24 -0
- data/lib/openssl/lib/openssl/bn.rb +33 -0
- data/lib/openssl/lib/openssl/buffering.rb +239 -0
- data/lib/openssl/lib/openssl/cipher.rb +56 -0
- data/lib/openssl/lib/openssl/digest.rb +46 -0
- data/lib/openssl/lib/openssl/dummy.rb +34 -0
- data/lib/openssl/lib/openssl/dummyssl.rb +13 -0
- data/lib/openssl/lib/openssl/ssl.rb +135 -0
- data/lib/openssl/lib/openssl/x509.rb +154 -0
- data/lib/openssl/mocha/COPYING +3 -0
- data/lib/openssl/mocha/MIT-LICENSE +7 -0
- data/lib/openssl/mocha/README +35 -0
- data/lib/openssl/mocha/RELEASE +171 -0
- data/lib/openssl/mocha/Rakefile +147 -0
- data/lib/openssl/mocha/TODO +48 -0
- data/lib/openssl/mocha/examples/misc.rb +36 -0
- data/lib/openssl/mocha/examples/mocha.rb +26 -0
- data/lib/openssl/mocha/examples/stubba.rb +65 -0
- data/lib/openssl/mocha/init.rb +3 -0
- data/lib/openssl/mocha/lib/mocha.rb +19 -0
- data/lib/openssl/mocha/lib/mocha/any_instance_method.rb +35 -0
- data/lib/openssl/mocha/lib/mocha/auto_verify.rb +111 -0
- data/lib/openssl/mocha/lib/mocha/central.rb +35 -0
- data/lib/openssl/mocha/lib/mocha/class_method.rb +62 -0
- data/lib/openssl/mocha/lib/mocha/deprecation.rb +22 -0
- data/lib/openssl/mocha/lib/mocha/exception_raiser.rb +17 -0
- data/lib/openssl/mocha/lib/mocha/expectation.rb +382 -0
- data/lib/openssl/mocha/lib/mocha/expectation_error.rb +6 -0
- data/lib/openssl/mocha/lib/mocha/expectation_list.rb +45 -0
- data/lib/openssl/mocha/lib/mocha/infinite_range.rb +25 -0
- data/lib/openssl/mocha/lib/mocha/inspect.rb +39 -0
- data/lib/openssl/mocha/lib/mocha/instance_method.rb +8 -0
- data/lib/openssl/mocha/lib/mocha/is_a.rb +9 -0
- data/lib/openssl/mocha/lib/mocha/metaclass.rb +7 -0
- data/lib/openssl/mocha/lib/mocha/missing_expectation.rb +27 -0
- data/lib/openssl/mocha/lib/mocha/mock.rb +200 -0
- data/lib/openssl/mocha/lib/mocha/multiple_yields.rb +20 -0
- data/lib/openssl/mocha/lib/mocha/no_yields.rb +11 -0
- data/lib/openssl/mocha/lib/mocha/object.rb +110 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers.rb +9 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers/all_of.rb +39 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers/any_of.rb +44 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers/anything.rb +30 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers/has_entry.rb +39 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers/has_key.rb +39 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers/has_value.rb +39 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers/includes.rb +37 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers/instance_of.rb +39 -0
- data/lib/openssl/mocha/lib/mocha/parameter_matchers/kind_of.rb +39 -0
- data/lib/openssl/mocha/lib/mocha/pretty_parameters.rb +28 -0
- data/lib/openssl/mocha/lib/mocha/return_values.rb +31 -0
- data/lib/openssl/mocha/lib/mocha/setup_and_teardown.rb +23 -0
- data/lib/openssl/mocha/lib/mocha/single_return_value.rb +24 -0
- data/lib/openssl/mocha/lib/mocha/single_yield.rb +18 -0
- data/lib/openssl/mocha/lib/mocha/standalone.rb +32 -0
- data/lib/openssl/mocha/lib/mocha/stub.rb +18 -0
- data/lib/openssl/mocha/lib/mocha/test_case_adapter.rb +49 -0
- data/lib/openssl/mocha/lib/mocha/yield_parameters.rb +31 -0
- data/lib/openssl/mocha/lib/mocha_standalone.rb +2 -0
- data/lib/openssl/mocha/lib/stubba.rb +2 -0
- data/lib/openssl/mocha/templates/html_with_google_analytics.rb +742 -0
- data/lib/openssl/mocha/test/acceptance/expected_invocation_count_acceptance_test.rb +187 -0
- data/lib/openssl/mocha/test/acceptance/mocha_acceptance_test.rb +98 -0
- data/lib/openssl/mocha/test/acceptance/mocked_methods_dispatch_acceptance_test.rb +71 -0
- data/lib/openssl/mocha/test/acceptance/parameter_matcher_acceptance_test.rb +63 -0
- data/lib/openssl/mocha/test/acceptance/standalone_acceptance_test.rb +131 -0
- data/lib/openssl/mocha/test/acceptance/stubba_acceptance_test.rb +102 -0
- data/lib/openssl/mocha/test/active_record_test_case.rb +36 -0
- data/lib/openssl/mocha/test/deprecation_disabler.rb +15 -0
- data/lib/openssl/mocha/test/execution_point.rb +34 -0
- data/lib/openssl/mocha/test/integration/mocha_test_result_integration_test.rb +105 -0
- data/lib/openssl/mocha/test/integration/stubba_integration_test.rb +89 -0
- data/lib/openssl/mocha/test/integration/stubba_test_result_integration_test.rb +85 -0
- data/lib/openssl/mocha/test/method_definer.rb +18 -0
- data/lib/openssl/mocha/test/test_helper.rb +12 -0
- data/lib/openssl/mocha/test/test_runner.rb +31 -0
- data/lib/openssl/mocha/test/unit/any_instance_method_test.rb +124 -0
- data/lib/openssl/mocha/test/unit/array_inspect_test.rb +16 -0
- data/lib/openssl/mocha/test/unit/auto_verify_test.rb +122 -0
- data/lib/openssl/mocha/test/unit/central_test.rb +124 -0
- data/lib/openssl/mocha/test/unit/class_method_test.rb +196 -0
- data/lib/openssl/mocha/test/unit/date_time_inspect_test.rb +21 -0
- data/lib/openssl/mocha/test/unit/expectation_list_test.rb +69 -0
- data/lib/openssl/mocha/test/unit/expectation_raiser_test.rb +28 -0
- data/lib/openssl/mocha/test/unit/expectation_test.rb +399 -0
- data/lib/openssl/mocha/test/unit/hash_inspect_test.rb +16 -0
- data/lib/openssl/mocha/test/unit/infinite_range_test.rb +53 -0
- data/lib/openssl/mocha/test/unit/metaclass_test.rb +22 -0
- data/lib/openssl/mocha/test/unit/missing_expectation_test.rb +45 -0
- data/lib/openssl/mocha/test/unit/mock_test.rb +316 -0
- data/lib/openssl/mocha/test/unit/multiple_yields_test.rb +18 -0
- data/lib/openssl/mocha/test/unit/no_yield_test.rb +18 -0
- data/lib/openssl/mocha/test/unit/object_inspect_test.rb +35 -0
- data/lib/openssl/mocha/test/unit/object_test.rb +165 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/all_of_test.rb +26 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/any_of_test.rb +26 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/anything_test.rb +21 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/has_entry_test.rb +25 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/has_key_test.rb +25 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/has_value_test.rb +25 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/includes_test.rb +25 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/instance_of_test.rb +25 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/kind_of_test.rb +25 -0
- data/lib/openssl/mocha/test/unit/parameter_matchers/stub_matcher.rb +22 -0
- data/lib/openssl/mocha/test/unit/pretty_parameters_test.rb +32 -0
- data/lib/openssl/mocha/test/unit/return_values_test.rb +63 -0
- data/lib/openssl/mocha/test/unit/setup_and_teardown_test.rb +76 -0
- data/lib/openssl/mocha/test/unit/single_return_value_test.rb +33 -0
- data/lib/openssl/mocha/test/unit/single_yield_test.rb +18 -0
- data/lib/openssl/mocha/test/unit/string_inspect_test.rb +11 -0
- data/lib/openssl/mocha/test/unit/stub_test.rb +24 -0
- data/lib/openssl/mocha/test/unit/yield_parameters_test.rb +93 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/FOLDERS +53 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/LICENSE +340 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/README +117 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/bin/coderay +77 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/bin/coderay_stylesheet +4 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay.rb +319 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/duo.rb +29 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoder.rb +173 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/_map.rb +8 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/count.rb +21 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/debug.rb +46 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/div.rb +20 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/html.rb +260 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/html/classes.rb +77 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/html/css.rb +65 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/html/numerization.rb +122 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/html/output.rb +195 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/null.rb +26 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/page.rb +21 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/span.rb +20 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/statistic.rb +81 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/text.rb +33 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/tokens.rb +44 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/xml.rb +71 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/encoders/yaml.rb +22 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/helpers/file_type.rb +182 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/helpers/gzip_simple.rb +122 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/helpers/plugin.rb +326 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/helpers/word_list.rb +119 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanner.rb +238 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/_map.rb +15 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/c.rb +163 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/debug.rb +60 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/delphi.rb +149 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/html.rb +177 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/nitro_xhtml.rb +133 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/plaintext.rb +16 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/rhtml.rb +73 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/ruby.rb +367 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/ruby/patterns.rb +230 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/scanners/xml.rb +18 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/style.rb +20 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/styles/_map.rb +7 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/styles/cycnus.rb +125 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/styles/murphy.rb +119 -0
- data/lib/openssl/mocha/vendor/coderay-0.7.4.215/lib/coderay/tokens.rb +368 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/CHANGES +295 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/MIT-LICENSE +21 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/README +129 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/Rakefile +152 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project.rb +19 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/core_ext/open_uri.rb +22 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/core_ext/pathname.rb +36 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/core_ext/string.rb +5 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/http/multipart.rb +32 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/patois.rb +1 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/patois/parser.rb +99 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project.rb +4 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/base.rb +9 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/codehaus.rb +1 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/codehaus/codehaus_project_svn.rb +31 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/trac.rb +1 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/trac/trac_project.rb +54 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/xforge.rb +5 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/xforge/ruby_forge.rb +47 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/xforge/session.rb +177 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/xforge/source_forge.rb +50 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/xforge/xfile.rb +45 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project/xforge/xforge_base.rb +85 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/project_analyzer.rb +36 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/release/freshmeat.rb +267 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/release/raa.rb +572 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/scm_web.rb +2 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/scm_web/browser.rb +112 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/scm_web/pathname.rb +89 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker.rb +6 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/base.rb +24 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/digit_issues.rb +34 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/issue.rb +57 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/jira.rb +2 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/jira/jira_issues.rb +35 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/jira/jira_tracker.rb +149 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/trac.rb +1 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/trac/trac_tracker.rb +33 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/xforge.rb +3 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/xforge/ruby_forge_tracker.rb +17 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/xforge/source_forge_tracker.rb +17 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/tracker/xforge/xforge_tracker.rb +191 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/meta_project/version_parser.rb +52 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/rake/contrib/xforge.rb +3 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/rake/contrib/xforge/base.rb +64 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/rake/contrib/xforge/news_publisher.rb +97 -0
- data/lib/openssl/mocha/vendor/meta_project-0.4.15/lib/rake/contrib/xforge/release.rb +134 -0
- data/lib/openssl/nbproject/genfiles.properties +5 -0
- data/lib/openssl/nbproject/jdk.xml +157 -0
- data/lib/openssl/nbproject/nbjdk.properties +1 -0
- data/lib/openssl/nbproject/nbjdk.xml +16 -0
- data/lib/openssl/nbproject/project.xml +117 -0
- data/lib/openssl/src/java/JopensslService.java +41 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/ASN1.java +930 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/Attribute.java +132 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/BN.java +769 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/BouncyCastlePEMHandler.java +69 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/Callable.java +10 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/Cipher.java +661 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/CipherStrings.java +1827 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/Config.java +49 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/DefaultPEMHandler.java +44 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/Digest.java +207 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/HMAC.java +183 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/NetscapeSPKI.java +212 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/OpenSSLImpl.java +341 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/OpenSSLReal.java +113 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/PEMHandler.java +40 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/PKCS10CertificationRequestExt.java +159 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/PKCS7.java +642 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/PKey.java +154 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/PKeyDH.java +401 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/PKeyDSA.java +419 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/PKeyRSA.java +762 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/Random.java +103 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/Request.java +336 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/SSL.java +71 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/SSLContext.java +358 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/SSLSocket.java +561 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/SimpleSecretKey.java +53 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/Utils.java +60 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/X509.java +108 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/X509CRL.java +446 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/X509Cert.java +520 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/X509Extensions.java +751 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/X509Name.java +405 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/X509Revoked.java +111 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/X509Store.java +282 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/X509StoreCtx.java +206 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/ASN1Registry.java +5135 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/Attribute.java +79 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/BIO.java +345 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/BIOFilter.java +38 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/Base64BIOFilter.java +84 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/CipherBIOFilter.java +157 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/Digest.java +126 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/EVP.java +136 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/EncContent.java +178 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/Encrypt.java +77 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/Envelope.java +169 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/IssuerAndSerial.java +35 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/MemBIO.java +117 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/MessageDigestBIOFilter.java +76 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/Mime.java +245 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/MimeHeader.java +103 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/MimeParam.java +69 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/NotVerifiedPKCS7Exception.java +38 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/NullSinkBIO.java +52 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/PKCS7.java +1276 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/PKCS7Data.java +168 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/PKCS7DataData.java +88 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/PKCS7DataDigest.java +64 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/PKCS7DataEncrypted.java +61 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/PKCS7DataEnveloped.java +85 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/PKCS7DataSigned.java +127 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/PKCS7DataSignedAndEnveloped.java +91 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/PKCS7Exception.java +68 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/RecipInfo.java +244 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/SMIME.java +281 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/SignEnvelope.java +202 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/Signed.java +345 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/SignerInfoWithPkey.java +365 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/TypeDiscriminating.java +34 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/impl/utils/Base64.java +1809 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/util/Base64Coder.java +103 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/CRL.java +59 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Certificate.java +57 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/CertificateFile.java +46 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/CertificateHashDir.java +46 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Function0.java +43 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Function1.java +43 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Function2.java +43 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Function3.java +43 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Function4.java +43 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Function5.java +43 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Lookup.java +560 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/LookupMethod.java +84 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Name.java +85 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/PEMInputOutput.java +1210 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/PKey.java +41 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/PolicyTree.java +36 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Purpose.java +475 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Store.java +377 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/StoreContext.java +1356 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/Trust.java +279 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/VerifyParameter.java +324 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/X509Aux.java +43 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/X509AuxCertificate.java +170 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/X509Error.java +70 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/X509Object.java +88 -0
- data/lib/openssl/src/java/org/jruby/ext/openssl/x509store/X509Utils.java +541 -0
- data/lib/openssl/test/cert_with_ec_pk.cer +27 -0
- data/lib/openssl/test/fixture/ca_path/72fa7371.0 +19 -0
- data/lib/openssl/test/fixture/ca_path/verisign.pem +19 -0
- data/lib/openssl/test/fixture/cacert.pem +23 -0
- data/lib/openssl/test/fixture/cert_localhost.pem +19 -0
- data/lib/openssl/test/fixture/common.pem +48 -0
- data/lib/openssl/test/fixture/localhost_keypair.pem +18 -0
- data/lib/openssl/test/fixture/max.pem +29 -0
- data/lib/openssl/test/fixture/purpose/b70a5bc1.0 +24 -0
- data/lib/openssl/test/fixture/purpose/ca/PASSWD_OF_CA_KEY_IS_1234 +0 -0
- data/lib/openssl/test/fixture/purpose/ca/ca_config.rb +37 -0
- data/lib/openssl/test/fixture/purpose/ca/cacert.pem +24 -0
- data/lib/openssl/test/fixture/purpose/ca/newcerts/2_cert.pem +19 -0
- data/lib/openssl/test/fixture/purpose/ca/newcerts/3_cert.pem +19 -0
- data/lib/openssl/test/fixture/purpose/ca/private/cakeypair.pem +30 -0
- data/lib/openssl/test/fixture/purpose/ca/serial +1 -0
- data/lib/openssl/test/fixture/purpose/cacert.pem +24 -0
- data/lib/openssl/test/fixture/purpose/scripts/gen_cert.rb +127 -0
- data/lib/openssl/test/fixture/purpose/scripts/gen_csr.rb +50 -0
- data/lib/openssl/test/fixture/purpose/scripts/init_ca.rb +66 -0
- data/lib/openssl/test/fixture/purpose/sslclient.pem +19 -0
- data/lib/openssl/test/fixture/purpose/sslclient/csr.pem +10 -0
- data/lib/openssl/test/fixture/purpose/sslclient/keypair.pem +15 -0
- data/lib/openssl/test/fixture/purpose/sslclient/sslclient.pem +19 -0
- data/lib/openssl/test/fixture/purpose/sslserver.pem +19 -0
- data/lib/openssl/test/fixture/purpose/sslserver/csr.pem +10 -0
- data/lib/openssl/test/fixture/purpose/sslserver/keypair.pem +15 -0
- data/lib/openssl/test/fixture/purpose/sslserver/sslserver.pem +19 -0
- data/lib/openssl/test/fixture/verisign.pem +19 -0
- data/lib/openssl/test/fixture/verisign_c3.pem +14 -0
- data/lib/openssl/test/openssl/ssl_server.rb +99 -0
- data/lib/openssl/test/openssl/test_asn1.rb +199 -0
- data/lib/openssl/test/openssl/test_cipher.rb +196 -0
- data/lib/openssl/test/openssl/test_digest.rb +88 -0
- data/lib/openssl/test/openssl/test_hmac.rb +44 -0
- data/lib/openssl/test/openssl/test_ns_spki.rb +69 -0
- data/lib/openssl/test/openssl/test_pair.rb +149 -0
- data/lib/openssl/test/openssl/test_pkcs7.rb +160 -0
- data/lib/openssl/test/openssl/test_pkey_rsa.rb +49 -0
- data/lib/openssl/test/openssl/test_ssl.rb +413 -0
- data/lib/openssl/test/openssl/test_x509cert.rb +236 -0
- data/lib/openssl/test/openssl/test_x509crl.rb +234 -0
- data/lib/openssl/test/openssl/test_x509ext.rb +95 -0
- data/lib/openssl/test/openssl/test_x509name.rb +281 -0
- data/lib/openssl/test/openssl/test_x509req.rb +178 -0
- data/lib/openssl/test/openssl/test_x509store.rb +245 -0
- data/lib/openssl/test/openssl/utils.rb +135 -0
- data/lib/openssl/test/pkcs7_mime_enveloped.message +19 -0
- data/lib/openssl/test/pkcs7_mime_signed.message +30 -0
- data/lib/openssl/test/pkcs7_multipart_signed.message +45 -0
- data/lib/openssl/test/ref/compile.rb +8 -0
- data/lib/openssl/test/ref/pkcs1 +0 -0
- data/lib/openssl/test/ref/pkcs1.c +21 -0
- data/lib/openssl/test/test_cipher.rb +95 -0
- data/lib/openssl/test/test_integration.rb +139 -0
- data/lib/openssl/test/test_java.rb +98 -0
- data/lib/openssl/test/test_java_attribute.rb +25 -0
- data/lib/openssl/test/test_java_bio.rb +42 -0
- data/lib/openssl/test/test_java_mime.rb +173 -0
- data/lib/openssl/test/test_java_pkcs7.rb +769 -0
- data/lib/openssl/test/test_java_smime.rb +177 -0
- data/lib/openssl/test/test_openssl.rb +34 -0
- data/lib/openssl/test/test_openssl_x509.rb +34 -0
- data/lib/openssl/test/test_parse_certificate.rb +20 -0
- data/lib/openssl/test/test_pkey.rb +46 -0
- data/lib/openssl/test/test_x509store.rb +155 -0
- data/lib/openssl/test/ut_eof.rb +128 -0
- data/lib/redcar.rb +134 -8
- data/lib/redcar/installer.rb +46 -11
- data/lib/redcar/runner.rb +2 -1
- data/lib/redcar/usage.rb +12 -5
- data/lib/redcar_quick_start.rb +37 -0
- data/plugins/application/features/support/env.rb +9 -1
- data/plugins/application/icons/redcar_icon_beta.png +0 -0
- data/plugins/application/lib/application.rb +113 -43
- data/plugins/application/lib/application/clipboard.rb +28 -4
- data/plugins/application/lib/application/command.rb +4 -12
- data/plugins/application/lib/application/command/executor.rb +2 -2
- data/plugins/application/lib/application/keymap.rb +39 -0
- data/plugins/application/lib/application/keymap/builder.rb +19 -0
- data/plugins/application/lib/application/speedbar.rb +33 -24
- data/plugins/application/lib/application/tab.rb +15 -0
- data/plugins/application/lib/application/window.rb +28 -5
- data/plugins/application/spec/application/clipboard_spec.rb +20 -1
- data/plugins/application/spec/application/command/executor_spec.rb +7 -2
- data/plugins/application/spec/application/command_spec.rb +0 -5
- data/plugins/application/spec/application/keymap/builder_spec.rb +17 -0
- data/plugins/application/spec/application/menu_spec.rb +30 -0
- data/plugins/application/spec/application/speedbar_spec.rb +30 -6
- data/plugins/application/spec/application/window_spec.rb +2 -2
- data/plugins/application/spec/spec_helper.rb +1 -1
- data/plugins/application_swt/lib/application_swt.rb +3 -0
- data/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb +10 -1
- data/plugins/application_swt/lib/application_swt/html_tab.rb +1 -0
- data/plugins/application_swt/lib/application_swt/menu.rb +4 -3
- data/plugins/application_swt/lib/application_swt/menu/binding_translator.rb +12 -4
- data/plugins/application_swt/lib/application_swt/speedbar.rb +105 -19
- data/plugins/application_swt/lib/application_swt/swt_wrapper.rb +2 -0
- data/plugins/application_swt/lib/application_swt/window.rb +55 -23
- data/plugins/application_swt/spec/spec_helper.rb +0 -1
- data/plugins/auto_completer/lib/auto_completer.rb +57 -3
- data/plugins/auto_indenter/lib/auto_indenter.rb +1 -1
- data/plugins/core/lib/core.rb +5 -3
- data/plugins/core/lib/core/interface.rb +73 -0
- data/plugins/core/lib/core/model.rb +2 -0
- data/plugins/core/lib/core/observable.rb +12 -1
- data/plugins/core/lib/core/observable_struct.rb +34 -0
- data/plugins/core/lib/core/plugin/storage.rb +16 -3
- data/plugins/core/lib/core/reentry_helpers.rb +13 -0
- data/plugins/core/spec/core/observable_spec.rb +13 -0
- data/plugins/core/spec/core/storage_spec.rb +18 -0
- data/plugins/core/spec/spec_helper.rb +1 -0
- data/plugins/edit_view/features/cut_and_paste.feature +4 -2
- data/plugins/edit_view/features/soft_tabs.feature +243 -0
- data/plugins/edit_view/features/step_definitions/editing_steps.rb +91 -2
- data/plugins/edit_view/features/step_definitions/tab_steps.rb +1 -1
- data/plugins/edit_view/features/tabs.feature +146 -0
- data/plugins/edit_view/lib/edit_view.rb +197 -8
- data/plugins/edit_view/lib/edit_view/actions/arrow_keys.rb +121 -0
- data/plugins/edit_view/lib/edit_view/actions/deletion.rb +30 -0
- data/plugins/edit_view/lib/edit_view/actions/tab.rb +66 -0
- data/plugins/edit_view/lib/edit_view/command.rb +0 -2
- data/plugins/edit_view/lib/edit_view/document.rb +62 -27
- data/plugins/edit_view/lib/edit_view/document/command.rb +11 -0
- data/plugins/edit_view/lib/edit_view/edit_tab.rb +2 -1
- data/plugins/edit_view/lib/edit_view/info_speedbar.rb +69 -0
- data/plugins/edit_view/lib/edit_view/tab_settings.rb +40 -0
- data/plugins/edit_view/spec/edit_view/document_spec.rb +26 -0
- data/plugins/edit_view/spec/spec_helper.rb +0 -1
- data/plugins/edit_view_swt/lib/edit_view_swt.rb +57 -69
- data/plugins/edit_view_swt/lib/edit_view_swt/document.rb +24 -3
- data/plugins/edit_view_swt/lib/edit_view_swt/edit_tab.rb +23 -6
- data/plugins/edit_view_swt/spec/spec_helper.rb +0 -1
- data/plugins/edit_view_swt/vendor/java-mateview.rb +19 -2
- data/plugins/encryption/encryption.rb +38 -0
- data/plugins/encryption/ezcrypto.rb +652 -0
- data/plugins/encryption/jarmor-1.1.jar +0 -0
- data/plugins/encryption/plugin.rb +9 -0
- data/plugins/execute_current_tab/lib/execute_current_tab.rb +56 -0
- data/plugins/execute_current_tab/plugin.rb +8 -0
- data/plugins/html_view/lib/html_view.rb +16 -11
- data/plugins/plugin_manager_ui/lib/plugin_manager_ui.rb +2 -1
- data/plugins/plugin_manager_ui/views/index.html.erb +22 -4
- data/plugins/project/lib/project.rb +140 -26
- data/plugins/project/lib/project/drb_service.rb +75 -0
- data/plugins/project/lib/project/file_mirror.rb +5 -5
- data/plugins/project/lib/project/find_file_dialog.rb +123 -32
- data/plugins/project/spec/project/file_mirror_spec.rb +10 -1
- data/plugins/project/spec/spec_helper.rb +0 -1
- data/plugins/redcar/plugin.rb +1 -1
- data/plugins/redcar/redcar.rb +204 -109
- data/plugins/redcar/spec/redcar/redcar_spec.rb +70 -0
- data/plugins/redcar/spec/spec_helper.rb +4 -0
- data/plugins/repl/lib/repl.rb +14 -7
- data/plugins/repl/lib/repl/internal_mirror.rb +43 -22
- data/plugins/repl/spec/repl/internal_mirror_spec.rb +34 -7
- data/plugins/repl/spec/spec_helper.rb +0 -1
- data/plugins/tree/spec/spec_helper.rb +0 -1
- data/plugins/tree_view_swt/lib/tree_view_swt.rb +1 -1
- data/textmate/Bundles/RedcarRepl.tmbundle/Syntaxes/InternalRuby.plist +2 -18
- data/textmate/Bundles/asciidoc.tmbundle/Syntaxes/AsciiDoc.tmLanguage +428 -0
- metadata +790 -371
- data/lib/redcar/boot.rb +0 -108
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
module Redcar
|
|
2
|
+
class ApplicationSWT
|
|
3
|
+
class Menu
|
|
4
|
+
def move(x, y)
|
|
5
|
+
@menu_bar.setLocation(x, y)
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
2
10
|
|
|
3
11
|
require 'auto_completer/document_controller'
|
|
4
12
|
require 'auto_completer/word_iterator'
|
|
@@ -13,8 +21,6 @@ module Redcar
|
|
|
13
21
|
end
|
|
14
22
|
|
|
15
23
|
class AutoCompleteCommand < Redcar::EditTabCommand
|
|
16
|
-
key :osx => "Ctrl+Escape", :linux => "Ctrl+Space",
|
|
17
|
-
:windows => "Ctrl+Space"
|
|
18
24
|
|
|
19
25
|
def execute
|
|
20
26
|
controller = doc.controllers(AutoCompleter::DocumentController).first
|
|
@@ -95,5 +101,53 @@ module Redcar
|
|
|
95
101
|
return [offset+left_range, offset+right_range]
|
|
96
102
|
end
|
|
97
103
|
end
|
|
104
|
+
|
|
105
|
+
class MenuAutoCompleterCommand < AutoCompleteCommand
|
|
106
|
+
|
|
107
|
+
def execute
|
|
108
|
+
controller = doc.controllers(AutoCompleter::DocumentController).first
|
|
109
|
+
input_word = ""
|
|
110
|
+
word_list = controller.word_list
|
|
111
|
+
word, left, right = touched_word
|
|
112
|
+
if word
|
|
113
|
+
iterator = WordIterator.new(doc, WORD_CHARACTERS)
|
|
114
|
+
word_list = WordList.new
|
|
115
|
+
iterator.each_word_with_offset(word) do |matching_word, offset|
|
|
116
|
+
distance = (offset - doc.cursor_offset).abs
|
|
117
|
+
unless (distance - matching_word.length) == 0
|
|
118
|
+
word_list.add_word(matching_word, distance)
|
|
119
|
+
else
|
|
120
|
+
input_word = matching_word
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
controller.word_list = word_list
|
|
124
|
+
controller.word = word
|
|
125
|
+
controller.left = left
|
|
126
|
+
controller.right = right
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
cur_doc = doc
|
|
130
|
+
builder = Menu::Builder.new do
|
|
131
|
+
word_list.words.each do |current_word, word_distance|
|
|
132
|
+
item(current_word) do
|
|
133
|
+
cur_doc.insert(cur_doc.cursor_offset, current_word[input_word.length..current_word.length])
|
|
134
|
+
cur_doc.cursor_offset = cur_doc.cursor_offset + current_word[input_word.length..current_word.length].length
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
window = Redcar.app.focussed_window
|
|
140
|
+
location = window.focussed_notebook.focussed_tab.controller.edit_view.mate_text.viewer.getTextWidget.getLocationAtOffset(window.focussed_notebook.focussed_tab.controller.edit_view.cursor_offset)
|
|
141
|
+
absolute_x = location.x
|
|
142
|
+
absolute_y = location.y
|
|
143
|
+
location = window.focussed_notebook.focussed_tab.controller.edit_view.mate_text.viewer.getTextWidget.toDisplay(0,0)
|
|
144
|
+
absolute_x += location.x
|
|
145
|
+
absolute_y += location.y
|
|
146
|
+
menu = ApplicationSWT::Menu.new(window.controller, builder.menu, nil, Swt::SWT::POP_UP)
|
|
147
|
+
menu.move(absolute_x, absolute_y)
|
|
148
|
+
menu.show
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
end
|
|
98
152
|
end
|
|
99
153
|
end
|
data/plugins/core/lib/core.rb
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
|
|
2
|
+
require 'java'
|
|
2
3
|
require 'fileutils'
|
|
3
4
|
|
|
4
5
|
require "core/logger"
|
|
6
|
+
require "core/reentry_helpers"
|
|
5
7
|
require "core/controller"
|
|
6
8
|
require "core/gui"
|
|
9
|
+
require "core/interface"
|
|
7
10
|
require "core/model"
|
|
8
11
|
require "core/observable"
|
|
12
|
+
require "core/observable_struct"
|
|
9
13
|
require "core/plugin"
|
|
10
14
|
require "core/plugin/storage"
|
|
11
15
|
|
|
@@ -18,9 +22,7 @@ module Redcar
|
|
|
18
22
|
unless File.exist?(Redcar.user_dir)
|
|
19
23
|
FileUtils.mkdir(Redcar.user_dir)
|
|
20
24
|
end
|
|
21
|
-
|
|
22
25
|
end
|
|
23
|
-
|
|
26
|
+
|
|
24
27
|
end
|
|
25
28
|
end
|
|
26
|
-
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# This module helps API authors to document the interfaces their API requires objects
|
|
2
|
+
# to implement.
|
|
3
|
+
#
|
|
4
|
+
# Example.
|
|
5
|
+
#
|
|
6
|
+
# The EditView class allows plugins to register tab handlers. A tab handler must implement
|
|
7
|
+
# the "handle" method:
|
|
8
|
+
#
|
|
9
|
+
# class MyTabHandler
|
|
10
|
+
# def handle(edit_view)
|
|
11
|
+
# end
|
|
12
|
+
# end
|
|
13
|
+
#
|
|
14
|
+
# The EditView class wants to check that the object (at least minimally) conforms to the
|
|
15
|
+
# tab handler interface, so it defines an 'example' module and mixes in Interface::Abstract.
|
|
16
|
+
#
|
|
17
|
+
# class EditView
|
|
18
|
+
# module Handler
|
|
19
|
+
# include Interface::Abstract
|
|
20
|
+
#
|
|
21
|
+
# def handle(edit_view)
|
|
22
|
+
# end
|
|
23
|
+
# end
|
|
24
|
+
#
|
|
25
|
+
# The Abstract module will not allow this example interface to be mixed in anywhere.
|
|
26
|
+
# To verify that any given object conforms to the interface, EditView calls verify_interface!:
|
|
27
|
+
#
|
|
28
|
+
# def self.register_tab_handler(tab_handler)
|
|
29
|
+
# EditView::Handler.verify_interface!(tab_handler)
|
|
30
|
+
# @tab_handlers << tab_handler
|
|
31
|
+
# end
|
|
32
|
+
# end
|
|
33
|
+
#
|
|
34
|
+
# This will raise an error if the instance does not implement all the methods in the example
|
|
35
|
+
# interface with the correct aritys.
|
|
36
|
+
class Interface
|
|
37
|
+
module Abstract
|
|
38
|
+
def self.included(klass)
|
|
39
|
+
klass.class_eval do
|
|
40
|
+
def self.included(klass)
|
|
41
|
+
raise "#{klass} is trying to mixin #{self}, which is an abstract interface"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.verify_interface!(instance)
|
|
45
|
+
Interface.verify!(self, instance)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
class BadInterfaceError < StandardError; end
|
|
52
|
+
|
|
53
|
+
def self.verify(interface, instance)
|
|
54
|
+
interface.instance_methods.all? do |method_name|
|
|
55
|
+
method = interface.instance_method(method_name)
|
|
56
|
+
instance.respond_to?(method_name) and
|
|
57
|
+
instance.method(method_name).arity == method.arity
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def self.verify!(interface, instance)
|
|
62
|
+
interface.instance_methods.each do |method_name|
|
|
63
|
+
method = interface.instance_method(method_name)
|
|
64
|
+
unless instance.respond_to?(method_name)
|
|
65
|
+
raise BadInterfaceError, "expected #{instance.inspect} to implement #{interface}, but was missing :#{method_name}"
|
|
66
|
+
end
|
|
67
|
+
unless instance.method(method_name).arity == method.arity
|
|
68
|
+
raise BadInterfaceError, "expected #{instance.inspect} to implement #{interface}, but :#{method_name} arity was not #{method.arity}"
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
true
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -58,7 +58,7 @@ module Redcar
|
|
|
58
58
|
:after => 1
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
# Attach a block to be called when any of the hooks in
|
|
61
|
+
# Attach a block to be called when any of the hooks in event_names are
|
|
62
62
|
# called.
|
|
63
63
|
#
|
|
64
64
|
# @param [Array<Symbol>] names of the events to attach to
|
|
@@ -76,6 +76,17 @@ module Redcar
|
|
|
76
76
|
block
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
+
# Same as add_listener
|
|
80
|
+
# but only adds the listener once, based on
|
|
81
|
+
# @param [key]
|
|
82
|
+
def add_listener_at_most_once(key, *event_names)
|
|
83
|
+
@already_here ||= {}
|
|
84
|
+
unless @already_here[key]
|
|
85
|
+
add_listener(*event_names) { |*args| yield(*args) }
|
|
86
|
+
@already_here[key] = true
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
79
90
|
# Remove a listener from this object.
|
|
80
91
|
#
|
|
81
92
|
# @param [Handler] an event handler as returned by add_listener
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# Adds Redcar::Observable to Struct. e.g:
|
|
3
|
+
#
|
|
4
|
+
# irb> Customer = ObservableStruct.new(:name, :address)
|
|
5
|
+
# => Customer
|
|
6
|
+
# irb> customer = Customer.new("Dave", "123 Main")
|
|
7
|
+
# => #<Customer name="Dave", address="123 Main">
|
|
8
|
+
# irb> customer.add_listener(:changed_name) { |new_name| puts "the new name is: #{new_name}" }
|
|
9
|
+
# => #<Proc:0x65f4cdd2@(irb):203>
|
|
10
|
+
# irb> customer.name = "Dan"
|
|
11
|
+
# the new name is Dan
|
|
12
|
+
# => #<Customer name="Dan", address="123 Main">
|
|
13
|
+
class ObservableStruct
|
|
14
|
+
def self.new(*args)
|
|
15
|
+
klass = Struct.new(*args)
|
|
16
|
+
klass.send(:include, Redcar::Observable)
|
|
17
|
+
if args.first.is_a?(String)
|
|
18
|
+
accessors = args[1..-1]
|
|
19
|
+
else
|
|
20
|
+
accessors = args
|
|
21
|
+
end
|
|
22
|
+
accessors.each do |accessor|
|
|
23
|
+
klass.class_eval %Q{
|
|
24
|
+
alias_method :real_#{accessor}=, :#{accessor}=
|
|
25
|
+
def #{accessor}=(val)
|
|
26
|
+
notify_listeners(:changed_#{accessor}, val) do
|
|
27
|
+
self.real_#{accessor} = val
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
klass
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
module Redcar
|
|
3
3
|
class Plugin
|
|
4
4
|
class Storage
|
|
5
|
-
|
|
5
|
+
class << self
|
|
6
|
+
attr_writer :storage_dir
|
|
7
|
+
end
|
|
8
|
+
|
|
6
9
|
def self.storage_dir
|
|
7
|
-
Redcar.user_dir
|
|
10
|
+
@user_dir ||= Redcar.user_dir
|
|
8
11
|
end
|
|
9
12
|
|
|
10
13
|
# Open a storage file or create it if it doesn't exist.
|
|
@@ -12,7 +15,6 @@ module Redcar
|
|
|
12
15
|
# @param [String] a (short) name, should be suitable for use as a filename
|
|
13
16
|
def initialize(name)
|
|
14
17
|
@name = name
|
|
15
|
-
@storage = {}
|
|
16
18
|
rollback
|
|
17
19
|
end
|
|
18
20
|
|
|
@@ -33,16 +35,27 @@ module Redcar
|
|
|
33
35
|
self
|
|
34
36
|
end
|
|
35
37
|
|
|
38
|
+
# retrieve key value
|
|
39
|
+
# note: it does not re-read from disk before returning you this value
|
|
36
40
|
def [](key)
|
|
37
41
|
@storage[key]
|
|
38
42
|
end
|
|
39
43
|
|
|
44
|
+
# set key to value
|
|
45
|
+
# note: it automatically saves this to disk
|
|
40
46
|
def []=(key, value)
|
|
41
47
|
@storage[key] = value
|
|
42
48
|
save
|
|
43
49
|
value
|
|
44
50
|
end
|
|
45
51
|
|
|
52
|
+
def set_default(key, value)
|
|
53
|
+
unless @storage[key]
|
|
54
|
+
self[key] = value
|
|
55
|
+
end
|
|
56
|
+
value
|
|
57
|
+
end
|
|
58
|
+
|
|
46
59
|
def keys
|
|
47
60
|
@storage.keys
|
|
48
61
|
end
|
|
@@ -97,6 +97,19 @@ describe Redcar::Observable do
|
|
|
97
97
|
@value.should be_nil
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
it "hooks only once if desired" do
|
|
103
|
+
sum = 0
|
|
104
|
+
2.times {
|
|
105
|
+
@obj.add_listener_at_most_once(self, :christmas) do
|
|
106
|
+
sum += 1
|
|
107
|
+
end
|
|
108
|
+
}
|
|
109
|
+
@obj.trigger_event(:christmas)
|
|
110
|
+
sum.should == 1
|
|
111
|
+
end
|
|
112
|
+
|
|
100
113
|
end
|
|
101
114
|
|
|
102
115
|
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
require File.join(File.dirname(__FILE__), "..", "spec_helper")
|
|
3
3
|
|
|
4
4
|
describe Redcar::Plugin::Storage do
|
|
5
|
+
|
|
5
6
|
it "acts like a hash" do
|
|
6
7
|
storage = Redcar::Plugin::Storage.new('test')
|
|
7
8
|
storage[:some_key] = "some value"
|
|
8
9
|
storage[:some_key].should == "some value"
|
|
9
10
|
storage[:some_key] = "some other value"
|
|
10
11
|
storage[:some_key].should == "some other value"
|
|
12
|
+
|
|
13
|
+
FileUtils.rm_rf(storage.send(:path))
|
|
11
14
|
end
|
|
12
15
|
|
|
13
16
|
it "saves to disk" do
|
|
@@ -17,5 +20,20 @@ describe Redcar::Plugin::Storage do
|
|
|
17
20
|
storage[:some_key].should == "some value"
|
|
18
21
|
|
|
19
22
|
FileUtils.rm_rf(storage.send(:path))
|
|
23
|
+
storage = Redcar::Plugin::Storage.new('test_storage_saved')
|
|
24
|
+
storage[:some_key].should be_nil
|
|
20
25
|
end
|
|
26
|
+
|
|
27
|
+
it "has a set default method" do
|
|
28
|
+
storage = Redcar::Plugin::Storage.new('test_storage_saved')
|
|
29
|
+
storage.set_default('a', 'b')
|
|
30
|
+
storage['a'].should == 'b'
|
|
31
|
+
storage = Redcar::Plugin::Storage.new('test_storage_saved')
|
|
32
|
+
storage['a'].should == 'b'
|
|
33
|
+
storage['a'] = 'c'
|
|
34
|
+
storage['a'].should == 'c'
|
|
35
|
+
storage = Redcar::Plugin::Storage.new('test_storage_saved')
|
|
36
|
+
storage['a'].should == 'c'
|
|
37
|
+
end
|
|
38
|
+
|
|
21
39
|
end
|
|
@@ -22,7 +22,7 @@ Feature: Cut and Paste
|
|
|
22
22
|
And I cut text
|
|
23
23
|
And I move the cursor to 2
|
|
24
24
|
And I paste text
|
|
25
|
-
Then
|
|
25
|
+
Then the contents should be "nkFra<c>"
|
|
26
26
|
|
|
27
27
|
Scenario: Paste inserts the copied text
|
|
28
28
|
When I open a new edit tab
|
|
@@ -32,6 +32,7 @@ Feature: Cut and Paste
|
|
|
32
32
|
And I move the cursor to 2
|
|
33
33
|
And I paste text
|
|
34
34
|
Then I should see "FrFraank" in the edit tab
|
|
35
|
+
Then the contents should be "FrFra<c>ank"
|
|
35
36
|
|
|
36
37
|
Scenario: Paste pastes the most recent copy
|
|
37
38
|
When I open a new edit tab
|
|
@@ -42,4 +43,5 @@ Feature: Cut and Paste
|
|
|
42
43
|
And I copy text
|
|
43
44
|
And I move the cursor to 0
|
|
44
45
|
And I paste text
|
|
45
|
-
Then
|
|
46
|
+
Then the contents should be "nk<c>Frank"
|
|
47
|
+
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
Feature: Soft and hard tabs
|
|
2
|
+
|
|
3
|
+
Scenario: Move left through soft tabs
|
|
4
|
+
When I open a new edit tab
|
|
5
|
+
And tabs are soft, 2 spaces
|
|
6
|
+
And I replace the contents with " "
|
|
7
|
+
And I move the cursor to 4
|
|
8
|
+
And I press the Left key in the edit tab
|
|
9
|
+
Then the cursor should be at 2
|
|
10
|
+
|
|
11
|
+
Scenario: Move right through soft tabs
|
|
12
|
+
When I open a new edit tab
|
|
13
|
+
And tabs are soft, 2 spaces
|
|
14
|
+
And I replace the contents with " "
|
|
15
|
+
And I move the cursor to 0
|
|
16
|
+
And I press the Right key in the edit tab
|
|
17
|
+
Then the cursor should be at 2
|
|
18
|
+
|
|
19
|
+
Scenario: Moves left through part of a soft tab
|
|
20
|
+
When I open a new edit tab
|
|
21
|
+
And tabs are soft, 4 spaces
|
|
22
|
+
And I replace the contents with "Hacker "
|
|
23
|
+
And I move the cursor to 8
|
|
24
|
+
And I press the Left key in the edit tab
|
|
25
|
+
Then the cursor should be at 6
|
|
26
|
+
|
|
27
|
+
Scenario: Moves right through part of a soft tab
|
|
28
|
+
When I open a new edit tab
|
|
29
|
+
And tabs are soft, 4 spaces
|
|
30
|
+
And I replace the contents with "Hacker "
|
|
31
|
+
And I move the cursor to 6
|
|
32
|
+
And I press the Right key in the edit tab
|
|
33
|
+
Then the cursor should be at 8
|
|
34
|
+
|
|
35
|
+
Scenario: Moves left through spaces that don't make a full tab
|
|
36
|
+
When I open a new edit tab
|
|
37
|
+
And tabs are soft, 4 spaces
|
|
38
|
+
And I replace the contents with "Hacker "
|
|
39
|
+
And I move the cursor to 10
|
|
40
|
+
And I press the Left key in the edit tab
|
|
41
|
+
Then the cursor should be at 9
|
|
42
|
+
|
|
43
|
+
Scenario: Moves right through spaces that don't make a full tab
|
|
44
|
+
When I open a new edit tab
|
|
45
|
+
And tabs are soft, 4 spaces
|
|
46
|
+
And I replace the contents with "Hacker "
|
|
47
|
+
And I move the cursor to 8
|
|
48
|
+
And I press the Right key in the edit tab
|
|
49
|
+
Then the cursor should be at 9
|
|
50
|
+
|
|
51
|
+
Scenario: Shouldn't die if the cursor is at the start of the document
|
|
52
|
+
When I open a new edit tab
|
|
53
|
+
And tabs are soft, 4 spaces
|
|
54
|
+
And I replace the contents with ""
|
|
55
|
+
And I move the cursor to 0
|
|
56
|
+
And I press the Left key in the edit tab
|
|
57
|
+
Then the cursor should be at 0
|
|
58
|
+
|
|
59
|
+
Scenario: Shouldn't die if the cursor is at the end of the document
|
|
60
|
+
When I open a new edit tab
|
|
61
|
+
And tabs are soft, 4 spaces
|
|
62
|
+
And I replace the contents with ""
|
|
63
|
+
And I move the cursor to 0
|
|
64
|
+
And I press the Right key in the edit tab
|
|
65
|
+
Then the cursor should be at 0
|
|
66
|
+
|
|
67
|
+
Scenario: Move left through soft tabs, with a tab character
|
|
68
|
+
When I open a new edit tab
|
|
69
|
+
And tabs are soft, 4 spaces
|
|
70
|
+
And I replace the contents with "\tHa "
|
|
71
|
+
And I move the cursor to 1
|
|
72
|
+
And I press the Left key in the edit tab
|
|
73
|
+
Then the cursor should be at 0
|
|
74
|
+
|
|
75
|
+
Scenario: Move left through soft tabs 2, with a tab character
|
|
76
|
+
When I open a new edit tab
|
|
77
|
+
And tabs are soft, 4 spaces
|
|
78
|
+
And I replace the contents with "\tHa "
|
|
79
|
+
And I move the cursor to 2
|
|
80
|
+
And I press the Left key in the edit tab
|
|
81
|
+
Then the cursor should be at 1
|
|
82
|
+
|
|
83
|
+
Scenario: Move left through soft tabs 2, with a tab character
|
|
84
|
+
When I open a new edit tab
|
|
85
|
+
And tabs are soft, 4 spaces
|
|
86
|
+
And I replace the contents with "\tHa "
|
|
87
|
+
And I move the cursor to 4
|
|
88
|
+
And I press the Left key in the edit tab
|
|
89
|
+
Then the cursor should be at 3
|
|
90
|
+
|
|
91
|
+
Scenario: Move left through soft tabs 3, with a tab character
|
|
92
|
+
When I open a new edit tab
|
|
93
|
+
And tabs are soft, 4 spaces
|
|
94
|
+
And I replace the contents with "\tHa "
|
|
95
|
+
And I move the cursor to 5
|
|
96
|
+
And I press the Left key in the edit tab
|
|
97
|
+
Then the cursor should be at 3
|
|
98
|
+
|
|
99
|
+
Scenario: Move left through soft tabs 4, with a tab character
|
|
100
|
+
When I open a new edit tab
|
|
101
|
+
And tabs are soft, 4 spaces
|
|
102
|
+
And I replace the contents with "\tHa "
|
|
103
|
+
And I move the cursor to 6
|
|
104
|
+
And I press the Left key in the edit tab
|
|
105
|
+
Then the cursor should be at 5
|
|
106
|
+
|
|
107
|
+
Scenario: Move right through soft tabs, with a tab character
|
|
108
|
+
When I open a new edit tab
|
|
109
|
+
And tabs are soft, 4 spaces
|
|
110
|
+
And I replace the contents with "\tHa "
|
|
111
|
+
And I move the cursor to 0
|
|
112
|
+
And I press the Right key in the edit tab
|
|
113
|
+
Then the cursor should be at 1
|
|
114
|
+
|
|
115
|
+
Scenario: Move right through soft tabs 2, with a tab character
|
|
116
|
+
When I open a new edit tab
|
|
117
|
+
And tabs are soft, 4 spaces
|
|
118
|
+
And I replace the contents with "\tHa "
|
|
119
|
+
And I move the cursor to 1
|
|
120
|
+
And I press the Right key in the edit tab
|
|
121
|
+
Then the cursor should be at 2
|
|
122
|
+
|
|
123
|
+
Scenario: Move right through soft tabs 2, with a tab character
|
|
124
|
+
When I open a new edit tab
|
|
125
|
+
And tabs are soft, 4 spaces
|
|
126
|
+
And I replace the contents with "\tHa "
|
|
127
|
+
And I move the cursor to 3
|
|
128
|
+
And I press the Right key in the edit tab
|
|
129
|
+
Then the cursor should be at 5
|
|
130
|
+
|
|
131
|
+
Scenario: Move right through soft tabs 3, with a tab character
|
|
132
|
+
When I open a new edit tab
|
|
133
|
+
And tabs are soft, 4 spaces
|
|
134
|
+
And I replace the contents with "\tHa "
|
|
135
|
+
And I move the cursor to 5
|
|
136
|
+
And I press the Right key in the edit tab
|
|
137
|
+
Then the cursor should be at 6
|
|
138
|
+
|
|
139
|
+
Scenario: Move left through soft tabs, with a tab character ahead
|
|
140
|
+
When I open a new edit tab
|
|
141
|
+
And tabs are soft, 4 spaces
|
|
142
|
+
And I replace the contents with " Wo\t"
|
|
143
|
+
And I move the cursor to 4
|
|
144
|
+
And I press the Left key in the edit tab
|
|
145
|
+
Then the cursor should be at 0
|
|
146
|
+
|
|
147
|
+
Scenario: Select left through soft tabs
|
|
148
|
+
When I open a new edit tab
|
|
149
|
+
And tabs are soft, 2 spaces
|
|
150
|
+
And I replace the contents with " "
|
|
151
|
+
And I move the cursor to 4
|
|
152
|
+
And I press Shift+Left key in the edit tab
|
|
153
|
+
Then the contents should be " <c> <s>"
|
|
154
|
+
|
|
155
|
+
Scenario: Select right through soft tabs
|
|
156
|
+
When I open a new edit tab
|
|
157
|
+
And tabs are soft, 2 spaces
|
|
158
|
+
And I replace the contents with " "
|
|
159
|
+
And I move the cursor to 2
|
|
160
|
+
And I press Shift+Right key in the edit tab
|
|
161
|
+
Then the contents should be " <s> <c>"
|
|
162
|
+
|
|
163
|
+
Scenario: Select left twice through soft tabs
|
|
164
|
+
When I open a new edit tab
|
|
165
|
+
And tabs are soft, 2 spaces
|
|
166
|
+
And I replace the contents with " "
|
|
167
|
+
And I move the cursor to 4
|
|
168
|
+
And I press Shift+Left key in the edit tab
|
|
169
|
+
And I press Shift+Left key in the edit tab
|
|
170
|
+
Then the contents should be "<c> <s>"
|
|
171
|
+
|
|
172
|
+
Scenario: Select right through soft tabs
|
|
173
|
+
When I open a new edit tab
|
|
174
|
+
And tabs are soft, 2 spaces
|
|
175
|
+
And I replace the contents with " "
|
|
176
|
+
And I move the cursor to 0
|
|
177
|
+
And I press Shift+Right key in the edit tab
|
|
178
|
+
And I press Shift+Right key in the edit tab
|
|
179
|
+
Then the contents should be "<s> <c>"
|
|
180
|
+
|
|
181
|
+
Scenario: Shouldn't die if the cursor is at the start of the document
|
|
182
|
+
When I open a new edit tab
|
|
183
|
+
And tabs are soft, 4 spaces
|
|
184
|
+
And I replace the contents with ""
|
|
185
|
+
And I move the cursor to 0
|
|
186
|
+
And I press Shift+Left key in the edit tab
|
|
187
|
+
Then the cursor should be at 0
|
|
188
|
+
|
|
189
|
+
Scenario: Shouldn't die if the cursor is at the end of the document
|
|
190
|
+
When I open a new edit tab
|
|
191
|
+
And tabs are soft, 4 spaces
|
|
192
|
+
And I replace the contents with ""
|
|
193
|
+
And I move the cursor to 0
|
|
194
|
+
And I press Shift+Right key in the edit tab
|
|
195
|
+
Then the cursor should be at 0
|
|
196
|
+
|
|
197
|
+
Scenario: Can backspace a soft tab
|
|
198
|
+
When I open a new edit tab
|
|
199
|
+
And tabs are soft, 4 spaces
|
|
200
|
+
And I replace the contents with " "
|
|
201
|
+
And I move the cursor to 4
|
|
202
|
+
And I press the Backspace key in the edit tab
|
|
203
|
+
Then the contents should be "<c>"
|
|
204
|
+
|
|
205
|
+
Scenario: Can backspace part of a soft tab
|
|
206
|
+
When I open a new edit tab
|
|
207
|
+
And tabs are soft, 4 spaces
|
|
208
|
+
And I replace the contents with "Ha "
|
|
209
|
+
And I move the cursor to 4
|
|
210
|
+
And I press the Backspace key in the edit tab
|
|
211
|
+
Then the contents should be "Ha<c>"
|
|
212
|
+
|
|
213
|
+
Scenario: Can delete a soft tab
|
|
214
|
+
When I open a new edit tab
|
|
215
|
+
And tabs are soft, 4 spaces
|
|
216
|
+
And I replace the contents with " "
|
|
217
|
+
And I move the cursor to 0
|
|
218
|
+
And I press the Delete key in the edit tab
|
|
219
|
+
Then the contents should be "<c>"
|
|
220
|
+
|
|
221
|
+
Scenario: Can delete part of a soft tab
|
|
222
|
+
When I open a new edit tab
|
|
223
|
+
And tabs are soft, 4 spaces
|
|
224
|
+
And I replace the contents with "Ha "
|
|
225
|
+
And I move the cursor to 2
|
|
226
|
+
And I press the Delete key in the edit tab
|
|
227
|
+
Then the contents should be "Ha<c>"
|
|
228
|
+
|
|
229
|
+
Scenario: Move left at the start of a line
|
|
230
|
+
When I open a new edit tab
|
|
231
|
+
And I replace the contents with "Hi\nHo"
|
|
232
|
+
And I move the cursor to 3
|
|
233
|
+
And I press the Left key in the edit tab
|
|
234
|
+
Then the contents should be "Hi<c>\nHo"
|
|
235
|
+
|
|
236
|
+
Scenario: Shouldn't die if the cursor is at the end of the document
|
|
237
|
+
When I open a new edit tab
|
|
238
|
+
And tabs are soft, 4 spaces
|
|
239
|
+
And I replace the contents with ""
|
|
240
|
+
And I move the cursor to 0
|
|
241
|
+
And I press the Delete key in the edit tab
|
|
242
|
+
Then the cursor should be at 0
|
|
243
|
+
|