Commit 98b41d8f authored by Maxwell Salzberg's avatar Maxwell Salzberg
Browse files

update seeds.rb to reflect asset pipeline, and a lil bit of refactoring

parent 8e0998ab
......@@ -19,21 +19,23 @@ alice = Factory(:user_with_aspect, :username => "alice", :password => 'evankorth
bob = Factory(:user_with_aspect, :username => "bob", :password => 'evankorth')
eve = Factory(:user_with_aspect, :username => "eve", :password => 'evankorth')
def url_hash(name)
image_url = "/assets/user/#{name}jpg"
{
:image_url => image_url,
:image_url_small => image_url,
:image_url_medium => image_url
}
end
print "Creating seeded users... "
alice.person.profile.update_attributes(:first_name => "Alice", :last_name => "Smith",
:image_url => "/images/user/uma.jpg",
:image_url_small => "/images/user/uma.jpg",
:image_url_medium => "/images/user/uma.jpg")
bob.person.profile.update_attributes(:first_name => "Bob", :last_name => "Grimm",
:image_url => "/images/user/wolf.jpg",
:image_url_small => "/images/user/wolf.jpg",
:image_url_medium => "/images/user/wolf.jpg")
eve.person.profile.update_attributes(:first_name => "Eve", :last_name => "Doe",
:image_url => "/images/user/angela.jpg",
:image_url_small => "/images/user/angela.jpg",
:image_url_medium => "/images/user/angela.jpg")
alice.person.profile.update_attributes({:first_name => "Alice", :last_name => "Smith"}.merge(url_hash('uma')))
bob.person.profile.update_attributes({:first_name => "Bob", :last_name => "Grimm"}.merge(url_hash('wolf')))
eve.person.profile.update_attributes({:first_name => "Eve", :last_name => "Doe"}.merge(url_hash('angela')))
puts "done!"
print "Connecting users... "
connect_users(bob, bob.aspects.first, alice, alice.aspects.first)
connect_users(bob, bob.aspects.first, eve, eve.aspects.first)
......@@ -79,5 +81,4 @@ end
puts " done!"
puts "Successfully seeded the db with users eve, bob, and alice (password: 'evankorth')"
puts ""
puts ""
\ No newline at end of file
......@@ -149,7 +149,7 @@ FactoryGirl.define do
sequence(:uid) { |id| "a#{id}"}
sequence(:name) { |num| "Rob Fergus the #{num.ordinalize}" }
association :service
photo_url "/images/user/adams.jpg"
photo_url "/assets/user/adams.jpg"
end
factory(:comment) do
......@@ -170,7 +170,7 @@ FactoryGirl.define do
factory(:activity_streams_photo, :class => ActivityStreams::Photo) do
association(:author, :factory => :person)
image_url "#{AppConfig[:pod_url]}/images/asterisk.png"
image_url "#{AppConfig[:pod_url]}/assets/asterisk.png"
image_height 154
image_width 154
object_url "http://example.com/awesome_things.gif"
......@@ -185,7 +185,7 @@ FactoryGirl.define do
sequence(:application_base_url) { |token| "http://chubbi#{token}.es/" }
description "The best way to chub on the ne"
icon_url "/images/chubbies48.png"
icon_url "/assets/chubbies48.png"
permissions_overview "I will use the permissions this way!"
sequence(:public_key) {|n| OpenSSL::PKey::RSA.new(2048) }
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment