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,583 @@
|
|
|
1
|
+
%w(tmpdir digest/md5 base64 httpauth/exceptions httpauth/constants).each { |l| require l }
|
|
2
|
+
|
|
3
|
+
module HTTPAuth
|
|
4
|
+
# = Digest
|
|
5
|
+
#
|
|
6
|
+
# The Digest class provides a number of methods to handle HTTP Digest Authentication. Generally the server
|
|
7
|
+
# sends a challenge to the client a resource that needs authorization and the client tries to respond with
|
|
8
|
+
# the correct credentials. Digest authentication rapidly becomes more complicated after that, if you want to
|
|
9
|
+
# build an implementation I suggest you at least skim RFC 2617 (http://www.ietf.org/rfc/rfc2617.txt).
|
|
10
|
+
#
|
|
11
|
+
# == Examples
|
|
12
|
+
#
|
|
13
|
+
# Digest authentication examples are too large to include in source documentation. Please consult the examples
|
|
14
|
+
# directory for client and server implementations.
|
|
15
|
+
#
|
|
16
|
+
# The classes and code of the library are set up to be as transparent as possible so integrating the library
|
|
17
|
+
# with any implementation talking HTTP, either trough CGI or directly should be possible.
|
|
18
|
+
#
|
|
19
|
+
# == The 'Digest'
|
|
20
|
+
#
|
|
21
|
+
# In Digest authentication the client's credentials are never sent in plain text over HTTP. You don't even have
|
|
22
|
+
# to store the passwords in plain text on the server to authenticate clients. The library doesn't force you to
|
|
23
|
+
# use the digest mechanism, it also works by specifying the username, password and realm. If you do decided to
|
|
24
|
+
# use digests you can generate them in the following way:
|
|
25
|
+
#
|
|
26
|
+
# H(username + ':' + realm + ':' + password)
|
|
27
|
+
#
|
|
28
|
+
# Where H returns the MD5 hexdigest of the string. The Utils class defines a method to calculate the digest.
|
|
29
|
+
#
|
|
30
|
+
# HTTPAuth::Digest::Utils.htdigest(username, realm, password)
|
|
31
|
+
#
|
|
32
|
+
# The format of this digest is the same in most implementations. Apache's <tt>htdigest</tt> tool for instance
|
|
33
|
+
# stores the digests in a textfile like this:
|
|
34
|
+
#
|
|
35
|
+
# username:realm:digest
|
|
36
|
+
#
|
|
37
|
+
# == Security
|
|
38
|
+
#
|
|
39
|
+
# Digest authentication is quite a bit more secure than Basic authentication, but it isn't as secure as SSL.
|
|
40
|
+
# The biggest difference between Basic and Digest authentication is that Digest authentication doesn't send
|
|
41
|
+
# clear text passwords, but only an MD5 digest. Recent developments in password cracking and mathematics have
|
|
42
|
+
# found several ways to create collisions with MD5 hashes and it's not infinitely secure. However, it currently
|
|
43
|
+
# still takes a lot of computing power to crack MD5 digests. Checking for brute force attacks in your applications
|
|
44
|
+
# and routinely changing the user credentials and maybe even the realm makes it a lot harder for a cracker to
|
|
45
|
+
# abuse your application.
|
|
46
|
+
module Digest
|
|
47
|
+
# Utils contains all sort of conveniance methods for the header container classes. Implementations shouldn't have
|
|
48
|
+
# to call any methods on Utils.
|
|
49
|
+
class Utils
|
|
50
|
+
class << self
|
|
51
|
+
# Encodes a hash with digest directives to send in a header.
|
|
52
|
+
#
|
|
53
|
+
# * <tt>h</tt>: The directives specified in a hash
|
|
54
|
+
# * <tt>variant</tt>: Specifies whether the directives are for an Authorize header (:credentials),
|
|
55
|
+
# for a WWW-Authenticate header (:challenge) or for a Authentication-Info header (:auth_info).
|
|
56
|
+
def encode_directives(h, variant)
|
|
57
|
+
encode = {:domain => :join, :algorithm => false, :stale => :str_to_bool, :nc => :int_to_hex,
|
|
58
|
+
:nextnonce => :int_to_hex}
|
|
59
|
+
if [:credentials, :auth].include? variant
|
|
60
|
+
encode.merge! :qop => false
|
|
61
|
+
elsif variant == :challenge
|
|
62
|
+
encode.merge! :qop => :list_to_quoted_string
|
|
63
|
+
else
|
|
64
|
+
raise ArgumentError.new("#{variant} is not a valid value for `variant' use :auth, :credentials or :challenge")
|
|
65
|
+
end
|
|
66
|
+
(variant == :auth ? '' : 'Digest ') + h.collect do |directive, value|
|
|
67
|
+
'' << directive.to_s << '=' << if encode[directive]
|
|
68
|
+
begin
|
|
69
|
+
Conversions.send encode[directive], value
|
|
70
|
+
rescue NoMethodError, ArgumentError
|
|
71
|
+
raise ArgumentError.new("Can't encode #{directive}(#{value.inspect}) with #{encode[directive]}")
|
|
72
|
+
end
|
|
73
|
+
elsif encode[directive].nil?
|
|
74
|
+
begin
|
|
75
|
+
Conversions.quote_string value
|
|
76
|
+
rescue NoMethodError, ArgumentError
|
|
77
|
+
raise ArgumentError.new("Can't encode #{directive}(#{value.inspect}) with quote_string")
|
|
78
|
+
end
|
|
79
|
+
else
|
|
80
|
+
value
|
|
81
|
+
end
|
|
82
|
+
end.join(", ")
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Decodes digest directives from a header. Returns a hash with directives.
|
|
86
|
+
#
|
|
87
|
+
# * <tt>directives</tt>: The directives
|
|
88
|
+
# * <tt>variant</tt>: Specifies whether the directives are for an Authorize header (:credentials),
|
|
89
|
+
# for a WWW-Authenticate header (:challenge) or for a Authentication-Info header (:auth_info).
|
|
90
|
+
def decode_directives(directives, variant)
|
|
91
|
+
raise HTTPAuth::UnwellformedHeader.new("Can't decode directives which are nil") if directives.nil?
|
|
92
|
+
decode = {:domain => :split, :algorithm => false, :stale => :bool_to_str, :nc => :hex_to_int,
|
|
93
|
+
:nextnonce => :hex_to_int}
|
|
94
|
+
if [:credentials, :auth].include? variant
|
|
95
|
+
decode.merge! :qop => false
|
|
96
|
+
elsif variant == :challenge
|
|
97
|
+
decode.merge! :qop => :quoted_string_to_list
|
|
98
|
+
else
|
|
99
|
+
raise ArgumentError.new("#{variant} is not a valid value for `variant' use :auth, :credentials or :challenge")
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
start = 0
|
|
103
|
+
unless variant == :auth
|
|
104
|
+
# The first six characters are 'Digest '
|
|
105
|
+
start = 6
|
|
106
|
+
scheme = directives[0..6].strip
|
|
107
|
+
raise HTTPAuth::UnwellformedHeader.new("Scheme should be Digest, server responded with `#{directives}'") unless scheme == 'Digest'
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# The rest are the directives
|
|
111
|
+
# TODO: split is ugly, I want a real parser (:
|
|
112
|
+
directives[start..-1].split(',').inject({}) do |h,part|
|
|
113
|
+
parts = part.split('=')
|
|
114
|
+
name = parts[0].strip.intern
|
|
115
|
+
value = parts[1..-1].join('=').strip
|
|
116
|
+
|
|
117
|
+
# --- HACK
|
|
118
|
+
# IE and Safari qoute qop values
|
|
119
|
+
# IE also quotes algorithm values
|
|
120
|
+
if variant != :challenge and [:qop, :algorithm].include?(name) and value =~ /^\"[^\"]+\"$/
|
|
121
|
+
value = Conversions.unquote_string(value)
|
|
122
|
+
end
|
|
123
|
+
# --- END HACK
|
|
124
|
+
|
|
125
|
+
if decode[name]
|
|
126
|
+
h[name] = Conversions.send decode[name], value
|
|
127
|
+
elsif decode[name].nil?
|
|
128
|
+
h[name] = Conversions.unquote_string value
|
|
129
|
+
else
|
|
130
|
+
h[name] = value
|
|
131
|
+
end
|
|
132
|
+
h
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Concat arguments the way it's done frequently in the Digest spec.
|
|
137
|
+
#
|
|
138
|
+
# digest_concat('a', 'b') #=> "a:b"
|
|
139
|
+
# digest_concat('a', 'b', c') #=> "a:b:c"
|
|
140
|
+
def digest_concat(*args); args.join ':'; end
|
|
141
|
+
|
|
142
|
+
# Calculate the MD5 hexdigest for the string data
|
|
143
|
+
def digest_h(data); ::Digest::MD5.hexdigest data; end
|
|
144
|
+
|
|
145
|
+
# Calculate the KD value of a secret and data as explained in the RFC.
|
|
146
|
+
def digest_kd(secret, data); digest_h digest_concat(secret, data); end
|
|
147
|
+
|
|
148
|
+
# Calculate the Digest for the credentials
|
|
149
|
+
def htdigest(username, realm, password)
|
|
150
|
+
digest_h digest_concat(username, realm, password)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Calculate the H(A1) as explain in the RFC. If h[:digest] is set, it's used instead
|
|
154
|
+
# of calculating H(username ":" realm ":" password).
|
|
155
|
+
def digest_a1(h, s)
|
|
156
|
+
# TODO: check for known algorithm values (look out for the IE algorithm quote bug)
|
|
157
|
+
if h[:algorithm] == 'MD5-sess'
|
|
158
|
+
digest_h digest_concat(
|
|
159
|
+
h[:digest] || htdigest(h[:username], h[:realm], h[:password]),
|
|
160
|
+
h[:nonce],
|
|
161
|
+
h[:cnonce]
|
|
162
|
+
)
|
|
163
|
+
else
|
|
164
|
+
h[:digest] || htdigest(h[:username], h[:realm], h[:password])
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Calculate the H(A2) for the Authorize header as explained in the RFC.
|
|
169
|
+
def request_digest_a2(h)
|
|
170
|
+
# TODO: check for known qop values (look out for the safari qop quote bug)
|
|
171
|
+
if h[:qop] == 'auth-int'
|
|
172
|
+
digest_h digest_concat(h[:method], h[:uri], digest_h(h[:request_body]))
|
|
173
|
+
else
|
|
174
|
+
digest_h digest_concat(h[:method], h[:uri])
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Calculate the H(A2) for the Authentication-Info header as explained in the RFC.
|
|
179
|
+
def response_digest_a2(h)
|
|
180
|
+
if h[:qop] == 'auth-int'
|
|
181
|
+
digest_h ':' + digest_concat(h[:uri], digest_h(h[:response_body]))
|
|
182
|
+
else
|
|
183
|
+
digest_h ':' + h[:uri]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Calculate the digest value for the directives as explained in the RFC.
|
|
188
|
+
#
|
|
189
|
+
# * <tt>variant</tt>: Either <tt>:request</tt> or <tt>:response</tt>, as seen from the server.
|
|
190
|
+
def calculate_digest(h, s, variant)
|
|
191
|
+
raise ArgumentError.new("Variant should be either :request or :response, not #{variant}") unless [:request, :response].include?(variant)
|
|
192
|
+
# Compatability with RFC 2069
|
|
193
|
+
if h[:qop].nil?
|
|
194
|
+
digest_kd digest_a1(h, s), digest_concat(
|
|
195
|
+
h[:nonce],
|
|
196
|
+
send("#{variant}_digest_a2".intern, h)
|
|
197
|
+
)
|
|
198
|
+
else
|
|
199
|
+
digest_kd digest_a1(h, s), digest_concat(
|
|
200
|
+
h[:nonce],
|
|
201
|
+
Conversions.int_to_hex(h[:nc]),
|
|
202
|
+
h[:cnonce],
|
|
203
|
+
h[:qop],
|
|
204
|
+
send("#{variant}_digest_a2".intern, h)
|
|
205
|
+
)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Return a hash with the keys in <tt>keys</tt> found in <tt>h</tt>.
|
|
210
|
+
#
|
|
211
|
+
# Example
|
|
212
|
+
#
|
|
213
|
+
# filter_h_on({1=>1,2=>2}, [1]) #=> {1=>1}
|
|
214
|
+
# filter_h_on({1=>1,2=>2}, [1, 2]) #=> {1=>1,2=>2}
|
|
215
|
+
def filter_h_on(h, keys)
|
|
216
|
+
h.inject({}) { |r,l| keys.include?(l[0]) ? r.merge({l[0]=>l[1]}) : r }
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Create a nonce value of the time and a salt. The nonce is created in such a
|
|
220
|
+
# way that the issuer can check the age of the nonce.
|
|
221
|
+
#
|
|
222
|
+
# * <tt>salt</tt>: A reasonably long passphrase known only to the issuer.
|
|
223
|
+
def create_nonce(salt)
|
|
224
|
+
now = Time.now
|
|
225
|
+
time = now.strftime("%Y-%m-%d %H:%M:%S").to_s + ':' + now.usec.to_s
|
|
226
|
+
Base64.encode64(
|
|
227
|
+
digest_concat(
|
|
228
|
+
time,
|
|
229
|
+
digest_h(digest_concat(time, salt))
|
|
230
|
+
)
|
|
231
|
+
).gsub("\n", '')[0..-3]
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Create a 32 character long opaque string with a 'random' value
|
|
235
|
+
def create_opaque
|
|
236
|
+
s = []; 16.times { s << rand(127).chr }
|
|
237
|
+
digest_h s.join
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Superclass for all the header container classes
|
|
243
|
+
class AbstractHeader
|
|
244
|
+
# holds directives and values for digest calculation
|
|
245
|
+
attr_reader :h
|
|
246
|
+
|
|
247
|
+
# Redirects attribute messages to the internal directives
|
|
248
|
+
#
|
|
249
|
+
# Example:
|
|
250
|
+
#
|
|
251
|
+
# class Credentials < AbstractHeader
|
|
252
|
+
# def initialize
|
|
253
|
+
# @h = { :username => 'Ben' }
|
|
254
|
+
# end
|
|
255
|
+
# end
|
|
256
|
+
#
|
|
257
|
+
# c = Credentials.new
|
|
258
|
+
# c.username #=> 'Ben'
|
|
259
|
+
# c.username = 'Mary'
|
|
260
|
+
# c.username #=> 'Mary'
|
|
261
|
+
def method_missing(m, *a)
|
|
262
|
+
if ((m.to_s =~ /^(.*)=$/) == 0) and @h.keys.include?($1.intern)
|
|
263
|
+
@h[$1.intern] = a[0]
|
|
264
|
+
elsif @h.keys.include? m
|
|
265
|
+
@h[m]
|
|
266
|
+
else
|
|
267
|
+
raise NameError.new("undefined method `#{m}' for #{self}")
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
# The Credentials class handlers the Authorize header. The Authorize header is sent by a client who wants to
|
|
274
|
+
# let the server know he has the credentials needed to access a resource.
|
|
275
|
+
#
|
|
276
|
+
# See the Digest module for examples
|
|
277
|
+
class Credentials < AbstractHeader
|
|
278
|
+
|
|
279
|
+
# Parses the information from a Authorize header and create a new Credentials instance with the information.
|
|
280
|
+
# The options hash allows you to specify additional information.
|
|
281
|
+
#
|
|
282
|
+
# * <tt>authorization</tt>: The contents of the Authorize header
|
|
283
|
+
# See <tt>initialize</tt> for valid options.
|
|
284
|
+
def self.from_header(authorization, options={})
|
|
285
|
+
new Utils.decode_directives(authorization, :credentials), options
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Creates a new Credential instance based on a Challenge instance.
|
|
289
|
+
#
|
|
290
|
+
# * <tt>challenge</tt>: A Challenge instance
|
|
291
|
+
# See <tt>initialize</tt> for valid options.
|
|
292
|
+
def self.from_challenge(challenge, options={})
|
|
293
|
+
credentials = new challenge.h
|
|
294
|
+
credentials.update_from_challenge! options
|
|
295
|
+
credentials
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Create a new instance.
|
|
299
|
+
#
|
|
300
|
+
# * <tt>h</tt>: A Hash with directives, normally this is filled with the directives coming from a Challenge instance.
|
|
301
|
+
# * <tt>options</tt>: Used to set or override data from the Authorize header and add additional parameters.
|
|
302
|
+
# * <tt>:username</tt>: Mostly set by a client to send the username
|
|
303
|
+
# * <tt>:password</tt>: Mostly set by a client to send the password, set either this or the digest
|
|
304
|
+
# * <tt>:digest</tt>: Mostly set by a client to send a digest, set either this or the digest. For more
|
|
305
|
+
# information about digests see Digest.
|
|
306
|
+
# * <tt>:uri</tt>: Mostly set by the client to send the uri
|
|
307
|
+
# * <tt>:method</tt>: The HTTP Method used by the client to send the request, this should be an uppercase string
|
|
308
|
+
# with the name of the verb.
|
|
309
|
+
def initialize(h, options={})
|
|
310
|
+
@h = h
|
|
311
|
+
@h.merge! options
|
|
312
|
+
session = Session.new h[:opaque], :tmpdir => options[:tmpdir]
|
|
313
|
+
@s = session.load
|
|
314
|
+
@reason = 'There has been no validation yet'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Convenience method, basically an alias for <code>validate(options.merge(:password => password))</code>
|
|
318
|
+
def validate_password(password, options={})
|
|
319
|
+
options[:password] = password
|
|
320
|
+
validate(options)
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Convenience method, basically an alias for <code>validate(options.merge(:digest => digest))</code>
|
|
324
|
+
def validate_digest(digest, options={})
|
|
325
|
+
options[:digest] = digest
|
|
326
|
+
validate(options)
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# Validates the credential information stored in the Credentials instance. Returns <tt>true</tt> or
|
|
330
|
+
# <tt>false</tt>. You can read the ue
|
|
331
|
+
#
|
|
332
|
+
# * <tt>options</tt>: The extra options needed to validate the credentials. A server implementation should
|
|
333
|
+
# provide the <tt>:method</tt> and a <tt>:password</tt> or <tt>:digest</tt>.
|
|
334
|
+
# * <tt>:method</tt>: The HTTP Verb in uppercase, ie. GET or POST.
|
|
335
|
+
# * <tt>:password</tt>: The password for the sent username and realm, either a password or digest should be
|
|
336
|
+
# provided.
|
|
337
|
+
# * <tt>:digest</tt>: The digest for the specified username and realm, either a digest or password should ne
|
|
338
|
+
# provided.
|
|
339
|
+
def validate(options)
|
|
340
|
+
ho = @h.merge(options)
|
|
341
|
+
raise ArgumentError.new("You have to set the :request_body value if you want to use :qop => 'auth-int'") if @h[:qop] == 'auth-int' and ho[:request_body].nil?
|
|
342
|
+
raise ArgumentError.new("Please specify the request method :method (ie. GET)") if ho[:method].nil?
|
|
343
|
+
|
|
344
|
+
calculated_response = Utils.calculate_digest(ho, @s, :request)
|
|
345
|
+
if ho[:response] == calculated_response
|
|
346
|
+
@reason = ''
|
|
347
|
+
return true
|
|
348
|
+
else
|
|
349
|
+
@reason = "Response isn't the same as computed response #{ho[:response]} != #{calculated_response} for #{ho.inspect}"
|
|
350
|
+
end
|
|
351
|
+
false
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# Returns a string with the reason <tt>validate</tt> returned false.
|
|
355
|
+
def reason
|
|
356
|
+
@reason
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
# Encodeds directives and returns a string that can be used in the Authorize header
|
|
360
|
+
def to_header
|
|
361
|
+
Utils.encode_directives Utils.filter_h_on(@h,
|
|
362
|
+
[:username, :realm, :nonce, :uri, :response, :algorithm, :cnonce, :opaque, :qop, :nc]), :credentials
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Updates @h from options, generally called after an instance was created with <tt>from_challenge</tt>.
|
|
366
|
+
def update_from_challenge!(options)
|
|
367
|
+
# TODO: integrity checks
|
|
368
|
+
@h[:username] = options[:username]
|
|
369
|
+
@h[:password] = options[:password]
|
|
370
|
+
@h[:digest] = options[:digest]
|
|
371
|
+
@h[:uri] = options[:uri]
|
|
372
|
+
@h[:method] = options[:method]
|
|
373
|
+
@h[:request_body] = options[:request_body]
|
|
374
|
+
unless @h[:qop].nil?
|
|
375
|
+
# Determine the QOP
|
|
376
|
+
if !options[:qop].nil? and @h[:qop].include?(options[:qop])
|
|
377
|
+
@h[:qop] = options[:qop]
|
|
378
|
+
elsif @h[:qop].include?(HTTPAuth::PREFERRED_QOP)
|
|
379
|
+
@h[:qop] = HTTPAuth::PREFERRED_QOP
|
|
380
|
+
else
|
|
381
|
+
qop = @h[:qop].detect { |qop| HTTPAuth::SUPPORTED_QOPS.include? qop }
|
|
382
|
+
unless qop.nil?
|
|
383
|
+
@h[:qop] = qop
|
|
384
|
+
else
|
|
385
|
+
raise UnsupportedError.new("HTTPAuth doesn't support any of the proposed qop values: #{@h[:qop].inspect}")
|
|
386
|
+
end
|
|
387
|
+
end
|
|
388
|
+
@h[:cnonce] ||= Utils.create_nonce options[:salt]
|
|
389
|
+
@h[:nc] ||= 1 unless @h[:qop].nil?
|
|
390
|
+
end
|
|
391
|
+
@h[:response] = Utils.calculate_digest(@h, @s, :request)
|
|
392
|
+
end
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# The Challenge class handlers the WWW-Authenticate header. The WWW-Authenticate header is sent by a server when
|
|
396
|
+
# accessing a resource without credentials is prohibided. The header should always be sent together with a 401
|
|
397
|
+
# status.
|
|
398
|
+
#
|
|
399
|
+
# See the Digest module for examples
|
|
400
|
+
class Challenge < AbstractHeader
|
|
401
|
+
|
|
402
|
+
# Parses the information from a WWW-Authenticate header and creates a new WWW-Authenticate instance with this
|
|
403
|
+
# data.
|
|
404
|
+
#
|
|
405
|
+
# * <tt>challenge</tt>: The contents of a WWW-Authenticate header
|
|
406
|
+
# See <tt>initialize</tt> for valid options.
|
|
407
|
+
def self.from_header(challenge, options={})
|
|
408
|
+
new Utils.decode_directives(challenge, :challenge), options
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# Create a new instance.
|
|
412
|
+
#
|
|
413
|
+
# * <tt>h</tt>: A Hash with directives, normally this is filled with directives coming from a Challenge instance.
|
|
414
|
+
# * <tt>options</tt>: Use to set of override data from the WWW-Authenticate header
|
|
415
|
+
# * <tt>:realm</tt>: The name of the realm the client should authenticate for. The RFC suggests to use a string
|
|
416
|
+
# like 'admin@yourhost.domain.com'. Be sure to use a reasonably long string to avoid brute force attacks.
|
|
417
|
+
# * <tt>:qop</tt>: A list with supported qop values. For example: <code>['auth-int']</code>. This will default
|
|
418
|
+
# to <code>['auth']</code>. Although this implementation supports both auth and auth-int, most
|
|
419
|
+
# implementations don't. Some implementations get confused when they receive anything but 'auth'. For
|
|
420
|
+
# maximum compatibility you should leave this setting alone.
|
|
421
|
+
# * <tt>:algorithm</tt>: The preferred algorithm for calculating the digest. For
|
|
422
|
+
# example: <code>'MD5-sess'</code>. This will default to <code>'MD5'</code>. For
|
|
423
|
+
# maximum compatibility you should leave this setting alone.
|
|
424
|
+
#
|
|
425
|
+
def initialize(h, options={})
|
|
426
|
+
@h = h
|
|
427
|
+
@h.merge! options
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# Encodes directives and returns a string that can be used as the WWW-Authenticate header
|
|
431
|
+
def to_header
|
|
432
|
+
@h[:nonce] ||= Utils.create_nonce @h[:salt]
|
|
433
|
+
@h[:opaque] ||= Utils.create_opaque
|
|
434
|
+
@h[:algorithm] ||= HTTPAuth::PREFERRED_ALGORITHM
|
|
435
|
+
@h[:qop] ||= [HTTPAuth::PREFERRED_QOP]
|
|
436
|
+
Utils.encode_directives Utils.filter_h_on(@h,
|
|
437
|
+
[:realm, :domain, :nonce, :opaque, :stale, :algorithm, :qop]), :challenge
|
|
438
|
+
end
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
# The AuthenticationInfo class handles the Authentication-Info header. Sending Authentication-Info headers will
|
|
442
|
+
# allow the client to check the integrity of the response, but it isn't compulsory and will get in the way of
|
|
443
|
+
# pipelined retrieval of resources.
|
|
444
|
+
#
|
|
445
|
+
# See the Digest module for examples
|
|
446
|
+
class AuthenticationInfo < AbstractHeader
|
|
447
|
+
|
|
448
|
+
# Parses the information from a Authentication-Info header and creates a new AuthenticationInfo instance with
|
|
449
|
+
# this data.
|
|
450
|
+
#
|
|
451
|
+
# * <tt>auth_info</tt>: The contents of the Authentication-Info header
|
|
452
|
+
# See <tt>initialize</tt> for valid options.
|
|
453
|
+
def self.from_header(auth_info, options={})
|
|
454
|
+
new Utils.decode_directives(auth_info, :auth), options
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
# Creates a new AuthenticationInfo instance based on the information from Credentials instance.
|
|
458
|
+
#
|
|
459
|
+
# * <tt>credentials</tt>: A Credentials instance
|
|
460
|
+
# See <tt>initialize</tt> for valid options.
|
|
461
|
+
def self.from_credentials(credentials, options={})
|
|
462
|
+
auth_info = new credentials.h
|
|
463
|
+
auth_info.update_from_credentials! options
|
|
464
|
+
auth_info
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
# Create a new instance.
|
|
468
|
+
#
|
|
469
|
+
# * <tt>h</tt>: A Hash with directives, normally this is filled with the directives coming from a
|
|
470
|
+
# Credentials instance.
|
|
471
|
+
# * <tt>options</tt>: Used to set or override data from the Authentication-Info header
|
|
472
|
+
# * <tt>:response_body</tt> The body of the response that's going to be sent to the client. This is a
|
|
473
|
+
# compulsory option if the qop directive is 'auth-int'.
|
|
474
|
+
def initialize(h, options={})
|
|
475
|
+
@h = h
|
|
476
|
+
@h.merge! options
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
# Encodes directives and returns a string that can be used as the AuthorizationInfo header
|
|
480
|
+
def to_header
|
|
481
|
+
Utils.encode_directives Utils.filter_h_on(@h,
|
|
482
|
+
[:nextnonce, :qop, :rspauth, :cnonce, :nc]), :auth
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
# Updates @h from options, generally called after an instance was created with <tt>from_credentials</tt>.
|
|
486
|
+
def update_from_credentials!(options)
|
|
487
|
+
# TODO: update @h after nonce invalidation
|
|
488
|
+
@h[:response_body] = options[:response_body]
|
|
489
|
+
@h[:nextnonce] = @h[:nc] + 1
|
|
490
|
+
end
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Conversion for a number of internal data structures to and from directives in the headers. Implementations
|
|
494
|
+
# shouldn't have to call any methods on Conversions.
|
|
495
|
+
class Conversions
|
|
496
|
+
class << self
|
|
497
|
+
|
|
498
|
+
# Adds quotes around the string
|
|
499
|
+
def quote_string(str)
|
|
500
|
+
"\"#{str.gsub('"', '')}\""
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
# Removes quotes from around a string
|
|
504
|
+
def unquote_string(str)
|
|
505
|
+
str =~ /^\"([^\"]*)\"$/ ? $1 : str
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
# Creates an int value from hex values
|
|
509
|
+
def hex_to_int(str)
|
|
510
|
+
"0x#{str}".hex
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
# Creates a hex value in a string from an integer
|
|
514
|
+
def int_to_hex(i)
|
|
515
|
+
i.to_s(16).rjust 8, '0'
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# Creates a boolean value from a string => true or false
|
|
519
|
+
def str_to_bool(str)
|
|
520
|
+
str == 'true'
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
# Creates a string value from a boolean => 'true' or 'false'
|
|
524
|
+
def bool_to_str(bool)
|
|
525
|
+
bool ? 'true' : 'false'
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
# Creates a quoted string with space separated items from a list
|
|
529
|
+
def list_to_quoted_string(list)
|
|
530
|
+
quote_string list.join(' ')
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
# Creates a list from a quoted space separated string of items
|
|
534
|
+
def quoted_string_to_list(string)
|
|
535
|
+
unquote_string(string).split ' '
|
|
536
|
+
end
|
|
537
|
+
end
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# Session is a file-based session implementation for storing details about the Digest authentication session
|
|
541
|
+
# between requests.
|
|
542
|
+
class Session
|
|
543
|
+
attr_accessor :opaque
|
|
544
|
+
attr_accessor :options
|
|
545
|
+
|
|
546
|
+
# Initializes the new Session object.
|
|
547
|
+
#
|
|
548
|
+
# * <tt>opaque</tt> - A string to identify the session. This would normally be the <tt>opaque</tt> sent by the
|
|
549
|
+
# client, but it could also be an identifier sent through a different mechanism.
|
|
550
|
+
# * <tt>options</tt> - Additional options
|
|
551
|
+
# * <tt>:tmpdir</tt> A tempory directory for storing the session data. Dir::tmpdir is the default.
|
|
552
|
+
def initialize(opaque, options={})
|
|
553
|
+
self.opaque = opaque
|
|
554
|
+
self.options = options
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
# Associates the new data to the session and removes the old
|
|
558
|
+
def save(data)
|
|
559
|
+
File.open(filename, 'w') do |f|
|
|
560
|
+
f.write Marshal.dump(data)
|
|
561
|
+
end
|
|
562
|
+
end
|
|
563
|
+
|
|
564
|
+
# Returns the data from this session
|
|
565
|
+
def load
|
|
566
|
+
begin
|
|
567
|
+
File.open(filename, 'r') do |f|
|
|
568
|
+
Marshal.load f.read
|
|
569
|
+
end
|
|
570
|
+
rescue Errno::ENOENT
|
|
571
|
+
{}
|
|
572
|
+
end
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
protected
|
|
576
|
+
|
|
577
|
+
# The filename from which the session will be saved and read from
|
|
578
|
+
def filename
|
|
579
|
+
"#{options[:tmpdir] || Dir::tmpdir}/ruby_digest_cache.#{self.opaque}"
|
|
580
|
+
end
|
|
581
|
+
end
|
|
582
|
+
end
|
|
583
|
+
end
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
module HTTPAuth
|
|
2
|
+
# Raised when the library finds data that doesn't conform to the standard
|
|
3
|
+
class UnwellformedHeader < ArgumentError; end
|
|
4
|
+
# Raised when the library finds data that is not strictly forbidden but doesn't know how to handle.
|
|
5
|
+
class UnsupportedError < ArgumentError; end
|
|
6
|
+
end
|