From 6e5848fe6047132524aa3417b2ff5cee68f7e5ee Mon Sep 17 00:00:00 2001 From: Bert Owen Date: Sat, 19 Apr 2014 12:24:30 -0700 Subject: [PATCH] VRFS-1602 Writing tests. --- web/db/schema.rb | 1090 ++++++++++++++++++++++++++++++++ web/spec/features/feed_spec.rb | 24 + 2 files changed, 1114 insertions(+) diff --git a/web/db/schema.rb b/web/db/schema.rb index b5e6a7964..7e4f2a47f 100644 --- a/web/db/schema.rb +++ b/web/db/schema.rb @@ -13,4 +13,1094 @@ ActiveRecord::Schema.define(:version => 0) do + add_extension "uuid-ossp" + add_extension "fuzzystrmatch" + add_extension "postgis" + add_extension "postgis_tiger_geocoder" + add_extension "postgis_topology" + + create_table "active_admin_comments", :force => true do |t| + t.string "resource_id", :null => false + t.string "resource_type", :null => false + t.integer "author_id" + t.string "author_type" + t.text "body" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "namespace" + end + + add_index "active_admin_comments", ["author_type", "author_id"], :name => "index_active_admin_comments_on_author_type_and_author_id" + add_index "active_admin_comments", ["namespace"], :name => "index_active_admin_comments_on_namespace" + add_index "active_admin_comments", ["resource_type", "resource_id"], :name => "index_admin_comments_on_resource_type_and_resource_id" + + create_table "artifact_updates", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "product", :null => false + t.string "version", :null => false + t.string "uri", :limit => 2000, :null => false + t.string "sha1", :null => false + t.string "environment", :default => "public", :null => false + t.integer "size", :null => false + end + + add_index "artifact_updates", ["product", "version"], :name => "artifact_updates_uniqkey", :unique => true + + create_table "band_invitations", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64 + t.string "band_id", :limit => 64 + t.boolean "accepted" + t.string "creator_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "bands", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "name", :limit => 1024, :null => false + t.string "website", :limit => 4000 + t.string "biography", :limit => 4000, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "city", :limit => 100 + t.string "state", :limit => 100 + t.string "country", :limit => 100 + t.string "photo_url", :limit => 2048 + t.string "logo_url", :limit => 2048 + t.tsvector "name_tsv" + t.string "original_fpfile_photo", :limit => 8000 + t.string "cropped_fpfile_photo", :limit => 8000 + t.string "cropped_s3_path_photo", :limit => 512 + t.string "crop_selection_photo", :limit => 256 + t.decimal "lat", :precision => 15, :scale => 10 + t.decimal "lng", :precision => 15, :scale => 10 + t.string "large_photo_url", :limit => 2048 + t.string "cropped_large_s3_path_photo", :limit => 512 + t.string "cropped_large_fpfile_photo", :limit => 8000 + t.boolean "did_real_session", :default => false + end + + add_index "bands", ["name_tsv"], :name => "bands_name_tsv_index", :using => :gin + + create_table "bands_genres", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "band_id", :limit => 64, :null => false + t.string "genre_id", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "bands_genres", ["band_id", "genre_id"], :name => "band_genre_uniqkey", :unique => true + + create_table "bands_musicians", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "band_id", :limit => 64, :null => false + t.string "user_id", :limit => 64, :null => false + t.boolean "admin", :default => false, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "bands_musicians", ["band_id", "user_id"], :name => "band_musician_uniqkey", :unique => true + + create_table "cities", :id => false, :force => true do |t| + t.string "city", :null => false + t.string "region", :limit => 2, :null => false + t.string "countrycode", :limit => 2, :null => false + end + + create_table "claimed_recordings", :id => false, :force => true do |t| + t.string "user_id", :limit => 64, :null => false + t.string "recording_id", :limit => 64, :null => false + t.string "id", :limit => 64, :null => false + t.string "name", :limit => 200, :null => false + t.boolean "is_public", :default => true, :null => false + t.string "genre_id", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "description", :limit => 8000 + t.tsvector "description_tsv" + t.tsvector "name_tsv" + end + + add_index "claimed_recordings", ["description_tsv"], :name => "claimed_recordings_description_tsv_index", :using => :gin + add_index "claimed_recordings", ["name_tsv"], :name => "claimed_recordings_name_tsv_index", :using => :gin + add_index "claimed_recordings", ["user_id", "recording_id"], :name => "musician_recording_uniqkey", :unique => true + + create_table "connections", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64 + t.string "client_id", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "music_session_id", :limit => 64 + t.string "ip_address", :limit => 64 + t.boolean "as_musician" + t.string "aasm_state", :limit => 64, :default => "idle", :null => false + t.integer "addr", :limit => 8, :null => false + t.float "latitude", :null => false + t.float "longitude", :null => false + t.string "countrycode", :limit => 2 + t.string "region", :limit => 2 + t.string "city" + t.integer "locidispid", :limit => 8, :null => false + t.datetime "joined_session_at" + t.string "client_type", :limit => 256, :null => false + end + + add_index "connections", ["client_id"], :name => "connections_client_id_key", :unique => true + add_index "connections", ["locidispid"], :name => "connections_locidispid_ndx" + + create_table "countries", :id => false, :force => true do |t| + t.string "countrycode", :limit => 2, :null => false + t.string "countryname", :limit => 64 + end + + create_table "crash_dumps", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "client_type", :limit => 64, :null => false + t.string "client_id", :limit => 64 + t.string "user_id", :limit => 64 + t.string "session_id", :limit => 64 + t.datetime "timestamp" + t.string "uri", :limit => 1000 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "client_version", :limit => 100, :null => false + end + + add_index "crash_dumps", ["client_id"], :name => "crash_dumps_client_id_idx" + add_index "crash_dumps", ["timestamp"], :name => "crash_dumps_timestamp_idx" + add_index "crash_dumps", ["user_id"], :name => "crash_dumps_user_id_idx" + + create_table "email_batch_sets", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "email_batch_id", :limit => 64 + t.datetime "started_at" + t.text "user_ids", :default => "", :null => false + t.integer "batch_count" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "email_batch_sets", ["email_batch_id", "started_at"], :name => "email_batch_set_uniqkey", :unique => true + add_index "email_batch_sets", ["email_batch_id"], :name => "email_batch_set_fkidx" + + create_table "email_batches", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "subject", :limit => 256, :null => false + t.text "body", :null => false + t.string "from_email", :limit => 64, :default => "support@jamkazam.com", :null => false + t.string "aasm_state", :limit => 32, :default => "pending", :null => false + t.text "test_emails", :default => "test@jamkazam.com", :null => false + t.integer "opt_in_count", :default => 0, :null => false + t.integer "sent_count", :default => 0, :null => false + t.integer "lock_version" + t.datetime "started_at" + t.datetime "completed_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "email_errors", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64 + t.string "error_type", :limit => 32 + t.string "email_address", :limit => 256 + t.string "status", :limit => 32 + t.datetime "email_date" + t.text "reason" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "email_errors", ["email_address"], :name => "email_error_address_idx" + add_index "email_errors", ["user_id"], :name => "email_error_user_fkidx" + + create_table "event_sessions", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.datetime "starts_at" + t.datetime "ends_at" + t.string "pinned_state" + t.string "img_url", :limit => 1024 + t.integer "img_width" + t.integer "img_height" + t.string "event_id", :limit => 64 + t.string "user_id", :limit => 64 + t.string "band_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "ordinal" + end + + create_table "events", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "slug", :limit => 512, :null => false + t.text "title" + t.text "description" + t.boolean "show_sponser", :default => false, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "social_description" + end + + add_index "events", ["slug"], :name => "events_slug_key", :unique => true + + create_table "facebook_signups", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "lookup_id", :null => false + t.string "last_name", :limit => 100 + t.string "first_name", :limit => 100 + t.string "gender", :limit => 1 + t.string "email", :limit => 1024 + t.string "uid", :limit => 1024 + t.string "token", :limit => 1024 + t.datetime "token_expires_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "facebook_signups", ["lookup_id"], :name => "facebook_signups_lookup_id_key", :unique => true + + create_table "fan_invitations", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "sender_id", :limit => 64 + t.string "receiver_id", :limit => 64 + t.string "music_session_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "feeds", :force => true do |t| + t.string "recording_id", :limit => 64 + t.string "music_session_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "feeds", ["music_session_id"], :name => "feeds_music_session_id_key", :unique => true + add_index "feeds", ["recording_id"], :name => "feeds_recording_id_key", :unique => true + + create_table "follows", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64, :null => false + t.string "followable_id", :limit => 64, :null => false + t.string "followable_type", :limit => 25, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "follows", ["user_id", "followable_id"], :name => "follows_user_uniqkey", :unique => true + + create_table "friend_requests", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64 + t.string "friend_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "status", :limit => 50 + t.string "message", :limit => 4000 + end + + create_table "friendships", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64 + t.string "friend_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "friendships", ["user_id", "friend_id"], :name => "user_friend_uniqkey", :unique => true + + create_table "genres", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "description", :limit => 1024, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "genres_music_sessions", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "genre_id", :limit => 64 + t.string "music_session_id", :limit => 64 + end + +# Could not dump table "geoipblocks" because of following StandardError +# Unknown type 'geometry(Polygon)' for column 'geom' + + create_table "geoipisp", :id => false, :force => true do |t| + t.integer "beginip", :limit => 8, :null => false + t.integer "endip", :limit => 8, :null => false + t.string "company", :limit => 50, :null => false + end + + add_index "geoipisp", ["company"], :name => "geoipisp_company_ndx" + + create_table "geoiplocations", :id => false, :force => true do |t| + t.integer "locid", :null => false + t.string "countrycode", :limit => 2 + t.string "region", :limit => 2 + t.string "city" + t.string "postalcode", :limit => 8 + t.float "latitude", :null => false + t.float "longitude", :null => false + t.integer "metrocode" + t.string "areacode", :limit => 3 + t.integer "geog", :limit => 0 + end + + add_index "geoiplocations", ["geog"], :name => "geoiplocations_geog_gix", :using => :gist + + create_table "icecast_admin_authentications", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "source_pass", :limit => 64, :null => false + t.string "relay_user", :limit => 64, :null => false + t.string "relay_pass", :limit => 64, :null => false + t.string "admin_user", :limit => 64, :null => false + t.string "admin_pass", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_directories", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.integer "yp_url_timeout", :default => 15, :null => false + t.string "yp_url", :limit => 1024, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_limits", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.integer "clients", :default => 1000, :null => false + t.integer "sources", :default => 50, :null => false + t.integer "queue_size", :default => 102400, :null => false + t.integer "client_timeout", :default => 30 + t.integer "header_timeout", :default => 15 + t.integer "source_timeout", :default => 10 + t.integer "burst_size", :default => 65536 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_listen_sockets", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.integer "port", :default => 8001, :null => false + t.string "bind_address", :limit => 1024 + t.string "shoutcast_mount", :limit => 1024 + t.integer "shoutcast_compat" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_loggings", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "access_log", :limit => 1024, :default => "access.log", :null => false + t.string "error_log", :limit => 1024, :default => "error.log", :null => false + t.string "playlist_log", :limit => 1024 + t.integer "log_level", :default => 3, :null => false + t.integer "log_archive" + t.integer "log_size", :default => 10000 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_master_server_relays", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "master_server", :limit => 1024, :null => false + t.integer "master_server_port", :default => 8001, :null => false + t.integer "master_update_interval", :default => 120, :null => false + t.string "master_username", :limit => 64, :null => false + t.string "master_pass", :limit => 64, :null => false + t.integer "relays_on_demand", :default => 1, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_mount_templates", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "name", :limit => 256, :null => false + t.string "source_username", :limit => 64 + t.string "source_pass", :limit => 64 + t.integer "max_listeners", :default => 4 + t.integer "max_listener_duration", :default => 3600 + t.string "dump_file", :limit => 1024 + t.string "intro", :limit => 1024 + t.string "fallback_mount", :limit => 1024 + t.integer "fallback_override", :default => 1 + t.integer "fallback_when_full", :default => 1 + t.string "charset", :limit => 1024, :default => "ISO8859-1" + t.integer "is_public", :default => 0 + t.string "stream_name", :limit => 1024 + t.string "stream_description", :limit => 10000 + t.string "stream_url", :limit => 1024 + t.string "genre", :limit => 256 + t.integer "bitrate" + t.string "mime_type", :limit => 64, :default => "audio/mpeg", :null => false + t.string "subtype", :limit => 64 + t.integer "burst_size" + t.integer "mp3_metadata_interval" + t.integer "hidden", :default => 1 + t.string "on_connect", :limit => 1024 + t.string "on_disconnect", :limit => 1024 + t.string "authentication_id", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_mounts", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "name", :limit => 1024, :null => false + t.string "source_username", :limit => 64 + t.string "source_pass", :limit => 64 + t.integer "max_listeners", :default => 4 + t.integer "max_listener_duration", :default => 3600 + t.string "dump_file", :limit => 1024 + t.string "intro", :limit => 1024 + t.string "fallback_mount", :limit => 1024 + t.integer "fallback_override", :default => 1 + t.integer "fallback_when_full", :default => 1 + t.string "charset", :limit => 1024, :default => "ISO8859-1" + t.integer "is_public", :default => 0 + t.string "stream_name", :limit => 1024 + t.string "stream_description", :limit => 10000 + t.string "stream_url", :limit => 1024 + t.string "genre", :limit => 256 + t.integer "bitrate" + t.string "mime_type", :limit => 64 + t.string "subtype", :limit => 64 + t.integer "burst_size" + t.integer "mp3_metadata_interval" + t.integer "hidden", :default => 1 + t.string "on_connect", :limit => 1024 + t.string "on_disconnect", :limit => 1024 + t.string "authentication_id", :limit => 64 + t.integer "listeners", :default => 0, :null => false + t.boolean "sourced", :default => false, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "music_session_id", :limit => 64 + t.string "icecast_server_id", :limit => 64, :null => false + t.string "icecast_mount_template_id", :limit => 64 + t.datetime "sourced_needs_changing_at" + end + + add_index "icecast_mounts", ["name"], :name => "icecast_mounts_name_key", :unique => true + + create_table "icecast_paths", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "base_dir", :limit => 1024, :default => "./", :null => false + t.string "log_dir", :limit => 1024, :default => "./logs", :null => false + t.string "pid_file", :limit => 1024, :default => "./icecast.pid" + t.string "web_root", :limit => 1024, :default => "./web", :null => false + t.string "admin_root", :limit => 1024, :default => "./admin", :null => false + t.string "allow_ip", :limit => 1024 + t.string "deny_ip", :limit => 1024 + t.string "alias_source", :limit => 1024 + t.string "alias_dest", :limit => 1024 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_relays", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "server", :limit => 1024, :null => false + t.integer "port", :default => 8001, :null => false + t.string "mount", :limit => 1024, :null => false + t.string "local_mount", :limit => 1024 + t.string "relay_username", :limit => 64 + t.string "relay_pass", :limit => 64 + t.integer "relay_shoutcast_metadata", :default => 0 + t.integer "on_demand", :default => 1 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_securities", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.integer "chroot", :default => 0, :null => false + t.string "change_owner_user", :limit => 64 + t.string "change_owner_group", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_server_groups", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "name", :null => false + end + + add_index "icecast_server_groups", ["name"], :name => "icecast_server_groups_name_key", :unique => true + + create_table "icecast_server_mounts", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "icecast_mount_id", :limit => 64 + t.string "icecast_server_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "icecast_server_mounts", ["icecast_mount_id", "icecast_server_id"], :name => "server_mount_uniqkey", :unique => true + + create_table "icecast_server_relays", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "icecast_relay_id", :limit => 64 + t.string "icecast_server_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "icecast_server_relays", ["icecast_relay_id", "icecast_server_id"], :name => "server_relay_uniqkey", :unique => true + + create_table "icecast_server_sockets", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "icecast_listen_socket_id", :limit => 64 + t.string "icecast_server_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "icecast_server_sockets", ["icecast_listen_socket_id", "icecast_server_id"], :name => "server_socket_uniqkey", :unique => true + + create_table "icecast_servers", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.integer "config_changed", :default => 0 + t.string "limit_id", :limit => 64 + t.string "admin_auth_id", :limit => 64 + t.string "directory_id", :limit => 64 + t.string "master_relay_id", :limit => 64 + t.string "path_id", :limit => 64 + t.string "logging_id", :limit => 64 + t.string "security_id", :limit => 64 + t.string "template_id", :limit => 64, :null => false + t.string "hostname", :limit => 1024, :null => false + t.string "server_id", :limit => 1024, :null => false + t.string "location", :limit => 1024 + t.string "admin_email", :limit => 1024 + t.integer "fileserve" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "icecast_server_group_id", :limit => 64, :default => "default", :null => false + t.string "mount_template_id", :limit => 64 + t.datetime "config_updated_at" + end + + add_index "icecast_servers", ["server_id"], :name => "icecast_servers_server_id_key", :unique => true + + create_table "icecast_template_sockets", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "icecast_listen_socket_id", :limit => 64 + t.string "icecast_template_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "icecast_template_sockets", ["icecast_listen_socket_id", "icecast_template_id"], :name => "template_socket_uniqkey", :unique => true + + create_table "icecast_templates", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "limit_id", :limit => 64 + t.string "admin_auth_id", :limit => 64 + t.string "directory_id", :limit => 64 + t.string "master_relay_id", :limit => 64 + t.string "path_id", :limit => 64 + t.string "logging_id", :limit => 64 + t.string "security_id", :limit => 64 + t.string "location", :limit => 1024, :null => false + t.string "name", :limit => 256, :null => false + t.string "admin_email", :limit => 1024, :default => "admin@jamkazam.com", :null => false + t.integer "fileserve", :default => 1, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "icecast_user_authentications", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "authentication_type", :limit => 16, :default => "url" + t.string "filename", :limit => 1024 + t.integer "allow_duplicate_users" + t.string "mount_add", :limit => 1024 + t.string "mount_remove", :limit => 1024 + t.string "listener_add", :limit => 1024 + t.string "listener_remove", :limit => 1024 + t.string "unused_username", :limit => 64 + t.string "unused_pass", :limit => 64 + t.string "auth_header", :limit => 64, :default => "icecast-auth-user: 1" + t.string "timelimit_header", :limit => 64, :default => "icecast-auth-timelimit:" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "instruments", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "description", :limit => 1024, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "popularity", :default => 0, :null => false + end + + create_table "invitations", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "sender_id", :limit => 64 + t.string "receiver_id", :limit => 64 + t.string "music_session_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "join_request_id", :limit => 64 + end + + add_index "invitations", ["sender_id", "receiver_id", "music_session_id"], :name => "invitations_uniqkey", :unique => true + + create_table "invited_users", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "sender_id", :limit => 64 + t.boolean "autofriend", :null => false + t.string "email", :limit => 256 + t.string "invitation_code", :limit => 256, :null => false + t.boolean "accepted", :default => false + t.text "note" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "invite_medium", :limit => 64 + end + + add_index "invited_users", ["invitation_code"], :name => "invited_users_invitation_code_key", :unique => true + + create_table "isp_score_batch", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.text "json_scoring_data", :null => false + t.datetime "created_at", :null => false + end + + create_table "jamcompany", :primary_key => "coid", :force => true do |t| + t.string "company", :limit => 50, :null => false + end + + add_index "jamcompany", ["company"], :name => "jamcompany_company_ndx", :unique => true + +# Could not dump table "jamisp" because of following StandardError +# Unknown type 'geometry(Polygon)' for column 'geom' + + create_table "join_requests", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64 + t.string "music_session_id", :limit => 64 + t.string "text", :limit => 2000 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "join_requests", ["user_id", "music_session_id"], :name => "user_music_session_uniqkey", :unique => true + + create_table "layer", :id => false, :force => true do |t| + t.integer "topology_id", :null => false + t.integer "layer_id", :null => false + t.string "schema_name", :limit => nil, :null => false + t.string "table_name", :limit => nil, :null => false + t.string "feature_column", :limit => nil, :null => false + t.integer "feature_type", :null => false + t.integer "level", :default => 0, :null => false + t.integer "child_id" + end + + add_index "layer", ["schema_name", "table_name", "feature_column"], :name => "layer_schema_name_table_name_feature_column_key", :unique => true + + create_table "likes", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64, :null => false + t.string "likable_id", :limit => 64, :null => false + t.string "likable_type", :limit => 25, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "likes", ["user_id", "likable_id"], :name => "likes_user_uniqkey", :unique => true + + create_table "max_mind_geo", :id => false, :force => true do |t| + t.string "country", :limit => 2, :null => false + t.string "region", :limit => 2, :null => false + t.string "city", :null => false + t.decimal "lat", :precision => 15, :scale => 10, :null => false + t.decimal "lng", :precision => 15, :scale => 10, :null => false + t.integer "ip_start", :limit => 8, :null => false + t.integer "ip_end", :limit => 8, :null => false + end + + create_table "max_mind_isp", :id => false, :force => true do |t| + t.integer "ip_bottom", :limit => 8, :null => false + t.integer "ip_top", :limit => 8, :null => false + t.string "isp", :limit => 64, :null => false + t.string "country", :limit => 2, :null => false + end + + add_index "max_mind_isp", ["ip_bottom"], :name => "max_mind_isp_ip_bottom_idx" + add_index "max_mind_isp", ["ip_top"], :name => "max_mind_isp_ip_top_idx" + + create_table "mixes", :force => true do |t| + t.string "recording_id", :limit => 64, :null => false + t.string "mix_server", :limit => 64 + t.datetime "started_at" + t.datetime "completed_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "ogg_md5", :limit => 100 + t.integer "ogg_length" + t.string "ogg_url", :limit => 1024 + t.boolean "completed", :default => false, :null => false + t.integer "error_count", :default => 0, :null => false + t.text "error_reason" + t.text "error_detail" + t.boolean "should_retry", :default => false, :null => false + t.string "mp3_md5", :limit => 100 + t.integer "mp3_length" + t.string "mp3_url", :limit => 1024 + t.integer "download_count", :default => 0, :null => false + t.datetime "last_downloaded_at" + end + + add_index "mixes", ["completed_at"], :name => "index_completed_at" + add_index "mixes", ["started_at"], :name => "index_started_at" + + create_table "music_session_perf_data", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "music_session_id", :limit => 64 + t.string "client_id", :limit => 64 + t.string "uri", :limit => 1000 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "music_sessions", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "description", :limit => 8000 + t.string "user_id", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.boolean "musician_access", :null => false + t.string "band_id", :limit => 64 + t.boolean "approval_required", :null => false + t.boolean "fan_access", :null => false + t.boolean "fan_chat", :null => false + t.string "claimed_recording_id", :limit => 64 + t.string "claimed_recording_initiator_id", :limit => 64 + t.integer "track_changes_counter", :default => 0 + end + + create_table "music_sessions_comments", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "music_session_id", :limit => 64, :null => false + t.string "creator_id", :limit => 64, :null => false + t.string "comment", :limit => 4000, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.inet "ip_address" + end + + create_table "music_sessions_history", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "music_session_id", :limit => 64, :null => false + t.string "description", :limit => 8000 + t.string "user_id", :limit => 64, :null => false + t.string "band_id", :limit => 64 + t.string "genres" + t.datetime "created_at", :null => false + t.datetime "session_removed_at" + t.integer "play_count", :default => 0, :null => false + t.integer "like_count", :default => 0, :null => false + t.boolean "fan_access", :default => true, :null => false + end + + add_index "music_sessions_history", ["music_session_id"], :name => "music_session_uniqkey", :unique => true + + create_table "music_sessions_likers", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "music_session_id", :limit => 64, :null => false + t.string "liker_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.inet "ip_address" + end + + add_index "music_sessions_likers", ["music_session_id", "liker_id"], :name => "music_sessions_liker_uniqkey", :unique => true + + create_table "music_sessions_user_history", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "music_session_id", :limit => 64, :null => false + t.string "user_id", :limit => 64, :null => false + t.string "client_id", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "session_removed_at" + t.integer "max_concurrent_connections" + t.integer "rating" + t.string "instruments" + end + + create_table "musicians_instruments", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64, :null => false + t.string "instrument_id", :limit => 64, :null => false + t.integer "proficiency_level", :limit => 2, :null => false + t.integer "priority", :limit => 2, :default => 1, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "musicians_instruments", ["user_id", "instrument_id"], :name => "musician_instrument_uniqkey", :unique => true + + create_table "notifications", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "description", :limit => 32, :null => false + t.string "source_user_id", :limit => 64 + t.string "target_user_id", :limit => 64 + t.string "band_id", :limit => 64 + t.string "session_id", :limit => 64 + t.string "recording_id", :limit => 64 + t.string "invitation_id", :limit => 64 + t.string "join_request_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "friend_request_id", :limit => 64 + t.string "band_invitation_id", :limit => 64 + t.text "message" + end + + create_table "playable_plays", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "playable_id", :limit => 64, :null => false + t.string "playable_type", :limit => 128, :null => false + t.string "player_id", :limit => 64 + t.string "claimed_recording_id", :limit => 64 + t.inet "ip_address" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "promotionals", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "type", :limit => 128, :default => "JamRuby::PromoBuzz", :null => false + t.string "aasm_state", :limit => 64, :default => "hidden" + t.integer "position", :default => 0, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "latest_id", :limit => 64 + t.string "latest_type", :limit => 128 + t.string "image", :limit => 1024 + t.string "text_short", :limit => 512 + t.string "text_long", :limit => 4096 + end + + add_index "promotionals", ["latest_id", "latest_type"], :name => "promo_latest_idx" + + create_table "recorded_tracks", :force => true do |t| + t.string "user_id", :limit => 64, :null => false + t.string "instrument_id", :limit => 64, :null => false + t.string "sound", :limit => 64, :null => false + t.integer "next_part_to_upload", :default => 0, :null => false + t.boolean "fully_uploaded", :default => false, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "upload_id", :limit => 1024 + t.string "recording_id", :limit => 64, :null => false + t.string "md5", :limit => 100 + t.integer "length", :limit => 8 + t.string "client_id", :limit => 64, :null => false + t.string "track_id", :limit => 64, :null => false + t.string "url", :limit => 1024 + t.integer "file_offset", :limit => 8, :default => 0 + t.string "client_track_id", :limit => 64, :null => false + t.boolean "is_part_uploading", :default => false, :null => false + t.integer "upload_failures", :default => 0, :null => false + t.integer "part_failures", :default => 0, :null => false + t.boolean "discard" + t.integer "download_count", :default => 0, :null => false + t.datetime "last_downloaded_at" + end + + create_table "recordings", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "owner_id", :limit => 64, :null => false + t.string "music_session_id", :limit => 64 + t.string "band_id", :limit => 64 + t.integer "duration" + t.boolean "is_done", :default => false + t.boolean "all_discarded", :default => false, :null => false + t.string "name", :limit => 1024 + t.integer "play_count", :default => 0, :null => false + t.integer "like_count", :default => 0, :null => false + end + + create_table "recordings_comments", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "recording_id", :limit => 64, :null => false + t.string "creator_id", :limit => 64, :null => false + t.string "comment", :limit => 4000, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.inet "ip_address" + end + + create_table "recordings_downloads", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "recording_id", :limit => 64, :null => false + t.string "downloader_id", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "recordings_likers", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "recording_id", :limit => 64, :null => false + t.string "liker_id", :limit => 64 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.inet "ip_address" + t.string "claimed_recording_id", :limit => 64, :null => false + t.boolean "favorite", :default => true, :null => false + end + + add_index "recordings_likers", ["recording_id", "liker_id"], :name => "recording_liker_uniqkey", :unique => true + + create_table "regions", :id => false, :force => true do |t| + t.string "region", :limit => 2, :null => false + t.string "regionname", :limit => 64 + t.string "countrycode", :limit => 2, :null => false + end + + create_table "scores", :id => false, :force => true do |t| + t.integer "alocidispid", :limit => 8, :null => false + t.string "anodeid", :limit => 64, :null => false + t.integer "aaddr", :limit => 8, :null => false + t.integer "blocidispid", :limit => 8, :null => false + t.string "bnodeid", :limit => 64, :null => false + t.integer "baddr", :limit => 8, :null => false + t.integer "score", :null => false + t.integer "scorer", :null => false + t.datetime "score_dt", :null => false + end + + add_index "scores", ["alocidispid", "blocidispid", "score_dt"], :name => "scores_alocidispid_blocidispid_score_dt_ndx" + add_index "scores", ["blocidispid", "alocidispid", "score_dt"], :name => "scores_blocidispid_alocidispid_score_dt_ndx" + + create_table "share_tokens", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "token", :limit => 15, :null => false + t.string "shareable_id", :limit => 64, :null => false + t.string "shareable_type", :limit => 50, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "share_tokens", ["token"], :name => "token_uniqkey", :unique => true + + create_table "spatial_ref_sys", :id => false, :force => true do |t| + t.integer "srid", :null => false + t.string "auth_name", :limit => 256 + t.integer "auth_srid" + t.string "srtext", :limit => 2048 + t.string "proj4text", :limit => 2048 + end + + create_table "topology", :force => true do |t| + t.string "name", :limit => nil, :null => false + t.integer "srid", :null => false + t.float "precision", :null => false + t.boolean "hasz", :default => false, :null => false + end + + add_index "topology", ["name"], :name => "topology_name_key", :unique => true + + create_table "tracks", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "connection_id", :limit => 64, :null => false + t.string "instrument_id", :limit => 64 + t.string "sound", :limit => 64, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "client_track_id", :limit => 64, :null => false + end + + create_table "user_authorizations", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "user_id", :limit => 64 + t.string "uid", :null => false + t.string "provider", :null => false + t.string "token" + t.datetime "token_expiration" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "secret" + end + + add_index "user_authorizations", ["provider", "uid"], :name => "user_authorizations_uniqkey", :unique => true + add_index "user_authorizations", ["user_id"], :name => "user_authorizations_user_id_idx" + + create_table "users", :id => false, :force => true do |t| + t.string "id", :limit => 64, :null => false + t.string "email", :null => false + t.string "remember_token" + t.string "encrypted_password", :null => false + t.boolean "admin", :default => false, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.boolean "musician", :default => false, :null => false + t.string "city", :limit => 100 + t.string "state", :limit => 100 + t.string "country", :limit => 100 + t.string "first_name", :limit => 50 + t.string "last_name", :limit => 50 + t.date "birth_date" + t.string "gender", :limit => 1 + t.string "internet_service_provider", :limit => 50 + t.string "signup_token" + t.boolean "email_confirmed", :default => false + t.string "photo_url", :limit => 2048 + t.string "session_settings", :limit => 4000 + t.string "reset_password_token", :limit => 64 + t.datetime "reset_password_token_created" + t.boolean "can_invite", :default => true, :null => false + t.tsvector "name_tsv" + t.string "environment", :default => "public", :null => false + t.boolean "subscribe_email", :default => true + t.string "update_email", :limit => 1024 + t.string "update_email_token", :limit => 1024 + t.string "original_fpfile", :limit => 8000 + t.string "cropped_fpfile", :limit => 8000 + t.string "cropped_s3_path", :limit => 512 + t.string "crop_selection", :limit => 256 + t.datetime "last_failed_certified_gear_at" + t.string "last_failed_certified_gear_reason", :limit => 256 + t.datetime "first_downloaded_client_at" + t.datetime "first_ran_client_at" + t.datetime "first_certified_gear_at" + t.datetime "first_music_session_at" + t.datetime "first_real_music_session_at" + t.datetime "first_good_music_session_at" + t.datetime "first_invited_at" + t.datetime "first_friended_at" + t.datetime "first_social_promoted_at" + t.boolean "show_whats_next", :default => true + t.text "biography" + t.decimal "lat", :precision => 15, :scale => 10 + t.decimal "lng", :precision => 15, :scale => 10 + t.string "icecast_server_group_id", :limit => 64, :default => "default", :null => false + t.datetime "first_recording_at" + t.string "large_photo_url", :limit => 2048 + t.string "cropped_large_s3_path", :limit => 512 + t.string "cropped_large_fpfile", :limit => 8000 + t.integer "addr", :limit => 8, :default => 0, :null => false + t.integer "locidispid", :limit => 8, :default => 0, :null => false + t.datetime "notification_seen_at" + t.datetime "first_liked_us" + end + + add_index "users", ["email"], :name => "users_email_key", :unique => true + add_index "users", ["name_tsv"], :name => "users_name_tsv_index", :using => :gin + add_index "users", ["remember_token"], :name => "remember_token_idx" + add_index "users", ["remember_token"], :name => "users_remember_token_key", :unique => true + add_index "users", ["signup_token"], :name => "users_signup_token_key", :unique => true + add_index "users", ["update_email_token"], :name => "users_update_email_token_key", :unique => true + end diff --git a/web/spec/features/feed_spec.rb b/web/spec/features/feed_spec.rb index 343d26bb7..d0005db7a 100644 --- a/web/spec/features/feed_spec.rb +++ b/web/spec/features/feed_spec.rb @@ -31,11 +31,20 @@ describe "Feed", :js => true, :type => :feature, :capybara_feature => true do find('.feed-details a.details').trigger(:click) # confirm user avatar exists + find("a.avatar-tiny[user-id=\"#{user.id}\"][hoveraction=\"musician\"] img") # confirm user name exists + find("a.musician-name[user-id=\"#{user.id}\"][hoveraction=\"musician\"]", text: user.name) # confirm instrument icons exist find("img[instrument-id=\"electric guitar\"]") + + # confirm hover bubbles show + find("a.avatar-tiny[user-id=\"#{user.id}\"][hoveraction=\"musician\"]").hover_intent + + # confirm navigate to user profile page + find(".avatar-tiny[user-id=\"#{user.id}\"][hoveraction=\"musician\"]").trigger(:click) + find("#user-profile h2[id=profile-username]", text: user.name) end # it "should render play widget" do @@ -63,14 +72,29 @@ describe "Feed", :js => true, :type => :feature, :capybara_feature => true do it "should render details" do visit "/client#/feed" + + # close recording finished dialog + find('#recording-finished-dialog h1') + find('#discard-session-recording').trigger(:click) + find('.feed-details a.details').trigger(:click) # confirm user avatar exists + find("a.avatar-tiny[user-id=\"#{user.id}\"][hoveraction=\"musician\"] img") # confirm user name exists + find("a.musician-name[user-id=\"#{user.id}\"][hoveraction=\"musician\"]", text: user.name) # confirm instrument icons exist find("img[instrument-id=\"electric guitar\"]") + + + # confirm hover bubbles show + find("a.avatar-tiny[user-id=\"#{user.id}\"][hoveraction=\"musician\"]").hover_intent + + # confirm navigate to user profile page + find(".avatar-tiny[user-id=\"#{user.id}\"][hoveraction=\"musician\"]").trigger(:click) + find("#user-profile h2[id=profile-username]", text: user.name) end # it "should render play widget" do