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.
@@ -4,7 +4,14 @@ class ExportFile < ActiveRecord::Base
4
4
  belongs_to :user
5
5
  validates_associated :user_id
6
6
 
7
- has_attached_file :export
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
@@ -2,7 +2,7 @@
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.export_file')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
- <table class="index">
5
+ <table class="table table-striped index">
6
6
  <tr>
7
7
  <th>Export file name</th>
8
8
  <th>Export content type</th>
@@ -1,3 +1,3 @@
1
1
  module EnjuExport
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-06-28 00:00:00.000000000 Z
12
+ date: 2012-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails