diff --git a/.gitignore b/.gitignore index 3c04bc4dbabdc4dc2f048454e49503e848f41984..0465c32152b46b569077691b760019326de33727 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ public/stylesheets/ui.css public/stylesheets/mobile.css public/diaspora spec/fixtures/*.yml +spec/fixtures/*.fixture.* # Uploded files and local files public/uploads/* diff --git a/lib/data_conversion/import_to_mysql.rb b/lib/data_conversion/import_to_mysql.rb index 8ee83748b4fc17b1bcee8b529da4aa993f044fcb..d93a557d40086b6e3d49a235791cd35188730e97 100644 --- a/lib/data_conversion/import_to_mysql.rb +++ b/lib/data_conversion/import_to_mysql.rb @@ -60,7 +60,12 @@ module DataConversion log "Importing users to main table..." User.connection.execute <<-SQL INSERT INTO users - SELECT mongo_users.* from mongo_users + SELECT mongo_users.*, 'email', mongo_users.email from mongo_users + SQL + User.connection.execute <<-SQL + UPDATE users + SET users.invitation_service = NULL, users.invitation_identifier = NULL + WHERE users.invitation_token IS NULL AND users.mongo_id IS NOT NULL SQL log "Imported #{User.count} users." end diff --git a/spec/fixtures/hcard.fixture.html b/spec/fixtures/hcard.fixture.html deleted file mode 100644 index 46b7bcabc556f40e049c56c64f854b192c09648a..0000000000000000000000000000000000000000 --- a/spec/fixtures/hcard.fixture.html +++ /dev/null @@ -1,62 +0,0 @@ -<div id='content'> -<h1>Robert12074e3 Grimm1009eba</h1> -<div id='content_inner'> -<div class='entity_profile vcard author' id='i'> -<h2>User profile</h2> -<dl class='entity_nickname'> -<dt>Nickname</dt> -<dd> -<a class='nickname url uid' href='http://google-1266a2d.com/' rel='me'>Robert12074e3 Grimm1009eba</a> -</dd> -</dl> -<dl class='entity_given_name'> -<dt>First name</dt> -<dd> -<span class='given_name'>Robert12074e3</span> -</dd> -</dl> -<dl class='entity_family_name'> -<dt>Family name</dt> -<dd> -<span class='family_name'>Grimm1009eba</span> -</dd> -</dl> -<dl class='entity_fn'> -<dt>Full name</dt> -<dd> -<span class='fn'>Robert12074e3 Grimm1009eba</span> -</dd> -</dl> -<dl class='entity_url'> -<dt>URL</dt> -<dd> -<a class='url' href='http://google-1266a2d.com/' id='pod_location' rel='me'>http://google-1266a2d.com/</a> -</dd> -</dl> -<dl class='entity_photo'> -<dt>Photo</dt> -<dd> -<img class='photo avatar' height='300px' src='/images/user/default.png' width='300px'> -</dd> -</dl> -<dl class='entity_photo_medium'> -<dt>Photo</dt> -<dd> -<img class='photo avatar' height='100px' src='/images/user/default.png' width='100px'> -</dd> -</dl> -<dl class='entity_photo_small'> -<dt>Photo</dt> -<dd> -<img class='photo avatar' height='50px' src='/images/user/default.png' width='50px'> -</dd> -</dl> -<dl class='entity_searchable'> -<dt>Searchable</dt> -<dd> -<span class='searchable'>true</span> -</dd> -</dl> -</div> -</div> -</div> diff --git a/spec/fixtures/host-meta.fixture.html b/spec/fixtures/host-meta.fixture.html deleted file mode 100644 index 3b5ca9b2bcf3dcdea35cb3c9e70944748c04aabe..0000000000000000000000000000000000000000 --- a/spec/fixtures/host-meta.fixture.html +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' - xmlns:hm='http://host-meta.net/xrd/1.0'> - <hm:Host>example.org</hm:Host> - <Link rel='lrdd' - template='http://example.org/webfinger?q={uri}'> - <Title>Resource Descriptor</Title> - </Link> -</XRD> diff --git a/spec/fixtures/webfinger.fixture.html b/spec/fixtures/webfinger.fixture.html deleted file mode 100644 index 0a9224bc1fa0f5715e572bf1114602a2d2de0e8f..0000000000000000000000000000000000000000 --- a/spec/fixtures/webfinger.fixture.html +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"> - <Subject>acct:alice@example.org</Subject> - <Alias>"http://google-1266a2d.com/"</Alias> - <Link rel="http://microformats.org/profile/hcard" type="text/html" href="http://google-1266a2d.com/hcard/users/677146a674670091"/> - <Link rel="http://joindiaspora.com/seed_location" type = 'text/html' href="http://google-1266a2d.com/"/> - <Link rel="http://joindiaspora.com/guid" type = 'text/html' href="677146a674670091"/> - - <Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="http://google-1266a2d.com/public/alice.atom"/> - - <Link rel="diaspora-public-key" type = 'RSA' href="LS0tLS1CRUdJTiBSU0EgUFVCTElDIEtFWS0tLS0tCk1JR0pBb0dCQU0xWWlZ -UDdkMzVqY0FwcUtTNU1BeWFPQkxjOUpNQkxzYkljeVFhNWU4WktXcGIxUDkz -RnB4b1gKVmxuZ0t0L2dzMEZwUHp2eCtJdTFldWR0SGEwUUZxV0dHMmN6SExE -cHJWajRNNjd2b1hTQVhrc1duUHUzOUs3RgpvaXFENnZGOXZpdkZ3aXJ6ZG9M -YktmU2ovdjNDb0FEZWwzeXlVYksvL0FCNyt5MmRSYTAxQWdNQkFBRT0KLS0t -LS1FTkQgUlNBIFBVQkxJQyBLRVktLS0tLQo= -"/> -</XRD>