Skip to content

Commit

Permalink
move rake task to one file
Browse files Browse the repository at this point in the history
  • Loading branch information
JuddL333 committed Jul 17, 2013
1 parent d2ccbb3 commit 6565e4f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/models/story.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def self.create_from_meetup(json_event)

def self.create_from_ticket_cake(xml_event)
start_time = Time.zone.parse(/content="(.*)"/.match(xml_event['pubDate'])[1]) + 1.hour
return unless xml_event['description'].include?('#VegasTech')
# return unless xml_event['description'].include?('#VegasTech')
story = self.find_or_create_by_twitter_id(
twitter_id: "ticket_cake_#{xml_event['guid']}",
twitter_handle: '@VegasTech_News',
Expand Down
15 changes: 15 additions & 0 deletions lib/tasks/events.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace :pull_events do
desc "Pull events with the #{ENV['TRACK_HASHTAG']} in the description."
task meetup: :environment do
MeetupFetcher.get_events
end

desc "Pull events with the #{ENV['TRACK_HASHTAG']} in the description."
task ticket_cake: :environment do
TicketCakeFetcher.get_events
end

desc "Pull all events in."
task all_sources: ['pull_events:meetup', 'pull_events:ticket_cake']

end
6 changes: 0 additions & 6 deletions lib/tasks/meetup_events.rake

This file was deleted.

6 changes: 0 additions & 6 deletions lib/tasks/ticket_cake_events.rake

This file was deleted.

0 comments on commit 6565e4f

Please sign in to comment.