devise-web3 0.2.0 → 0.3.0
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/Gemfile.lock +1 -1
- data/README.md +5 -0
- data/lib/devise/web3/version.rb +1 -1
- data/lib/generators/active_record/devise_web3_generator.rb +19 -0
- data/lib/generators/active_record/templates/migration.rb +17 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23f6279d9f03f0ae35fca26cf93e9f09036aa241d86f51655cfb93ba2a1e9eac
|
4
|
+
data.tar.gz: 8e2908eef867246d6729fe155d5bf2f799664897b8923e8d9834d30afa76e979
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a320a4db75bb9c700b54c717faca48674b13af02527e1fcb9ea79e66f65131f54104d5d3187c960510e38c48735ea090fe4c5a596a1213ca574e1d9e353661a
|
7
|
+
data.tar.gz: c127eb010e7c594d219cc959f85e20ba0e42f66bab31db06de71e4f3cadfda18ef358e0bf96bd1d0bf3aec7735293bbb8ccd572667f41e413145ae6425e2eef1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -31,6 +31,11 @@ end
|
|
31
31
|
|
32
32
|
```
|
33
33
|
|
34
|
+
Generate migration
|
35
|
+
```shell
|
36
|
+
bin/rails g active_record:devise_web3 users
|
37
|
+
```
|
38
|
+
|
34
39
|
## Development
|
35
40
|
|
36
41
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/devise/web3/version.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rails/generators/active_record'
|
2
|
+
|
3
|
+
module ActiveRecord
|
4
|
+
module Generators
|
5
|
+
class DeviseWeb3Generator < ActiveRecord::Generators::Base
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
7
|
+
|
8
|
+
def copy_devise_migration
|
9
|
+
migration_template 'migration.rb', "db/migrate/devise_web3_add_to_#{table_name}.rb", migration_version: migration_version
|
10
|
+
end
|
11
|
+
|
12
|
+
def migration_version
|
13
|
+
if Rails::VERSION::MAJOR >= 5
|
14
|
+
"[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class DeviseWeb3AddTo<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %>
|
2
|
+
def up
|
3
|
+
change_table :<%= table_name %> do |t|
|
4
|
+
t.string :public_address
|
5
|
+
end
|
6
|
+
|
7
|
+
add_index :<%= table_name %>, :public_address
|
8
|
+
end
|
9
|
+
|
10
|
+
def down
|
11
|
+
change_table :<%= table_name %> do |t|
|
12
|
+
t.remove :public_address
|
13
|
+
end
|
14
|
+
|
15
|
+
remove_index :<%= table_name %>, :public_address
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-web3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TheSmartnik
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-09-
|
10
|
+
date: 2025-09-13 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: devise
|
@@ -150,6 +150,8 @@ files:
|
|
150
150
|
- lib/devise/web3/routes.rb
|
151
151
|
- lib/devise/web3/strategies/web3_authenticatable.rb
|
152
152
|
- lib/devise/web3/version.rb
|
153
|
+
- lib/generators/active_record/devise_web3_generator.rb
|
154
|
+
- lib/generators/active_record/templates/migration.rb
|
153
155
|
homepage: https://thesmartnik.com
|
154
156
|
licenses:
|
155
157
|
- MIT
|