more cool seed fixings
This commit is contained in:
parent
6ac1c5bc21
commit
66e9423dc9
2 changed files with 12 additions and 9 deletions
|
|
@ -10,12 +10,12 @@ photographer:
|
|||
posts:
|
||||
- text: 'i was definitely some sort of bird in my past life.'
|
||||
- text: 'This is not a deer'
|
||||
photo: ' http://25.media.tumblr.com/tumblr_m2mmzybwEs1qevmz4o1_500.jpg'
|
||||
photo: 'http://25.media.tumblr.com/tumblr_m2mmzybwEs1qevmz4o1_500.jpg'
|
||||
- text: 'Sleepless in #Amsterdam'
|
||||
photo: 'https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash3/539915_3737052667985_1326174311_33541557_1023742200_n.jpg'
|
||||
- photo: 'http://24.media.tumblr.com/tumblr_m2w7ynCHct1r2ysm3o1_500.png'
|
||||
- photo: 'http://28.media.tumblr.com/tumblr_m28j5osnBy1qj69kjo1_1280.jpg'
|
||||
- photo: ' http://29.media.tumblr.com/tumblr_m2yd1hP3SS1r1m6ayo1_500.jpg'
|
||||
- photo: 'http://29.media.tumblr.com/tumblr_m2yd1hP3SS1r1m6ayo1_500.jpg'
|
||||
- photo: 'https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/33608_1638866977335_1406591038_1724566_8022154_n.jpg'
|
||||
text: 'hello friend'
|
||||
- photo: 'https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/215323_10150153470293170_604243169_6767922_1154482_n.jpg'
|
||||
|
|
@ -41,7 +41,6 @@ collector:
|
|||
- photo: http://www.everydaywithedward.com/img/links/scarygoround.PNG
|
||||
- photo: http://payload.cargocollective.com/1/0/4707/904187/tumblr_ktw9iioNtU1qa2i2xo1_400_1.gif
|
||||
- video: http://vimeo.com/34750078
|
||||
- photo: http://dearada.typepad.com/.a/6a00d8341bf66653ef010536886222970c-pi
|
||||
- text: '#karlmartens'
|
||||
photo: http://www.harmenliemburg.nl/wp-content/uploads/Karel-Martens-5.jpg
|
||||
- photo: http://catalogtree.net/pictures/001236image.jpg
|
||||
|
|
|
|||
|
|
@ -11,9 +11,10 @@ task :cool => :environment do
|
|||
new_post = Factory.build(:status_message, :public => true, :text => '', :author => user.person)
|
||||
new_post.text = post.fetch('text', '')
|
||||
|
||||
if p = post['photo']
|
||||
if post['photo'].present?
|
||||
new_photo = Factory.build(:photo)
|
||||
new_photo.processed_image_url = p
|
||||
new_photo.remote_processed_image_url = post['photo']
|
||||
new_photo.remote_unprocessed_image_url = post['photo']
|
||||
new_photo.save
|
||||
new_photo.update_remote_path
|
||||
new_post.photos << new_photo
|
||||
|
|
@ -28,8 +29,11 @@ end
|
|||
|
||||
def make_user_with_name(name)
|
||||
first, last = name.split
|
||||
return user if user = User.find_by_username(first)
|
||||
person = Factory.build(:person)
|
||||
puts first, last
|
||||
user = User.find_by_username(first)
|
||||
return user if user.present?
|
||||
puts Person.all.inspect
|
||||
person = Factory.build(:person, :diaspora_handle => "#{first}@diaspora.dev")
|
||||
person.save!
|
||||
profile = Factory(:profile, :first_name => first, :last_name => last, :person => person)
|
||||
|
||||
|
|
@ -41,8 +45,8 @@ def make_user_with_name(name)
|
|||
person.profile.destroy
|
||||
person.profile = profile
|
||||
profile.person_id = person.id
|
||||
profile.save
|
||||
profile.save!
|
||||
|
||||
user.save
|
||||
user.save(:validate => false)
|
||||
user
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue