activestorage-digitalocean 0.0.0 → 0.0.1

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
  SHA1:
3
- metadata.gz: 60a5f6738634d63bb09c61cebba000cc45da811f
4
- data.tar.gz: 6eb7bfc530e91350f36547af72548561ca90946b
3
+ metadata.gz: c57b37a5d5e54701a833796a825b218fb5e9a7ea
4
+ data.tar.gz: 3905981b6d88a18e28b623ad90117c1971d73c74
5
5
  SHA512:
6
- metadata.gz: 448ca2b8891a1ec5eb16cd4388f7b4b7c36a13bfe1a4b9bbdf5cff3e5ed5e8330b935b94fe31d3c6e652713ec183c132bd42f040f7eb14f2540c082536fa3bba
7
- data.tar.gz: f54823c25c80b164531e5f4b184dca9b514aa6a13a00cbe7a2107e04ac6acd0ddcdbd08eea1ad0b0f81d4593204eaadb4a2111d6a4b0c24c9747769f29b005d2
6
+ metadata.gz: ba475208ce4f5a3c4147ad222a9e5a9cfd3f065e7633967000bfcc935d948e3ffdb38225a697c23286708b3f4bce9584ae813a525f1105ac89f149e68b7b0eb8
7
+ data.tar.gz: 9faaf16d27540417ea4bec2897f2e8fa30e333949529e2ce43c6642201a98a3cb624e215a1ef7210553a459ce527dbce307f85fe616a974ca1bf354918079f50
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveStorage
4
+ class UnavailableConfigurationError < StandardError; end
5
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_storage/service/s3_service"
4
+
5
+ module ActiveStorage
6
+ # Wraps the DigitalOcean Spaces as an Active Storage service.
7
+ # See ActiveStorage::Service for the generic API documentation that applies to all services.
8
+ class Service::DigitalOceanService < Service::S3Service
9
+ def initialize(space_name:, upload: {}, **options)
10
+ options[:access_key_id] = options.delete(:spaces_access_key)
11
+ options[:secret_access_key] = options.delete(:spaces_secret_key)
12
+
13
+ raise ActiveStorage::UnavailableConfigurationError if upload[:server_side_encryption]
14
+
15
+ super(bucket: space_name, upload: upload, **options)
16
+ end
17
+ end
18
+ end
@@ -1 +1,5 @@
1
- require "activestorage-digitalocean/base"
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveStorageDigitalOcean
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveStorageDigitalOcean
4
+ VERSION = "0.0.1"
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activestorage-digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Graham Turner
@@ -9,15 +9,46 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2010-04-28 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activestorage
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: aws-sdk-s3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1'
13
41
  description: A library for interacting with DigitalOcean Spaces through ActiveStorage
14
42
  email: turnertgraham@gmail.com
15
43
  executables: []
16
44
  extensions: []
17
45
  extra_rdoc_files: []
18
46
  files:
47
+ - lib/active_storage/errors.rb
48
+ - lib/active_storage/service/digital_ocean_service.rb
19
49
  - lib/activestorage-digitalocean.rb
20
- homepage: http://github.com/zdennis/activerecord-import
50
+ - lib/activestorage-digitalocean/version.rb
51
+ homepage: https://github.com/tgturner/activestorage-digitalocean
21
52
  licenses:
22
53
  - MIT
23
54
  metadata: {}
@@ -29,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
29
60
  requirements:
30
61
  - - ">="
31
62
  - !ruby/object:Gem::Version
32
- version: '0'
63
+ version: 1.9.2
33
64
  required_rubygems_version: !ruby/object:Gem::Requirement
34
65
  requirements:
35
66
  - - ">="