appmap 0.77.2 → 0.77.3
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/CHANGELOG.md +7 -0
- data/Rakefile +29 -3
- data/lib/appmap/config.rb +9 -1
- data/lib/appmap/version.rb +1 -1
- data/spec/fixtures/rails7_users_app/.dockerignore +1 -0
- data/spec/fixtures/rails7_users_app/.gitattributes +7 -0
- data/spec/fixtures/rails7_users_app/.gitignore +31 -0
- data/spec/fixtures/rails7_users_app/.rspec +1 -0
- data/spec/fixtures/rails7_users_app/.ruby-version +1 -0
- data/spec/fixtures/rails7_users_app/Dockerfile +30 -0
- data/spec/fixtures/rails7_users_app/Dockerfile.pg +3 -0
- data/spec/fixtures/rails7_users_app/Gemfile +99 -0
- data/spec/fixtures/rails7_users_app/README.md +24 -0
- data/spec/fixtures/rails7_users_app/Rakefile +6 -0
- data/spec/fixtures/rails7_users_app/app/assets/config/manifest.js +4 -0
- data/spec/fixtures/rails7_users_app/app/assets/images/.keep +0 -0
- data/spec/fixtures/rails7_users_app/app/assets/stylesheets/application.css +15 -0
- data/spec/fixtures/rails7_users_app/app/channels/application_cable/channel.rb +4 -0
- data/spec/fixtures/rails7_users_app/app/channels/application_cable/connection.rb +4 -0
- data/spec/fixtures/rails7_users_app/app/controllers/application_controller.rb +2 -0
- data/spec/fixtures/rails7_users_app/app/controllers/concerns/.keep +0 -0
- data/spec/fixtures/rails7_users_app/app/helpers/application_helper.rb +2 -0
- data/spec/fixtures/rails7_users_app/app/javascript/application.js +3 -0
- data/spec/fixtures/rails7_users_app/app/javascript/controllers/application.js +9 -0
- data/spec/fixtures/rails7_users_app/app/javascript/controllers/hello_controller.js +7 -0
- data/spec/fixtures/rails7_users_app/app/javascript/controllers/index.js +11 -0
- data/spec/fixtures/rails7_users_app/app/jobs/application_job.rb +7 -0
- data/spec/fixtures/rails7_users_app/app/mailers/application_mailer.rb +4 -0
- data/spec/fixtures/rails7_users_app/app/models/application_record.rb +3 -0
- data/spec/fixtures/rails7_users_app/app/models/concerns/.keep +0 -0
- data/spec/fixtures/rails7_users_app/app/models/instance.rb +7 -0
- data/spec/fixtures/rails7_users_app/app/models/instructor.rb +7 -0
- data/spec/fixtures/rails7_users_app/app/views/layouts/application.html.erb +16 -0
- data/spec/fixtures/rails7_users_app/app/views/layouts/mailer.html.erb +13 -0
- data/spec/fixtures/rails7_users_app/app/views/layouts/mailer.text.erb +1 -0
- data/spec/fixtures/rails7_users_app/appmap.yml +3 -0
- data/spec/fixtures/rails7_users_app/bin/bundle +114 -0
- data/spec/fixtures/rails7_users_app/bin/importmap +4 -0
- data/spec/fixtures/rails7_users_app/bin/rails +4 -0
- data/spec/fixtures/rails7_users_app/bin/rake +4 -0
- data/spec/fixtures/rails7_users_app/bin/setup +33 -0
- data/spec/fixtures/rails7_users_app/config/application.rb +22 -0
- data/spec/fixtures/rails7_users_app/config/boot.rb +4 -0
- data/spec/fixtures/rails7_users_app/config/cable.yml +10 -0
- data/spec/fixtures/rails7_users_app/config/credentials.yml.enc +1 -0
- data/spec/fixtures/rails7_users_app/config/database.yml +86 -0
- data/spec/fixtures/rails7_users_app/config/environment.rb +5 -0
- data/spec/fixtures/rails7_users_app/config/environments/development.rb +70 -0
- data/spec/fixtures/rails7_users_app/config/environments/production.rb +93 -0
- data/spec/fixtures/rails7_users_app/config/environments/test.rb +60 -0
- data/spec/fixtures/rails7_users_app/config/importmap.rb +7 -0
- data/spec/fixtures/rails7_users_app/config/initializers/assets.rb +12 -0
- data/spec/fixtures/rails7_users_app/config/initializers/content_security_policy.rb +26 -0
- data/spec/fixtures/rails7_users_app/config/initializers/filter_parameter_logging.rb +8 -0
- data/spec/fixtures/rails7_users_app/config/initializers/inflections.rb +16 -0
- data/spec/fixtures/rails7_users_app/config/initializers/permissions_policy.rb +11 -0
- data/spec/fixtures/rails7_users_app/config/locales/en.yml +33 -0
- data/spec/fixtures/rails7_users_app/config/puma.rb +43 -0
- data/spec/fixtures/rails7_users_app/config/routes.rb +6 -0
- data/spec/fixtures/rails7_users_app/config/storage.yml +34 -0
- data/spec/fixtures/rails7_users_app/config.ru +6 -0
- data/spec/fixtures/rails7_users_app/create_app +31 -0
- data/spec/fixtures/rails7_users_app/db/migrate/20220328093141_create_instances.rb +8 -0
- data/spec/fixtures/rails7_users_app/db/migrate/20220328093154_create_instructors.rb +8 -0
- data/spec/fixtures/rails7_users_app/db/schema.rb +27 -0
- data/spec/fixtures/rails7_users_app/db/seeds.rb +7 -0
- data/spec/fixtures/rails7_users_app/docker-compose.yml +31 -0
- data/spec/fixtures/rails7_users_app/lib/assets/.keep +0 -0
- data/spec/fixtures/rails7_users_app/lib/tasks/.keep +0 -0
- data/spec/fixtures/rails7_users_app/log/.keep +0 -0
- data/spec/fixtures/rails7_users_app/public/404.html +67 -0
- data/spec/fixtures/rails7_users_app/public/422.html +67 -0
- data/spec/fixtures/rails7_users_app/public/500.html +66 -0
- data/spec/fixtures/rails7_users_app/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/fixtures/rails7_users_app/public/apple-touch-icon.png +0 -0
- data/spec/fixtures/rails7_users_app/public/favicon.ico +0 -0
- data/spec/fixtures/rails7_users_app/public/robots.txt +1 -0
- data/spec/fixtures/rails7_users_app/storage/.keep +0 -0
- data/spec/fixtures/rails7_users_app/test/application_system_test_case.rb +5 -0
- data/spec/fixtures/rails7_users_app/test/channels/application_cable/connection_test.rb +11 -0
- data/spec/fixtures/rails7_users_app/test/controllers/.keep +0 -0
- data/spec/fixtures/rails7_users_app/test/fixtures/files/.keep +0 -0
- data/spec/fixtures/rails7_users_app/test/fixtures/instances.yml +11 -0
- data/spec/fixtures/rails7_users_app/test/fixtures/instructors.yml +11 -0
- data/spec/fixtures/rails7_users_app/test/helpers/.keep +0 -0
- data/spec/fixtures/rails7_users_app/test/integration/.keep +0 -0
- data/spec/fixtures/rails7_users_app/test/mailers/.keep +0 -0
- data/spec/fixtures/rails7_users_app/test/models/.keep +0 -0
- data/spec/fixtures/rails7_users_app/test/models/instance_test.rb +6 -0
- data/spec/fixtures/rails7_users_app/test/models/instructor_test.rb +7 -0
- data/spec/fixtures/rails7_users_app/test/system/.keep +0 -0
- data/spec/fixtures/rails7_users_app/test/test_helper.rb +13 -0
- data/spec/rails_recording_spec.rb +6 -4
- data/spec/rails_spec_helper.rb +7 -0
- data/spec/rails_test_spec.rb +45 -0
- metadata +91 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6889544929fdf05360b3e528847aaa1e3c4a423c580b982d5ecbb3403a44f6aa
|
|
4
|
+
data.tar.gz: dad6b337385f4700b0974bf727329afa2bcd4c33f5a17bd951fd9516608a5798
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 197d249f8aa3ca22766168688f3b31e3b9cdf4c16d20227012d77dc5d6d1eb16b7814af8e605b51a5dc5a60ef4861f8cfd3f7089878ff88b046fac59a15b52a3
|
|
7
|
+
data.tar.gz: 0e74d7f95043ea588f0a0ef9aca170765db7475c6009d6471ce2299885b59aca25eb4d87bb72cd7045a2a743b6b8c95fbb6348786d99cb938a269c73189a5234
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [0.77.3](https://github.com/applandinc/appmap-ruby/compare/v0.77.2...v0.77.3) (2022-03-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Rescue exceptions when calling Class#to_s ([f59f2f6](https://github.com/applandinc/appmap-ruby/commit/f59f2f6b39664ff050486c88ff1b859ca0db48d8))
|
|
7
|
+
|
|
1
8
|
## [0.77.2](https://github.com/applandinc/appmap-ruby/compare/v0.77.1...v0.77.2) (2022-03-25)
|
|
2
9
|
|
|
3
10
|
|
data/Rakefile
CHANGED
|
@@ -2,6 +2,21 @@ $: << File.join(__dir__, 'lib')
|
|
|
2
2
|
require 'appmap/version'
|
|
3
3
|
GEM_VERSION = AppMap::VERSION
|
|
4
4
|
|
|
5
|
+
# Make sure the local version is not behind the one on
|
|
6
|
+
# rubygems.org (it's ok if they're the same).
|
|
7
|
+
#
|
|
8
|
+
# If it is behind, the fixture images won't get updated with the gem
|
|
9
|
+
# built from the local source, so you'll wind up testing the rubygems
|
|
10
|
+
# version instead.
|
|
11
|
+
unless ENV['SKIP_VERSION_CHECK']
|
|
12
|
+
require 'json'
|
|
13
|
+
require 'net/http'
|
|
14
|
+
rubygems_version = JSON.parse(Net::HTTP.get(URI.parse('https://rubygems.org/api/v1/gems/appmap.json')))['version']
|
|
15
|
+
if Gem::Version.new(GEM_VERSION) < Gem::Version.new(rubygems_version)
|
|
16
|
+
raise "#{GEM_VERSION} < #{rubygems_version}. Rebase to avoid build issues."
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
5
20
|
require 'rake/testtask'
|
|
6
21
|
require 'rdoc/task'
|
|
7
22
|
|
|
@@ -24,7 +39,7 @@ RUBY_VERSIONS=%w[2.6 2.7 3.0 3.1].select do |version|
|
|
|
24
39
|
|
|
25
40
|
false
|
|
26
41
|
end
|
|
27
|
-
FIXTURE_APPS
|
|
42
|
+
FIXTURE_APPS=[:rack_users_app, :rails6_users_app, :rails5_users_app, :rails7_users_app => {:ruby_version => '>= 2.7'}]
|
|
28
43
|
|
|
29
44
|
def run_cmd(*cmd)
|
|
30
45
|
$stderr.puts "Running: #{cmd}"
|
|
@@ -83,7 +98,17 @@ namespace :build do
|
|
|
83
98
|
RUBY_VERSIONS.each do |ruby_version|
|
|
84
99
|
namespace ruby_version do
|
|
85
100
|
desc "build:fixtures:#{ruby_version}"
|
|
86
|
-
FIXTURE_APPS.each do |
|
|
101
|
+
FIXTURE_APPS.each do |app_spec|
|
|
102
|
+
app = if app_spec.instance_of?(Hash)
|
|
103
|
+
app_spec = app_spec.flatten
|
|
104
|
+
version_rqt = Gem::Requirement.create(app_spec[1][:ruby_version])
|
|
105
|
+
next unless version_rqt =~ (Gem::Version.new(ruby_version))
|
|
106
|
+
app = app_spec[0]
|
|
107
|
+
else
|
|
108
|
+
app = app_spec
|
|
109
|
+
end.to_s
|
|
110
|
+
|
|
111
|
+
|
|
87
112
|
desc app
|
|
88
113
|
task app => ["base:#{ruby_version}"] do
|
|
89
114
|
build_app_image(app, ruby_version)
|
|
@@ -109,12 +134,13 @@ def run_specs(ruby_version, task_args)
|
|
|
109
134
|
# description), because it's not intended to be invoked directly
|
|
110
135
|
RSpec::Core::RakeTask.new("rspec_#{ruby_version}", [:specs]) do |task, args|
|
|
111
136
|
task.exclude_pattern = 'spec/fixtures/**/*_spec.rb'
|
|
137
|
+
task.rspec_opts = '-f doc'
|
|
112
138
|
if args.count > 0
|
|
113
139
|
# There doesn't appear to be a value for +pattern+ that will
|
|
114
140
|
# cause it to be ignored. Setting it to '' or +nil+ causes an
|
|
115
141
|
# empty argument to get passed to rspec, which confuses it.
|
|
116
142
|
task.pattern = 'never match this'
|
|
117
|
-
task.rspec_opts
|
|
143
|
+
task.rspec_opts += " " + args.to_a.join(' ')
|
|
118
144
|
end
|
|
119
145
|
end
|
|
120
146
|
|
data/lib/appmap/config.rb
CHANGED
|
@@ -450,7 +450,15 @@ module AppMap
|
|
|
450
450
|
|
|
451
451
|
# Hook a method which is specified by class and method name.
|
|
452
452
|
def package_for_code_object
|
|
453
|
-
class_name =
|
|
453
|
+
class_name = begin
|
|
454
|
+
cls.to_s.index('#<Class:') == 0 ? cls.to_s['#<Class:'.length...-1] : cls.name
|
|
455
|
+
rescue
|
|
456
|
+
# Calling #to_s on some Rails classes
|
|
457
|
+
# (e.g. those generated to represent
|
|
458
|
+
# associations) will raise an exception. Fall
|
|
459
|
+
# back to using the class name.
|
|
460
|
+
cls.name
|
|
461
|
+
end
|
|
454
462
|
Array(config.gem_hooks[class_name])
|
|
455
463
|
.find { |hook| hook.include_method?(method.name) }
|
|
456
464
|
&.package
|
data/lib/appmap/version.rb
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Gemfile.lock
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
|
2
|
+
#
|
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
|
6
|
+
|
|
7
|
+
# Ignore bundler config.
|
|
8
|
+
/.bundle
|
|
9
|
+
|
|
10
|
+
# Ignore all logfiles and tempfiles.
|
|
11
|
+
/log/*
|
|
12
|
+
/tmp/*
|
|
13
|
+
!/log/.keep
|
|
14
|
+
!/tmp/.keep
|
|
15
|
+
|
|
16
|
+
# Ignore pidfiles, but keep the directory.
|
|
17
|
+
/tmp/pids/*
|
|
18
|
+
!/tmp/pids/
|
|
19
|
+
!/tmp/pids/.keep
|
|
20
|
+
|
|
21
|
+
# Ignore uploaded files in development.
|
|
22
|
+
/storage/*
|
|
23
|
+
!/storage/.keep
|
|
24
|
+
/tmp/storage/*
|
|
25
|
+
!/tmp/storage/
|
|
26
|
+
!/tmp/storage/.keep
|
|
27
|
+
|
|
28
|
+
/public/assets
|
|
29
|
+
|
|
30
|
+
# Ignore master key for decrypting credentials and more.
|
|
31
|
+
/config/master.key
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--require spec_helper
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby-3.1.0
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
ARG GEM_VERSION
|
|
2
|
+
ARG RUBY_VERSION
|
|
3
|
+
|
|
4
|
+
FROM appmap:${GEM_VERSION} as appmap
|
|
5
|
+
FROM ruby:${RUBY_VERSION}
|
|
6
|
+
|
|
7
|
+
SHELL ["/bin/bash", "-c"]
|
|
8
|
+
|
|
9
|
+
RUN apt-get update && apt-get install -y vim less
|
|
10
|
+
RUN apt-get install -y postgresql-client
|
|
11
|
+
|
|
12
|
+
RUN mkdir /app
|
|
13
|
+
WORKDIR /app
|
|
14
|
+
|
|
15
|
+
RUN gem install -N bundler
|
|
16
|
+
|
|
17
|
+
COPY Gemfile .
|
|
18
|
+
|
|
19
|
+
RUN bundle
|
|
20
|
+
|
|
21
|
+
COPY . .
|
|
22
|
+
|
|
23
|
+
COPY --from=appmap /pkg/appmap.gem /tmp/
|
|
24
|
+
RUN gem install /tmp/appmap.gem && \
|
|
25
|
+
bundle update --local appmap && \
|
|
26
|
+
bundle binstubs appmap --force
|
|
27
|
+
|
|
28
|
+
EXPOSE 3000
|
|
29
|
+
|
|
30
|
+
HEALTHCHECK --interval=1s --retries=10 CMD curl --fail http://localhost:3000/health || exit 1
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
source "https://rubygems.org"
|
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
3
|
+
|
|
4
|
+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
|
5
|
+
gem "rails", "~> 7.0.2", ">= 7.0.2.3"
|
|
6
|
+
|
|
7
|
+
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
|
|
8
|
+
gem "sprockets-rails"
|
|
9
|
+
|
|
10
|
+
# Use postgresql as the database for Active Record
|
|
11
|
+
gem "pg", "~> 1.1"
|
|
12
|
+
|
|
13
|
+
# Use the Puma web server [https://github.com/puma/puma]
|
|
14
|
+
gem "puma", "~> 5.0"
|
|
15
|
+
|
|
16
|
+
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
|
|
17
|
+
gem "importmap-rails"
|
|
18
|
+
|
|
19
|
+
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
|
|
20
|
+
gem "turbo-rails"
|
|
21
|
+
|
|
22
|
+
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
|
|
23
|
+
gem "stimulus-rails"
|
|
24
|
+
|
|
25
|
+
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
|
|
26
|
+
gem "jbuilder"
|
|
27
|
+
|
|
28
|
+
# Use Redis adapter to run Action Cable in production
|
|
29
|
+
# gem "redis", "~> 4.0"
|
|
30
|
+
|
|
31
|
+
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
|
|
32
|
+
# gem "kredis"
|
|
33
|
+
|
|
34
|
+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
|
|
35
|
+
# gem "bcrypt", "~> 3.1.7"
|
|
36
|
+
|
|
37
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
|
38
|
+
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
|
39
|
+
|
|
40
|
+
# Reduces boot times through caching; required in config/boot.rb
|
|
41
|
+
gem "bootsnap", require: false
|
|
42
|
+
|
|
43
|
+
# Use Sass to process CSS
|
|
44
|
+
# gem "sassc-rails"
|
|
45
|
+
|
|
46
|
+
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
|
|
47
|
+
# gem "image_processing", "~> 1.2"
|
|
48
|
+
|
|
49
|
+
group :development, :test do
|
|
50
|
+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
|
51
|
+
gem "debug", platforms: %i[ mri mingw x64_mingw ]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
group :development do
|
|
55
|
+
# Use console on exceptions pages [https://github.com/rails/web-console]
|
|
56
|
+
gem "web-console"
|
|
57
|
+
|
|
58
|
+
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
|
|
59
|
+
# gem "rack-mini-profiler"
|
|
60
|
+
|
|
61
|
+
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
|
62
|
+
# gem "spring"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
group :test do
|
|
66
|
+
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
|
|
67
|
+
gem "capybara"
|
|
68
|
+
gem "selenium-webdriver"
|
|
69
|
+
gem "webdrivers"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
appmap_path = \
|
|
73
|
+
# Support debugging inside the container with volume-mounted source
|
|
74
|
+
if File.directory?('/src/appmap-ruby')
|
|
75
|
+
'/src/appmap-ruby'
|
|
76
|
+
elsif File.exist?('../../../appmap.gemspec')
|
|
77
|
+
'../../..'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if appmap_path
|
|
81
|
+
# Set the branch parameter, so that 'bundle config local.appmap' will work
|
|
82
|
+
appmap_branch = Dir.chdir appmap_path do
|
|
83
|
+
`git rev-parse --abbrev-ref HEAD`.strip
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
appmap_options = \
|
|
88
|
+
if appmap_path && appmap_branch
|
|
89
|
+
{ git: appmap_path, branch: appmap_branch }
|
|
90
|
+
elsif appmap_path
|
|
91
|
+
{ path: appmap_path }
|
|
92
|
+
else
|
|
93
|
+
{}
|
|
94
|
+
end.merge(require: %w[appmap])
|
|
95
|
+
|
|
96
|
+
group :development, :test do
|
|
97
|
+
gem 'appmap', appmap_options
|
|
98
|
+
gem 'pry-byebug', '>=0', '< 99'
|
|
99
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# README
|
|
2
|
+
|
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
|
4
|
+
application up and running.
|
|
5
|
+
|
|
6
|
+
Things you may want to cover:
|
|
7
|
+
|
|
8
|
+
* Ruby version
|
|
9
|
+
|
|
10
|
+
* System dependencies
|
|
11
|
+
|
|
12
|
+
* Configuration
|
|
13
|
+
|
|
14
|
+
* Database creation
|
|
15
|
+
|
|
16
|
+
* Database initialization
|
|
17
|
+
|
|
18
|
+
* How to run the test suite
|
|
19
|
+
|
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
+
|
|
22
|
+
* Deployment instructions
|
|
23
|
+
|
|
24
|
+
* ...
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
+
* listed below.
|
|
4
|
+
*
|
|
5
|
+
* Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
|
|
6
|
+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
+
*
|
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS
|
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
|
11
|
+
* It is generally better to create a new file per style scope.
|
|
12
|
+
*
|
|
13
|
+
*= require_tree .
|
|
14
|
+
*= require_self
|
|
15
|
+
*/
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Import and register all your controllers from the importmap under controllers/*
|
|
2
|
+
|
|
3
|
+
import { application } from "controllers/application"
|
|
4
|
+
|
|
5
|
+
// Eager load all controllers defined in the import map under controllers/**/*_controller
|
|
6
|
+
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
|
|
7
|
+
eagerLoadControllersFrom("controllers", application)
|
|
8
|
+
|
|
9
|
+
// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
|
|
10
|
+
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
|
|
11
|
+
// lazyLoadControllersFrom("controllers", application)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
class ApplicationJob < ActiveJob::Base
|
|
2
|
+
# Automatically retry jobs that encountered a deadlock
|
|
3
|
+
# retry_on ActiveRecord::Deadlocked
|
|
4
|
+
|
|
5
|
+
# Most jobs are safe to ignore if the underlying records are no longer available
|
|
6
|
+
# discard_on ActiveJob::DeserializationError
|
|
7
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>App</title>
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<%= csrf_meta_tags %>
|
|
7
|
+
<%= csp_meta_tag %>
|
|
8
|
+
|
|
9
|
+
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
|
10
|
+
<%= javascript_importmap_tags %>
|
|
11
|
+
</head>
|
|
12
|
+
|
|
13
|
+
<body>
|
|
14
|
+
<%= yield %>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= yield %>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "rubygems"
|
|
12
|
+
|
|
13
|
+
m = Module.new do
|
|
14
|
+
module_function
|
|
15
|
+
|
|
16
|
+
def invoked_as_script?
|
|
17
|
+
File.expand_path($0) == File.expand_path(__FILE__)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def env_var_version
|
|
21
|
+
ENV["BUNDLER_VERSION"]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def cli_arg_version
|
|
25
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
|
26
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
|
27
|
+
bundler_version = nil
|
|
28
|
+
update_index = nil
|
|
29
|
+
ARGV.each_with_index do |a, i|
|
|
30
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
|
31
|
+
bundler_version = a
|
|
32
|
+
end
|
|
33
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
|
34
|
+
bundler_version = $1
|
|
35
|
+
update_index = i
|
|
36
|
+
end
|
|
37
|
+
bundler_version
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def gemfile
|
|
41
|
+
gemfile = ENV["BUNDLE_GEMFILE"]
|
|
42
|
+
return gemfile if gemfile && !gemfile.empty?
|
|
43
|
+
|
|
44
|
+
File.expand_path("../../Gemfile", __FILE__)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def lockfile
|
|
48
|
+
lockfile =
|
|
49
|
+
case File.basename(gemfile)
|
|
50
|
+
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
|
51
|
+
else "#{gemfile}.lock"
|
|
52
|
+
end
|
|
53
|
+
File.expand_path(lockfile)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def lockfile_version
|
|
57
|
+
return unless File.file?(lockfile)
|
|
58
|
+
lockfile_contents = File.read(lockfile)
|
|
59
|
+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
|
60
|
+
Regexp.last_match(1)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def bundler_requirement
|
|
64
|
+
@bundler_requirement ||=
|
|
65
|
+
env_var_version || cli_arg_version ||
|
|
66
|
+
bundler_requirement_for(lockfile_version)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def bundler_requirement_for(version)
|
|
70
|
+
return "#{Gem::Requirement.default}.a" unless version
|
|
71
|
+
|
|
72
|
+
bundler_gem_version = Gem::Version.new(version)
|
|
73
|
+
|
|
74
|
+
requirement = bundler_gem_version.approximate_recommendation
|
|
75
|
+
|
|
76
|
+
return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0")
|
|
77
|
+
|
|
78
|
+
requirement += ".a" if bundler_gem_version.prerelease?
|
|
79
|
+
|
|
80
|
+
requirement
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def load_bundler!
|
|
84
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
|
85
|
+
|
|
86
|
+
activate_bundler
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def activate_bundler
|
|
90
|
+
gem_error = activation_error_handling do
|
|
91
|
+
gem "bundler", bundler_requirement
|
|
92
|
+
end
|
|
93
|
+
return if gem_error.nil?
|
|
94
|
+
require_error = activation_error_handling do
|
|
95
|
+
require "bundler/version"
|
|
96
|
+
end
|
|
97
|
+
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
|
98
|
+
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
|
99
|
+
exit 42
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def activation_error_handling
|
|
103
|
+
yield
|
|
104
|
+
nil
|
|
105
|
+
rescue StandardError, LoadError => e
|
|
106
|
+
e
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
m.load_bundler!
|
|
111
|
+
|
|
112
|
+
if m.invoked_as_script?
|
|
113
|
+
load Gem.bin_path("bundler", "bundle")
|
|
114
|
+
end
|