simple_active_storage 0.1.0 → 0.1.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: b52e3afcde6f569b71666a954f8019b15189e6a6
4
- data.tar.gz: eff78df7e7e8d8f44748537934c28dfaad663bbb
3
+ metadata.gz: 955a5b4ce800ff9cba383eeb001c4ce7d45e1858
4
+ data.tar.gz: 8af2618a3421db7915fa9908e0de88e48995d18b
5
5
  SHA512:
6
- metadata.gz: 95612549f883e1226ec2913fb8122f0412d25d88ab5274f61b20269e4d30d6cc056a29b9fc6e0da3ad03df9fba5e49666d131df564c1f17577b0031dc292e801
7
- data.tar.gz: b410ab56952be48e9345d242a6a64331aff3e2d03b761e99f0f3f53955086b39f830202e8f2b9f29b73a2b8d17c181b23cfc674c0b8570a406a9e8494529518b
6
+ metadata.gz: 7a5f9d4f2e558672f6e9a12a827e61fd2dfd95de02b1374e9ba3ad7e1db276a7bfabd5a891f1a602da3a83240ccf4f41aa3ee2ea2ef28500abee3deae5009b21
7
+ data.tar.gz: 269d65805eee43153d494610dd925211281417928e3efdeecb144706604536d18bdfb583d2355d19dbab75110200a713ce16c85e363591f55fbf969371510795
data/README.md CHANGED
@@ -19,7 +19,12 @@ user.avatar.url
19
19
  这样更简单一点呢
20
20
 
21
21
  ## Usage
22
- config/initializers/simple_active_storage.rb
22
+
23
+ generate config file:
24
+ rails g simple_active_storage
25
+ it will generate a file located at: config/initializers/simple_active_storage.rb
26
+ content look like this:
27
+
23
28
  ```ruby
24
29
  SimpleActiveStorage.default_url_options = {host: "www.example.com"}
25
30
  SimpleActiveStorage.transformation :thumb do
@@ -1,14 +1,17 @@
1
1
  module SimpleActiveStorage
2
2
  class Railtie < ::Rails::Railtie
3
3
  initializer "simple_active_storage" do
4
- ActiveStorage::Variation.send :prepend,SimpleActiveStorage::Variation
5
- ActiveStorage::Attached::One.send :include,SimpleActiveStorage::Url
6
- ActiveStorage::Attachment.send :include,SimpleActiveStorage::Url
7
- ActiveStorage::Variant.send :include,SimpleActiveStorage::Url
8
- ActiveStorage::Preview.send :include,SimpleActiveStorage::Url
9
- config.after_initialize do
4
+ ActiveSupport.on_load :active_storage_blob do
5
+
6
+ ActiveStorage::Variation.send :prepend,SimpleActiveStorage::Variation
7
+ ActiveStorage::Attached::One.send :include,SimpleActiveStorage::Url
8
+ ActiveStorage::Attachment.send :include,SimpleActiveStorage::Url
9
+ ActiveStorage::Variant.send :include,SimpleActiveStorage::Url
10
+ ActiveStorage::Preview.send :include,SimpleActiveStorage::Url
10
11
  ActiveStorage::Blob.send :include,SimpleActiveStorage::Url
12
+
11
13
  end
14
+
12
15
  end
13
16
 
14
17
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleActiveStorage
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_active_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - aotianlong
@@ -57,7 +57,7 @@ files:
57
57
  - lib/simple_active_storage/variation.rb
58
58
  - lib/simple_active_storage/version.rb
59
59
  - lib/tasks/simple_active_storage_tasks.rake
60
- homepage: http://www.github.com/aotianlong
60
+ homepage: http://www.github.com/aotianlong/simple_active_storage
61
61
  licenses:
62
62
  - MIT
63
63
  metadata: {}