permadeps 1446.1.2 → 1446.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/permadeps/install/install_generator.rb +35 -2
- data/lib/generators/permadeps/install/templates/.erb-lint.yml +0 -3
- data/lib/generators/permadeps/install/templates/initializers/blazer.rb +5 -0
- data/lib/generators/permadeps/install/templates/initializers/rack_mini_profiler.rb +5 -0
- data/lib/generators/permadeps/install/templates/jobs/capture_query_stats_job.rb +7 -0
- data/lib/generators/permadeps/install/templates/jobs/capture_space_stats_job.rb +7 -0
- data/lib/generators/permadeps/install/templates/jobs/clean_query_stats_job.rb +7 -0
- data/lib/generators/permadeps/install/templates/jobs/clean_space_stats_job.rb +7 -0
- data/lib/generators/permadeps/install/templates/tasks/annotate_rb.rake +21 -0
- data/lib/permadeps/version.rb +1 -1
- data/permadeps.gemspec +1 -1
- data/renovate.json +6 -0
- metadata +13 -5
- /data/lib/generators/permadeps/install/templates/{better_html.rb → initializers/better_html.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc250bd5ba2e7653b5389a8591edc0d95026994276bab7d6f8819ada1b2a0be6
|
4
|
+
data.tar.gz: 750e7413ecfaf6a750be7c5862d966dace6b8b3618fa6ccd23764a1acb926eaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b82feaa7df1a7d26220548f2ed1c92a46cefec39d155f52a9e00172ad7905d70ec02b811c65c98549599a2f4036592188f82448a167314402734a1dcee5d9dfb
|
7
|
+
data.tar.gz: aec0aa392c88b1f31b3f68370a3d807d685818afb4b15792f5665faa56ce371bd61edfb877c44fc6fd3881af2f3237d4bedb9c4af2814d60f5c1c4141d1e3c59
|
@@ -3,13 +3,46 @@ module Permadeps
|
|
3
3
|
class InstallGenerator < ::Rails::Generators::Base
|
4
4
|
source_root File.expand_path('templates', __dir__)
|
5
5
|
|
6
|
-
def
|
6
|
+
def copy_config_files
|
7
7
|
copy_file '.annotaterb.yml', '.annotaterb.yml'
|
8
8
|
copy_file '.better-html.yml', '.better-html.yml'
|
9
9
|
copy_file '.env.example', '.env.example'
|
10
10
|
copy_file '.erb-lint.yml', '.erb-lint.yml'
|
11
11
|
copy_file '.rubocop.yml', '.rubocop.yml'
|
12
|
-
|
12
|
+
end
|
13
|
+
|
14
|
+
def copy_initializers
|
15
|
+
copy_file 'initializers/better_html.rb', 'config/initializers/better_html.rb'
|
16
|
+
copy_file 'initializers/blazer.rb', 'config/initializers/blazer.rb'
|
17
|
+
copy_file 'initializers/rack_mini_profiler.rb', 'config/initializers/rack_mini_profiler.rb'
|
18
|
+
end
|
19
|
+
|
20
|
+
def copy_jobs
|
21
|
+
copy_file 'jobs/capture_query_stats_job.rb', 'app/jobs/capture_query_stats_job.rb'
|
22
|
+
copy_file 'jobs/capture_space_stats_job.rb', 'app/jobs/capture_space_stats_job.rb'
|
23
|
+
copy_file 'jobs/clean_query_stats_job.rb', 'app/jobs/clean_query_stats_job.rb'
|
24
|
+
copy_file 'jobs/clean_space_stats_job.rb', 'app/jobs/clean_space_stats_job.rb'
|
25
|
+
end
|
26
|
+
|
27
|
+
def copy_tasks
|
28
|
+
copy_file 'tasks/annotate_rb.rake', 'lib/tasks/annotate_rb.rake'
|
29
|
+
end
|
30
|
+
|
31
|
+
def run_generators
|
32
|
+
generate 'ahoy:install'
|
33
|
+
generate 'blazer:install'
|
34
|
+
generate 'notable:requests'
|
35
|
+
generate 'notable:jobs'
|
36
|
+
generate 'pghero:query_stats'
|
37
|
+
generate 'pghero:space_stats'
|
38
|
+
end
|
39
|
+
|
40
|
+
def setup_freezolite_gem
|
41
|
+
insert_into_file 'config/application.rb', "\n\nrequire 'freezolite/auto'", after: "Bundler.require(*Rails.groups)"
|
42
|
+
end
|
43
|
+
|
44
|
+
def run_migrations
|
45
|
+
rails_command 'db:migrate'
|
13
46
|
end
|
14
47
|
end
|
15
48
|
end
|
@@ -1,14 +1,11 @@
|
|
1
1
|
---
|
2
|
-
EnableDefaultLinters: true
|
3
2
|
exclude:
|
4
3
|
- '**/vendor/**/*'
|
5
4
|
- '**/node_modules/**/*'
|
6
5
|
linters:
|
7
6
|
ErbSafety:
|
8
|
-
enabled: true
|
9
7
|
better_html_config: .better-html.yml
|
10
8
|
Rubocop:
|
11
|
-
enabled: true
|
12
9
|
rubocop_config:
|
13
10
|
inherit_from:
|
14
11
|
- .rubocop.yml
|
@@ -0,0 +1,5 @@
|
|
1
|
+
Rack::MiniProfiler.config.enable_advanced_debugging_tools = true
|
2
|
+
Rack::MiniProfiler.config.storage_options = { url: ENV.fetch('REDIS_URL', 'redis://redis:6379') }
|
3
|
+
Rack::MiniProfiler.config.storage = Rack::MiniProfiler::RedisStore
|
4
|
+
Rack::MiniProfiler.config.enable_hotwire_turbo_drive_support = true
|
5
|
+
Rack::MiniProfiler.config.position = 'top-left'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This rake task was added by annotate_rb gem.
|
2
|
+
|
3
|
+
# Can set `ANNOTATERB_SKIP_ON_DB_TASKS` to be anything to skip this
|
4
|
+
if Rails.env.development? && ENV['ANNOTATERB_SKIP_ON_DB_TASKS'].nil?
|
5
|
+
require 'annotate_rb'
|
6
|
+
|
7
|
+
AnnotateRb::Core.load_rake_tasks
|
8
|
+
|
9
|
+
namespace :annotate_rb do
|
10
|
+
desc 'Annotate routes after db:migrate'
|
11
|
+
task annotate_routes: :environment do
|
12
|
+
Rake::Task['db:migrate'].enhance do
|
13
|
+
AnnotateRb::Runner.run(['routes'])
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
Rake::Task['db:migrate'].enhance do
|
19
|
+
Rake::Task['annotate_rb:annotate_routes'].invoke
|
20
|
+
end
|
21
|
+
end
|
data/lib/permadeps/version.rb
CHANGED
data/permadeps.gemspec
CHANGED
@@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
|
|
47
47
|
spec.add_dependency 'stackprof', '~> 0.2.26'
|
48
48
|
|
49
49
|
# Development dependencies:
|
50
|
-
spec.add_dependency 'annotaterb', '~> 4.10', '>= 4.10.
|
50
|
+
spec.add_dependency 'annotaterb', '~> 4.10', '>= 4.10.2'
|
51
51
|
spec.add_dependency 'better_errors', '~> 2.10', '>= 2.10.1'
|
52
52
|
spec.add_dependency 'binding_of_caller', '~> 1.0', '>= 1.0.1'
|
53
53
|
spec.add_dependency 'brakeman', '~> 6.1', '>= 6.1.2'
|
data/renovate.json
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: permadeps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1446.1.
|
4
|
+
version: 1446.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ali Hamdi Ali Fadel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ahoy_matey
|
@@ -217,7 +217,7 @@ dependencies:
|
|
217
217
|
version: '4.10'
|
218
218
|
- - ">="
|
219
219
|
- !ruby/object:Gem::Version
|
220
|
-
version: 4.10.
|
220
|
+
version: 4.10.2
|
221
221
|
type: :runtime
|
222
222
|
prerelease: false
|
223
223
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -227,7 +227,7 @@ dependencies:
|
|
227
227
|
version: '4.10'
|
228
228
|
- - ">="
|
229
229
|
- !ruby/object:Gem::Version
|
230
|
-
version: 4.10.
|
230
|
+
version: 4.10.2
|
231
231
|
- !ruby/object:Gem::Dependency
|
232
232
|
name: better_errors
|
233
233
|
requirement: !ruby/object:Gem::Requirement
|
@@ -540,10 +540,18 @@ files:
|
|
540
540
|
- lib/generators/permadeps/install/templates/.env.example
|
541
541
|
- lib/generators/permadeps/install/templates/.erb-lint.yml
|
542
542
|
- lib/generators/permadeps/install/templates/.rubocop.yml
|
543
|
-
- lib/generators/permadeps/install/templates/better_html.rb
|
543
|
+
- lib/generators/permadeps/install/templates/initializers/better_html.rb
|
544
|
+
- lib/generators/permadeps/install/templates/initializers/blazer.rb
|
545
|
+
- lib/generators/permadeps/install/templates/initializers/rack_mini_profiler.rb
|
546
|
+
- lib/generators/permadeps/install/templates/jobs/capture_query_stats_job.rb
|
547
|
+
- lib/generators/permadeps/install/templates/jobs/capture_space_stats_job.rb
|
548
|
+
- lib/generators/permadeps/install/templates/jobs/clean_query_stats_job.rb
|
549
|
+
- lib/generators/permadeps/install/templates/jobs/clean_space_stats_job.rb
|
550
|
+
- lib/generators/permadeps/install/templates/tasks/annotate_rb.rake
|
544
551
|
- lib/permadeps.rb
|
545
552
|
- lib/permadeps/version.rb
|
546
553
|
- permadeps.gemspec
|
554
|
+
- renovate.json
|
547
555
|
- rubocop.yml
|
548
556
|
homepage: https://github.com/AliOsm/permadeps
|
549
557
|
licenses:
|
/data/lib/generators/permadeps/install/templates/{better_html.rb → initializers/better_html.rb}
RENAMED
File without changes
|