1 Commits

Author SHA1 Message Date
Michael Bianco
8a12e1c25e Running tests, and fixing breaking changes, for 1.2.3 2013-03-10 09:47:35 -04:00
10 changed files with 28 additions and 50 deletions

View File

@@ -9,4 +9,4 @@ group :test do
end
end
gem 'spree', '~> 1.3.2'
gem 'spree', '~> 1.2.3'

View File

@@ -1,5 +1,4 @@
"0.7.x" => { :ref => "eddaea63959586d123007cbca3be5bf9c5edb1a7" }
"1.0.x" => { :ref => "a8c27750ef1cf9d0ad1a2a6ebe33307da900a5c1" }
"1.1.x" => { :branch => "1-1-stable" }
"1.2.x" => { :ref => "9360c635039aaeeee18026b830aa96cc7587cd0d" }
"1.3.x" => { :branch => "master" }
"1.2.x" => { :branch => "master" }

View File

@@ -1,7 +1,7 @@
module Spree
class DigitalsController < Spree::StoreController
class DigitalsController < Spree::BaseController
ssl_required :show
def show
link = DigitalLink.find_by_secret(params[:secret])
@@ -19,9 +19,9 @@ module Spree
Rails.logger.error "Missing Digital Item: #{attachment.path}"
end
end
render :unauthorized
end
end
end

View File

@@ -9,7 +9,7 @@ Spree::LineItem.class_eval do
private
# TODO there is no reason to create the digital links until the order is complete
# Create the download link for this item if it is digital.
def create_digital_links
digital_links.delete_all

View File

@@ -1,9 +0,0 @@
<% if defined?(SpreeFancy) %>
<% content_for :subheader do %>
<h1><%= t('.unauthorized') %></h1>
<% end %>
<% else %>
<h1><%= t('.unauthorized') %></h1>
<% end %>
<%= t('.explained') %>

View File

@@ -1,7 +1,11 @@
en:
broken_file: Warning! this file is broken
digital_versions: Digital Versions
reset_downloads: Reset Digital Downloads
downloads_reset: Digital Downloads Reset
current_file: Current File
new_file: New File
delete_file: Delete this file
broken_file: Warning! this file is broken
delete_file_cofirmation: Are you sure you want to delete the file %{filename}?
digital_delivery: Digital Delivery
digital_download: Download %{type} ↓
@@ -11,14 +15,5 @@ en:
mobi: Kindle eBook
epub: ePub eBook
pdf: pdf eBook
digital_versions: Digital Versions
downloads_reset: Digital Downloads Reset
new_file: New File
reset_downloads: Reset Digital Downloads
spree:
digitals:
unauthorized:
explained: This download link has expired.
unauthorized: Unauthorized
spree_digital:
upload: Upload
upload: Upload

View File

@@ -1,7 +1,9 @@
it:
broken_file: Attenzione! questo file sembra essere rotto
digital_versions: Versioni Digitali
current_file: File Corrente
new_file: Nuovo File
delete_file: Elimina questo file
broken_file: Attenzione! questo file sembra essere rotto
delete_file_cofirmation: Sei sicuro di voler eliminare il file %{filename}?
digital_delivery: Consegna Digitale
digital_download: Download %{type} ↓
@@ -11,12 +13,6 @@ it:
mobi: Kindle eBook
epub: ePub eBook
pdf: pdf eBook
digital_versions: Versioni Digitali
new_file: Nuovo File
spree:
digitals:
unauthorized:
explained: This download link has expired.
unauthorized: Unauthorized
spree_digital:
upload: Upload
upload: Upload

View File

@@ -1,14 +1,12 @@
ja:
broken_file: 注意! このファイルが壊れている!
current_file: 現在のバージョン
delete_file: このファイルを削除
delete_file_cofirmation: 本当に「%{filename}」を削除しても宜しいですか?
digital_shipping: ダウンロードリンクを<strong>%{email}</strong>に送ります
digital_versions: デジタル版
current_file: 現在のバージョン
new_file: 新しいファイル
spree:
digitals:
unauthorized:
explained: This download link has expired.
unauthorized: Unauthorized
upload: アップロード
delete_file: このファイルを削除
broken_file: 注意! このファイルが壊れている!
delete_file_cofirmation: 本当に「%{filename}」を削除しても宜しいですか?
digital_shipping: ダウンロードリンクを<strong>%{email}</strong>に送ります

View File

@@ -17,7 +17,7 @@ The idea is simple. You attach a file to a Product (or a Variant of this Product
* The file `views/order_mailer/confirm_email.text.erb` is the only thing that should need customization. If you are looking for HTML emails, [this branch of spree-html-email](http://github.com/iloveitaly/spree-html-email) supports spree_digital
* A purchased product can be downloaded even if you disable the product immediately. You would have to remove the attached file in your admin section to prevent people from downloading purchased products.
* File are uploaded to `rails_root/private`. Make sure it's symlinked in case you're using Capistrano. If you want to change the upload path, [check out this gist](https://gist.github.com/3187793#file_spree_digital_path_change_decorator.rb)
* You must add a `views/spree/digitals/unauthorized.html.erb` file to customize an error message to the user if they exceed the download / days limit
* You must add a `views/spree/digitals/unauthorized.html.erb` file to present an error message to the user if they exceed the download / days limit
* We use send_file to send the files on download. See below for instructions on how to push file downloading off to nginx.
## Installation

View File

@@ -12,8 +12,7 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'
s.required_ruby_version = '>= 1.8.7'
s.add_dependency 'spree_core', '~> 1.3.0'
s.add_dependency 'spree_core', '~> 1.1'
# test suite
s.add_development_dependency 'shoulda-matchers'