storagy 0.0.3 → 0.0.4

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: 361624b47f8728bb56b4c4c52ba3d748d44ff1ad
4
- data.tar.gz: 34c5465e514fa49a9806e1c1bcb457bb4ab24077
3
+ metadata.gz: df8fc81bbeb540ca50f917d08701895709876425
4
+ data.tar.gz: d4c01ae1ab93718376317b41162e3ff4026cb373
5
5
  SHA512:
6
- metadata.gz: 8011708937c24b875fafd7717ecd2fad1fc2ab08ae8d23d8b8675e5399574b7bbd0d2679ebf2efeeaaaa077ed1fcbe526d941bae7af2a6b49f29920106b16cd3
7
- data.tar.gz: c46ddbfc025cf97910a3bd6135e1c0a834c5fdb55fbe3308e51096854355da4bd6cef50ae32ac13d905764d7239a52a9d9741da2be4be82d8107ee291f18b8ac
6
+ metadata.gz: 642c7fc787d3b54b93921bd2493b3ecb5d92327da01c460825aacf809b4706736e5c2590c6b934901efa00ff12a59df44fe3704ece80594ff6f9f4d512caa246
7
+ data.tar.gz: ef23020d58f45d6746653797919e49a979d25f38caa7d58d42de5a5b6be1a87d53a7945303f708e2f57db6042967b25cec049875a9443f6376d920d86328d605
data/lib/storagy.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require "storagy/version"
2
- require "storagy/railtie" if defined?(Rails)
3
2
 
4
3
  module Storagy
5
4
  class BucketUrlError < StandardError ; end
@@ -8,7 +7,7 @@ module Storagy
8
7
  if ENV['STORAGY_S3_BUCKET_URL']
9
8
  ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'] = get_aws_storagy_credentials unless (ENV['AWS_ACCESS_KEY_ID'] || ENV['AWS_SECRET_ACCESS_KEY'])
10
9
  else
11
- raise BucketUrlError, "Storagy bucket url STORAGY_S3_URL is not configured.\nMake sure you provisioned Storagy successfully."
10
+ raise BucketUrlError, "Storagy bucket url STORAGY_S3_BUCKET_URL is not configured.\nMake sure you provisioned Storagy successfully."
12
11
  end
13
12
  end
14
13
 
@@ -21,3 +20,5 @@ module Storagy
21
20
  return keys.first, keys.last
22
21
  end
23
22
  end
23
+
24
+ Storagy.set_aws_credentials_from_storagy if ENV['STORAGY_S3_BUCKET_URL']
@@ -1,3 +1,3 @@
1
1
  module Storagy
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: storagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikolay Samokhin
@@ -51,7 +51,6 @@ files:
51
51
  - README.md
52
52
  - Rakefile
53
53
  - lib/storagy.rb
54
- - lib/storagy/railtie.rb
55
54
  - lib/storagy/version.rb
56
55
  - storagy.gemspec
57
56
  homepage: ''
@@ -1,7 +0,0 @@
1
- module Storagy
2
- class Railtie < Rails::Railtie
3
- initializer "storagy_railtie.configure_aws_keys_from_storagy" do
4
- Storagy.set_aws_credentials_from_storagy
5
- end
6
- end
7
- end