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,328 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
#--
|
|
3
|
+
# Copyright 2004, 2005 by Jim Weirich (jim@weirichhouse.org).
|
|
4
|
+
# All rights reserved.
|
|
5
|
+
|
|
6
|
+
# Permission is granted for use, copying, modification, distribution,
|
|
7
|
+
# and distribution of modified versions of this work as long as the
|
|
8
|
+
# above copyright notice is included.
|
|
9
|
+
#++
|
|
10
|
+
|
|
11
|
+
# Provide a flexible and easy to use Builder for creating XML markup.
|
|
12
|
+
# See XmlBuilder for usage details.
|
|
13
|
+
|
|
14
|
+
require 'builder/xmlbase'
|
|
15
|
+
|
|
16
|
+
module Builder
|
|
17
|
+
|
|
18
|
+
# Create XML markup easily. All (well, almost all) methods sent to
|
|
19
|
+
# an XmlMarkup object will be translated to the equivalent XML
|
|
20
|
+
# markup. Any method with a block will be treated as an XML markup
|
|
21
|
+
# tag with nested markup in the block.
|
|
22
|
+
#
|
|
23
|
+
# Examples will demonstrate this easier than words. In the
|
|
24
|
+
# following, +xm+ is an +XmlMarkup+ object.
|
|
25
|
+
#
|
|
26
|
+
# xm.em("emphasized") # => <em>emphasized</em>
|
|
27
|
+
# xm.em { xmm.b("emp & bold") } # => <em><b>emph & bold</b></em>
|
|
28
|
+
# xm.a("A Link", "href"=>"http://onestepback.org")
|
|
29
|
+
# # => <a href="http://onestepback.org">A Link</a>
|
|
30
|
+
# xm.div { br } # => <div><br/></div>
|
|
31
|
+
# xm.target("name"=>"compile", "option"=>"fast")
|
|
32
|
+
# # => <target option="fast" name="compile"\>
|
|
33
|
+
# # NOTE: order of attributes is not specified.
|
|
34
|
+
#
|
|
35
|
+
# xm.instruct! # <?xml version="1.0" encoding="UTF-8"?>
|
|
36
|
+
# xm.html { # <html>
|
|
37
|
+
# xm.head { # <head>
|
|
38
|
+
# xm.title("History") # <title>History</title>
|
|
39
|
+
# } # </head>
|
|
40
|
+
# xm.body { # <body>
|
|
41
|
+
# xm.comment! "HI" # <! -- HI -->
|
|
42
|
+
# xm.h1("Header") # <h1>Header</h1>
|
|
43
|
+
# xm.p("paragraph") # <p>paragraph</p>
|
|
44
|
+
# } # </body>
|
|
45
|
+
# } # </html>
|
|
46
|
+
#
|
|
47
|
+
# == Notes:
|
|
48
|
+
#
|
|
49
|
+
# * The order that attributes are inserted in markup tags is
|
|
50
|
+
# undefined.
|
|
51
|
+
#
|
|
52
|
+
# * Sometimes you wish to insert text without enclosing tags. Use
|
|
53
|
+
# the <tt>text!</tt> method to accomplish this.
|
|
54
|
+
#
|
|
55
|
+
# Example:
|
|
56
|
+
#
|
|
57
|
+
# xm.div { # <div>
|
|
58
|
+
# xm.text! "line"; xm.br # line<br/>
|
|
59
|
+
# xm.text! "another line"; xmbr # another line<br/>
|
|
60
|
+
# } # </div>
|
|
61
|
+
#
|
|
62
|
+
# * The special XML characters <, >, and & are converted to <,
|
|
63
|
+
# > and & automatically. Use the <tt><<</tt> operation to
|
|
64
|
+
# insert text without modification.
|
|
65
|
+
#
|
|
66
|
+
# * Sometimes tags use special characters not allowed in ruby
|
|
67
|
+
# identifiers. Use the <tt>tag!</tt> method to handle these
|
|
68
|
+
# cases.
|
|
69
|
+
#
|
|
70
|
+
# Example:
|
|
71
|
+
#
|
|
72
|
+
# xml.tag!("SOAP:Envelope") { ... }
|
|
73
|
+
#
|
|
74
|
+
# will produce ...
|
|
75
|
+
#
|
|
76
|
+
# <SOAP:Envelope> ... </SOAP:Envelope>"
|
|
77
|
+
#
|
|
78
|
+
# <tt>tag!</tt> will also take text and attribute arguments (after
|
|
79
|
+
# the tag name) like normal markup methods. (But see the next
|
|
80
|
+
# bullet item for a better way to handle XML namespaces).
|
|
81
|
+
#
|
|
82
|
+
# * Direct support for XML namespaces is now available. If the
|
|
83
|
+
# first argument to a tag call is a symbol, it will be joined to
|
|
84
|
+
# the tag to produce a namespace:tag combination. It is easier to
|
|
85
|
+
# show this than describe it.
|
|
86
|
+
#
|
|
87
|
+
# xml.SOAP :Envelope do ... end
|
|
88
|
+
#
|
|
89
|
+
# Just put a space before the colon in a namespace to produce the
|
|
90
|
+
# right form for builder (e.g. "<tt>SOAP:Envelope</tt>" =>
|
|
91
|
+
# "<tt>xml.SOAP :Envelope</tt>")
|
|
92
|
+
#
|
|
93
|
+
# * XmlMarkup builds the markup in any object (called a _target_)
|
|
94
|
+
# that accepts the <tt><<</tt> method. If no target is given,
|
|
95
|
+
# then XmlMarkup defaults to a string target.
|
|
96
|
+
#
|
|
97
|
+
# Examples:
|
|
98
|
+
#
|
|
99
|
+
# xm = Builder::XmlMarkup.new
|
|
100
|
+
# result = xm.title("yada")
|
|
101
|
+
# # result is a string containing the markup.
|
|
102
|
+
#
|
|
103
|
+
# buffer = ""
|
|
104
|
+
# xm = Builder::XmlMarkup.new(buffer)
|
|
105
|
+
# # The markup is appended to buffer (using <<)
|
|
106
|
+
#
|
|
107
|
+
# xm = Builder::XmlMarkup.new(STDOUT)
|
|
108
|
+
# # The markup is written to STDOUT (using <<)
|
|
109
|
+
#
|
|
110
|
+
# xm = Builder::XmlMarkup.new
|
|
111
|
+
# x2 = Builder::XmlMarkup.new(:target=>xm)
|
|
112
|
+
# # Markup written to +x2+ will be send to +xm+.
|
|
113
|
+
#
|
|
114
|
+
# * Indentation is enabled by providing the number of spaces to
|
|
115
|
+
# indent for each level as a second argument to XmlBuilder.new.
|
|
116
|
+
# Initial indentation may be specified using a third parameter.
|
|
117
|
+
#
|
|
118
|
+
# Example:
|
|
119
|
+
#
|
|
120
|
+
# xm = Builder.new(:indent=>2)
|
|
121
|
+
# # xm will produce nicely formatted and indented XML.
|
|
122
|
+
#
|
|
123
|
+
# xm = Builder.new(:indent=>2, :margin=>4)
|
|
124
|
+
# # xm will produce nicely formatted and indented XML with 2
|
|
125
|
+
# # spaces per indent and an over all indentation level of 4.
|
|
126
|
+
#
|
|
127
|
+
# builder = Builder::XmlMarkup.new(:target=>$stdout, :indent=>2)
|
|
128
|
+
# builder.name { |b| b.first("Jim"); b.last("Weirich) }
|
|
129
|
+
# # prints:
|
|
130
|
+
# # <name>
|
|
131
|
+
# # <first>Jim</first>
|
|
132
|
+
# # <last>Weirich</last>
|
|
133
|
+
# # </name>
|
|
134
|
+
#
|
|
135
|
+
# * The instance_eval implementation which forces self to refer to
|
|
136
|
+
# the message receiver as self is now obsolete. We now use normal
|
|
137
|
+
# block calls to execute the markup block. This means that all
|
|
138
|
+
# markup methods must now be explicitly send to the xml builder.
|
|
139
|
+
# For instance, instead of
|
|
140
|
+
#
|
|
141
|
+
# xml.div { strong("text") }
|
|
142
|
+
#
|
|
143
|
+
# you need to write:
|
|
144
|
+
#
|
|
145
|
+
# xml.div { xml.strong("text") }
|
|
146
|
+
#
|
|
147
|
+
# Although more verbose, the subtle change in semantics within the
|
|
148
|
+
# block was found to be prone to error. To make this change a
|
|
149
|
+
# little less cumbersome, the markup block now gets the markup
|
|
150
|
+
# object sent as an argument, allowing you to use a shorter alias
|
|
151
|
+
# within the block.
|
|
152
|
+
#
|
|
153
|
+
# For example:
|
|
154
|
+
#
|
|
155
|
+
# xml_builder = Builder::XmlMarkup.new
|
|
156
|
+
# xml_builder.div { |xml|
|
|
157
|
+
# xml.stong("text")
|
|
158
|
+
# }
|
|
159
|
+
#
|
|
160
|
+
class XmlMarkup < XmlBase
|
|
161
|
+
|
|
162
|
+
# Create an XML markup builder. Parameters are specified by an
|
|
163
|
+
# option hash.
|
|
164
|
+
#
|
|
165
|
+
# :target=><em>target_object</em>::
|
|
166
|
+
# Object receiving the markup. +out+ must respond to the
|
|
167
|
+
# <tt><<</tt> operator. The default is a plain string target.
|
|
168
|
+
#
|
|
169
|
+
# :indent=><em>indentation</em>::
|
|
170
|
+
# Number of spaces used for indentation. The default is no
|
|
171
|
+
# indentation and no line breaks.
|
|
172
|
+
#
|
|
173
|
+
# :margin=><em>initial_indentation_level</em>::
|
|
174
|
+
# Amount of initial indentation (specified in levels, not
|
|
175
|
+
# spaces).
|
|
176
|
+
#
|
|
177
|
+
# :escape_attrs=><b>OBSOLETE</em>::
|
|
178
|
+
# The :escape_attrs option is no longer supported by builder
|
|
179
|
+
# (and will be quietly ignored). String attribute values are
|
|
180
|
+
# now automatically escaped. If you need unescaped attribute
|
|
181
|
+
# values (perhaps you are using entities in the attribute
|
|
182
|
+
# values), then give the value as a Symbol. This allows much
|
|
183
|
+
# finer control over escaping attribute values.
|
|
184
|
+
#
|
|
185
|
+
def initialize(options={})
|
|
186
|
+
indent = options[:indent] || 0
|
|
187
|
+
margin = options[:margin] || 0
|
|
188
|
+
super(indent, margin)
|
|
189
|
+
@target = options[:target] || ""
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Return the target of the builder.
|
|
193
|
+
def target!
|
|
194
|
+
@target
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
def comment!(comment_text)
|
|
198
|
+
_ensure_no_block block_given?
|
|
199
|
+
_special("<!-- ", " -->", comment_text, nil)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Insert an XML declaration into the XML markup.
|
|
203
|
+
#
|
|
204
|
+
# For example:
|
|
205
|
+
#
|
|
206
|
+
# xml.declare! :ELEMENT, :blah, "yada"
|
|
207
|
+
# # => <!ELEMENT blah "yada">
|
|
208
|
+
def declare!(inst, *args, &block)
|
|
209
|
+
_indent
|
|
210
|
+
@target << "<!#{inst}"
|
|
211
|
+
args.each do |arg|
|
|
212
|
+
case arg
|
|
213
|
+
when String
|
|
214
|
+
@target << %{ "#{arg}"} # " WART
|
|
215
|
+
when Symbol
|
|
216
|
+
@target << " #{arg}"
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
if block_given?
|
|
220
|
+
@target << " ["
|
|
221
|
+
_newline
|
|
222
|
+
_nested_structures(block)
|
|
223
|
+
@target << "]"
|
|
224
|
+
end
|
|
225
|
+
@target << ">"
|
|
226
|
+
_newline
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Insert a processing instruction into the XML markup. E.g.
|
|
230
|
+
#
|
|
231
|
+
# For example:
|
|
232
|
+
#
|
|
233
|
+
# xml.instruct!
|
|
234
|
+
# #=> <?xml version="1.0" encoding="UTF-8"?>
|
|
235
|
+
# xml.instruct! :aaa, :bbb=>"ccc"
|
|
236
|
+
# #=> <?aaa bbb="ccc"?>
|
|
237
|
+
#
|
|
238
|
+
def instruct!(directive_tag=:xml, attrs={})
|
|
239
|
+
_ensure_no_block block_given?
|
|
240
|
+
if directive_tag == :xml
|
|
241
|
+
a = { :version=>"1.0", :encoding=>"UTF-8" }
|
|
242
|
+
attrs = a.merge attrs
|
|
243
|
+
end
|
|
244
|
+
_special(
|
|
245
|
+
"<?#{directive_tag}",
|
|
246
|
+
"?>",
|
|
247
|
+
nil,
|
|
248
|
+
attrs,
|
|
249
|
+
[:version, :encoding, :standalone])
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Insert a CDATA section into the XML markup.
|
|
253
|
+
#
|
|
254
|
+
# For example:
|
|
255
|
+
#
|
|
256
|
+
# xml.cdata!("text to be included in cdata")
|
|
257
|
+
# #=> <![CDATA[text to be included in cdata]]>
|
|
258
|
+
#
|
|
259
|
+
def cdata!(text)
|
|
260
|
+
_ensure_no_block block_given?
|
|
261
|
+
_special("<![CDATA[", "]]>", text, nil)
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
private
|
|
265
|
+
|
|
266
|
+
# NOTE: All private methods of a builder object are prefixed when
|
|
267
|
+
# a "_" character to avoid possible conflict with XML tag names.
|
|
268
|
+
|
|
269
|
+
# Insert text directly in to the builder's target.
|
|
270
|
+
def _text(text)
|
|
271
|
+
@target << text
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Insert special instruction.
|
|
275
|
+
def _special(open, close, data=nil, attrs=nil, order=[])
|
|
276
|
+
_indent
|
|
277
|
+
@target << open
|
|
278
|
+
@target << data if data
|
|
279
|
+
_insert_attributes(attrs, order) if attrs
|
|
280
|
+
@target << close
|
|
281
|
+
_newline
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Start an XML tag. If <tt>end_too</tt> is true, then the start
|
|
285
|
+
# tag is also the end tag (e.g. <br/>
|
|
286
|
+
def _start_tag(sym, attrs, end_too=false)
|
|
287
|
+
@target << "<#{sym}"
|
|
288
|
+
_insert_attributes(attrs)
|
|
289
|
+
@target << "/" if end_too
|
|
290
|
+
@target << ">"
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Insert an ending tag.
|
|
294
|
+
def _end_tag(sym)
|
|
295
|
+
@target << "</#{sym}>"
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Insert the attributes (given in the hash).
|
|
299
|
+
def _insert_attributes(attrs, order=[])
|
|
300
|
+
return if attrs.nil?
|
|
301
|
+
order.each do |k|
|
|
302
|
+
v = attrs[k]
|
|
303
|
+
@target << %{ #{k}="#{_attr_value(v)}"} if v # " WART
|
|
304
|
+
end
|
|
305
|
+
attrs.each do |k, v|
|
|
306
|
+
@target << %{ #{k}="#{_attr_value(v)}"} unless order.member?(k) # " WART
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
def _attr_value(value)
|
|
311
|
+
case value
|
|
312
|
+
when Symbol
|
|
313
|
+
value.to_s
|
|
314
|
+
else
|
|
315
|
+
_escape_quote(value.to_s)
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
def _ensure_no_block(got_block)
|
|
320
|
+
if got_block
|
|
321
|
+
fail IllegalBlockError,
|
|
322
|
+
"Blocks are not allowed on XML instructions"
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
#--
|
|
4
|
+
# Copyright 2004 by Jim Weirich (jim@weirichhouse.org).
|
|
5
|
+
# All rights reserved.
|
|
6
|
+
|
|
7
|
+
# Permission is granted for use, copying, modification, distribution,
|
|
8
|
+
# and distribution of modified versions of this work as long as the
|
|
9
|
+
# above copyright notice is included.
|
|
10
|
+
#++
|
|
11
|
+
|
|
12
|
+
require 'builder/xmlmarkup'
|
|
13
|
+
require 'builder/xmlevents'
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# This extension stores translation stub records for missing translations to
|
|
2
|
+
# the database.
|
|
3
|
+
#
|
|
4
|
+
# This is useful if you have a web based translation tool. It will populate
|
|
5
|
+
# the database with untranslated keys as the application is being used. A
|
|
6
|
+
# translator can then go through these and add missing translations.
|
|
7
|
+
#
|
|
8
|
+
# Example usage:
|
|
9
|
+
#
|
|
10
|
+
# I18n::Backend::Chain.send(:include, I18n::Backend::ActiveRecord::Missing)
|
|
11
|
+
# I18n.backend = I18nChainBackend.new(I18n::Backend::ActiveRecord.new, I18n::Backend::Simple.new)
|
|
12
|
+
#
|
|
13
|
+
# Stub records for pluralizations will also be created for each key defined
|
|
14
|
+
# in i18n.plural.keys.
|
|
15
|
+
#
|
|
16
|
+
# For example:
|
|
17
|
+
#
|
|
18
|
+
# # en.yml
|
|
19
|
+
# en:
|
|
20
|
+
# i18n:
|
|
21
|
+
# plural:
|
|
22
|
+
# keys: [:zero, :one, :other]
|
|
23
|
+
#
|
|
24
|
+
# # pl.yml
|
|
25
|
+
# pl:
|
|
26
|
+
# i18n:
|
|
27
|
+
# plural:
|
|
28
|
+
# keys: [:zero, :one, :few, :other]
|
|
29
|
+
#
|
|
30
|
+
# It will also persist interpolation keys in Translation#interpolations so
|
|
31
|
+
# translators will be able to review and use them.
|
|
32
|
+
module I18n
|
|
33
|
+
module Backend
|
|
34
|
+
class ActiveRecord
|
|
35
|
+
module Missing
|
|
36
|
+
def store_default_translations(locale, key, options = {})
|
|
37
|
+
count, scope, default, separator = options.values_at(:count, *Base::RESERVED_KEYS)
|
|
38
|
+
separator ||= I18n.default_separator
|
|
39
|
+
|
|
40
|
+
keys = I18n.normalize_keys(locale, key, scope, separator)[1..-1]
|
|
41
|
+
key = keys.join(separator || I18n.default_separator)
|
|
42
|
+
|
|
43
|
+
unless ActiveRecord::Translation.locale(locale).lookup(key, separator).exists?
|
|
44
|
+
interpolations = options.reject { |name, value| Base::RESERVED_KEYS.include?(name) }.keys
|
|
45
|
+
keys = count ? I18n.t('i18n.plural.keys', :locale => locale).map { |k| [key, k].join(separator) } : [key]
|
|
46
|
+
keys.each { |key| store_default_translation(locale, key, interpolations) }
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def store_default_translation(locale, key, interpolations)
|
|
51
|
+
translation = ActiveRecord::Translation.new :locale => locale.to_s, :key => key
|
|
52
|
+
translation.interpolations = interpolations
|
|
53
|
+
translation.save
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def translate(locale, key, options = {})
|
|
57
|
+
super
|
|
58
|
+
|
|
59
|
+
rescue I18n::MissingTranslationData => e
|
|
60
|
+
self.store_default_translations(locale, key, options)
|
|
61
|
+
|
|
62
|
+
raise e
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# This module is intended to be mixed into the ActiveRecord backend to allow
|
|
2
|
+
# storing Ruby Procs as translation values in the database.
|
|
3
|
+
#
|
|
4
|
+
# I18n.backend = I18n::Backend::ActiveRecord.new
|
|
5
|
+
# I18n::Backend::ActiveRecord::Translation.send(:include, I18n::Backend::ActiveRecord::StoreProcs)
|
|
6
|
+
#
|
|
7
|
+
# The StoreProcs module requires the ParseTree and ruby2ruby gems and therefor
|
|
8
|
+
# was extracted from the original backend.
|
|
9
|
+
#
|
|
10
|
+
# ParseTree is not compatible with Ruby 1.9.
|
|
11
|
+
|
|
12
|
+
begin
|
|
13
|
+
require 'ruby2ruby'
|
|
14
|
+
require 'parse_tree'
|
|
15
|
+
require 'parse_tree_extensions'
|
|
16
|
+
rescue LoadError => e
|
|
17
|
+
puts "can't use StoreProcs because: #{e.message}"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
module I18n
|
|
21
|
+
module Backend
|
|
22
|
+
class ActiveRecord
|
|
23
|
+
module StoreProcs
|
|
24
|
+
def value=(v)
|
|
25
|
+
case v
|
|
26
|
+
when Proc
|
|
27
|
+
write_attribute(:value, v.to_ruby)
|
|
28
|
+
write_attribute(:is_proc, true)
|
|
29
|
+
else
|
|
30
|
+
write_attribute(:value, v)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
Translation.send(:include, self) if method(:to_s).respond_to?(:to_ruby)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
require 'active_record'
|
|
2
|
+
|
|
3
|
+
module I18n
|
|
4
|
+
module Backend
|
|
5
|
+
# ActiveRecord model used to store actual translations to the database.
|
|
6
|
+
#
|
|
7
|
+
# This model expects a table like the following to be already set up in
|
|
8
|
+
# your the database:
|
|
9
|
+
#
|
|
10
|
+
# create_table :translations do |t|
|
|
11
|
+
# t.string :locale
|
|
12
|
+
# t.string :key
|
|
13
|
+
# t.text :value
|
|
14
|
+
# t.text :interpolations
|
|
15
|
+
# t.boolean :is_proc, :default => false
|
|
16
|
+
# end
|
|
17
|
+
#
|
|
18
|
+
# This model supports to named scopes :locale and :lookup. The :locale
|
|
19
|
+
# scope simply adds a condition for a given locale:
|
|
20
|
+
#
|
|
21
|
+
# I18n::Backend::ActiveRecord::Translation.locale(:en).all
|
|
22
|
+
# # => all translation records that belong to the :en locale
|
|
23
|
+
#
|
|
24
|
+
# The :lookup scope adds a condition for looking up all translations
|
|
25
|
+
# that either start with the given keys (joined by an optionally given
|
|
26
|
+
# separator or I18n.default_separator) or that exactly have this key.
|
|
27
|
+
#
|
|
28
|
+
# # with translations present for :"foo.bar" and :"foo.baz"
|
|
29
|
+
# I18n::Backend::ActiveRecord::Translation.lookup(:foo)
|
|
30
|
+
# # => an array with both translation records :"foo.bar" and :"foo.baz"
|
|
31
|
+
#
|
|
32
|
+
# I18n::Backend::ActiveRecord::Translation.lookup([:foo, :bar])
|
|
33
|
+
# I18n::Backend::ActiveRecord::Translation.lookup(:"foo.bar")
|
|
34
|
+
# # => an array with the translation record :"foo.bar"
|
|
35
|
+
#
|
|
36
|
+
# When the StoreProcs module was mixed into this model then Procs will
|
|
37
|
+
# be stored to the database as Ruby code and evaluated when :value is
|
|
38
|
+
# called.
|
|
39
|
+
#
|
|
40
|
+
# Translation = I18n::Backend::ActiveRecord::Translation
|
|
41
|
+
# Translation.create \
|
|
42
|
+
# :locale => 'en'
|
|
43
|
+
# :key => 'foo'
|
|
44
|
+
# :value => lambda { |key, options| 'FOO' }
|
|
45
|
+
# Translation.find_by_locale_and_key('en', 'foo').value
|
|
46
|
+
# # => 'FOO'
|
|
47
|
+
class ActiveRecord
|
|
48
|
+
class Translation < ::ActiveRecord::Base
|
|
49
|
+
set_table_name 'translations'
|
|
50
|
+
attr_protected :is_proc, :interpolations
|
|
51
|
+
|
|
52
|
+
serialize :value
|
|
53
|
+
serialize :interpolations, Array
|
|
54
|
+
|
|
55
|
+
scope_method = ::ActiveRecord::VERSION::MAJOR == 2 ? :named_scope : :scope
|
|
56
|
+
|
|
57
|
+
send scope_method, :locale, lambda { |locale|
|
|
58
|
+
{ :conditions => { :locale => locale.to_s } }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
send scope_method, :lookup, lambda { |keys, *separator|
|
|
62
|
+
column_name = connection.quote_column_name('key')
|
|
63
|
+
keys = Array(keys).map! { |key| key.to_s }
|
|
64
|
+
separator = separator.first || I18n.default_separator
|
|
65
|
+
namespace = "#{keys.last}#{separator}%"
|
|
66
|
+
{ :conditions => ["#{column_name} IN (?) OR #{column_name} LIKE ?", keys, namespace] }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
def self.available_locales
|
|
70
|
+
Translation.find(:all, :select => 'DISTINCT locale').map { |t| t.locale.to_sym }
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def interpolates?(key)
|
|
74
|
+
self.interpolations.include?(key) if self.interpolations
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def value
|
|
78
|
+
if is_proc
|
|
79
|
+
Kernel.eval(read_attribute(:value))
|
|
80
|
+
else
|
|
81
|
+
value = read_attribute(:value)
|
|
82
|
+
value == 'f' ? false : value
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
data/vendor/activesupport-2.3.8/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record.rb
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
require 'i18n/backend/base'
|
|
2
|
+
require 'i18n/backend/active_record/translation'
|
|
3
|
+
|
|
4
|
+
module I18n
|
|
5
|
+
module Backend
|
|
6
|
+
class ActiveRecord
|
|
7
|
+
autoload :Missing, 'i18n/backend/active_record/missing'
|
|
8
|
+
autoload :StoreProcs, 'i18n/backend/active_record/store_procs'
|
|
9
|
+
autoload :Translation, 'i18n/backend/active_record/translation'
|
|
10
|
+
|
|
11
|
+
include Base, Links
|
|
12
|
+
|
|
13
|
+
def reload!
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def store_translations(locale, data, options = {})
|
|
17
|
+
separator = options[:separator] || I18n.default_separator
|
|
18
|
+
wind_keys(data, separator).each do |key, value|
|
|
19
|
+
store_link(locale, key, value) if value.is_a?(Symbol)
|
|
20
|
+
Translation.locale(locale).lookup(expand_keys(key, separator), separator).delete_all
|
|
21
|
+
Translation.create(:locale => locale.to_s, :key => key.to_s, :value => value)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def available_locales
|
|
26
|
+
begin
|
|
27
|
+
Translation.available_locales
|
|
28
|
+
rescue ::ActiveRecord::StatementInvalid
|
|
29
|
+
[]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
protected
|
|
34
|
+
|
|
35
|
+
def lookup(locale, key, scope = [], options = {})
|
|
36
|
+
return unless key
|
|
37
|
+
|
|
38
|
+
separator = options[:separator] || I18n.default_separator
|
|
39
|
+
|
|
40
|
+
key = resolve_link(locale, key)
|
|
41
|
+
key = (Array(scope) + Array(key)).join(separator)
|
|
42
|
+
result = Translation.locale(locale).lookup(key, separator).all
|
|
43
|
+
|
|
44
|
+
if result.empty?
|
|
45
|
+
return nil
|
|
46
|
+
elsif result.first.key == key
|
|
47
|
+
return result.first.value
|
|
48
|
+
else
|
|
49
|
+
chop_range = (key.size + separator.size)..-1
|
|
50
|
+
result = result.inject({}) do |hash, r|
|
|
51
|
+
hash[r.key.slice(chop_range)] = r.value
|
|
52
|
+
hash
|
|
53
|
+
end
|
|
54
|
+
deep_symbolize_keys(unwind_keys(result, separator))
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# For a key :'foo.bar.baz' return ['foo', 'foo.bar', 'foo.bar.baz']
|
|
59
|
+
def expand_keys(key, separator = I18n.default_separator)
|
|
60
|
+
key.to_s.split(separator).inject([]) do |keys, key|
|
|
61
|
+
keys << [keys.last, key].compact.join(separator)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|