acts_as_hoc_avatarable 0.1.7 → 0.1.8
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c78303c6a1efacc7feb296146fb1c64cb20ca76f
|
|
4
|
+
data.tar.gz: bef89ae181686fdc18ce6b2b046cefb6b0037a9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2fce89607ec177306a8674d3913afdbbb7766a098eaf21683a92e9922363f1a425fb18d788652dc2e65adf30a1ad485c0311823ab526f1eb62c45007eabbd814
|
|
7
|
+
data.tar.gz: 409f6afa0d1446bdae4629762560fe7a511ced76e5588cdec1de44f77274322e944e79356123766989d79475ee6d26108337feeccbf7054180cc31febee22f5a
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Ease the use of active storage as avatar
|
|
4
4
|
This uses ActiveStorage, thus minimum rails version is 5.2
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
8
8
|
Add this line to your application's Gemfile:
|
|
@@ -25,6 +25,14 @@ install it with:
|
|
|
25
25
|
|
|
26
26
|
$ rails generate acts_as_hoc_avatarable:install
|
|
27
27
|
|
|
28
|
+
You also need ActiveStorage so run the following
|
|
29
|
+
|
|
30
|
+
$ rails activestorage:install
|
|
31
|
+
|
|
32
|
+
And finally migrate with:
|
|
33
|
+
|
|
34
|
+
$ rails db:migrate
|
|
35
|
+
|
|
28
36
|
## License
|
|
29
37
|
|
|
30
38
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
require 'rails/generators/migration'
|
|
2
1
|
module ActsAsHocAvatarable
|
|
3
2
|
module Generators
|
|
4
3
|
class InstallGenerator < Rails::Generators::Base
|
|
5
|
-
|
|
4
|
+
|
|
6
5
|
source_root File.expand_path('../templates', __FILE__)
|
|
7
6
|
|
|
8
7
|
def copy_initializer_file
|
|
9
8
|
template "initializer.rb", "config/initializers/acts_as_hoc_avatarable.rb"
|
|
10
9
|
end
|
|
11
10
|
|
|
12
|
-
def install_active_storage
|
|
13
|
-
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def self.next_migration_number(dirname)
|
|
17
|
-
if ActiveRecord::Base.timestamped_migrations
|
|
18
|
-
sleep 1 # make sure each time we get a different timestamp
|
|
19
|
-
Time.new.utc.strftime("%Y%m%d%H%M%S")
|
|
20
|
-
else
|
|
21
|
-
"%.3d" % (current_migration_number(dirname) + 1)
|
|
22
|
-
end
|
|
23
|
-
end
|
|
11
|
+
# def install_active_storage
|
|
12
|
+
# rake 'active_storage::install'
|
|
13
|
+
# end
|
|
24
14
|
end
|
|
25
15
|
end
|
|
26
16
|
end
|