tramway-user 2.1 → 2.1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +3 -5
- data/app/decorators/tramway/user/user_decorator.rb +4 -2
- data/app/forms/tramway/user/user_form.rb +4 -0
- data/app/jobs/tramway/user/application_job.rb +2 -0
- data/app/mailers/tramway/user/application_mailer.rb +2 -0
- data/app/models/tramway/user/user.rb +4 -2
- data/lib/tasks/tramway/user_tasks.rake +2 -0
- data/lib/tramway/user/engine.rb +2 -0
- data/lib/tramway/user/generators/install_generator.rb +3 -1
- data/lib/tramway/user/generators/templates/create_tramway_user_users.rb +3 -1
- data/lib/tramway/user/generators/templates/tramway_user.rb +2 -0
- data/lib/tramway/user/version.rb +3 -1
- data/lib/tramway/user.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4289500a1bcf9539be02d572c50bbfe3a1ca9e23752522dd29802ab11c04a501
|
4
|
+
data.tar.gz: 84e13198096ad5cce6f91f16e035b2643ad911177c31bc138099d3bf75bbe699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c4bd0430290d4c887146777a523c8253a5418ed7e1ca91c4c473415fe5959cd12fa1206ee8857051fb109e861668a0eec96499a79d0acd3f70e02da611e3047
|
7
|
+
data.tar.gz: 77e5b522aeeecdf7c67fd74ed83deb4d35ecb8e8881ff73c375a5729aef03527ffb5bf2d7a5a64b6ca4927351f71dfb0699b8d80280c2392ce580a0cac97bffd
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
begin
|
2
4
|
require 'bundler/setup'
|
3
5
|
rescue LoadError
|
@@ -14,14 +16,11 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
14
16
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
17
|
end
|
16
18
|
|
17
|
-
APP_RAKEFILE = File.expand_path(
|
19
|
+
APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
|
18
20
|
load 'rails/tasks/engine.rake'
|
19
21
|
|
20
|
-
|
21
22
|
load 'rails/tasks/statistics.rake'
|
22
23
|
|
23
|
-
|
24
|
-
|
25
24
|
require 'bundler/gem_tasks'
|
26
25
|
|
27
26
|
require 'rake/testtask'
|
@@ -32,5 +31,4 @@ Rake::TestTask.new(:test) do |t|
|
|
32
31
|
t.verbose = false
|
33
32
|
end
|
34
33
|
|
35
|
-
|
36
34
|
task default: :test
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Tramway::User::User < ::Tramway::Core::ApplicationRecord
|
2
4
|
has_secure_password
|
3
5
|
|
4
|
-
# FIXME replace to tramway-admin
|
5
|
-
enumerize :role, in: [
|
6
|
+
# FIXME: replace to tramway-admin
|
7
|
+
enumerize :role, in: %i[user admin], default: :user
|
6
8
|
|
7
9
|
def admin?
|
8
10
|
role.admin?
|
data/lib/tramway/user/engine.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rails/generators'
|
2
4
|
require 'tramway/core/generators/install_generator'
|
3
5
|
|
4
6
|
module Tramway::User::Generators
|
5
7
|
class InstallGenerator < ::Tramway::Core::Generators::InstallGenerator
|
6
8
|
include Rails::Generators::Migration
|
7
|
-
source_root File.expand_path('
|
9
|
+
source_root File.expand_path('templates', __dir__)
|
8
10
|
|
9
11
|
desc 'Add the migrations for User'
|
10
12
|
|
data/lib/tramway/user/version.rb
CHANGED
data/lib/tramway/user.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-user
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|