enju_export 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
data/app/models/export_file.rb
CHANGED
@@ -4,7 +4,14 @@ class ExportFile < ActiveRecord::Base
|
|
4
4
|
belongs_to :user
|
5
5
|
validates_associated :user_id
|
6
6
|
|
7
|
-
|
7
|
+
if configatron.uploaded_file.storage == :s3
|
8
|
+
has_attached_file :export, :storage => :s3, :s3_credentials => "#{Rails.root.to_s}/config/s3.yml",
|
9
|
+
:s3_permissions => :private
|
10
|
+
else
|
11
|
+
has_attached_file :export,
|
12
|
+
:path => ":rails_root/private/system/:class/:attachment/:id_partition/:style/:filename"
|
13
|
+
end
|
14
|
+
validates_attachment_content_type :export, :content_type => ['text/csv', 'text/plain', 'text/tab-separated-values', 'application/octet-stream']
|
8
15
|
|
9
16
|
state_machine :initial => :pending do
|
10
17
|
event :sm_start do
|
data/lib/enju_export/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_export
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|