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,73 @@
|
|
|
1
|
+
require 'libxml'
|
|
2
|
+
|
|
3
|
+
# = XmlMini LibXML implementation
|
|
4
|
+
module ActiveSupport
|
|
5
|
+
module XmlMini_LibXML #:nodoc:
|
|
6
|
+
extend self
|
|
7
|
+
|
|
8
|
+
# Parse an XML Document string into a simple hash using libxml.
|
|
9
|
+
# string::
|
|
10
|
+
# XML Document string to parse
|
|
11
|
+
def parse(string)
|
|
12
|
+
if string.blank?
|
|
13
|
+
{}
|
|
14
|
+
else
|
|
15
|
+
LibXML::XML::Parser.string(string.strip).parse.to_hash
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
module LibXML
|
|
22
|
+
module Conversions
|
|
23
|
+
module Document
|
|
24
|
+
def to_hash
|
|
25
|
+
root.to_hash
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
module Node
|
|
30
|
+
CONTENT_ROOT = '__content__'.freeze
|
|
31
|
+
|
|
32
|
+
# Convert XML document to hash
|
|
33
|
+
#
|
|
34
|
+
# hash::
|
|
35
|
+
# Hash to merge the converted element into.
|
|
36
|
+
def to_hash(hash={})
|
|
37
|
+
node_hash = {}
|
|
38
|
+
|
|
39
|
+
# Insert node hash into parent hash correctly.
|
|
40
|
+
case hash[name]
|
|
41
|
+
when Array then hash[name] << node_hash
|
|
42
|
+
when Hash then hash[name] = [hash[name], node_hash]
|
|
43
|
+
when nil then hash[name] = node_hash
|
|
44
|
+
else raise "Unexpected error during hash insertion!"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Handle child elements
|
|
48
|
+
each_child do |c|
|
|
49
|
+
if c.element?
|
|
50
|
+
c.to_hash(node_hash)
|
|
51
|
+
elsif c.text? || c.cdata?
|
|
52
|
+
node_hash[CONTENT_ROOT] ||= ''
|
|
53
|
+
node_hash[CONTENT_ROOT] << c.content
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# Remove content node if it is blank
|
|
59
|
+
if node_hash.length > 1 && node_hash[CONTENT_ROOT].blank?
|
|
60
|
+
node_hash.delete(CONTENT_ROOT)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Handle attributes
|
|
64
|
+
each_attr { |a| node_hash[a.name] = a.value }
|
|
65
|
+
|
|
66
|
+
hash
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
LibXML::XML::Document.send(:include, LibXML::Conversions::Document)
|
|
73
|
+
LibXML::XML::Node.send(:include, LibXML::Conversions::Node)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
require 'libxml'
|
|
2
|
+
|
|
3
|
+
# = XmlMini LibXML implementation using a SAX-based parser
|
|
4
|
+
module ActiveSupport
|
|
5
|
+
module XmlMini_LibXMLSAX
|
|
6
|
+
extend self
|
|
7
|
+
|
|
8
|
+
# Class that will build the hash while the XML document
|
|
9
|
+
# is being parsed using SAX events.
|
|
10
|
+
class HashBuilder
|
|
11
|
+
|
|
12
|
+
include LibXML::XML::SaxParser::Callbacks
|
|
13
|
+
|
|
14
|
+
CONTENT_KEY = '__content__'.freeze
|
|
15
|
+
HASH_SIZE_KEY = '__hash_size__'.freeze
|
|
16
|
+
|
|
17
|
+
attr_reader :hash
|
|
18
|
+
|
|
19
|
+
def current_hash
|
|
20
|
+
@hash_stack.last
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def on_start_document
|
|
24
|
+
@hash = { CONTENT_KEY => '' }
|
|
25
|
+
@hash_stack = [@hash]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def on_end_document
|
|
29
|
+
@hash = @hash_stack.pop
|
|
30
|
+
@hash.delete(CONTENT_KEY)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def on_start_element(name, attrs = {})
|
|
34
|
+
new_hash = { CONTENT_KEY => '' }.merge(attrs)
|
|
35
|
+
new_hash[HASH_SIZE_KEY] = new_hash.size + 1
|
|
36
|
+
|
|
37
|
+
case current_hash[name]
|
|
38
|
+
when Array then current_hash[name] << new_hash
|
|
39
|
+
when Hash then current_hash[name] = [current_hash[name], new_hash]
|
|
40
|
+
when nil then current_hash[name] = new_hash
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
@hash_stack.push(new_hash)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def on_end_element(name)
|
|
47
|
+
if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == ''
|
|
48
|
+
current_hash.delete(CONTENT_KEY)
|
|
49
|
+
end
|
|
50
|
+
@hash_stack.pop
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def on_characters(string)
|
|
54
|
+
current_hash[CONTENT_KEY] << string
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
alias_method :on_cdata_block, :on_characters
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
attr_accessor :document_class
|
|
61
|
+
self.document_class = HashBuilder
|
|
62
|
+
|
|
63
|
+
def parse(string)
|
|
64
|
+
return {} if string.blank?
|
|
65
|
+
LibXML::XML::Error.set_handler(&LibXML::XML::Error::QUIET_HANDLER)
|
|
66
|
+
parser = LibXML::XML::SaxParser.string(string)
|
|
67
|
+
document = self.document_class.new
|
|
68
|
+
|
|
69
|
+
parser.callbacks = document
|
|
70
|
+
parser.parse
|
|
71
|
+
document.hash
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
require 'nokogiri'
|
|
2
|
+
|
|
3
|
+
# = XmlMini Nokogiri implementation
|
|
4
|
+
module ActiveSupport
|
|
5
|
+
module XmlMini_Nokogiri #:nodoc:
|
|
6
|
+
extend self
|
|
7
|
+
|
|
8
|
+
# Parse an XML Document string into a simple hash using libxml / nokogiri.
|
|
9
|
+
# string::
|
|
10
|
+
# XML Document string to parse
|
|
11
|
+
def parse(string)
|
|
12
|
+
if string.blank?
|
|
13
|
+
{}
|
|
14
|
+
else
|
|
15
|
+
doc = Nokogiri::XML(string)
|
|
16
|
+
raise doc.errors.first if doc.errors.length > 0
|
|
17
|
+
doc.to_hash
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
module Conversions
|
|
22
|
+
module Document
|
|
23
|
+
def to_hash
|
|
24
|
+
root.to_hash
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
module Node
|
|
29
|
+
CONTENT_ROOT = '__content__'.freeze
|
|
30
|
+
|
|
31
|
+
# Convert XML document to hash
|
|
32
|
+
#
|
|
33
|
+
# hash::
|
|
34
|
+
# Hash to merge the converted element into.
|
|
35
|
+
def to_hash(hash = {})
|
|
36
|
+
node_hash = {}
|
|
37
|
+
|
|
38
|
+
# Insert node hash into parent hash correctly.
|
|
39
|
+
case hash[name]
|
|
40
|
+
when Array then hash[name] << node_hash
|
|
41
|
+
when Hash then hash[name] = [hash[name], node_hash]
|
|
42
|
+
when nil then hash[name] = node_hash
|
|
43
|
+
else raise "Unexpected error during hash insertion!"
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Handle child elements
|
|
47
|
+
children.each do |c|
|
|
48
|
+
if c.element?
|
|
49
|
+
c.to_hash(node_hash)
|
|
50
|
+
elsif c.text? || c.cdata?
|
|
51
|
+
node_hash[CONTENT_ROOT] ||= ''
|
|
52
|
+
node_hash[CONTENT_ROOT] << c.content
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Remove content node if it is blank and there are child tags
|
|
57
|
+
if node_hash.length > 1 && node_hash[CONTENT_ROOT].blank?
|
|
58
|
+
node_hash.delete(CONTENT_ROOT)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Handle attributes
|
|
62
|
+
attribute_nodes.each { |a| node_hash[a.node_name] = a.value }
|
|
63
|
+
|
|
64
|
+
hash
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
Nokogiri::XML::Document.send(:include, Conversions::Document)
|
|
70
|
+
Nokogiri::XML::Node.send(:include, Conversions::Node)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
require 'nokogiri'
|
|
2
|
+
|
|
3
|
+
# = XmlMini Nokogiri implementation using a SAX-based parser
|
|
4
|
+
module ActiveSupport
|
|
5
|
+
module XmlMini_NokogiriSAX
|
|
6
|
+
extend self
|
|
7
|
+
|
|
8
|
+
# Class that will build the hash while the XML document
|
|
9
|
+
# is being parsed using SAX events.
|
|
10
|
+
class HashBuilder < Nokogiri::XML::SAX::Document
|
|
11
|
+
|
|
12
|
+
CONTENT_KEY = '__content__'.freeze
|
|
13
|
+
HASH_SIZE_KEY = '__hash_size__'.freeze
|
|
14
|
+
|
|
15
|
+
attr_reader :hash
|
|
16
|
+
|
|
17
|
+
def current_hash
|
|
18
|
+
@hash_stack.last
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def start_document
|
|
22
|
+
@hash = {}
|
|
23
|
+
@hash_stack = [@hash]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def end_document
|
|
27
|
+
raise "Parse stack not empty!" if @hash_stack.size > 1
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def error(error_message)
|
|
31
|
+
raise error_message
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def start_element(name, attrs = [])
|
|
35
|
+
new_hash = { CONTENT_KEY => '' }
|
|
36
|
+
new_hash[attrs.shift] = attrs.shift while attrs.length > 0
|
|
37
|
+
new_hash[HASH_SIZE_KEY] = new_hash.size + 1
|
|
38
|
+
|
|
39
|
+
case current_hash[name]
|
|
40
|
+
when Array then current_hash[name] << new_hash
|
|
41
|
+
when Hash then current_hash[name] = [current_hash[name], new_hash]
|
|
42
|
+
when nil then current_hash[name] = new_hash
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
@hash_stack.push(new_hash)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def end_element(name)
|
|
49
|
+
if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == ''
|
|
50
|
+
current_hash.delete(CONTENT_KEY)
|
|
51
|
+
end
|
|
52
|
+
@hash_stack.pop
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def characters(string)
|
|
56
|
+
current_hash[CONTENT_KEY] << string
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
alias_method :cdata_block, :characters
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
attr_accessor :document_class
|
|
63
|
+
self.document_class = HashBuilder
|
|
64
|
+
|
|
65
|
+
def parse(string)
|
|
66
|
+
return {} if string.blank?
|
|
67
|
+
document = self.document_class.new
|
|
68
|
+
parser = Nokogiri::XML::SAX::Parser.new(document)
|
|
69
|
+
parser.parse(string)
|
|
70
|
+
document.hash
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# = XmlMini ReXML implementation
|
|
2
|
+
module ActiveSupport
|
|
3
|
+
module XmlMini_REXML #:nodoc:
|
|
4
|
+
extend self
|
|
5
|
+
|
|
6
|
+
CONTENT_KEY = '__content__'.freeze
|
|
7
|
+
|
|
8
|
+
# Parse an XML Document string into a simple hash
|
|
9
|
+
#
|
|
10
|
+
# Same as XmlSimple::xml_in but doesn't shoot itself in the foot,
|
|
11
|
+
# and uses the defaults from ActiveSupport
|
|
12
|
+
#
|
|
13
|
+
# string::
|
|
14
|
+
# XML Document string to parse
|
|
15
|
+
def parse(string)
|
|
16
|
+
require 'rexml/document' unless defined?(REXML::Document)
|
|
17
|
+
doc = REXML::Document.new(string)
|
|
18
|
+
merge_element!({}, doc.root)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
# Convert an XML element and merge into the hash
|
|
23
|
+
#
|
|
24
|
+
# hash::
|
|
25
|
+
# Hash to merge the converted element into.
|
|
26
|
+
# element::
|
|
27
|
+
# XML element to merge into hash
|
|
28
|
+
def merge_element!(hash, element)
|
|
29
|
+
merge!(hash, element.name, collapse(element))
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Actually converts an XML document element into a data structure.
|
|
33
|
+
#
|
|
34
|
+
# element::
|
|
35
|
+
# The document element to be collapsed.
|
|
36
|
+
def collapse(element)
|
|
37
|
+
hash = get_attributes(element)
|
|
38
|
+
|
|
39
|
+
if element.has_elements?
|
|
40
|
+
element.each_element {|child| merge_element!(hash, child) }
|
|
41
|
+
merge_texts!(hash, element) unless empty_content?(element)
|
|
42
|
+
hash
|
|
43
|
+
else
|
|
44
|
+
merge_texts!(hash, element)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Merge all the texts of an element into the hash
|
|
49
|
+
#
|
|
50
|
+
# hash::
|
|
51
|
+
# Hash to add the converted emement to.
|
|
52
|
+
# element::
|
|
53
|
+
# XML element whose texts are to me merged into the hash
|
|
54
|
+
def merge_texts!(hash, element)
|
|
55
|
+
unless element.has_text?
|
|
56
|
+
hash
|
|
57
|
+
else
|
|
58
|
+
# must use value to prevent double-escaping
|
|
59
|
+
merge!(hash, CONTENT_KEY, element.texts.sum(&:value))
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Adds a new key/value pair to an existing Hash. If the key to be added
|
|
64
|
+
# already exists and the existing value associated with key is not
|
|
65
|
+
# an Array, it will be wrapped in an Array. Then the new value is
|
|
66
|
+
# appended to that Array.
|
|
67
|
+
#
|
|
68
|
+
# hash::
|
|
69
|
+
# Hash to add key/value pair to.
|
|
70
|
+
# key::
|
|
71
|
+
# Key to be added.
|
|
72
|
+
# value::
|
|
73
|
+
# Value to be associated with key.
|
|
74
|
+
def merge!(hash, key, value)
|
|
75
|
+
if hash.has_key?(key)
|
|
76
|
+
if hash[key].instance_of?(Array)
|
|
77
|
+
hash[key] << value
|
|
78
|
+
else
|
|
79
|
+
hash[key] = [hash[key], value]
|
|
80
|
+
end
|
|
81
|
+
elsif value.instance_of?(Array)
|
|
82
|
+
hash[key] = [value]
|
|
83
|
+
else
|
|
84
|
+
hash[key] = value
|
|
85
|
+
end
|
|
86
|
+
hash
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Converts the attributes array of an XML element into a hash.
|
|
90
|
+
# Returns an empty Hash if node has no attributes.
|
|
91
|
+
#
|
|
92
|
+
# element::
|
|
93
|
+
# XML element to extract attributes from.
|
|
94
|
+
def get_attributes(element)
|
|
95
|
+
attributes = {}
|
|
96
|
+
element.attributes.each { |n,v| attributes[n] = v }
|
|
97
|
+
attributes
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Determines if a document element has text content
|
|
101
|
+
#
|
|
102
|
+
# element::
|
|
103
|
+
# XML element to be checked.
|
|
104
|
+
def empty_content?(element)
|
|
105
|
+
element.texts.join.blank?
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module ActiveSupport
|
|
2
|
+
# = XmlMini
|
|
3
|
+
#
|
|
4
|
+
# To use the much faster libxml parser:
|
|
5
|
+
# gem 'libxml-ruby', '=0.9.7'
|
|
6
|
+
# XmlMini.backend = 'LibXML'
|
|
7
|
+
module XmlMini
|
|
8
|
+
extend self
|
|
9
|
+
|
|
10
|
+
attr_reader :backend
|
|
11
|
+
delegate :parse, :to => :backend
|
|
12
|
+
|
|
13
|
+
def backend=(name)
|
|
14
|
+
if name.is_a?(Module)
|
|
15
|
+
@backend = name
|
|
16
|
+
else
|
|
17
|
+
require "active_support/xml_mini/#{name.to_s.downcase}.rb"
|
|
18
|
+
@backend = ActiveSupport.const_get("XmlMini_#{name}")
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def with_backend(name)
|
|
23
|
+
old_backend, self.backend = backend, name
|
|
24
|
+
yield
|
|
25
|
+
ensure
|
|
26
|
+
self.backend = old_backend
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
XmlMini.backend = 'REXML'
|
|
31
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# Copyright (c) 2005 David Heinemeier Hansson
|
|
3
|
+
#
|
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
|
5
|
+
# a copy of this software and associated documentation files (the
|
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
|
10
|
+
# the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be
|
|
13
|
+
# included in all copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
#++
|
|
23
|
+
|
|
24
|
+
module ActiveSupport
|
|
25
|
+
def self.load_all!
|
|
26
|
+
[Dependencies, Deprecation, Gzip, MessageVerifier, Multibyte, SecureRandom, TimeWithZone]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
autoload :BacktraceCleaner, 'active_support/backtrace_cleaner'
|
|
30
|
+
autoload :Base64, 'active_support/base64'
|
|
31
|
+
autoload :BasicObject, 'active_support/basic_object'
|
|
32
|
+
autoload :BufferedLogger, 'active_support/buffered_logger'
|
|
33
|
+
autoload :Cache, 'active_support/cache'
|
|
34
|
+
autoload :Callbacks, 'active_support/callbacks'
|
|
35
|
+
autoload :Deprecation, 'active_support/deprecation'
|
|
36
|
+
autoload :Duration, 'active_support/duration'
|
|
37
|
+
autoload :Gzip, 'active_support/gzip'
|
|
38
|
+
autoload :Inflector, 'active_support/inflector'
|
|
39
|
+
autoload :Memoizable, 'active_support/memoizable'
|
|
40
|
+
autoload :MessageEncryptor, 'active_support/message_encryptor'
|
|
41
|
+
autoload :MessageVerifier, 'active_support/message_verifier'
|
|
42
|
+
autoload :Multibyte, 'active_support/multibyte'
|
|
43
|
+
autoload :OptionMerger, 'active_support/option_merger'
|
|
44
|
+
autoload :OrderedHash, 'active_support/ordered_hash'
|
|
45
|
+
autoload :OrderedOptions, 'active_support/ordered_options'
|
|
46
|
+
autoload :Rescuable, 'active_support/rescuable'
|
|
47
|
+
autoload :SafeBuffer, 'active_support/core_ext/string/output_safety'
|
|
48
|
+
autoload :SecureRandom, 'active_support/secure_random'
|
|
49
|
+
autoload :StringInquirer, 'active_support/string_inquirer'
|
|
50
|
+
autoload :TimeWithZone, 'active_support/time_with_zone'
|
|
51
|
+
autoload :TimeZone, 'active_support/values/time_zone'
|
|
52
|
+
autoload :XmlMini, 'active_support/xml_mini'
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
require 'active_support/vendor'
|
|
56
|
+
require 'active_support/core_ext'
|
|
57
|
+
require 'active_support/dependencies'
|
|
58
|
+
require 'active_support/json'
|
|
59
|
+
|
|
60
|
+
I18n.load_path << "#{File.dirname(__FILE__)}/active_support/locale/en.yml"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
=== Addressable 2.2.1
|
|
2
|
+
- added support for application/x-www-form-urlencoded.
|
|
3
|
+
|
|
4
|
+
=== Addressable 2.2.0
|
|
5
|
+
- added site methods
|
|
6
|
+
- improved documentation
|
|
7
|
+
|
|
8
|
+
=== Addressable 2.1.2
|
|
9
|
+
- added HTTP request URI methods
|
|
10
|
+
- better handling of Windows file paths
|
|
11
|
+
- validation_deferred boolean replaced with defer_validation block
|
|
12
|
+
- normalization of percent-encoded paths should now be correct
|
|
13
|
+
- fixed issue with constructing URIs with relative paths
|
|
14
|
+
- fixed warnings
|
|
15
|
+
|
|
16
|
+
=== Addressable 2.1.1
|
|
17
|
+
- more type checking changes
|
|
18
|
+
- fixed issue with unicode normalization
|
|
19
|
+
- added method to find template defaults
|
|
20
|
+
- symbolic keys are now allowed in template mappings
|
|
21
|
+
- numeric values and symbolic values are now allowed in template mappings
|
|
22
|
+
|
|
23
|
+
=== Addressable 2.1.0
|
|
24
|
+
- refactored URI template support out into its own class
|
|
25
|
+
- removed extract method due to being useless and unreliable
|
|
26
|
+
- removed Addressable::URI.expand_template
|
|
27
|
+
- removed Addressable::URI#extract_mapping
|
|
28
|
+
- added partial template expansion
|
|
29
|
+
- fixed minor bugs in the parse and heuristic_parse methods
|
|
30
|
+
- fixed incompatibility with Ruby 1.9.1
|
|
31
|
+
- fixed bottleneck in Addressable::URI#hash and Addressable::URI#to_s
|
|
32
|
+
- fixed unicode normalization exception
|
|
33
|
+
- updated query_values methods to better handle subscript notation
|
|
34
|
+
- worked around issue with freezing URIs
|
|
35
|
+
- improved specs
|
|
36
|
+
|
|
37
|
+
=== Addressable 2.0.2
|
|
38
|
+
- fixed issue with URI template expansion
|
|
39
|
+
- fixed issue with percent escaping characters 0-15
|
|
40
|
+
|
|
41
|
+
=== Addressable 2.0.1
|
|
42
|
+
- fixed issue with query string assignment
|
|
43
|
+
- fixed issue with improperly encoded components
|
|
44
|
+
|
|
45
|
+
=== Addressable 2.0.0
|
|
46
|
+
- the initialize method now takes an options hash as its only parameter
|
|
47
|
+
- added query_values method to URI class
|
|
48
|
+
- completely replaced IDNA implementation with pure Ruby
|
|
49
|
+
- renamed Addressable::ADDRESSABLE_VERSION to Addressable::VERSION
|
|
50
|
+
- completely reworked the Rakefile
|
|
51
|
+
- changed the behavior of the port method significantly
|
|
52
|
+
- Addressable::URI.encode_segment, Addressable::URI.unencode_segment renamed
|
|
53
|
+
- documentation is now in YARD format
|
|
54
|
+
- more rigorous type checking
|
|
55
|
+
- to_str method implemented, implicit conversion to Strings now allowed
|
|
56
|
+
- Addressable::URI#omit method added, Addressable::URI#merge method replaced
|
|
57
|
+
- updated URI Template code to match v 03 of the draft spec
|
|
58
|
+
- added a bunch of new specifications
|
|
59
|
+
|
|
60
|
+
=== Addressable 1.0.4
|
|
61
|
+
- switched to using RSpec's pending system for specs that rely on IDN
|
|
62
|
+
- fixed issue with creating URIs with paths that are not prefixed with '/'
|
|
63
|
+
|
|
64
|
+
=== Addressable 1.0.3
|
|
65
|
+
- implemented a hash method
|
|
66
|
+
|
|
67
|
+
=== Addressable 1.0.2
|
|
68
|
+
- fixed minor bug with the extract_mapping method
|
|
69
|
+
|
|
70
|
+
=== Addressable 1.0.1
|
|
71
|
+
- fixed minor bug with the extract_mapping method
|
|
72
|
+
|
|
73
|
+
=== Addressable 1.0.0
|
|
74
|
+
- heuristic parse method added
|
|
75
|
+
- parsing is slightly more strict
|
|
76
|
+
- replaced to_h with to_hash
|
|
77
|
+
- fixed routing methods
|
|
78
|
+
- improved specifications
|
|
79
|
+
- improved heckle rake task
|
|
80
|
+
- no surviving heckle mutations
|
|
81
|
+
|
|
82
|
+
=== Addressable 0.1.2
|
|
83
|
+
- improved normalization
|
|
84
|
+
- fixed bug in joining algorithm
|
|
85
|
+
- updated specifications
|
|
86
|
+
|
|
87
|
+
=== Addressable 0.1.1
|
|
88
|
+
- updated documentation
|
|
89
|
+
- added URI Template variable extraction
|
|
90
|
+
|
|
91
|
+
=== Addressable 0.1.0
|
|
92
|
+
- initial release
|
|
93
|
+
- implementation based on RFC 3986, 3987
|
|
94
|
+
- support for IRIs via libidn
|
|
95
|
+
- support for the URI Template draft spec
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Addressable, Copyright (c) 2006-2010 Bob Aman
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
== About
|
|
2
|
+
|
|
3
|
+
Homepage:: Addressable[http://addressable.rubyforge.org/]
|
|
4
|
+
Authors:: Bob Aman (mailto:bob@sporkmonger.com)
|
|
5
|
+
Copyright:: Copyright 2010 Bob Aman
|
|
6
|
+
License:: MIT
|
|
7
|
+
|
|
8
|
+
Addressable is a replacement for the URI implementation that is part of
|
|
9
|
+
Ruby's standard library. It more closely conforms to the relevant RFCs and
|
|
10
|
+
adds support for IRIs and URI templates. Additionally, it provides extensive
|
|
11
|
+
support for URI templates.
|
|
12
|
+
|
|
13
|
+
== Classes
|
|
14
|
+
- {Addressable::URI}
|
|
15
|
+
- {Addressable::Template}
|
|
16
|
+
|
|
17
|
+
== Example usage
|
|
18
|
+
require "addressable/uri"
|
|
19
|
+
|
|
20
|
+
uri = Addressable::URI.parse("http://example.com/path/to/resource/")
|
|
21
|
+
uri.scheme
|
|
22
|
+
#=> "http"
|
|
23
|
+
uri.host
|
|
24
|
+
#=> "example.com"
|
|
25
|
+
uri.path
|
|
26
|
+
#=> "/path/to/resource/"
|
|
27
|
+
|
|
28
|
+
uri = Addressable::URI.parse("http://www.詹姆斯.com/")
|
|
29
|
+
uri.normalize
|
|
30
|
+
#=> #<Addressable::URI:0xc9a4c8 URI:http://www.xn--8ws00zhy3a.com/>
|
|
31
|
+
|
|
32
|
+
require "addressable/template"
|
|
33
|
+
|
|
34
|
+
template = Addressable::Template.new("http://example.com/{-list|+|query}/")
|
|
35
|
+
template.expand({
|
|
36
|
+
"query" => "an example query".split(" ")
|
|
37
|
+
})
|
|
38
|
+
#=> #<Addressable::URI:0xc9d95c URI:http://example.com/an+example+query/>
|
|
39
|
+
|
|
40
|
+
template = Addressable::Template.new(
|
|
41
|
+
"http://example.com/{-join|&|one,two,three}/"
|
|
42
|
+
)
|
|
43
|
+
template.partial_expand({"one" => "1", "three" => 3}).pattern
|
|
44
|
+
#=> "http://example.com/?one=1{-prefix|&two=|two}&three=3"
|
|
45
|
+
|
|
46
|
+
template = Addressable::Template.new(
|
|
47
|
+
"http://{host}/{-suffix|/|segments}?{-join|&|one,two,bogus}\#{fragment}"
|
|
48
|
+
)
|
|
49
|
+
uri = Addressable::URI.parse(
|
|
50
|
+
"http://example.com/a/b/c/?one=1&two=2#foo"
|
|
51
|
+
)
|
|
52
|
+
template.extract(uri)
|
|
53
|
+
#=>
|
|
54
|
+
# {
|
|
55
|
+
# "host" => "example.com",
|
|
56
|
+
# "segments" => ["a", "b", "c"],
|
|
57
|
+
# "one" => "1",
|
|
58
|
+
# "two" => "2",
|
|
59
|
+
# "fragment" => "foo"
|
|
60
|
+
# }
|