simple_active_storage 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/simple_active_storage/railtie.rb +9 -6
- data/lib/simple_active_storage/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: 955a5b4ce800ff9cba383eeb001c4ce7d45e1858
|
|
4
|
+
data.tar.gz: 8af2618a3421db7915fa9908e0de88e48995d18b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
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.
|
|
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: {}
|