Skip to content

Commit

Permalink
adding index and rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonch committed Oct 25, 2011
1 parent db8b286 commit bb13e69
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 246 deletions.
7 changes: 2 additions & 5 deletions app/models/mashup.rb
Expand Up @@ -5,11 +5,8 @@ def self.create
search_word = random_tweet.text.split(" ")[3]
image = Flickr.search(search_word)

return {:url => image.url_m,
:tweet_text => random_tweet.text,
:screen_name => random_tweet.screen_name,
:profile_url => random_tweet.profile_image_url,
:tweet => random_tweet,

return {:tweet => random_tweet,
:image => image}
end
end
12 changes: 12 additions & 0 deletions app/views/welcome/index.html.haml
@@ -0,0 +1,12 @@
%h1 Twitflickup

= image_tag @mashup[:image].url_m

%div
= image_tag @mashup[:tweet][:user][:profile_image_url], :style => "float:left; padding-right:5px;"
%p
= @mashup[:tweet].text
%br
@
= @mashup[:tweet][:user][:screen_name]

17 changes: 17 additions & 0 deletions lib/tasks/sauce.rake
@@ -0,0 +1,17 @@
require 'yaml'

namespace "sl" do
desc "Open up a tunnel to Saucelabs"
task "connect" do
begin
config = YAML::load(File.open("#{Rails.root}/config/ondemand.yml"))
if config['username'] && config['access_key']
system "java -jar vendor/sauce/Sauce-Connect.jar #{config['username']} #{config['access_key']}"
else
puts "Connection failed! Both 'username' and 'access_key' are required. Check to make sure config/ondemand.yml is correct."
end
rescue
puts "Couldn't find Saucelabs config file. Please create config/ondemand.yml"
end
end
end
241 changes: 0 additions & 241 deletions public/index.html

This file was deleted.

0 comments on commit bb13e69

Please sign in to comment.