./lib/rack/newsstand.rb in rack-newsstand-0.1.1 vs ./lib/rack/newsstand.rb in rack-newsstand-0.1.2
- old
+ new
@@ -7,11 +7,11 @@
autoload :Issue, 'rack/newsstand/models/issue'
disable :raise_errors, :show_exceptions
configure do
- Sequel.extension :core_extensions, :migration, :pg_array, :pg_hstore, :pg_hstore_ops
+ Sequel.extension :core_extensions, :migration, :pg_array, :pg_array_ops, :pg_hstore, :pg_hstore_ops
if ENV['DATABASE_URL']
DB = Sequel.connect(ENV['DATABASE_URL'])
DB.extend Sequel::Postgres::PGArray::DatabaseMethods
DB.extend Sequel::Postgres::HStore::DatabaseMethods
@@ -24,10 +24,10 @@
@issues = Issue.where("published_at <= :now AND (expires_at > :now OR expires_at IS NULL)", now: Time.now).order(:published_at).all
request.accept.each do |type|
case type.to_s
when 'application/atom+xml', 'application/xml', 'text/xml'
- content_type 'application/x-plist'
+ content_type 'application/atom+xml'
return builder :atom
when 'application/x-plist'
content_type 'application/x-plist'
return @issues.to_plist
when 'application/json'