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 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Hash do
|
|
4
|
+
|
|
5
|
+
describe "to_xml" do
|
|
6
|
+
|
|
7
|
+
it "should convert the nested resources into 'link' tags if the :convert_links option is present" do
|
|
8
|
+
xml = Nokogiri.parse({"name" => "Almodovar", "tasks" => [{"name" => "Wadus"}]}.to_xml(:root => "project", :convert_links => true))
|
|
9
|
+
|
|
10
|
+
# <project>
|
|
11
|
+
# <name>Almodovar</name>
|
|
12
|
+
# <link rel="tasks">
|
|
13
|
+
# <tasks type="array">
|
|
14
|
+
# <task>
|
|
15
|
+
# <name>Wadus</name>
|
|
16
|
+
# </task>
|
|
17
|
+
# </tasks>
|
|
18
|
+
# </link>
|
|
19
|
+
# </project>
|
|
20
|
+
xml.at_xpath("/project/name").text.should == "Almodovar"
|
|
21
|
+
xml.at_xpath("/project/tasks").should be_nil
|
|
22
|
+
xml.at_xpath("/project/link[@rel='tasks']/tasks[@type='array']/task/name").text.should == "Wadus"
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it "should not convert the nested resources into 'link' tags if the :convert_links option is not present" do
|
|
26
|
+
xml = Nokogiri.parse({"name" => "Almodovar", "tasks" => [{"name" => "Wadus"}]}.to_xml(:root => "project", :convert_links => false))
|
|
27
|
+
|
|
28
|
+
# <project>
|
|
29
|
+
# <name>Almodovar</name>
|
|
30
|
+
# <tasks type="array">
|
|
31
|
+
# <task>
|
|
32
|
+
# <name>Wadus</name>
|
|
33
|
+
# </task>
|
|
34
|
+
# </tasks>
|
|
35
|
+
# </project>
|
|
36
|
+
xml.at_xpath("/project/name").text.should == "Almodovar"
|
|
37
|
+
xml.at_xpath("//link").should be_nil
|
|
38
|
+
xml.at_xpath("/project/tasks[@type='array']/task/name").text.should == "Wadus"
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe Array do
|
|
47
|
+
|
|
48
|
+
describe "to_xml" do
|
|
49
|
+
|
|
50
|
+
it "should convert an array into xml" do
|
|
51
|
+
[].to_xml.should == "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<nil-classes type=\"array\"/>\n"
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
NAME
|
|
2
|
+
fattr.rb
|
|
3
|
+
|
|
4
|
+
INSTALL
|
|
5
|
+
gem install fattrs
|
|
6
|
+
|
|
7
|
+
URIS
|
|
8
|
+
http://github.com/ahoward/fattr
|
|
9
|
+
http://rubyforge.org/projects/codeforpeople/
|
|
10
|
+
http://codeforpeople.com/
|
|
11
|
+
|
|
12
|
+
SYNOPSIS
|
|
13
|
+
fattr.rb is a "fatter attr" for ruby
|
|
14
|
+
|
|
15
|
+
the implementation of fattr.rb borrows many of the best ideas from the
|
|
16
|
+
metakoans.rb ruby quiz
|
|
17
|
+
|
|
18
|
+
http://www.rubyquiz.com/quiz67.html
|
|
19
|
+
|
|
20
|
+
in particular the solutions of Christian Neukirchen and Florian Gross along
|
|
21
|
+
with concepts from my original traits.rb lib
|
|
22
|
+
|
|
23
|
+
key features provided by fattrs are
|
|
24
|
+
|
|
25
|
+
- ability to specify default values for attrs and definition time. values
|
|
26
|
+
can be literal objects or blocks, which are evaluated in the context of
|
|
27
|
+
self to initialize the variable
|
|
28
|
+
|
|
29
|
+
- classes remember which fattrs they've defined and this information is
|
|
30
|
+
available to client code
|
|
31
|
+
|
|
32
|
+
- a whole suite of methods is defined by calls to #fattrs including
|
|
33
|
+
getter, setter, query (var?) and banger (var! - which forces
|
|
34
|
+
re-initialization from the default value/block)
|
|
35
|
+
|
|
36
|
+
- ability to define multiple fattrs at once using key => value pairs
|
|
37
|
+
|
|
38
|
+
- fast lookup of whether or not a class has defined a certain fattr
|
|
39
|
+
|
|
40
|
+
- fattrs can be defined on objects on a per singleton basis
|
|
41
|
+
|
|
42
|
+
- getters acts as setters if an argument is given to them
|
|
43
|
+
|
|
44
|
+
- block caching, calling an fattr with a block sets the instance
|
|
45
|
+
variable to that block
|
|
46
|
+
|
|
47
|
+
- shortcuts for adding class/module level fattrs
|
|
48
|
+
|
|
49
|
+
- class inheritable attributes
|
|
50
|
+
|
|
51
|
+
all this in 156 lines of code
|
|
52
|
+
|
|
53
|
+
SAMPLES
|
|
54
|
+
|
|
55
|
+
<========< samples/a.rb >========>
|
|
56
|
+
|
|
57
|
+
~ > cat samples/a.rb
|
|
58
|
+
|
|
59
|
+
#
|
|
60
|
+
# basic usage is like attr, but note that fattr defines a suite of methods
|
|
61
|
+
#
|
|
62
|
+
require 'fattr'
|
|
63
|
+
|
|
64
|
+
class C
|
|
65
|
+
fattr 'a'
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
c = C.new
|
|
69
|
+
|
|
70
|
+
c.a = 42
|
|
71
|
+
p c.a #=> 42
|
|
72
|
+
p 'forty-two' if c.a? #=> 'forty-two'
|
|
73
|
+
|
|
74
|
+
#
|
|
75
|
+
# fattrs works on object too
|
|
76
|
+
#
|
|
77
|
+
o = Object.new
|
|
78
|
+
o.fattr 'answer' => 42
|
|
79
|
+
p o.answer #=> 42
|
|
80
|
+
|
|
81
|
+
~ > ruby samples/a.rb
|
|
82
|
+
|
|
83
|
+
42
|
|
84
|
+
"forty-two"
|
|
85
|
+
42
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<========< samples/b.rb >========>
|
|
89
|
+
|
|
90
|
+
~ > cat samples/b.rb
|
|
91
|
+
|
|
92
|
+
#
|
|
93
|
+
# default values may be given either directly or as a block which will be
|
|
94
|
+
# evaluated in the context of self. in both cases (value or block) the
|
|
95
|
+
# default is set only once and only if needed - it's a lazy evaluation. the
|
|
96
|
+
# 'banger' method can be used to re-initialize a variable at any point whether
|
|
97
|
+
# or not it's already been initialized.
|
|
98
|
+
#
|
|
99
|
+
require 'fattr'
|
|
100
|
+
|
|
101
|
+
class C
|
|
102
|
+
fattr :a => 42
|
|
103
|
+
fattr(:b){ Float a }
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
c = C.new
|
|
107
|
+
p c.a #=> 42
|
|
108
|
+
p c.b #=> 42.0
|
|
109
|
+
|
|
110
|
+
c.a = 43
|
|
111
|
+
p c.a #=> 43
|
|
112
|
+
c.a!
|
|
113
|
+
p c.a #=> 42
|
|
114
|
+
|
|
115
|
+
~ > ruby samples/b.rb
|
|
116
|
+
|
|
117
|
+
42
|
|
118
|
+
42.0
|
|
119
|
+
43
|
|
120
|
+
42
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<========< samples/c.rb >========>
|
|
124
|
+
|
|
125
|
+
~ > cat samples/c.rb
|
|
126
|
+
|
|
127
|
+
#
|
|
128
|
+
# multiple name=>default pairs can be given
|
|
129
|
+
#
|
|
130
|
+
require 'fattr'
|
|
131
|
+
|
|
132
|
+
class C
|
|
133
|
+
fattrs 'x' => 0b101000, 'y' => 0b10
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
c = C.new
|
|
137
|
+
z = c.x + c.y
|
|
138
|
+
p z #=> 42
|
|
139
|
+
|
|
140
|
+
~ > ruby samples/c.rb
|
|
141
|
+
|
|
142
|
+
42
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
<========< samples/d.rb >========>
|
|
146
|
+
|
|
147
|
+
~ > cat samples/d.rb
|
|
148
|
+
|
|
149
|
+
#
|
|
150
|
+
# a nice feature is that all fattrs are enumerated in the class. this,
|
|
151
|
+
# combined with the fact that the getter method is defined so as to delegate
|
|
152
|
+
# to the setter when an argument is given, means bulk initialization and/or
|
|
153
|
+
# fattr traversal is very easy.
|
|
154
|
+
#
|
|
155
|
+
require 'fattr'
|
|
156
|
+
|
|
157
|
+
class C
|
|
158
|
+
fattrs %w( x y z )
|
|
159
|
+
|
|
160
|
+
def fattrs
|
|
161
|
+
self.class.fattrs
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
def initialize
|
|
165
|
+
fattrs.each_with_index{|a,i| send a, i}
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def to_hash
|
|
169
|
+
fattrs.inject({}){|h,a| h.update a => send(a)}
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def inspect
|
|
173
|
+
to_hash.inspect
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
c = C.new
|
|
178
|
+
p c.fattrs
|
|
179
|
+
p c
|
|
180
|
+
|
|
181
|
+
c.x 'forty-two'
|
|
182
|
+
p c.x
|
|
183
|
+
|
|
184
|
+
~ > ruby samples/d.rb
|
|
185
|
+
|
|
186
|
+
["x", "y", "z"]
|
|
187
|
+
{"x"=>0, "y"=>1, "z"=>2}
|
|
188
|
+
"forty-two"
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
<========< samples/e.rb >========>
|
|
192
|
+
|
|
193
|
+
~ > cat samples/e.rb
|
|
194
|
+
|
|
195
|
+
#
|
|
196
|
+
# my favourite element of fattrs is that getters can also be setters.
|
|
197
|
+
# this allows incredibly clean looking code like
|
|
198
|
+
#
|
|
199
|
+
require 'fattr'
|
|
200
|
+
|
|
201
|
+
class Config
|
|
202
|
+
fattrs %w( host port)
|
|
203
|
+
def initialize(&block) instance_eval &block end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
conf = Config.new{
|
|
207
|
+
host 'codeforpeople.org'
|
|
208
|
+
port 80
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
p conf
|
|
212
|
+
|
|
213
|
+
~ > ruby samples/e.rb
|
|
214
|
+
|
|
215
|
+
#<Config:0x2cd1c @port=80, @host="codeforpeople.org">
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
<========< samples/f.rb >========>
|
|
219
|
+
|
|
220
|
+
~ > cat samples/f.rb
|
|
221
|
+
|
|
222
|
+
#
|
|
223
|
+
# of course fattrs works as well at class/module level as at instance
|
|
224
|
+
# level
|
|
225
|
+
#
|
|
226
|
+
require 'fattr'
|
|
227
|
+
|
|
228
|
+
module Logging
|
|
229
|
+
Level_names = {
|
|
230
|
+
0 => 'INFO',
|
|
231
|
+
# ...
|
|
232
|
+
42 => 'DEBUG',
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
class << Logging
|
|
236
|
+
fattr 'level' => 42
|
|
237
|
+
fattr('level_name'){ Level_names[level] }
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
p Logging.level
|
|
242
|
+
p Logging.level_name
|
|
243
|
+
|
|
244
|
+
~ > ruby samples/f.rb
|
|
245
|
+
|
|
246
|
+
42
|
|
247
|
+
"DEBUG"
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
<========< samples/g.rb >========>
|
|
251
|
+
|
|
252
|
+
~ > cat samples/g.rb
|
|
253
|
+
|
|
254
|
+
#
|
|
255
|
+
# you can add class/module fattrs the 'normal' way or using the provided
|
|
256
|
+
# shortcut method
|
|
257
|
+
#
|
|
258
|
+
require 'fattr'
|
|
259
|
+
|
|
260
|
+
class C
|
|
261
|
+
class << C
|
|
262
|
+
fattr 'a' => 4
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
Fattr 'b' => 2
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
p [ C.a, C.b ].join
|
|
269
|
+
|
|
270
|
+
~ > ruby samples/g.rb
|
|
271
|
+
|
|
272
|
+
"42"
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
<========< samples/h.rb >========>
|
|
276
|
+
|
|
277
|
+
~ > cat samples/h.rb
|
|
278
|
+
|
|
279
|
+
#
|
|
280
|
+
# class variable inheritance is supported simply
|
|
281
|
+
#
|
|
282
|
+
require 'fattr'
|
|
283
|
+
|
|
284
|
+
class A
|
|
285
|
+
Fattr :x, :default => 42, :inheritable => true
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
class B < A
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
class C < B
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
p C.x #=> 42
|
|
295
|
+
|
|
296
|
+
A.x = 42.0
|
|
297
|
+
B.x = 'forty-two'
|
|
298
|
+
|
|
299
|
+
p A.x #=> 42.0
|
|
300
|
+
p B.x #=> 'forty-two'
|
|
301
|
+
p C.x #=> 42
|
|
302
|
+
|
|
303
|
+
C.x! # re-initialize from closest ancestor (B)
|
|
304
|
+
|
|
305
|
+
p A.x #=> 42.0
|
|
306
|
+
p B.x #=> 'forty-two'
|
|
307
|
+
p C.x #=> 'forty-two'
|
|
308
|
+
|
|
309
|
+
~ > ruby samples/h.rb
|
|
310
|
+
|
|
311
|
+
42
|
|
312
|
+
42.0
|
|
313
|
+
"forty-two"
|
|
314
|
+
42
|
|
315
|
+
42.0
|
|
316
|
+
"forty-two"
|
|
317
|
+
"forty-two"
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
HISTORY
|
|
322
|
+
2.0.0:
|
|
323
|
+
support class/module inheritable attributes
|
|
324
|
+
|
|
325
|
+
1.1.0:
|
|
326
|
+
ruby19 testing. move to github.
|
|
327
|
+
|
|
328
|
+
1.0.2:
|
|
329
|
+
added Fattr shortcut for adding class/module level fattrs
|
|
330
|
+
|
|
331
|
+
class C
|
|
332
|
+
Fattr 'children' => []
|
|
333
|
+
|
|
334
|
+
def C.inherited other
|
|
335
|
+
(children << other).uniq!
|
|
336
|
+
super
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
class B < C
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
p C.children #=> B
|
|
344
|
+
|
|
345
|
+
1.0.0:
|
|
346
|
+
port from attributes.rb retaining all the same features of that version of
|
|
347
|
+
attributes.rb
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
NAME
|
|
2
|
+
fattr.rb
|
|
3
|
+
|
|
4
|
+
INSTALL
|
|
5
|
+
gem install fattrs
|
|
6
|
+
|
|
7
|
+
URIS
|
|
8
|
+
http://github.com/ahoward/fattr
|
|
9
|
+
http://rubyforge.org/projects/codeforpeople/
|
|
10
|
+
http://codeforpeople.com/
|
|
11
|
+
|
|
12
|
+
SYNOPSIS
|
|
13
|
+
fattr.rb is a "fatter attr" for ruby
|
|
14
|
+
|
|
15
|
+
the implementation of fattr.rb borrows many of the best ideas from the
|
|
16
|
+
metakoans.rb ruby quiz
|
|
17
|
+
|
|
18
|
+
http://www.rubyquiz.com/quiz67.html
|
|
19
|
+
|
|
20
|
+
in particular the solutions of Christian Neukirchen and Florian Gross along
|
|
21
|
+
with concepts from my original traits.rb lib
|
|
22
|
+
|
|
23
|
+
key features provided by fattrs are
|
|
24
|
+
|
|
25
|
+
- ability to specify default values for attrs and definition time. values
|
|
26
|
+
can be literal objects or blocks, which are evaluated in the context of
|
|
27
|
+
self to initialize the variable
|
|
28
|
+
|
|
29
|
+
- classes remember which fattrs they've defined and this information is
|
|
30
|
+
available to client code
|
|
31
|
+
|
|
32
|
+
- a whole suite of methods is defined by calls to #fattrs including
|
|
33
|
+
getter, setter, query (var?) and banger (var! - which forces
|
|
34
|
+
re-initialization from the default value/block)
|
|
35
|
+
|
|
36
|
+
- ability to define multiple fattrs at once using key => value pairs
|
|
37
|
+
|
|
38
|
+
- fast lookup of whether or not a class has defined a certain fattr
|
|
39
|
+
|
|
40
|
+
- fattrs can be defined on objects on a per singleton basis
|
|
41
|
+
|
|
42
|
+
- getters acts as setters if an argument is given to them
|
|
43
|
+
|
|
44
|
+
- block caching, calling an fattr with a block sets the instance
|
|
45
|
+
variable to that block
|
|
46
|
+
|
|
47
|
+
- shortcuts for adding class/module level fattrs
|
|
48
|
+
|
|
49
|
+
- class inheritable attributes
|
|
50
|
+
|
|
51
|
+
all this in 156 lines of code
|
|
52
|
+
|
|
53
|
+
SAMPLES
|
|
54
|
+
<%= samples %>
|
|
55
|
+
|
|
56
|
+
HISTORY
|
|
57
|
+
2.0.0:
|
|
58
|
+
support class/module inheritable attributes
|
|
59
|
+
|
|
60
|
+
1.1.0:
|
|
61
|
+
ruby19 testing. move to github.
|
|
62
|
+
|
|
63
|
+
1.0.2:
|
|
64
|
+
added Fattr shortcut for adding class/module level fattrs
|
|
65
|
+
|
|
66
|
+
class C
|
|
67
|
+
Fattr 'children' => []
|
|
68
|
+
|
|
69
|
+
def C.inherited other
|
|
70
|
+
(children << other).uniq!
|
|
71
|
+
super
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
class B < C
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
p C.children #=> B
|
|
79
|
+
|
|
80
|
+
1.0.0:
|
|
81
|
+
port from attributes.rb retaining all the same features of that version of
|
|
82
|
+
attributes.rb
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
This.author = "Ara T. Howard"
|
|
2
|
+
This.email = "ara.t.howard@gmail.com"
|
|
3
|
+
This.homepage = "http://github.com/ahoward/#{ This.lib }/tree/master"
|
|
4
|
+
This.rubyforge_project = 'codeforpeople'
|
|
5
|
+
|
|
6
|
+
task :default do
|
|
7
|
+
puts(Rake::Task.tasks.map{|task| task.name} - ['default'])
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
task :spec do
|
|
11
|
+
require 'spec/rake/spectask'
|
|
12
|
+
Spec::Rake::SpecTask.new do |t|
|
|
13
|
+
t.spec_files = FileList['spec/*_spec.rb']
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
task :gemspec do
|
|
18
|
+
ignore_extensions = 'git', 'svn', 'tmp', /sw./, 'bak', 'gem'
|
|
19
|
+
ignore_directories = 'pkg'
|
|
20
|
+
ignore_files = 'test/log'
|
|
21
|
+
|
|
22
|
+
shiteless =
|
|
23
|
+
lambda do |list|
|
|
24
|
+
list.delete_if do |entry|
|
|
25
|
+
next unless test(?e, entry)
|
|
26
|
+
extension = File.basename(entry).split(%r/[.]/).last
|
|
27
|
+
ignore_extensions.any?{|ext| ext === extension}
|
|
28
|
+
end
|
|
29
|
+
list.delete_if do |entry|
|
|
30
|
+
next unless test(?d, entry)
|
|
31
|
+
dirname = File.expand_path(entry)
|
|
32
|
+
ignore_directories.any?{|dir| File.expand_path(dir) == dirname}
|
|
33
|
+
end
|
|
34
|
+
list.delete_if do |entry|
|
|
35
|
+
next unless test(?f, entry)
|
|
36
|
+
filename = File.expand_path(entry)
|
|
37
|
+
ignore_files.any?{|file| File.expand_path(file) == filename}
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
lib = This.lib
|
|
42
|
+
version = This.version
|
|
43
|
+
files = shiteless[Dir::glob("**/**")]
|
|
44
|
+
executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
|
|
45
|
+
has_rdoc = true #File.exist?('doc')
|
|
46
|
+
test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
|
|
47
|
+
|
|
48
|
+
extensions = This.extensions
|
|
49
|
+
if extensions.nil?
|
|
50
|
+
%w( Makefile configure extconf.rb ).each do |ext|
|
|
51
|
+
extensions << ext if File.exists?(ext)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
extensions = [extensions].flatten.compact
|
|
55
|
+
|
|
56
|
+
template =
|
|
57
|
+
if test(?e, 'gemspec.erb')
|
|
58
|
+
Template{ IO.read('gemspec.erb') }
|
|
59
|
+
else
|
|
60
|
+
Template {
|
|
61
|
+
<<-__
|
|
62
|
+
## #{ lib }.gemspec
|
|
63
|
+
#
|
|
64
|
+
|
|
65
|
+
Gem::Specification::new do |spec|
|
|
66
|
+
spec.name = #{ lib.inspect }
|
|
67
|
+
spec.description = 'fattr.rb is a "fatter attr" for ruby'
|
|
68
|
+
spec.version = #{ version.inspect }
|
|
69
|
+
spec.platform = Gem::Platform::RUBY
|
|
70
|
+
spec.summary = #{ lib.inspect }
|
|
71
|
+
|
|
72
|
+
spec.files = #{ files.inspect }
|
|
73
|
+
spec.executables = #{ executables.inspect }
|
|
74
|
+
|
|
75
|
+
<% if test(?d, 'lib') %>
|
|
76
|
+
spec.require_path = "lib"
|
|
77
|
+
<% end %>
|
|
78
|
+
|
|
79
|
+
spec.has_rdoc = #{ has_rdoc.inspect }
|
|
80
|
+
spec.test_files = #{ test_files.inspect }
|
|
81
|
+
#spec.add_dependency 'lib', '>= version'
|
|
82
|
+
#spec.add_dependency 'fattr'
|
|
83
|
+
|
|
84
|
+
spec.extensions.push(*#{ extensions.inspect })
|
|
85
|
+
|
|
86
|
+
spec.rubyforge_project = #{ This.rubyforge_project.inspect }
|
|
87
|
+
spec.author = #{ This.author.inspect }
|
|
88
|
+
spec.email = #{ This.email.inspect }
|
|
89
|
+
spec.homepage = #{ This.homepage.inspect }
|
|
90
|
+
end
|
|
91
|
+
__
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
open("#{ lib }.gemspec", "w"){|fd| fd.puts template}
|
|
96
|
+
This.gemspec = "#{ lib }.gemspec"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
task :gem => [:clean, :gemspec] do
|
|
100
|
+
Fu.mkdir_p This.pkgdir
|
|
101
|
+
before = Dir['*.gem']
|
|
102
|
+
cmd = "gem build #{ This.gemspec }"
|
|
103
|
+
`#{ cmd }`
|
|
104
|
+
after = Dir['*.gem']
|
|
105
|
+
gem = ((after - before).first || after.first) or abort('no gem!')
|
|
106
|
+
Fu.mv gem, This.pkgdir
|
|
107
|
+
This.gem = File.basename(gem)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
task :readme do
|
|
111
|
+
samples = ''
|
|
112
|
+
prompt = '~ > '
|
|
113
|
+
lib = This.lib
|
|
114
|
+
version = This.version
|
|
115
|
+
|
|
116
|
+
Dir['sample*/*'].sort.each do |sample|
|
|
117
|
+
samples << "\n" << " <========< #{ sample } >========>" << "\n\n"
|
|
118
|
+
|
|
119
|
+
cmd = "cat #{ sample }"
|
|
120
|
+
samples << Util.indent(prompt + cmd, 2) << "\n\n"
|
|
121
|
+
samples << Util.indent(`#{ cmd }`, 4) << "\n"
|
|
122
|
+
|
|
123
|
+
cmd = "ruby #{ sample }"
|
|
124
|
+
samples << Util.indent(prompt + cmd, 2) << "\n\n"
|
|
125
|
+
|
|
126
|
+
cmd = "ruby -e'STDOUT.sync=true; exec %(ruby -Ilib #{ sample })'"
|
|
127
|
+
samples << Util.indent(`#{ cmd } 2>&1`, 4) << "\n"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
template =
|
|
131
|
+
if test(?e, 'readme.erb')
|
|
132
|
+
Template{ IO.read('readme.erb') }
|
|
133
|
+
else
|
|
134
|
+
Template {
|
|
135
|
+
<<-__
|
|
136
|
+
NAME
|
|
137
|
+
#{ lib }
|
|
138
|
+
|
|
139
|
+
DESCRIPTION
|
|
140
|
+
|
|
141
|
+
INSTALL
|
|
142
|
+
gem install #{ lib }
|
|
143
|
+
|
|
144
|
+
SAMPLES
|
|
145
|
+
#{ samples }
|
|
146
|
+
__
|
|
147
|
+
}
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
open("README", "w"){|fd| fd.puts template}
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
task :clean do
|
|
155
|
+
Dir[File.join(This.pkgdir, '**/**')].each{|entry| Fu.rm_rf(entry)}
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
task :release => [:clean, :gemspec, :gem] do
|
|
160
|
+
gems = Dir[File.join(This.pkgdir, '*.gem')].flatten
|
|
161
|
+
raise "which one? : #{ gems.inspect }" if gems.size > 1
|
|
162
|
+
raise "no gems?" if gems.size < 1
|
|
163
|
+
cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.pkgdir }/#{ This.gem }"
|
|
164
|
+
puts cmd
|
|
165
|
+
system cmd
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
BEGIN {
|
|
173
|
+
$VERBOSE = nil
|
|
174
|
+
|
|
175
|
+
require 'ostruct'
|
|
176
|
+
require 'erb'
|
|
177
|
+
require 'fileutils'
|
|
178
|
+
|
|
179
|
+
Fu = FileUtils
|
|
180
|
+
|
|
181
|
+
This = OpenStruct.new
|
|
182
|
+
|
|
183
|
+
This.file = File.expand_path(__FILE__)
|
|
184
|
+
This.dir = File.dirname(This.file)
|
|
185
|
+
This.pkgdir = File.join(This.dir, 'pkg')
|
|
186
|
+
|
|
187
|
+
lib = ENV['LIB']
|
|
188
|
+
unless lib
|
|
189
|
+
lib = File.basename(Dir.pwd)
|
|
190
|
+
end
|
|
191
|
+
This.lib = lib
|
|
192
|
+
|
|
193
|
+
version = ENV['VERSION']
|
|
194
|
+
unless version
|
|
195
|
+
name = lib.capitalize
|
|
196
|
+
library = "./lib/#{ lib }.rb"
|
|
197
|
+
program = "./bin/#{ lib }"
|
|
198
|
+
if test(?e, library)
|
|
199
|
+
require library
|
|
200
|
+
version = eval(name).send(:version)
|
|
201
|
+
elsif test(?e, program)
|
|
202
|
+
version = `#{ program } --version`.strip
|
|
203
|
+
end
|
|
204
|
+
abort('no version') if(version.nil? or version.empty?)
|
|
205
|
+
end
|
|
206
|
+
This.version = version
|
|
207
|
+
|
|
208
|
+
abort('no lib') unless This.lib
|
|
209
|
+
abort('no version') unless This.version
|
|
210
|
+
|
|
211
|
+
module Util
|
|
212
|
+
def indent(s, n = 2)
|
|
213
|
+
s = unindent(s)
|
|
214
|
+
ws = ' ' * n
|
|
215
|
+
s.gsub(%r/^/, ws)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
def unindent(s)
|
|
219
|
+
indent = nil
|
|
220
|
+
s.each do |line|
|
|
221
|
+
next if line =~ %r/^\s*$/
|
|
222
|
+
indent = line[%r/^\s*/] and break
|
|
223
|
+
end
|
|
224
|
+
indent ? s.gsub(%r/^#{ indent }/, "") : s
|
|
225
|
+
end
|
|
226
|
+
extend self
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
class Template
|
|
230
|
+
def initialize(&block)
|
|
231
|
+
@block = block
|
|
232
|
+
@template = block.call.to_s
|
|
233
|
+
end
|
|
234
|
+
def expand(b=nil)
|
|
235
|
+
ERB.new(Util.unindent(@template)).result(b||@block)
|
|
236
|
+
end
|
|
237
|
+
alias_method 'to_s', 'expand'
|
|
238
|
+
end
|
|
239
|
+
def Template(*args, &block) Template.new(*args, &block) end
|
|
240
|
+
|
|
241
|
+
Dir.chdir(This.dir)
|
|
242
|
+
}
|