effective_assets 1.9.5 → 1.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -23
- data/app/models/effective/asset.rb +4 -0
- data/lib/effective_assets.rb +1 -0
- data/lib/effective_assets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91410d72b26ef078f618ee6ad6b201048e84213f
|
4
|
+
data.tar.gz: c96ca193919a3d33bd2cb591b1c213ac8c082e1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
-
-
|
99
|
-
-
|
100
|
-
- Click
|
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
|
128
|
-
|
129
|
-
-
|
130
|
-
|
131
|
-
-
|
132
|
-
-
|
133
|
-
-
|
134
|
-
-
|
135
|
-
|
136
|
-
-
|
137
|
-
- Click
|
138
|
-
|
139
|
-
- Click
|
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
|
data/lib/effective_assets.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|