effective_assets 1.9.5 → 1.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20a77f1197fa8a7ccf0c56518e305fb23fa09625
4
- data.tar.gz: 37aec983b5f2e971ab49f1bc15eb0df9d588f169
3
+ metadata.gz: 91410d72b26ef078f618ee6ad6b201048e84213f
4
+ data.tar.gz: c96ca193919a3d33bd2cb591b1c213ac8c082e1d
5
5
  SHA512:
6
- metadata.gz: 30d3b68cc22b7ae95feef14210b22bfe52f732d680e269129f05338db191125594549dca1bed2ef70063b027245e2e50792ff5d0f18597529b5d2e132b993da6
7
- data.tar.gz: 46b1685339f2f3ea8d5f33106e29542c8318e7bb1504cdfddf456dac855954e72e390c6890167b8c43e511033c60316c10e1b6b33d91721b45828e03a1a42bd5
6
+ metadata.gz: 351498f91a283d76cee0993c715785b4d8de34cbb0653d63e0250fc5c622deed0d23a97ac16df88890160acdf818ac0e527e336e95c46b4ccbd9c4d4537d18c1
7
+ data.tar.gz: 4a7c1c0a163446168c16c8588deaeab98e68f701ca20aebd5bc6a3400f454f477532a7c4e931a755f09291c08d5c4926e5c8df8ac981c368dd2548bc73177cc3
data/README.md CHANGED
@@ -83,21 +83,24 @@ You will need an AWS IAM user with sufficient priviledges and a properly configu
83
83
  ### Log into AWS Console
84
84
 
85
85
  - Visit http://aws.amazon.com/console/
86
- - Click My Account from top-right and sign in with your AWS account.
86
+ - Click 'Sign In to the Console' from the top-right and sign in with your AWS account.
87
87
 
88
88
  ### Create an S3 Bucket
89
89
 
90
90
  - Click Services -> S3 from the top-left menu
91
91
  - Click Create Bucket
92
- - Give the Bucket a name, and select the US Standard region
92
+ - Give the Bucket a name, and select the US East (N. Virgina) region
93
+ - Click Next, Next, Next
94
+ - Don't configure permissions yet, we still have to create a user
95
+ - Click Next
93
96
 
94
97
  ### Configure CORS Permissions
95
98
 
96
99
  - From the S3 All Buckets Screen (as above)
97
100
 
98
- - Select the desired bucket to configure and select 'Properties'
99
- - Expand Permissions
100
- - Click 'Edit CORS Configuration' and enter the following
101
+ - Click the S3 bucket we just created
102
+ - Click the Permissions tab
103
+ - Click CORS configuration and enter the following:
101
104
 
102
105
  ```xml
103
106
  <CORSConfiguration>
@@ -124,23 +127,19 @@ The Bucket is now set up and ready to accept uploads, but we still need a user t
124
127
  - Click Services -> IAM from the top-left
125
128
 
126
129
  - Select Users from the left-side menu
127
- - Click Create New Users
128
-
129
- - Create just one user with any name
130
-
131
- - Expand the Show User Security Credentials
132
- - This displays the AWS Access Key and Secret Access Key.
133
- - (important) These are the two values you should copy into the effective_assets.rb initializer file
134
- - Click Close. It's okay that you didn't download the credentials.
135
-
136
- - Return to the Services -> IAM -> Users page
137
- - Click on the name of the user you just created (not the checkbox, but the username text)
138
-
139
- - Click Permissions tab
140
- - Click Attach Policy
141
-
142
- - Scroll down and Select 'AmazonS3FullAccess'
143
- - Click Attach Policy
130
+ - Click Add user
131
+ - Give it a user name
132
+ - Check Yes Programmatic access, No AWS management console access
133
+
134
+ - Click Next: Permissions
135
+ - Click Create group
136
+ - Give it a name like 's3-full-access'
137
+ - Sroll down and select 'AmazonS3FullAccess'
138
+ - Click Create group
139
+ - Click Next: Review
140
+ - Click Create user
141
+ - Record the Access key ID and Secret access key. These are the two values required by the effective_assets.rb initializer
142
+ - Click Close
144
143
 
145
144
  This user is now set up and ready to access the S3 Bucket previously created
146
145
 
@@ -156,7 +155,6 @@ config.aws_secret_access_key = 'xmowueroewairo74pacja1/werjow'
156
155
 
157
156
  You should now be able to upload to this bucket.
158
157
 
159
-
160
158
  ## Usage
161
159
 
162
160
  ### Model
@@ -274,6 +274,10 @@ module Effective
274
274
  def queue_async_job
275
275
  return if processed? || placeholder?
276
276
 
277
+ if EffectiveAssets.async == false
278
+ return Effective::ProcessWithActiveJob.perform_now(id)
279
+ end
280
+
277
281
  if [:inline, :async, nil].include?((Rails.application.config.active_job[:queue_adapter] rescue nil))
278
282
  Effective::ProcessWithSuckerPunchJob.perform_async(id)
279
283
  else
@@ -14,6 +14,7 @@ module EffectiveAssets
14
14
  mattr_accessor :attachments_table_name
15
15
 
16
16
  mattr_accessor :uploader
17
+ mattr_accessor :async
17
18
 
18
19
  mattr_accessor :aws_bucket
19
20
  mattr_accessor :aws_access_key_id
@@ -1,3 +1,3 @@
1
1
  module EffectiveAssets
2
- VERSION = '1.9.5'.freeze
2
+ VERSION = '1.9.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.5
4
+ version: 1.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-26 00:00:00.000000000 Z
11
+ date: 2017-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails