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,56 @@
|
|
|
1
|
+
require 'active_support/core_ext/array/wrapper'
|
|
2
|
+
|
|
3
|
+
class Hash
|
|
4
|
+
# Returns a JSON string representing the hash.
|
|
5
|
+
#
|
|
6
|
+
# Without any +options+, the returned JSON string will include all
|
|
7
|
+
# the hash keys. For example:
|
|
8
|
+
#
|
|
9
|
+
# { :name => "Konata Izumi", 'age' => 16, 1 => 2 }.to_json
|
|
10
|
+
# # => {"name": "Konata Izumi", "1": 2, "age": 16}
|
|
11
|
+
#
|
|
12
|
+
# The keys in the JSON string are unordered due to the nature of hashes.
|
|
13
|
+
#
|
|
14
|
+
# The <tt>:only</tt> and <tt>:except</tt> options can be used to limit the
|
|
15
|
+
# attributes included, and will accept 1 or more hash keys to include/exclude.
|
|
16
|
+
#
|
|
17
|
+
# { :name => "Konata Izumi", 'age' => 16, 1 => 2 }.to_json(:only => [:name, 'age'])
|
|
18
|
+
# # => {"name": "Konata Izumi", "age": 16}
|
|
19
|
+
#
|
|
20
|
+
# { :name => "Konata Izumi", 'age' => 16, 1 => 2 }.to_json(:except => 1)
|
|
21
|
+
# # => {"name": "Konata Izumi", "age": 16}
|
|
22
|
+
#
|
|
23
|
+
# The +options+ also filter down to any hash values. This is particularly
|
|
24
|
+
# useful for converting hashes containing ActiveRecord objects or any object
|
|
25
|
+
# that responds to options in their <tt>to_json</tt> method. For example:
|
|
26
|
+
#
|
|
27
|
+
# users = User.find(:all)
|
|
28
|
+
# { :users => users, :count => users.size }.to_json(:include => :posts)
|
|
29
|
+
#
|
|
30
|
+
# would pass the <tt>:include => :posts</tt> option to <tt>users</tt>,
|
|
31
|
+
# allowing the posts association in the User model to be converted to JSON
|
|
32
|
+
# as well.
|
|
33
|
+
def to_json(options = nil) #:nodoc:
|
|
34
|
+
hash = as_json(options)
|
|
35
|
+
|
|
36
|
+
result = '{'
|
|
37
|
+
result << hash.map do |key, value|
|
|
38
|
+
"#{ActiveSupport::JSON.encode(key.to_s)}:#{ActiveSupport::JSON.encode(value, options)}"
|
|
39
|
+
end * ','
|
|
40
|
+
result << '}'
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def as_json(options = nil) #:nodoc:
|
|
44
|
+
if options
|
|
45
|
+
if attrs = options[:except]
|
|
46
|
+
except(*Array.wrap(attrs))
|
|
47
|
+
elsif attrs = options[:only]
|
|
48
|
+
slice(*Array.wrap(attrs))
|
|
49
|
+
else
|
|
50
|
+
self
|
|
51
|
+
end
|
|
52
|
+
else
|
|
53
|
+
self
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
class Numeric
|
|
2
|
+
def to_json(options = nil) #:nodoc:
|
|
3
|
+
to_s
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def as_json(options = nil) #:nodoc:
|
|
7
|
+
self
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
class Float
|
|
12
|
+
def to_json(options = nil) #:nodoc:
|
|
13
|
+
to_s
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class Integer
|
|
18
|
+
def to_json(options = nil) #:nodoc:
|
|
19
|
+
to_s
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
class Time
|
|
2
|
+
# Coerces the time to a string for JSON encoding.
|
|
3
|
+
#
|
|
4
|
+
# ISO 8601 format is used if ActiveSupport::JSON::Encoding.use_standard_json_time_format is set.
|
|
5
|
+
#
|
|
6
|
+
# ==== Examples
|
|
7
|
+
#
|
|
8
|
+
# # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
|
|
9
|
+
# Time.utc(2005,2,1,15,15,10).to_json
|
|
10
|
+
# # => "2005-02-01T15:15:10Z"
|
|
11
|
+
#
|
|
12
|
+
# # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false
|
|
13
|
+
# Time.utc(2005,2,1,15,15,10).to_json
|
|
14
|
+
# # => "2005/02/01 15:15:10 +0000"
|
|
15
|
+
def as_json(options = nil)
|
|
16
|
+
if ActiveSupport::JSON::Encoding.use_standard_json_time_format
|
|
17
|
+
xmlschema
|
|
18
|
+
else
|
|
19
|
+
%(#{strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)})
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
require 'active_support/core_ext/module/delegation'
|
|
3
|
+
require 'active_support/deprecation'
|
|
4
|
+
|
|
5
|
+
module ActiveSupport
|
|
6
|
+
class << self
|
|
7
|
+
delegate :use_standard_json_time_format, :use_standard_json_time_format=,
|
|
8
|
+
:escape_html_entities_in_json, :escape_html_entities_in_json=,
|
|
9
|
+
:to => :'ActiveSupport::JSON::Encoding'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
module JSON
|
|
13
|
+
# matches YAML-formatted dates
|
|
14
|
+
DATE_REGEX = /^(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[ \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?))$/
|
|
15
|
+
|
|
16
|
+
class << self
|
|
17
|
+
delegate :encode, :to => :'ActiveSupport::JSON::Encoding'
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
module Encoding #:nodoc:
|
|
21
|
+
class CircularReferenceError < StandardError
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
ESCAPED_CHARS = {
|
|
25
|
+
"\x00" => '\u0000', "\x01" => '\u0001', "\x02" => '\u0002',
|
|
26
|
+
"\x03" => '\u0003', "\x04" => '\u0004', "\x05" => '\u0005',
|
|
27
|
+
"\x06" => '\u0006', "\x07" => '\u0007', "\x0B" => '\u000B',
|
|
28
|
+
"\x0E" => '\u000E', "\x0F" => '\u000F', "\x10" => '\u0010',
|
|
29
|
+
"\x11" => '\u0011', "\x12" => '\u0012', "\x13" => '\u0013',
|
|
30
|
+
"\x14" => '\u0014', "\x15" => '\u0015', "\x16" => '\u0016',
|
|
31
|
+
"\x17" => '\u0017', "\x18" => '\u0018', "\x19" => '\u0019',
|
|
32
|
+
"\x1A" => '\u001A', "\x1B" => '\u001B', "\x1C" => '\u001C',
|
|
33
|
+
"\x1D" => '\u001D', "\x1E" => '\u001E', "\x1F" => '\u001F',
|
|
34
|
+
"\010" => '\b',
|
|
35
|
+
"\f" => '\f',
|
|
36
|
+
"\n" => '\n',
|
|
37
|
+
"\r" => '\r',
|
|
38
|
+
"\t" => '\t',
|
|
39
|
+
'"' => '\"',
|
|
40
|
+
'\\' => '\\\\',
|
|
41
|
+
'>' => '\u003E',
|
|
42
|
+
'<' => '\u003C',
|
|
43
|
+
'&' => '\u0026' }
|
|
44
|
+
|
|
45
|
+
class << self
|
|
46
|
+
# If true, use ISO 8601 format for dates and times. Otherwise, fall back to the Active Support legacy format.
|
|
47
|
+
attr_accessor :use_standard_json_time_format
|
|
48
|
+
|
|
49
|
+
attr_accessor :escape_regex
|
|
50
|
+
attr_reader :escape_html_entities_in_json
|
|
51
|
+
|
|
52
|
+
def escape_html_entities_in_json=(value)
|
|
53
|
+
self.escape_regex = \
|
|
54
|
+
if @escape_html_entities_in_json = value
|
|
55
|
+
/[\x00-\x1F"\\><&]/
|
|
56
|
+
else
|
|
57
|
+
/[\x00-\x1F"\\]/
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def escape(string)
|
|
62
|
+
string = string.dup.force_encoding(::Encoding::BINARY) if string.respond_to?(:force_encoding)
|
|
63
|
+
json = string.
|
|
64
|
+
gsub(escape_regex) { |s| ESCAPED_CHARS[s] }.
|
|
65
|
+
gsub(/([\xC0-\xDF][\x80-\xBF]|
|
|
66
|
+
[\xE0-\xEF][\x80-\xBF]{2}|
|
|
67
|
+
[\xF0-\xF7][\x80-\xBF]{3})+/nx) { |s|
|
|
68
|
+
s.unpack("U*").pack("n*").unpack("H*")[0].gsub(/.{4}/n, '\\\\u\&')
|
|
69
|
+
}
|
|
70
|
+
%("#{json}")
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Converts a Ruby object into a JSON string.
|
|
74
|
+
def encode(value, options = nil)
|
|
75
|
+
options = {} unless Hash === options
|
|
76
|
+
seen = (options[:seen] ||= [])
|
|
77
|
+
raise CircularReferenceError, 'object references itself' if seen.include?(value)
|
|
78
|
+
seen << value
|
|
79
|
+
value.to_json(options)
|
|
80
|
+
ensure
|
|
81
|
+
seen.pop
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
self.escape_html_entities_in_json = true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
CircularReferenceError = Deprecation::DeprecatedConstantProxy.new('ActiveSupport::JSON::CircularReferenceError', Encoding::CircularReferenceError)
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Hack to load json gem first so we can overwrite its to_json.
|
|
93
|
+
begin
|
|
94
|
+
require 'json'
|
|
95
|
+
rescue LoadError
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
require 'active_support/json/variable'
|
|
99
|
+
require 'active_support/json/encoders/date'
|
|
100
|
+
require 'active_support/json/encoders/date_time'
|
|
101
|
+
require 'active_support/json/encoders/enumerable'
|
|
102
|
+
require 'active_support/json/encoders/false_class'
|
|
103
|
+
require 'active_support/json/encoders/hash'
|
|
104
|
+
require 'active_support/json/encoders/nil_class'
|
|
105
|
+
require 'active_support/json/encoders/numeric'
|
|
106
|
+
require 'active_support/json/encoders/object'
|
|
107
|
+
require 'active_support/json/encoders/regexp'
|
|
108
|
+
require 'active_support/json/encoders/string'
|
|
109
|
+
require 'active_support/json/encoders/symbol'
|
|
110
|
+
require 'active_support/json/encoders/time'
|
|
111
|
+
require 'active_support/json/encoders/true_class'
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
en:
|
|
2
|
+
date:
|
|
3
|
+
formats:
|
|
4
|
+
# Use the strftime parameters for formats.
|
|
5
|
+
# When no format has been given, it uses default.
|
|
6
|
+
# You can provide other formats here if you like!
|
|
7
|
+
default: "%Y-%m-%d"
|
|
8
|
+
short: "%b %d"
|
|
9
|
+
long: "%B %d, %Y"
|
|
10
|
+
|
|
11
|
+
day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
|
|
12
|
+
abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
|
|
13
|
+
|
|
14
|
+
# Don't forget the nil at the beginning; there's no such thing as a 0th month
|
|
15
|
+
month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
|
|
16
|
+
abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
|
|
17
|
+
# Used in date_select and datime_select.
|
|
18
|
+
order: [ :year, :month, :day ]
|
|
19
|
+
|
|
20
|
+
time:
|
|
21
|
+
formats:
|
|
22
|
+
default: "%a, %d %b %Y %H:%M:%S %z"
|
|
23
|
+
short: "%d %b %H:%M"
|
|
24
|
+
long: "%B %d, %Y %H:%M"
|
|
25
|
+
am: "am"
|
|
26
|
+
pm: "pm"
|
|
27
|
+
|
|
28
|
+
# Used in array.to_sentence.
|
|
29
|
+
support:
|
|
30
|
+
array:
|
|
31
|
+
words_connector: ", "
|
|
32
|
+
two_words_connector: " and "
|
|
33
|
+
last_word_connector: ", and "
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
module ActiveSupport
|
|
2
|
+
module Memoizable
|
|
3
|
+
def self.memoized_ivar_for(symbol)
|
|
4
|
+
"@_memoized_#{symbol.to_s.sub(/\?\Z/, '_query').sub(/!\Z/, '_bang')}".to_sym
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
module InstanceMethods
|
|
8
|
+
def self.included(base)
|
|
9
|
+
base.class_eval do
|
|
10
|
+
unless base.method_defined?(:freeze_without_memoizable)
|
|
11
|
+
alias_method_chain :freeze, :memoizable
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def freeze_with_memoizable
|
|
17
|
+
memoize_all unless frozen?
|
|
18
|
+
freeze_without_memoizable
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def memoize_all
|
|
22
|
+
prime_cache ".*"
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def unmemoize_all
|
|
26
|
+
flush_cache ".*"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def prime_cache(*syms)
|
|
30
|
+
syms.each do |sym|
|
|
31
|
+
methods.each do |m|
|
|
32
|
+
if m.to_s =~ /^_unmemoized_(#{sym})/
|
|
33
|
+
if method(m).arity == 0
|
|
34
|
+
__send__($1)
|
|
35
|
+
else
|
|
36
|
+
ivar = ActiveSupport::Memoizable.memoized_ivar_for($1)
|
|
37
|
+
instance_variable_set(ivar, {})
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def flush_cache(*syms, &block)
|
|
45
|
+
syms.each do |sym|
|
|
46
|
+
(methods + private_methods + protected_methods).each do |m|
|
|
47
|
+
if m.to_s =~ /^_unmemoized_(#{sym})/
|
|
48
|
+
ivar = ActiveSupport::Memoizable.memoized_ivar_for($1)
|
|
49
|
+
instance_variable_get(ivar).clear if instance_variable_defined?(ivar)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def memoize(*symbols)
|
|
57
|
+
symbols.each do |symbol|
|
|
58
|
+
original_method = :"_unmemoized_#{symbol}"
|
|
59
|
+
memoized_ivar = ActiveSupport::Memoizable.memoized_ivar_for(symbol)
|
|
60
|
+
|
|
61
|
+
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
|
62
|
+
include InstanceMethods # include InstanceMethods
|
|
63
|
+
#
|
|
64
|
+
if method_defined?(:#{original_method}) # if method_defined?(:_unmemoized_mime_type)
|
|
65
|
+
raise "Already memoized #{symbol}" # raise "Already memoized mime_type"
|
|
66
|
+
end # end
|
|
67
|
+
alias #{original_method} #{symbol} # alias _unmemoized_mime_type mime_type
|
|
68
|
+
#
|
|
69
|
+
if instance_method(:#{symbol}).arity == 0 # if instance_method(:mime_type).arity == 0
|
|
70
|
+
def #{symbol}(reload = false) # def mime_type(reload = false)
|
|
71
|
+
if reload || !defined?(#{memoized_ivar}) || #{memoized_ivar}.empty? # if reload || !defined?(@_memoized_mime_type) || @_memoized_mime_type.empty?
|
|
72
|
+
#{memoized_ivar} = [#{original_method}.freeze] # @_memoized_mime_type = [_unmemoized_mime_type.freeze]
|
|
73
|
+
end # end
|
|
74
|
+
#{memoized_ivar}[0] # @_memoized_mime_type[0]
|
|
75
|
+
end # end
|
|
76
|
+
else # else
|
|
77
|
+
def #{symbol}(*args) # def mime_type(*args)
|
|
78
|
+
#{memoized_ivar} ||= {} unless frozen? # @_memoized_mime_type ||= {} unless frozen?
|
|
79
|
+
reload = args.pop if args.last == true || args.last == :reload # reload = args.pop if args.last == true || args.last == :reload
|
|
80
|
+
#
|
|
81
|
+
if defined?(#{memoized_ivar}) && #{memoized_ivar} # if defined?(@_memoized_mime_type) && @_memoized_mime_type
|
|
82
|
+
if !reload && #{memoized_ivar}.has_key?(args) # if !reload && @_memoized_mime_type.has_key?(args)
|
|
83
|
+
#{memoized_ivar}[args] # @_memoized_mime_type[args]
|
|
84
|
+
elsif #{memoized_ivar} # elsif @_memoized_mime_type
|
|
85
|
+
#{memoized_ivar}[args] = #{original_method}(*args).freeze # @_memoized_mime_type[args] = _unmemoized_mime_type(*args).freeze
|
|
86
|
+
end # end
|
|
87
|
+
else # else
|
|
88
|
+
#{original_method}(*args) # _unmemoized_mime_type(*args)
|
|
89
|
+
end # end
|
|
90
|
+
end # end
|
|
91
|
+
end # end
|
|
92
|
+
#
|
|
93
|
+
if private_method_defined?(#{original_method.inspect}) # if private_method_defined?(:_unmemoized_mime_type)
|
|
94
|
+
private #{symbol.inspect} # private :mime_type
|
|
95
|
+
end # end
|
|
96
|
+
EOS
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
require 'openssl'
|
|
2
|
+
|
|
3
|
+
module ActiveSupport
|
|
4
|
+
# MessageEncryptor is a simple way to encrypt values which get stored somewhere
|
|
5
|
+
# you don't trust.
|
|
6
|
+
#
|
|
7
|
+
# The cipher text and initialization vector are base64 encoded and returned to you.
|
|
8
|
+
#
|
|
9
|
+
# This can be used in situations similar to the MessageVerifier, but where you don't
|
|
10
|
+
# want users to be able to determine the value of the payload.
|
|
11
|
+
class MessageEncryptor
|
|
12
|
+
class InvalidMessage < StandardError; end
|
|
13
|
+
OpenSSLCipherError = OpenSSL::Cipher.const_defined?(:CipherError) ? OpenSSL::Cipher::CipherError : OpenSSL::CipherError
|
|
14
|
+
|
|
15
|
+
def initialize(secret, cipher = 'aes-256-cbc')
|
|
16
|
+
@secret = secret
|
|
17
|
+
@cipher = cipher
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def encrypt(value)
|
|
21
|
+
cipher = new_cipher
|
|
22
|
+
# Rely on OpenSSL for the initialization vector
|
|
23
|
+
iv = cipher.random_iv
|
|
24
|
+
|
|
25
|
+
cipher.encrypt
|
|
26
|
+
cipher.key = @secret
|
|
27
|
+
cipher.iv = iv
|
|
28
|
+
|
|
29
|
+
encrypted_data = cipher.update(Marshal.dump(value))
|
|
30
|
+
encrypted_data << cipher.final
|
|
31
|
+
|
|
32
|
+
[encrypted_data, iv].map {|v| ActiveSupport::Base64.encode64s(v)}.join("--")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def decrypt(encrypted_message)
|
|
36
|
+
cipher = new_cipher
|
|
37
|
+
encrypted_data, iv = encrypted_message.split("--").map {|v| ActiveSupport::Base64.decode64(v)}
|
|
38
|
+
|
|
39
|
+
cipher.decrypt
|
|
40
|
+
cipher.key = @secret
|
|
41
|
+
cipher.iv = iv
|
|
42
|
+
|
|
43
|
+
decrypted_data = cipher.update(encrypted_data)
|
|
44
|
+
decrypted_data << cipher.final
|
|
45
|
+
|
|
46
|
+
Marshal.load(decrypted_data)
|
|
47
|
+
rescue OpenSSLCipherError, TypeError
|
|
48
|
+
raise InvalidMessage
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def encrypt_and_sign(value)
|
|
52
|
+
verifier.generate(encrypt(value))
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def decrypt_and_verify(value)
|
|
56
|
+
decrypt(verifier.verify(value))
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
private
|
|
62
|
+
def new_cipher
|
|
63
|
+
OpenSSL::Cipher::Cipher.new(@cipher)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def verifier
|
|
67
|
+
MessageVerifier.new(@secret)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
module ActiveSupport
|
|
2
|
+
# MessageVerifier makes it easy to generate and verify messages which are signed
|
|
3
|
+
# to prevent tampering.
|
|
4
|
+
#
|
|
5
|
+
# This is useful for cases like remember-me tokens and auto-unsubscribe links where the
|
|
6
|
+
# session store isn't suitable or available.
|
|
7
|
+
#
|
|
8
|
+
# Remember Me:
|
|
9
|
+
# cookies[:remember_me] = @verifier.generate([@user.id, 2.weeks.from_now])
|
|
10
|
+
#
|
|
11
|
+
# In the authentication filter:
|
|
12
|
+
#
|
|
13
|
+
# id, time = @verifier.verify(cookies[:remember_me])
|
|
14
|
+
# if time < Time.now
|
|
15
|
+
# self.current_user = User.find(id)
|
|
16
|
+
# end
|
|
17
|
+
#
|
|
18
|
+
class MessageVerifier
|
|
19
|
+
class InvalidSignature < StandardError; end
|
|
20
|
+
|
|
21
|
+
def initialize(secret, digest = 'SHA1')
|
|
22
|
+
@secret = secret
|
|
23
|
+
@digest = digest
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def verify(signed_message)
|
|
27
|
+
raise InvalidSignature if signed_message.blank?
|
|
28
|
+
|
|
29
|
+
data, digest = signed_message.split("--")
|
|
30
|
+
if data.present? && digest.present? && secure_compare(digest, generate_digest(data))
|
|
31
|
+
Marshal.load(ActiveSupport::Base64.decode64(data))
|
|
32
|
+
else
|
|
33
|
+
raise InvalidSignature
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def generate(value)
|
|
38
|
+
data = ActiveSupport::Base64.encode64s(Marshal.dump(value))
|
|
39
|
+
"#{data}--#{generate_digest(data)}"
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
private
|
|
43
|
+
if "foo".respond_to?(:force_encoding)
|
|
44
|
+
# constant-time comparison algorithm to prevent timing attacks
|
|
45
|
+
def secure_compare(a, b)
|
|
46
|
+
a = a.dup.force_encoding(Encoding::BINARY)
|
|
47
|
+
b = b.dup.force_encoding(Encoding::BINARY)
|
|
48
|
+
|
|
49
|
+
if a.length == b.length
|
|
50
|
+
result = 0
|
|
51
|
+
for i in 0..(a.length - 1)
|
|
52
|
+
result |= a[i].ord ^ b[i].ord
|
|
53
|
+
end
|
|
54
|
+
result == 0
|
|
55
|
+
else
|
|
56
|
+
false
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
else
|
|
60
|
+
# For <= 1.8.6
|
|
61
|
+
def secure_compare(a, b)
|
|
62
|
+
if a.length == b.length
|
|
63
|
+
result = 0
|
|
64
|
+
for i in 0..(a.length - 1)
|
|
65
|
+
result |= a[i] ^ b[i]
|
|
66
|
+
end
|
|
67
|
+
result == 0
|
|
68
|
+
else
|
|
69
|
+
false
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def generate_digest(data)
|
|
75
|
+
require 'openssl' unless defined?(OpenSSL)
|
|
76
|
+
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new(@digest), @secret, data)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|