abiquo-etk 0.4.13
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/.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,47 @@
|
|
|
1
|
+
require 'resourceful/resource'
|
|
2
|
+
|
|
3
|
+
module Resourceful
|
|
4
|
+
class StubbedResourceProxy
|
|
5
|
+
def initialize(resource, canned_responses)
|
|
6
|
+
@resource = resource
|
|
7
|
+
|
|
8
|
+
@canned_responses = {}
|
|
9
|
+
|
|
10
|
+
canned_responses.each do |cr|
|
|
11
|
+
mime_type = cr[:mime_type]
|
|
12
|
+
@canned_responses[mime_type] = resp = Net::HTTPOK.new('1.1', '200', 'OK')
|
|
13
|
+
resp['content-type'] = mime_type.to_str
|
|
14
|
+
resp.instance_variable_set(:@read, true)
|
|
15
|
+
resp.instance_variable_set(:@body, cr[:body])
|
|
16
|
+
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def get_body(*args)
|
|
21
|
+
get(*args).body
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def get(*args)
|
|
25
|
+
options = args.last.is_a?(Hash) ? args.last : {}
|
|
26
|
+
|
|
27
|
+
if accept = [(options[:accept] || '*/*')].flatten.compact
|
|
28
|
+
accept.each do |mt|
|
|
29
|
+
return canned_response(mt) || next
|
|
30
|
+
end
|
|
31
|
+
@resource.get(*args)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def method_missing(method, *args)
|
|
36
|
+
@resource.send(method, *args)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
protected
|
|
40
|
+
|
|
41
|
+
def canned_response(mime_type)
|
|
42
|
+
mime_type = @canned_responses.keys.first if mime_type == '*/*'
|
|
43
|
+
@canned_responses[mime_type]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'resourceful/abstract_form_data'
|
|
2
|
+
require 'cgi'
|
|
3
|
+
|
|
4
|
+
module Resourceful
|
|
5
|
+
class UrlencodedFormData < AbstractFormData
|
|
6
|
+
|
|
7
|
+
def content_type
|
|
8
|
+
"application/x-www-form-urlencoded"
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def read
|
|
12
|
+
@form_data.map do |k,v|
|
|
13
|
+
CGI.escape(k) + '=' + CGI.escape(v)
|
|
14
|
+
end.join('&')
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
__DIR__ = File.dirname(__FILE__)
|
|
3
|
+
|
|
4
|
+
$LOAD_PATH.unshift __DIR__ unless
|
|
5
|
+
$LOAD_PATH.include?(__DIR__) ||
|
|
6
|
+
$LOAD_PATH.include?(File.expand_path(__DIR__))
|
|
7
|
+
|
|
8
|
+
require 'resourceful/util'
|
|
9
|
+
|
|
10
|
+
require 'resourceful/header'
|
|
11
|
+
require 'resourceful/http_accessor'
|
|
12
|
+
require 'resourceful/simple'
|
|
13
|
+
|
|
14
|
+
module Resourceful
|
|
15
|
+
autoload :MultipartFormData, 'resourceful/multipart_form_data'
|
|
16
|
+
autoload :UrlencodedFormData, 'resourceful/urlencoded_form_data'
|
|
17
|
+
autoload :StubbedResourceProxy, 'resourceful/stubbed_resource_proxy'
|
|
18
|
+
|
|
19
|
+
extend Simple
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Resourceful is a library that provides a high level HTTP interface.
|
|
23
|
+
module Resourceful
|
|
24
|
+
VERSION = "1.0.1"
|
|
25
|
+
RESOURCEFUL_USER_AGENT_TOKEN = "Resourceful/#{VERSION}(Ruby/#{RUBY_VERSION})"
|
|
26
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
Gem::Specification.new do |s|
|
|
4
|
+
s.name = %q{resourceful}
|
|
5
|
+
s.version = "1.0.1"
|
|
6
|
+
|
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
|
+
s.authors = ["Paul Sadauskas"]
|
|
9
|
+
s.date = %q{2010-01-26}
|
|
10
|
+
s.description = %q{An HTTP library for Ruby that takes advantage of everything HTTP has to offer.}
|
|
11
|
+
s.email = %q{psadauskas@gmail.com}
|
|
12
|
+
s.extra_rdoc_files = ["README.markdown", "lib/resourceful.rb", "lib/resourceful/abstract_form_data.rb", "lib/resourceful/authentication_manager.rb", "lib/resourceful/cache_manager.rb", "lib/resourceful/exceptions.rb", "lib/resourceful/header.rb", "lib/resourceful/http_accessor.rb", "lib/resourceful/memcache_cache_manager.rb", "lib/resourceful/multipart_form_data.rb", "lib/resourceful/net_http_adapter.rb", "lib/resourceful/request.rb", "lib/resourceful/resource.rb", "lib/resourceful/response.rb", "lib/resourceful/simple.rb", "lib/resourceful/stubbed_resource_proxy.rb", "lib/resourceful/urlencoded_form_data.rb", "lib/resourceful/util.rb"]
|
|
13
|
+
s.files = ["History.txt", "MIT-LICENSE", "Manifest", "README.markdown", "Rakefile", "lib/resourceful.rb", "lib/resourceful/abstract_form_data.rb", "lib/resourceful/authentication_manager.rb", "lib/resourceful/cache_manager.rb", "lib/resourceful/exceptions.rb", "lib/resourceful/header.rb", "lib/resourceful/http_accessor.rb", "lib/resourceful/memcache_cache_manager.rb", "lib/resourceful/multipart_form_data.rb", "lib/resourceful/net_http_adapter.rb", "lib/resourceful/request.rb", "lib/resourceful/resource.rb", "lib/resourceful/response.rb", "lib/resourceful/simple.rb", "lib/resourceful/stubbed_resource_proxy.rb", "lib/resourceful/urlencoded_form_data.rb", "lib/resourceful/util.rb", "resourceful.gemspec", "spec/acceptance/authorization_spec.rb", "spec/acceptance/caching_spec.rb", "spec/acceptance/header_spec.rb", "spec/acceptance/redirecting_spec.rb", "spec/acceptance/resource_spec.rb", "spec/acceptance/resourceful_spec.rb", "spec/acceptance_shared_specs.rb", "spec/caching_spec.rb", "spec/old_acceptance_specs.rb", "spec/resourceful/header_spec.rb", "spec/resourceful/http_accessor_spec.rb", "spec/resourceful/multipart_form_data_spec.rb", "spec/resourceful/resource_spec.rb", "spec/resourceful/response_spec.rb", "spec/resourceful/urlencoded_form_data_spec.rb", "spec/resourceful_spec.rb", "spec/simple_sinatra_server.rb", "spec/simple_sinatra_server_spec.rb", "spec/spec.opts", "spec/spec_helper.rb"]
|
|
14
|
+
s.homepage = %q{http://github.com/paul/resourceful}
|
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Resourceful", "--main", "README.markdown"]
|
|
16
|
+
s.require_paths = ["lib"]
|
|
17
|
+
s.rubyforge_project = %q{resourceful}
|
|
18
|
+
s.rubygems_version = %q{1.3.5}
|
|
19
|
+
s.summary = %q{An HTTP library for Ruby that takes advantage of everything HTTP has to offer.}
|
|
20
|
+
|
|
21
|
+
if s.respond_to? :specification_version then
|
|
22
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
23
|
+
s.specification_version = 3
|
|
24
|
+
|
|
25
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
26
|
+
s.add_runtime_dependency(%q<addressable>, [">= 2.1.0"])
|
|
27
|
+
s.add_runtime_dependency(%q<httpauth>, [">= 0"])
|
|
28
|
+
s.add_runtime_dependency(%q<options>, [">= 2.1.1"])
|
|
29
|
+
s.add_development_dependency(%q<thin>, [">= 0"])
|
|
30
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
|
31
|
+
s.add_development_dependency(%q<sinatra>, [">= 0"])
|
|
32
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
|
33
|
+
else
|
|
34
|
+
s.add_dependency(%q<addressable>, [">= 2.1.0"])
|
|
35
|
+
s.add_dependency(%q<httpauth>, [">= 0"])
|
|
36
|
+
s.add_dependency(%q<options>, [">= 2.1.1"])
|
|
37
|
+
s.add_dependency(%q<thin>, [">= 0"])
|
|
38
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
|
39
|
+
s.add_dependency(%q<sinatra>, [">= 0"])
|
|
40
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
|
41
|
+
end
|
|
42
|
+
else
|
|
43
|
+
s.add_dependency(%q<addressable>, [">= 2.1.0"])
|
|
44
|
+
s.add_dependency(%q<httpauth>, [">= 0"])
|
|
45
|
+
s.add_dependency(%q<options>, [">= 2.1.1"])
|
|
46
|
+
s.add_dependency(%q<thin>, [">= 0"])
|
|
47
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
|
48
|
+
s.add_dependency(%q<sinatra>, [">= 0"])
|
|
49
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
|
|
2
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
|
3
|
+
require 'resourceful'
|
|
4
|
+
require 'addressable/template'
|
|
5
|
+
|
|
6
|
+
describe Resourceful do
|
|
7
|
+
|
|
8
|
+
describe "caching" do
|
|
9
|
+
|
|
10
|
+
before do
|
|
11
|
+
@http = Resourceful::HttpAccessor.new(:cache_manager => Resourceful::InMemoryCacheManager.new)
|
|
12
|
+
if ENV['SPEC_LOGGING']
|
|
13
|
+
@http.logger = Resourceful::StdOutLogger.new
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def get_with_errors(resource)
|
|
18
|
+
begin
|
|
19
|
+
resp = resource.get
|
|
20
|
+
rescue Resourceful::UnsuccessfulHttpRequestError => e
|
|
21
|
+
resp = e.http_response
|
|
22
|
+
end
|
|
23
|
+
resp
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def uri_plus_params(uri, params = {})
|
|
27
|
+
uri = uri.is_a?(Addressable::URI) ? uri : Addressable::URI.parse(uri)
|
|
28
|
+
uri.query_values = params
|
|
29
|
+
uri
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def uri_for_code(code, params = {})
|
|
33
|
+
uri = Addressable::Template.new("http://localhost:42682/code/{code}").expand("code" => code.to_s)
|
|
34
|
+
uri_plus_params(uri, params)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
describe "response cacheability" do
|
|
38
|
+
Resourceful::Response::NORMALLY_CACHEABLE_RESPONSE_CODES.each do |code|
|
|
39
|
+
describe "response code #{code}" do
|
|
40
|
+
it "should normally be cached" do
|
|
41
|
+
resource = @http.resource(uri_for_code(code))
|
|
42
|
+
|
|
43
|
+
resp = get_with_errors(resource)
|
|
44
|
+
resp.should be_cacheable
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
it "should not be cached if Vary: *" do
|
|
48
|
+
resource = @http.resource(uri_for_code(200, "Vary" => "*"))
|
|
49
|
+
|
|
50
|
+
resp = get_with_errors(resource)
|
|
51
|
+
resp.should_not be_cacheable
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
it "should not be cached if Cache-Control: no-cache'" do
|
|
55
|
+
resource = @http.resource(uri_for_code(200, "Cache-Control" => "no-cache"))
|
|
56
|
+
|
|
57
|
+
resp = get_with_errors(resource)
|
|
58
|
+
resp.should_not be_cacheable
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# I would prefer to do all other codes, but some of them do some magic stuff (100),
|
|
64
|
+
# so I'll just spot check.
|
|
65
|
+
[201, 206, 302, 307, 404, 500].each do |code|
|
|
66
|
+
describe "response code #{code}" do
|
|
67
|
+
it "should not normally be cached" do
|
|
68
|
+
resource = @http.resource(uri_for_code(code))
|
|
69
|
+
|
|
70
|
+
resp = get_with_errors(resource)
|
|
71
|
+
resp.should_not be_cacheable
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
it "should be cached if Cache-Control: public" do
|
|
75
|
+
resource = @http.resource(uri_for_code(code, "Cache-Control" => "public"))
|
|
76
|
+
|
|
77
|
+
resp = get_with_errors(resource)
|
|
78
|
+
resp.should be_cacheable
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
it "should be cached if Cache-Control: private" do
|
|
82
|
+
resource = @http.resource(uri_for_code(code, "Cache-Control" => "private"))
|
|
83
|
+
|
|
84
|
+
resp = get_with_errors(resource)
|
|
85
|
+
resp.should be_cacheable
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
describe "expiration" do
|
|
93
|
+
it 'should use the cached response if Expire: is in the future' do
|
|
94
|
+
in_the_future = (Time.now + 60).httpdate
|
|
95
|
+
resource = @http.resource(uri_for_code(200, "Expire" => in_the_future))
|
|
96
|
+
|
|
97
|
+
resp = resource.get
|
|
98
|
+
resp.should_not be_expired
|
|
99
|
+
|
|
100
|
+
resp = resource.get
|
|
101
|
+
resp.should be_ok
|
|
102
|
+
resp.should_not be_authoritative
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
it 'should revalidate the cached response if the response is expired' do
|
|
106
|
+
in_the_past = (Time.now - 60).httpdate
|
|
107
|
+
resource = @http.resource(uri_for_code(200, "Expires" => in_the_past))
|
|
108
|
+
|
|
109
|
+
resp = resource.get
|
|
110
|
+
resp.should be_expired
|
|
111
|
+
|
|
112
|
+
resp = resource.get
|
|
113
|
+
resp.should be_ok
|
|
114
|
+
resp.should be_authoritative
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
describe 'authoritative' do
|
|
119
|
+
|
|
120
|
+
it "should be authoritative if the response is directly from the server" do
|
|
121
|
+
resource = @http.resource(
|
|
122
|
+
uri_plus_params('http://localhost:42682/', "Cache-Control" => 'max-age=10')
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
response = resource.get
|
|
126
|
+
response.should be_authoritative
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
it "should be authoritative if a cached response was revalidated with the server" do
|
|
130
|
+
now = Time.now.httpdate
|
|
131
|
+
resource = @http.resource(
|
|
132
|
+
uri_plus_params('http://localhost:42682/cached',
|
|
133
|
+
"modified" => now,
|
|
134
|
+
"Cache-Control" => 'max-age=0')
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
resource.get
|
|
138
|
+
response = resource.get("Cache-Control" => "max-age=0")
|
|
139
|
+
response.should be_authoritative
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
it "should not be authoritative if the cached response was not revalidated" do
|
|
143
|
+
now = Time.now.httpdate
|
|
144
|
+
resource = @http.resource(
|
|
145
|
+
uri_plus_params('http://localhost:42682/cached',
|
|
146
|
+
"modified" => now,
|
|
147
|
+
"Cache-Control" => 'max-age=10')
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
resource.get
|
|
151
|
+
response = resource.get
|
|
152
|
+
response.should_not be_authoritative
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
describe "Not Modified responses" do
|
|
159
|
+
before do
|
|
160
|
+
now = Time.now.httpdate
|
|
161
|
+
|
|
162
|
+
resource = @http.resource(
|
|
163
|
+
uri_plus_params('http://localhost:42682/cached',
|
|
164
|
+
"modified" => now,
|
|
165
|
+
"Cache-Control" => 'max-age=0')
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
@first_response = resource.get
|
|
169
|
+
@second_response = resource.get("Cache-Control" => "max-age=0") # Force revalidation
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
it "should replace the 304 response with whats in the cache" do
|
|
173
|
+
@second_response.code.should == @first_response.code
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
it "should provide a body identical to the original response" do
|
|
177
|
+
@second_response.body.should == @first_response.body
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
it "should override any cached headers with new ones"
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
describe "cache invalidation" do
|
|
184
|
+
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
end
|
|
190
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
|
2
|
+
require 'resourceful'
|
|
3
|
+
|
|
4
|
+
describe Resourceful do
|
|
5
|
+
|
|
6
|
+
describe 'setting headers' do
|
|
7
|
+
before do
|
|
8
|
+
@http = Resourceful::HttpAccessor.new
|
|
9
|
+
@resource = @http.resource("http://localhost:42682/header")
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
it 'should handle "Content-Type"' do
|
|
13
|
+
resp = @resource.post("asdf", :content_type => 'foo/bar')
|
|
14
|
+
|
|
15
|
+
header = YAML.load(resp.body)
|
|
16
|
+
|
|
17
|
+
header.should have_key('CONTENT_TYPE')
|
|
18
|
+
header['CONTENT_TYPE'].should == 'foo/bar'
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
|
|
2
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
|
3
|
+
require 'resourceful'
|
|
4
|
+
|
|
5
|
+
describe Resourceful do
|
|
6
|
+
|
|
7
|
+
describe "working with a resource" do
|
|
8
|
+
before do
|
|
9
|
+
@http = Resourceful::HttpAccessor.new
|
|
10
|
+
@resource = @http.resource('http://localhost:42682/')
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it 'should make the original uri available' do
|
|
14
|
+
@resource.effective_uri.should == 'http://localhost:42682/'
|
|
15
|
+
@resource.uri.should == 'http://localhost:42682/'
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it 'should set the user agent string on the default header' do
|
|
19
|
+
@resource.default_header.should have_key('User-Agent')
|
|
20
|
+
@resource.default_header['User-Agent'].should == Resourceful::RESOURCEFUL_USER_AGENT_TOKEN
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
describe "GET" do
|
|
24
|
+
|
|
25
|
+
it "should be performable on a resource and return a response" do
|
|
26
|
+
response = @resource.get
|
|
27
|
+
response.should be_kind_of(Resourceful::Response)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
describe "POST" do
|
|
33
|
+
|
|
34
|
+
it "should be performable on a resource and return a response" do
|
|
35
|
+
response = @resource.post
|
|
36
|
+
response.should be_kind_of(Resourceful::Response)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it "should require Content-Type be set if a body is provided" do
|
|
40
|
+
lambda {
|
|
41
|
+
@resource.post("some text")
|
|
42
|
+
}.should raise_error(Resourceful::MissingContentType)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
describe "PUT" do
|
|
48
|
+
|
|
49
|
+
it "should be performable on a resource and return a response" do
|
|
50
|
+
response = @resource.put(nil)
|
|
51
|
+
response.should be_kind_of(Resourceful::Response)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
it "should require Content-Type be set if a body is provided" do
|
|
55
|
+
lambda {
|
|
56
|
+
@resource.put("some text")
|
|
57
|
+
}.should raise_error(Resourceful::MissingContentType)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
it "should require an entity-body to be set" do
|
|
61
|
+
lambda {
|
|
62
|
+
@resource.put()
|
|
63
|
+
}.should raise_error(ArgumentError)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
it "should allow the entity-body to be nil" do
|
|
67
|
+
lambda {
|
|
68
|
+
@resource.put(nil)
|
|
69
|
+
}.should_not raise_error(ArgumentError)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
describe "DELETE" do
|
|
74
|
+
|
|
75
|
+
it "should be performable on a resource and return a response" do
|
|
76
|
+
response = @resource.delete
|
|
77
|
+
response.should be_kind_of(Resourceful::Response)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
|
3
|
+
require 'resourceful'
|
|
4
|
+
|
|
5
|
+
describe Resourceful do
|
|
6
|
+
|
|
7
|
+
describe ".get()" do
|
|
8
|
+
it "should be performable on a resource and return a response" do
|
|
9
|
+
response = Resourceful.get('http://localhost:42682/')
|
|
10
|
+
response.should be_kind_of(Resourceful::Response)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
describe ".post()" do
|
|
15
|
+
it "should be performable on a resource and return a response" do
|
|
16
|
+
response = Resourceful.post('http://localhost:42682/')
|
|
17
|
+
response.should be_kind_of(Resourceful::Response)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "should require Content-Type be set if a body is provided" do
|
|
21
|
+
lambda {
|
|
22
|
+
Resourceful.post('http://localhost:42682/', {}, 'body')
|
|
23
|
+
}.should raise_error(Resourceful::MissingContentType)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
describe ".put()" do
|
|
29
|
+
|
|
30
|
+
it "should be performable on a resource and return a response" do
|
|
31
|
+
response = Resourceful.put('http://localhost:42682/')
|
|
32
|
+
response.should be_kind_of(Resourceful::Response)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it "should require Content-Type be set if a body is provided" do
|
|
36
|
+
lambda {
|
|
37
|
+
Resourceful.put('http://localhost:42682/', "some text", {})
|
|
38
|
+
}.should raise_error(Resourceful::MissingContentType)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it "should allow the entity-body to be nil" do
|
|
42
|
+
lambda {
|
|
43
|
+
Resourceful.put('http://localhost:42682/', nil, {})
|
|
44
|
+
}.should_not raise_error(ArgumentError)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe ".delete()" do
|
|
49
|
+
|
|
50
|
+
it "should be performable on a resource and return a response" do
|
|
51
|
+
response = Resourceful.delete('http://localhost:42682/')
|
|
52
|
+
response.should be_kind_of(Resourceful::Response)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
describe 'redirect', :shared => true do
|
|
2
|
+
it 'should be followed by default on GET' do
|
|
3
|
+
resp = @resource.get
|
|
4
|
+
resp.should be_instance_of(Resourceful::Response)
|
|
5
|
+
resp.should be_ok
|
|
6
|
+
resp.header['Content-Type'].should == ['text/plain']
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
%w{PUT POST}.each do |method|
|
|
10
|
+
it "should not be followed by default on #{method}" do
|
|
11
|
+
resp = @resource.send(method.downcase.intern, nil, :content_type => 'text/plain' )
|
|
12
|
+
resp.should be_redirect
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
it "should redirect on #{method.to_s.upcase} if the redirection callback returns true" do
|
|
16
|
+
@resource.on_redirect { true }
|
|
17
|
+
resp = @resource.send(method.downcase.intern, nil, :content_type => 'text/plain' )
|
|
18
|
+
resp.should be_ok
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it "should not follow redirect on #{method.to_s.upcase} if the redirection callback returns false" do
|
|
22
|
+
@resource.on_redirect { false }
|
|
23
|
+
resp = @resource.send(method.downcase.intern, nil, :content_type => 'text/plain' )
|
|
24
|
+
resp.should be_redirect
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it "should not be followed by default on DELETE" do
|
|
29
|
+
resp = @resource.delete
|
|
30
|
+
resp.should be_redirect
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
it "should redirect on DELETE if vthe redirection callback returns true" do
|
|
34
|
+
@resource.on_redirect { true }
|
|
35
|
+
resp = @resource.delete
|
|
36
|
+
resp.should be_ok
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it "should not redirect on DELETE if the redirection callback returns false" do
|
|
40
|
+
resp = @resource.delete
|
|
41
|
+
resp.should be_redirect
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
|
|
2
|
+
require 'rubygems'
|
|
3
|
+
require 'fakeweb'
|
|
4
|
+
|
|
5
|
+
$LOAD_PATH << File.join(File.dirname(__FILE__), "..", "lib")
|
|
6
|
+
require 'resourceful'
|
|
7
|
+
|
|
8
|
+
describe "Caching" do
|
|
9
|
+
|
|
10
|
+
before do
|
|
11
|
+
FakeWeb.allow_net_connect = false
|
|
12
|
+
FakeWeb.clean_registry
|
|
13
|
+
|
|
14
|
+
@http = Resourceful::HttpAccessor.new(:cache_manager => Resourceful::InMemoryCacheManager.new)
|
|
15
|
+
if ENV['SPEC_LOGGING']
|
|
16
|
+
@http.logger = Resourceful::StdOutLogger.new
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
describe "should cache" do
|
|
21
|
+
|
|
22
|
+
before do
|
|
23
|
+
FakeWeb.register_uri(:get, "http://example.com/cache",
|
|
24
|
+
[{:body => "Original response", :cache_control => "private,max-age=15"},
|
|
25
|
+
{:body => "Overrode cached response"}]
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
@resource = @http.resource("http://example.com/cache")
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
it "should cache the response" do
|
|
32
|
+
resp = @resource.get
|
|
33
|
+
resp.body.should == "Original response"
|
|
34
|
+
|
|
35
|
+
resp = @resource.get
|
|
36
|
+
resp.body.should == "Original response"
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe "updating headers" do
|
|
42
|
+
before do
|
|
43
|
+
FakeWeb.register_uri(:get, "http://example.com/override",
|
|
44
|
+
[{:body => "Original response", :cache_control => "private,max-age=0", :x_updateme => "foo"},
|
|
45
|
+
{:body => "Overrode cached response", :status => 304, :x_updateme => "bar"} ]
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
@resource = @http.resource("http://example.com/override")
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
it "should update headers from the 304" do
|
|
52
|
+
resp = @resource.get
|
|
53
|
+
resp.headers['X-Updateme'].should == ["foo"]
|
|
54
|
+
|
|
55
|
+
resp = @resource.get
|
|
56
|
+
resp.headers['X-Updateme'].should == ["bar"]
|
|
57
|
+
resp.headers['Cache-Control'].should == ["private", "max-age=0"]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
describe "updating expiration" do
|
|
63
|
+
before do
|
|
64
|
+
FakeWeb.register_uri(:get, "http://example.com/timeout",
|
|
65
|
+
[{:body => "Original response", :cache_control => "private,max-age=1"},
|
|
66
|
+
{:body => "cached response", :cache_control => "private,max-age=1"}]
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
@resource = @http.resource("http://example.com/timeout")
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
it "should refresh the expiration timer" do
|
|
73
|
+
resp = @resource.get
|
|
74
|
+
resp.should_not be_stale
|
|
75
|
+
|
|
76
|
+
sleep 2
|
|
77
|
+
|
|
78
|
+
resp.should be_stale
|
|
79
|
+
|
|
80
|
+
resp = @resource.get
|
|
81
|
+
resp.should_not be_stale
|
|
82
|
+
|
|
83
|
+
resp = @resource.get
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
end
|