carrierwave-blitline 0.2.2 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2e5013be4a5ce22c000806350063644bc6539f7f3166bc830dfcb77ae3c6055
4
- data.tar.gz: c9fcc912a8b56ac482fcd7304e2687073b53aea4047abc581dd4bfca60716787
3
+ metadata.gz: b1a7ae7136dbcb3bea178f99cb695668a003f5d608d1da7c9a775dc62a541ddf
4
+ data.tar.gz: 45402822ecb6146ac8573fb61841de4f522a15e7e3b6a441fd38126cc73bc310
5
5
  SHA512:
6
- metadata.gz: 68bba39abe6392a2411070f023d92c91a888023df95db47c302b7b82f972a61045c2bc776d2dc866505d9eeb208aac63f8490125cfb0eec92cf3ad7d4e3d3316
7
- data.tar.gz: f787c84cb76119179b556bea1aa20859d93dea9df87c435da217cfe3d4739d7bae543106e7a6b6b6151723e19629c45a42692ff566171b079db74af739796ec6
6
+ metadata.gz: 8ab4aabff59b7f6eac3b454e2555bc570c06e410b33152a6e41446a095f85608846424b6e833255d29af2cf58e1a489c5dc95aafbbf1ee8bf7410ad6e2b61140
7
+ data.tar.gz: dff9184598f5843c4a2d295ecd49f634118c309ba9960987264fdcf2fd0dec7b33d1dc6594486847c87736b1b95b598a5acd447ef18c2a19c9f28a357645ce85
data/README.md CHANGED
@@ -74,12 +74,14 @@ Add this to your Carrierwave Uploader files:
74
74
 
75
75
  end
76
76
 
77
- ### ENV Variables
78
- The following env variables must be set for this to work properly.
77
+ ### Configuration
78
+
79
+ The following config attributes must be set for this to work properly.
80
+
81
+ CarrierWave::Blitline.s3_bucket_name = ENV["S3_BUCKET_NAME"]
82
+ CarrierWave::Blitline.s3_bucket_region = ENV["S3_BUCKET_REGION"]
83
+ CarrierWave::Blitline.blitline_application_id = ENV["BLITLINE_APPLICATION_ID"]
79
84
 
80
- ENV["BLITLINE_APPLICATION_ID"]
81
- ENV["S3_BUCKET_NAME"]
82
- ENV["S3_BUCKET_REGION"]
83
85
 
84
86
  ## Usage
85
87
 
@@ -5,6 +5,7 @@ module CarrierWave
5
5
 
6
6
  # From the Blitline gem
7
7
  require "blitline"
8
+ require "active_support/core_ext/module/attribute_accessors"
8
9
  require "active_support/core_ext/module/delegation"
9
10
  require "active_support/concern"
10
11
  require "carrierwave/blitline/version"
@@ -31,6 +32,12 @@ module CarrierWave
31
32
  after :store, :rip_process_images
32
33
  end
33
34
 
35
+ mattr_accessor :s3_bucket_name
36
+
37
+ mattr_accessor :s3_bucket_region
38
+
39
+ mattr_accessor :blitline_application_id
40
+
34
41
 
35
42
  # =============
36
43
  # = Delegates =
@@ -71,7 +78,7 @@ module CarrierWave
71
78
  # Returns a Hash of params posted off to Blitline API
72
79
  def job_hash
73
80
  {
74
- "application_id": ENV["BLITLINE_APPLICATION_ID"],
81
+ "application_id": CarrierWave::Blitline.blitline_application_id,
75
82
  "src": url,
76
83
  "v": BLITLINE_VERSION,
77
84
  "functions": functions
@@ -49,8 +49,8 @@ module CarrierWave
49
49
  "image_identifier": unique_identifier,
50
50
  "s3_destination": {
51
51
  "bucket": {
52
- "name": ENV["S3_BUCKET_NAME"],
53
- "location": ENV["S3_BUCKET_REGION"]
52
+ "name": CarrierWave::Blitline.s3_bucket_name,
53
+ "location": CarrierWave::Blitline.s3_bucket_region
54
54
  },
55
55
  "key": file_name_for_version(version)
56
56
  }
@@ -72,8 +72,8 @@ module CarrierWave
72
72
  "image_identifier": unique_identifier,
73
73
  "s3_destination": {
74
74
  "bucket": {
75
- "name": ENV["S3_BUCKET_NAME"],
76
- "location": ENV["S3_BUCKET_REGION"]
75
+ "name": CarrierWave::Blitline.s3_bucket_name,
76
+ "location": CarrierWave::Blitline.s3_bucket_region
77
77
  },
78
78
  "key": file_name_for_version(version)
79
79
  }
@@ -1,5 +1,5 @@
1
1
  module CarrierWave
2
2
  module Blitline
3
- VERSION = "0.2.2".freeze
3
+ VERSION = "0.3.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-blitline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bodacious
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-18 00:00:00.000000000 Z
11
+ date: 2018-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blitline