Skip to content

Commit

Permalink
Merge branch 'integration' of github.com:munen/voicerepublic_dev into…
Browse files Browse the repository at this point in the history
… integration
  • Loading branch information
branch14 committed Jun 5, 2014
2 parents c509e74 + 0d64c55 commit c6f8766
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
7 changes: 7 additions & 0 deletions app/models/talk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class Talk < ActiveRecord::Base
end
event :archive, timestamp: :processed_at do
transitions from: :processing, to: :archived
# in rare case we might to override a talk
# which has never been postprocessed
transitions from: :postlive, to: :archived
# or which has never even happended
transitions from: :prelive, to: :archived
end
end

Expand Down Expand Up @@ -412,6 +417,8 @@ def process_override!(uat=false)
chain ||= Setting.get('audio.override_chain')
chain = chain.split(/\s+/)
run_chain! chain, uat

archive! unless archived?
end

def run_chain!(chain, uat=false)
Expand Down
12 changes: 6 additions & 6 deletions app/views/shared/_podcast.rss.builder
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ xml.rss namespaces.merge(version: '2.0') do
# title
xml.title { xml.cdata! @podcast.title }
xml.dc(:title) { xml.cdata! @podcast.title }

xml.description do
xml.cdata! @podcast.description
end
Expand All @@ -54,7 +54,7 @@ xml.rss namespaces.merge(version: '2.0') do

# http://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
xml.tag! 'atom:link', rel: 'self',
type: 'application/rss+xml',
type: 'application/rss+xml',
href: request.url

xml.itunes :image, href: @podcast.image_url
Expand All @@ -68,8 +68,8 @@ xml.rss namespaces.merge(version: '2.0') do
# author
xml.itunes :author, @podcast.author
xml.dc :creator, @podcast.author
xml.itunes :owner do

xml.itunes :owner do
xml.itunes :name, 'VoiceRepublic Service'
xml.itunes :email, '[email protected]'
end
Expand All @@ -78,7 +78,7 @@ xml.rss namespaces.merge(version: '2.0') do
talks.each do |talk|
# skip talks where media is missing for whatever reason
next unless talk.podcast_file

xml.item do
xml.title h talk.title

Expand All @@ -91,7 +91,7 @@ xml.rss namespaces.merge(version: '2.0') do
xml.itunes :duration, talk.podcast_file[:duration]
xml.itunes :explicit, 'no'
xml.itunes :image, href: talk.image.thumb('1400x1400#').url
xml.pubDate talk.processed_at.to_s(:rfc822)
xml.pubDate talk.processed_at.try(:to_s, :rfc822)
xml.link venue_talk_url(talk.venue, talk)
xml.guid venue_talk_url(talk.venue, talk), isPermaLink: true
xml.enclosure url: vrmedia_url(talk),
Expand Down
8 changes: 4 additions & 4 deletions app/views/users/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
.row.collapse-large-only
.large-12.columns.text-center
%dl.tabs.vr-tabs(data-tab='true')
%dd.text-center.active
%dd.text-center
%a(href="#about")
%span.icon-description
= t('.about')
%dd.text-center
%dd.text-center.active
%a(href="#venues")
%span.icon-guide
= t('.venues')
Expand All @@ -44,10 +44,10 @@
.row.collapse-large-only
.large-12.columns.tabs-content
#about.about-content.content.active
#about.about-content.content
= raw @user.about

#venues.venues-content.content
#venues.venues-content.content.active
= render partial: 'shared/venue_medium_box', collection: @user.venues

#schedule.content TODO
Expand Down
1 change: 1 addition & 0 deletions config/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@
#every 1.hour, roles: [:app] do
# rake 'sync:rp14'
#end

14 changes: 0 additions & 14 deletions lib/tasks/cleanup.rake
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,4 @@ namespace :cleanup do
talk.update_attribute :description, '<i>blank description</i>'
end
end

# TODO this task is to be removed after transition to s3
task move_to_s3_step2: :environment do
# delete symlinks
path = File.expand_path('public/system/audio', Rails.root)
FileUtils.rm_rf(path, verbose: true)

# delete archive and archive_raw
path = File.expand_path(Settings.rtmp.archive_path, Rails.root)
FileUtils.rm_rf(path, verbose: true)
path = File.expand_path(Settings.rtmp.archive_raw_path, Rails.root)
FileUtils.rm_rf(path, verbose: true)
end

end

0 comments on commit c6f8766

Please sign in to comment.