ruby-lsp-rbs_rails 0.1.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.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +1 -0
  3. data/.vscode/extensions.json +7 -0
  4. data/.vscode/settings.json +34 -0
  5. data/CODE_OF_CONDUCT.md +132 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +41 -0
  8. data/Rakefile +27 -0
  9. data/Steepfile +9 -0
  10. data/lib/ruby_lsp/rbs_rails/addon.rb +206 -0
  11. data/lib/ruby_lsp/rbs_rails/file_writer.rb +30 -0
  12. data/lib/ruby_lsp/rbs_rails/logger.rb +22 -0
  13. data/lib/ruby_lsp/rbs_rails/version.rb +7 -0
  14. data/lib/ruby_lsp/rbs_rails.rb +10 -0
  15. data/rbs_collection.lock.yaml +284 -0
  16. data/rbs_collection.yaml +41 -0
  17. data/sig/gems/language_server-protocol.rbs +11 -0
  18. data/sig/gems/ruby-lsp.rbs +15 -0
  19. data/sig/ruby_lsp/rbs_rails/addon.rbs +63 -0
  20. data/sig/ruby_lsp/rbs_rails/file_writer.rbs +18 -0
  21. data/sig/ruby_lsp/rbs_rails/logger.rbs +15 -0
  22. data/sig/ruby_lsp/rbs_rails/version.rbs +7 -0
  23. data/sig/ruby_lsp/rbs_rails.rbs +8 -0
  24. data/spec/ruby_lsp/rbs_rails/addon_spec.rb +205 -0
  25. data/spec/ruby_lsp/rbs_rails/file_writer_spec.rb +59 -0
  26. data/spec/ruby_lsp/rbs_rails/logger_spec.rb +20 -0
  27. data/spec/spec_helper.rb +98 -0
  28. data/spec/test-app/.gitattributes +9 -0
  29. data/spec/test-app/.gitignore +34 -0
  30. data/spec/test-app/.ruby-version +1 -0
  31. data/spec/test-app/Gemfile +18 -0
  32. data/spec/test-app/Gemfile.lock +234 -0
  33. data/spec/test-app/README.md +24 -0
  34. data/spec/test-app/Rakefile +6 -0
  35. data/spec/test-app/app/assets/images/.keep +0 -0
  36. data/spec/test-app/app/assets/stylesheets/application.css +10 -0
  37. data/spec/test-app/app/controllers/application_controller.rb +4 -0
  38. data/spec/test-app/app/controllers/concerns/.keep +0 -0
  39. data/spec/test-app/app/helpers/application_helper.rb +2 -0
  40. data/spec/test-app/app/models/application_record.rb +3 -0
  41. data/spec/test-app/app/models/blog.rb +3 -0
  42. data/spec/test-app/app/models/concerns/.keep +0 -0
  43. data/spec/test-app/app/models/user.rb +2 -0
  44. data/spec/test-app/app/views/layouts/application.html.erb +27 -0
  45. data/spec/test-app/app/views/pwa/manifest.json.erb +22 -0
  46. data/spec/test-app/app/views/pwa/service-worker.js +26 -0
  47. data/spec/test-app/bin/dev +2 -0
  48. data/spec/test-app/bin/rails +4 -0
  49. data/spec/test-app/bin/rake +4 -0
  50. data/spec/test-app/bin/setup +34 -0
  51. data/spec/test-app/config/application.rb +42 -0
  52. data/spec/test-app/config/boot.rb +3 -0
  53. data/spec/test-app/config/credentials.yml.enc +1 -0
  54. data/spec/test-app/config/database.yml +32 -0
  55. data/spec/test-app/config/environment.rb +5 -0
  56. data/spec/test-app/config/environments/development.rb +51 -0
  57. data/spec/test-app/config/environments/production.rb +67 -0
  58. data/spec/test-app/config/environments/test.rb +42 -0
  59. data/spec/test-app/config/initializers/assets.rb +7 -0
  60. data/spec/test-app/config/initializers/content_security_policy.rb +25 -0
  61. data/spec/test-app/config/initializers/filter_parameter_logging.rb +8 -0
  62. data/spec/test-app/config/initializers/inflections.rb +16 -0
  63. data/spec/test-app/config/locales/en.yml +31 -0
  64. data/spec/test-app/config/puma.rb +38 -0
  65. data/spec/test-app/config/routes.rb +14 -0
  66. data/spec/test-app/config.ru +6 -0
  67. data/spec/test-app/db/migrate/20250907043524_create_users.rb +10 -0
  68. data/spec/test-app/db/migrate/20250907175033_create_blogs.rb +10 -0
  69. data/spec/test-app/db/schema.rb +30 -0
  70. data/spec/test-app/db/seeds.rb +9 -0
  71. data/spec/test-app/lib/tasks/.keep +0 -0
  72. data/spec/test-app/log/.keep +0 -0
  73. data/spec/test-app/public/400.html +114 -0
  74. data/spec/test-app/public/404.html +114 -0
  75. data/spec/test-app/public/406-unsupported-browser.html +114 -0
  76. data/spec/test-app/public/422.html +114 -0
  77. data/spec/test-app/public/500.html +114 -0
  78. data/spec/test-app/public/icon.png +0 -0
  79. data/spec/test-app/public/icon.svg +3 -0
  80. data/spec/test-app/public/robots.txt +1 -0
  81. data/spec/test-app/script/.keep +0 -0
  82. data/spec/test-app/storage/.keep +0 -0
  83. data/spec/test-app/test/controllers/.keep +0 -0
  84. data/spec/test-app/test/fixtures/blogs.yml +9 -0
  85. data/spec/test-app/test/fixtures/files/.keep +0 -0
  86. data/spec/test-app/test/fixtures/users.yml +9 -0
  87. data/spec/test-app/test/helpers/.keep +0 -0
  88. data/spec/test-app/test/integration/.keep +0 -0
  89. data/spec/test-app/test/models/.keep +0 -0
  90. data/spec/test-app/test/models/blog_test.rb +7 -0
  91. data/spec/test-app/test/models/user_test.rb +7 -0
  92. data/spec/test-app/test/test_helper.rb +15 -0
  93. data/spec/test-app/tmp/.keep +0 -0
  94. data/spec/test-app/tmp/pids/.keep +0 -0
  95. data/spec/test-app/tmp/storage/.keep +0 -0
  96. data/spec/test-app/vendor/.keep +0 -0
  97. metadata +211 -0
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe RubyLsp::RbsRails::FileWriter do
4
+ describe "#write" do
5
+ subject { file_writer.write(content) }
6
+
7
+ after do
8
+ tmpdir.rmtree
9
+ end
10
+
11
+ let(:file_writer) { described_class.new(path) }
12
+ let(:path) { tmpdir / "test_file.rbs" }
13
+ let(:tmpdir) { Pathname.new(Dir.mktmpdir("file_writer_test")) }
14
+
15
+ context "when the file does not exist" do
16
+ it "creates the file with the given content" do
17
+ expect(path).not_to exist
18
+
19
+ file_writer.write("class NewClass; end")
20
+
21
+ expect(path).to exist
22
+ expect(path.read).to eq("class NewClass; end")
23
+ end
24
+ end
25
+
26
+ context "when the file exists" do
27
+ before do
28
+ path.write(old_content)
29
+ end
30
+
31
+ let(:old_content) { "class ExistingClass; end" }
32
+
33
+ context "when the content is different" do
34
+ it "updates the file with the new content" do
35
+ file_writer.write("class NewClass; end")
36
+
37
+ expect(path).to exist
38
+ expect(path.read).to eq("class NewClass; end")
39
+ end
40
+ end
41
+
42
+ context "when the content is the same" do
43
+ before do
44
+ path.utime(mtime, mtime)
45
+ end
46
+
47
+ let(:mtime) { Time.zone.now - 60 }
48
+
49
+ it "does not modify the file" do
50
+ file_writer.write(old_content)
51
+
52
+ expect(path).to exist
53
+ expect(path.read).to eq(old_content)
54
+ expect(path.mtime).to eq(mtime)
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ruby_lsp/rbs_rails/logger"
4
+
5
+ RSpec.describe RubyLsp::RbsRails::Logger do
6
+ describe "#info" do
7
+ subject { logger.info(message) }
8
+
9
+ let(:logger) { described_class.new(message_queue) }
10
+ let(:message_queue) { Thread::Queue.new }
11
+ let(:message) { "Test log message" }
12
+
13
+ it "Notification object is sent to message queue" do
14
+ subject
15
+ log = message_queue.pop
16
+ expect(log).to be_a(RubyLsp::Notification)
17
+ expect(log.params.message).to eq "rbs_rails: #{message}"
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by the `rspec --init` command. Conventionally, all
4
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
6
+ # this file to always be loaded, without a need to explicitly require it in any
7
+ # files.
8
+ #
9
+ # Given that it is always loaded, you are encouraged to keep this file as
10
+ # light-weight as possible. Requiring heavyweight dependencies from this file
11
+ # will add to the boot time of your test suite on EVERY test run, even for an
12
+ # individual file that may not need all of that loaded. Instead, consider making
13
+ # a separate helper file that requires the additional dependencies and performs
14
+ # the additional setup, and require it from the spec files that actually need
15
+ # it.
16
+ #
17
+ # See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
18
+ RSpec.configure do |config|
19
+ # rspec-expectations config goes here. You can use an alternate
20
+ # assertion/expectation library such as wrong or the stdlib/minitest
21
+ # assertions if you prefer.
22
+ config.expect_with :rspec do |expectations|
23
+ # This option will default to `true` in RSpec 4. It makes the `description`
24
+ # and `failure_message` of custom matchers include text for helper methods
25
+ # defined using `chain`, e.g.:
26
+ # be_bigger_than(2).and_smaller_than(4).description
27
+ # # => "be bigger than 2 and smaller than 4"
28
+ # ...rather than:
29
+ # # => "be bigger than 2"
30
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
31
+ end
32
+
33
+ # rspec-mocks config goes here. You can use an alternate test double
34
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
35
+ config.mock_with :rspec do |mocks|
36
+ # Prevents you from mocking or stubbing a method that does not exist on
37
+ # a real object. This is generally recommended, and will default to
38
+ # `true` in RSpec 4.
39
+ mocks.verify_partial_doubles = true
40
+ end
41
+
42
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
43
+ # have no way to turn it off -- the option exists only for backwards
44
+ # compatibility in RSpec 3). It causes shared context metadata to be
45
+ # inherited by the metadata hash of host groups and examples, rather than
46
+ # triggering implicit auto-inclusion in groups with matching metadata.
47
+ config.shared_context_metadata_behavior = :apply_to_host_groups
48
+
49
+ # The settings below are suggested to provide a good initial experience
50
+ # with RSpec, but feel free to customize to your heart's content.
51
+ # # This allows you to limit a spec run to individual examples or groups
52
+ # # you care about by tagging them with `:focus` metadata. When nothing
53
+ # # is tagged with `:focus`, all examples get run. RSpec also provides
54
+ # # aliases for `it`, `describe`, and `context` that include `:focus`
55
+ # # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
56
+ # config.filter_run_when_matching :focus
57
+ #
58
+ # # Allows RSpec to persist some state between runs in order to support
59
+ # # the `--only-failures` and `--next-failure` CLI options. We recommend
60
+ # # you configure your source control system to ignore this file.
61
+ # config.example_status_persistence_file_path = "spec/examples.txt"
62
+ #
63
+ # # Limits the available syntax to the non-monkey patched syntax that is
64
+ # # recommended. For more details, see:
65
+ # # https://rspec.info/features/3-12/rspec-core/configuration/zero-monkey-patching-mode/
66
+ # config.disable_monkey_patching!
67
+ #
68
+ # # This setting enables warnings. It's recommended, but in some cases may
69
+ # # be too noisy due to issues in dependencies.
70
+ # config.warnings = true
71
+ #
72
+ # # Many RSpec users commonly either run the entire suite or an individual
73
+ # # file, and it's useful to allow more verbose output when running an
74
+ # # individual spec file.
75
+ # if config.files_to_run.one?
76
+ # # Use the documentation formatter for detailed output,
77
+ # # unless a formatter has already been configured
78
+ # # (e.g. via a command-line flag).
79
+ # config.default_formatter = "doc"
80
+ # end
81
+ #
82
+ # # Print the 10 slowest examples and example groups at the
83
+ # # end of the spec run, to help surface which specs are running
84
+ # # particularly slow.
85
+ # config.profile_examples = 10
86
+ #
87
+ # # Run specs in random order to surface order dependencies. If you find an
88
+ # # order dependency and want to debug it, you can fix the order by providing
89
+ # # the seed, which is printed after each run.
90
+ # # --seed 1234
91
+ # config.order = :random
92
+ #
93
+ # # Seed global randomization in this process using the `--seed` CLI option.
94
+ # # Setting this allows you to use `--seed` to deterministically reproduce
95
+ # # test failures related to randomization by passing the same `--seed` value
96
+ # # as the one that triggered the failure.
97
+ # Kernel.srand config.seed
98
+ end
@@ -0,0 +1,9 @@
1
+ # See https://git-scm.com/docs/gitattributes for more about git attribute files.
2
+
3
+ # Mark the database schema as having been generated.
4
+ db/schema.rb linguist-generated
5
+
6
+ # Mark any vendored files as having been vendored.
7
+ vendor/* linguist-vendored
8
+ config/credentials/*.yml.enc diff=rails_credentials
9
+ config/credentials.yml.enc diff=rails_credentials
@@ -0,0 +1,34 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # Temporary files generated by your text editor or operating system
4
+ # belong in git's global ignore instead:
5
+ # `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore`
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore all environment files.
11
+ /.env*
12
+
13
+ # Ignore all logfiles and tempfiles.
14
+ /log/*
15
+ /tmp/*
16
+ !/log/.keep
17
+ !/tmp/.keep
18
+
19
+ # Ignore pidfiles, but keep the directory.
20
+ /tmp/pids/*
21
+ !/tmp/pids/
22
+ !/tmp/pids/.keep
23
+
24
+ # Ignore storage (uploaded files in development and any SQLite databases).
25
+ /storage/*
26
+ !/storage/.keep
27
+ /tmp/storage/*
28
+ !/tmp/storage/
29
+ !/tmp/storage/.keep
30
+
31
+ /public/assets
32
+
33
+ # Ignore master key for decrypting credentials and more.
34
+ /config/master.key
@@ -0,0 +1 @@
1
+ 3.4.5
@@ -0,0 +1,18 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
4
+ gem "rails", "~> 8.0.2", ">= 8.0.2.1"
5
+ # The modern asset pipeline for Rails [https://github.com/rails/propshaft]
6
+ gem "propshaft"
7
+ # Use sqlite3 as the database for Active Record
8
+ gem "sqlite3", ">= 2.1"
9
+ # Use the Puma web server [https://github.com/puma/puma]
10
+ gem "puma", ">= 5.0"
11
+
12
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
13
+ gem "tzinfo-data", platforms: %i[ windows jruby ]
14
+
15
+ group :development, :test do
16
+ # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
17
+ gem "debug", platforms: %i[ mri windows ], require: "debug/prelude"
18
+ end
@@ -0,0 +1,234 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ actioncable (8.0.2.1)
5
+ actionpack (= 8.0.2.1)
6
+ activesupport (= 8.0.2.1)
7
+ nio4r (~> 2.0)
8
+ websocket-driver (>= 0.6.1)
9
+ zeitwerk (~> 2.6)
10
+ actionmailbox (8.0.2.1)
11
+ actionpack (= 8.0.2.1)
12
+ activejob (= 8.0.2.1)
13
+ activerecord (= 8.0.2.1)
14
+ activestorage (= 8.0.2.1)
15
+ activesupport (= 8.0.2.1)
16
+ mail (>= 2.8.0)
17
+ actionmailer (8.0.2.1)
18
+ actionpack (= 8.0.2.1)
19
+ actionview (= 8.0.2.1)
20
+ activejob (= 8.0.2.1)
21
+ activesupport (= 8.0.2.1)
22
+ mail (>= 2.8.0)
23
+ rails-dom-testing (~> 2.2)
24
+ actionpack (8.0.2.1)
25
+ actionview (= 8.0.2.1)
26
+ activesupport (= 8.0.2.1)
27
+ nokogiri (>= 1.8.5)
28
+ rack (>= 2.2.4)
29
+ rack-session (>= 1.0.1)
30
+ rack-test (>= 0.6.3)
31
+ rails-dom-testing (~> 2.2)
32
+ rails-html-sanitizer (~> 1.6)
33
+ useragent (~> 0.16)
34
+ actiontext (8.0.2.1)
35
+ actionpack (= 8.0.2.1)
36
+ activerecord (= 8.0.2.1)
37
+ activestorage (= 8.0.2.1)
38
+ activesupport (= 8.0.2.1)
39
+ globalid (>= 0.6.0)
40
+ nokogiri (>= 1.8.5)
41
+ actionview (8.0.2.1)
42
+ activesupport (= 8.0.2.1)
43
+ builder (~> 3.1)
44
+ erubi (~> 1.11)
45
+ rails-dom-testing (~> 2.2)
46
+ rails-html-sanitizer (~> 1.6)
47
+ activejob (8.0.2.1)
48
+ activesupport (= 8.0.2.1)
49
+ globalid (>= 0.3.6)
50
+ activemodel (8.0.2.1)
51
+ activesupport (= 8.0.2.1)
52
+ activerecord (8.0.2.1)
53
+ activemodel (= 8.0.2.1)
54
+ activesupport (= 8.0.2.1)
55
+ timeout (>= 0.4.0)
56
+ activestorage (8.0.2.1)
57
+ actionpack (= 8.0.2.1)
58
+ activejob (= 8.0.2.1)
59
+ activerecord (= 8.0.2.1)
60
+ activesupport (= 8.0.2.1)
61
+ marcel (~> 1.0)
62
+ activesupport (8.0.2.1)
63
+ base64
64
+ benchmark (>= 0.3)
65
+ bigdecimal
66
+ concurrent-ruby (~> 1.0, >= 1.3.1)
67
+ connection_pool (>= 2.2.5)
68
+ drb
69
+ i18n (>= 1.6, < 2)
70
+ logger (>= 1.4.2)
71
+ minitest (>= 5.1)
72
+ securerandom (>= 0.3)
73
+ tzinfo (~> 2.0, >= 2.0.5)
74
+ uri (>= 0.13.1)
75
+ base64 (0.3.0)
76
+ benchmark (0.4.1)
77
+ bigdecimal (3.2.2)
78
+ builder (3.3.0)
79
+ concurrent-ruby (1.3.5)
80
+ connection_pool (2.5.4)
81
+ crass (1.0.6)
82
+ date (3.4.1)
83
+ debug (1.11.0)
84
+ irb (~> 1.10)
85
+ reline (>= 0.3.8)
86
+ drb (2.2.3)
87
+ erb (5.0.2)
88
+ erubi (1.13.1)
89
+ globalid (1.2.1)
90
+ activesupport (>= 6.1)
91
+ i18n (1.14.7)
92
+ concurrent-ruby (~> 1.0)
93
+ io-console (0.8.1)
94
+ irb (1.15.2)
95
+ pp (>= 0.6.0)
96
+ rdoc (>= 4.0.0)
97
+ reline (>= 0.4.2)
98
+ logger (1.7.0)
99
+ loofah (2.24.1)
100
+ crass (~> 1.0.2)
101
+ nokogiri (>= 1.12.0)
102
+ mail (2.8.1)
103
+ mini_mime (>= 0.1.1)
104
+ net-imap
105
+ net-pop
106
+ net-smtp
107
+ marcel (1.0.4)
108
+ mini_mime (1.1.5)
109
+ minitest (5.25.5)
110
+ net-imap (0.5.10)
111
+ date
112
+ net-protocol
113
+ net-pop (0.1.2)
114
+ net-protocol
115
+ net-protocol (0.2.2)
116
+ timeout
117
+ net-smtp (0.5.1)
118
+ net-protocol
119
+ nio4r (2.7.4)
120
+ nokogiri (1.18.9-aarch64-linux-gnu)
121
+ racc (~> 1.4)
122
+ nokogiri (1.18.9-aarch64-linux-musl)
123
+ racc (~> 1.4)
124
+ nokogiri (1.18.9-arm-linux-gnu)
125
+ racc (~> 1.4)
126
+ nokogiri (1.18.9-arm-linux-musl)
127
+ racc (~> 1.4)
128
+ nokogiri (1.18.9-arm64-darwin)
129
+ racc (~> 1.4)
130
+ nokogiri (1.18.9-x86_64-darwin)
131
+ racc (~> 1.4)
132
+ nokogiri (1.18.9-x86_64-linux-gnu)
133
+ racc (~> 1.4)
134
+ nokogiri (1.18.9-x86_64-linux-musl)
135
+ racc (~> 1.4)
136
+ pp (0.6.2)
137
+ prettyprint
138
+ prettyprint (0.2.0)
139
+ propshaft (1.2.1)
140
+ actionpack (>= 7.0.0)
141
+ activesupport (>= 7.0.0)
142
+ rack
143
+ psych (5.2.6)
144
+ date
145
+ stringio
146
+ puma (6.6.1)
147
+ nio4r (~> 2.0)
148
+ racc (1.8.1)
149
+ rack (3.2.0)
150
+ rack-session (2.1.1)
151
+ base64 (>= 0.1.0)
152
+ rack (>= 3.0.0)
153
+ rack-test (2.2.0)
154
+ rack (>= 1.3)
155
+ rackup (2.2.1)
156
+ rack (>= 3)
157
+ rails (8.0.2.1)
158
+ actioncable (= 8.0.2.1)
159
+ actionmailbox (= 8.0.2.1)
160
+ actionmailer (= 8.0.2.1)
161
+ actionpack (= 8.0.2.1)
162
+ actiontext (= 8.0.2.1)
163
+ actionview (= 8.0.2.1)
164
+ activejob (= 8.0.2.1)
165
+ activemodel (= 8.0.2.1)
166
+ activerecord (= 8.0.2.1)
167
+ activestorage (= 8.0.2.1)
168
+ activesupport (= 8.0.2.1)
169
+ bundler (>= 1.15.0)
170
+ railties (= 8.0.2.1)
171
+ rails-dom-testing (2.3.0)
172
+ activesupport (>= 5.0.0)
173
+ minitest
174
+ nokogiri (>= 1.6)
175
+ rails-html-sanitizer (1.6.2)
176
+ loofah (~> 2.21)
177
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
178
+ railties (8.0.2.1)
179
+ actionpack (= 8.0.2.1)
180
+ activesupport (= 8.0.2.1)
181
+ irb (~> 1.13)
182
+ rackup (>= 1.0.0)
183
+ rake (>= 12.2)
184
+ thor (~> 1.0, >= 1.2.2)
185
+ zeitwerk (~> 2.6)
186
+ rake (13.3.0)
187
+ rdoc (6.14.2)
188
+ erb
189
+ psych (>= 4.0.0)
190
+ reline (0.6.2)
191
+ io-console (~> 0.5)
192
+ securerandom (0.4.1)
193
+ sqlite3 (2.7.3-aarch64-linux-gnu)
194
+ sqlite3 (2.7.3-aarch64-linux-musl)
195
+ sqlite3 (2.7.3-arm-linux-gnu)
196
+ sqlite3 (2.7.3-arm-linux-musl)
197
+ sqlite3 (2.7.3-arm64-darwin)
198
+ sqlite3 (2.7.3-x86_64-darwin)
199
+ sqlite3 (2.7.3-x86_64-linux-gnu)
200
+ sqlite3 (2.7.3-x86_64-linux-musl)
201
+ stringio (3.1.7)
202
+ thor (1.4.0)
203
+ timeout (0.4.3)
204
+ tzinfo (2.0.6)
205
+ concurrent-ruby (~> 1.0)
206
+ uri (1.0.3)
207
+ useragent (0.16.11)
208
+ websocket-driver (0.8.0)
209
+ base64
210
+ websocket-extensions (>= 0.1.0)
211
+ websocket-extensions (0.1.5)
212
+ zeitwerk (2.7.3)
213
+
214
+ PLATFORMS
215
+ aarch64-linux-gnu
216
+ aarch64-linux-musl
217
+ arm-linux-gnu
218
+ arm-linux-musl
219
+ arm64-darwin
220
+ x86_64-darwin
221
+ x86_64-linux
222
+ x86_64-linux-gnu
223
+ x86_64-linux-musl
224
+
225
+ DEPENDENCIES
226
+ debug
227
+ propshaft
228
+ puma (>= 5.0)
229
+ rails (~> 8.0.2, >= 8.0.2.1)
230
+ sqlite3 (>= 2.1)
231
+ tzinfo-data
232
+
233
+ BUNDLED WITH
234
+ 2.7.1
@@ -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
+ * ...
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative "config/application"
5
+
6
+ Rails.application.load_tasks
File without changes
@@ -0,0 +1,10 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css.
3
+ *
4
+ * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
5
+ * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
6
+ * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
7
+ * depending on specificity.
8
+ *
9
+ * Consider organizing styles into separate files for maintainability.
10
+ */
@@ -0,0 +1,4 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
3
+ allow_browser versions: :modern
4
+ end
File without changes
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ primary_abstract_class
3
+ end
@@ -0,0 +1,3 @@
1
+ class Blog < ApplicationRecord
2
+ belongs_to :user
3
+ end
File without changes
@@ -0,0 +1,2 @@
1
+ class User < ApplicationRecord
2
+ end
@@ -0,0 +1,27 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= content_for(:title) || "Test App" %></title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <meta name="apple-mobile-web-app-capable" content="yes">
7
+ <meta name="mobile-web-app-capable" content="yes">
8
+ <%= csrf_meta_tags %>
9
+ <%= csp_meta_tag %>
10
+
11
+ <%= yield :head %>
12
+
13
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
14
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
15
+
16
+ <link rel="icon" href="/icon.png" type="image/png">
17
+ <link rel="icon" href="/icon.svg" type="image/svg+xml">
18
+ <link rel="apple-touch-icon" href="/icon.png">
19
+
20
+ <%# Includes all stylesheet files in app/assets/stylesheets %>
21
+ <%= stylesheet_link_tag :app %>
22
+ </head>
23
+
24
+ <body>
25
+ <%= yield %>
26
+ </body>
27
+ </html>
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "TestApp",
3
+ "icons": [
4
+ {
5
+ "src": "/icon.png",
6
+ "type": "image/png",
7
+ "sizes": "512x512"
8
+ },
9
+ {
10
+ "src": "/icon.png",
11
+ "type": "image/png",
12
+ "sizes": "512x512",
13
+ "purpose": "maskable"
14
+ }
15
+ ],
16
+ "start_url": "/",
17
+ "display": "standalone",
18
+ "scope": "/",
19
+ "description": "TestApp.",
20
+ "theme_color": "red",
21
+ "background_color": "red"
22
+ }
@@ -0,0 +1,26 @@
1
+ // Add a service worker for processing Web Push notifications:
2
+ //
3
+ // self.addEventListener("push", async (event) => {
4
+ // const { title, options } = await event.data.json()
5
+ // event.waitUntil(self.registration.showNotification(title, options))
6
+ // })
7
+ //
8
+ // self.addEventListener("notificationclick", function(event) {
9
+ // event.notification.close()
10
+ // event.waitUntil(
11
+ // clients.matchAll({ type: "window" }).then((clientList) => {
12
+ // for (let i = 0; i < clientList.length; i++) {
13
+ // let client = clientList[i]
14
+ // let clientPath = (new URL(client.url)).pathname
15
+ //
16
+ // if (clientPath == event.notification.data.path && "focus" in client) {
17
+ // return client.focus()
18
+ // }
19
+ // }
20
+ //
21
+ // if (clients.openWindow) {
22
+ // return clients.openWindow(event.notification.data.path)
23
+ // }
24
+ // })
25
+ // )
26
+ // })
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env ruby
2
+ exec "./bin/rails", "server", *ARGV
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path("../config/application", __dir__)
3
+ require_relative "../config/boot"
4
+ require "rails/commands"
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "../config/boot"
3
+ require "rake"
4
+ Rake.application.run