avm-eac_rails_base0 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/eac_rails_base0/source_generators/base.rb +13 -0
  3. data/lib/avm/eac_rails_base0/version.rb +1 -1
  4. data/template/avm/eac_rails_base0/source_generators/base/Gemfile +11 -0
  5. data/template/avm/eac_rails_base0/source_generators/base/Rakefile +8 -0
  6. data/template/avm/eac_rails_base0/source_generators/base/app/assets/config/manifest.js +3 -0
  7. data/template/avm/eac_rails_base0/source_generators/base/app/assets/javascripts/application.js +1 -0
  8. data/template/avm/eac_rails_base0/source_generators/base/app/assets/stylesheets/application.scss +1 -0
  9. data/template/avm/eac_rails_base0/source_generators/base/app/controllers/application_controller.rb +4 -0
  10. data/template/avm/eac_rails_base0/source_generators/base/app/controllers/welcome_controller.rb +5 -0
  11. data/template/avm/eac_rails_base0/source_generators/base/app/views/welcome/index.html.erb +1 -0
  12. data/template/avm/eac_rails_base0/source_generators/base/bin/bundle +5 -0
  13. data/template/avm/eac_rails_base0/source_generators/base/bin/rails +11 -0
  14. data/template/avm/eac_rails_base0/source_generators/base/bin/rake +11 -0
  15. data/template/avm/eac_rails_base0/source_generators/base/bin/yarn +11 -0
  16. data/template/avm/eac_rails_base0/source_generators/base/config/application.rb +11 -0
  17. data/template/avm/eac_rails_base0/source_generators/base/config/boot.rb +5 -0
  18. data/template/avm/eac_rails_base0/source_generators/base/config/cable.yml +8 -0
  19. data/template/avm/eac_rails_base0/source_generators/base/config/credentials.yml.enc +1 -0
  20. data/template/avm/eac_rails_base0/source_generators/base/config/environment.rb +7 -0
  21. data/template/avm/eac_rails_base0/source_generators/base/config/puma.rb +39 -0
  22. data/template/avm/eac_rails_base0/source_generators/base/config/routes.rb +5 -0
  23. data/template/avm/eac_rails_base0/source_generators/base/config/spring.rb +8 -0
  24. data/template/avm/eac_rails_base0/source_generators/base/config.ru +7 -0
  25. data/template/avm/eac_rails_base0/source_generators/base/db/schema.rb +1 -0
  26. data/template/avm/eac_rails_base0/source_generators/base/lib/ability.rb +20 -0
  27. data/template/avm/eac_rails_base0/source_generators/base/lib/ability_mapping.rb +10 -0
  28. data/template/avm/eac_rails_base0/source_generators/base/public/favicon.ico +0 -0
  29. data/template/avm/eac_rails_base0/source_generators/base/spec/ruby_style_spec.rb +3 -0
  30. data/template/avm/eac_rails_base0/source_generators/base/spec/spec_helper.rb +8 -0
  31. metadata +30 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be01a3c4db4a2c370ce390df88a4a9d153b4e5ea7345eed2fb7bdc922941d519
4
- data.tar.gz: 20fe13bb990f14c1b0e966909e709a6535485742817171101ae81a682e76eeb2
3
+ metadata.gz: aa6cdfe84dd548444c38a1afc5778b3557b7cd8fdd44592f03439d66575304a9
4
+ data.tar.gz: 932c694618e2b90cf7e08391083c4d44a34b100da77a1fb8ac5c020ee75d15b9
5
5
  SHA512:
6
- metadata.gz: 7ade6e44257e0c6b2e2c1cac330ade3fd171aac3000e068dcda21e5a26e0272e5f57f6a7035796763c447e6e5403024624104b340ee242d8ec8fb20f10feb078
7
- data.tar.gz: 1d66ad7cd39494c761a5766f6bf83b35f3d84eebda7adb42a1cf212901f80968e336a2cf45f55691ad647d327fb9fb941d1357e15352645b3d6944efc683b2a2
6
+ metadata.gz: 94e2e02886c7f9928e9a1851c0e8927e88fbc6d6699b88d2378db75162b9f3e60cea6660c0898ff675c36efdc5c54c88bbe446b4a05f97844599673666b0c831
7
+ data.tar.gz: 300e95fe0d251fdc1064a60fa21b93c87ac302936b1fe9b0f71989f78bb42f9d01d767d94c227a6c5ca04903f6374e028e246ea42dd21da2808d4063509b5222
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/source_generators/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRailsBase0
8
+ module SourceGenerators
9
+ class Base < ::Avm::SourceGenerators::Base
10
+ end
11
+ end
12
+ end
13
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase0
5
- VERSION = '0.5.0'
5
+ VERSION = '0.6.0'
6
6
  end
7
7
  end
@@ -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
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationController < ::EacRailsBase0::ApplicationController
4
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class WelcomeController < ApplicationController
4
+ def index; end
5
+ end
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
5
+ load Gem.bin_path('bundler', 'bundle')
@@ -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
+ begin
5
+ load File.expand_path('spring', __dir__)
6
+ rescue LoadError => e
7
+ raise unless e.message.include?('spring')
8
+ end
9
+ require_relative '../config/boot'
10
+ require 'rake'
11
+ Rake.application.run
@@ -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,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
4
+
5
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -0,0 +1,8 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: async
6
+
7
+ production:
8
+ adapter: async
@@ -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,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Load the Rails application.
4
+ require_relative 'application'
5
+
6
+ # Initialize the Rails application.
7
+ Rails.application.initialize!
@@ -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,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ ::Rails.application.routes.draw do
4
+ root 'welcome#index'
5
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ %w[
4
+ .ruby-version
5
+ .rbenv-vars
6
+ tmp/restart.txt
7
+ tmp/caching-dev.txt
8
+ ].each { |path| Spring.watch(path) }
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is used by Rack-based servers to start the application.
4
+
5
+ require_relative 'config/environment'
6
+
7
+ run Rails.application
@@ -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
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/simple_cache'
4
+
5
+ class AbilityMapping < ::EacRailsBase0::AppBase::AbilityMapping
6
+ def initialize
7
+ super
8
+ map_action 'Welcome', 'index', :read, :welcome
9
+ end
10
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
5
+
6
+ ::RSpec.configure do |conf|
7
+ conf.global_fixtures = :all
8
+ end
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.5.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-21 00:00:00.000000000 Z
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: {}