asana2flowdock 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/asana2flowdock.gemspec +3 -1819
- data/lib/asana2flowdock.rb +1 -1
- metadata +1 -1599
- data/a.rb +0 -336
- data/a.yml +0 -6
- data/bin/amalgalite-pack +0 -16
- data/bin/asana2flowdock-daemon +0 -16
- data/bin/coderay +0 -16
- data/bin/httparty +0 -16
- data/bin/pry +0 -16
- data/bin/sekrets +0 -16
- data/bin/sequel +0 -16
- data/config/asana2flowdock.yml.enc +0 -2
- data/vendor/bundle/ruby/1.9.1/bin/amalgalite-pack +0 -23
- data/vendor/bundle/ruby/1.9.1/bin/asana2flowdock +0 -23
- data/vendor/bundle/ruby/1.9.1/bin/asana2flowdock-daemon +0 -23
- data/vendor/bundle/ruby/1.9.1/bin/coderay +0 -23
- data/vendor/bundle/ruby/1.9.1/bin/httparty +0 -23
- data/vendor/bundle/ruby/1.9.1/bin/pry +0 -23
- data/vendor/bundle/ruby/1.9.1/bin/sekrets +0 -23
- data/vendor/bundle/ruby/1.9.1/bin/sequel +0 -23
- data/vendor/bundle/ruby/1.9.1/build_info/amalgalite-1.3.0.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/arrayfields-4.7.4.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/chronic-0.10.2.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/coderay-1.1.0.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/coerce-0.0.6.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/daemons-1.1.9.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/fastercsv-1.5.5.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/fattr-2.2.2.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/flowdock-0.5.0.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/highline-1.6.21.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/httparty-0.13.1.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/json-1.8.1.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/main-6.0.0.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/main-6.1.0.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/map-6.5.5.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/method_source-0.8.2.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/multi_json-1.10.1.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/multi_xml-0.5.5.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/pry-0.9.12.6.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/sekrets-1.7.0.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/sequel-4.15.0.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/slop-3.5.0.info +0 -1
- data/vendor/bundle/ruby/1.9.1/build_info/threadify-1.3.0.info +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/CONTRIBUTING.md +0 -49
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/HISTORY.md +0 -315
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/LICENSE +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/Manifest.txt +0 -104
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/README.md +0 -73
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/Rakefile +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/TODO.md +0 -50
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/bin/amalgalite-pack +0 -147
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/a.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/blob.rb +0 -88
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/bootstrap.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/define_aggregate.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/define_function.rb +0 -104
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/fts3.rb +0 -144
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/gem-db.rb +0 -94
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/require_me.rb +0 -11
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/requires.rb +0 -42
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/schema-info.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/Makefile +0 -220
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite.bundle +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite.c +0 -329
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite.h +0 -151
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_blob.c +0 -240
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_blob.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_constants.c +0 -378
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_constants.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_database.c +0 -1177
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_database.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_requires_bootstrap.c +0 -282
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_requires_bootstrap.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_statement.c +0 -649
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_statement.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/extconf.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/gen_constants.rb +0 -193
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/notes.txt +0 -134
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3.c +0 -137414
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3.h +0 -7160
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3_options.h +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3ext.h +0 -447
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite.rb +0 -51
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/1.9/amalgalite.bundle +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/aggregate.rb +0 -67
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/blob.rb +0 -186
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/boolean.rb +0 -42
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/busy_timeout.rb +0 -47
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/column.rb +0 -99
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/core_ext/kernel/require.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/csv_table_importer.rb +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/database.rb +0 -984
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/function.rb +0 -61
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/index.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/memory_database.rb +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/packer.rb +0 -231
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/paths.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/profile_tap.rb +0 -131
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/progress_handler.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/requires.rb +0 -151
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/schema.rb +0 -225
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3.rb +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/constants.rb +0 -95
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/database/function.rb +0 -48
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/database/status.rb +0 -68
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/status.rb +0 -60
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/version.rb +0 -55
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/statement.rb +0 -418
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/table.rb +0 -91
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/taps.rb +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/taps/console.rb +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/taps/io.rb +0 -71
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/trace_tap.rb +0 -35
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/type_map.rb +0 -63
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/type_maps/default_map.rb +0 -166
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/type_maps/storage_map.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/type_maps/text_map.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/version.rb +0 -8
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/view.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/aggregate_spec.rb +0 -150
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/amalgalite_spec.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/blob_spec.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/boolean_spec.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/busy_handler.rb +0 -157
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/data/iso-3166-country.txt +0 -242
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/data/iso-3166-schema.sql +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/data/iso-3166-subcountry.txt +0 -3995
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/data/make-iso-db.sh +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/database_spec.rb +0 -510
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/default_map_spec.rb +0 -92
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/function_spec.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/integeration_spec.rb +0 -97
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/iso_3166_database.rb +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/packer_spec.rb +0 -60
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/paths_spec.rb +0 -28
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/progress_handler_spec.rb +0 -91
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/requires_spec.rb +0 -54
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/rtree_spec.rb +0 -66
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/schema_spec.rb +0 -131
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/spec_helper.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3/constants_spec.rb +0 -108
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3/database_status_spec.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3/status_spec.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3/version_spec.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3_spec.rb +0 -53
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/statement_spec.rb +0 -168
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/storage_map_spec.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/tap_spec.rb +0 -57
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/text_map_spec.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/type_map_spec.rb +0 -14
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/version_spec.rb +0 -8
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/tasks/custom.rake +0 -99
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/tasks/default.rake +0 -277
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/tasks/extension.rake +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/tasks/this.rb +0 -209
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/README +0 -378
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/arrayfields.gemspec +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/gemspec.rb +0 -62
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/install.rb +0 -206
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/lib/arrayfields.rb +0 -443
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/readme.rb +0 -248
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/a.rb +0 -40
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/b.rb +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/c.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/d.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/e.rb +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/test/arrayfields.rb +0 -324
- data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/test/memtest.rb +0 -41
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/HISTORY.md +0 -243
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/LICENSE +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/README.md +0 -182
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/Rakefile +0 -66
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/chronic.gemspec +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic.rb +0 -150
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/date.rb +0 -82
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/grabber.rb +0 -33
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/handler.rb +0 -97
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/handlers.rb +0 -647
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/mini_date.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/numerizer.rb +0 -130
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/ordinal.rb +0 -49
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/parser.rb +0 -268
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/pointer.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeater.rb +0 -145
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_day.rb +0 -54
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_day_name.rb +0 -53
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_day_portion.rb +0 -109
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_fortnight.rb +0 -72
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_hour.rb +0 -59
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_minute.rb +0 -59
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_month.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_month_name.rb +0 -95
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_season.rb +0 -111
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_season_name.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_second.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_time.rb +0 -138
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_week.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_weekday.rb +0 -86
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_weekend.rb +0 -67
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_year.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/scalar.rb +0 -81
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/season.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/separator.rb +0 -207
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/sign.rb +0 -49
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/span.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/tag.rb +0 -37
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/time.rb +0 -40
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/time_zone.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/token.rb +0 -51
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/helper.rb +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_chronic.rb +0 -183
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_daylight_savings.rb +0 -118
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_handler.rb +0 -128
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_mini_date.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_numerizer.rb +0 -86
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_parsing.rb +0 -1235
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_day_name.rb +0 -51
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_day_portion.rb +0 -254
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_fortnight.rb +0 -62
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_hour.rb +0 -68
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_minute.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_month.rb +0 -50
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_month_name.rb +0 -56
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_season.rb +0 -40
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_time.rb +0 -88
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_week.rb +0 -62
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_weekday.rb +0 -55
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_weekend.rb +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_year.rb +0 -69
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_span.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_token.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/README_INDEX.rdoc +0 -123
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/Rakefile +0 -37
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/bin/coderay +0 -215
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay.rb +0 -284
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/duo.rb +0 -81
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoder.rb +0 -201
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/_map.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/comment_filter.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/count.rb +0 -39
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/debug.rb +0 -49
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/debug_lint.rb +0 -63
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/div.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/filter.rb +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/html.rb +0 -332
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/html/css.rb +0 -65
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/html/numbering.rb +0 -108
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/html/output.rb +0 -166
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/json.rb +0 -83
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/lines_of_code.rb +0 -45
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/lint.rb +0 -59
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/null.rb +0 -18
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/page.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/span.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/statistic.rb +0 -95
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/terminal.rb +0 -195
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/text.rb +0 -46
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/token_kind_filter.rb +0 -111
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/xml.rb +0 -72
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb +0 -50
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/for_redcloth.rb +0 -95
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/helpers/file_type.rb +0 -151
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/helpers/plugin.rb +0 -274
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/helpers/word_list.rb +0 -72
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanner.rb +0 -355
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/_map.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/c.rb +0 -189
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/clojure.rb +0 -217
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/cpp.rb +0 -215
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/css.rb +0 -196
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/debug.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/delphi.rb +0 -144
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/diff.rb +0 -221
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/erb.rb +0 -81
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/go.rb +0 -208
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/groovy.rb +0 -268
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/haml.rb +0 -168
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/html.rb +0 -275
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/java.rb +0 -174
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/java/builtin_types.rb +0 -421
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/java_script.rb +0 -237
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/json.rb +0 -98
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/lua.rb +0 -280
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/php.rb +0 -527
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/python.rb +0 -287
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/raydebug.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/ruby.rb +0 -470
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/ruby/patterns.rb +0 -178
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/ruby/string_state.rb +0 -71
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/sass.rb +0 -232
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/sql.rb +0 -177
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/taskpaper.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/text.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/xml.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/yaml.rb +0 -140
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/style.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/styles/_map.rb +0 -7
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/styles/alpha.rb +0 -152
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/token_kinds.rb +0 -85
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/tokens.rb +0 -161
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/tokens_proxy.rb +0 -55
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/version.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/test/functional/basic.rb +0 -318
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/test/functional/examples.rb +0 -129
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/test/functional/for_redcloth.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/test/functional/suite.rb +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/coerce-0.0.6/README +0 -28
- data/vendor/bundle/ruby/1.9.1/gems/coerce-0.0.6/Rakefile +0 -392
- data/vendor/bundle/ruby/1.9.1/gems/coerce-0.0.6/coerce.gemspec +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/coerce-0.0.6/lib/coerce.rb +0 -210
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/LICENSE +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/README +0 -214
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/Rakefile +0 -90
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/Releases +0 -195
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/TODO +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/call/call.rb +0 -57
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/call/call_monitor.rb +0 -55
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/daemonize/daemonize.rb +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_crash.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_exec.rb +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_exit.rb +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_hanging.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_keep_pid_files.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_monitor.rb +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_multiple.rb +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_normal.rb +0 -11
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_ontop.rb +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_optionparser.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_proc.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_proc_multiple.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_proc_rand.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_proc_simple.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_slowstop.rb +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver.rb +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver_crashing.rb +0 -14
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver_exiting.rb +0 -8
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver_hanging.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver_slowstop.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons.rb +0 -315
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb +0 -477
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application_group.rb +0 -194
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/change_privilege.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/cmdline.rb +0 -121
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/controller.rb +0 -140
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/daemonize.rb +0 -169
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/etc_extension.rb +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/exceptions.rb +0 -28
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/monitor.rb +0 -138
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/pid.rb +0 -108
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/pidfile.rb +0 -116
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/pidmem.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/setup.rb +0 -1360
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/AUTHORS +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/CHANGELOG +0 -182
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/COPYING +0 -340
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/INSTALL +0 -33
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/LICENSE +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/README +0 -71
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/Rakefile +0 -94
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/TODO +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_converters.rb +0 -28
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_filter.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_reading.rb +0 -57
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_table.rb +0 -56
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_writing.rb +0 -67
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/purchase.csv +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/shortcut_interface.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/lib/faster_csv.rb +0 -2025
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/lib/fastercsv.rb +0 -10
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/line_endings.gz +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_csv_parsing.rb +0 -191
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_csv_writing.rb +0 -96
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_data_converters.rb +0 -260
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_encodings.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_features.rb +0 -212
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_headers.rb +0 -277
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_interface.rb +0 -376
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_row.rb +0 -305
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_serialization.rb +0 -154
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_speed.rb +0 -65
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_table.rb +0 -408
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/test_data.csv +0 -1000
- data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/ts_all.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/LICENSE +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/README +0 -347
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/README.erb +0 -82
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/Rakefile +0 -376
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/lib/fattr.rb +0 -206
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/a.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/b.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/c.rb +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/d.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/e.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/f.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/g.rb +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/h.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/test/fattr_test.rb +0 -173
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/Gemfile +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/LICENSE +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/README.md +0 -145
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/Rakefile +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/VERSION +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/flowdock.gemspec +0 -73
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/lib/flowdock.rb +0 -181
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/lib/flowdock/capistrano.rb +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/spec/flowdock_spec.rb +0 -435
- data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/spec/spec_helper.rb +0 -14
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/AUTHORS +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/CHANGELOG +0 -357
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/COPYING +0 -340
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/INSTALL +0 -55
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/LICENSE +0 -7
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/README.rdoc +0 -67
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/Rakefile +0 -50
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/TODO +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/ansi_colors.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/asking_for_arrays.rb +0 -18
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/basic_usage.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/color_scheme.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/get_character.rb +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/limit.rb +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/menus.rb +0 -65
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/overwrite.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/page_and_wrap.rb +0 -322
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/password.rb +0 -7
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/repeat_entry.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/trapping_eof.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/using_readline.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/highline.gemspec +0 -37
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline.rb +0 -1034
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/color_scheme.rb +0 -134
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/compatibility.rb +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/import.rb +0 -41
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/menu.rb +0 -381
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/question.rb +0 -481
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/simulate.rb +0 -48
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/string_extensions.rb +0 -111
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/style.rb +0 -181
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/system_extensions.rb +0 -242
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/setup.rb +0 -1360
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/site/highline.css +0 -65
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/site/images/logo.png +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/site/index.html +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/string_methods.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_color_scheme.rb +0 -96
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_highline.rb +0 -1134
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_import.rb +0 -52
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_menu.rb +0 -439
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_string_extension.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_string_highline.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_style.rb +0 -567
- data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/ts_all.rb +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/Gemfile +0 -14
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/Guardfile +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/History +0 -303
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/MIT-LICENSE +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/README.md +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/Rakefile +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/bin/httparty +0 -117
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/cucumber.yml +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/aaws.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/basic.rb +0 -28
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/crack.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/custom_parsers.rb +0 -67
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/delicious.rb +0 -37
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/google.rb +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/headers_and_user_agents.rb +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/nokogiri_html_parser.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/rubyurl.rb +0 -14
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/stackexchange.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/tripit_sign_in.rb +0 -33
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/twitter.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/whoismyrep.rb +0 -10
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/basic_authentication.feature +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/command_line.feature +0 -7
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/deals_with_http_error_codes.feature +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/digest_authentication.feature +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/handles_compressed_responses.feature +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/handles_multiple_formats.feature +0 -57
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/env.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/httparty_response_steps.rb +0 -52
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/httparty_steps.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/mongrel_helper.rb +0 -94
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/remote_service_steps.rb +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/supports_read_timeout_option.feature +0 -13
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/supports_redirection.feature +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/supports_timeout_option.feature +0 -13
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/httparty.gemspec +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty.rb +0 -600
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/connection_adapter.rb +0 -187
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/cookie_hash.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/core_extensions.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/exceptions.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/hash_conversions.rb +0 -51
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/logger/apache_logger.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/logger/curl_logger.rb +0 -48
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/logger/logger.rb +0 -18
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/module_inheritable_attributes.rb +0 -56
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/net_digest_auth.rb +0 -84
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/parser.rb +0 -141
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/request.rb +0 -331
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/response.rb +0 -72
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/response/headers.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/version.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/script/release +0 -42
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/delicious.xml +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/empty.xml +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/google.html +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generate.sh +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/1fe462c2.0 +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/bogushost.crt +0 -13
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/ca.crt +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/ca.key +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/selfsigned.crt +0 -14
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/server.crt +0 -13
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/server.key +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/openssl-exts.cnf +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/twitter.csv +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/twitter.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/twitter.xml +0 -403
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/undefined_method_add_node_for_nil.xml +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/connection_adapter_spec.rb +0 -354
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/cookie_hash_spec.rb +0 -83
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/exception_spec.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/logger/apache_logger_spec.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb +0 -18
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/logger/logger_spec.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/net_digest_auth_spec.rb +0 -152
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/parser_spec.rb +0 -165
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/request_spec.rb +0 -638
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/response_spec.rb +0 -221
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/ssl_spec.rb +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty_spec.rb +0 -764
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/spec.opts +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/spec_helper.rb +0 -37
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/support/ssl_test_helper.rb +0 -47
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/support/ssl_test_server.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/support/stub_response.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/website/css/common.css +0 -47
- data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/website/index.html +0 -73
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/CHANGES +0 -284
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/COPYING +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/COPYING-json-jruby +0 -57
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/GPL +0 -340
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/Gemfile +0 -11
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/README-json-jruby.markdown +0 -33
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/README.rdoc +0 -358
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/Rakefile +0 -412
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/TODO +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/VERSION +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/data/example.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/data/index.html +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/data/prototype.js +0 -4184
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/fbuffer/fbuffer.h +0 -181
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/Makefile +0 -221
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/depend +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/extconf.rb +0 -14
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/generator.bundle +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/generator.c +0 -1435
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/generator.h +0 -148
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/generator.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/Makefile +0 -221
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/depend +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/extconf.rb +0 -13
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.bundle +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.c +0 -2204
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.h +0 -77
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.o +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.rl +0 -927
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/install.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/ByteListTranscoder.java +0 -167
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/Generator.java +0 -444
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/GeneratorMethods.java +0 -232
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/GeneratorService.java +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/GeneratorState.java +0 -543
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/OptionsReader.java +0 -114
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/Parser.java +0 -2644
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/Parser.rl +0 -968
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/ParserService.java +0 -35
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/RuntimeInfo.java +0 -121
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/StringDecoder.java +0 -167
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/StringEncoder.java +0 -106
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/Utils.java +0 -89
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/json-java.gemspec +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/json.gemspec +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/json_pure.gemspec +0 -40
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json.rb +0 -62
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/bigdecimal.rb +0 -28
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/complex.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/core.rb +0 -11
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/date.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/date_time.rb +0 -50
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/exception.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/ostruct.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/range.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/rational.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/regexp.rb +0 -30
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/struct.rb +0 -30
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/symbol.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/time.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/common.rb +0 -484
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/ext.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/ext/generator.bundle +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/ext/parser.bundle +0 -0
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/generic_object.rb +0 -70
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/pure.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/pure/generator.rb +0 -522
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/pure/parser.rb +0 -359
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/version.rb +0 -8
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail1.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail10.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail11.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail12.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail13.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail14.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail18.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail19.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail2.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail20.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail21.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail22.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail23.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail24.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail25.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail27.json +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail28.json +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail3.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail4.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail5.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail6.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail7.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail8.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail9.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass1.json +0 -56
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass15.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass16.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass17.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass2.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass26.json +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass3.json +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/setup_variant.rb +0 -11
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json.rb +0 -545
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_addition.rb +0 -196
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_encoding.rb +0 -65
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_fixtures.rb +0 -35
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_generate.rb +0 -322
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_generic_object.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_string_matching.rb +0 -39
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_unicode.rb +0 -72
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tools/fuzz.rb +0 -139
- data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tools/server.rb +0 -62
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/LICENSE +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/README +0 -1177
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/README.erb +0 -881
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/Rakefile +0 -394
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/TODO +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/a.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main.rb +0 -93
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/cast.rb +0 -163
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/dsl.rb +0 -77
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/factories.rb +0 -28
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/getoptlong.rb +0 -470
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/logger.rb +0 -51
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/mode.rb +0 -46
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/parameter.rb +0 -735
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/program.rb +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/program/class_methods.rb +0 -381
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/program/instance_methods.rb +0 -303
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/softspoken.rb +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/stdext.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/test.rb +0 -89
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/usage.rb +0 -212
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/util.rb +0 -109
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/main.gemspec +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/a.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/b.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/c.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/d.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/e.rb +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/f.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/g.rb +0 -10
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/h.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/j.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/test/main_test.rb +0 -954
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/LICENSE +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/README +0 -1177
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/README.erb +0 -881
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/Rakefile +0 -394
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/TODO +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/a.rb +0 -28
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main.rb +0 -94
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/cast.rb +0 -163
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/daemon.rb +0 -525
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/dsl.rb +0 -77
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/factories.rb +0 -28
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/getoptlong.rb +0 -470
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/logger.rb +0 -51
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/mode.rb +0 -46
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/parameter.rb +0 -735
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/program.rb +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/program/class_methods.rb +0 -392
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/program/instance_methods.rb +0 -308
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/softspoken.rb +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/stdext.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/test.rb +0 -89
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/usage.rb +0 -212
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/util.rb +0 -109
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/main.gemspec +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/a.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/b.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/c.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/d.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/e.rb +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/f.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/g.rb +0 -10
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/h.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/j.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/test/main_test.rb +0 -954
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/LICENSE +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/README +0 -145
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/Rakefile +0 -394
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/a.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map.rb +0 -1190
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map/integrations/active_record.rb +0 -140
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map/options.rb +0 -188
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map/params.rb +0 -79
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map/struct.rb +0 -52
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/map.gemspec +0 -46
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/test/leak.rb +0 -61
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/test/lib/testing.rb +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/test/map_test.rb +0 -802
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/Gemfile +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/LICENSE +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/README.markdown +0 -91
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/Rakefile +0 -79
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/lib/method_source.rb +0 -141
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/lib/method_source/code_helpers.rb +0 -154
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/lib/method_source/source_location.rb +0 -138
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/lib/method_source/version.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/method_source.gemspec +0 -33
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/test/test.rb +0 -138
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/test/test_code_helpers.rb +0 -41
- data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/test/test_helper.rb +0 -98
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/CHANGELOG.md +0 -220
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/CONTRIBUTING.md +0 -46
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/Gemfile +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/LICENSE.md +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/README.md +0 -119
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/Rakefile +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json.rb +0 -158
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapter.rb +0 -37
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapter_error.rb +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/gson.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/jr_jackson.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/json_common.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/json_gem.rb +0 -11
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/json_pure.rb +0 -11
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/nsjsonserialization.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/oj.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/ok_json.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/yajl.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/convertible_hash_keys.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/options.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/parse_error.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/vendor/okjson.rb +0 -606
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/version.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/multi_json.gemspec +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/gson_adapter_spec.rb +0 -10
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/jr_jackson_adapter_spec.rb +0 -10
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/json_gem_adapter_spec.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/json_pure_adapter_spec.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/multi_json_spec.rb +0 -200
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/nsjsonserialization_adapter_spec.rb +0 -10
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/oj_adapter_spec.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/ok_json_adapter_spec.rb +0 -7
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/shared/adapter.rb +0 -236
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/shared/json_common_adapter.rb +0 -30
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/shared/options.rb +0 -119
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/spec_helper.rb +0 -77
- data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/yajl_adapter_spec.rb +0 -10
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/CHANGELOG.md +0 -93
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/CONTRIBUTING.md +0 -49
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/LICENSE.md +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/README.md +0 -97
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/Rakefile +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml.rb +0 -296
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/libxml.rb +0 -30
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/libxml2_parser.rb +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/nokogiri.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/ox.rb +0 -97
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/rexml.rb +0 -113
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/version.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/multi_xml.gemspec +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/spec/helper.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/spec/multi_xml_spec.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/spec/parser_shared_example.rb +0 -694
- data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/spec/speed.rb +0 -63
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/CHANGELOG +0 -534
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/CONTRIBUTORS +0 -55
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/Gemfile +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/LICENSE +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/README.markdown +0 -400
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/Rakefile +0 -140
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/TODO +0 -117
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/bin/pry +0 -16
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry.rb +0 -274
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/cli.rb +0 -202
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/code.rb +0 -385
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/code/code_range.rb +0 -70
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/code/loc.rb +0 -92
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/code_object.rb +0 -153
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/command.rb +0 -689
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/command_set.rb +0 -400
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands.rb +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/amend_line.rb +0 -99
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/bang.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/bang_pry.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat.rb +0 -53
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat/abstract_formatter.rb +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat/exception_formatter.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat/file_formatter.rb +0 -84
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat/input_expression_formatter.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cd.rb +0 -30
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/code_collector.rb +0 -165
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/disable_pry.rb +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/disabled_commands.rb +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/easter_eggs.rb +0 -112
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/edit.rb +0 -207
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/edit/exception_patcher.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/edit/file_and_line_locator.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/edit/method_patcher.rb +0 -122
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/exit.rb +0 -42
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/exit_all.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/exit_program.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/find_method.rb +0 -199
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/fix_indent.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gem_cd.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gem_install.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gem_list.rb +0 -33
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gem_open.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gist.rb +0 -102
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/help.rb +0 -164
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/hist.rb +0 -161
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/import_set.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/install_command.rb +0 -51
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/jump_to.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/ls.rb +0 -338
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/nesting.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/play.rb +0 -69
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/pry_backtrace.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/pry_version.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/raise_up.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/reload_code.rb +0 -65
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/reset.rb +0 -18
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/ri.rb +0 -56
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/save_file.rb +0 -61
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/shell_command.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/shell_mode.rb +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/show_doc.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/show_info.rb +0 -200
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/show_input.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/show_source.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/simple_prompt.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/stat.rb +0 -40
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/switch_to.rb +0 -23
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/toggle_color.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/whereami.rb +0 -182
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/wtf.rb +0 -57
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/completion.rb +0 -321
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/config.rb +0 -258
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/core_extensions.rb +0 -121
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/custom_completions.rb +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/editor.rb +0 -129
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers.rb +0 -5
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/base_helpers.rb +0 -200
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/command_helpers.rb +0 -154
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/documentation_helpers.rb +0 -76
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/options_helpers.rb +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/table.rb +0 -109
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/text.rb +0 -108
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/history.rb +0 -124
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/history_array.rb +0 -116
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/hooks.rb +0 -250
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/indent.rb +0 -406
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/method.rb +0 -551
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/method/disowned.rb +0 -53
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/method/weird_method_locator.rb +0 -186
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/module_candidate.rb +0 -146
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/pager.rb +0 -90
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/plugins.rb +0 -103
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/pry_class.rb +0 -456
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/pry_instance.rb +0 -765
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/rbx_method.rb +0 -13
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/rbx_path.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/repl_file_loader.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/rubygem.rb +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/terminal.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/test/helper.rb +0 -185
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/version.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/wrapped_module.rb +0 -387
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/man/pry.1 +0 -195
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/man/pry.1.html +0 -204
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/man/pry.1.ronn +0 -141
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/pry.gemspec +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/Procfile +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/cli_spec.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/code_object_spec.rb +0 -277
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/code_spec.rb +0 -219
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/command_helpers_spec.rb +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/command_integration_spec.rb +0 -644
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/command_set_spec.rb +0 -627
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/command_spec.rb +0 -821
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/amend_line_spec.rb +0 -247
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/bang_spec.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/cat_spec.rb +0 -164
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/cd_spec.rb +0 -250
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/disable_pry_spec.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/edit_spec.rb +0 -727
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/exit_all_spec.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/exit_program_spec.rb +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/exit_spec.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/find_method_spec.rb +0 -70
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/gem_list_spec.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/gist_spec.rb +0 -79
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/help_spec.rb +0 -56
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/hist_spec.rb +0 -181
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/jump_to_spec.rb +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/ls_spec.rb +0 -181
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/play_spec.rb +0 -140
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/raise_up_spec.rb +0 -56
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/save_file_spec.rb +0 -177
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/show_doc_spec.rb +0 -510
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/show_input_spec.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/show_source_spec.rb +0 -782
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/whereami_spec.rb +0 -203
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/completion_spec.rb +0 -241
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/control_d_handler_spec.rb +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/documentation_helper_spec.rb +0 -73
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/editor_spec.rb +0 -79
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/exception_whitelist_spec.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/candidate_helper1.rb +0 -11
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/candidate_helper2.rb +0 -8
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/example.erb +0 -5
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/example_nesting.rb +0 -33
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/show_source_doc_examples.rb +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/testrc +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/testrcbad +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/whereami_helper.rb +0 -6
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/helper.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/helpers/bacon.rb +0 -86
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/helpers/mock_pry.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/helpers/table_spec.rb +0 -105
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/history_array_spec.rb +0 -67
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/hooks_spec.rb +0 -522
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/indent_spec.rb +0 -301
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/input_stack_spec.rb +0 -90
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/method_spec.rb +0 -482
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/prompt_spec.rb +0 -60
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/pry_defaults_spec.rb +0 -419
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/pry_history_spec.rb +0 -99
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/pry_output_spec.rb +0 -95
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/pry_spec.rb +0 -515
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/run_command_spec.rb +0 -25
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/sticky_locals_spec.rb +0 -157
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/syntax_checking_spec.rb +0 -81
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/wrapped_module_spec.rb +0 -261
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/wiki/Customizing-pry.md +0 -397
- data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/wiki/Home.md +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/README +0 -144
- data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/Rakefile +0 -390
- data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/bin/sekrets +0 -372
- data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/lib/sekrets.rb +0 -511
- data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/lib/sekrets/capistrano.rb +0 -37
- data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/sekrets.gemspec +0 -50
- data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/test/lib/testing.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/test/sekrets_test.rb +0 -167
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/CHANGELOG +0 -5790
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/MIT-LICENSE +0 -19
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/README.rdoc +0 -815
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/Rakefile +0 -186
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/bin/sequel +0 -244
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/active_record.rdoc +0 -912
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/advanced_associations.rdoc +0 -818
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/association_basics.rdoc +0 -1763
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/bin_sequel.rdoc +0 -144
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/cheat_sheet.rdoc +0 -220
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/code_order.rdoc +0 -96
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/core_extensions.rdoc +0 -364
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/dataset_basics.rdoc +0 -105
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/dataset_filtering.rdoc +0 -191
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/extensions.rdoc +0 -84
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/mass_assignment.rdoc +0 -55
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/migration.rdoc +0 -611
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/model_hooks.rdoc +0 -262
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/model_plugins.rdoc +0 -270
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/mssql_stored_procedures.rdoc +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/object_model.rdoc +0 -573
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/opening_databases.rdoc +0 -489
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/postgresql.rdoc +0 -326
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/prepared_statements.rdoc +0 -139
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/querying.rdoc +0 -1017
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/reflection.rdoc +0 -121
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.0.txt +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.1.txt +0 -143
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.3.txt +0 -101
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.4.0.txt +0 -53
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.5.0.txt +0 -155
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.0.0.txt +0 -298
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.1.0.txt +0 -271
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.10.0.txt +0 -328
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.11.0.txt +0 -215
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.12.0.txt +0 -534
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.2.0.txt +0 -253
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.3.0.txt +0 -88
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.4.0.txt +0 -106
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.5.0.txt +0 -137
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.6.0.txt +0 -157
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.7.0.txt +0 -166
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.8.0.txt +0 -171
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.9.0.txt +0 -97
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.0.0.txt +0 -221
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.1.0.txt +0 -406
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.10.0.txt +0 -286
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.11.0.txt +0 -254
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.12.0.txt +0 -304
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.13.0.txt +0 -210
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.14.0.txt +0 -118
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.15.0.txt +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.16.0.txt +0 -45
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.17.0.txt +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.18.0.txt +0 -120
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.19.0.txt +0 -67
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.2.0.txt +0 -268
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.20.0.txt +0 -41
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.21.0.txt +0 -87
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.22.0.txt +0 -39
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.23.0.txt +0 -172
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.24.0.txt +0 -420
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.25.0.txt +0 -88
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.26.0.txt +0 -88
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.27.0.txt +0 -82
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.28.0.txt +0 -304
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.29.0.txt +0 -459
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.3.0.txt +0 -192
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.30.0.txt +0 -135
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.31.0.txt +0 -146
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.32.0.txt +0 -202
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.33.0.txt +0 -157
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.34.0.txt +0 -671
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.35.0.txt +0 -144
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.36.0.txt +0 -245
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.37.0.txt +0 -338
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.38.0.txt +0 -234
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.39.0.txt +0 -237
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.4.0.txt +0 -325
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.40.0.txt +0 -73
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.41.0.txt +0 -155
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.42.0.txt +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.43.0.txt +0 -105
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.44.0.txt +0 -152
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.45.0.txt +0 -179
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.46.0.txt +0 -122
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.47.0.txt +0 -270
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.48.0.txt +0 -477
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.5.0.txt +0 -510
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.6.0.txt +0 -366
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.7.0.txt +0 -179
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.8.0.txt +0 -151
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.9.0.txt +0 -233
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.0.0.txt +0 -262
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.1.0.txt +0 -85
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.10.0.txt +0 -226
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.11.0.txt +0 -147
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.12.0.txt +0 -105
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.13.0.txt +0 -169
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.14.0.txt +0 -68
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.15.0.txt +0 -56
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.2.0.txt +0 -129
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.3.0.txt +0 -40
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.4.0.txt +0 -92
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.5.0.txt +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.6.0.txt +0 -30
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.7.0.txt +0 -103
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.8.0.txt +0 -175
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.9.0.txt +0 -190
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/schema_modification.rdoc +0 -654
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/security.rdoc +0 -370
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/sharding.rdoc +0 -245
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/sql.rdoc +0 -589
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/testing.rdoc +0 -176
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/thread_safety.rdoc +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/transactions.rdoc +0 -168
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/validations.rdoc +0 -540
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/virtual_rows.rdoc +0 -272
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel.rb +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/ado.rb +0 -151
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/ado/access.rb +0 -335
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/ado/mssql.rb +0 -69
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/amalgalite.rb +0 -179
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/cubrid.rb +0 -143
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/db2.rb +0 -229
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/dbi.rb +0 -101
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/do.rb +0 -156
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/do/mysql.rb +0 -64
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/do/postgres.rb +0 -42
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/do/sqlite3.rb +0 -40
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/fdbsql.rb +0 -285
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/firebird.rb +0 -104
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/ibmdb.rb +0 -476
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/informix.rb +0 -67
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc.rb +0 -794
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/as400.rb +0 -82
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/cubrid.rb +0 -62
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/db2.rb +0 -91
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/derby.rb +0 -312
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/fdbsql.rb +0 -65
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/firebirdsql.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/h2.rb +0 -227
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/hsqldb.rb +0 -231
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/informix-sqli.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/jdbcprogress.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/jtds.rb +0 -45
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/mssql.rb +0 -47
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/mysql.rb +0 -90
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/oracle.rb +0 -140
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/postgresql.rb +0 -215
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/sqlanywhere.rb +0 -82
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/sqlite.rb +0 -82
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/sqlserver.rb +0 -61
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/transactions.rb +0 -109
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/mock.rb +0 -391
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/mysql.rb +0 -372
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/mysql2.rb +0 -200
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/odbc.rb +0 -149
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/odbc/db2.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/odbc/mssql.rb +0 -61
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/odbc/progress.rb +0 -8
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/openbase.rb +0 -53
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/oracle.rb +0 -459
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/postgres.rb +0 -877
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/access.rb +0 -299
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/cubrid.rb +0 -243
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/db2.rb +0 -403
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/fdbsql.rb +0 -550
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/firebird.rb +0 -245
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/informix.rb +0 -52
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/mssql.rb +0 -1037
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/mysql.rb +0 -984
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/mysql_prepared_statements.rb +0 -182
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/oracle.rb +0 -522
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/postgres.rb +0 -1617
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/progress.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/sqlanywhere.rb +0 -470
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/sqlite.rb +0 -729
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/sqlanywhere.rb +0 -177
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/sqlite.rb +0 -413
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/swift.rb +0 -150
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/swift/mysql.rb +0 -47
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/swift/postgres.rb +0 -45
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/swift/sqlite.rb +0 -35
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/tinytds.rb +0 -282
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/emulate_offset_with_reverse_and_count.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/emulate_offset_with_row_number.rb +0 -62
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/pg_types.rb +0 -68
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/replace.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/split_alter_table.rb +0 -44
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/stored_procedures.rb +0 -74
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/ast_transformer.rb +0 -200
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool.rb +0 -110
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool/sharded_single.rb +0 -98
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool/sharded_threaded.rb +0 -265
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool/single.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool/threaded.rb +0 -198
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/core.rb +0 -394
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/connecting.rb +0 -318
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/dataset.rb +0 -69
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/dataset_defaults.rb +0 -175
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/features.rb +0 -134
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/logging.rb +0 -73
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/misc.rb +0 -534
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/query.rb +0 -329
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/schema_generator.rb +0 -525
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/schema_methods.rb +0 -964
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/transactions.rb +0 -353
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset.rb +0 -40
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/actions.rb +0 -1045
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/features.rb +0 -203
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/graph.rb +0 -272
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/misc.rb +0 -279
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/mutation.rb +0 -109
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/placeholder_literalizer.rb +0 -179
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/prepared_statements.rb +0 -283
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/query.rb +0 -1136
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/sql.rb +0 -1555
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/deprecated.rb +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/exceptions.rb +0 -77
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/_pretty_table.rb +0 -84
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/arbitrary_servers.rb +0 -110
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/blank.rb +0 -47
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/columns_introspection.rb +0 -83
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/connection_validator.rb +0 -110
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/constraint_validations.rb +0 -455
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/core_extensions.rb +0 -230
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/core_refinements.rb +0 -221
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/current_datetime_timestamp.rb +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/dataset_source_alias.rb +0 -91
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/date_arithmetic.rb +0 -192
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/empty_array_ignore_nulls.rb +0 -34
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/error_sql.rb +0 -72
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/eval_inspect.rb +0 -182
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/filter_having.rb +0 -59
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/from_block.rb +0 -32
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/graph_each.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/hash_aliases.rb +0 -45
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/inflector.rb +0 -246
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/looser_typecasting.rb +0 -44
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/meta_def.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/migration.rb +0 -736
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/mssql_emulate_lateral_with_apply.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/named_timezones.rb +0 -99
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/null_dataset.rb +0 -105
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pagination.rb +0 -121
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_array.rb +0 -606
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_array_ops.rb +0 -324
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_enum.rb +0 -136
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_hstore.rb +0 -357
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_hstore_ops.rb +0 -349
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_inet.rb +0 -118
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_interval.rb +0 -198
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_json.rb +0 -365
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_json_ops.rb +0 -434
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_loose_count.rb +0 -33
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_range.rb +0 -546
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_range_ops.rb +0 -162
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_row.rb +0 -615
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_row_ops.rb +0 -194
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_static_cache_updater.rb +0 -140
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pretty_table.rb +0 -36
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/query.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/query_literals.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/round_timestamps.rb +0 -52
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/ruby18_symbol_extensions.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/schema_caching.rb +0 -75
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/schema_dumper.rb +0 -476
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/select_remove.rb +0 -48
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/sequel_3_dataset_methods.rb +0 -118
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/server_block.rb +0 -149
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/set_overrides.rb +0 -72
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/split_array_nil.rb +0 -66
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/sql_expr.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/string_date_time.rb +0 -50
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/thread_local_timezones.rb +0 -55
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/to_dot.rb +0 -154
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model.rb +0 -175
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/associations.rb +0 -3171
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/base.rb +0 -2306
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/dataset_module.rb +0 -30
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/default_inflections.rb +0 -45
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/errors.rb +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/exceptions.rb +0 -46
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/inflections.rb +0 -162
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/plugins.rb +0 -49
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/no_core_ext.rb +0 -1
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/active_model.rb +0 -99
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/after_initialize.rb +0 -37
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/association_autoreloading.rb +0 -7
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/association_dependencies.rb +0 -97
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/association_pks.rb +0 -167
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/association_proxies.rb +0 -105
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/auto_validations.rb +0 -161
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/blacklist_security.rb +0 -93
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/boolean_readers.rb +0 -56
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/caching.rb +0 -153
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/class_table_inheritance.rb +0 -292
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/column_select.rb +0 -57
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/composition.rb +0 -187
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/constraint_validations.rb +0 -229
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/dataset_associations.rb +0 -107
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/defaults_setter.rb +0 -69
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/dirty.rb +0 -231
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/eager_each.rb +0 -64
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/error_splitter.rb +0 -54
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/force_encoding.rb +0 -81
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/hook_class_methods.rb +0 -125
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/input_transformer.rb +0 -79
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/insert_returning_select.rb +0 -70
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/instance_filters.rb +0 -131
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/instance_hooks.rb +0 -96
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/json_serializer.rb +0 -352
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/lazy_attributes.rb +0 -117
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/list.rb +0 -189
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/many_through_many.rb +0 -317
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/many_to_one_pk_lookup.rb +0 -7
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/modification_detection.rb +0 -90
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/mssql_optimistic_locking.rb +0 -92
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/nested_attributes.rb +0 -323
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/optimistic_locking.rb +0 -83
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/pg_array_associations.rb +0 -528
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/pg_row.rb +0 -123
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/pg_typecast_on_load.rb +0 -78
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/prepared_statements.rb +0 -205
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/prepared_statements_associations.rb +0 -116
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/prepared_statements_safe.rb +0 -73
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/prepared_statements_with_pk.rb +0 -59
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/rcte_tree.rb +0 -343
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/schema.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/scissors.rb +0 -33
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/serialization.rb +0 -235
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/serialization_modification_detection.rb +0 -84
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/sharding.rb +0 -117
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/single_table_inheritance.rb +0 -230
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/skip_create_refresh.rb +0 -35
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/split_values.rb +0 -64
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/static_cache.rb +0 -215
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/string_stripper.rb +0 -57
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/subclasses.rb +0 -61
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/table_select.rb +0 -41
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/tactical_eager_loading.rb +0 -85
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/timestamps.rb +0 -95
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/touch.rb +0 -140
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/tree.rb +0 -156
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/typecast_on_load.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/unlimited_update.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/update_or_create.rb +0 -60
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/update_primary_key.rb +0 -70
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/validation_class_methods.rb +0 -439
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/validation_helpers.rb +0 -291
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/xml_serializer.rb +0 -410
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/sql.rb +0 -1865
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/timezones.rb +0 -221
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/version.rb +0 -18
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/db2_spec.rb +0 -148
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/fdbsql_spec.rb +0 -429
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/firebird_spec.rb +0 -417
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/informix_spec.rb +0 -100
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/mssql_spec.rb +0 -722
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/mysql_spec.rb +0 -1304
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/oracle_spec.rb +0 -315
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/postgres_spec.rb +0 -3537
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/spec_helper.rb +0 -76
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/sqlanywhere_spec.rb +0 -170
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/sqlite_spec.rb +0 -650
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/bin_spec.rb +0 -256
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/connection_pool_spec.rb +0 -982
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/database_spec.rb +0 -2487
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/dataset_spec.rb +0 -4970
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/deprecated_spec.rb +0 -70
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/expression_filters_spec.rb +0 -1197
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/mock_adapter_spec.rb +0 -462
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/object_graph_spec.rb +0 -303
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/placeholder_literalizer_spec.rb +0 -163
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/schema_generator_spec.rb +0 -179
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/schema_spec.rb +0 -1610
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/spec_helper.rb +0 -49
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/version_spec.rb +0 -7
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core_extensions_spec.rb +0 -695
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/active_model_spec.rb +0 -123
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/after_initialize_spec.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/arbitrary_servers_spec.rb +0 -109
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/association_dependencies_spec.rb +0 -117
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/association_pks_spec.rb +0 -281
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/association_proxies_spec.rb +0 -86
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/auto_validations_spec.rb +0 -158
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/blacklist_security_spec.rb +0 -87
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/blank_spec.rb +0 -69
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/boolean_readers_spec.rb +0 -93
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/caching_spec.rb +0 -270
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/class_table_inheritance_spec.rb +0 -274
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/column_select_spec.rb +0 -108
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/columns_introspection_spec.rb +0 -91
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/composition_spec.rb +0 -242
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/connection_validator_spec.rb +0 -118
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/constraint_validations_plugin_spec.rb +0 -274
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/constraint_validations_spec.rb +0 -325
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/core_refinements_spec.rb +0 -519
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/current_datetime_timestamp_spec.rb +0 -27
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/dataset_associations_spec.rb +0 -311
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/dataset_source_alias_spec.rb +0 -51
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/date_arithmetic_spec.rb +0 -157
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/defaults_setter_spec.rb +0 -101
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/dirty_spec.rb +0 -180
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/eager_each_spec.rb +0 -42
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/empty_array_ignore_nulls_spec.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/error_splitter_spec.rb +0 -18
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/error_sql_spec.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/eval_inspect_spec.rb +0 -73
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/filter_having_spec.rb +0 -40
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/force_encoding_spec.rb +0 -114
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/from_block_spec.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/graph_each_spec.rb +0 -109
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/hash_aliases_spec.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/hook_class_methods_spec.rb +0 -416
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/inflector_spec.rb +0 -183
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/input_transformer_spec.rb +0 -54
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/insert_returning_select_spec.rb +0 -46
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/instance_filters_spec.rb +0 -79
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/instance_hooks_spec.rb +0 -276
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/json_serializer_spec.rb +0 -267
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/lazy_attributes_spec.rb +0 -170
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/list_spec.rb +0 -265
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/looser_typecasting_spec.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/many_through_many_spec.rb +0 -2159
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/meta_def_spec.rb +0 -21
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/migration_spec.rb +0 -709
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/modification_detection_spec.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/mssql_optimistic_locking_spec.rb +0 -91
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/named_timezones_spec.rb +0 -108
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/nested_attributes_spec.rb +0 -697
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/null_dataset_spec.rb +0 -85
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/optimistic_locking_spec.rb +0 -128
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pagination_spec.rb +0 -118
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_array_associations_spec.rb +0 -736
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_array_ops_spec.rb +0 -143
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_array_spec.rb +0 -390
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_enum_spec.rb +0 -64
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_hstore_ops_spec.rb +0 -236
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_hstore_spec.rb +0 -206
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_inet_spec.rb +0 -52
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_interval_spec.rb +0 -76
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_json_ops_spec.rb +0 -226
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_json_spec.rb +0 -218
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_loose_count_spec.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_range_ops_spec.rb +0 -58
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_range_spec.rb +0 -404
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_row_ops_spec.rb +0 -60
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_row_plugin_spec.rb +0 -62
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_row_spec.rb +0 -360
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_static_cache_updater_spec.rb +0 -92
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_typecast_on_load_spec.rb +0 -63
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/prepared_statements_associations_spec.rb +0 -151
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/prepared_statements_safe_spec.rb +0 -61
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/prepared_statements_spec.rb +0 -103
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/prepared_statements_with_pk_spec.rb +0 -31
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pretty_table_spec.rb +0 -92
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/query_literals_spec.rb +0 -167
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/query_spec.rb +0 -102
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/rcte_tree_spec.rb +0 -387
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/round_timestamps_spec.rb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/schema_caching_spec.rb +0 -41
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/schema_dumper_spec.rb +0 -788
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/schema_spec.rb +0 -113
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/scissors_spec.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/select_remove_spec.rb +0 -38
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/sequel_3_dataset_methods_spec.rb +0 -101
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/serialization_modification_detection_spec.rb +0 -98
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/serialization_spec.rb +0 -340
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/server_block_spec.rb +0 -90
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/set_overrides_spec.rb +0 -61
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/sharding_spec.rb +0 -198
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/shared_caching_spec.rb +0 -175
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/single_table_inheritance_spec.rb +0 -276
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/skip_create_refresh_spec.rb +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/spec_helper.rb +0 -96
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/split_array_nil_spec.rb +0 -24
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/split_values_spec.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/sql_expr_spec.rb +0 -60
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/static_cache_spec.rb +0 -355
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/string_date_time_spec.rb +0 -95
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/string_stripper_spec.rb +0 -68
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/subclasses_spec.rb +0 -66
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/table_select_spec.rb +0 -71
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/tactical_eager_loading_spec.rb +0 -82
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/thread_local_timezones_spec.rb +0 -67
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/timestamps_spec.rb +0 -175
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/to_dot_spec.rb +0 -154
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/touch_spec.rb +0 -203
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/tree_spec.rb +0 -270
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/typecast_on_load_spec.rb +0 -80
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/unlimited_update_spec.rb +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/update_or_create_spec.rb +0 -81
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/update_primary_key_spec.rb +0 -100
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/validation_class_methods_spec.rb +0 -1030
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/validation_helpers_spec.rb +0 -520
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/xml_serializer_spec.rb +0 -207
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_down_migration/001_create_alt_basic.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_down_migration/002_create_alt_advanced.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_timestamped_migrations/1273253849_create_sessions.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_timestamped_migrations/1273253851_create_nodes.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_timestamped_migrations/1273253853_3_create_users.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_up_migration/001_create_alt_basic.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_up_migration/002_create_alt_advanced.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/001_create_sessions.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/002_create_nodes.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/003_3_create_users.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/1273253850_create_artists.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/1273253852_create_albums.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_integer_migrations/001_create_alt_advanced.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_integer_migrations/001_create_alt_basic.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_timestamped_migrations/1273253849_create_sessions.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_timestamped_migrations/1273253853_create_nodes.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_timestamped_migrations/1273253853_create_users.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/integer_migrations/001_create_sessions.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/integer_migrations/002_create_nodes.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/integer_migrations/003_3_create_users.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253849_create_sessions.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253850_create_artists.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253851_create_nodes.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253852_create_albums.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253853_3_create_users.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/missing_integer_migrations/001_create_alt_basic.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/missing_integer_migrations/003_create_alt_advanced.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/missing_timestamped_migrations/1273253849_create_sessions.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/missing_timestamped_migrations/1273253853_3_create_users.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/001_reversible.rb +0 -5
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/002_reversible.rb +0 -5
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/003_reversible.rb +0 -5
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/004_reversible.rb +0 -5
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/005_reversible.rb +0 -10
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/timestamped_migrations/1273253849_create_sessions.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/timestamped_migrations/1273253851_create_nodes.rb +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/timestamped_migrations/1273253853_3_create_users.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/transaction_specified_migrations/001_create_alt_basic.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/transaction_specified_migrations/002_create_basic.rb +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/transaction_unspecified_migrations/001_create_alt_basic.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/transaction_unspecified_migrations/002_create_basic.rb +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/uppercase_timestamped_migrations/1273253849_CREATE_SESSIONS.RB +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/uppercase_timestamped_migrations/1273253851_CREATE_NODES.RB +0 -9
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/uppercase_timestamped_migrations/1273253853_3_CREATE_USERS.RB +0 -4
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/associations_test.rb +0 -2453
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/database_test.rb +0 -113
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/dataset_test.rb +0 -1798
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/eager_loader_test.rb +0 -687
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/migrator_test.rb +0 -240
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/model_test.rb +0 -226
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/plugin_test.rb +0 -2162
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/prepared_statement_test.rb +0 -426
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/schema_test.rb +0 -801
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/spec_helper.rb +0 -111
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/timezone_test.rb +0 -86
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/transaction_test.rb +0 -374
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/type_test.rb +0 -133
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/association_reflection_spec.rb +0 -500
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/associations_spec.rb +0 -4316
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/base_spec.rb +0 -746
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/class_dataset_methods_spec.rb +0 -145
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/dataset_methods_spec.rb +0 -149
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/eager_loading_spec.rb +0 -2080
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/hooks_spec.rb +0 -536
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/inflector_spec.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/model_spec.rb +0 -992
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/plugins_spec.rb +0 -299
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/record_spec.rb +0 -2053
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/spec_helper.rb +0 -64
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/validations_spec.rb +0 -191
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/rspec_helper.rb +0 -22
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/sequel_coverage.rb +0 -15
- data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/spec_config.rb +0 -2
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/CHANGES.md +0 -303
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/Gemfile +0 -3
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/LICENSE +0 -20
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/README.md +0 -182
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/Rakefile +0 -29
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/lib/slop.rb +0 -687
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/lib/slop/commands.rb +0 -196
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/lib/slop/option.rb +0 -209
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/slop.gemspec +0 -17
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/test/commands_test.rb +0 -26
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/test/helper.rb +0 -12
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/test/option_test.rb +0 -138
- data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/test/slop_test.rb +0 -518
- data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/README +0 -151
- data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/README.erb +0 -43
- data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/lib/threadify.rb +0 -176
- data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/rakefile +0 -222
- data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/sample/a.rb +0 -37
- data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/sample/b.rb +0 -41
- data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/threadify.gemspec +0 -26
- data/vendor/bundle/ruby/1.9.1/specifications/amalgalite-1.3.0.gemspec +0 -52
- data/vendor/bundle/ruby/1.9.1/specifications/arrayfields-4.7.4.gemspec +0 -16
- data/vendor/bundle/ruby/1.9.1/specifications/chronic-0.10.2.gemspec +0 -42
- data/vendor/bundle/ruby/1.9.1/specifications/coderay-1.1.0.gemspec +0 -23
- data/vendor/bundle/ruby/1.9.1/specifications/coerce-0.0.6.gemspec +0 -30
- data/vendor/bundle/ruby/1.9.1/specifications/daemons-1.1.9.gemspec +0 -19
- data/vendor/bundle/ruby/1.9.1/specifications/fastercsv-1.5.5.gemspec +0 -20
- data/vendor/bundle/ruby/1.9.1/specifications/fattr-2.2.2.gemspec +0 -18
- data/vendor/bundle/ruby/1.9.1/specifications/flowdock-0.5.0.gemspec +0 -51
- data/vendor/bundle/ruby/1.9.1/specifications/highline-1.6.21.gemspec +0 -21
- data/vendor/bundle/ruby/1.9.1/specifications/httparty-0.13.1.gemspec +0 -35
- data/vendor/bundle/ruby/1.9.1/specifications/json-1.8.1.gemspec +0 -36
- data/vendor/bundle/ruby/1.9.1/specifications/main-6.0.0.gemspec +0 -39
- data/vendor/bundle/ruby/1.9.1/specifications/main-6.1.0.gemspec +0 -39
- data/vendor/bundle/ruby/1.9.1/specifications/map-6.5.5.gemspec +0 -18
- data/vendor/bundle/ruby/1.9.1/specifications/method_source-0.8.2.gemspec +0 -31
- data/vendor/bundle/ruby/1.9.1/specifications/multi_json-1.10.1.gemspec +0 -30
- data/vendor/bundle/ruby/1.9.1/specifications/multi_xml-0.5.5.gemspec +0 -30
- data/vendor/bundle/ruby/1.9.1/specifications/pry-0.9.12.6.gemspec +0 -51
- data/vendor/bundle/ruby/1.9.1/specifications/sekrets-1.7.0.gemspec +0 -43
- data/vendor/bundle/ruby/1.9.1/specifications/sequel-4.15.0.gemspec +0 -22
- data/vendor/bundle/ruby/1.9.1/specifications/slop-3.5.0.gemspec +0 -33
- data/vendor/bundle/ruby/1.9.1/specifications/threadify-1.3.0.gemspec +0 -16
@@ -1,3171 +0,0 @@
|
|
1
|
-
module Sequel
|
2
|
-
class Model
|
3
|
-
# Associations are used in order to specify relationships between model classes
|
4
|
-
# that reflect relations between tables in the database using foreign keys.
|
5
|
-
module Associations
|
6
|
-
# Map of association type symbols to association reflection classes.
|
7
|
-
ASSOCIATION_TYPES = {}
|
8
|
-
|
9
|
-
# Set an empty association reflection hash in the model
|
10
|
-
def self.apply(model)
|
11
|
-
model.instance_eval do
|
12
|
-
@association_reflections = {}
|
13
|
-
@autoreloading_associations = {}
|
14
|
-
@cache_associations = true
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
# AssociationReflection is a Hash subclass that keeps information on Sequel::Model associations. It
|
19
|
-
# provides methods to reduce internal code duplication. It should not
|
20
|
-
# be instantiated by the user.
|
21
|
-
class AssociationReflection < Hash
|
22
|
-
include Sequel::Inflections
|
23
|
-
|
24
|
-
# Name symbol for the _add internal association method
|
25
|
-
def _add_method
|
26
|
-
:"_add_#{singularize(self[:name])}"
|
27
|
-
end
|
28
|
-
|
29
|
-
# Name symbol for the _remove_all internal association method
|
30
|
-
def _remove_all_method
|
31
|
-
:"_remove_all_#{self[:name]}"
|
32
|
-
end
|
33
|
-
|
34
|
-
# Name symbol for the _remove internal association method
|
35
|
-
def _remove_method
|
36
|
-
:"_remove_#{singularize(self[:name])}"
|
37
|
-
end
|
38
|
-
|
39
|
-
# Name symbol for the _setter association method
|
40
|
-
def _setter_method
|
41
|
-
:"_#{self[:name]}="
|
42
|
-
end
|
43
|
-
|
44
|
-
# Name symbol for the add association method
|
45
|
-
def add_method
|
46
|
-
:"add_#{singularize(self[:name])}"
|
47
|
-
end
|
48
|
-
|
49
|
-
# Name symbol for association method, the same as the name of the association.
|
50
|
-
def association_method
|
51
|
-
self[:name]
|
52
|
-
end
|
53
|
-
|
54
|
-
# The class associated to the current model class via this association
|
55
|
-
def associated_class
|
56
|
-
cached_fetch(:class){constantize(self[:class_name])}
|
57
|
-
end
|
58
|
-
|
59
|
-
# The dataset associated via this association, with the non-instance specific
|
60
|
-
# changes already applied. This will be a joined dataset if the association
|
61
|
-
# requires joining tables.
|
62
|
-
def associated_dataset
|
63
|
-
cached_fetch(:_dataset){apply_dataset_changes(_associated_dataset)}
|
64
|
-
end
|
65
|
-
|
66
|
-
# Apply all non-instance specific changes to the given dataset and return it.
|
67
|
-
def apply_dataset_changes(ds)
|
68
|
-
ds.extend(AssociationDatasetMethods)
|
69
|
-
ds.association_reflection = self
|
70
|
-
self[:extend].each{|m| ds.extend(m)}
|
71
|
-
ds = ds.select(*select) if select
|
72
|
-
if c = self[:conditions]
|
73
|
-
ds = (c.is_a?(Array) && !Sequel.condition_specifier?(c)) ? ds.where(*c) : ds.where(c)
|
74
|
-
end
|
75
|
-
ds = ds.order(*self[:order]) if self[:order]
|
76
|
-
ds = ds.limit(*self[:limit]) if self[:limit]
|
77
|
-
ds = ds.limit(1) if limit_to_single_row?
|
78
|
-
ds = ds.eager(*self[:eager]) if self[:eager]
|
79
|
-
ds = ds.distinct if self[:distinct]
|
80
|
-
ds
|
81
|
-
end
|
82
|
-
|
83
|
-
# Apply all non-instance specific changes and the eager_block option to the given
|
84
|
-
# dataset and return it.
|
85
|
-
def apply_eager_dataset_changes(ds)
|
86
|
-
ds = apply_dataset_changes(ds)
|
87
|
-
if block = self[:eager_block]
|
88
|
-
ds = block.call(ds)
|
89
|
-
end
|
90
|
-
ds
|
91
|
-
end
|
92
|
-
|
93
|
-
# Apply the eager graph limit strategy to the dataset to graph into the current dataset, or return
|
94
|
-
# the dataset unmodified if no SQL limit strategy is needed.
|
95
|
-
def apply_eager_graph_limit_strategy(strategy, ds)
|
96
|
-
case strategy
|
97
|
-
when :distinct_on
|
98
|
-
apply_distinct_on_eager_limit_strategy(ds.order_prepend(*self[:order]))
|
99
|
-
when :window_function
|
100
|
-
apply_window_function_eager_limit_strategy(ds.order_prepend(*self[:order])).select(*ds.columns)
|
101
|
-
else
|
102
|
-
ds
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
# Apply an eager limit strategy to the dataset, or return the dataset
|
107
|
-
# unmodified if it doesn't need an eager limit strategy.
|
108
|
-
def apply_eager_limit_strategy(ds, strategy=eager_limit_strategy)
|
109
|
-
case strategy
|
110
|
-
when :distinct_on
|
111
|
-
apply_distinct_on_eager_limit_strategy(ds)
|
112
|
-
when :window_function
|
113
|
-
apply_window_function_eager_limit_strategy(ds)
|
114
|
-
else
|
115
|
-
ds
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
# Use DISTINCT ON and ORDER BY clauses to limit the results to the first record with matching keys.
|
120
|
-
def apply_distinct_on_eager_limit_strategy(ds)
|
121
|
-
keys = predicate_key
|
122
|
-
ds.distinct(*keys).order_prepend(*keys)
|
123
|
-
end
|
124
|
-
|
125
|
-
# Use a window function to limit the results of the eager loading dataset.
|
126
|
-
def apply_window_function_eager_limit_strategy(ds)
|
127
|
-
rn = ds.row_number_column
|
128
|
-
limit, offset = limit_and_offset
|
129
|
-
ds = ds.unordered.select_append{|o| o.row_number{}.over(:partition=>predicate_key, :order=>ds.opts[:order]).as(rn)}.from_self
|
130
|
-
ds = if !returns_array?
|
131
|
-
ds.where(rn => offset ? offset+1 : 1)
|
132
|
-
elsif offset
|
133
|
-
offset += 1
|
134
|
-
if limit
|
135
|
-
ds.where(rn => (offset...(offset+limit)))
|
136
|
-
else
|
137
|
-
ds.where{SQL::Identifier.new(rn) >= offset}
|
138
|
-
end
|
139
|
-
else
|
140
|
-
ds.where{SQL::Identifier.new(rn) <= limit}
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
# If the ruby eager limit strategy is being used, slice the array using the slice
|
145
|
-
# range to return the object(s) at the correct offset/limit.
|
146
|
-
def apply_ruby_eager_limit_strategy(rows)
|
147
|
-
if eager_limit_strategy == :ruby
|
148
|
-
name = self[:name]
|
149
|
-
if returns_array?
|
150
|
-
range = slice_range
|
151
|
-
rows.each{|o| o.associations[name] = o.associations[name][range] || []}
|
152
|
-
elsif slice_range
|
153
|
-
offset = slice_range.begin
|
154
|
-
rows.each{|o| o.associations[name] = o.associations[name][offset]}
|
155
|
-
end
|
156
|
-
end
|
157
|
-
end
|
158
|
-
|
159
|
-
# Whether the associations cache should use an array when storing the
|
160
|
-
# associated records during eager loading.
|
161
|
-
def assign_singular?
|
162
|
-
!returns_array?
|
163
|
-
end
|
164
|
-
|
165
|
-
# Whether this association can have associated objects, given the current
|
166
|
-
# object. Should be false if obj cannot have associated objects because
|
167
|
-
# the necessary key columns are NULL.
|
168
|
-
def can_have_associated_objects?(obj)
|
169
|
-
true
|
170
|
-
end
|
171
|
-
|
172
|
-
# Whether you are able to clone from the given association type to the current
|
173
|
-
# association type, true by default only if the types match.
|
174
|
-
def cloneable?(ref)
|
175
|
-
ref[:type] == self[:type]
|
176
|
-
end
|
177
|
-
|
178
|
-
# Name symbol for the dataset association method
|
179
|
-
def dataset_method
|
180
|
-
:"#{self[:name]}_dataset"
|
181
|
-
end
|
182
|
-
|
183
|
-
# Whether the dataset needs a primary key to function, true by default.
|
184
|
-
def dataset_need_primary_key?
|
185
|
-
true
|
186
|
-
end
|
187
|
-
|
188
|
-
# Return the symbol used for the row number column if the window function
|
189
|
-
# eager limit strategy is being used, or nil otherwise.
|
190
|
-
def delete_row_number_column(ds=associated_dataset)
|
191
|
-
if eager_limit_strategy == :window_function
|
192
|
-
ds.row_number_column
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
# Return an dataset that will load the appropriate associated objects for
|
197
|
-
# the given object using this association.
|
198
|
-
def association_dataset_for(object)
|
199
|
-
associated_dataset.where(predicate_keys.zip(predicate_key_values(object)))
|
200
|
-
end
|
201
|
-
|
202
|
-
ASSOCIATION_DATASET_PROC = proc{|r| r.association_dataset_for(self)}
|
203
|
-
# Proc used to create the association dataset method.
|
204
|
-
def association_dataset_proc
|
205
|
-
ASSOCIATION_DATASET_PROC
|
206
|
-
end
|
207
|
-
|
208
|
-
# The eager_graph limit strategy to use for this dataset
|
209
|
-
def eager_graph_limit_strategy(strategy)
|
210
|
-
if self[:limit] || !returns_array?
|
211
|
-
strategy = strategy[self[:name]] if strategy.is_a?(Hash)
|
212
|
-
case strategy
|
213
|
-
when true
|
214
|
-
true_eager_graph_limit_strategy
|
215
|
-
when Symbol
|
216
|
-
strategy
|
217
|
-
else
|
218
|
-
if returns_array? || offset
|
219
|
-
:ruby
|
220
|
-
end
|
221
|
-
end
|
222
|
-
end
|
223
|
-
end
|
224
|
-
|
225
|
-
# The eager limit strategy to use for this dataset.
|
226
|
-
def eager_limit_strategy
|
227
|
-
cached_fetch(:_eager_limit_strategy) do
|
228
|
-
if self[:limit] || !returns_array?
|
229
|
-
case s = cached_fetch(:eager_limit_strategy){default_eager_limit_strategy}
|
230
|
-
when true
|
231
|
-
true_eager_limit_strategy
|
232
|
-
else
|
233
|
-
s
|
234
|
-
end
|
235
|
-
end
|
236
|
-
end
|
237
|
-
end
|
238
|
-
|
239
|
-
# Eager load the associated objects using the hash of eager options,
|
240
|
-
# yielding each row to the block.
|
241
|
-
def eager_load_results(eo, &block)
|
242
|
-
rows = eo[:rows]
|
243
|
-
initialize_association_cache(rows) unless eo[:initialize_rows] == false
|
244
|
-
strategy = eager_limit_strategy
|
245
|
-
cascade = eo[:associations]
|
246
|
-
|
247
|
-
if eo[:eager_block] || eo[:loader] == false
|
248
|
-
strategy = true_eager_graph_limit_strategy if strategy == :union
|
249
|
-
objects = apply_eager_limit_strategy(eager_loading_dataset(eo), strategy).all
|
250
|
-
elsif strategy == :union
|
251
|
-
objects = []
|
252
|
-
ds = associated_dataset
|
253
|
-
loader = union_eager_loader
|
254
|
-
joiner = " UNION ALL "
|
255
|
-
eo[:id_map].keys.each_slice(subqueries_per_union).each do |slice|
|
256
|
-
objects.concat(ds.with_sql(slice.map{|k| loader.sql(*k)}.join(joiner)).to_a)
|
257
|
-
end
|
258
|
-
ds = ds.eager(cascade) if cascade
|
259
|
-
ds.send(:post_load, objects)
|
260
|
-
else
|
261
|
-
loader = placeholder_eager_loader
|
262
|
-
loader = loader.with_dataset{|ds| ds.eager(cascade)} if cascade
|
263
|
-
objects = loader.all(eo[:id_map].keys)
|
264
|
-
end
|
265
|
-
|
266
|
-
objects.each(&block)
|
267
|
-
apply_ruby_eager_limit_strategy(rows)
|
268
|
-
end
|
269
|
-
|
270
|
-
# The key to use for the key hash when eager loading
|
271
|
-
def eager_loader_key
|
272
|
-
self[:eager_loader_key]
|
273
|
-
end
|
274
|
-
|
275
|
-
# By default associations do not need to select a key in an associated table
|
276
|
-
# to eagerly load.
|
277
|
-
def eager_loading_use_associated_key?
|
278
|
-
false
|
279
|
-
end
|
280
|
-
|
281
|
-
# Alias of predicate_key, only for backwards compatibility.
|
282
|
-
def eager_loading_predicate_key
|
283
|
-
predicate_key
|
284
|
-
end
|
285
|
-
|
286
|
-
# Whether to eagerly graph a lazy dataset, true by default. If this
|
287
|
-
# is false, the association won't respect the :eager_graph option
|
288
|
-
# when loading the association for a single record.
|
289
|
-
def eager_graph_lazy_dataset?
|
290
|
-
true
|
291
|
-
end
|
292
|
-
|
293
|
-
# Whether additional conditions should be added when using the filter
|
294
|
-
# by associations support.
|
295
|
-
def filter_by_associations_add_conditions?
|
296
|
-
self[:conditions] || self[:eager_block] || self[:limit]
|
297
|
-
end
|
298
|
-
|
299
|
-
# The expression to use for the additional conditions to be added for
|
300
|
-
# the filter by association support, when the association itself is
|
301
|
-
# filtered. Works by using a subquery to test that the objects passed
|
302
|
-
# also meet the association filter criteria.
|
303
|
-
def filter_by_associations_conditions_expression(obj)
|
304
|
-
ds = filter_by_associations_conditions_dataset.where(filter_by_associations_conditions_subquery_conditions(obj))
|
305
|
-
{filter_by_associations_conditions_key=>ds}
|
306
|
-
end
|
307
|
-
|
308
|
-
# Whether to handle silent modification failure when adding/removing
|
309
|
-
# associated records, false by default.
|
310
|
-
def handle_silent_modification_failure?
|
311
|
-
false
|
312
|
-
end
|
313
|
-
|
314
|
-
# Initialize the associations cache for the current association for the given objects.
|
315
|
-
def initialize_association_cache(objects)
|
316
|
-
name = self[:name]
|
317
|
-
if assign_singular?
|
318
|
-
objects.each{|object| object.associations[name] = nil}
|
319
|
-
else
|
320
|
-
objects.each{|object| object.associations[name] = []}
|
321
|
-
end
|
322
|
-
end
|
323
|
-
|
324
|
-
# The limit and offset for this association (returned as a two element array).
|
325
|
-
def limit_and_offset
|
326
|
-
if (v = self[:limit]).is_a?(Array)
|
327
|
-
v
|
328
|
-
else
|
329
|
-
[v, nil]
|
330
|
-
end
|
331
|
-
end
|
332
|
-
|
333
|
-
# Whether the associated object needs a primary key to be added/removed,
|
334
|
-
# false by default.
|
335
|
-
def need_associated_primary_key?
|
336
|
-
false
|
337
|
-
end
|
338
|
-
|
339
|
-
# A placeholder literalizer that can be used to lazily load the association. If
|
340
|
-
# one can't be used, returns nil.
|
341
|
-
def placeholder_loader
|
342
|
-
if use_placeholder_loader?
|
343
|
-
cached_fetch(:placeholder_loader) do
|
344
|
-
Sequel::Dataset::PlaceholderLiteralizer.loader(associated_dataset) do |pl, ds|
|
345
|
-
ds.where(*predicate_keys.map{|k| SQL::BooleanExpression.new(:'=', k, pl.arg)})
|
346
|
-
end
|
347
|
-
end
|
348
|
-
end
|
349
|
-
end
|
350
|
-
|
351
|
-
# The keys to use for loading of the regular dataset, as an array.
|
352
|
-
def predicate_keys
|
353
|
-
cached_fetch(:predicate_keys){Array(predicate_key)}
|
354
|
-
end
|
355
|
-
|
356
|
-
# The values that predicate_keys should match for objects to be associated.
|
357
|
-
def predicate_key_values(object)
|
358
|
-
predicate_key_methods.map{|k| object.send(k)}
|
359
|
-
end
|
360
|
-
|
361
|
-
# Qualify +col+ with the given table name. If +col+ is an array of columns,
|
362
|
-
# return an array of qualified columns. Only qualifies Symbols and SQL::Identifier
|
363
|
-
# values, other values are not modified.
|
364
|
-
def qualify(table, col)
|
365
|
-
transform(col) do |k|
|
366
|
-
case k
|
367
|
-
when Symbol, SQL::Identifier
|
368
|
-
SQL::QualifiedIdentifier.new(table, k)
|
369
|
-
else
|
370
|
-
Sequel::Qualifier.new(self[:model].dataset, table).transform(k)
|
371
|
-
end
|
372
|
-
end
|
373
|
-
end
|
374
|
-
|
375
|
-
# Qualify col with the associated model's table name.
|
376
|
-
def qualify_assoc(col)
|
377
|
-
qualify(associated_class.table_name, col)
|
378
|
-
end
|
379
|
-
|
380
|
-
# Qualify col with the current model's table name.
|
381
|
-
def qualify_cur(col)
|
382
|
-
qualify(self[:model].table_name, col)
|
383
|
-
end
|
384
|
-
|
385
|
-
# Returns the reciprocal association variable, if one exists. The reciprocal
|
386
|
-
# association is the association in the associated class that is the opposite
|
387
|
-
# of the current association. For example, Album.many_to_one :artist and
|
388
|
-
# Artist.one_to_many :albums are reciprocal associations. This information is
|
389
|
-
# to populate reciprocal associations. For example, when you do this_artist.add_album(album)
|
390
|
-
# it sets album.artist to this_artist.
|
391
|
-
def reciprocal
|
392
|
-
cached_fetch(:reciprocal) do
|
393
|
-
possible_recips = []
|
394
|
-
|
395
|
-
associated_class.all_association_reflections.each do |assoc_reflect|
|
396
|
-
if reciprocal_association?(assoc_reflect)
|
397
|
-
possible_recips << assoc_reflect
|
398
|
-
end
|
399
|
-
end
|
400
|
-
|
401
|
-
if possible_recips.length == 1
|
402
|
-
cached_set(:reciprocal_type, possible_recips.first[:type]) if ambiguous_reciprocal_type?
|
403
|
-
possible_recips.first[:name]
|
404
|
-
end
|
405
|
-
end
|
406
|
-
end
|
407
|
-
|
408
|
-
# Whether the reciprocal of this association returns an array of objects instead of a single object,
|
409
|
-
# true by default.
|
410
|
-
def reciprocal_array?
|
411
|
-
true
|
412
|
-
end
|
413
|
-
|
414
|
-
# Name symbol for the remove_all_ association method
|
415
|
-
def remove_all_method
|
416
|
-
:"remove_all_#{self[:name]}"
|
417
|
-
end
|
418
|
-
|
419
|
-
# Whether associated objects need to be removed from the association before
|
420
|
-
# being destroyed in order to preserve referential integrity.
|
421
|
-
def remove_before_destroy?
|
422
|
-
true
|
423
|
-
end
|
424
|
-
|
425
|
-
# Name symbol for the remove_ association method
|
426
|
-
def remove_method
|
427
|
-
:"remove_#{singularize(self[:name])}"
|
428
|
-
end
|
429
|
-
|
430
|
-
# Whether to check that an object to be disassociated is already associated to this object, false by default.
|
431
|
-
def remove_should_check_existing?
|
432
|
-
false
|
433
|
-
end
|
434
|
-
|
435
|
-
# Whether this association returns an array of objects instead of a single object,
|
436
|
-
# true by default.
|
437
|
-
def returns_array?
|
438
|
-
true
|
439
|
-
end
|
440
|
-
|
441
|
-
# The columns to select when loading the association.
|
442
|
-
def select
|
443
|
-
self[:select]
|
444
|
-
end
|
445
|
-
|
446
|
-
# Whether to set the reciprocal association to self when loading associated
|
447
|
-
# records, false by default.
|
448
|
-
def set_reciprocal_to_self?
|
449
|
-
false
|
450
|
-
end
|
451
|
-
|
452
|
-
# Name symbol for the setter association method
|
453
|
-
def setter_method
|
454
|
-
:"#{self[:name]}="
|
455
|
-
end
|
456
|
-
|
457
|
-
# The range used for slicing when using the :ruby eager limit strategy.
|
458
|
-
def slice_range
|
459
|
-
limit, offset = limit_and_offset
|
460
|
-
if limit || offset
|
461
|
-
(offset||0)..(limit ? (offset||0)+limit-1 : -1)
|
462
|
-
end
|
463
|
-
end
|
464
|
-
|
465
|
-
private
|
466
|
-
|
467
|
-
if defined?(RUBY_ENGINE) && RUBY_ENGINE != 'ruby'
|
468
|
-
# :nocov:
|
469
|
-
# On non-GVL rubies, assume the need to synchronize access. Store the key
|
470
|
-
# in a special sub-hash that always uses this method to synchronize access.
|
471
|
-
def cached_fetch(key)
|
472
|
-
fetch(key) do
|
473
|
-
return yield unless h = self[:cache]
|
474
|
-
Sequel.synchronize{return h[key] if h.has_key?(key)}
|
475
|
-
value = yield
|
476
|
-
Sequel.synchronize{h[key] = value}
|
477
|
-
end
|
478
|
-
end
|
479
|
-
|
480
|
-
# Cache the value at the given key, synchronizing access.
|
481
|
-
def cached_set(key, value)
|
482
|
-
return unless h = self[:cache]
|
483
|
-
Sequel.synchronize{h[key] = value}
|
484
|
-
end
|
485
|
-
# :nocov:
|
486
|
-
else
|
487
|
-
# On MRI, use a plain fetch, since the GVL will synchronize access.
|
488
|
-
def cached_fetch(key)
|
489
|
-
fetch(key) do
|
490
|
-
return yield unless h = self[:cache]
|
491
|
-
h.fetch(key){h[key] = yield}
|
492
|
-
end
|
493
|
-
end
|
494
|
-
|
495
|
-
# On MRI, just set the value at the key in the cache, since the GVL
|
496
|
-
# will synchronize access.
|
497
|
-
def cached_set(key, value)
|
498
|
-
return unless h = self[:cache]
|
499
|
-
h[key] = value
|
500
|
-
end
|
501
|
-
end
|
502
|
-
|
503
|
-
# The base dataset used for the association, before any order/conditions
|
504
|
-
# options have been applied.
|
505
|
-
def _associated_dataset
|
506
|
-
associated_class.dataset.clone
|
507
|
-
end
|
508
|
-
|
509
|
-
# Whether for the reciprocal type for the given association can not be
|
510
|
-
# known in advantage, false by default.
|
511
|
-
def ambiguous_reciprocal_type?
|
512
|
-
false
|
513
|
-
end
|
514
|
-
|
515
|
-
# Apply a limit strategy to the given dataset so that filter by
|
516
|
-
# associations works with a limited dataset.
|
517
|
-
def apply_filter_by_associations_limit_strategy(ds)
|
518
|
-
case filter_by_associations_limit_strategy
|
519
|
-
when :distinct_on
|
520
|
-
apply_filter_by_associations_distinct_on_limit_strategy(ds)
|
521
|
-
when :window_function
|
522
|
-
apply_filter_by_associations_window_function_limit_strategy(ds)
|
523
|
-
else
|
524
|
-
ds
|
525
|
-
end
|
526
|
-
end
|
527
|
-
|
528
|
-
# Apply a distinct on eager limit strategy using IN with a subquery
|
529
|
-
# that uses DISTINCT ON to ensure only the first matching record for
|
530
|
-
# each key is included.
|
531
|
-
def apply_filter_by_associations_distinct_on_limit_strategy(ds)
|
532
|
-
k = filter_by_associations_limit_key
|
533
|
-
ds.where(k=>apply_distinct_on_eager_limit_strategy(associated_eager_dataset.select(*k)))
|
534
|
-
end
|
535
|
-
|
536
|
-
# Apply a distinct on eager limit strategy using IN with a subquery
|
537
|
-
# that uses a filter on the row_number window function to ensure
|
538
|
-
# that only rows inside the limit are returned.
|
539
|
-
def apply_filter_by_associations_window_function_limit_strategy(ds)
|
540
|
-
ds.where(filter_by_associations_limit_key=>apply_window_function_eager_limit_strategy(associated_eager_dataset.select(*filter_by_associations_limit_alias_key)).select(*filter_by_associations_limit_aliases))
|
541
|
-
end
|
542
|
-
|
543
|
-
# The associated_dataset with the eager_block callback already applied.
|
544
|
-
def associated_eager_dataset
|
545
|
-
cached_fetch(:associated_eager_dataset) do
|
546
|
-
ds = associated_dataset.unlimited
|
547
|
-
if block = self[:eager_block]
|
548
|
-
ds = block.call(ds)
|
549
|
-
end
|
550
|
-
ds
|
551
|
-
end
|
552
|
-
end
|
553
|
-
|
554
|
-
# The dataset to use for eager loading associated objects for multiple current objects,
|
555
|
-
# given the hash passed to the eager loader.
|
556
|
-
def eager_loading_dataset(eo=OPTS)
|
557
|
-
ds = eo[:dataset] || associated_eager_dataset
|
558
|
-
if id_map = eo[:id_map]
|
559
|
-
ds = ds.where(eager_loading_predicate_condition(id_map.keys))
|
560
|
-
end
|
561
|
-
if associations = eo[:associations]
|
562
|
-
ds = ds.eager(associations)
|
563
|
-
end
|
564
|
-
if block = eo[:eager_block]
|
565
|
-
ds = block.call(ds)
|
566
|
-
end
|
567
|
-
if eager_loading_use_associated_key?
|
568
|
-
ds = ds.select_append(*associated_key_array)
|
569
|
-
end
|
570
|
-
if self[:eager_graph]
|
571
|
-
raise(Error, "cannot eagerly load a #{self[:type]} association that uses :eager_graph") if eager_loading_use_associated_key?
|
572
|
-
ds = ds.eager_graph(self[:eager_graph])
|
573
|
-
end
|
574
|
-
ds
|
575
|
-
end
|
576
|
-
|
577
|
-
# The default eager limit strategy to use for this association
|
578
|
-
def default_eager_limit_strategy
|
579
|
-
self[:model].default_eager_limit_strategy || :ruby
|
580
|
-
end
|
581
|
-
|
582
|
-
# The predicate condition to use for the eager_loader.
|
583
|
-
def eager_loading_predicate_condition(keys)
|
584
|
-
{predicate_key=>keys}
|
585
|
-
end
|
586
|
-
|
587
|
-
# Add conditions to the dataset to not include NULL values for
|
588
|
-
# the associated keys, and select those keys.
|
589
|
-
def filter_by_associations_add_conditions_dataset_filter(ds)
|
590
|
-
k = filter_by_associations_conditions_associated_keys
|
591
|
-
ds.select(*k).where(Sequel.negate(k.zip([])))
|
592
|
-
end
|
593
|
-
|
594
|
-
# The conditions to add to the filter by associations conditions
|
595
|
-
# subquery to restrict it to to the object(s) that was used as the
|
596
|
-
# filter value.
|
597
|
-
def filter_by_associations_conditions_subquery_conditions(obj)
|
598
|
-
key = qualify(associated_class.table_name, associated_class.primary_key)
|
599
|
-
case obj
|
600
|
-
when Array
|
601
|
-
{key=>obj.map{|o| o.pk}}
|
602
|
-
when Sequel::Dataset
|
603
|
-
{key=>obj.select(*Array(qualify(associated_class.table_name, associated_class.primary_key)))}
|
604
|
-
else
|
605
|
-
Array(key).zip(Array(obj.pk))
|
606
|
-
end
|
607
|
-
end
|
608
|
-
|
609
|
-
# The base dataset to use for the filter by associations conditions
|
610
|
-
# subquery, regardless of the objects that are passed in as filter
|
611
|
-
# values.
|
612
|
-
def filter_by_associations_conditions_dataset
|
613
|
-
cached_fetch(:filter_by_associations_conditions_dataset) do
|
614
|
-
ds = associated_eager_dataset.unordered
|
615
|
-
ds = filter_by_associations_add_conditions_dataset_filter(ds)
|
616
|
-
ds = apply_filter_by_associations_limit_strategy(ds)
|
617
|
-
ds
|
618
|
-
end
|
619
|
-
end
|
620
|
-
|
621
|
-
# The strategy to use to filter by a limited association
|
622
|
-
def filter_by_associations_limit_strategy
|
623
|
-
v = fetch(:filter_limit_strategy, self[:eager_limit_strategy])
|
624
|
-
if v || self[:limit] || !returns_array?
|
625
|
-
case v ||= self[:model].default_eager_limit_strategy
|
626
|
-
when :union, :ruby
|
627
|
-
# Can't use a union or ruby-based strategy for filtering by associations, switch to default eager graph limit
|
628
|
-
# strategy.
|
629
|
-
true_eager_graph_limit_strategy
|
630
|
-
when Symbol
|
631
|
-
v
|
632
|
-
when true
|
633
|
-
true_eager_graph_limit_strategy
|
634
|
-
end
|
635
|
-
end
|
636
|
-
end
|
637
|
-
|
638
|
-
# Whether to limit the associated dataset to a single row.
|
639
|
-
def limit_to_single_row?
|
640
|
-
!returns_array?
|
641
|
-
end
|
642
|
-
|
643
|
-
# Any offset to use for this association (or nil if there is no offset).
|
644
|
-
def offset
|
645
|
-
limit_and_offset.last
|
646
|
-
end
|
647
|
-
|
648
|
-
# A placeholder literalizer used to speed up eager loading.
|
649
|
-
def placeholder_eager_loader
|
650
|
-
cached_fetch(:placeholder_eager_loader) do
|
651
|
-
Sequel::Dataset::PlaceholderLiteralizer.loader(associated_dataset) do |pl, ds|
|
652
|
-
apply_eager_limit_strategy(eager_loading_dataset.where(predicate_key=>pl.arg), eager_limit_strategy)
|
653
|
-
end
|
654
|
-
end
|
655
|
-
end
|
656
|
-
|
657
|
-
# The reciprocal type as an array, should be overridden in reflection subclasses that
|
658
|
-
# have ambiguous reciprocal types.
|
659
|
-
def possible_reciprocal_types
|
660
|
-
[reciprocal_type]
|
661
|
-
end
|
662
|
-
|
663
|
-
# Whether the given association reflection is possible reciprocal
|
664
|
-
# association for the current association reflection.
|
665
|
-
def reciprocal_association?(assoc_reflect)
|
666
|
-
possible_reciprocal_types.include?(assoc_reflect[:type]) &&
|
667
|
-
(begin; assoc_reflect.associated_class; rescue NameError; end) == self[:model] &&
|
668
|
-
assoc_reflect[:conditions].nil? &&
|
669
|
-
assoc_reflect[:block].nil?
|
670
|
-
end
|
671
|
-
|
672
|
-
# The number of subqueries to use in each union query, used to eagerly load
|
673
|
-
# limited associations. Defaults to 40, the optimal number depends on the
|
674
|
-
# latency between the database and the application.
|
675
|
-
def subqueries_per_union
|
676
|
-
self[:subqueries_per_union] || 40
|
677
|
-
end
|
678
|
-
|
679
|
-
# If +s+ is an array, map +s+ over the block. Otherwise, just call the
|
680
|
-
# block with +s+.
|
681
|
-
def transform(s)
|
682
|
-
s.is_a?(Array) ? s.map(&Proc.new) : (yield s)
|
683
|
-
end
|
684
|
-
|
685
|
-
# What eager limit strategy should be used when true is given as the value,
|
686
|
-
# defaults to UNION as that is the fastest strategy if the appropriate keys are indexed.
|
687
|
-
def true_eager_limit_strategy
|
688
|
-
if self[:eager_graph] || (offset && !associated_dataset.supports_offsets_in_correlated_subqueries?)
|
689
|
-
# An SQL-based approach won't work if you are also eager graphing,
|
690
|
-
# so use a ruby based approach in that case.
|
691
|
-
:ruby
|
692
|
-
else
|
693
|
-
:union
|
694
|
-
end
|
695
|
-
end
|
696
|
-
|
697
|
-
# The eager_graph limit strategy used when true is given as the value, choosing the
|
698
|
-
# best strategy based on what the database supports.
|
699
|
-
def true_eager_graph_limit_strategy
|
700
|
-
if associated_class.dataset.supports_window_functions?
|
701
|
-
:window_function
|
702
|
-
else
|
703
|
-
:ruby
|
704
|
-
end
|
705
|
-
end
|
706
|
-
|
707
|
-
# A placeholder literalizer used to speed up the creation of union queries when eager
|
708
|
-
# loading a limited association.
|
709
|
-
def union_eager_loader
|
710
|
-
cached_fetch(:union_eager_loader) do
|
711
|
-
Sequel::Dataset::PlaceholderLiteralizer.loader(associated_dataset) do |pl, ds|
|
712
|
-
ds = self[:eager_block].call(ds) if self[:eager_block]
|
713
|
-
keys = predicate_keys
|
714
|
-
ds = ds.where(keys.map{pl.arg}.zip(keys))
|
715
|
-
if eager_loading_use_associated_key?
|
716
|
-
ds = ds.select_append(*associated_key_array)
|
717
|
-
end
|
718
|
-
ds.from_self
|
719
|
-
end
|
720
|
-
end
|
721
|
-
end
|
722
|
-
|
723
|
-
# Whether the placeholder loader can be used to load the association.
|
724
|
-
def use_placeholder_loader?
|
725
|
-
!self[:instance_specific] && !self[:eager_graph]
|
726
|
-
end
|
727
|
-
end
|
728
|
-
|
729
|
-
class ManyToOneAssociationReflection < AssociationReflection
|
730
|
-
ASSOCIATION_TYPES[:many_to_one] = self
|
731
|
-
|
732
|
-
# many_to_one associations can only have associated objects if none of
|
733
|
-
# the :keys options have a nil value.
|
734
|
-
def can_have_associated_objects?(obj)
|
735
|
-
!self[:keys].any?{|k| obj.send(k).nil?}
|
736
|
-
end
|
737
|
-
|
738
|
-
# Whether the dataset needs a primary key to function, false for many_to_one associations.
|
739
|
-
def dataset_need_primary_key?
|
740
|
-
false
|
741
|
-
end
|
742
|
-
|
743
|
-
# Default foreign key name symbol for foreign key in current model's table that points to
|
744
|
-
# the given association's table's primary key.
|
745
|
-
def default_key
|
746
|
-
:"#{self[:name]}_id"
|
747
|
-
end
|
748
|
-
|
749
|
-
# Whether to eagerly graph a lazy dataset, true for many_to_one associations
|
750
|
-
# only if the key is nil.
|
751
|
-
def eager_graph_lazy_dataset?
|
752
|
-
self[:key].nil?
|
753
|
-
end
|
754
|
-
|
755
|
-
# many_to_one associations don't need an eager_graph limit strategy
|
756
|
-
def eager_graph_limit_strategy(_)
|
757
|
-
nil
|
758
|
-
end
|
759
|
-
|
760
|
-
# many_to_one associations don't need an eager limit strategy
|
761
|
-
def eager_limit_strategy
|
762
|
-
nil
|
763
|
-
end
|
764
|
-
|
765
|
-
# many_to_one associations don't need a filter by associations limit strategy
|
766
|
-
def filter_by_associations_limit_strategy
|
767
|
-
nil
|
768
|
-
end
|
769
|
-
|
770
|
-
# The expression to use on the left hand side of the IN lookup when eager loading
|
771
|
-
def predicate_key
|
772
|
-
cached_fetch(:predicate_key){qualified_primary_key}
|
773
|
-
end
|
774
|
-
|
775
|
-
# The column(s) in the associated table that the key in the current table references (either a symbol or an array).
|
776
|
-
def primary_key
|
777
|
-
cached_fetch(:primary_key){associated_class.primary_key || raise(Error, "no primary key specified for #{associated_class.inspect}")}
|
778
|
-
end
|
779
|
-
|
780
|
-
# The columns in the associated table that the key in the current table references (always an array).
|
781
|
-
def primary_keys
|
782
|
-
cached_fetch(:primary_keys){Array(primary_key)}
|
783
|
-
end
|
784
|
-
alias associated_object_keys primary_keys
|
785
|
-
|
786
|
-
# The method symbol or array of method symbols to call on the associated object
|
787
|
-
# to get the value to use for the foreign keys.
|
788
|
-
def primary_key_method
|
789
|
-
cached_fetch(:primary_key_method){primary_key}
|
790
|
-
end
|
791
|
-
|
792
|
-
# The array of method symbols to call on the associated object
|
793
|
-
# to get the value to use for the foreign keys.
|
794
|
-
def primary_key_methods
|
795
|
-
cached_fetch(:primary_key_methods){Array(primary_key_method)}
|
796
|
-
end
|
797
|
-
|
798
|
-
# #primary_key qualified by the associated table
|
799
|
-
def qualified_primary_key
|
800
|
-
cached_fetch(:qualified_primary_key){self[:qualify] == false ? primary_key : qualify_assoc(primary_key)}
|
801
|
-
end
|
802
|
-
|
803
|
-
# True only if the reciprocal is a one_to_many association.
|
804
|
-
def reciprocal_array?
|
805
|
-
!set_reciprocal_to_self?
|
806
|
-
end
|
807
|
-
|
808
|
-
# Whether this association returns an array of objects instead of a single object,
|
809
|
-
# false for a many_to_one association.
|
810
|
-
def returns_array?
|
811
|
-
false
|
812
|
-
end
|
813
|
-
|
814
|
-
# True only if the reciprocal is a one_to_one association.
|
815
|
-
def set_reciprocal_to_self?
|
816
|
-
reciprocal
|
817
|
-
reciprocal_type == :one_to_one
|
818
|
-
end
|
819
|
-
|
820
|
-
private
|
821
|
-
|
822
|
-
# Reciprocals of many_to_one associations could be either one_to_many or one_to_one,
|
823
|
-
# and which is not known in advance.
|
824
|
-
def ambiguous_reciprocal_type?
|
825
|
-
true
|
826
|
-
end
|
827
|
-
|
828
|
-
def filter_by_associations_conditions_associated_keys
|
829
|
-
qualify(associated_class.table_name, primary_keys)
|
830
|
-
end
|
831
|
-
|
832
|
-
def filter_by_associations_conditions_key
|
833
|
-
qualify(self[:model].table_name, self[:key_column])
|
834
|
-
end
|
835
|
-
|
836
|
-
# many_to_one associations do not need to be limited to a single row if they
|
837
|
-
# explicitly do not have a key.
|
838
|
-
def limit_to_single_row?
|
839
|
-
super && self[:key]
|
840
|
-
end
|
841
|
-
|
842
|
-
def predicate_key_methods
|
843
|
-
self[:keys]
|
844
|
-
end
|
845
|
-
|
846
|
-
# The reciprocal type of a many_to_one association is either
|
847
|
-
# a one_to_many or a one_to_one association.
|
848
|
-
def possible_reciprocal_types
|
849
|
-
[:one_to_many, :one_to_one]
|
850
|
-
end
|
851
|
-
|
852
|
-
# Whether the given association reflection is possible reciprocal
|
853
|
-
def reciprocal_association?(assoc_reflect)
|
854
|
-
super && self[:keys] == assoc_reflect[:keys] && primary_key == assoc_reflect.primary_key
|
855
|
-
end
|
856
|
-
|
857
|
-
# The reciprocal type of a many_to_one association is either
|
858
|
-
# a one_to_many or a one_to_one association, look in the associated class
|
859
|
-
# to try to figure out which.
|
860
|
-
def reciprocal_type
|
861
|
-
cached_fetch(:reciprocal_type) do
|
862
|
-
possible_recips = []
|
863
|
-
|
864
|
-
associated_class.all_association_reflections.each do |assoc_reflect|
|
865
|
-
if reciprocal_association?(assoc_reflect)
|
866
|
-
possible_recips << assoc_reflect
|
867
|
-
end
|
868
|
-
end
|
869
|
-
|
870
|
-
if possible_recips.length == 1
|
871
|
-
possible_recips.first[:type]
|
872
|
-
else
|
873
|
-
possible_reciprocal_types
|
874
|
-
end
|
875
|
-
end
|
876
|
-
end
|
877
|
-
end
|
878
|
-
|
879
|
-
class OneToManyAssociationReflection < AssociationReflection
|
880
|
-
ASSOCIATION_TYPES[:one_to_many] = self
|
881
|
-
|
882
|
-
# Support a correlated subquery limit strategy when using eager_graph.
|
883
|
-
def apply_eager_graph_limit_strategy(strategy, ds)
|
884
|
-
case strategy
|
885
|
-
when :correlated_subquery
|
886
|
-
apply_correlated_subquery_limit_strategy(ds)
|
887
|
-
else
|
888
|
-
super
|
889
|
-
end
|
890
|
-
end
|
891
|
-
|
892
|
-
# The keys in the associated model's table related to this association
|
893
|
-
def associated_object_keys
|
894
|
-
self[:keys]
|
895
|
-
end
|
896
|
-
|
897
|
-
# one_to_many associations can only have associated objects if none of
|
898
|
-
# the :keys options have a nil value.
|
899
|
-
def can_have_associated_objects?(obj)
|
900
|
-
!self[:primary_keys].any?{|k| obj.send(k).nil?}
|
901
|
-
end
|
902
|
-
|
903
|
-
# one_to_many and one_to_one associations can be clones
|
904
|
-
def cloneable?(ref)
|
905
|
-
ref[:type] == :one_to_many || ref[:type] == :one_to_one
|
906
|
-
end
|
907
|
-
|
908
|
-
# Default foreign key name symbol for key in associated table that points to
|
909
|
-
# current table's primary key.
|
910
|
-
def default_key
|
911
|
-
:"#{underscore(demodulize(self[:model].name))}_id"
|
912
|
-
end
|
913
|
-
|
914
|
-
# Handle silent failure of add/remove methods if raise_on_save_failure is false.
|
915
|
-
def handle_silent_modification_failure?
|
916
|
-
self[:raise_on_save_failure] == false
|
917
|
-
end
|
918
|
-
|
919
|
-
# The hash key to use for the eager loading predicate (left side of IN (1, 2, 3))
|
920
|
-
def predicate_key
|
921
|
-
cached_fetch(:predicate_key){qualify_assoc(self[:key])}
|
922
|
-
end
|
923
|
-
alias qualified_key predicate_key
|
924
|
-
|
925
|
-
# The column in the current table that the key in the associated table references.
|
926
|
-
def primary_key
|
927
|
-
self[:primary_key]
|
928
|
-
end
|
929
|
-
|
930
|
-
# #primary_key qualified by the current table
|
931
|
-
def qualified_primary_key
|
932
|
-
cached_fetch(:qualified_primary_key){qualify_cur(primary_key)}
|
933
|
-
end
|
934
|
-
|
935
|
-
# Whether the reciprocal of this association returns an array of objects instead of a single object,
|
936
|
-
# false for a one_to_many association.
|
937
|
-
def reciprocal_array?
|
938
|
-
false
|
939
|
-
end
|
940
|
-
|
941
|
-
# Destroying one_to_many associated objects automatically deletes the foreign key.
|
942
|
-
def remove_before_destroy?
|
943
|
-
false
|
944
|
-
end
|
945
|
-
|
946
|
-
# The one_to_many association needs to check that an object to be removed already is associated.
|
947
|
-
def remove_should_check_existing?
|
948
|
-
true
|
949
|
-
end
|
950
|
-
|
951
|
-
# One to many associations set the reciprocal to self when loading associated records.
|
952
|
-
def set_reciprocal_to_self?
|
953
|
-
true
|
954
|
-
end
|
955
|
-
|
956
|
-
private
|
957
|
-
|
958
|
-
# Use a correlated subquery to limit the dataset. Note that this will not
|
959
|
-
# work correctly if the associated dataset uses qualified identifers in the WHERE clause,
|
960
|
-
# as they would reference the containing query instead of the subquery.
|
961
|
-
def apply_correlated_subquery_limit_strategy(ds)
|
962
|
-
table = ds.first_source_table
|
963
|
-
table_alias = ds.first_source_alias
|
964
|
-
primary_key = associated_class.primary_key
|
965
|
-
key = self[:key]
|
966
|
-
cs_alias = :t1
|
967
|
-
cs = associated_dataset.
|
968
|
-
from(Sequel.as(table, :t1)).
|
969
|
-
select(*qualify(cs_alias, primary_key)).
|
970
|
-
where(Array(qualify(cs_alias, key)).zip(Array(qualify(table_alias, key)))).
|
971
|
-
limit(*limit_and_offset)
|
972
|
-
ds.where(qualify(table_alias, primary_key)=>cs)
|
973
|
-
end
|
974
|
-
|
975
|
-
# Support correlated subquery strategy when filtering by limited associations.
|
976
|
-
def apply_filter_by_associations_limit_strategy(ds)
|
977
|
-
case filter_by_associations_limit_strategy
|
978
|
-
when :correlated_subquery
|
979
|
-
apply_correlated_subquery_limit_strategy(ds)
|
980
|
-
else
|
981
|
-
super
|
982
|
-
end
|
983
|
-
end
|
984
|
-
|
985
|
-
def filter_by_associations_conditions_associated_keys
|
986
|
-
qualify(associated_class.table_name, self[:keys])
|
987
|
-
end
|
988
|
-
|
989
|
-
def filter_by_associations_conditions_key
|
990
|
-
qualify(self[:model].table_name, self[:primary_key_column])
|
991
|
-
end
|
992
|
-
|
993
|
-
def filter_by_associations_limit_alias_key
|
994
|
-
Array(filter_by_associations_limit_key)
|
995
|
-
end
|
996
|
-
|
997
|
-
def filter_by_associations_limit_aliases
|
998
|
-
filter_by_associations_limit_alias_key.map{|v| v.column}
|
999
|
-
end
|
1000
|
-
|
1001
|
-
def filter_by_associations_limit_key
|
1002
|
-
qualify(associated_class.table_name, associated_class.primary_key)
|
1003
|
-
end
|
1004
|
-
|
1005
|
-
def predicate_key_methods
|
1006
|
-
self[:primary_keys]
|
1007
|
-
end
|
1008
|
-
|
1009
|
-
def reciprocal_association?(assoc_reflect)
|
1010
|
-
super && self[:keys] == assoc_reflect[:keys] && primary_key == assoc_reflect.primary_key
|
1011
|
-
end
|
1012
|
-
|
1013
|
-
# The reciprocal type of a one_to_many association is a many_to_one association.
|
1014
|
-
def reciprocal_type
|
1015
|
-
:many_to_one
|
1016
|
-
end
|
1017
|
-
|
1018
|
-
# Support automatic use of correlated subqueries if :ruby option is best available option,
|
1019
|
-
# MySQL is not being used, and either the associated class has a non-composite primary key
|
1020
|
-
# or the database supports multiple columns in IN.
|
1021
|
-
def true_eager_graph_limit_strategy
|
1022
|
-
r = super
|
1023
|
-
ds = associated_dataset
|
1024
|
-
if r == :ruby && ds.supports_limits_in_correlated_subqueries? && (Array(associated_class.primary_key).length == 1 || ds.supports_multiple_column_in?) && (!offset || ds.supports_offsets_in_correlated_subqueries?)
|
1025
|
-
:correlated_subquery
|
1026
|
-
else
|
1027
|
-
r
|
1028
|
-
end
|
1029
|
-
end
|
1030
|
-
end
|
1031
|
-
|
1032
|
-
# Methods that turn an association that returns multiple objects into an association that
|
1033
|
-
# returns a single object.
|
1034
|
-
module SingularAssociationReflection
|
1035
|
-
# Singular associations do not assign singular if they are using the ruby eager limit strategy
|
1036
|
-
# and have a slice range, since they need to store the array of associated objects in order to
|
1037
|
-
# pick the correct one with an offset.
|
1038
|
-
def assign_singular?
|
1039
|
-
super && (eager_limit_strategy != :ruby || !slice_range)
|
1040
|
-
end
|
1041
|
-
|
1042
|
-
# Add conditions when filtering by singular associations with orders, since the
|
1043
|
-
# underlying relationship is probably not one-to-one.
|
1044
|
-
def filter_by_associations_add_conditions?
|
1045
|
-
super || self[:order] || self[:eager_limit_strategy] || self[:filter_limit_strategy]
|
1046
|
-
end
|
1047
|
-
|
1048
|
-
# Make sure singular associations always have 1 as the limit
|
1049
|
-
def limit_and_offset
|
1050
|
-
r = super
|
1051
|
-
if r.first == 1
|
1052
|
-
r
|
1053
|
-
else
|
1054
|
-
[1, r[1]]
|
1055
|
-
end
|
1056
|
-
end
|
1057
|
-
|
1058
|
-
# Singular associations always return a single object, not an array.
|
1059
|
-
def returns_array?
|
1060
|
-
false
|
1061
|
-
end
|
1062
|
-
|
1063
|
-
private
|
1064
|
-
|
1065
|
-
# Only use a eager limit strategy by default if there is an offset or an order.
|
1066
|
-
def default_eager_limit_strategy
|
1067
|
-
super if self[:order] || offset
|
1068
|
-
end
|
1069
|
-
|
1070
|
-
# Use a strategy for filtering by associations if there is an order or an offset,
|
1071
|
-
# or a specific limiting strategy has been specified.
|
1072
|
-
def filter_by_associations_limit_strategy
|
1073
|
-
super if self[:order] || offset || self[:eager_limit_strategy] || self[:filter_limit_strategy]
|
1074
|
-
end
|
1075
|
-
|
1076
|
-
# Use the DISTINCT ON eager limit strategy for true if the database supports it.
|
1077
|
-
def true_eager_graph_limit_strategy
|
1078
|
-
if associated_class.dataset.supports_ordered_distinct_on? && !offset
|
1079
|
-
:distinct_on
|
1080
|
-
else
|
1081
|
-
super
|
1082
|
-
end
|
1083
|
-
end
|
1084
|
-
end
|
1085
|
-
|
1086
|
-
class OneToOneAssociationReflection < OneToManyAssociationReflection
|
1087
|
-
ASSOCIATION_TYPES[:one_to_one] = self
|
1088
|
-
include SingularAssociationReflection
|
1089
|
-
end
|
1090
|
-
|
1091
|
-
class ManyToManyAssociationReflection < AssociationReflection
|
1092
|
-
ASSOCIATION_TYPES[:many_to_many] = self
|
1093
|
-
|
1094
|
-
# The alias to use for the associated key when eagerly loading
|
1095
|
-
def associated_key_alias
|
1096
|
-
self[:left_key_alias]
|
1097
|
-
end
|
1098
|
-
|
1099
|
-
# Array of associated keys used when eagerly loading.
|
1100
|
-
def associated_key_array
|
1101
|
-
cached_fetch(:associated_key_array) do
|
1102
|
-
if self[:uses_left_composite_keys]
|
1103
|
-
associated_key_alias.zip(predicate_keys).map{|a, k| SQL::AliasedExpression.new(k, a)}
|
1104
|
-
else
|
1105
|
-
[SQL::AliasedExpression.new(predicate_key, associated_key_alias)]
|
1106
|
-
end
|
1107
|
-
end
|
1108
|
-
end
|
1109
|
-
|
1110
|
-
# The column to use for the associated key when eagerly loading
|
1111
|
-
def associated_key_column
|
1112
|
-
self[:left_key]
|
1113
|
-
end
|
1114
|
-
|
1115
|
-
# Alias of right_primary_keys
|
1116
|
-
def associated_object_keys
|
1117
|
-
right_primary_keys
|
1118
|
-
end
|
1119
|
-
|
1120
|
-
# many_to_many associations can only have associated objects if none of
|
1121
|
-
# the :left_primary_keys options have a nil value.
|
1122
|
-
def can_have_associated_objects?(obj)
|
1123
|
-
!self[:left_primary_keys].any?{|k| obj.send(k).nil?}
|
1124
|
-
end
|
1125
|
-
|
1126
|
-
# one_through_one and many_to_many associations can be clones
|
1127
|
-
def cloneable?(ref)
|
1128
|
-
ref[:type] == :many_to_many || ref[:type] == :one_through_one
|
1129
|
-
end
|
1130
|
-
|
1131
|
-
# The default associated key alias(es) to use when eager loading
|
1132
|
-
# associations via eager.
|
1133
|
-
def default_associated_key_alias
|
1134
|
-
self[:uses_left_composite_keys] ? (0...self[:left_keys].length).map{|i| :"x_foreign_key_#{i}_x"} : :x_foreign_key_x
|
1135
|
-
end
|
1136
|
-
|
1137
|
-
# The default eager loader used if the user doesn't override it. Extracted
|
1138
|
-
# to a method so the code can be shared with the many_through_many plugin.
|
1139
|
-
def default_eager_loader(eo)
|
1140
|
-
h = eo[:id_map]
|
1141
|
-
assign_singular = assign_singular?
|
1142
|
-
delete_rn = delete_row_number_column
|
1143
|
-
uses_lcks = self[:uses_left_composite_keys]
|
1144
|
-
left_key_alias = self[:left_key_alias]
|
1145
|
-
name = self[:name]
|
1146
|
-
|
1147
|
-
self[:model].eager_load_results(self, eo) do |assoc_record|
|
1148
|
-
assoc_record.values.delete(delete_rn) if delete_rn
|
1149
|
-
hash_key = if uses_lcks
|
1150
|
-
left_key_alias.map{|k| assoc_record.values.delete(k)}
|
1151
|
-
else
|
1152
|
-
assoc_record.values.delete(left_key_alias)
|
1153
|
-
end
|
1154
|
-
next unless objects = h[hash_key]
|
1155
|
-
if assign_singular
|
1156
|
-
objects.each do |object|
|
1157
|
-
object.associations[name] ||= assoc_record
|
1158
|
-
end
|
1159
|
-
else
|
1160
|
-
objects.each do |object|
|
1161
|
-
object.associations[name].push(assoc_record)
|
1162
|
-
end
|
1163
|
-
end
|
1164
|
-
end
|
1165
|
-
end
|
1166
|
-
|
1167
|
-
# Default name symbol for the join table.
|
1168
|
-
def default_join_table
|
1169
|
-
[self[:class_name], self[:model].name].map{|i| underscore(pluralize(demodulize(i)))}.sort.join('_').to_sym
|
1170
|
-
end
|
1171
|
-
|
1172
|
-
# Default foreign key name symbol for key in join table that points to
|
1173
|
-
# current table's primary key (or :left_primary_key column).
|
1174
|
-
def default_left_key
|
1175
|
-
:"#{underscore(demodulize(self[:model].name))}_id"
|
1176
|
-
end
|
1177
|
-
|
1178
|
-
# Default foreign key name symbol for foreign key in join table that points to
|
1179
|
-
# the association's table's primary key (or :right_primary_key column).
|
1180
|
-
def default_right_key
|
1181
|
-
:"#{singularize(self[:name])}_id"
|
1182
|
-
end
|
1183
|
-
|
1184
|
-
# The hash key to use for the eager loading predicate (left side of IN (1, 2, 3)).
|
1185
|
-
# The left key qualified by the join table.
|
1186
|
-
def predicate_key
|
1187
|
-
cached_fetch(:predicate_key){qualify(join_table_alias, self[:left_key])}
|
1188
|
-
end
|
1189
|
-
alias qualified_left_key predicate_key
|
1190
|
-
|
1191
|
-
# The right key qualified by the join table.
|
1192
|
-
def qualified_right_key
|
1193
|
-
cached_fetch(:qualified_right_key){qualify(join_table_alias, self[:right_key])}
|
1194
|
-
end
|
1195
|
-
|
1196
|
-
# many_to_many associations need to select a key in an associated table to eagerly load
|
1197
|
-
def eager_loading_use_associated_key?
|
1198
|
-
true
|
1199
|
-
end
|
1200
|
-
|
1201
|
-
# The source of the join table. This is the join table itself, unless it
|
1202
|
-
# is aliased, in which case it is the unaliased part.
|
1203
|
-
def join_table_source
|
1204
|
-
cached_fetch(:join_table_source){split_join_table_alias[0]}
|
1205
|
-
end
|
1206
|
-
|
1207
|
-
# The join table itself, unless it is aliased, in which case this
|
1208
|
-
# is the alias.
|
1209
|
-
def join_table_alias
|
1210
|
-
cached_fetch(:join_table_alias) do
|
1211
|
-
s, a = split_join_table_alias
|
1212
|
-
a || s
|
1213
|
-
end
|
1214
|
-
end
|
1215
|
-
alias associated_key_table join_table_alias
|
1216
|
-
|
1217
|
-
# Whether the associated object needs a primary key to be added/removed,
|
1218
|
-
# true for many_to_many associations.
|
1219
|
-
def need_associated_primary_key?
|
1220
|
-
true
|
1221
|
-
end
|
1222
|
-
|
1223
|
-
# #right_primary_key qualified by the associated table
|
1224
|
-
def qualified_right_primary_key
|
1225
|
-
cached_fetch(:qualified_right_primary_key){qualify_assoc(right_primary_key)}
|
1226
|
-
end
|
1227
|
-
|
1228
|
-
# The primary key column(s) to use in the associated table (can be symbol or array).
|
1229
|
-
def right_primary_key
|
1230
|
-
cached_fetch(:right_primary_key){associated_class.primary_key || raise(Error, "no primary key specified for #{associated_class.inspect}")}
|
1231
|
-
end
|
1232
|
-
|
1233
|
-
# The primary key columns to use in the associated table (always array).
|
1234
|
-
def right_primary_keys
|
1235
|
-
cached_fetch(:right_primary_keys){Array(right_primary_key)}
|
1236
|
-
end
|
1237
|
-
|
1238
|
-
# The method symbol or array of method symbols to call on the associated objects
|
1239
|
-
# to get the foreign key values for the join table.
|
1240
|
-
def right_primary_key_method
|
1241
|
-
cached_fetch(:right_primary_key_method){right_primary_key}
|
1242
|
-
end
|
1243
|
-
|
1244
|
-
# The array of method symbols to call on the associated objects
|
1245
|
-
# to get the foreign key values for the join table.
|
1246
|
-
def right_primary_key_methods
|
1247
|
-
cached_fetch(:right_primary_key_methods){Array(right_primary_key_method)}
|
1248
|
-
end
|
1249
|
-
|
1250
|
-
# The columns to select when loading the association, associated_class.table_name.* by default.
|
1251
|
-
def select
|
1252
|
-
cached_fetch(:select){default_select}
|
1253
|
-
end
|
1254
|
-
|
1255
|
-
private
|
1256
|
-
|
1257
|
-
def _associated_dataset
|
1258
|
-
super.inner_join(self[:join_table], self[:right_keys].zip(right_primary_keys), :qualify=>:deep)
|
1259
|
-
end
|
1260
|
-
|
1261
|
-
# The default selection for associations that require joins. These do not use the default
|
1262
|
-
# model selection unless all entries in the select are explicitly qualified identifiers, as
|
1263
|
-
# other it can include unqualified columns which would be made ambiguous by joining.
|
1264
|
-
def default_select
|
1265
|
-
if (sel = associated_class.dataset.opts[:select]) && sel.all?{|c| selection_is_qualified?(c)}
|
1266
|
-
sel
|
1267
|
-
else
|
1268
|
-
Sequel::SQL::ColumnAll.new(associated_class.table_name)
|
1269
|
-
end
|
1270
|
-
end
|
1271
|
-
|
1272
|
-
def filter_by_associations_conditions_associated_keys
|
1273
|
-
qualify(join_table_alias, self[:left_keys])
|
1274
|
-
end
|
1275
|
-
|
1276
|
-
def filter_by_associations_conditions_key
|
1277
|
-
qualify(self[:model].table_name, self[:left_primary_key_column])
|
1278
|
-
end
|
1279
|
-
|
1280
|
-
def filter_by_associations_limit_alias_key
|
1281
|
-
aliaz = 'a'
|
1282
|
-
filter_by_associations_limit_key.map{|c| c.as(Sequel.identifier(aliaz = aliaz.next))}
|
1283
|
-
end
|
1284
|
-
|
1285
|
-
def filter_by_associations_limit_aliases
|
1286
|
-
filter_by_associations_limit_alias_key.map{|v| v.alias}
|
1287
|
-
end
|
1288
|
-
|
1289
|
-
def filter_by_associations_limit_key
|
1290
|
-
qualify(join_table_alias, self[:left_keys]) + Array(qualify(associated_class.table_name, associated_class.primary_key))
|
1291
|
-
end
|
1292
|
-
|
1293
|
-
def predicate_key_methods
|
1294
|
-
self[:left_primary_keys]
|
1295
|
-
end
|
1296
|
-
|
1297
|
-
def reciprocal_association?(assoc_reflect)
|
1298
|
-
super && assoc_reflect[:left_keys] == self[:right_keys] &&
|
1299
|
-
assoc_reflect[:right_keys] == self[:left_keys] &&
|
1300
|
-
assoc_reflect[:join_table] == self[:join_table] &&
|
1301
|
-
right_primary_keys == assoc_reflect[:left_primary_key_columns] &&
|
1302
|
-
self[:left_primary_key_columns] == assoc_reflect.right_primary_keys
|
1303
|
-
end
|
1304
|
-
|
1305
|
-
def reciprocal_type
|
1306
|
-
:many_to_many
|
1307
|
-
end
|
1308
|
-
|
1309
|
-
# Whether the given expression represents a qualified identifier. Used to determine if it is
|
1310
|
-
# OK to use directly when joining.
|
1311
|
-
def selection_is_qualified?(c)
|
1312
|
-
case c
|
1313
|
-
when Symbol
|
1314
|
-
Sequel.split_symbol(c)[0]
|
1315
|
-
when Sequel::SQL::QualifiedIdentifier
|
1316
|
-
true
|
1317
|
-
when Sequel::SQL::AliasedExpression
|
1318
|
-
selection_is_qualified?(c.expression)
|
1319
|
-
else
|
1320
|
-
false
|
1321
|
-
end
|
1322
|
-
end
|
1323
|
-
|
1324
|
-
# Split the join table into source and alias parts.
|
1325
|
-
def split_join_table_alias
|
1326
|
-
associated_class.dataset.split_alias(self[:join_table])
|
1327
|
-
end
|
1328
|
-
end
|
1329
|
-
|
1330
|
-
class OneThroughOneAssociationReflection < ManyToManyAssociationReflection
|
1331
|
-
ASSOCIATION_TYPES[:one_through_one] = self
|
1332
|
-
include SingularAssociationReflection
|
1333
|
-
|
1334
|
-
# one_through_one associations should not singularize the association name when
|
1335
|
-
# creating the foreign key.
|
1336
|
-
def default_right_key
|
1337
|
-
:"#{self[:name]}_id"
|
1338
|
-
end
|
1339
|
-
|
1340
|
-
# one_through_one associations have no reciprocals
|
1341
|
-
def reciprocal
|
1342
|
-
nil
|
1343
|
-
end
|
1344
|
-
end
|
1345
|
-
|
1346
|
-
# This module contains methods added to all association datasets
|
1347
|
-
module AssociationDatasetMethods
|
1348
|
-
# The model object that created the association dataset
|
1349
|
-
attr_accessor :model_object
|
1350
|
-
|
1351
|
-
# The association reflection related to the association dataset
|
1352
|
-
attr_accessor :association_reflection
|
1353
|
-
end
|
1354
|
-
|
1355
|
-
# Each kind of association adds a number of instance methods to the model class which
|
1356
|
-
# are specialized according to the association type and optional parameters
|
1357
|
-
# given in the definition. Example:
|
1358
|
-
#
|
1359
|
-
# class Project < Sequel::Model
|
1360
|
-
# many_to_one :portfolio
|
1361
|
-
# # or: one_to_one :portfolio
|
1362
|
-
# one_to_many :milestones
|
1363
|
-
# # or: many_to_many :milestones
|
1364
|
-
# end
|
1365
|
-
#
|
1366
|
-
# The project class now has the following instance methods:
|
1367
|
-
# portfolio :: Returns the associated portfolio.
|
1368
|
-
# portfolio=(obj) :: Sets the associated portfolio to the object,
|
1369
|
-
# but the change is not persisted until you save the record (for many_to_one associations).
|
1370
|
-
# portfolio_dataset :: Returns a dataset that would return the associated
|
1371
|
-
# portfolio, only useful in fairly specific circumstances.
|
1372
|
-
# milestones :: Returns an array of associated milestones
|
1373
|
-
# add_milestone(obj) :: Associates the passed milestone with this object.
|
1374
|
-
# remove_milestone(obj) :: Removes the association with the passed milestone.
|
1375
|
-
# remove_all_milestones :: Removes associations with all associated milestones.
|
1376
|
-
# milestones_dataset :: Returns a dataset that would return the associated
|
1377
|
-
# milestones, allowing for further filtering/limiting/etc.
|
1378
|
-
#
|
1379
|
-
# If you want to override the behavior of the add_/remove_/remove_all_/ methods
|
1380
|
-
# or the association setter method, use the :adder, :remover, :clearer, and/or :setter
|
1381
|
-
# options. These options override the default behavior.
|
1382
|
-
#
|
1383
|
-
# By default the classes for the associations are inferred from the association
|
1384
|
-
# name, so for example the Project#portfolio will return an instance of
|
1385
|
-
# Portfolio, and Project#milestones will return an array of Milestone
|
1386
|
-
# instances. You can use the :class option to change which class is used.
|
1387
|
-
#
|
1388
|
-
# Association definitions are also reflected by the class, e.g.:
|
1389
|
-
#
|
1390
|
-
# Project.associations
|
1391
|
-
# => [:portfolio, :milestones]
|
1392
|
-
# Project.association_reflection(:portfolio)
|
1393
|
-
# => {:type => :many_to_one, :name => :portfolio, ...}
|
1394
|
-
#
|
1395
|
-
# Associations should not have the same names as any of the columns in the
|
1396
|
-
# model's current table they reference. If you are dealing with an existing schema that
|
1397
|
-
# has a column named status, you can't name the association status, you'd
|
1398
|
-
# have to name it foo_status or something else. If you give an association the same name
|
1399
|
-
# as a column, you will probably end up with an association that doesn't work, or a SystemStackError.
|
1400
|
-
#
|
1401
|
-
# For a more in depth general overview, as well as a reference guide,
|
1402
|
-
# see the {Association Basics guide}[rdoc-ref:doc/association_basics.rdoc].
|
1403
|
-
# For examples of advanced usage, see the {Advanced Associations guide}[rdoc-ref:doc/advanced_associations.rdoc].
|
1404
|
-
module ClassMethods
|
1405
|
-
# All association reflections defined for this model (default: {}).
|
1406
|
-
attr_reader :association_reflections
|
1407
|
-
|
1408
|
-
# Hash with column symbol keys and arrays of many_to_one
|
1409
|
-
# association symbols that should be cleared when the column
|
1410
|
-
# value changes.
|
1411
|
-
attr_reader :autoreloading_associations
|
1412
|
-
|
1413
|
-
# Whether association metadata should be cached in the association reflection. If not cached, it will be computed
|
1414
|
-
# on demand. In general you only want to set this to default when using code reloading. When using code reloading,
|
1415
|
-
# setting this will make sure that if an associated class is removed or modified, this class will not hang on to
|
1416
|
-
# the previous class.
|
1417
|
-
attr_accessor :cache_associations
|
1418
|
-
|
1419
|
-
# The default :eager_limit_strategy option to use for limited or offset associations (default: true, causing Sequel
|
1420
|
-
# to use what it considers the most appropriate strategy).
|
1421
|
-
attr_accessor :default_eager_limit_strategy
|
1422
|
-
|
1423
|
-
# Array of all association reflections for this model class
|
1424
|
-
def all_association_reflections
|
1425
|
-
association_reflections.values
|
1426
|
-
end
|
1427
|
-
|
1428
|
-
# Associates a related model with the current model. The following types are
|
1429
|
-
# supported:
|
1430
|
-
#
|
1431
|
-
# :many_to_one :: Foreign key in current model's table points to
|
1432
|
-
# associated model's primary key. Each associated model object can
|
1433
|
-
# be associated with more than one current model objects. Each current
|
1434
|
-
# model object can be associated with only one associated model object.
|
1435
|
-
# :one_to_many :: Foreign key in associated model's table points to this
|
1436
|
-
# model's primary key. Each current model object can be associated with
|
1437
|
-
# more than one associated model objects. Each associated model object
|
1438
|
-
# can be associated with only one current model object.
|
1439
|
-
# :one_through_one :: Similar to many_to_many in terms of foreign keys, but only one object
|
1440
|
-
# is associated to the current object through the association.
|
1441
|
-
# Provides only getter methods, no setter or modification methods.
|
1442
|
-
# :one_to_one :: Similar to one_to_many in terms of foreign keys, but
|
1443
|
-
# only one object is associated to the current object through the
|
1444
|
-
# association. The methods created are similar to many_to_one, except
|
1445
|
-
# that the one_to_one setter method saves the passed object.
|
1446
|
-
# :many_to_many :: A join table is used that has a foreign key that points
|
1447
|
-
# to this model's primary key and a foreign key that points to the
|
1448
|
-
# associated model's primary key. Each current model object can be
|
1449
|
-
# associated with many associated model objects, and each associated
|
1450
|
-
# model object can be associated with many current model objects.
|
1451
|
-
#
|
1452
|
-
# The following options can be supplied:
|
1453
|
-
# === Multiple Types
|
1454
|
-
# :adder :: Proc used to define the private _add_* method for doing the database work
|
1455
|
-
# to associate the given object to the current object (*_to_many assocations).
|
1456
|
-
# :after_add :: Symbol, Proc, or array of both/either specifying a callback to call
|
1457
|
-
# after a new item is added to the association.
|
1458
|
-
# :after_load :: Symbol, Proc, or array of both/either specifying a callback to call
|
1459
|
-
# after the associated record(s) have been retrieved from the database.
|
1460
|
-
# :after_remove :: Symbol, Proc, or array of both/either specifying a callback to call
|
1461
|
-
# after an item is removed from the association.
|
1462
|
-
# :after_set :: Symbol, Proc, or array of both/either specifying a callback to call
|
1463
|
-
# after an item is set using the association setter method.
|
1464
|
-
# :allow_eager :: If set to false, you cannot load the association eagerly
|
1465
|
-
# via eager or eager_graph
|
1466
|
-
# :before_add :: Symbol, Proc, or array of both/either specifying a callback to call
|
1467
|
-
# before a new item is added to the association.
|
1468
|
-
# :before_remove :: Symbol, Proc, or array of both/either specifying a callback to call
|
1469
|
-
# before an item is removed from the association.
|
1470
|
-
# :before_set :: Symbol, Proc, or array of both/either specifying a callback to call
|
1471
|
-
# before an item is set using the association setter method.
|
1472
|
-
# :cartesian_product_number :: the number of joins completed by this association that could cause more
|
1473
|
-
# than one row for each row in the current table (default: 0 for
|
1474
|
-
# many_to_one, one_to_one, and one_through_one associations, 1
|
1475
|
-
# for one_to_many and many_to_many associations).
|
1476
|
-
# :class :: The associated class or its name as a string or symbol. If not
|
1477
|
-
# given, uses the association's name, which is camelized (and
|
1478
|
-
# singularized unless the type is :many_to_one, :one_to_one, or one_through_one). If this is specified
|
1479
|
-
# as a string or symbol, you must specify the full class name (e.g. "SomeModule::MyModel").
|
1480
|
-
# :clearer :: Proc used to define the private _remove_all_* method for doing the database work
|
1481
|
-
# to remove all objects associated to the current object (*_to_many assocations).
|
1482
|
-
# :clone :: Merge the current options and block into the options and block used in defining
|
1483
|
-
# the given association. Can be used to DRY up a bunch of similar associations that
|
1484
|
-
# all share the same options such as :class and :key, while changing the order and block used.
|
1485
|
-
# :conditions :: The conditions to use to filter the association, can be any argument passed to where.
|
1486
|
-
# :dataset :: A proc that is instance_execed to get the base dataset to use (before the other
|
1487
|
-
# options are applied). If the proc accepts an argument, it is passed the related
|
1488
|
-
# association reflection.
|
1489
|
-
# :distinct :: Use the DISTINCT clause when selecting associating object, both when
|
1490
|
-
# lazy loading and eager loading via .eager (but not when using .eager_graph).
|
1491
|
-
# :eager :: The associations to eagerly load via +eager+ when loading the associated object(s).
|
1492
|
-
# :eager_block :: If given, use the block instead of the default block when
|
1493
|
-
# eagerly loading. To not use a block when eager loading (when one is used normally),
|
1494
|
-
# set to nil.
|
1495
|
-
# :eager_graph :: The associations to eagerly load via +eager_graph+ when loading the associated object(s).
|
1496
|
-
# many_to_many associations with this option cannot be eagerly loaded via +eager+.
|
1497
|
-
# :eager_grapher :: A proc to use to implement eager loading via +eager_graph+, overriding the default.
|
1498
|
-
# Takes an options hash with at least the entries :self (the receiver of the eager_graph call),
|
1499
|
-
# :table_alias (the alias to use for table to graph into the association), and :implicit_qualifier
|
1500
|
-
# (the alias that was used for the current table).
|
1501
|
-
# Should return a copy of the dataset with the association graphed into it.
|
1502
|
-
# :eager_limit_strategy :: Determines the strategy used for enforcing limits and offsets when eager loading
|
1503
|
-
# associations via the +eager+ method.
|
1504
|
-
# :eager_loader :: A proc to use to implement eager loading, overriding the default. Takes a single hash argument,
|
1505
|
-
# with at least the keys: :rows, which is an array of current model instances, :associations,
|
1506
|
-
# which is a hash of dependent associations, :self, which is the dataset doing the eager loading,
|
1507
|
-
# :eager_block, which is a dynamic callback that should be called with the dataset, and :id_map,
|
1508
|
-
# which is a mapping of key values to arrays of current model instances. In the proc, the
|
1509
|
-
# associated records should be queried from the database and the associations cache for each
|
1510
|
-
# record should be populated.
|
1511
|
-
# :eager_loader_key :: A symbol for the key column to use to populate the key_hash
|
1512
|
-
# for the eager loader. Can be set to nil to not populate the key_hash.
|
1513
|
-
# :extend :: A module or array of modules to extend the dataset with.
|
1514
|
-
# :filter_limit_strategy :: Determines the strategy used for enforcing limits and offsets when filtering by
|
1515
|
-
# limited associations. Possible options are :window_function, :distinct_on, or
|
1516
|
-
# :correlated_subquery depending on association type and database type.
|
1517
|
-
# :graph_alias_base :: The base name to use for the table alias when eager graphing. Defaults to the name
|
1518
|
-
# of the association. If the alias name has already been used in the query, Sequel will create
|
1519
|
-
# a unique alias by appending a numeric suffix (e.g. alias_0, alias_1, ...) until the alias is
|
1520
|
-
# unique.
|
1521
|
-
# :graph_block :: The block to pass to join_table when eagerly loading
|
1522
|
-
# the association via +eager_graph+.
|
1523
|
-
# :graph_conditions :: The additional conditions to use on the SQL join when eagerly loading
|
1524
|
-
# the association via +eager_graph+. Should be a hash or an array of two element arrays. If not
|
1525
|
-
# specified, the :conditions option is used if it is a hash or array of two element arrays.
|
1526
|
-
# :graph_join_type :: The type of SQL join to use when eagerly loading the association via
|
1527
|
-
# eager_graph. Defaults to :left_outer.
|
1528
|
-
# :graph_only_conditions :: The conditions to use on the SQL join when eagerly loading
|
1529
|
-
# the association via +eager_graph+, instead of the default conditions specified by the
|
1530
|
-
# foreign/primary keys. This option causes the :graph_conditions option to be ignored.
|
1531
|
-
# :graph_order :: Over the order to use when using eager_graph, instead of the default order. This should be used
|
1532
|
-
# in the case where :order contains an identifier qualified by the table's name, which may not match
|
1533
|
-
# the alias used when eager graphing. By setting this to the unqualified identifier, it will be
|
1534
|
-
# automatically qualified when using eager_graph.
|
1535
|
-
# :graph_select :: A column or array of columns to select from the associated table
|
1536
|
-
# when eagerly loading the association via +eager_graph+. Defaults to all
|
1537
|
-
# columns in the associated table.
|
1538
|
-
# :limit :: Limit the number of records to the provided value. Use
|
1539
|
-
# an array with two elements for the value to specify a
|
1540
|
-
# limit (first element) and an offset (second element).
|
1541
|
-
# :methods_module :: The module that methods the association creates will be placed into. Defaults
|
1542
|
-
# to the module containing the model's columns.
|
1543
|
-
# :order :: the column(s) by which to order the association dataset. Can be a
|
1544
|
-
# singular column symbol or an array of column symbols.
|
1545
|
-
# :order_eager_graph :: Whether to add the association's order to the graphed dataset's order when graphing
|
1546
|
-
# via +eager_graph+. Defaults to true, so set to false to disable.
|
1547
|
-
# :read_only :: Do not add a setter method (for many_to_one or one_to_one associations),
|
1548
|
-
# or add_/remove_/remove_all_ methods (for one_to_many and many_to_many associations). Always
|
1549
|
-
# true for one_through_one associations.
|
1550
|
-
# :reciprocal :: the symbol name of the reciprocal association,
|
1551
|
-
# if it exists. By default, Sequel will try to determine it by looking at the
|
1552
|
-
# associated model's assocations for a association that matches
|
1553
|
-
# the current association's key(s). Set to nil to not use a reciprocal.
|
1554
|
-
# :remover :: Proc used to define the private _remove_* method for doing the database work
|
1555
|
-
# to remove the association between the given object and the current object (*_to_many assocations).
|
1556
|
-
# :select :: the columns to select. Defaults to the associated class's table_name.* in an association
|
1557
|
-
# that uses joins, which means it doesn't include the attributes from the
|
1558
|
-
# join table. If you want to include the join table attributes, you can
|
1559
|
-
# use this option, but beware that the join table attributes can clash with
|
1560
|
-
# attributes from the model table, so you should alias any attributes that have
|
1561
|
-
# the same name in both the join table and the associated table.
|
1562
|
-
# :setter :: Proc used to define the private _*= method for doing the work to setup the assocation
|
1563
|
-
# between the given object and the current object (*_to_one associations).
|
1564
|
-
# :subqueries_per_union :: The number of subqueries to use in each UNION query, for eager
|
1565
|
-
# loading limited associations using the default :union strategy.
|
1566
|
-
# :validate :: Set to false to not validate when implicitly saving any associated object.
|
1567
|
-
# === :many_to_one
|
1568
|
-
# :key :: foreign key in current model's table that references
|
1569
|
-
# associated model's primary key, as a symbol. Defaults to :"#{name}_id". Can use an
|
1570
|
-
# array of symbols for a composite key association.
|
1571
|
-
# :key_column :: Similar to, and usually identical to, :key, but :key refers to the model method
|
1572
|
-
# to call, where :key_column refers to the underlying column. Should only be
|
1573
|
-
# used if the model method differs from the foreign key column, in conjunction
|
1574
|
-
# with defining a model alias method for the key column.
|
1575
|
-
# :primary_key :: column in the associated table that :key option references, as a symbol.
|
1576
|
-
# Defaults to the primary key of the associated table. Can use an
|
1577
|
-
# array of symbols for a composite key association.
|
1578
|
-
# :primary_key_method :: the method symbol or array of method symbols to call on the associated
|
1579
|
-
# object to get the foreign key values. Defaults to :primary_key option.
|
1580
|
-
# :qualify :: Whether to use qualifier primary keys when loading the association. The default
|
1581
|
-
# is true, so you must set to false to not qualify. Qualification rarely causes
|
1582
|
-
# problems, but it's necessary to disable in some cases, such as when you are doing
|
1583
|
-
# a JOIN USING operation on the column on Oracle.
|
1584
|
-
# === :one_to_many and :one_to_one
|
1585
|
-
# :key :: foreign key in associated model's table that references
|
1586
|
-
# current model's primary key, as a symbol. Defaults to
|
1587
|
-
# :"#{self.name.underscore}_id". Can use an
|
1588
|
-
# array of symbols for a composite key association.
|
1589
|
-
# :key_method :: the method symbol or array of method symbols to call on the associated
|
1590
|
-
# object to get the foreign key values. Defaults to :key option.
|
1591
|
-
# :primary_key :: column in the current table that :key option references, as a symbol.
|
1592
|
-
# Defaults to primary key of the current table. Can use an
|
1593
|
-
# array of symbols for a composite key association.
|
1594
|
-
# :primary_key_column :: Similar to, and usually identical to, :primary_key, but :primary_key refers
|
1595
|
-
# to the model method call, where :primary_key_column refers to the underlying column.
|
1596
|
-
# Should only be used if the model method differs from the primary key column, in
|
1597
|
-
# conjunction with defining a model alias method for the primary key column.
|
1598
|
-
# :raise_on_save_failure :: Do not raise exceptions for hook or validation failures when saving associated
|
1599
|
-
# objects in the add/remove methods (return nil instead) [one_to_many only].
|
1600
|
-
# === :many_to_many and :one_through_one
|
1601
|
-
# :graph_join_table_block :: The block to pass to +join_table+ for
|
1602
|
-
# the join table when eagerly loading the association via +eager_graph+.
|
1603
|
-
# :graph_join_table_conditions :: The additional conditions to use on the SQL join for
|
1604
|
-
# the join table when eagerly loading the association via +eager_graph+.
|
1605
|
-
# Should be a hash or an array of two element arrays.
|
1606
|
-
# :graph_join_table_join_type :: The type of SQL join to use for the join table when eagerly
|
1607
|
-
# loading the association via +eager_graph+. Defaults to the
|
1608
|
-
# :graph_join_type option or :left_outer.
|
1609
|
-
# :graph_join_table_only_conditions :: The conditions to use on the SQL join for the join
|
1610
|
-
# table when eagerly loading the association via +eager_graph+,
|
1611
|
-
# instead of the default conditions specified by the
|
1612
|
-
# foreign/primary keys. This option causes the
|
1613
|
-
# :graph_join_table_conditions option to be ignored.
|
1614
|
-
# :join_table :: name of table that includes the foreign keys to both
|
1615
|
-
# the current model and the associated model, as a symbol. Defaults to the name
|
1616
|
-
# of current model and name of associated model, pluralized,
|
1617
|
-
# underscored, sorted, and joined with '_'.
|
1618
|
-
# :join_table_block :: proc that can be used to modify the dataset used in the add/remove/remove_all
|
1619
|
-
# methods. Should accept a dataset argument and return a modified dataset if present.
|
1620
|
-
# :left_key :: foreign key in join table that points to current model's
|
1621
|
-
# primary key, as a symbol. Defaults to :"#{self.name.underscore}_id".
|
1622
|
-
# Can use an array of symbols for a composite key association.
|
1623
|
-
# :left_primary_key :: column in current table that :left_key points to, as a symbol.
|
1624
|
-
# Defaults to primary key of current table. Can use an
|
1625
|
-
# array of symbols for a composite key association.
|
1626
|
-
# :left_primary_key_column :: Similar to, and usually identical to, :left_primary_key, but :left_primary_key refers to
|
1627
|
-
# the model method to call, where :left_primary_key_column refers to the underlying column. Should only
|
1628
|
-
# be used if the model method differs from the left primary key column, in conjunction
|
1629
|
-
# with defining a model alias method for the left primary key column.
|
1630
|
-
# :right_key :: foreign key in join table that points to associated
|
1631
|
-
# model's primary key, as a symbol. Defaults to :"#{name.to_s.singularize}_id".
|
1632
|
-
# Can use an array of symbols for a composite key association.
|
1633
|
-
# :right_primary_key :: column in associated table that :right_key points to, as a symbol.
|
1634
|
-
# Defaults to primary key of the associated table. Can use an
|
1635
|
-
# array of symbols for a composite key association.
|
1636
|
-
# :right_primary_key_method :: the method symbol or array of method symbols to call on the associated
|
1637
|
-
# object to get the foreign key values for the join table.
|
1638
|
-
# Defaults to :right_primary_key option.
|
1639
|
-
# :uniq :: Adds a after_load callback that makes the array of objects unique.
|
1640
|
-
def associate(type, name, opts = OPTS, &block)
|
1641
|
-
raise(Error, 'invalid association type') unless assoc_class = ASSOCIATION_TYPES[type]
|
1642
|
-
raise(Error, 'Model.associate name argument must be a symbol') unless name.is_a?(Symbol)
|
1643
|
-
|
1644
|
-
# dup early so we don't modify opts
|
1645
|
-
orig_opts = opts.dup
|
1646
|
-
|
1647
|
-
if opts[:clone]
|
1648
|
-
cloned_assoc = association_reflection(opts[:clone])
|
1649
|
-
orig_opts = cloned_assoc[:orig_opts].merge(orig_opts)
|
1650
|
-
end
|
1651
|
-
|
1652
|
-
opts = orig_opts.merge(:type => type, :name => name, :cache=>({} if cache_associations), :model => self)
|
1653
|
-
opts[:block] = block if block
|
1654
|
-
if block || orig_opts[:block] || orig_opts[:dataset]
|
1655
|
-
# It's possible the association is instance specific, in that it depends on
|
1656
|
-
# values other than the foreign key value. This needs to be checked for
|
1657
|
-
# in certain places to disable optimizations.
|
1658
|
-
opts[:instance_specific] = true
|
1659
|
-
end
|
1660
|
-
opts = assoc_class.new.merge!(opts)
|
1661
|
-
|
1662
|
-
if opts[:clone] && !opts.cloneable?(cloned_assoc)
|
1663
|
-
raise(Error, "cannot clone an association to an association of different type (association #{name} with type #{type} cloning #{opts[:clone]} with type #{cloned_assoc[:type]})")
|
1664
|
-
end
|
1665
|
-
|
1666
|
-
opts[:eager_block] = opts[:block] unless opts.include?(:eager_block)
|
1667
|
-
if !opts.has_key?(:predicate_key) && opts.has_key?(:eager_loading_predicate_key)
|
1668
|
-
opts[:predicate_key] = opts[:eager_loading_predicate_key]
|
1669
|
-
end
|
1670
|
-
opts[:graph_join_type] ||= :left_outer
|
1671
|
-
opts[:order_eager_graph] = true unless opts.include?(:order_eager_graph)
|
1672
|
-
conds = opts[:conditions]
|
1673
|
-
opts[:graph_alias_base] ||= name
|
1674
|
-
opts[:graph_conditions] = conds if !opts.include?(:graph_conditions) and Sequel.condition_specifier?(conds)
|
1675
|
-
opts[:graph_conditions] = opts.fetch(:graph_conditions, []).to_a
|
1676
|
-
opts[:graph_select] = Array(opts[:graph_select]) if opts[:graph_select]
|
1677
|
-
[:before_add, :before_remove, :after_add, :after_remove, :after_load, :before_set, :after_set, :extend].each do |cb_type|
|
1678
|
-
opts[cb_type] = Array(opts[cb_type])
|
1679
|
-
end
|
1680
|
-
late_binding_class_option(opts, opts.returns_array? ? singularize(name) : name)
|
1681
|
-
|
1682
|
-
# Remove :class entry if it exists and is nil, to work with cached_fetch
|
1683
|
-
opts.delete(:class) unless opts[:class]
|
1684
|
-
|
1685
|
-
send(:"def_#{type}", opts)
|
1686
|
-
def_association_instance_methods(opts)
|
1687
|
-
|
1688
|
-
orig_opts.delete(:clone)
|
1689
|
-
orig_opts.merge!(:class_name=>opts[:class_name], :class=>opts[:class], :block=>opts[:block])
|
1690
|
-
opts[:orig_opts] = orig_opts
|
1691
|
-
# don't add to association_reflections until we are sure there are no errors
|
1692
|
-
association_reflections[name] = opts
|
1693
|
-
end
|
1694
|
-
|
1695
|
-
# The association reflection hash for the association of the given name.
|
1696
|
-
def association_reflection(name)
|
1697
|
-
association_reflections[name]
|
1698
|
-
end
|
1699
|
-
|
1700
|
-
# Array of association name symbols
|
1701
|
-
def associations
|
1702
|
-
association_reflections.keys
|
1703
|
-
end
|
1704
|
-
|
1705
|
-
# Eager load the association with the given eager loader options.
|
1706
|
-
def eager_load_results(opts, eo, &block)
|
1707
|
-
opts.eager_load_results(eo, &block)
|
1708
|
-
end
|
1709
|
-
|
1710
|
-
# Shortcut for adding a many_to_many association, see #associate
|
1711
|
-
def many_to_many(name, opts=OPTS, &block)
|
1712
|
-
associate(:many_to_many, name, opts, &block)
|
1713
|
-
end
|
1714
|
-
|
1715
|
-
# Shortcut for adding a many_to_one association, see #associate
|
1716
|
-
def many_to_one(name, opts=OPTS, &block)
|
1717
|
-
associate(:many_to_one, name, opts, &block)
|
1718
|
-
end
|
1719
|
-
|
1720
|
-
# Shortcut for adding a one_through_one association, see #associate.
|
1721
|
-
def one_through_one(name, opts=OPTS, &block)
|
1722
|
-
associate(:one_through_one, name, opts, &block)
|
1723
|
-
end
|
1724
|
-
|
1725
|
-
# Shortcut for adding a one_to_many association, see #associate
|
1726
|
-
def one_to_many(name, opts=OPTS, &block)
|
1727
|
-
associate(:one_to_many, name, opts, &block)
|
1728
|
-
end
|
1729
|
-
|
1730
|
-
# Shortcut for adding a one_to_one association, see #associate.
|
1731
|
-
def one_to_one(name, opts=OPTS, &block)
|
1732
|
-
associate(:one_to_one, name, opts, &block)
|
1733
|
-
end
|
1734
|
-
|
1735
|
-
Plugins.inherited_instance_variables(self, :@association_reflections=>:dup, :@autoreloading_associations=>:hash_dup, :@cache_associations=>nil, :@default_eager_limit_strategy=>nil)
|
1736
|
-
Plugins.def_dataset_methods(self, [:eager, :eager_graph, :eager_graph_with_options, :association_join, :association_full_join, :association_inner_join, :association_left_join, :association_right_join])
|
1737
|
-
|
1738
|
-
private
|
1739
|
-
|
1740
|
-
# The module to use for the association's methods. Defaults to
|
1741
|
-
# the overridable_methods_module.
|
1742
|
-
def association_module(opts=OPTS)
|
1743
|
-
opts.fetch(:methods_module, overridable_methods_module)
|
1744
|
-
end
|
1745
|
-
|
1746
|
-
# Add a method to the module included in the class, so the method
|
1747
|
-
# can be easily overridden in the class itself while allowing for
|
1748
|
-
# super to be called.
|
1749
|
-
def association_module_def(name, opts=OPTS, &block)
|
1750
|
-
association_module(opts).module_eval{define_method(name, &block)}
|
1751
|
-
end
|
1752
|
-
|
1753
|
-
# Add a private method to the module included in the class.
|
1754
|
-
def association_module_private_def(name, opts=OPTS, &block)
|
1755
|
-
association_module_def(name, opts, &block)
|
1756
|
-
association_module(opts).send(:private, name)
|
1757
|
-
end
|
1758
|
-
|
1759
|
-
# Adds the association method to the association methods module.
|
1760
|
-
def def_association_method(opts)
|
1761
|
-
association_module_def(opts.association_method, opts){|*dynamic_opts, &block| load_associated_objects(opts, dynamic_opts[0], &block)}
|
1762
|
-
end
|
1763
|
-
|
1764
|
-
# Define all of the association instance methods for this association.
|
1765
|
-
def def_association_instance_methods(opts)
|
1766
|
-
association_module_def(opts.dataset_method, opts){_dataset(opts)}
|
1767
|
-
def_association_method(opts)
|
1768
|
-
|
1769
|
-
return if opts[:read_only]
|
1770
|
-
|
1771
|
-
if opts[:setter] && opts[:_setter]
|
1772
|
-
# This is backwards due to backwards compatibility
|
1773
|
-
association_module_private_def(opts._setter_method, opts, &opts[:setter])
|
1774
|
-
association_module_def(opts.setter_method, opts, &opts[:_setter])
|
1775
|
-
end
|
1776
|
-
|
1777
|
-
if adder = opts[:adder]
|
1778
|
-
association_module_private_def(opts._add_method, opts, &adder)
|
1779
|
-
association_module_def(opts.add_method, opts){|o,*args| add_associated_object(opts, o, *args)}
|
1780
|
-
end
|
1781
|
-
|
1782
|
-
if remover = opts[:remover]
|
1783
|
-
association_module_private_def(opts._remove_method, opts, &remover)
|
1784
|
-
association_module_def(opts.remove_method, opts){|o,*args| remove_associated_object(opts, o, *args)}
|
1785
|
-
end
|
1786
|
-
|
1787
|
-
if clearer = opts[:clearer]
|
1788
|
-
association_module_private_def(opts._remove_all_method, opts, &clearer)
|
1789
|
-
association_module_def(opts.remove_all_method, opts){|*args| remove_all_associated_objects(opts, *args)}
|
1790
|
-
end
|
1791
|
-
end
|
1792
|
-
|
1793
|
-
# Configures many_to_many and one_through_one association reflection and adds the related association methods
|
1794
|
-
def def_many_to_many(opts)
|
1795
|
-
one_through_one = opts[:type] == :one_through_one
|
1796
|
-
opts[:read_only] = true if one_through_one
|
1797
|
-
left = (opts[:left_key] ||= opts.default_left_key)
|
1798
|
-
lcks = opts[:left_keys] = Array(left)
|
1799
|
-
right = (opts[:right_key] ||= opts.default_right_key)
|
1800
|
-
rcks = opts[:right_keys] = Array(right)
|
1801
|
-
left_pk = (opts[:left_primary_key] ||= self.primary_key)
|
1802
|
-
opts[:eager_loader_key] = left_pk unless opts.has_key?(:eager_loader_key)
|
1803
|
-
lcpks = opts[:left_primary_keys] = Array(left_pk)
|
1804
|
-
lpkc = opts[:left_primary_key_column] ||= left_pk
|
1805
|
-
lpkcs = opts[:left_primary_key_columns] ||= Array(lpkc)
|
1806
|
-
raise(Error, "mismatched number of left keys: #{lcks.inspect} vs #{lcpks.inspect}") unless lcks.length == lcpks.length
|
1807
|
-
if opts[:right_primary_key]
|
1808
|
-
rcpks = Array(opts[:right_primary_key])
|
1809
|
-
raise(Error, "mismatched number of right keys: #{rcks.inspect} vs #{rcpks.inspect}") unless rcks.length == rcpks.length
|
1810
|
-
end
|
1811
|
-
opts[:uses_left_composite_keys] = lcks.length > 1
|
1812
|
-
opts[:uses_right_composite_keys] = rcks.length > 1
|
1813
|
-
opts[:cartesian_product_number] ||= one_through_one ? 0 : 1
|
1814
|
-
join_table = (opts[:join_table] ||= opts.default_join_table)
|
1815
|
-
opts[:left_key_alias] ||= opts.default_associated_key_alias
|
1816
|
-
opts[:graph_join_table_join_type] ||= opts[:graph_join_type]
|
1817
|
-
opts[:after_load].unshift(:array_uniq!) if opts[:uniq]
|
1818
|
-
opts[:dataset] ||= opts.association_dataset_proc
|
1819
|
-
opts[:eager_loader] ||= opts.method(:default_eager_loader)
|
1820
|
-
|
1821
|
-
join_type = opts[:graph_join_type]
|
1822
|
-
select = opts[:graph_select]
|
1823
|
-
use_only_conditions = opts.include?(:graph_only_conditions)
|
1824
|
-
only_conditions = opts[:graph_only_conditions]
|
1825
|
-
conditions = opts[:graph_conditions]
|
1826
|
-
graph_block = opts[:graph_block]
|
1827
|
-
graph_jt_conds = opts[:graph_join_table_conditions] = opts.fetch(:graph_join_table_conditions, []).to_a
|
1828
|
-
use_jt_only_conditions = opts.include?(:graph_join_table_only_conditions)
|
1829
|
-
jt_only_conditions = opts[:graph_join_table_only_conditions]
|
1830
|
-
jt_join_type = opts[:graph_join_table_join_type]
|
1831
|
-
jt_graph_block = opts[:graph_join_table_block]
|
1832
|
-
opts[:eager_grapher] ||= proc do |eo|
|
1833
|
-
ds = eo[:self]
|
1834
|
-
egls = eo[:limit_strategy]
|
1835
|
-
if egls && egls != :ruby
|
1836
|
-
associated_key_array = opts.associated_key_array
|
1837
|
-
orig_egds = egds = eager_graph_dataset(opts, eo)
|
1838
|
-
egds = egds.
|
1839
|
-
inner_join(join_table, rcks.zip(opts.right_primary_keys) + graph_jt_conds, :qualify=>:deep).
|
1840
|
-
select_all(egds.first_source).
|
1841
|
-
select_append(*associated_key_array)
|
1842
|
-
egds = opts.apply_eager_graph_limit_strategy(egls, egds)
|
1843
|
-
ds.graph(egds, associated_key_array.map{|v| v.alias}.zip(lpkcs) + conditions, :qualify=>:deep, :table_alias=>eo[:table_alias], :implicit_qualifier=>eo[:implicit_qualifier], :join_type=>eo[:join_type]||join_type, :from_self_alias=>eo[:from_self_alias], :join_only=>eo[:join_only], :select=>select||orig_egds.columns, &graph_block)
|
1844
|
-
else
|
1845
|
-
ds = ds.graph(join_table, use_jt_only_conditions ? jt_only_conditions : lcks.zip(lpkcs) + graph_jt_conds, :select=>false, :table_alias=>ds.unused_table_alias(join_table, [eo[:table_alias]]), :join_type=>eo[:join_type]||jt_join_type, :join_only=>eo[:join_only], :implicit_qualifier=>eo[:implicit_qualifier], :qualify=>:deep, :from_self_alias=>eo[:from_self_alias], &jt_graph_block)
|
1846
|
-
ds.graph(eager_graph_dataset(opts, eo), use_only_conditions ? only_conditions : opts.right_primary_keys.zip(rcks) + conditions, :select=>select, :table_alias=>eo[:table_alias], :qualify=>:deep, :join_type=>eo[:join_type]||join_type, :join_only=>eo[:join_only], &graph_block)
|
1847
|
-
end
|
1848
|
-
end
|
1849
|
-
|
1850
|
-
return if opts[:read_only] || one_through_one
|
1851
|
-
|
1852
|
-
opts[:adder] ||= proc do |o|
|
1853
|
-
h = {}
|
1854
|
-
lcks.zip(lcpks).each{|k, pk| h[k] = send(pk)}
|
1855
|
-
rcks.zip(opts.right_primary_key_methods).each{|k, pk| h[k] = o.send(pk)}
|
1856
|
-
_join_table_dataset(opts).insert(h)
|
1857
|
-
end
|
1858
|
-
|
1859
|
-
opts[:remover] ||= proc do |o|
|
1860
|
-
_join_table_dataset(opts).where(lcks.zip(lcpks.map{|k| send(k)}) + rcks.zip(opts.right_primary_key_methods.map{|k| o.send(k)})).delete
|
1861
|
-
end
|
1862
|
-
|
1863
|
-
opts[:clearer] ||= proc do
|
1864
|
-
_join_table_dataset(opts).where(lcks.zip(lcpks.map{|k| send(k)})).delete
|
1865
|
-
end
|
1866
|
-
end
|
1867
|
-
|
1868
|
-
# Configures many_to_one association reflection and adds the related association methods
|
1869
|
-
def def_many_to_one(opts)
|
1870
|
-
name = opts[:name]
|
1871
|
-
opts[:key] = opts.default_key unless opts.has_key?(:key)
|
1872
|
-
key = opts[:key]
|
1873
|
-
opts[:eager_loader_key] = key unless opts.has_key?(:eager_loader_key)
|
1874
|
-
cks = opts[:graph_keys] = opts[:keys] = Array(key)
|
1875
|
-
opts[:key_column] ||= key
|
1876
|
-
opts[:graph_keys] = opts[:key_columns] = Array(opts[:key_column])
|
1877
|
-
opts[:qualified_key] = opts.qualify_cur(key)
|
1878
|
-
if opts[:primary_key]
|
1879
|
-
cpks = Array(opts[:primary_key])
|
1880
|
-
raise(Error, "mismatched number of keys: #{cks.inspect} vs #{cpks.inspect}") unless cks.length == cpks.length
|
1881
|
-
end
|
1882
|
-
uses_cks = opts[:uses_composite_keys] = cks.length > 1
|
1883
|
-
opts[:cartesian_product_number] ||= 0
|
1884
|
-
|
1885
|
-
if !opts.has_key?(:many_to_one_pk_lookup) &&
|
1886
|
-
(opts[:dataset] || opts[:conditions] || opts[:block] || opts[:select] ||
|
1887
|
-
(opts.has_key?(:key) && opts[:key] == nil))
|
1888
|
-
opts[:many_to_one_pk_lookup] = false
|
1889
|
-
end
|
1890
|
-
auto_assocs = @autoreloading_associations
|
1891
|
-
cks.each do |k|
|
1892
|
-
(auto_assocs[k] ||= []) << name
|
1893
|
-
end
|
1894
|
-
|
1895
|
-
opts[:dataset] ||= opts.association_dataset_proc
|
1896
|
-
opts[:eager_loader] ||= proc do |eo|
|
1897
|
-
h = eo[:id_map]
|
1898
|
-
pk_meths = opts.primary_key_methods
|
1899
|
-
|
1900
|
-
eager_load_results(opts, eo) do |assoc_record|
|
1901
|
-
hash_key = uses_cks ? pk_meths.map{|k| assoc_record.send(k)} : assoc_record.send(opts.primary_key_method)
|
1902
|
-
if objects = h[hash_key]
|
1903
|
-
objects.each{|object| object.associations[name] = assoc_record}
|
1904
|
-
end
|
1905
|
-
end
|
1906
|
-
end
|
1907
|
-
|
1908
|
-
join_type = opts[:graph_join_type]
|
1909
|
-
select = opts[:graph_select]
|
1910
|
-
use_only_conditions = opts.include?(:graph_only_conditions)
|
1911
|
-
only_conditions = opts[:graph_only_conditions]
|
1912
|
-
conditions = opts[:graph_conditions]
|
1913
|
-
graph_block = opts[:graph_block]
|
1914
|
-
graph_cks = opts[:graph_keys]
|
1915
|
-
opts[:eager_grapher] ||= proc do |eo|
|
1916
|
-
ds = eo[:self]
|
1917
|
-
ds.graph(eager_graph_dataset(opts, eo), use_only_conditions ? only_conditions : opts.primary_keys.zip(graph_cks) + conditions, eo.merge(:select=>select, :join_type=>eo[:join_type]||join_type, :qualify=>:deep, :from_self_alias=>eo[:from_self_alias]), &graph_block)
|
1918
|
-
end
|
1919
|
-
|
1920
|
-
return if opts[:read_only]
|
1921
|
-
|
1922
|
-
opts[:setter] ||= proc{|o| cks.zip(opts.primary_key_methods).each{|k, pk| send(:"#{k}=", (o.send(pk) if o))}}
|
1923
|
-
opts[:_setter] = proc{|o| set_associated_object(opts, o)}
|
1924
|
-
end
|
1925
|
-
|
1926
|
-
# Configures one_to_many and one_to_one association reflections and adds the related association methods
|
1927
|
-
def def_one_to_many(opts)
|
1928
|
-
one_to_one = opts[:type] == :one_to_one
|
1929
|
-
name = opts[:name]
|
1930
|
-
key = (opts[:key] ||= opts.default_key)
|
1931
|
-
km = opts[:key_method] ||= opts[:key]
|
1932
|
-
cks = opts[:keys] = Array(key)
|
1933
|
-
opts[:key_methods] = Array(opts[:key_method])
|
1934
|
-
primary_key = (opts[:primary_key] ||= self.primary_key)
|
1935
|
-
opts[:eager_loader_key] = primary_key unless opts.has_key?(:eager_loader_key)
|
1936
|
-
cpks = opts[:primary_keys] = Array(primary_key)
|
1937
|
-
pkc = opts[:primary_key_column] ||= primary_key
|
1938
|
-
pkcs = opts[:primary_key_columns] ||= Array(pkc)
|
1939
|
-
raise(Error, "mismatched number of keys: #{cks.inspect} vs #{cpks.inspect}") unless cks.length == cpks.length
|
1940
|
-
uses_cks = opts[:uses_composite_keys] = cks.length > 1
|
1941
|
-
opts[:dataset] ||= opts.association_dataset_proc
|
1942
|
-
opts[:eager_loader] ||= proc do |eo|
|
1943
|
-
h = eo[:id_map]
|
1944
|
-
reciprocal = opts.reciprocal
|
1945
|
-
assign_singular = opts.assign_singular?
|
1946
|
-
delete_rn = opts.delete_row_number_column
|
1947
|
-
|
1948
|
-
eager_load_results(opts, eo) do |assoc_record|
|
1949
|
-
assoc_record.values.delete(delete_rn) if delete_rn
|
1950
|
-
hash_key = uses_cks ? km.map{|k| assoc_record.send(k)} : assoc_record.send(km)
|
1951
|
-
next unless objects = h[hash_key]
|
1952
|
-
if assign_singular
|
1953
|
-
objects.each do |object|
|
1954
|
-
unless object.associations[name]
|
1955
|
-
object.associations[name] = assoc_record
|
1956
|
-
assoc_record.associations[reciprocal] = object if reciprocal
|
1957
|
-
end
|
1958
|
-
end
|
1959
|
-
else
|
1960
|
-
objects.each do |object|
|
1961
|
-
object.associations[name].push(assoc_record)
|
1962
|
-
assoc_record.associations[reciprocal] = object if reciprocal
|
1963
|
-
end
|
1964
|
-
end
|
1965
|
-
end
|
1966
|
-
end
|
1967
|
-
|
1968
|
-
join_type = opts[:graph_join_type]
|
1969
|
-
select = opts[:graph_select]
|
1970
|
-
use_only_conditions = opts.include?(:graph_only_conditions)
|
1971
|
-
only_conditions = opts[:graph_only_conditions]
|
1972
|
-
conditions = opts[:graph_conditions]
|
1973
|
-
opts[:cartesian_product_number] ||= one_to_one ? 0 : 1
|
1974
|
-
graph_block = opts[:graph_block]
|
1975
|
-
opts[:eager_grapher] ||= proc do |eo|
|
1976
|
-
ds = eo[:self]
|
1977
|
-
ds = ds.graph(opts.apply_eager_graph_limit_strategy(eo[:limit_strategy], eager_graph_dataset(opts, eo)), use_only_conditions ? only_conditions : cks.zip(pkcs) + conditions, eo.merge(:select=>select, :join_type=>eo[:join_type]||join_type, :qualify=>:deep, :from_self_alias=>eo[:from_self_alias]), &graph_block)
|
1978
|
-
# We only load reciprocals for one_to_many associations, as other reciprocals don't make sense
|
1979
|
-
ds.opts[:eager_graph][:reciprocals][eo[:table_alias]] = opts.reciprocal
|
1980
|
-
ds
|
1981
|
-
end
|
1982
|
-
|
1983
|
-
return if opts[:read_only]
|
1984
|
-
|
1985
|
-
save_opts = {:validate=>opts[:validate]}
|
1986
|
-
ck_nil_hash ={}
|
1987
|
-
cks.each{|k| ck_nil_hash[k] = nil}
|
1988
|
-
|
1989
|
-
if one_to_one
|
1990
|
-
opts[:setter] ||= proc do |o|
|
1991
|
-
up_ds = _apply_association_options(opts, opts.associated_dataset.where(cks.zip(cpks.map{|k| send(k)})))
|
1992
|
-
if o
|
1993
|
-
up_ds = up_ds.exclude(o.pk_hash) unless o.new?
|
1994
|
-
cks.zip(cpks).each{|k, pk| o.send(:"#{k}=", send(pk))}
|
1995
|
-
end
|
1996
|
-
checked_transaction do
|
1997
|
-
up_ds.update(ck_nil_hash)
|
1998
|
-
o.save(save_opts) || raise(Sequel::Error, "invalid associated object, cannot save") if o
|
1999
|
-
end
|
2000
|
-
end
|
2001
|
-
opts[:_setter] = proc{|o| set_one_to_one_associated_object(opts, o)}
|
2002
|
-
else
|
2003
|
-
save_opts[:raise_on_failure] = opts[:raise_on_save_failure] != false
|
2004
|
-
|
2005
|
-
opts[:adder] ||= proc do |o|
|
2006
|
-
cks.zip(cpks).each{|k, pk| o.send(:"#{k}=", send(pk))}
|
2007
|
-
o.save(save_opts)
|
2008
|
-
end
|
2009
|
-
|
2010
|
-
opts[:remover] ||= proc do |o|
|
2011
|
-
cks.each{|k| o.send(:"#{k}=", nil)}
|
2012
|
-
o.save(save_opts)
|
2013
|
-
end
|
2014
|
-
|
2015
|
-
opts[:clearer] ||= proc do
|
2016
|
-
_apply_association_options(opts, opts.associated_dataset.where(cks.zip(cpks.map{|k| send(k)}))).update(ck_nil_hash)
|
2017
|
-
end
|
2018
|
-
end
|
2019
|
-
end
|
2020
|
-
|
2021
|
-
# Alias of def_many_to_many, since they share pretty much the same code.
|
2022
|
-
def def_one_through_one(opts)
|
2023
|
-
def_many_to_many(opts)
|
2024
|
-
end
|
2025
|
-
|
2026
|
-
# Alias of def_one_to_many, since they share pretty much the same code.
|
2027
|
-
def def_one_to_one(opts)
|
2028
|
-
def_one_to_many(opts)
|
2029
|
-
end
|
2030
|
-
|
2031
|
-
# Return dataset to graph into given the association reflection, applying the :callback option if set.
|
2032
|
-
def eager_graph_dataset(opts, eager_options)
|
2033
|
-
ds = opts.associated_class.dataset
|
2034
|
-
if cb = eager_options[:callback]
|
2035
|
-
ds = cb.call(ds)
|
2036
|
-
end
|
2037
|
-
ds
|
2038
|
-
end
|
2039
|
-
end
|
2040
|
-
|
2041
|
-
# Instance methods used to implement the associations support.
|
2042
|
-
module InstanceMethods
|
2043
|
-
# The currently cached associations. A hash with the keys being the
|
2044
|
-
# association name symbols and the values being the associated object
|
2045
|
-
# or nil (many_to_one), or the array of associated objects (*_to_many).
|
2046
|
-
def associations
|
2047
|
-
@associations ||= {}
|
2048
|
-
end
|
2049
|
-
|
2050
|
-
# Freeze the associations cache when freezing the object. Note that
|
2051
|
-
# retrieving associations after freezing will still work in most cases,
|
2052
|
-
# but the associations will not be cached in the association cache.
|
2053
|
-
def freeze
|
2054
|
-
associations.freeze
|
2055
|
-
super
|
2056
|
-
end
|
2057
|
-
|
2058
|
-
private
|
2059
|
-
|
2060
|
-
# Apply the association options such as :order and :limit to the given dataset, returning a modified dataset.
|
2061
|
-
def _apply_association_options(opts, ds)
|
2062
|
-
unless ds.kind_of?(AssociationDatasetMethods)
|
2063
|
-
ds = opts.apply_dataset_changes(ds)
|
2064
|
-
end
|
2065
|
-
ds.model_object = self
|
2066
|
-
ds = ds.eager_graph(opts[:eager_graph]) if opts[:eager_graph] && opts.eager_graph_lazy_dataset?
|
2067
|
-
ds = instance_exec(ds, &opts[:block]) if opts[:block]
|
2068
|
-
ds
|
2069
|
-
end
|
2070
|
-
|
2071
|
-
# Return a dataset for the association after applying any dynamic callback.
|
2072
|
-
def _associated_dataset(opts, dynamic_opts)
|
2073
|
-
ds = send(opts.dataset_method)
|
2074
|
-
if callback = dynamic_opts[:callback]
|
2075
|
-
ds = callback.call(ds)
|
2076
|
-
end
|
2077
|
-
ds
|
2078
|
-
end
|
2079
|
-
|
2080
|
-
# A placeholder literalizer that can be used to load the association, or nil to not use one.
|
2081
|
-
def _associated_object_loader(opts, dynamic_opts)
|
2082
|
-
if !dynamic_opts[:callback] && (loader = opts.placeholder_loader)
|
2083
|
-
loader
|
2084
|
-
end
|
2085
|
-
end
|
2086
|
-
|
2087
|
-
# Return an association dataset for the given association reflection
|
2088
|
-
def _dataset(opts)
|
2089
|
-
raise(Sequel::Error, "model object #{inspect} does not have a primary key") if opts.dataset_need_primary_key? && !pk
|
2090
|
-
ds = if opts[:dataset].arity == 1
|
2091
|
-
instance_exec(opts, &opts[:dataset])
|
2092
|
-
else
|
2093
|
-
instance_exec(&opts[:dataset])
|
2094
|
-
end
|
2095
|
-
_apply_association_options(opts, ds)
|
2096
|
-
end
|
2097
|
-
|
2098
|
-
# Dataset for the join table of the given many to many association reflection
|
2099
|
-
def _join_table_dataset(opts)
|
2100
|
-
ds = model.db.from(opts.join_table_source)
|
2101
|
-
opts[:join_table_block] ? opts[:join_table_block].call(ds) : ds
|
2102
|
-
end
|
2103
|
-
|
2104
|
-
# Return the associated single object for the given association reflection and dynamic options
|
2105
|
-
# (or nil if no associated object).
|
2106
|
-
def _load_associated_object(opts, dynamic_opts)
|
2107
|
-
_load_associated_object_array(opts, dynamic_opts).first
|
2108
|
-
end
|
2109
|
-
|
2110
|
-
# Return the associated single object using a primary key lookup on the associated class.
|
2111
|
-
def _load_associated_object_via_primary_key(opts)
|
2112
|
-
opts.associated_class.send(:primary_key_lookup, ((fk = opts[:key]).is_a?(Array) ? fk.map{|c| send(c)} : send(fk)))
|
2113
|
-
end
|
2114
|
-
|
2115
|
-
# Load the associated objects for the given association reflection and dynamic options
|
2116
|
-
# as an array.
|
2117
|
-
def _load_associated_object_array(opts, dynamic_opts)
|
2118
|
-
if loader = _associated_object_loader(opts, dynamic_opts)
|
2119
|
-
loader.all(*opts.predicate_key_values(self))
|
2120
|
-
else
|
2121
|
-
_associated_dataset(opts, dynamic_opts).all
|
2122
|
-
end
|
2123
|
-
end
|
2124
|
-
|
2125
|
-
# Return the associated objects from the dataset, without association callbacks, reciprocals, and caching.
|
2126
|
-
# Still apply the dynamic callback if present.
|
2127
|
-
def _load_associated_objects(opts, dynamic_opts=OPTS)
|
2128
|
-
if opts.can_have_associated_objects?(self)
|
2129
|
-
if opts.returns_array?
|
2130
|
-
_load_associated_object_array(opts, dynamic_opts)
|
2131
|
-
elsif load_with_primary_key_lookup?(opts, dynamic_opts)
|
2132
|
-
_load_associated_object_via_primary_key(opts)
|
2133
|
-
else
|
2134
|
-
_load_associated_object(opts, dynamic_opts)
|
2135
|
-
end
|
2136
|
-
elsif opts.returns_array?
|
2137
|
-
[]
|
2138
|
-
end
|
2139
|
-
end
|
2140
|
-
|
2141
|
-
# Clear the associations cache when refreshing
|
2142
|
-
def _refresh_set_values(hash)
|
2143
|
-
@associations.clear if @associations
|
2144
|
-
super
|
2145
|
-
end
|
2146
|
-
|
2147
|
-
# Add the given associated object to the given association
|
2148
|
-
def add_associated_object(opts, o, *args)
|
2149
|
-
klass = opts.associated_class
|
2150
|
-
if o.is_a?(Hash)
|
2151
|
-
o = klass.new(o)
|
2152
|
-
elsif o.is_a?(Integer) || o.is_a?(String) || o.is_a?(Array)
|
2153
|
-
o = klass.with_pk!(o)
|
2154
|
-
elsif !o.is_a?(klass)
|
2155
|
-
raise(Sequel::Error, "associated object #{o.inspect} not of correct type #{klass}")
|
2156
|
-
end
|
2157
|
-
raise(Sequel::Error, "model object #{inspect} does not have a primary key") if opts.dataset_need_primary_key? && !pk
|
2158
|
-
ensure_associated_primary_key(opts, o, *args)
|
2159
|
-
return if run_association_callbacks(opts, :before_add, o) == false
|
2160
|
-
return if !send(opts._add_method, o, *args) && opts.handle_silent_modification_failure?
|
2161
|
-
if array = associations[opts[:name]] and !array.include?(o)
|
2162
|
-
array.push(o)
|
2163
|
-
end
|
2164
|
-
add_reciprocal_object(opts, o)
|
2165
|
-
run_association_callbacks(opts, :after_add, o)
|
2166
|
-
o
|
2167
|
-
end
|
2168
|
-
|
2169
|
-
# Add/Set the current object to/as the given object's reciprocal association.
|
2170
|
-
def add_reciprocal_object(opts, o)
|
2171
|
-
return if o.frozen?
|
2172
|
-
return unless reciprocal = opts.reciprocal
|
2173
|
-
if opts.reciprocal_array?
|
2174
|
-
if array = o.associations[reciprocal] and !array.include?(self)
|
2175
|
-
array.push(self)
|
2176
|
-
end
|
2177
|
-
else
|
2178
|
-
o.associations[reciprocal] = self
|
2179
|
-
end
|
2180
|
-
end
|
2181
|
-
|
2182
|
-
# Call uniq! on the given array. This is used by the :uniq option,
|
2183
|
-
# and is an actual method for memory reasons.
|
2184
|
-
def array_uniq!(a)
|
2185
|
-
a.uniq!
|
2186
|
-
end
|
2187
|
-
|
2188
|
-
# If a foreign key column value changes, clear the related
|
2189
|
-
# cached associations.
|
2190
|
-
def change_column_value(column, value)
|
2191
|
-
if assocs = model.autoreloading_associations[column]
|
2192
|
-
assocs.each{|a| associations.delete(a)}
|
2193
|
-
end
|
2194
|
-
super
|
2195
|
-
end
|
2196
|
-
|
2197
|
-
# Save the associated object if the associated object needs a primary key
|
2198
|
-
# and the associated object is new and does not have one. Raise an error if
|
2199
|
-
# the object still does not have a primary key
|
2200
|
-
def ensure_associated_primary_key(opts, o, *args)
|
2201
|
-
if opts.need_associated_primary_key?
|
2202
|
-
o.save(:validate=>opts[:validate]) if o.new?
|
2203
|
-
raise(Sequel::Error, "associated object #{o.inspect} does not have a primary key") unless o.pk
|
2204
|
-
end
|
2205
|
-
end
|
2206
|
-
|
2207
|
-
# Load the associated objects using the dataset, handling callbacks, reciprocals, and caching.
|
2208
|
-
def load_associated_objects(opts, dynamic_opts=nil)
|
2209
|
-
if dynamic_opts == true or dynamic_opts == false or dynamic_opts == nil
|
2210
|
-
dynamic_opts = {:reload=>dynamic_opts}
|
2211
|
-
elsif dynamic_opts.respond_to?(:call)
|
2212
|
-
dynamic_opts = {:callback=>dynamic_opts}
|
2213
|
-
end
|
2214
|
-
if block_given?
|
2215
|
-
dynamic_opts = dynamic_opts.merge(:callback=>Proc.new)
|
2216
|
-
end
|
2217
|
-
name = opts[:name]
|
2218
|
-
if associations.include?(name) and !dynamic_opts[:callback] and !dynamic_opts[:reload]
|
2219
|
-
associations[name]
|
2220
|
-
else
|
2221
|
-
objs = _load_associated_objects(opts, dynamic_opts)
|
2222
|
-
if opts.set_reciprocal_to_self?
|
2223
|
-
if opts.returns_array?
|
2224
|
-
objs.each{|o| add_reciprocal_object(opts, o)}
|
2225
|
-
elsif objs
|
2226
|
-
add_reciprocal_object(opts, objs)
|
2227
|
-
end
|
2228
|
-
end
|
2229
|
-
|
2230
|
-
# If the current object is frozen, you can't update the associations
|
2231
|
-
# cache. This can cause issues for after_load procs that expect
|
2232
|
-
# the objects to be already cached in the associations, but
|
2233
|
-
# unfortunately that case cannot be handled.
|
2234
|
-
associations[name] = objs unless frozen?
|
2235
|
-
run_association_callbacks(opts, :after_load, objs)
|
2236
|
-
frozen? ? objs : associations[name]
|
2237
|
-
end
|
2238
|
-
end
|
2239
|
-
|
2240
|
-
# Whether to use a simple primary key lookup on the associated class when loading.
|
2241
|
-
def load_with_primary_key_lookup?(opts, dynamic_opts)
|
2242
|
-
opts[:type] == :many_to_one &&
|
2243
|
-
!dynamic_opts[:callback] &&
|
2244
|
-
opts.send(:cached_fetch, :many_to_one_pk_lookup){opts.primary_key == opts.associated_class.primary_key}
|
2245
|
-
end
|
2246
|
-
|
2247
|
-
# Remove all associated objects from the given association
|
2248
|
-
def remove_all_associated_objects(opts, *args)
|
2249
|
-
raise(Sequel::Error, "model object #{inspect} does not have a primary key") if opts.dataset_need_primary_key? && !pk
|
2250
|
-
send(opts._remove_all_method, *args)
|
2251
|
-
ret = associations[opts[:name]].each{|o| remove_reciprocal_object(opts, o)} if associations.include?(opts[:name])
|
2252
|
-
associations[opts[:name]] = []
|
2253
|
-
ret
|
2254
|
-
end
|
2255
|
-
|
2256
|
-
# Remove the given associated object from the given association
|
2257
|
-
def remove_associated_object(opts, o, *args)
|
2258
|
-
klass = opts.associated_class
|
2259
|
-
if o.is_a?(Integer) || o.is_a?(String) || o.is_a?(Array)
|
2260
|
-
o = remove_check_existing_object_from_pk(opts, o, *args)
|
2261
|
-
elsif !o.is_a?(klass)
|
2262
|
-
raise(Sequel::Error, "associated object #{o.inspect} not of correct type #{klass}")
|
2263
|
-
elsif opts.remove_should_check_existing? && send(opts.dataset_method).where(o.pk_hash).empty?
|
2264
|
-
raise(Sequel::Error, "associated object #{o.inspect} is not currently associated to #{inspect}")
|
2265
|
-
end
|
2266
|
-
raise(Sequel::Error, "model object #{inspect} does not have a primary key") if opts.dataset_need_primary_key? && !pk
|
2267
|
-
raise(Sequel::Error, "associated object #{o.inspect} does not have a primary key") if opts.need_associated_primary_key? && !o.pk
|
2268
|
-
return if run_association_callbacks(opts, :before_remove, o) == false
|
2269
|
-
return if !send(opts._remove_method, o, *args) && opts.handle_silent_modification_failure?
|
2270
|
-
associations[opts[:name]].delete_if{|x| o === x} if associations.include?(opts[:name])
|
2271
|
-
remove_reciprocal_object(opts, o)
|
2272
|
-
run_association_callbacks(opts, :after_remove, o)
|
2273
|
-
o
|
2274
|
-
end
|
2275
|
-
|
2276
|
-
# Check that the object from the associated table specified by the primary key
|
2277
|
-
# is currently associated to the receiver. If it is associated, return the object, otherwise
|
2278
|
-
# raise an error.
|
2279
|
-
def remove_check_existing_object_from_pk(opts, o, *args)
|
2280
|
-
key = o
|
2281
|
-
pkh = opts.associated_class.qualified_primary_key_hash(key)
|
2282
|
-
raise(Sequel::Error, "no object with key(s) #{key.inspect} is currently associated to #{inspect}") unless o = send(opts.dataset_method).first(pkh)
|
2283
|
-
o
|
2284
|
-
end
|
2285
|
-
|
2286
|
-
# Remove/unset the current object from/as the given object's reciprocal association.
|
2287
|
-
def remove_reciprocal_object(opts, o)
|
2288
|
-
return unless reciprocal = opts.reciprocal
|
2289
|
-
if opts.reciprocal_array?
|
2290
|
-
if array = o.associations[reciprocal]
|
2291
|
-
array.delete_if{|x| self === x}
|
2292
|
-
end
|
2293
|
-
else
|
2294
|
-
o.associations[reciprocal] = nil
|
2295
|
-
end
|
2296
|
-
end
|
2297
|
-
|
2298
|
-
# Run the callback for the association with the object.
|
2299
|
-
def run_association_callbacks(reflection, callback_type, object)
|
2300
|
-
raise_error = raise_on_save_failure || !reflection.returns_array?
|
2301
|
-
stop_on_false = [:before_add, :before_remove, :before_set].include?(callback_type)
|
2302
|
-
reflection[callback_type].each do |cb|
|
2303
|
-
res = case cb
|
2304
|
-
when Symbol
|
2305
|
-
send(cb, object)
|
2306
|
-
when Proc
|
2307
|
-
cb.call(self, object)
|
2308
|
-
else
|
2309
|
-
raise Error, "callbacks should either be Procs or Symbols"
|
2310
|
-
end
|
2311
|
-
if res == false and stop_on_false
|
2312
|
-
raise(BeforeHookFailed, "Unable to modify association for #{inspect}: one of the #{callback_type} hooks returned false") if raise_error
|
2313
|
-
return false
|
2314
|
-
end
|
2315
|
-
end
|
2316
|
-
end
|
2317
|
-
|
2318
|
-
# Set the given object as the associated object for the given *_to_one association reflection
|
2319
|
-
def _set_associated_object(opts, o)
|
2320
|
-
a = associations[opts[:name]]
|
2321
|
-
return if a && a == o && !set_associated_object_if_same?
|
2322
|
-
run_association_callbacks(opts, :before_set, o)
|
2323
|
-
remove_reciprocal_object(opts, a) if a
|
2324
|
-
send(opts._setter_method, o)
|
2325
|
-
associations[opts[:name]] = o
|
2326
|
-
add_reciprocal_object(opts, o) if o
|
2327
|
-
run_association_callbacks(opts, :after_set, o)
|
2328
|
-
o
|
2329
|
-
end
|
2330
|
-
|
2331
|
-
# Whether run the associated object setter code if passed the same object as the one already
|
2332
|
-
# cached in the association. Usually not set (so nil), can be set on a per-object basis
|
2333
|
-
# if necessary.
|
2334
|
-
def set_associated_object_if_same?
|
2335
|
-
@set_associated_object_if_same
|
2336
|
-
end
|
2337
|
-
|
2338
|
-
# Set the given object as the associated object for the given many_to_one association reflection
|
2339
|
-
def set_associated_object(opts, o)
|
2340
|
-
raise(Error, "associated object #{o.inspect} does not have a primary key") if o && !o.pk
|
2341
|
-
_set_associated_object(opts, o)
|
2342
|
-
end
|
2343
|
-
|
2344
|
-
# Set the given object as the associated object for the given one_to_one association reflection
|
2345
|
-
def set_one_to_one_associated_object(opts, o)
|
2346
|
-
raise(Error, "object #{inspect} does not have a primary key") unless pk
|
2347
|
-
_set_associated_object(opts, o)
|
2348
|
-
end
|
2349
|
-
end
|
2350
|
-
|
2351
|
-
# Eager loading makes it so that you can load all associated records for a
|
2352
|
-
# set of objects in a single query, instead of a separate query for each object.
|
2353
|
-
#
|
2354
|
-
# Two separate implementations are provided. +eager+ should be used most of the
|
2355
|
-
# time, as it loads associated records using one query per association. However,
|
2356
|
-
# it does not allow you the ability to filter or order based on columns in associated tables. +eager_graph+ loads
|
2357
|
-
# all records in a single query using JOINs, allowing you to filter or order based on columns in associated
|
2358
|
-
# tables. However, +eager_graph+ is usually slower than +eager+, especially if multiple
|
2359
|
-
# one_to_many or many_to_many associations are joined.
|
2360
|
-
#
|
2361
|
-
# You can cascade the eager loading (loading associations on associated objects)
|
2362
|
-
# with no limit to the depth of the cascades. You do this by passing a hash to +eager+ or +eager_graph+
|
2363
|
-
# with the keys being associations of the current model and values being
|
2364
|
-
# associations of the model associated with the current model via the key.
|
2365
|
-
#
|
2366
|
-
# The arguments can be symbols or hashes with symbol keys (for cascaded
|
2367
|
-
# eager loading). Examples:
|
2368
|
-
#
|
2369
|
-
# Album.eager(:artist).all
|
2370
|
-
# Album.eager_graph(:artist).all
|
2371
|
-
# Album.eager(:artist, :genre).all
|
2372
|
-
# Album.eager_graph(:artist, :genre).all
|
2373
|
-
# Album.eager(:artist).eager(:genre).all
|
2374
|
-
# Album.eager_graph(:artist).eager(:genre).all
|
2375
|
-
# Artist.eager(:albums=>:tracks).all
|
2376
|
-
# Artist.eager_graph(:albums=>:tracks).all
|
2377
|
-
# Artist.eager(:albums=>{:tracks=>:genre}).all
|
2378
|
-
# Artist.eager_graph(:albums=>{:tracks=>:genre}).all
|
2379
|
-
#
|
2380
|
-
# You can also pass a callback as a hash value in order to customize the dataset being
|
2381
|
-
# eager loaded at query time, analogous to the way the :eager_block association option
|
2382
|
-
# allows you to customize it at association definition time. For example,
|
2383
|
-
# if you wanted artists with their albums since 1990:
|
2384
|
-
#
|
2385
|
-
# Artist.eager(:albums => proc{|ds| ds.where{year > 1990}})
|
2386
|
-
#
|
2387
|
-
# Or if you needed albums and their artist's name only, using a single query:
|
2388
|
-
#
|
2389
|
-
# Albums.eager_graph(:artist => proc{|ds| ds.select(:name)})
|
2390
|
-
#
|
2391
|
-
# To cascade eager loading while using a callback, you substitute the cascaded
|
2392
|
-
# associations with a single entry hash that has the proc callback as the key and
|
2393
|
-
# the cascaded associations as the value. This will load artists with their albums
|
2394
|
-
# since 1990, and also the tracks on those albums and the genre for those tracks:
|
2395
|
-
#
|
2396
|
-
# Artist.eager(:albums => {proc{|ds| ds.where{year > 1990}}=>{:tracks => :genre}})
|
2397
|
-
module DatasetMethods
|
2398
|
-
Sequel::Dataset.def_mutation_method(:eager, :eager_graph, :module=>self)
|
2399
|
-
|
2400
|
-
%w'inner left right full'.each do |type|
|
2401
|
-
class_eval <<END, __FILE__, __LINE__+1
|
2402
|
-
def association_#{type}_join(*associations)
|
2403
|
-
_association_join(:#{type}, associations)
|
2404
|
-
end
|
2405
|
-
END
|
2406
|
-
end
|
2407
|
-
|
2408
|
-
# Adds one or more INNER JOINs to the existing dataset using the keys and conditions
|
2409
|
-
# specified by the given association. The following methods also exist for specifying
|
2410
|
-
# a different type of JOIN:
|
2411
|
-
#
|
2412
|
-
# association_full_join :: FULL JOIN
|
2413
|
-
# association_inner_join :: INNER JOIN
|
2414
|
-
# association_left_join :: LEFT JOIN
|
2415
|
-
# association_right_join :: RIGHT JOIN
|
2416
|
-
def association_join(*associations)
|
2417
|
-
association_inner_join(*associations)
|
2418
|
-
end
|
2419
|
-
|
2420
|
-
# If the expression is in the form <tt>x = y</tt> where +y+ is a <tt>Sequel::Model</tt>
|
2421
|
-
# instance, array of <tt>Sequel::Model</tt> instances, or a <tt>Sequel::Model</tt> dataset,
|
2422
|
-
# assume +x+ is an association symbol and look up the association reflection
|
2423
|
-
# via the dataset's model. From there, return the appropriate SQL based on the type of
|
2424
|
-
# association and the values of the foreign/primary keys of +y+. For most association
|
2425
|
-
# types, this is a simple transformation, but for +many_to_many+ associations this
|
2426
|
-
# creates a subquery to the join table.
|
2427
|
-
def complex_expression_sql_append(sql, op, args)
|
2428
|
-
r = args.at(1)
|
2429
|
-
if (((op == :'=' || op == :'!=') and r.is_a?(Sequel::Model)) ||
|
2430
|
-
(multiple = ((op == :IN || op == :'NOT IN') and ((is_ds = r.is_a?(Sequel::Dataset)) or r.all?{|x| x.is_a?(Sequel::Model)}))))
|
2431
|
-
l = args.at(0)
|
2432
|
-
if ar = model.association_reflections[l]
|
2433
|
-
if multiple
|
2434
|
-
klass = ar.associated_class
|
2435
|
-
if is_ds
|
2436
|
-
if r.respond_to?(:model)
|
2437
|
-
unless r.model <= klass
|
2438
|
-
# A dataset for a different model class, could be a valid regular query
|
2439
|
-
return super
|
2440
|
-
end
|
2441
|
-
else
|
2442
|
-
# Not a model dataset, could be a valid regular query
|
2443
|
-
return super
|
2444
|
-
end
|
2445
|
-
else
|
2446
|
-
unless r.all?{|x| x.is_a?(klass)}
|
2447
|
-
raise Sequel::Error, "invalid association class for one object for association #{l.inspect} used in dataset filter for model #{model.inspect}, expected class #{klass.inspect}"
|
2448
|
-
end
|
2449
|
-
end
|
2450
|
-
elsif !r.is_a?(ar.associated_class)
|
2451
|
-
raise Sequel::Error, "invalid association class #{r.class.inspect} for association #{l.inspect} used in dataset filter for model #{model.inspect}, expected class #{ar.associated_class.inspect}"
|
2452
|
-
end
|
2453
|
-
|
2454
|
-
if exp = association_filter_expression(op, ar, r)
|
2455
|
-
literal_append(sql, exp)
|
2456
|
-
else
|
2457
|
-
raise Sequel::Error, "invalid association type #{ar[:type].inspect} for association #{l.inspect} used in dataset filter for model #{model.inspect}"
|
2458
|
-
end
|
2459
|
-
elsif multiple && (is_ds || r.empty?)
|
2460
|
-
# Not a query designed for this support, could be a valid regular query
|
2461
|
-
super
|
2462
|
-
else
|
2463
|
-
raise Sequel::Error, "invalid association #{l.inspect} used in dataset filter for model #{model.inspect}"
|
2464
|
-
end
|
2465
|
-
else
|
2466
|
-
super
|
2467
|
-
end
|
2468
|
-
end
|
2469
|
-
|
2470
|
-
# The preferred eager loading method. Loads all associated records using one
|
2471
|
-
# query for each association.
|
2472
|
-
#
|
2473
|
-
# The basic idea for how it works is that the dataset is first loaded normally.
|
2474
|
-
# Then it goes through all associations that have been specified via +eager+.
|
2475
|
-
# It loads each of those associations separately, then associates them back
|
2476
|
-
# to the original dataset via primary/foreign keys. Due to the necessity of
|
2477
|
-
# all objects being present, you need to use +all+ to use eager loading, as it
|
2478
|
-
# can't work with +each+.
|
2479
|
-
#
|
2480
|
-
# This implementation avoids the complexity of extracting an object graph out
|
2481
|
-
# of a single dataset, by building the object graph out of multiple datasets,
|
2482
|
-
# one for each association. By using a separate dataset for each association,
|
2483
|
-
# it avoids problems such as aliasing conflicts and creating cartesian product
|
2484
|
-
# result sets if multiple one_to_many or many_to_many eager associations are requested.
|
2485
|
-
#
|
2486
|
-
# One limitation of using this method is that you cannot filter the dataset
|
2487
|
-
# based on values of columns in an associated table, since the associations are loaded
|
2488
|
-
# in separate queries. To do that you need to load all associations in the
|
2489
|
-
# same query, and extract an object graph from the results of that query. If you
|
2490
|
-
# need to filter based on columns in associated tables, look at +eager_graph+
|
2491
|
-
# or join the tables you need to filter on manually.
|
2492
|
-
#
|
2493
|
-
# Each association's order, if defined, is respected.
|
2494
|
-
# If the association uses a block or has an :eager_block argument, it is used.
|
2495
|
-
def eager(*associations)
|
2496
|
-
opts = @opts[:eager]
|
2497
|
-
association_opts = eager_options_for_associations(associations)
|
2498
|
-
opts = opts ? opts.merge(association_opts) : association_opts
|
2499
|
-
clone(:eager=>opts)
|
2500
|
-
end
|
2501
|
-
|
2502
|
-
# The secondary eager loading method. Loads all associations in a single query. This
|
2503
|
-
# method should only be used if you need to filter or order based on columns in associated tables.
|
2504
|
-
#
|
2505
|
-
# This method uses <tt>Dataset#graph</tt> to create appropriate aliases for columns in all the
|
2506
|
-
# tables. Then it uses the graph's metadata to build the associations from the single hash, and
|
2507
|
-
# finally replaces the array of hashes with an array model objects inside all.
|
2508
|
-
#
|
2509
|
-
# Be very careful when using this with multiple one_to_many or many_to_many associations, as you can
|
2510
|
-
# create large cartesian products. If you must graph multiple one_to_many and many_to_many associations,
|
2511
|
-
# make sure your filters are narrow if you have a large database.
|
2512
|
-
#
|
2513
|
-
# Each association's order, if definied, is respected. +eager_graph+ probably
|
2514
|
-
# won't work correctly on a limited dataset, unless you are
|
2515
|
-
# only graphing many_to_one, one_to_one, and one_through_one associations.
|
2516
|
-
#
|
2517
|
-
# Does not use the block defined for the association, since it does a single query for
|
2518
|
-
# all objects. You can use the :graph_* association options to modify the SQL query.
|
2519
|
-
#
|
2520
|
-
# Like +eager+, you need to call +all+ on the dataset for the eager loading to work. If you just
|
2521
|
-
# call +each+, it will yield plain hashes, each containing all columns from all the tables.
|
2522
|
-
def eager_graph(*associations)
|
2523
|
-
eager_graph_with_options(associations)
|
2524
|
-
end
|
2525
|
-
|
2526
|
-
# Run eager_graph with some options specific to just this call. Unlike eager_graph, this takes
|
2527
|
-
# the associations as a single argument instead of multiple arguments.
|
2528
|
-
#
|
2529
|
-
# Options:
|
2530
|
-
#
|
2531
|
-
# :join_type :: Override the join type specified in the association
|
2532
|
-
# :limit_strategy :: Use a strategy for handling limits on associations.
|
2533
|
-
# Appropriate :limit_strategy values are:
|
2534
|
-
# true :: Pick the most appropriate based on what the database supports
|
2535
|
-
# :distinct_on :: Force use of DISTINCT ON stategy (*_one associations only)
|
2536
|
-
# :correlated_subquery :: Force use of correlated subquery strategy (one_to_* associations only)
|
2537
|
-
# :window_function :: Force use of window function strategy
|
2538
|
-
# :ruby :: Don't modify the SQL, implement limits/offsets with array slicing
|
2539
|
-
#
|
2540
|
-
# This can also be a hash with association name symbol keys and one of the above values,
|
2541
|
-
# to use different strategies per association.
|
2542
|
-
#
|
2543
|
-
# The default is the :ruby strategy. Choosing a different strategy can make your code
|
2544
|
-
# significantly slower in some cases (perhaps even the majority of cases), so you should
|
2545
|
-
# only use this if you have benchmarked that it is faster for your use cases.
|
2546
|
-
def eager_graph_with_options(associations, opts=OPTS)
|
2547
|
-
associations = [associations] unless associations.is_a?(Array)
|
2548
|
-
if eg = @opts[:eager_graph]
|
2549
|
-
eg = eg.dup
|
2550
|
-
[:requirements, :reflections, :reciprocals, :limits].each{|k| eg[k] = eg[k].dup}
|
2551
|
-
eg[:local] = opts
|
2552
|
-
ds = clone(:eager_graph=>eg)
|
2553
|
-
ds.eager_graph_associations(ds, model, ds.opts[:eager_graph][:master], [], *associations)
|
2554
|
-
else
|
2555
|
-
# Each of the following have a symbol key for the table alias, with the following values:
|
2556
|
-
# :reciprocals :: the reciprocal value to use for this association
|
2557
|
-
# :reflections :: AssociationReflection instance related to this association
|
2558
|
-
# :requirements :: array of requirements for this association
|
2559
|
-
# :limits :: Any limit/offset array slicing that need to be handled in ruby land after loading
|
2560
|
-
opts = {:requirements=>{}, :master=>alias_symbol(first_source), :reflections=>{}, :reciprocals=>{}, :limits=>{}, :local=>opts, :cartesian_product_number=>0, :row_proc=>row_proc}
|
2561
|
-
ds = clone(:eager_graph=>opts)
|
2562
|
-
ds.eager_graph_associations(ds, model, ds.opts[:eager_graph][:master], [], *associations).naked
|
2563
|
-
end
|
2564
|
-
end
|
2565
|
-
|
2566
|
-
# Do not attempt to split the result set into associations,
|
2567
|
-
# just return results as simple objects. This is useful if you
|
2568
|
-
# want to use eager_graph as a shortcut to have all of the joins
|
2569
|
-
# and aliasing set up, but want to do something else with the dataset.
|
2570
|
-
def ungraphed
|
2571
|
-
ds = super.clone(:eager_graph=>nil)
|
2572
|
-
if (eg = @opts[:eager_graph]) && (rp = eg[:row_proc])
|
2573
|
-
ds.row_proc = rp
|
2574
|
-
end
|
2575
|
-
ds
|
2576
|
-
end
|
2577
|
-
|
2578
|
-
protected
|
2579
|
-
|
2580
|
-
# Call graph on the association with the correct arguments,
|
2581
|
-
# update the eager_graph data structure, and recurse into
|
2582
|
-
# eager_graph_associations if there are any passed in associations
|
2583
|
-
# (which would be dependencies of the current association)
|
2584
|
-
#
|
2585
|
-
# Arguments:
|
2586
|
-
# ds :: Current dataset
|
2587
|
-
# model :: Current Model
|
2588
|
-
# ta :: table_alias used for the parent association
|
2589
|
-
# requirements :: an array, used as a stack for requirements
|
2590
|
-
# r :: association reflection for the current association, or an SQL::AliasedExpression
|
2591
|
-
# with the reflection as the expression and the alias base as the aliaz.
|
2592
|
-
# *associations :: any associations dependent on this one
|
2593
|
-
def eager_graph_association(ds, model, ta, requirements, r, *associations)
|
2594
|
-
if r.is_a?(SQL::AliasedExpression)
|
2595
|
-
alias_base = r.alias
|
2596
|
-
r = r.expression
|
2597
|
-
else
|
2598
|
-
alias_base = r[:graph_alias_base]
|
2599
|
-
end
|
2600
|
-
assoc_table_alias = ds.unused_table_alias(alias_base)
|
2601
|
-
loader = r[:eager_grapher]
|
2602
|
-
if !associations.empty?
|
2603
|
-
if associations.first.respond_to?(:call)
|
2604
|
-
callback = associations.first
|
2605
|
-
associations = {}
|
2606
|
-
elsif associations.length == 1 && (assocs = associations.first).is_a?(Hash) && assocs.length == 1 && (pr_assoc = assocs.to_a.first) && pr_assoc.first.respond_to?(:call)
|
2607
|
-
callback, assoc = pr_assoc
|
2608
|
-
associations = assoc.is_a?(Array) ? assoc : [assoc]
|
2609
|
-
end
|
2610
|
-
end
|
2611
|
-
local_opts = ds.opts[:eager_graph][:local]
|
2612
|
-
limit_strategy = r.eager_graph_limit_strategy(local_opts[:limit_strategy])
|
2613
|
-
ds = loader.call(:self=>ds, :table_alias=>assoc_table_alias, :implicit_qualifier=>(ta == ds.opts[:eager_graph][:master]) ? first_source : qualifier_from_alias_symbol(ta, first_source), :callback=>callback, :join_type=>local_opts[:join_type], :join_only=>local_opts[:join_only], :limit_strategy=>limit_strategy, :from_self_alias=>ds.opts[:eager_graph][:master])
|
2614
|
-
if r[:order_eager_graph] && (order = r.fetch(:graph_order, r[:order]))
|
2615
|
-
ds = ds.order_more(*qualified_expression(order, assoc_table_alias))
|
2616
|
-
end
|
2617
|
-
eager_graph = ds.opts[:eager_graph]
|
2618
|
-
eager_graph[:requirements][assoc_table_alias] = requirements.dup
|
2619
|
-
eager_graph[:reflections][assoc_table_alias] = r
|
2620
|
-
if limit_strategy == :ruby
|
2621
|
-
eager_graph[:limits][assoc_table_alias] = r.limit_and_offset
|
2622
|
-
end
|
2623
|
-
eager_graph[:cartesian_product_number] += r[:cartesian_product_number] || 2
|
2624
|
-
ds = ds.eager_graph_associations(ds, r.associated_class, assoc_table_alias, requirements + [assoc_table_alias], *associations) unless associations.empty?
|
2625
|
-
ds
|
2626
|
-
end
|
2627
|
-
|
2628
|
-
# Check the associations are valid for the given model.
|
2629
|
-
# Call eager_graph_association on each association.
|
2630
|
-
#
|
2631
|
-
# Arguments:
|
2632
|
-
# ds :: Current dataset
|
2633
|
-
# model :: Current Model
|
2634
|
-
# ta :: table_alias used for the parent association
|
2635
|
-
# requirements :: an array, used as a stack for requirements
|
2636
|
-
# *associations :: the associations to add to the graph
|
2637
|
-
def eager_graph_associations(ds, model, ta, requirements, *associations)
|
2638
|
-
return ds if associations.empty?
|
2639
|
-
associations.flatten.each do |association|
|
2640
|
-
ds = case association
|
2641
|
-
when Symbol, SQL::AliasedExpression
|
2642
|
-
ds.eager_graph_association(ds, model, ta, requirements, eager_graph_check_association(model, association))
|
2643
|
-
when Hash
|
2644
|
-
association.each do |assoc, assoc_assocs|
|
2645
|
-
ds = ds.eager_graph_association(ds, model, ta, requirements, eager_graph_check_association(model, assoc), assoc_assocs)
|
2646
|
-
end
|
2647
|
-
ds
|
2648
|
-
else
|
2649
|
-
raise(Sequel::Error, 'Associations must be in the form of a symbol or hash')
|
2650
|
-
end
|
2651
|
-
end
|
2652
|
-
ds
|
2653
|
-
end
|
2654
|
-
|
2655
|
-
# Replace the array of plain hashes with an array of model objects will all eager_graphed
|
2656
|
-
# associations set in the associations cache for each object.
|
2657
|
-
def eager_graph_build_associations(hashes)
|
2658
|
-
hashes.replace(EagerGraphLoader.new(self).load(hashes))
|
2659
|
-
end
|
2660
|
-
|
2661
|
-
private
|
2662
|
-
|
2663
|
-
# Return a new dataset with JOINs of the given type added, using the tables and
|
2664
|
-
# conditions specified by the associations.
|
2665
|
-
def _association_join(type, associations)
|
2666
|
-
clone(:join=>clone(:graph_from_self=>false).eager_graph_with_options(associations, :join_type=>type, :join_only=>true).opts[:join])
|
2667
|
-
end
|
2668
|
-
|
2669
|
-
# If the association has conditions itself, then it requires additional filters be
|
2670
|
-
# added to the current dataset to ensure that the passed in object would also be
|
2671
|
-
# included by the association's conditions.
|
2672
|
-
def add_association_filter_conditions(ref, obj, expr)
|
2673
|
-
if expr != SQL::Constants::FALSE && ref.filter_by_associations_add_conditions?
|
2674
|
-
Sequel.expr(ref.filter_by_associations_conditions_expression(obj))
|
2675
|
-
else
|
2676
|
-
expr
|
2677
|
-
end
|
2678
|
-
end
|
2679
|
-
|
2680
|
-
# Process the array of associations arguments (Symbols, Arrays, and Hashes),
|
2681
|
-
# and return a hash of options suitable for cascading.
|
2682
|
-
def eager_options_for_associations(associations)
|
2683
|
-
opts = {}
|
2684
|
-
associations.flatten.each do |association|
|
2685
|
-
case association
|
2686
|
-
when Symbol
|
2687
|
-
check_association(model, association)
|
2688
|
-
opts[association] = nil
|
2689
|
-
when Hash
|
2690
|
-
association.keys.each{|assoc| check_association(model, assoc)}
|
2691
|
-
opts.merge!(association)
|
2692
|
-
else
|
2693
|
-
raise(Sequel::Error, 'Associations must be in the form of a symbol or hash')
|
2694
|
-
end
|
2695
|
-
end
|
2696
|
-
opts
|
2697
|
-
end
|
2698
|
-
|
2699
|
-
# Return an expression for filtering by the given association reflection and associated object.
|
2700
|
-
def association_filter_expression(op, ref, obj)
|
2701
|
-
meth = :"#{ref[:type]}_association_filter_expression"
|
2702
|
-
send(meth, op, ref, obj) if respond_to?(meth, true)
|
2703
|
-
end
|
2704
|
-
|
2705
|
-
# Handle inversion for association filters by returning an inverted expression,
|
2706
|
-
# plus also handling cases where the referenced columns are NULL.
|
2707
|
-
def association_filter_handle_inversion(op, exp, cols)
|
2708
|
-
if op == :'!=' || op == :'NOT IN'
|
2709
|
-
if exp == SQL::Constants::FALSE
|
2710
|
-
~exp
|
2711
|
-
else
|
2712
|
-
~exp | Sequel::SQL::BooleanExpression.from_value_pairs(cols.zip([]), :OR)
|
2713
|
-
end
|
2714
|
-
else
|
2715
|
-
exp
|
2716
|
-
end
|
2717
|
-
end
|
2718
|
-
|
2719
|
-
# Return an expression for making sure that the given keys match the value of
|
2720
|
-
# the given methods for either the single object given or for any of the objects
|
2721
|
-
# given if +obj+ is an array.
|
2722
|
-
def association_filter_key_expression(keys, meths, obj)
|
2723
|
-
vals = if obj.is_a?(Sequel::Dataset)
|
2724
|
-
{(keys.length == 1 ? keys.first : keys)=>obj.select(*meths).exclude(Sequel::SQL::BooleanExpression.from_value_pairs(meths.zip([]), :OR))}
|
2725
|
-
else
|
2726
|
-
vals = Array(obj).reject{|o| !meths.all?{|m| o.send(m)}}
|
2727
|
-
return SQL::Constants::FALSE if vals.empty?
|
2728
|
-
if obj.is_a?(Array)
|
2729
|
-
if keys.length == 1
|
2730
|
-
meth = meths.first
|
2731
|
-
{keys.first=>vals.map{|o| o.send(meth)}}
|
2732
|
-
else
|
2733
|
-
{keys=>vals.map{|o| meths.map{|m| o.send(m)}}}
|
2734
|
-
end
|
2735
|
-
else
|
2736
|
-
keys.zip(meths.map{|k| obj.send(k)})
|
2737
|
-
end
|
2738
|
-
end
|
2739
|
-
SQL::BooleanExpression.from_value_pairs(vals)
|
2740
|
-
end
|
2741
|
-
|
2742
|
-
# Make sure the association is valid for this model, and return the related AssociationReflection.
|
2743
|
-
def check_association(model, association)
|
2744
|
-
raise(Sequel::UndefinedAssociation, "Invalid association #{association} for #{model.name}") unless reflection = model.association_reflection(association)
|
2745
|
-
raise(Sequel::Error, "Eager loading is not allowed for #{model.name} association #{association}") if reflection[:allow_eager] == false
|
2746
|
-
reflection
|
2747
|
-
end
|
2748
|
-
|
2749
|
-
# Allow associations that are eagerly graphed to be specified as an SQL::AliasedExpression, for
|
2750
|
-
# per-call determining of the alias base.
|
2751
|
-
def eager_graph_check_association(model, association)
|
2752
|
-
if association.is_a?(SQL::AliasedExpression)
|
2753
|
-
SQL::AliasedExpression.new(check_association(model, association.expression), association.alias)
|
2754
|
-
else
|
2755
|
-
check_association(model, association)
|
2756
|
-
end
|
2757
|
-
end
|
2758
|
-
|
2759
|
-
# Eagerly load all specified associations
|
2760
|
-
def eager_load(a, eager_assoc=@opts[:eager])
|
2761
|
-
return if a.empty?
|
2762
|
-
# Key is foreign/primary key name symbol
|
2763
|
-
# Value is hash with keys being foreign/primary key values (generally integers)
|
2764
|
-
# and values being an array of current model objects with that
|
2765
|
-
# specific foreign/primary key
|
2766
|
-
key_hash = {}
|
2767
|
-
# Reflections for all associations to eager load
|
2768
|
-
reflections = eager_assoc.keys.collect{|assoc| model.association_reflection(assoc) || (raise Sequel::UndefinedAssociation, "Model: #{self}, Association: #{assoc}")}
|
2769
|
-
|
2770
|
-
# Populate the key_hash entry for each association being eagerly loaded
|
2771
|
-
reflections.each do |r|
|
2772
|
-
if key = r.eager_loader_key
|
2773
|
-
# key_hash for this key has already been populated,
|
2774
|
-
# skip populating again so that duplicate values
|
2775
|
-
# aren't added.
|
2776
|
-
unless id_map = key_hash[key]
|
2777
|
-
id_map = key_hash[key] = Hash.new{|h,k| h[k] = []}
|
2778
|
-
|
2779
|
-
# Supporting both single (Symbol) and composite (Array) keys.
|
2780
|
-
a.each do |rec|
|
2781
|
-
case key
|
2782
|
-
when Array
|
2783
|
-
if (k = key.map{|k2| rec.send(k2)}) && k.all?
|
2784
|
-
id_map[k] << rec
|
2785
|
-
end
|
2786
|
-
when Symbol
|
2787
|
-
if k = rec.send(key)
|
2788
|
-
id_map[k] << rec
|
2789
|
-
end
|
2790
|
-
else
|
2791
|
-
raise Error, "unhandled eager_loader_key #{key.inspect} for association #{r[:name]}"
|
2792
|
-
end
|
2793
|
-
end
|
2794
|
-
end
|
2795
|
-
else
|
2796
|
-
id_map = nil
|
2797
|
-
end
|
2798
|
-
|
2799
|
-
loader = r[:eager_loader]
|
2800
|
-
associations = eager_assoc[r[:name]]
|
2801
|
-
if associations.respond_to?(:call)
|
2802
|
-
eager_block = associations
|
2803
|
-
associations = {}
|
2804
|
-
elsif associations.is_a?(Hash) && associations.length == 1 && (pr_assoc = associations.to_a.first) && pr_assoc.first.respond_to?(:call)
|
2805
|
-
eager_block, associations = pr_assoc
|
2806
|
-
end
|
2807
|
-
loader.call(:key_hash=>key_hash, :rows=>a, :associations=>associations, :self=>self, :eager_block=>eager_block, :id_map=>id_map)
|
2808
|
-
a.each{|object| object.send(:run_association_callbacks, r, :after_load, object.associations[r[:name]])} unless r[:after_load].empty?
|
2809
|
-
end
|
2810
|
-
end
|
2811
|
-
|
2812
|
-
# Return a subquery expression for filering by a many_to_many association
|
2813
|
-
def many_to_many_association_filter_expression(op, ref, obj)
|
2814
|
-
lpks, lks, rks = ref.values_at(:left_primary_key_columns, :left_keys, :right_keys)
|
2815
|
-
jt = ref.join_table_alias
|
2816
|
-
lpks = lpks.first if lpks.length == 1
|
2817
|
-
lpks = ref.qualify(model.table_name, lpks)
|
2818
|
-
|
2819
|
-
meths = if obj.is_a?(Sequel::Dataset)
|
2820
|
-
ref.qualify(obj.model.table_name, ref.right_primary_keys)
|
2821
|
-
else
|
2822
|
-
ref.right_primary_key_methods
|
2823
|
-
end
|
2824
|
-
|
2825
|
-
expr = association_filter_key_expression(ref.qualify(jt, rks), meths, obj)
|
2826
|
-
unless expr == SQL::Constants::FALSE
|
2827
|
-
expr = SQL::BooleanExpression.from_value_pairs(lpks=>model.db.from(ref[:join_table]).select(*ref.qualify(jt, lks)).where(expr).exclude(SQL::BooleanExpression.from_value_pairs(ref.qualify(jt, lks).zip([]), :OR)))
|
2828
|
-
expr = add_association_filter_conditions(ref, obj, expr)
|
2829
|
-
end
|
2830
|
-
|
2831
|
-
association_filter_handle_inversion(op, expr, Array(lpks))
|
2832
|
-
end
|
2833
|
-
alias one_through_one_association_filter_expression many_to_many_association_filter_expression
|
2834
|
-
|
2835
|
-
# Return a simple equality expression for filering by a many_to_one association
|
2836
|
-
def many_to_one_association_filter_expression(op, ref, obj)
|
2837
|
-
keys = ref.qualify(model.table_name, ref[:key_columns])
|
2838
|
-
meths = if obj.is_a?(Sequel::Dataset)
|
2839
|
-
ref.qualify(obj.model.table_name, ref.primary_keys)
|
2840
|
-
else
|
2841
|
-
ref.primary_key_methods
|
2842
|
-
end
|
2843
|
-
|
2844
|
-
expr = association_filter_key_expression(keys, meths, obj)
|
2845
|
-
expr = add_association_filter_conditions(ref, obj, expr)
|
2846
|
-
association_filter_handle_inversion(op, expr, keys)
|
2847
|
-
end
|
2848
|
-
|
2849
|
-
# Return a simple equality expression for filering by a one_to_* association
|
2850
|
-
def one_to_many_association_filter_expression(op, ref, obj)
|
2851
|
-
keys = ref.qualify(model.table_name, ref[:primary_key_columns])
|
2852
|
-
meths = if obj.is_a?(Sequel::Dataset)
|
2853
|
-
ref.qualify(obj.model.table_name, ref[:keys])
|
2854
|
-
else
|
2855
|
-
ref[:key_methods]
|
2856
|
-
end
|
2857
|
-
|
2858
|
-
expr = association_filter_key_expression(keys, meths, obj)
|
2859
|
-
expr = add_association_filter_conditions(ref, obj, expr)
|
2860
|
-
association_filter_handle_inversion(op, expr, keys)
|
2861
|
-
end
|
2862
|
-
alias one_to_one_association_filter_expression one_to_many_association_filter_expression
|
2863
|
-
|
2864
|
-
# Build associations from the graph if #eager_graph was used,
|
2865
|
-
# and/or load other associations if #eager was used.
|
2866
|
-
def post_load(all_records)
|
2867
|
-
eager_graph_build_associations(all_records) if @opts[:eager_graph]
|
2868
|
-
eager_load(all_records) if @opts[:eager] && (row_proc || @opts[:eager_graph])
|
2869
|
-
super
|
2870
|
-
end
|
2871
|
-
end
|
2872
|
-
|
2873
|
-
# This class is the internal implementation of eager_graph. It is responsible for taking an array of plain
|
2874
|
-
# hashes and returning an array of model objects with all eager_graphed associations already set in the
|
2875
|
-
# association cache.
|
2876
|
-
class EagerGraphLoader
|
2877
|
-
# Hash with table alias symbol keys and after_load hook values
|
2878
|
-
attr_reader :after_load_map
|
2879
|
-
|
2880
|
-
# Hash with table alias symbol keys and association name values
|
2881
|
-
attr_reader :alias_map
|
2882
|
-
|
2883
|
-
# Hash with table alias symbol keys and subhash values mapping column_alias symbols to the
|
2884
|
-
# symbol of the real name of the column
|
2885
|
-
attr_reader :column_maps
|
2886
|
-
|
2887
|
-
# Recursive hash with table alias symbol keys mapping to hashes with dependent table alias symbol keys.
|
2888
|
-
attr_reader :dependency_map
|
2889
|
-
|
2890
|
-
# Hash with table alias symbol keys and [limit, offset] values
|
2891
|
-
attr_reader :limit_map
|
2892
|
-
|
2893
|
-
# Hash with table alias symbol keys and callable values used to create model instances
|
2894
|
-
# The table alias symbol for the primary model
|
2895
|
-
attr_reader :master
|
2896
|
-
|
2897
|
-
# Hash with table alias symbol keys and primary key symbol values (or arrays of primary key symbols for
|
2898
|
-
# composite key tables)
|
2899
|
-
attr_reader :primary_keys
|
2900
|
-
|
2901
|
-
# Hash with table alias symbol keys and reciprocal association symbol values,
|
2902
|
-
# used for setting reciprocals for one_to_many associations.
|
2903
|
-
attr_reader :reciprocal_map
|
2904
|
-
|
2905
|
-
# Hash with table alias symbol keys and subhash values mapping primary key symbols (or array of symbols)
|
2906
|
-
# to model instances. Used so that only a single model instance is created for each object.
|
2907
|
-
attr_reader :records_map
|
2908
|
-
|
2909
|
-
# Hash with table alias symbol keys and AssociationReflection values
|
2910
|
-
attr_reader :reflection_map
|
2911
|
-
|
2912
|
-
# Hash with table alias symbol keys and callable values used to create model instances
|
2913
|
-
attr_reader :row_procs
|
2914
|
-
|
2915
|
-
# Hash with table alias symbol keys and true/false values, where true means the
|
2916
|
-
# association represented by the table alias uses an array of values instead of
|
2917
|
-
# a single value (i.e. true => *_many, false => *_to_one).
|
2918
|
-
attr_reader :type_map
|
2919
|
-
|
2920
|
-
# Initialize all of the data structures used during loading.
|
2921
|
-
def initialize(dataset)
|
2922
|
-
opts = dataset.opts
|
2923
|
-
eager_graph = opts[:eager_graph]
|
2924
|
-
@master = eager_graph[:master]
|
2925
|
-
requirements = eager_graph[:requirements]
|
2926
|
-
reflection_map = @reflection_map = eager_graph[:reflections]
|
2927
|
-
reciprocal_map = @reciprocal_map = eager_graph[:reciprocals]
|
2928
|
-
limit_map = @limit_map = eager_graph[:limits]
|
2929
|
-
@unique = eager_graph[:cartesian_product_number] > 1
|
2930
|
-
|
2931
|
-
alias_map = @alias_map = {}
|
2932
|
-
type_map = @type_map = {}
|
2933
|
-
after_load_map = @after_load_map = {}
|
2934
|
-
reflection_map.each do |k, v|
|
2935
|
-
alias_map[k] = v[:name]
|
2936
|
-
after_load_map[k] = v[:after_load] unless v[:after_load].empty?
|
2937
|
-
type_map[k] = if v.returns_array?
|
2938
|
-
true
|
2939
|
-
elsif (limit_and_offset = limit_map[k]) && !limit_and_offset.last.nil?
|
2940
|
-
:offset
|
2941
|
-
end
|
2942
|
-
end
|
2943
|
-
|
2944
|
-
# Make dependency map hash out of requirements array for each association.
|
2945
|
-
# This builds a tree of dependencies that will be used for recursion
|
2946
|
-
# to ensure that all parts of the object graph are loaded into the
|
2947
|
-
# appropriate subordinate association.
|
2948
|
-
@dependency_map = {}
|
2949
|
-
# Sort the associations by requirements length, so that
|
2950
|
-
# requirements are added to the dependency hash before their
|
2951
|
-
# dependencies.
|
2952
|
-
requirements.sort_by{|a| a[1].length}.each do |ta, deps|
|
2953
|
-
if deps.empty?
|
2954
|
-
dependency_map[ta] = {}
|
2955
|
-
else
|
2956
|
-
deps = deps.dup
|
2957
|
-
hash = dependency_map[deps.shift]
|
2958
|
-
deps.each do |dep|
|
2959
|
-
hash = hash[dep]
|
2960
|
-
end
|
2961
|
-
hash[ta] = {}
|
2962
|
-
end
|
2963
|
-
end
|
2964
|
-
|
2965
|
-
# This mapping is used to make sure that duplicate entries in the
|
2966
|
-
# result set are mapped to a single record. For example, using a
|
2967
|
-
# single one_to_many association with 10 associated records,
|
2968
|
-
# the main object column values appear in the object graph 10 times.
|
2969
|
-
# We map by primary key, if available, or by the object's entire values,
|
2970
|
-
# if not. The mapping must be per table, so create sub maps for each table
|
2971
|
-
# alias.
|
2972
|
-
records_map = {@master=>{}}
|
2973
|
-
alias_map.keys.each{|ta| records_map[ta] = {}}
|
2974
|
-
@records_map = records_map
|
2975
|
-
|
2976
|
-
datasets = opts[:graph][:table_aliases].to_a.reject{|ta,ds| ds.nil?}
|
2977
|
-
column_aliases = opts[:graph_aliases] || opts[:graph][:column_aliases]
|
2978
|
-
primary_keys = {}
|
2979
|
-
column_maps = {}
|
2980
|
-
models = {}
|
2981
|
-
row_procs = {}
|
2982
|
-
datasets.each do |ta, ds|
|
2983
|
-
models[ta] = ds.model
|
2984
|
-
primary_keys[ta] = []
|
2985
|
-
column_maps[ta] = {}
|
2986
|
-
row_procs[ta] = ds.row_proc
|
2987
|
-
end
|
2988
|
-
column_aliases.each do |col_alias, tc|
|
2989
|
-
ta, column = tc
|
2990
|
-
column_maps[ta][col_alias] = column
|
2991
|
-
end
|
2992
|
-
column_maps.each do |ta, h|
|
2993
|
-
pk = models[ta].primary_key
|
2994
|
-
if pk.is_a?(Array)
|
2995
|
-
primary_keys[ta] = []
|
2996
|
-
h.select{|ca, c| primary_keys[ta] << ca if pk.include?(c)}
|
2997
|
-
else
|
2998
|
-
h.select{|ca, c| primary_keys[ta] = ca if pk == c}
|
2999
|
-
end
|
3000
|
-
end
|
3001
|
-
@column_maps = column_maps
|
3002
|
-
@primary_keys = primary_keys
|
3003
|
-
@row_procs = row_procs
|
3004
|
-
|
3005
|
-
# For performance, create two special maps for the master table,
|
3006
|
-
# so you can skip a hash lookup.
|
3007
|
-
@master_column_map = column_maps[master]
|
3008
|
-
@master_primary_keys = primary_keys[master]
|
3009
|
-
|
3010
|
-
# Add a special hash mapping table alias symbols to 5 element arrays that just
|
3011
|
-
# contain the data in other data structures for that table alias. This is
|
3012
|
-
# used for performance, to get all values in one hash lookup instead of
|
3013
|
-
# separate hash lookups for each data structure.
|
3014
|
-
ta_map = {}
|
3015
|
-
alias_map.keys.each do |ta|
|
3016
|
-
ta_map[ta] = [records_map[ta], row_procs[ta], alias_map[ta], type_map[ta], reciprocal_map[ta]]
|
3017
|
-
end
|
3018
|
-
@ta_map = ta_map
|
3019
|
-
end
|
3020
|
-
|
3021
|
-
# Return an array of primary model instances with the associations cache prepopulated
|
3022
|
-
# for all model objects (both primary and associated).
|
3023
|
-
def load(hashes)
|
3024
|
-
master = master()
|
3025
|
-
|
3026
|
-
# Assign to local variables for speed increase
|
3027
|
-
rp = row_procs[master]
|
3028
|
-
rm = records_map[master]
|
3029
|
-
dm = dependency_map
|
3030
|
-
|
3031
|
-
# This will hold the final record set that we will be replacing the object graph with.
|
3032
|
-
records = []
|
3033
|
-
|
3034
|
-
hashes.each do |h|
|
3035
|
-
unless key = master_pk(h)
|
3036
|
-
key = hkey(master_hfor(h))
|
3037
|
-
end
|
3038
|
-
unless primary_record = rm[key]
|
3039
|
-
primary_record = rm[key] = rp.call(master_hfor(h))
|
3040
|
-
# Only add it to the list of records to return if it is a new record
|
3041
|
-
records.push(primary_record)
|
3042
|
-
end
|
3043
|
-
# Build all associations for the current object and it's dependencies
|
3044
|
-
_load(dm, primary_record, h)
|
3045
|
-
end
|
3046
|
-
|
3047
|
-
# Remove duplicate records from all associations if this graph could possibly be a cartesian product
|
3048
|
-
# Run after_load procs if there are any
|
3049
|
-
post_process(records, dm) if @unique || !after_load_map.empty? || !limit_map.empty?
|
3050
|
-
|
3051
|
-
records
|
3052
|
-
end
|
3053
|
-
|
3054
|
-
private
|
3055
|
-
|
3056
|
-
# Recursive method that creates associated model objects and associates them to the current model object.
|
3057
|
-
def _load(dependency_map, current, h)
|
3058
|
-
dependency_map.each do |ta, deps|
|
3059
|
-
unless key = pk(ta, h)
|
3060
|
-
ta_h = hfor(ta, h)
|
3061
|
-
unless ta_h.values.any?
|
3062
|
-
assoc_name = alias_map[ta]
|
3063
|
-
unless (assoc = current.associations).has_key?(assoc_name)
|
3064
|
-
assoc[assoc_name] = type_map[ta] ? [] : nil
|
3065
|
-
end
|
3066
|
-
next
|
3067
|
-
end
|
3068
|
-
key = hkey(ta_h)
|
3069
|
-
end
|
3070
|
-
rm, rp, assoc_name, tm, rcm = @ta_map[ta]
|
3071
|
-
unless rec = rm[key]
|
3072
|
-
rec = rm[key] = rp.call(hfor(ta, h))
|
3073
|
-
end
|
3074
|
-
|
3075
|
-
if tm
|
3076
|
-
unless (assoc = current.associations).has_key?(assoc_name)
|
3077
|
-
assoc[assoc_name] = []
|
3078
|
-
end
|
3079
|
-
assoc[assoc_name].push(rec)
|
3080
|
-
rec.associations[rcm] = current if rcm
|
3081
|
-
else
|
3082
|
-
current.associations[assoc_name] ||= rec
|
3083
|
-
end
|
3084
|
-
# Recurse into dependencies of the current object
|
3085
|
-
_load(deps, rec, h) unless deps.empty?
|
3086
|
-
end
|
3087
|
-
end
|
3088
|
-
|
3089
|
-
# Return the subhash for the specific table alias +ta+ by parsing the values out of the main hash +h+
|
3090
|
-
def hfor(ta, h)
|
3091
|
-
out = {}
|
3092
|
-
@column_maps[ta].each{|ca, c| out[c] = h[ca]}
|
3093
|
-
out
|
3094
|
-
end
|
3095
|
-
|
3096
|
-
# Return a suitable hash key for any subhash +h+, which is an array of values by column order.
|
3097
|
-
# This is only used if the primary key cannot be used.
|
3098
|
-
def hkey(h)
|
3099
|
-
h.sort_by{|x| x[0].to_s}
|
3100
|
-
end
|
3101
|
-
|
3102
|
-
# Return the subhash for the master table by parsing the values out of the main hash +h+
|
3103
|
-
def master_hfor(h)
|
3104
|
-
out = {}
|
3105
|
-
@master_column_map.each{|ca, c| out[c] = h[ca]}
|
3106
|
-
out
|
3107
|
-
end
|
3108
|
-
|
3109
|
-
# Return a primary key value for the master table by parsing it out of the main hash +h+.
|
3110
|
-
def master_pk(h)
|
3111
|
-
x = @master_primary_keys
|
3112
|
-
if x.is_a?(Array)
|
3113
|
-
unless x == []
|
3114
|
-
x = x.map{|ca| h[ca]}
|
3115
|
-
x if x.all?
|
3116
|
-
end
|
3117
|
-
else
|
3118
|
-
h[x]
|
3119
|
-
end
|
3120
|
-
end
|
3121
|
-
|
3122
|
-
# Return a primary key value for the given table alias by parsing it out of the main hash +h+.
|
3123
|
-
def pk(ta, h)
|
3124
|
-
x = primary_keys[ta]
|
3125
|
-
if x.is_a?(Array)
|
3126
|
-
unless x == []
|
3127
|
-
x = x.map{|ca| h[ca]}
|
3128
|
-
x if x.all?
|
3129
|
-
end
|
3130
|
-
else
|
3131
|
-
h[x]
|
3132
|
-
end
|
3133
|
-
end
|
3134
|
-
|
3135
|
-
# If the result set is the result of a cartesian product, then it is possible that
|
3136
|
-
# there are multiple records for each association when there should only be one.
|
3137
|
-
# In that case, for each object in all associations loaded via +eager_graph+, run
|
3138
|
-
# uniq! on the association to make sure no duplicate records show up.
|
3139
|
-
# Note that this can cause legitimate duplicate records to be removed.
|
3140
|
-
def post_process(records, dependency_map)
|
3141
|
-
records.each do |record|
|
3142
|
-
dependency_map.each do |ta, deps|
|
3143
|
-
assoc_name = alias_map[ta]
|
3144
|
-
list = record.send(assoc_name)
|
3145
|
-
rec_list = if type_map[ta]
|
3146
|
-
list.uniq!
|
3147
|
-
if lo = limit_map[ta]
|
3148
|
-
limit, offset = lo
|
3149
|
-
offset ||= 0
|
3150
|
-
if type_map[ta] == :offset
|
3151
|
-
[record.associations[assoc_name] = list[offset]]
|
3152
|
-
else
|
3153
|
-
list.replace(list[(offset)..(limit ? (offset)+limit-1 : -1)] || [])
|
3154
|
-
end
|
3155
|
-
else
|
3156
|
-
list
|
3157
|
-
end
|
3158
|
-
elsif list
|
3159
|
-
[list]
|
3160
|
-
else
|
3161
|
-
[]
|
3162
|
-
end
|
3163
|
-
record.send(:run_association_callbacks, reflection_map[ta], :after_load, list) if after_load_map[ta]
|
3164
|
-
post_process(rec_list, deps) if !rec_list.empty? && !deps.empty?
|
3165
|
-
end
|
3166
|
-
end
|
3167
|
-
end
|
3168
|
-
end
|
3169
|
-
end
|
3170
|
-
end
|
3171
|
-
end
|