abiquo-etk 0.4.13
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +87 -0
- data/TODO +6 -0
- data/VERSION +1 -0
- data/abiquo-etk.gemspec +577 -0
- data/abiquo-etk.spec +125 -0
- data/bin/abicli +90 -0
- data/bin/abiquo-check-16-install +129 -0
- data/bin/aetk-setup-rs +36 -0
- data/bin/aetk-setup-server +77 -0
- data/bin/aetk-setup-v2v +33 -0
- data/lib/abicli/commands/remote-services-settings.rb +24 -0
- data/lib/abicli/commands/server-settings.rb +22 -0
- data/lib/abicli/commands/set.rb +133 -0
- data/lib/abicli/commands/smoketest.rb +93 -0
- data/lib/abicli/commands/upload-template.rb +272 -0
- data/lib/abicli/commands/version.rb +5 -0
- data/lib/abiquo-etk.rb +191 -0
- data/lib/checks/01detect_abiquo.rb +4 -0
- data/lib/checks/abiquo_service.rb +34 -0
- data/lib/checks/abiquo_version.rb +24 -0
- data/lib/checks/components_installed.rb +6 -0
- data/lib/checks/firewall.rb +10 -0
- data/lib/checks/hv_passwords.rb +51 -0
- data/lib/checks/install_type.rb +8 -0
- data/lib/checks/java.rb +19 -0
- data/lib/checks/mysql.rb +33 -0
- data/lib/checks/nfs.rb +18 -0
- data/lib/checks/os_version.rb +5 -0
- data/lib/checks/virtualbox.rb +11 -0
- data/scripts/setup_rs +44 -0
- data/scripts/setup_v2v +1 -0
- data/vendor/activesupport-2.3.8/CHANGELOG +1367 -0
- data/vendor/activesupport-2.3.8/README +43 -0
- data/vendor/activesupport-2.3.8/lib/active_support/all.rb +8 -0
- data/vendor/activesupport-2.3.8/lib/active_support/backtrace_cleaner.rb +72 -0
- data/vendor/activesupport-2.3.8/lib/active_support/base64.rb +33 -0
- data/vendor/activesupport-2.3.8/lib/active_support/basic_object.rb +24 -0
- data/vendor/activesupport-2.3.8/lib/active_support/buffered_logger.rb +127 -0
- data/vendor/activesupport-2.3.8/lib/active_support/cache/compressed_mem_cache_store.rb +20 -0
- data/vendor/activesupport-2.3.8/lib/active_support/cache/drb_store.rb +14 -0
- data/vendor/activesupport-2.3.8/lib/active_support/cache/file_store.rb +72 -0
- data/vendor/activesupport-2.3.8/lib/active_support/cache/mem_cache_store.rb +143 -0
- data/vendor/activesupport-2.3.8/lib/active_support/cache/memory_store.rb +58 -0
- data/vendor/activesupport-2.3.8/lib/active_support/cache/strategy/local_cache.rb +104 -0
- data/vendor/activesupport-2.3.8/lib/active_support/cache/synchronized_memory_store.rb +47 -0
- data/vendor/activesupport-2.3.8/lib/active_support/cache.rb +248 -0
- data/vendor/activesupport-2.3.8/lib/active_support/callbacks.rb +279 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/array/access.rb +53 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/array/conversions.rb +197 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/array/extract_options.rb +20 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/array/grouping.rb +106 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/array/random_access.rb +22 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/array/wrapper.rb +24 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/array.rb +15 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/base64/encoding.rb +16 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/base64.rb +4 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/benchmark.rb +19 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/bigdecimal/conversions.rb +37 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/bigdecimal.rb +6 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/blank.rb +2 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/cgi.rb +5 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/class/attribute_accessors.rb +61 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/class/delegating_attributes.rb +47 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/class/removal.rb +50 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/class.rb +4 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/date/behavior.rb +42 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/date/calculations.rb +241 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/date/conversions.rb +107 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/date.rb +10 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/date_time/calculations.rb +126 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/date_time/conversions.rb +107 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/date_time.rb +12 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb +43 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/enumerable.rb +120 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/exception.rb +45 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/file/atomic.rb +47 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/file.rb +5 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/float/rounding.rb +24 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/float/time.rb +27 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/float.rb +7 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/hash/conversions.rb +247 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/hash/diff.rb +19 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/hash/except.rb +25 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/hash/indifferent_access.rb +143 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/hash/keys.rb +52 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/hash/reverse_merge.rb +35 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/hash/slice.rb +40 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/hash.rb +14 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/integer/even_odd.rb +29 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/integer/inflections.rb +20 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/integer/time.rb +45 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/integer.rb +9 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/kernel/daemonizing.rb +7 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/kernel/debugger.rb +16 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/kernel/reporting.rb +59 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/kernel/requires.rb +24 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/kernel.rb +5 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/load_error.rb +38 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/logger.rb +145 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/aliasing.rb +74 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/attr_internal.rb +32 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/attribute_accessors.rb +67 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/delegation.rb +135 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/inclusion.rb +30 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/introspection.rb +90 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/loading.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/model_naming.rb +25 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module/synchronization.rb +39 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/module.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/name_error.rb +19 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/numeric/bytes.rb +50 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/numeric/conversions.rb +19 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/numeric/time.rb +81 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/numeric.rb +9 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/object/blank.rb +76 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/object/conversions.rb +15 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/object/extending.rb +80 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/object/instance_variables.rb +74 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/object/metaclass.rb +14 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/object/misc.rb +90 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/object/singleton_class.rb +13 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/object.rb +7 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/pathname.rb +7 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/proc.rb +12 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/process/daemon.rb +25 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/process.rb +1 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/range/blockless_step.rb +32 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/range/conversions.rb +27 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/range/include_range.rb +30 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/range/overlaps.rb +15 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/range.rb +11 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/rexml.rb +41 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/access.rb +106 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/behavior.rb +13 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/bytesize.rb +5 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/conversions.rb +28 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/filters.rb +26 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/inflections.rb +167 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/iterators.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/multibyte.rb +81 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/output_safety.rb +112 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/starts_ends_with.rb +33 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string/xchar.rb +11 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/string.rb +24 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/symbol.rb +14 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/time/behavior.rb +13 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/time/calculations.rb +313 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/time/conversions.rb +90 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/time/zones.rb +86 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/time.rb +46 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/try.rb +36 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext/uri.rb +16 -0
- data/vendor/activesupport-2.3.8/lib/active_support/core_ext.rb +8 -0
- data/vendor/activesupport-2.3.8/lib/active_support/dependencies.rb +625 -0
- data/vendor/activesupport-2.3.8/lib/active_support/deprecation.rb +197 -0
- data/vendor/activesupport-2.3.8/lib/active_support/duration.rb +100 -0
- data/vendor/activesupport-2.3.8/lib/active_support/gzip.rb +25 -0
- data/vendor/activesupport-2.3.8/lib/active_support/inflections.rb +56 -0
- data/vendor/activesupport-2.3.8/lib/active_support/inflector.rb +409 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/backends/jsongem.rb +37 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/backends/yajl.rb +40 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/backends/yaml.rb +87 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/decoding.rb +50 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/date.rb +22 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/date_time.rb +22 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/enumerable.rb +17 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/false_class.rb +7 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/hash.rb +56 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/nil_class.rb +7 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/numeric.rb +21 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/object.rb +10 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/regexp.rb +9 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/string.rb +9 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/symbol.rb +5 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/time.rb +22 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoders/true_class.rb +7 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/encoding.rb +111 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json/variable.rb +10 -0
- data/vendor/activesupport-2.3.8/lib/active_support/json.rb +2 -0
- data/vendor/activesupport-2.3.8/lib/active_support/locale/en.yml +33 -0
- data/vendor/activesupport-2.3.8/lib/active_support/memoizable.rb +100 -0
- data/vendor/activesupport-2.3.8/lib/active_support/message_encryptor.rb +70 -0
- data/vendor/activesupport-2.3.8/lib/active_support/message_verifier.rb +79 -0
- data/vendor/activesupport-2.3.8/lib/active_support/multibyte/chars.rb +707 -0
- data/vendor/activesupport-2.3.8/lib/active_support/multibyte/exceptions.rb +8 -0
- data/vendor/activesupport-2.3.8/lib/active_support/multibyte/unicode_database.rb +71 -0
- data/vendor/activesupport-2.3.8/lib/active_support/multibyte/utils.rb +60 -0
- data/vendor/activesupport-2.3.8/lib/active_support/multibyte.rb +57 -0
- data/vendor/activesupport-2.3.8/lib/active_support/option_merger.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/ordered_hash.rb +158 -0
- data/vendor/activesupport-2.3.8/lib/active_support/ordered_options.rb +19 -0
- data/vendor/activesupport-2.3.8/lib/active_support/rescuable.rb +108 -0
- data/vendor/activesupport-2.3.8/lib/active_support/secure_random.rb +199 -0
- data/vendor/activesupport-2.3.8/lib/active_support/string_inquirer.rb +21 -0
- data/vendor/activesupport-2.3.8/lib/active_support/test_case.rb +40 -0
- data/vendor/activesupport-2.3.8/lib/active_support/testing/assertions.rb +79 -0
- data/vendor/activesupport-2.3.8/lib/active_support/testing/declarative.rb +21 -0
- data/vendor/activesupport-2.3.8/lib/active_support/testing/default.rb +9 -0
- data/vendor/activesupport-2.3.8/lib/active_support/testing/deprecation.rb +57 -0
- data/vendor/activesupport-2.3.8/lib/active_support/testing/performance.rb +452 -0
- data/vendor/activesupport-2.3.8/lib/active_support/testing/setup_and_teardown.rb +91 -0
- data/vendor/activesupport-2.3.8/lib/active_support/time_with_zone.rb +335 -0
- data/vendor/activesupport-2.3.8/lib/active_support/values/time_zone.rb +412 -0
- data/vendor/activesupport-2.3.8/lib/active_support/values/unicode_tables.dat +0 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record/missing.rb +67 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record/store_procs.rb +38 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record/translation.rb +88 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record.rb +66 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/base.rb +266 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/cache.rb +76 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/cascade.rb +58 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/chain.rb +75 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/cldr.rb +100 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/fallbacks.rb +69 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/fast.rb +69 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/gettext.rb +75 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/helpers.rb +68 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/interpolation_compiler.rb +119 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/links.rb +34 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/metadata.rb +73 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/pluralization.rb +57 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/simple.rb +22 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend.rb +19 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/except.rb +8 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/slice.rb +8 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/object/meta_class.rb +5 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/string/interpolate.rb +99 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/exceptions.rb +61 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext/po_parser.rb +329 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/gettext.rb +25 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/helpers/gettext.rb +65 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/helpers.rb +5 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/locale/fallbacks.rb +98 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag/parents.rb +24 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag/rfc4646.rb +76 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag/simple.rb +41 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/locale/tag.rb +28 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/locale.rb +6 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/version.rb +3 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n.rb +335 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb +1107 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +47 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +228 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +55 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +219 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +40 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +18 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +22 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +283 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +136 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +204 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +161 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +27 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +274 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +194 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +22 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +35 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +232 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +139 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +144 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +131 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +282 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +30 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +74 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +205 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +288 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +196 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +67 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +73 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +161 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +20 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +33 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +27 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +30 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +20 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +30 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +20 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +25 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +18 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +163 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +18 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +24 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +18 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +34 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +35 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +33 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +59 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +47 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +121 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +30 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +33 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +165 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +270 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +187 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +35 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +29 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +193 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +185 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +37 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +185 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +16 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +185 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +163 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +188 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +13 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +232 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +181 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +197 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +276 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +163 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +218 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +168 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +268 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +288 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +211 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +170 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +181 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +232 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +187 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +176 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +215 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +13 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +173 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +165 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +172 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +183 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +170 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +212 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +13 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +202 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +23 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +22 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +20 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +25 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +25 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +52 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +51 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +44 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +98 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +56 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +292 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +508 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +56 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +40 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +94 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +198 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +129 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +33 -0
- data/vendor/activesupport-2.3.8/lib/active_support/vendor.rb +36 -0
- data/vendor/activesupport-2.3.8/lib/active_support/version.rb +9 -0
- data/vendor/activesupport-2.3.8/lib/active_support/whiny_nil.rb +64 -0
- data/vendor/activesupport-2.3.8/lib/active_support/xml_mini/jdom.rb +162 -0
- data/vendor/activesupport-2.3.8/lib/active_support/xml_mini/libxml.rb +73 -0
- data/vendor/activesupport-2.3.8/lib/active_support/xml_mini/libxmlsax.rb +74 -0
- data/vendor/activesupport-2.3.8/lib/active_support/xml_mini/nokogiri.rb +72 -0
- data/vendor/activesupport-2.3.8/lib/active_support/xml_mini/nokogirisax.rb +73 -0
- data/vendor/activesupport-2.3.8/lib/active_support/xml_mini/rexml.rb +108 -0
- data/vendor/activesupport-2.3.8/lib/active_support/xml_mini.rb +31 -0
- data/vendor/activesupport-2.3.8/lib/active_support.rb +60 -0
- data/vendor/activesupport-2.3.8/lib/activesupport.rb +2 -0
- data/vendor/addressable-2.2.1/CHANGELOG +95 -0
- data/vendor/addressable-2.2.1/LICENSE +20 -0
- data/vendor/addressable-2.2.1/README +60 -0
- data/vendor/addressable-2.2.1/Rakefile +42 -0
- data/vendor/addressable-2.2.1/lib/addressable/idna.rb +4871 -0
- data/vendor/addressable-2.2.1/lib/addressable/template.rb +1049 -0
- data/vendor/addressable-2.2.1/lib/addressable/uri.rb +2250 -0
- data/vendor/addressable-2.2.1/lib/addressable/version.rb +36 -0
- data/vendor/addressable-2.2.1/spec/addressable/idna_spec.rb +194 -0
- data/vendor/addressable-2.2.1/spec/addressable/template_spec.rb +2152 -0
- data/vendor/addressable-2.2.1/spec/addressable/uri_spec.rb +4203 -0
- data/vendor/addressable-2.2.1/spec/data/rfc3986.txt +3419 -0
- data/vendor/addressable-2.2.1/tasks/clobber.rake +2 -0
- data/vendor/addressable-2.2.1/tasks/gem.rake +84 -0
- data/vendor/addressable-2.2.1/tasks/git.rake +40 -0
- data/vendor/addressable-2.2.1/tasks/metrics.rake +22 -0
- data/vendor/addressable-2.2.1/tasks/rdoc.rake +26 -0
- data/vendor/addressable-2.2.1/tasks/rubyforge.rake +89 -0
- data/vendor/addressable-2.2.1/tasks/spec.rake +47 -0
- data/vendor/addressable-2.2.1/tasks/yard.rake +26 -0
- data/vendor/addressable-2.2.1/website/index.html +110 -0
- data/vendor/api_ruby_client/Gemfile +10 -0
- data/vendor/api_ruby_client/LICENSE +20 -0
- data/vendor/api_ruby_client/README +39 -0
- data/vendor/api_ruby_client/Rakefile +89 -0
- data/vendor/api_ruby_client/abiquo.gemspec +43 -0
- data/vendor/api_ruby_client/examples/create_dc_and_hv.rb +38 -0
- data/vendor/api_ruby_client/examples/hypervisor_resource.rb +16 -0
- data/vendor/api_ruby_client/examples/rack_resource.rb +38 -0
- data/vendor/api_ruby_client/lib/abiquo.rb +201 -0
- data/vendor/api_ruby_client/lib/core_ext.rb +28 -0
- data/vendor/api_ruby_client/lib/to_xml.rb +22 -0
- data/vendor/api_ruby_client/spec/acceptance/create_resource_spec.rb +43 -0
- data/vendor/api_ruby_client/spec/acceptance/delete_resource_spec.rb +27 -0
- data/vendor/api_ruby_client/spec/acceptance/fetch_resource_collections_spec.rb +55 -0
- data/vendor/api_ruby_client/spec/acceptance/fetch_single_resources_spec.rb +47 -0
- data/vendor/api_ruby_client/spec/acceptance/from_xml_spec.rb +15 -0
- data/vendor/api_ruby_client/spec/acceptance/navigate_linked_resources_spec.rb +61 -0
- data/vendor/api_ruby_client/spec/acceptance/update_resource_spec.rb +26 -0
- data/vendor/api_ruby_client/spec/spec_helper.rb +32 -0
- data/vendor/api_ruby_client/spec/unit/to_xml_spec.rb +56 -0
- data/vendor/fattr-2.1.0/README +347 -0
- data/vendor/fattr-2.1.0/README.erb +82 -0
- data/vendor/fattr-2.1.0/Rakefile +242 -0
- data/vendor/fattr-2.1.0/a.rb +42 -0
- data/vendor/fattr-2.1.0/fattr.gemspec +29 -0
- data/vendor/fattr-2.1.0/lib/fattr.rb +193 -0
- data/vendor/fattr-2.1.0/samples/a.rb +21 -0
- data/vendor/fattr-2.1.0/samples/b.rb +22 -0
- data/vendor/fattr-2.1.0/samples/c.rb +12 -0
- data/vendor/fattr-2.1.0/samples/d.rb +34 -0
- data/vendor/fattr-2.1.0/samples/e.rb +17 -0
- data/vendor/fattr-2.1.0/samples/f.rb +21 -0
- data/vendor/fattr-2.1.0/samples/g.rb +15 -0
- data/vendor/fattr-2.1.0/samples/h.rb +29 -0
- data/vendor/fattr-2.1.0/test/fattr.rb +166 -0
- data/vendor/httpauth-0.1/LICENSE +16 -0
- data/vendor/httpauth-0.1/README +39 -0
- data/vendor/httpauth-0.1/Rakefile +76 -0
- data/vendor/httpauth-0.1/examples/client_digest_secure +132 -0
- data/vendor/httpauth-0.1/examples/server_digest_secure +47 -0
- data/vendor/httpauth-0.1/lib/httpauth/basic.rb +114 -0
- data/vendor/httpauth-0.1/lib/httpauth/constants.rb +14 -0
- data/vendor/httpauth-0.1/lib/httpauth/digest.rb +583 -0
- data/vendor/httpauth-0.1/lib/httpauth/exceptions.rb +6 -0
- data/vendor/httpauth-0.1/lib/httpauth.rb +4 -0
- data/vendor/options-2.3.0/README +186 -0
- data/vendor/options-2.3.0/README.erb +35 -0
- data/vendor/options-2.3.0/Rakefile +371 -0
- data/vendor/options-2.3.0/lib/options.rb +220 -0
- data/vendor/options-2.3.0/options.gemspec +26 -0
- data/vendor/options-2.3.0/samples/a.rb +15 -0
- data/vendor/options-2.3.0/samples/b.rb +50 -0
- data/vendor/options-2.3.0/samples/c.rb +20 -0
- data/vendor/options-2.3.0/samples/d.rb +17 -0
- data/vendor/options-2.3.0/spec/options_spec.rb +38 -0
- data/vendor/options-2.3.0/spec/spec_helper.rb +7 -0
- data/vendor/resourceful-1.0.1/History.txt +39 -0
- data/vendor/resourceful-1.0.1/MIT-LICENSE +21 -0
- data/vendor/resourceful-1.0.1/Manifest +43 -0
- data/vendor/resourceful-1.0.1/README.markdown +92 -0
- data/vendor/resourceful-1.0.1/Rakefile +91 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/abstract_form_data.rb +18 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/authentication_manager.rb +108 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/cache_manager.rb +242 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/exceptions.rb +34 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/header.rb +355 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/http_accessor.rb +103 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/memcache_cache_manager.rb +75 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/multipart_form_data.rb +46 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/net_http_adapter.rb +84 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/request.rb +235 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/resource.rb +179 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/response.rb +221 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/simple.rb +36 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/stubbed_resource_proxy.rb +47 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/urlencoded_form_data.rb +17 -0
- data/vendor/resourceful-1.0.1/lib/resourceful/util.rb +6 -0
- data/vendor/resourceful-1.0.1/lib/resourceful.rb +26 -0
- data/vendor/resourceful-1.0.1/resourceful.gemspec +51 -0
- data/vendor/resourceful-1.0.1/spec/acceptance/authorization_spec.rb +16 -0
- data/vendor/resourceful-1.0.1/spec/acceptance/caching_spec.rb +190 -0
- data/vendor/resourceful-1.0.1/spec/acceptance/header_spec.rb +24 -0
- data/vendor/resourceful-1.0.1/spec/acceptance/redirecting_spec.rb +12 -0
- data/vendor/resourceful-1.0.1/spec/acceptance/resource_spec.rb +84 -0
- data/vendor/resourceful-1.0.1/spec/acceptance/resourceful_spec.rb +56 -0
- data/vendor/resourceful-1.0.1/spec/acceptance_shared_specs.rb +44 -0
- data/vendor/resourceful-1.0.1/spec/caching_spec.rb +89 -0
- data/vendor/resourceful-1.0.1/spec/old_acceptance_specs.rb +378 -0
- data/vendor/resourceful-1.0.1/spec/resourceful/header_spec.rb +153 -0
- data/vendor/resourceful-1.0.1/spec/resourceful/http_accessor_spec.rb +56 -0
- data/vendor/resourceful-1.0.1/spec/resourceful/multipart_form_data_spec.rb +77 -0
- data/vendor/resourceful-1.0.1/spec/resourceful/resource_spec.rb +20 -0
- data/vendor/resourceful-1.0.1/spec/resourceful/response_spec.rb +51 -0
- data/vendor/resourceful-1.0.1/spec/resourceful/urlencoded_form_data_spec.rb +44 -0
- data/vendor/resourceful-1.0.1/spec/resourceful_spec.rb +79 -0
- data/vendor/resourceful-1.0.1/spec/simple_sinatra_server.rb +74 -0
- data/vendor/resourceful-1.0.1/spec/simple_sinatra_server_spec.rb +98 -0
- data/vendor/resourceful-1.0.1/spec/spec.opts +3 -0
- data/vendor/resourceful-1.0.1/spec/spec_helper.rb +31 -0
- metadata +645 -0
@@ -0,0 +1,378 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require Pathname(__FILE__).dirname + 'spec_helper'
|
3
|
+
require 'resourceful'
|
4
|
+
|
5
|
+
require Pathname(__FILE__).dirname + 'acceptance_shared_specs'
|
6
|
+
|
7
|
+
|
8
|
+
describe Resourceful do
|
9
|
+
|
10
|
+
describe 'working with a resource' do
|
11
|
+
before do
|
12
|
+
@accessor = Resourceful::HttpAccessor.new
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should set additional headers on the #get' do
|
16
|
+
resource = @accessor.resource('http://localhost:3000/echo_header')
|
17
|
+
resp = resource.get(:foo => :bar)
|
18
|
+
resp.should be_instance_of(Resourceful::Response)
|
19
|
+
resp.code.should == 200
|
20
|
+
resp.body.should =~ /"HTTP_FOO"=>"bar"/
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should take an optional default header for reads' do
|
24
|
+
resource = @accessor.resource('http://localhost:3000/echo_header', :foo => :bar)
|
25
|
+
resp = resource.get
|
26
|
+
resp.should be_instance_of(Resourceful::Response)
|
27
|
+
resp.code.should == 200
|
28
|
+
resp.body.should =~ /"HTTP_FOO"=>"bar"/
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should take an optional default header for writes' do
|
32
|
+
resource = @accessor.resource('http://localhost:3000/echo_header', :foo => :bar)
|
33
|
+
resp = resource.post("data", :content_type => 'text/plain')
|
34
|
+
resp.should be_instance_of(Resourceful::Response)
|
35
|
+
resp.code.should == 200
|
36
|
+
resp.body.should =~ /"HTTP_FOO"=>"bar"/
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should override the default header with any set on a read action' do
|
40
|
+
resource = @accessor.resource('http://localhost:3000/echo_header', :foo => :bar)
|
41
|
+
resp = resource.get(:foo => :baz)
|
42
|
+
resp.should be_instance_of(Resourceful::Response)
|
43
|
+
resp.code.should == 200
|
44
|
+
resp.body.should =~ /"HTTP_FOO"=>"baz"/
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'should override the default header with any set on a write action' do
|
48
|
+
resource = @accessor.resource('http://localhost:3000/echo_header', :foo => :bar)
|
49
|
+
resp = resource.post("data", :foo => :baz, :content_type => 'text/plain')
|
50
|
+
resp.should be_instance_of(Resourceful::Response)
|
51
|
+
resp.code.should == 200
|
52
|
+
resp.body.should =~ /"HTTP_FOO"=>"baz"/
|
53
|
+
end
|
54
|
+
|
55
|
+
describe 'redirecting' do
|
56
|
+
|
57
|
+
describe 'registering callback' do
|
58
|
+
before do
|
59
|
+
@resource = @accessor.resource('http://localhost:3000/redirect/301?http://localhost:3000/get')
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'should allow a callback to be registered' do
|
63
|
+
@resource.should respond_to(:on_redirect)
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'should perform a redirect if the callback is true' do
|
67
|
+
@resource.on_redirect { true }
|
68
|
+
@resource.get.should be_successful
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'should not perform the redirect if the callback returns false' do
|
72
|
+
@resource.on_redirect { false }
|
73
|
+
@resource.get
|
74
|
+
@resource.get.should be_redirect
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
describe 'permanent redirect' do
|
79
|
+
before do
|
80
|
+
@redirect_code = 301
|
81
|
+
@resource = @accessor.resource('http://localhost:3000/redirect/301?http://localhost:3000/get')
|
82
|
+
end
|
83
|
+
|
84
|
+
it_should_behave_like 'redirect'
|
85
|
+
|
86
|
+
it 'should change the effective uri of the resource' do
|
87
|
+
@resource.get
|
88
|
+
@resource.effective_uri.should == 'http://localhost:3000/get'
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
describe 'temporary redirect' do
|
93
|
+
before do
|
94
|
+
@redirect_code = 302
|
95
|
+
@resource = @accessor.resource('http://localhost:3000/redirect/302?http://localhost:3000/get')
|
96
|
+
end
|
97
|
+
|
98
|
+
it_should_behave_like 'redirect'
|
99
|
+
|
100
|
+
it 'should not change the effective uri of the resource' do
|
101
|
+
@resource.get
|
102
|
+
@resource.effective_uri.should == 'http://localhost:3000/redirect/302?http://localhost:3000/get'
|
103
|
+
end
|
104
|
+
|
105
|
+
describe '303 See Other' do
|
106
|
+
before do
|
107
|
+
@redirect_code = 303
|
108
|
+
@resource = @accessor.resource('http://localhost:3000/redirect/303?http://localhost:3000/method')
|
109
|
+
@resource.on_redirect { true }
|
110
|
+
end
|
111
|
+
|
112
|
+
it 'should GET the redirected resource, regardless of the initial method' do
|
113
|
+
resp = @resource.delete
|
114
|
+
resp.code.should == 200
|
115
|
+
resp.body.should == 'GET'
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
end
|
121
|
+
|
122
|
+
describe 'caching' do
|
123
|
+
before do
|
124
|
+
@accessor = Resourceful::HttpAccessor.new(:cache_manager => Resourceful::InMemoryCacheManager.new)
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'should use the cached response' do
|
128
|
+
resource = @accessor.resource('http://localhost:3000/get')
|
129
|
+
resp = resource.get
|
130
|
+
resp.authoritative?.should be_true
|
131
|
+
|
132
|
+
resp2 = resource.get
|
133
|
+
resp2.authoritative?.should be_false
|
134
|
+
|
135
|
+
resp2.should == resp
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'should not store the representation if the server says not to' do
|
139
|
+
resource = @accessor.resource('http://localhost:3000/header?{Vary:%20*}')
|
140
|
+
resp = resource.get
|
141
|
+
resp.authoritative?.should be_true
|
142
|
+
resp.should_not be_cachable
|
143
|
+
|
144
|
+
resp2 = resource.get
|
145
|
+
resp2.should_not == resp
|
146
|
+
end
|
147
|
+
|
148
|
+
it 'should use the cached version of the representation if it has not expired' do
|
149
|
+
in_an_hour = (Time.now + (60*60)).httpdate
|
150
|
+
uri = URI.escape("http://localhost:3000/header?{Expire: \"#{in_an_hour}\"}")
|
151
|
+
|
152
|
+
resource = @accessor.resource(uri)
|
153
|
+
resp = resource.get
|
154
|
+
resp.should be_authoritative
|
155
|
+
|
156
|
+
resp2 = resource.get
|
157
|
+
resp2.should_not be_authoritative
|
158
|
+
resp2.should == resp
|
159
|
+
end
|
160
|
+
|
161
|
+
it 'should revalidate the cached response if it has expired' do
|
162
|
+
an_hour_ago = (Time.now - (60*60)).httpdate
|
163
|
+
uri = URI.escape("http://localhost:3000/header?{Expire: \"#{an_hour_ago}\"}")
|
164
|
+
|
165
|
+
resource = @accessor.resource(uri)
|
166
|
+
resp = resource.get
|
167
|
+
resp.should be_authoritative
|
168
|
+
resp.should be_expired
|
169
|
+
|
170
|
+
resp2 = resource.get
|
171
|
+
resp2.should be_authoritative
|
172
|
+
end
|
173
|
+
|
174
|
+
it 'should provide the cached version if the server responds with a 304 not modified' do
|
175
|
+
in_an_hour = (Time.now + (60*60)).httpdate
|
176
|
+
uri = URI.escape("http://localhost:3000/modified?#{in_an_hour}")
|
177
|
+
|
178
|
+
resource = @accessor.resource(uri)
|
179
|
+
resp = resource.get
|
180
|
+
resp.should be_authoritative
|
181
|
+
|
182
|
+
resp2 = resource.get(:cache_control => "max-age=0")
|
183
|
+
resp2.should be_authoritative
|
184
|
+
resp2.should == resp
|
185
|
+
end
|
186
|
+
|
187
|
+
it 'should not use a cached document for a resource that has been posted to' do
|
188
|
+
resource = @accessor.resource('http://localhost:3000/get')
|
189
|
+
resp = resource.get
|
190
|
+
resp.authoritative?.should be_true
|
191
|
+
|
192
|
+
resource.post("foo", :content_type => 'text/plain')
|
193
|
+
|
194
|
+
resp2 = resource.get
|
195
|
+
resp2.should_not == resp
|
196
|
+
end
|
197
|
+
|
198
|
+
describe 'Server provided Cache-Control' do
|
199
|
+
|
200
|
+
it 'should cache anything with "Cache-Control: public"' do
|
201
|
+
uri = URI.escape('http://localhost:3000/header?{Cache-Control: public}')
|
202
|
+
resource = @accessor.resource(uri)
|
203
|
+
resp = resource.get
|
204
|
+
resp.authoritative?.should be_true
|
205
|
+
|
206
|
+
resp2 = resource.get
|
207
|
+
resp2.authoritative?.should be_false
|
208
|
+
|
209
|
+
resp2.should == resp
|
210
|
+
end
|
211
|
+
|
212
|
+
it 'should cache anything with "Cache-Control: private"' do
|
213
|
+
uri = URI.escape('http://localhost:3000/header?{Cache-Control: private}')
|
214
|
+
resource = @accessor.resource(uri)
|
215
|
+
resp = resource.get
|
216
|
+
resp.should be_authoritative
|
217
|
+
|
218
|
+
resp2 = resource.get
|
219
|
+
resp2.should_not be_authoritative
|
220
|
+
|
221
|
+
resp2.should == resp
|
222
|
+
end
|
223
|
+
|
224
|
+
it 'should cache but revalidate anything with "Cache-Control: no-cache"' do
|
225
|
+
uri = URI.escape('http://localhost:3000/header?{Cache-Control: no-cache}')
|
226
|
+
resource = @accessor.resource(uri)
|
227
|
+
resp = resource.get
|
228
|
+
resp.authoritative?.should be_true
|
229
|
+
|
230
|
+
resp2 = resource.get
|
231
|
+
resp2.authoritative?.should be_true
|
232
|
+
end
|
233
|
+
|
234
|
+
it 'should revalidate anything that is older than "Cache-Control: max-age" value' do
|
235
|
+
|
236
|
+
uri = URI.escape('http://localhost:3000/header?{Cache-Control: max-age=1, Date: "Mon, 04 Aug 2008 18:00:00 GMT"}')
|
237
|
+
resource = @accessor.resource(uri)
|
238
|
+
resp = resource.get
|
239
|
+
resp.authoritative?.should be_true
|
240
|
+
|
241
|
+
resp.expired?.should be_true
|
242
|
+
|
243
|
+
resp2 = resource.get
|
244
|
+
resp2.authoritative?.should be_true
|
245
|
+
end
|
246
|
+
|
247
|
+
it 'should cache but revalidate anything with "Cache-Control: must-revalidate"' do
|
248
|
+
uri = URI.escape('http://localhost:3000/header?{Cache-Control: must-revalidate}')
|
249
|
+
resource = @accessor.resource(uri)
|
250
|
+
resp = resource.get
|
251
|
+
resp.authoritative?.should be_true
|
252
|
+
|
253
|
+
resp2 = resource.get
|
254
|
+
resp2.authoritative?.should be_true
|
255
|
+
end
|
256
|
+
|
257
|
+
it 'should not cache anything with "Cache-Control: no-store"' do
|
258
|
+
uri = URI.escape('http://localhost:3000/header?{Cache-Control: no-store}')
|
259
|
+
resource = @accessor.resource(uri)
|
260
|
+
resp = resource.get
|
261
|
+
resp.authoritative?.should be_true
|
262
|
+
|
263
|
+
resp2 = resource.get
|
264
|
+
resp2.authoritative?.should be_true
|
265
|
+
end
|
266
|
+
|
267
|
+
|
268
|
+
end
|
269
|
+
|
270
|
+
describe 'Client provided Cache-Control' do
|
271
|
+
|
272
|
+
it 'should revalidate anything that is older than "Cache-Control: max-age" value' do
|
273
|
+
a_minute_ago = (Time.now - 60).httpdate
|
274
|
+
uri = URI.escape("http://localhost:3000/header?{Cache-Control: max-age=120, Date: \"#{a_minute_ago}\"}")
|
275
|
+
resource = @accessor.resource(uri)
|
276
|
+
resp = resource.get
|
277
|
+
resp.authoritative?.should be_true
|
278
|
+
|
279
|
+
resp.expired?.should be_false
|
280
|
+
|
281
|
+
resp2 = resource.get({:cache_control => "max-age=1"})
|
282
|
+
resp2.authoritative?.should be_true
|
283
|
+
end
|
284
|
+
|
285
|
+
end
|
286
|
+
|
287
|
+
end
|
288
|
+
|
289
|
+
describe 'authorization' do
|
290
|
+
before do
|
291
|
+
@uri = 'http://localhost:3000/auth?basic'
|
292
|
+
end
|
293
|
+
|
294
|
+
it 'should automatically add authorization info to the request if its available'
|
295
|
+
|
296
|
+
it 'should not authenticate if no auth handlers are set' do
|
297
|
+
resource = @accessor.resource(@uri)
|
298
|
+
lambda {
|
299
|
+
resource.get
|
300
|
+
}.should raise_error(Resourceful::UnsuccessfulHttpRequestError)
|
301
|
+
end
|
302
|
+
|
303
|
+
it 'should not authenticate if no valid auth handlers are available' do
|
304
|
+
basic_handler = Resourceful::BasicAuthenticator.new('Not Test Auth', 'admin', 'secret')
|
305
|
+
@accessor.auth_manager.add_auth_handler(basic_handler)
|
306
|
+
resource = @accessor.resource(@uri)
|
307
|
+
lambda {
|
308
|
+
resource.get
|
309
|
+
}.should raise_error(Resourceful::UnsuccessfulHttpRequestError)
|
310
|
+
end
|
311
|
+
|
312
|
+
describe 'basic' do
|
313
|
+
before do
|
314
|
+
@uri = 'http://localhost:3000/auth?basic'
|
315
|
+
end
|
316
|
+
|
317
|
+
it 'should be able to authenticate basic auth' do
|
318
|
+
basic_handler = Resourceful::BasicAuthenticator.new('Test Auth', 'admin', 'secret')
|
319
|
+
@accessor.auth_manager.add_auth_handler(basic_handler)
|
320
|
+
resource = @accessor.resource(@uri)
|
321
|
+
resp = resource.get
|
322
|
+
|
323
|
+
resp.code.should == 200
|
324
|
+
end
|
325
|
+
|
326
|
+
it 'should not keep trying to authenticate with incorrect credentials' do
|
327
|
+
basic_handler = Resourceful::BasicAuthenticator.new('Test Auth', 'admin', 'well-known')
|
328
|
+
@accessor.auth_manager.add_auth_handler(basic_handler)
|
329
|
+
resource = @accessor.resource(@uri)
|
330
|
+
|
331
|
+
lambda {
|
332
|
+
resource.get
|
333
|
+
}.should raise_error(Resourceful::UnsuccessfulHttpRequestError)
|
334
|
+
end
|
335
|
+
|
336
|
+
end
|
337
|
+
|
338
|
+
describe 'digest' do
|
339
|
+
before do
|
340
|
+
@uri = 'http://localhost:3000/auth/digest'
|
341
|
+
end
|
342
|
+
|
343
|
+
it 'should be able to authenticate digest auth' do
|
344
|
+
pending
|
345
|
+
digest_handler = Resourceful::DigestAuthenticator.new('Test Auth', 'admin', 'secret')
|
346
|
+
@accessor.auth_manager.add_auth_handler(digest_handler)
|
347
|
+
resource = @accessor.resource(@uri)
|
348
|
+
resp = resource.get
|
349
|
+
|
350
|
+
resp.code.should == 200
|
351
|
+
end
|
352
|
+
|
353
|
+
end
|
354
|
+
|
355
|
+
end
|
356
|
+
|
357
|
+
describe 'error checking' do
|
358
|
+
|
359
|
+
it 'should raise InvalidResponse when response code is invalid'
|
360
|
+
|
361
|
+
describe 'client errors' do
|
362
|
+
|
363
|
+
it 'should raise when there is one'
|
364
|
+
|
365
|
+
end
|
366
|
+
|
367
|
+
describe 'server errors' do
|
368
|
+
|
369
|
+
it 'should raise when there is one'
|
370
|
+
|
371
|
+
end
|
372
|
+
|
373
|
+
end
|
374
|
+
|
375
|
+
end
|
376
|
+
|
377
|
+
end
|
378
|
+
|
@@ -0,0 +1,153 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/../spec_helper.rb"
|
2
|
+
|
3
|
+
module Resourceful
|
4
|
+
describe Header do
|
5
|
+
def self.should_support_header(name)
|
6
|
+
const_name = name.upcase.gsub('-', '_')
|
7
|
+
meth_name = name.downcase.gsub('-', '_')
|
8
|
+
|
9
|
+
eval <<-RUBY
|
10
|
+
it "should have constant `#{const_name}` for header `#{name}`" do
|
11
|
+
Resourceful::Header::#{const_name}.should == '#{name}'
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should have accessor method `#{meth_name}` for header `#{name}`" do
|
15
|
+
Resourceful::Header.new.should respond_to(:#{meth_name})
|
16
|
+
end
|
17
|
+
|
18
|
+
RUBY
|
19
|
+
end
|
20
|
+
|
21
|
+
should_support_header('Accept')
|
22
|
+
should_support_header('Accept-Charset')
|
23
|
+
should_support_header('Accept-Encoding')
|
24
|
+
should_support_header('Accept-Language')
|
25
|
+
should_support_header('Accept-Ranges')
|
26
|
+
should_support_header('Age')
|
27
|
+
should_support_header('Allow')
|
28
|
+
should_support_header('Authorization')
|
29
|
+
should_support_header('Cache-Control')
|
30
|
+
should_support_header('Connection')
|
31
|
+
should_support_header('Content-Encoding')
|
32
|
+
should_support_header('Content-Language')
|
33
|
+
should_support_header('Content-Length')
|
34
|
+
should_support_header('Content-Location')
|
35
|
+
should_support_header('Content-MD5')
|
36
|
+
should_support_header('Content-Range')
|
37
|
+
should_support_header('Content-Type')
|
38
|
+
should_support_header('Date')
|
39
|
+
should_support_header('ETag')
|
40
|
+
should_support_header('Expect')
|
41
|
+
should_support_header('Expires')
|
42
|
+
should_support_header('From')
|
43
|
+
should_support_header('Host')
|
44
|
+
should_support_header('If-Match')
|
45
|
+
should_support_header('If-Modified-Since')
|
46
|
+
should_support_header('If-None-Match')
|
47
|
+
should_support_header('If-Range')
|
48
|
+
should_support_header('If-Unmodified-Since')
|
49
|
+
should_support_header('Keep-Alive')
|
50
|
+
should_support_header('Last-Modified')
|
51
|
+
should_support_header('Location')
|
52
|
+
should_support_header('Max-Forwards')
|
53
|
+
should_support_header('Pragma')
|
54
|
+
should_support_header('Proxy-Authenticate')
|
55
|
+
should_support_header('Proxy-Authorization')
|
56
|
+
should_support_header('Range')
|
57
|
+
should_support_header('Referer')
|
58
|
+
should_support_header('Retry-After')
|
59
|
+
should_support_header('Server')
|
60
|
+
should_support_header('TE')
|
61
|
+
should_support_header('Trailer')
|
62
|
+
should_support_header('Transfer-Encoding')
|
63
|
+
should_support_header('Upgrade')
|
64
|
+
should_support_header('User-Agent')
|
65
|
+
should_support_header('Vary')
|
66
|
+
should_support_header('Via')
|
67
|
+
should_support_header('Warning')
|
68
|
+
should_support_header('WWW-Authenticate')
|
69
|
+
|
70
|
+
|
71
|
+
it "should be instantiatable w/ single valued header fields" do
|
72
|
+
Header.new('Host' => 'foo.example').
|
73
|
+
host.should eql('foo.example')
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should gracefully handle repeated values for single valued header fields" do
|
77
|
+
lambda {
|
78
|
+
Header.new('Host' => ['foo.example', 'bar.example'])
|
79
|
+
}.should raise_error(ArgumentError, 'Host field may only have one value')
|
80
|
+
end
|
81
|
+
|
82
|
+
it "should provide #each_fields to iterate through all header fields and values as strings" do
|
83
|
+
field_names = []
|
84
|
+
Header.new('Accept' => "this", :content_type => "that", 'pragma' => 'test').each_field do |fname, _|
|
85
|
+
field_names << fname
|
86
|
+
end
|
87
|
+
|
88
|
+
field_names.should include('Accept')
|
89
|
+
field_names.should include('Content-Type')
|
90
|
+
field_names.should include('Pragma')
|
91
|
+
field_names.should have(3).items
|
92
|
+
end
|
93
|
+
|
94
|
+
it "should provide #to_hash as a way to dump the header fields" do
|
95
|
+
Header.new('Accept' => "this", :content_type => "that", 'date' => 'today').to_hash.tap do |h|
|
96
|
+
h.should have_pair('Accept', ['this'])
|
97
|
+
h.should have_pair('Content-Type', 'that')
|
98
|
+
h.should have_pair('Date', 'today')
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
it "should provide a list of hop-by-hop fields" do
|
103
|
+
Header.header_field('X-Hop-By-Hop-Header', :hop_by_hop => true)
|
104
|
+
Header.hop_by_hop_fields.should include('X-Hop-By-Hop-Header')
|
105
|
+
end
|
106
|
+
|
107
|
+
it "should provide a list of not modified fields" do
|
108
|
+
Header.header_field('X-Dont-Modify-Me', :modifiable => false)
|
109
|
+
Header.non_modifiable_fields.should include('X-Dont-Modify-Me')
|
110
|
+
end
|
111
|
+
|
112
|
+
describe "multi-valued fields" do
|
113
|
+
it "should be instantiatable w/ repeated multi-valued header fields" do
|
114
|
+
Header.new('Accept' => ['application/foo', 'application/bar']).
|
115
|
+
accept.should eql(['application/foo', 'application/bar'])
|
116
|
+
end
|
117
|
+
|
118
|
+
it "should be instantiatable w/ repeated multi-valued header fields w/ multiple values" do
|
119
|
+
Header.new('Accept' => ['application/foo, application/bar', 'text/plain']).
|
120
|
+
accept.should eql(['application/foo', 'application/bar', 'text/plain'])
|
121
|
+
end
|
122
|
+
|
123
|
+
it "should be instantiatable w/ multi-valued header fields w/ multiple values" do
|
124
|
+
Header.new('Accept' => 'application/foo, application/bar').
|
125
|
+
accept.should eql(['application/foo', 'application/bar'])
|
126
|
+
end
|
127
|
+
|
128
|
+
it "should be instantiatable w/ multi-valued header fields w/ one value" do
|
129
|
+
Header.new('Accept' => 'application/foo').
|
130
|
+
accept.should eql(['application/foo'])
|
131
|
+
end
|
132
|
+
|
133
|
+
it "should provide values to #each_field as a comma separated string" do
|
134
|
+
Header.new('Accept' => ['this', 'that']).each_field do |fname, fval|
|
135
|
+
fval.should == 'this, that'
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
it "should provide #each as a way to iterate through fields as w/ higher level values" do
|
140
|
+
Header.new('Accept' => ['this', 'that']).each do |fname, fval|
|
141
|
+
fval.should == ['this', 'that']
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
Spec::Matchers.define :have_pair do |name, value|
|
147
|
+
match do |header_hash|
|
148
|
+
header_hash.has_key?(name)
|
149
|
+
header_hash[name] == value
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/../spec_helper"
|
2
|
+
|
3
|
+
require "resourceful/http_accessor"
|
4
|
+
|
5
|
+
module Resourceful
|
6
|
+
describe HttpAccessor do
|
7
|
+
describe "instantiation" do
|
8
|
+
it "should accept logger option" do
|
9
|
+
test_logger = stub('logger', :debug => false)
|
10
|
+
ha = HttpAccessor.new(:logger => test_logger)
|
11
|
+
ha.logger.should equal(test_logger)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should accept array user_agent option" do
|
15
|
+
ha = HttpAccessor.new(:user_agent => ['foo/3.2', 'bar/1.0'])
|
16
|
+
ha.user_agent_string.should match(/^foo\/3.2 bar\/1.0 Resourceful/)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should accept string user_agent option" do
|
20
|
+
ha = HttpAccessor.new(:user_agent => 'foo')
|
21
|
+
ha.user_agent_string.should match(/^foo Resourceful/)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should accept cache_manager option" do
|
25
|
+
test_cache_manager = stub('cache_manager', :debug => false)
|
26
|
+
ha = HttpAccessor.new(:cache_manager => test_cache_manager)
|
27
|
+
ha.cache_manager.should equal(test_cache_manager)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should accept http_adapter option" do
|
31
|
+
test_http_adapter = stub('http_adapter', :debug => false)
|
32
|
+
ha = HttpAccessor.new(:http_adapter => test_http_adapter)
|
33
|
+
ha.http_adapter.should equal(test_http_adapter)
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should accept authenticator option" do
|
37
|
+
test_authenticator = stub('authenticator', :debug => false)
|
38
|
+
ha = HttpAccessor.new(:authenticator => test_authenticator)
|
39
|
+
# cannot really be tested safely so we just rely on the fact that the option was accepted
|
40
|
+
end
|
41
|
+
|
42
|
+
it "should accept authenticators option" do
|
43
|
+
test_authenticator1 = stub('authenticator1', :debug => false)
|
44
|
+
test_authenticator2 = stub('authenticator2', :debug => false)
|
45
|
+
ha = HttpAccessor.new(:authenticator => [test_authenticator1, test_authenticator2])
|
46
|
+
# cannot really be tested safely so we just rely on the fact that the option was accepted
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should reject unrecognized options" do
|
50
|
+
lambda {
|
51
|
+
HttpAccessor.new(:not_a_valid_option => "this")
|
52
|
+
}.should raise_error(ArgumentError)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/../spec_helper"
|
2
|
+
require 'tempfile'
|
3
|
+
require "resourceful/multipart_form_data.rb"
|
4
|
+
|
5
|
+
describe Resourceful::MultipartFormData do
|
6
|
+
|
7
|
+
before do
|
8
|
+
@form_data = Resourceful::MultipartFormData.new
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should know its content-type" do
|
12
|
+
@form_data.content_type.should match(/^multipart\/form-data/i)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should know its boundary string" do
|
16
|
+
@form_data.content_type.should match(/; boundary=[0-9A-Za-z]{10,}/i)
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
describe "with simple parameters" do
|
21
|
+
|
22
|
+
it "should all simple parameters to be added" do
|
23
|
+
@form_data.add(:foo, "testing")
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should render a multipart form-data document when #read is called" do
|
27
|
+
@form_data.add('foo', 'bar')
|
28
|
+
@form_data.add('baz', 'this')
|
29
|
+
|
30
|
+
boundary = /boundary=(\w+)/.match(@form_data.content_type)[1]
|
31
|
+
@form_data.read.should eql(<<MPFD[0..-2])
|
32
|
+
--#{boundary}\r
|
33
|
+
Content-Disposition: form-data; name="foo"\r
|
34
|
+
\r
|
35
|
+
bar\r
|
36
|
+
--#{boundary}\r
|
37
|
+
Content-Disposition: form-data; name="baz"\r
|
38
|
+
\r
|
39
|
+
this\r
|
40
|
+
--#{boundary}--
|
41
|
+
MPFD
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "with file parameter" do
|
46
|
+
it "should add file parameters to be added" do
|
47
|
+
Tempfile.open('resourceful-post-file-tests') do |file_to_upload|
|
48
|
+
file_to_upload << "This is a test"
|
49
|
+
file_to_upload.flush
|
50
|
+
|
51
|
+
@form_data.add_file(:foo, file_to_upload.path)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should render a multipart form-data document when #read is called" do
|
56
|
+
Tempfile.open('resourceful-post-file-tests') do |file_to_upload|
|
57
|
+
file_to_upload << "This is a test"
|
58
|
+
file_to_upload.flush
|
59
|
+
|
60
|
+
@form_data.add_file(:foo, file_to_upload.path)
|
61
|
+
|
62
|
+
boundary = /boundary=(\w+)/.match(@form_data.content_type)[1]
|
63
|
+
@form_data.read.should eql(<<MPFD[0..-2])
|
64
|
+
--#{boundary}\r
|
65
|
+
Content-Disposition: form-data; name="foo"; filename="#{File.basename(file_to_upload.path)}"\r
|
66
|
+
Content-Type: application/octet-stream\r
|
67
|
+
\r
|
68
|
+
This is a test\r
|
69
|
+
--#{boundary}--
|
70
|
+
MPFD
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/../spec_helper"
|
2
|
+
|
3
|
+
module Resourceful
|
4
|
+
describe Resource do
|
5
|
+
before do
|
6
|
+
@http_adapter = stub(:http_adapter)
|
7
|
+
http = Resourceful::HttpAccessor.new(:http_adapter => @http_adapter)
|
8
|
+
@resource = http.resource('http://foo.example')
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "POSTing" do
|
12
|
+
it "should use bodies content type as the request content-type if it is known" do
|
13
|
+
@http_adapter.should_receive(:make_request).with(anything, anything, anything, hash_including('Content-Type' => 'application/x-special-type')).and_return([200, {}, ""])
|
14
|
+
body = stub(:body, :content_type => 'application/x-special-type', :read => "hello there")
|
15
|
+
@resource.post(body)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|