tramway-user 2.1 → 2.1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ecc0fe636a9899757946edd6ce945b93b6bc49dd14cb15f55650cba3b5fc241
4
- data.tar.gz: c186deaab6ea8c9e220cb9bf59e64b12981c651190a6924442ad19c54e32367c
3
+ metadata.gz: 4289500a1bcf9539be02d572c50bbfe3a1ca9e23752522dd29802ab11c04a501
4
+ data.tar.gz: 84e13198096ad5cce6f91f16e035b2643ad911177c31bc138099d3bf75bbe699
5
5
  SHA512:
6
- metadata.gz: 116896bf43b730de940b24a392b062c974f8f4f1fbbcfbf8c4cd54b5b1e3d2dcf467c409d69761c81f6c3f31920666cb8a3400bac4ba9767356dc720282913fd
7
- data.tar.gz: 96c2977b63b567d0f9602a86fdf2cbc1c520c2c33c9c16e4c2bd3784a9523044f3b6b1d5fc146ce4c05e4f0070ada8ed9a6f7c5bf2e509c6042b2d1bcb67b54b
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("../test/dummy/Rakefile", __FILE__)
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,11 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::User::UserDecorator < ::Tramway::Core::ApplicationDecorator
2
4
  class << self
3
5
  def collections
4
- [ :all ]
6
+ [:all]
5
7
  end
6
8
 
7
9
  def list_attributes
8
- [ :email ]
10
+ [:email]
9
11
  end
10
12
  end
11
13
 
@@ -1,4 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::User::UserForm < ::Tramway::Core::ApplicationForm
4
+ self.model_class = Tramway::User::User
5
+
2
6
  properties :email, :password, :first_name, :last_name, :role
3
7
 
4
8
  validates :email, email: true
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module User
3
5
  class ApplicationJob < ActiveJob::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module User
3
5
  class ApplicationMailer < ActionMailer::Base
@@ -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: [ :user, :admin ], default: :user
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?
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # desc "Explaining what the task does"
2
4
  # task :tramway_user do
3
5
  # # Task goes here
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module User
3
5
  class Engine < ::Rails::Engine
@@ -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('../templates', __FILE__)
9
+ source_root File.expand_path('templates', __dir__)
8
10
 
9
11
  desc 'Add the migrations for User'
10
12
 
@@ -1,4 +1,6 @@
1
- # FIXME specify rails version
1
+ # frozen_string_literal: true
2
+
3
+ # FIXME: specify rails version
2
4
  # default is 5.1
3
5
  class CreateTramwayUserUsers < ActiveRecord::Migration[5.1]
4
6
  def change
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ::Tramway::User.root_path = '/'
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway
2
4
  module User
3
- VERSION = '2.1'
5
+ VERSION = '2.1.0.1'
4
6
  end
5
7
  end
data/lib/tramway/user.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'tramway/user/engine'
2
4
  require 'tramway/user/generators/install_generator'
3
5
 
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: '2.1'
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-09-08 00:00:00.000000000 Z
11
+ date: 2019-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt