avm-eac_rails_base0 0.5.0 → 0.6.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/lib/avm/eac_rails_base0/source_generators/base.rb +13 -0
- data/lib/avm/eac_rails_base0/version.rb +1 -1
- data/template/avm/eac_rails_base0/source_generators/base/Gemfile +11 -0
- data/template/avm/eac_rails_base0/source_generators/base/Rakefile +8 -0
- data/template/avm/eac_rails_base0/source_generators/base/app/assets/config/manifest.js +3 -0
- data/template/avm/eac_rails_base0/source_generators/base/app/assets/javascripts/application.js +1 -0
- data/template/avm/eac_rails_base0/source_generators/base/app/assets/stylesheets/application.scss +1 -0
- data/template/avm/eac_rails_base0/source_generators/base/app/controllers/application_controller.rb +4 -0
- data/template/avm/eac_rails_base0/source_generators/base/app/controllers/welcome_controller.rb +5 -0
- data/template/avm/eac_rails_base0/source_generators/base/app/views/welcome/index.html.erb +1 -0
- data/template/avm/eac_rails_base0/source_generators/base/bin/bundle +5 -0
- data/template/avm/eac_rails_base0/source_generators/base/bin/rails +11 -0
- data/template/avm/eac_rails_base0/source_generators/base/bin/rake +11 -0
- data/template/avm/eac_rails_base0/source_generators/base/bin/yarn +11 -0
- data/template/avm/eac_rails_base0/source_generators/base/config/application.rb +11 -0
- data/template/avm/eac_rails_base0/source_generators/base/config/boot.rb +5 -0
- data/template/avm/eac_rails_base0/source_generators/base/config/cable.yml +8 -0
- data/template/avm/eac_rails_base0/source_generators/base/config/credentials.yml.enc +1 -0
- data/template/avm/eac_rails_base0/source_generators/base/config/environment.rb +7 -0
- data/template/avm/eac_rails_base0/source_generators/base/config/puma.rb +39 -0
- data/template/avm/eac_rails_base0/source_generators/base/config/routes.rb +5 -0
- data/template/avm/eac_rails_base0/source_generators/base/config/spring.rb +8 -0
- data/template/avm/eac_rails_base0/source_generators/base/config.ru +7 -0
- data/template/avm/eac_rails_base0/source_generators/base/db/schema.rb +1 -0
- data/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb +20 -0
- data/template/avm/eac_rails_base0/source_generators/base/lib/ability_mapping.rb +10 -0
- data/template/avm/eac_rails_base0/source_generators/base/public/favicon.ico +0 -0
- data/template/avm/eac_rails_base0/source_generators/base/spec/ruby_style_spec.rb +3 -0
- data/template/avm/eac_rails_base0/source_generators/base/spec/spec_helper.rb +8 -0
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa6cdfe84dd548444c38a1afc5778b3557b7cd8fdd44592f03439d66575304a9
|
4
|
+
data.tar.gz: 932c694618e2b90cf7e08391083c4d44a34b100da77a1fb8ac5c020ee75d15b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94e2e02886c7f9928e9a1851c0e8927e88fbc6d6699b88d2378db75162b9f3e60cea6660c0898ff675c36efdc5c54c88bbe446b4a05f97844599673666b0c831
|
7
|
+
data.tar.gz: 300e95fe0d251fdc1064a60fa21b93c87ac302936b1fe9b0f71989f78bb42f9d01d767d94c227a6c5ca04903f6374e028e246ea42dd21da2808d4063509b5222
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gem 'eac_rails_base0'
|
6
|
+
gem 'eac_rails_gem_support', group: :development
|
7
|
+
|
8
|
+
# Local gems
|
9
|
+
::Dir["#{__dir__}/{sub/gems,engines}/*/*.gemspec"].each do |file|
|
10
|
+
gem ::File.basename(::File.dirname(file)), path: ::File.dirname(file)
|
11
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
4
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
5
|
+
|
6
|
+
require_relative 'config/application'
|
7
|
+
|
8
|
+
Rails.application.load_tasks
|
data/template/avm/eac_rails_base0/source_generators/base/app/assets/javascripts/application.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
//= require eac_rails_base0
|
data/template/avm/eac_rails_base0/source_generators/base/app/assets/stylesheets/application.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
@import "eac_rails_base0";
|
@@ -0,0 +1 @@
|
|
1
|
+
<p>Bem-vindo!</p>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
begin
|
5
|
+
load File.expand_path('spring', __dir__)
|
6
|
+
rescue LoadError => e
|
7
|
+
raise unless e.message.include?('spring')
|
8
|
+
end
|
9
|
+
APP_PATH = File.expand_path('../config/application', __dir__)
|
10
|
+
require_relative '../config/boot'
|
11
|
+
require 'rails/commands'
|
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
5
|
+
Dir.chdir(APP_ROOT) do
|
6
|
+
exec 'yarnpkg', *ARGV
|
7
|
+
rescue Errno::ENOENT
|
8
|
+
warn 'Yarn executable was not detected in the system.'
|
9
|
+
warn 'Download Yarn at https://yarnpkg.com/en/docs/install'
|
10
|
+
exit 1
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
APP_PATH = ::File.dirname(__dir__) unless defined?(APP_PATH)
|
4
|
+
require File.expand_path('boot', __dir__)
|
5
|
+
require 'eac_rails_base0/app_base/application.rb'
|
6
|
+
|
7
|
+
module EacRailsBase0App
|
8
|
+
class Application
|
9
|
+
config.load_defaults 5.2
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
XKDkD3DioFn69hXAhH88mw9ZFRjDdarYU+7htxgTJmBB/vg45Hsb7pBJQaySoc7VD0Vb838ShDeVbhDlSc3PMtIcV6fU/nkYqc+Nu8heKF5mhJmgJmf2Vlp2ZgqVA04PxvmZ/U2FRx40c9welNpABmDn0V33qUsjkrVMqKuyxD9aTpuAFd4SiH7SzA8Is1v7ltr3+Rx0lA/LI2u87uxYBawE7G3sNQA9siEnSPNm24uEK+4GcIuVG0qIvx36uYyBjB8dfn9FaMec/+22EFNKO0JWjIFXRl+TosE3VLFssaMQ2sl0rRkesLzb2DMFO/7kp0T3c1EcvRmy0AJ3UQmKZCtYBzy2a/9rx8sh1a+AUHObSeSeaP4eu+sMnMhSsDhveUiYMnV8viJXj0G0V6UIWP4j+Bv96H/AFgNi--OD4Iuvmt7P3BlyOR--nzDLthG3dBOX14A2J5s4CA==
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Puma can serve each request in a thread from an internal thread pool.
|
4
|
+
# The `threads` method setting takes two numbers: a minimum and maximum.
|
5
|
+
# Any libraries that use thread pools should be configured to match
|
6
|
+
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
7
|
+
# and maximum; this matches the default thread size of Active Record.
|
8
|
+
#
|
9
|
+
threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }
|
10
|
+
threads threads_count, threads_count
|
11
|
+
|
12
|
+
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
13
|
+
#
|
14
|
+
port ENV.fetch('PORT') { 3000 }
|
15
|
+
|
16
|
+
# Specifies the `environment` that Puma will run in.
|
17
|
+
#
|
18
|
+
environment ENV.fetch('RAILS_ENV') { 'development' }
|
19
|
+
|
20
|
+
# Specifies the `pidfile` that Puma will use.
|
21
|
+
pidfile ENV.fetch('PIDFILE') { 'tmp/pids/server.pid' }
|
22
|
+
|
23
|
+
# Specifies the number of `workers` to boot in clustered mode.
|
24
|
+
# Workers are forked webserver processes. If using threads and workers together
|
25
|
+
# the concurrency of the application would be max `threads` * `workers`.
|
26
|
+
# Workers do not work on JRuby or Windows (both of which do not support
|
27
|
+
# processes).
|
28
|
+
#
|
29
|
+
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
30
|
+
|
31
|
+
# Use the `preload_app!` method when specifying a `workers` number.
|
32
|
+
# This directive tells Puma to first boot the application and load code
|
33
|
+
# before forking the application. This takes advantage of Copy On Write
|
34
|
+
# process behavior so workers use less memory.
|
35
|
+
#
|
36
|
+
# preload_app!
|
37
|
+
|
38
|
+
# Allow puma to be restarted by `rails restart` command.
|
39
|
+
plugin :tmp_restart
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Ability < ::EacRailsBase0::AppBase::Ability
|
4
|
+
def initialize(user)
|
5
|
+
super(user)
|
6
|
+
user ||= ::EacUsersSupport::User.new
|
7
|
+
for_all_permissions(user)
|
8
|
+
logged_permissions(user) unless user.new_record?
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def for_all_permissions(_user)
|
14
|
+
can :read, :welcome
|
15
|
+
end
|
16
|
+
|
17
|
+
def logged_permissions(_user)
|
18
|
+
can :manage, :all
|
19
|
+
end
|
20
|
+
end
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-eac_rails_base0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm-eac_rails_base1
|
@@ -71,11 +71,39 @@ files:
|
|
71
71
|
- lib/avm/eac_rails_base0/instance.rb
|
72
72
|
- lib/avm/eac_rails_base0/runners.rb
|
73
73
|
- lib/avm/eac_rails_base0/runners/base.rb
|
74
|
+
- lib/avm/eac_rails_base0/source_generators/base.rb
|
74
75
|
- lib/avm/eac_rails_base0/sources/base.rb
|
75
76
|
- lib/avm/eac_rails_base0/version.rb
|
76
77
|
- template/avm/eac_rails_base0/apache_path/extra_content.conf
|
77
78
|
- template/avm/eac_rails_base0/deploy/config/database.yml.template
|
78
79
|
- template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template
|
80
|
+
- template/avm/eac_rails_base0/source_generators/base/Gemfile
|
81
|
+
- template/avm/eac_rails_base0/source_generators/base/Rakefile
|
82
|
+
- template/avm/eac_rails_base0/source_generators/base/app/assets/config/manifest.js
|
83
|
+
- template/avm/eac_rails_base0/source_generators/base/app/assets/javascripts/application.js
|
84
|
+
- template/avm/eac_rails_base0/source_generators/base/app/assets/stylesheets/application.scss
|
85
|
+
- template/avm/eac_rails_base0/source_generators/base/app/controllers/application_controller.rb
|
86
|
+
- template/avm/eac_rails_base0/source_generators/base/app/controllers/welcome_controller.rb
|
87
|
+
- template/avm/eac_rails_base0/source_generators/base/app/views/welcome/index.html.erb
|
88
|
+
- template/avm/eac_rails_base0/source_generators/base/bin/bundle
|
89
|
+
- template/avm/eac_rails_base0/source_generators/base/bin/rails
|
90
|
+
- template/avm/eac_rails_base0/source_generators/base/bin/rake
|
91
|
+
- template/avm/eac_rails_base0/source_generators/base/bin/yarn
|
92
|
+
- template/avm/eac_rails_base0/source_generators/base/config.ru
|
93
|
+
- template/avm/eac_rails_base0/source_generators/base/config/application.rb
|
94
|
+
- template/avm/eac_rails_base0/source_generators/base/config/boot.rb
|
95
|
+
- template/avm/eac_rails_base0/source_generators/base/config/cable.yml
|
96
|
+
- template/avm/eac_rails_base0/source_generators/base/config/credentials.yml.enc
|
97
|
+
- template/avm/eac_rails_base0/source_generators/base/config/environment.rb
|
98
|
+
- template/avm/eac_rails_base0/source_generators/base/config/puma.rb
|
99
|
+
- template/avm/eac_rails_base0/source_generators/base/config/routes.rb
|
100
|
+
- template/avm/eac_rails_base0/source_generators/base/config/spring.rb
|
101
|
+
- template/avm/eac_rails_base0/source_generators/base/db/schema.rb
|
102
|
+
- template/avm/eac_rails_base0/source_generators/base/lib/ability.rb
|
103
|
+
- template/avm/eac_rails_base0/source_generators/base/lib/ability_mapping.rb
|
104
|
+
- template/avm/eac_rails_base0/source_generators/base/public/favicon.ico
|
105
|
+
- template/avm/eac_rails_base0/source_generators/base/spec/ruby_style_spec.rb
|
106
|
+
- template/avm/eac_rails_base0/source_generators/base/spec/spec_helper.rb
|
79
107
|
homepage:
|
80
108
|
licenses: []
|
81
109
|
metadata: {}
|