solargraph-rails 1.2.0 → 1.2.2
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/.github/workflows/{overcommit.yml → linter.yml} +25 -2
- data/.github/workflows/{ruby.yml → test.yml} +20 -6
- data/.github/workflows/typecheck.yml +3 -1
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +50 -123
- data/.solargraph.yml +3 -0
- data/CHANGELOG.md +24 -1
- data/DEVELOPMENT.md +5 -3
- data/Gemfile +5 -4
- data/README.md +1 -0
- data/lib/solargraph/rails/annotations/action_text.rb +11 -0
- data/lib/solargraph/rails/annotations/active_job.rb +276 -0
- data/lib/solargraph/rails/annotations/active_record.rb +33 -3
- data/lib/solargraph/rails/annotations/active_storage.rb +113 -0
- data/lib/solargraph/rails/annotations/array.rb +4 -0
- data/lib/solargraph/rails/annotations/date.rb +8 -0
- data/lib/solargraph/rails/annotations/rails.rb +4 -0
- data/lib/solargraph/rails/annotations/time.rb +4 -0
- data/lib/solargraph/rails/version.rb +1 -1
- data/solargraph-rails.gemspec +0 -6
- metadata +18 -13
- data/.github/workflows/rubocop.yml +0 -31
data/Gemfile
CHANGED
@@ -35,6 +35,7 @@ group :development, :rubocop do
|
|
35
35
|
gem 'rubocop-rake', require: false
|
36
36
|
gem 'rubocop-rspec', require: false
|
37
37
|
gem 'rubocop-performance', require: false
|
38
|
+
gem 'rubocop-yard', require: true
|
38
39
|
gem 'overcommit'
|
39
40
|
gem 'simplecov-lcov',
|
40
41
|
github: 'apiology/simplecov-lcov',
|
@@ -52,11 +53,11 @@ gemspec
|
|
52
53
|
solargraph_force_ci_version = (ENV['CI'] && ENV['MATRIX_SOLARGRAPH_VERSION'])
|
53
54
|
|
54
55
|
case solargraph_force_ci_version
|
55
|
-
when '0.
|
56
|
-
gem
|
56
|
+
when '0.57.alpha'
|
57
|
+
gem "solargraph",
|
57
58
|
github: 'apiology/solargraph',
|
58
|
-
branch: '2025-
|
59
|
-
|
59
|
+
branch: '2025-07-02'
|
60
|
+
# path: '../solargraph'
|
60
61
|
end
|
61
62
|
|
62
63
|
# Local gemfile for development tools, etc.
|
data/README.md
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
module ActionText
|
2
|
+
module Attribute
|
3
|
+
# @param name [String, Symbol]
|
4
|
+
# @param encrypted [Boolean]
|
5
|
+
# @param strict_loading [Boolean]
|
6
|
+
# @return [void]
|
7
|
+
def self.has_rich_text(name, encrypted = false, strict_loading = false); end
|
8
|
+
# @return [Array<String>]
|
9
|
+
def self.rich_text_association_names; end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,276 @@
|
|
1
|
+
module ActiveJob
|
2
|
+
module Callbacks
|
3
|
+
# These methods will be included into any Active Job object, adding
|
4
|
+
# callbacks for +perform+ and +enqueue+ methods.
|
5
|
+
module ClassMethods
|
6
|
+
# Defines a callback that will get called right before the
|
7
|
+
# job's perform method is executed.
|
8
|
+
#
|
9
|
+
# class VideoProcessJob < ActiveJob::Base
|
10
|
+
# queue_as :default
|
11
|
+
#
|
12
|
+
# before_perform do |job|
|
13
|
+
# UserMailer.notify_video_started_processing(job.arguments.first)
|
14
|
+
# end
|
15
|
+
#
|
16
|
+
# def perform(video_id)
|
17
|
+
# Video.find(video_id).process
|
18
|
+
# end
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
#
|
22
|
+
# @yieldreturn [void]
|
23
|
+
# @return [void]
|
24
|
+
def before_perform(*filters, &blk); end
|
25
|
+
|
26
|
+
# Defines a callback that will get called right after the
|
27
|
+
# job's perform method has finished.
|
28
|
+
#
|
29
|
+
# class VideoProcessJob < ActiveJob::Base
|
30
|
+
# queue_as :default
|
31
|
+
#
|
32
|
+
# after_perform do |job|
|
33
|
+
# UserMailer.notify_video_processed(job.arguments.first)
|
34
|
+
# end
|
35
|
+
#
|
36
|
+
# def perform(video_id)
|
37
|
+
# Video.find(video_id).process
|
38
|
+
# end
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# @yieldreturn [void]
|
42
|
+
# @return [void]
|
43
|
+
def after_perform(*filters, &blk); end
|
44
|
+
|
45
|
+
# Defines a callback that will get called around the job's perform method.
|
46
|
+
#
|
47
|
+
# class VideoProcessJob < ActiveJob::Base
|
48
|
+
# queue_as :default
|
49
|
+
#
|
50
|
+
# around_perform do |job, block|
|
51
|
+
# UserMailer.notify_video_started_processing(job.arguments.first)
|
52
|
+
# block.call
|
53
|
+
# UserMailer.notify_video_processed(job.arguments.first)
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# def perform(video_id)
|
57
|
+
# Video.find(video_id).process
|
58
|
+
# end
|
59
|
+
# end
|
60
|
+
#
|
61
|
+
# You can access the return value of the job only if the execution wasn't halted.
|
62
|
+
#
|
63
|
+
# class VideoProcessJob < ActiveJob::Base
|
64
|
+
# around_perform do |job, block|
|
65
|
+
# value = block.call
|
66
|
+
# puts value # => "Hello World!"
|
67
|
+
# end
|
68
|
+
#
|
69
|
+
# def perform
|
70
|
+
# "Hello World!"
|
71
|
+
# end
|
72
|
+
# end
|
73
|
+
#
|
74
|
+
# @yieldreturn [void]
|
75
|
+
# @return [void]
|
76
|
+
def around_perform(*filters, &blk); end
|
77
|
+
|
78
|
+
# Defines a callback that will get called right before the
|
79
|
+
# job is enqueued.
|
80
|
+
#
|
81
|
+
# class VideoProcessJob < ActiveJob::Base
|
82
|
+
# queue_as :default
|
83
|
+
#
|
84
|
+
# before_enqueue do |job|
|
85
|
+
# $statsd.increment "enqueue-video-job.try"
|
86
|
+
# end
|
87
|
+
#
|
88
|
+
# def perform(video_id)
|
89
|
+
# Video.find(video_id).process
|
90
|
+
# end
|
91
|
+
# end
|
92
|
+
#
|
93
|
+
# @yieldreturn [void]
|
94
|
+
# @return [void]
|
95
|
+
def before_enqueue(*filters, &blk); end
|
96
|
+
|
97
|
+
# Defines a callback that will get called right after the
|
98
|
+
# job is enqueued.
|
99
|
+
#
|
100
|
+
# class VideoProcessJob < ActiveJob::Base
|
101
|
+
# queue_as :default
|
102
|
+
#
|
103
|
+
# after_enqueue do |job|
|
104
|
+
# $statsd.increment "enqueue-video-job.success"
|
105
|
+
# end
|
106
|
+
#
|
107
|
+
# def perform(video_id)
|
108
|
+
# Video.find(video_id).process
|
109
|
+
# end
|
110
|
+
# end
|
111
|
+
#
|
112
|
+
# @yieldreturn [void]
|
113
|
+
# @return [void]
|
114
|
+
def after_enqueue(*filters, &blk); end
|
115
|
+
|
116
|
+
# Defines a callback that will get called around the enqueuing
|
117
|
+
# of the job.
|
118
|
+
#
|
119
|
+
# class VideoProcessJob < ActiveJob::Base
|
120
|
+
# queue_as :default
|
121
|
+
#
|
122
|
+
# around_enqueue do |job, block|
|
123
|
+
# $statsd.time "video-job.process" do
|
124
|
+
# block.call
|
125
|
+
# end
|
126
|
+
# end
|
127
|
+
#
|
128
|
+
# def perform(video_id)
|
129
|
+
# Video.find(video_id).process
|
130
|
+
# end
|
131
|
+
# end
|
132
|
+
#
|
133
|
+
# @yieldreturn [void]
|
134
|
+
# @return [void]
|
135
|
+
def around_enqueue(*filters, &blk); end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
module Exceptions
|
140
|
+
module ClassMethods
|
141
|
+
# Catch the exception and reschedule job for re-execution after so many seconds, for a specific number of attempts.
|
142
|
+
# If the exception keeps getting raised beyond the specified number of attempts, the exception is allowed to
|
143
|
+
# bubble up to the underlying queuing system, which may have its own retry mechanism or place it in a
|
144
|
+
# holding queue for inspection.
|
145
|
+
#
|
146
|
+
# You can also pass a block that'll be invoked if the retry attempts fail for custom logic rather than letting
|
147
|
+
# the exception bubble up. This block is yielded with the job instance as the first and the error instance as the second parameter.
|
148
|
+
#
|
149
|
+
# ==== Options
|
150
|
+
# * <tt>:wait</tt> - Re-enqueues the job with a delay specified either in seconds (default: 3 seconds),
|
151
|
+
# as a computing proc that takes the number of executions so far as an argument, or as a symbol reference of
|
152
|
+
# <tt>:exponentially_longer</tt>, which applies the wait algorithm of <tt>((executions**4) + (Kernel.rand * (executions**4) * jitter)) + 2</tt>
|
153
|
+
# (first wait ~3s, then ~18s, then ~83s, etc)
|
154
|
+
# * <tt>:attempts</tt> - Re-enqueues the job the specified number of times (default: 5 attempts) or a symbol reference of <tt>:unlimited</tt>
|
155
|
+
# to retry the job until it succeeds
|
156
|
+
# * <tt>:queue</tt> - Re-enqueues the job on a different queue
|
157
|
+
# * <tt>:priority</tt> - Re-enqueues the job with a different priority
|
158
|
+
# * <tt>:jitter</tt> - A random delay of wait time used when calculating backoff. The default is 15% (0.15) which represents the upper bound of possible wait time (expressed as a percentage)
|
159
|
+
#
|
160
|
+
# ==== Examples
|
161
|
+
#
|
162
|
+
# class RemoteServiceJob < ActiveJob::Base
|
163
|
+
# retry_on CustomAppException # defaults to ~3s wait, 5 attempts
|
164
|
+
# retry_on AnotherCustomAppException, wait: ->(executions) { executions * 2 }
|
165
|
+
# retry_on CustomInfrastructureException, wait: 5.minutes, attempts: :unlimited
|
166
|
+
#
|
167
|
+
# retry_on ActiveRecord::Deadlocked, wait: 5.seconds, attempts: 3
|
168
|
+
# retry_on Net::OpenTimeout, Timeout::Error, wait: :exponentially_longer, attempts: 10 # retries at most 10 times for Net::OpenTimeout and Timeout::Error combined
|
169
|
+
# # To retry at most 10 times for each individual exception:
|
170
|
+
# # retry_on Net::OpenTimeout, wait: :exponentially_longer, attempts: 10
|
171
|
+
# # retry_on Net::ReadTimeout, wait: 5.seconds, jitter: 0.30, attempts: 10
|
172
|
+
# # retry_on Timeout::Error, wait: :exponentially_longer, attempts: 10
|
173
|
+
#
|
174
|
+
# retry_on(YetAnotherCustomAppException) do |job, error|
|
175
|
+
# ExceptionNotifier.caught(error)
|
176
|
+
# end
|
177
|
+
#
|
178
|
+
# def perform(*args)
|
179
|
+
# # Might raise CustomAppException, AnotherCustomAppException, or YetAnotherCustomAppException for something domain specific
|
180
|
+
# # Might raise ActiveRecord::Deadlocked when a local db deadlock is detected
|
181
|
+
# # Might raise Net::OpenTimeout or Timeout::Error when the remote service is down
|
182
|
+
# end
|
183
|
+
# end
|
184
|
+
#
|
185
|
+
# @yieldreturn [void]
|
186
|
+
# @return [void]
|
187
|
+
def retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: nil, jitter: JITTER_DEFAULT); end
|
188
|
+
|
189
|
+
# Discard the job with no attempts to retry, if the exception is raised. This is useful when the subject of the job,
|
190
|
+
# like an Active Record, is no longer available, and the job is thus no longer relevant.
|
191
|
+
#
|
192
|
+
# You can also pass a block that'll be invoked. This block is yielded with the job instance as the first and the error instance as the second parameter.
|
193
|
+
#
|
194
|
+
# ==== Example
|
195
|
+
#
|
196
|
+
# class SearchIndexingJob < ActiveJob::Base
|
197
|
+
# discard_on ActiveJob::DeserializationError
|
198
|
+
# discard_on(CustomAppException) do |job, error|
|
199
|
+
# ExceptionNotifier.caught(error)
|
200
|
+
# end
|
201
|
+
#
|
202
|
+
# def perform(record)
|
203
|
+
# # Will raise ActiveJob::DeserializationError if the record can't be deserialized
|
204
|
+
# # Might raise CustomAppException for something domain specific
|
205
|
+
# end
|
206
|
+
# end
|
207
|
+
#
|
208
|
+
# @yieldreturn [void]
|
209
|
+
# @return [void]
|
210
|
+
def discard_on(*exceptions); end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
module QueueName
|
215
|
+
extend ActiveSupport::Concern
|
216
|
+
|
217
|
+
# Includes the ability to override the default queue name and prefix.
|
218
|
+
module ClassMethods
|
219
|
+
mattr_accessor :default_queue_name, default: "default"
|
220
|
+
|
221
|
+
# Specifies the name of the queue to process the job on.
|
222
|
+
#
|
223
|
+
# class PublishToFeedJob < ActiveJob::Base
|
224
|
+
# queue_as :feeds
|
225
|
+
#
|
226
|
+
# def perform(post)
|
227
|
+
# post.to_feed!
|
228
|
+
# end
|
229
|
+
# end
|
230
|
+
#
|
231
|
+
# Can be given a block that will evaluate in the context of the job
|
232
|
+
# so that a dynamic queue name can be applied:
|
233
|
+
#
|
234
|
+
# class PublishToFeedJob < ApplicationJob
|
235
|
+
# queue_as do
|
236
|
+
# post = self.arguments.first
|
237
|
+
#
|
238
|
+
# if post.paid?
|
239
|
+
# :paid_feeds
|
240
|
+
# else
|
241
|
+
# :feeds
|
242
|
+
# end
|
243
|
+
# end
|
244
|
+
#
|
245
|
+
# def perform(post)
|
246
|
+
# post.to_feed!
|
247
|
+
# end
|
248
|
+
# end
|
249
|
+
#
|
250
|
+
# @return [void]
|
251
|
+
def queue_as(part_name = nil, &block); end
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
module QueuePriority
|
256
|
+
extend ActiveSupport::Concern
|
257
|
+
|
258
|
+
# Includes the ability to override the default queue priority.
|
259
|
+
module ClassMethods
|
260
|
+
# Specifies the priority of the queue to create the job with.
|
261
|
+
#
|
262
|
+
# class PublishToFeedJob < ActiveJob::Base
|
263
|
+
# queue_with_priority 50
|
264
|
+
#
|
265
|
+
# def perform(post)
|
266
|
+
# post.to_feed!
|
267
|
+
# end
|
268
|
+
# end
|
269
|
+
#
|
270
|
+
# Specify either an argument or a block.
|
271
|
+
#
|
272
|
+
# @return [void]
|
273
|
+
def queue_with_priority(priority = nil, &block); end
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
@@ -1,9 +1,14 @@
|
|
1
|
+
require 'active_record'
|
2
|
+
|
1
3
|
class ActiveRecord::ConnectionAdapters::SchemaStatements
|
2
4
|
# @yieldparam [ActiveRecord::ConnectionAdapters::TableDefinition]
|
3
5
|
# @return [void]
|
4
6
|
def create_table(table_name, id: nil, primary_key: nil, force: false, **options); end
|
5
7
|
# @yieldparam [ActiveRecord::ConnectionAdapters::TableDefinition]
|
8
|
+
# @param table_1 [String, Symbol]
|
9
|
+
# @param table_2 [String, Symbol]
|
6
10
|
# @param column_options [Hash]
|
11
|
+
# @param options [Hash{Symbol => undefined}]
|
7
12
|
# @return [void]
|
8
13
|
def create_join_table(table_1, table_2, column_options: {}, **options); end
|
9
14
|
# @yieldparam [ActiveRecord::ConnectionAdapters::Table]
|
@@ -11,6 +16,12 @@ class ActiveRecord::ConnectionAdapters::SchemaStatements
|
|
11
16
|
def change_table(table_name, **options); end
|
12
17
|
end
|
13
18
|
|
19
|
+
module ActiveRecord::Core
|
20
|
+
# @param methods [Symbol]
|
21
|
+
# @return [ActiveSupport::HashWithIndifferentAccess<Symbol>]
|
22
|
+
def slice(*methods); end
|
23
|
+
end
|
24
|
+
|
14
25
|
# this module doesn't really exist, it's here to avoid repeating these mixins
|
15
26
|
module ActiveRecord::RelationMethods
|
16
27
|
include Enumerable
|
@@ -43,15 +54,34 @@ class ActiveRecord::Base
|
|
43
54
|
# below
|
44
55
|
include ActiveRecord::Callbacks
|
45
56
|
extend ActiveRecord::Callbacks::ClassMethods
|
46
|
-
extend Translation
|
57
|
+
extend ActiveRecord::Translation
|
58
|
+
|
59
|
+
# copied from .gem_rbs_collection/activestorage/7.0/lib/engine.rbs
|
60
|
+
# which for some reason does not get included
|
61
|
+
include ::ActiveStorage::Attached::Model
|
62
|
+
extend ::ActiveStorage::Attached::Model::ClassMethods
|
63
|
+
include ::ActiveStorage::Reflection::ActiveRecordExtensions
|
47
64
|
|
48
|
-
|
65
|
+
class << self
|
66
|
+
# included in ActiveRecordExtensions
|
67
|
+
# @return [Hash{String => ActiveStorage::Reflection::HasOneAttachedReflection, ActiveStorage::Reflection::HasManyAttachedReflection}]
|
68
|
+
attr_accessor :attachment_reflections
|
49
69
|
end
|
70
|
+
|
71
|
+
extend ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods
|
72
|
+
|
73
|
+
def self.set_callback; end
|
74
|
+
|
75
|
+
# @return [:activerecord]
|
76
|
+
def self.i18n_scope; end
|
77
|
+
|
78
|
+
# @return [self]
|
79
|
+
def reload(); end
|
50
80
|
end
|
51
81
|
|
52
82
|
module ActiveRecord::Validations
|
53
83
|
# @return [Boolean]
|
54
|
-
def validate; end
|
84
|
+
def validate(); end
|
55
85
|
end
|
56
86
|
|
57
87
|
# @!override ActiveRecord::Batches#find_each
|
@@ -0,0 +1,113 @@
|
|
1
|
+
module ActiveStorage
|
2
|
+
# Provides the class-level DSL for declaring an Active Record model's attachments.
|
3
|
+
module Attached
|
4
|
+
module Model
|
5
|
+
# NOTE: the below would normally be in a ClassMethods module -
|
6
|
+
# but Solargraph currently uses yard-activesupport-concern,
|
7
|
+
# which jams the method in as class methods under this module.
|
8
|
+
#
|
9
|
+
# Specifies the relation between a single attachment and the model.
|
10
|
+
#
|
11
|
+
# class User < ApplicationRecord
|
12
|
+
# has_one_attached :avatar
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# There is no column defined on the model side, Active Storage takes
|
16
|
+
# care of the mapping between your records and the attachment.
|
17
|
+
#
|
18
|
+
# To avoid N+1 queries, you can include the attached blobs in your query like so:
|
19
|
+
#
|
20
|
+
# User.with_attached_avatar
|
21
|
+
#
|
22
|
+
# Under the covers, this relationship is implemented as a +has_one+ association to a
|
23
|
+
# ActiveStorage::Attachment record and a +has_one-through+ association to a
|
24
|
+
# ActiveStorage::Blob record. These associations are available as +avatar_attachment+
|
25
|
+
# and +avatar_blob+. But you shouldn't need to work with these associations directly in
|
26
|
+
# most circumstances.
|
27
|
+
#
|
28
|
+
# The system has been designed to having you go through the ActiveStorage::Attached::One
|
29
|
+
# proxy that provides the dynamic proxy to the associations and factory methods, like +attach+.
|
30
|
+
#
|
31
|
+
# If the +:dependent+ option isn't set, the attachment will be purged
|
32
|
+
# (i.e. destroyed) whenever the record is destroyed.
|
33
|
+
#
|
34
|
+
# If you need the attachment to use a service which differs from the globally configured one,
|
35
|
+
# pass the +:service+ option. For instance:
|
36
|
+
#
|
37
|
+
# class User < ActiveRecord::Base
|
38
|
+
# has_one_attached :avatar, service: :s3
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# If you need to enable +strict_loading+ to prevent lazy loading of attachment,
|
42
|
+
# pass the +:strict_loading+ option. You can do:
|
43
|
+
#
|
44
|
+
# class User < ApplicationRecord
|
45
|
+
# has_one_attached :avatar, strict_loading: true
|
46
|
+
# end
|
47
|
+
#
|
48
|
+
|
49
|
+
# @param name [String, Symbol]
|
50
|
+
# @param dependent [Symbol] the action to take on the attachment when the record is destroyed
|
51
|
+
# @param strict_loading [Boolean]
|
52
|
+
# @param service [String, Symbol, nil] the service to use for the attachment
|
53
|
+
# @return [void]
|
54
|
+
def self.has_one_attached(name, dependent: :default, service: nil, strict_loading: false); end
|
55
|
+
|
56
|
+
# Specifies the relation between multiple attachments and the model.
|
57
|
+
#
|
58
|
+
# class Gallery < ApplicationRecord
|
59
|
+
# has_many_attached :photos
|
60
|
+
# end
|
61
|
+
#
|
62
|
+
# There are no columns defined on the model side, Active Storage takes
|
63
|
+
# care of the mapping between your records and the attachments.
|
64
|
+
#
|
65
|
+
# To avoid N+1 queries, you can include the attached blobs in your query like so:
|
66
|
+
#
|
67
|
+
# Gallery.where(user: Current.user).with_attached_photos
|
68
|
+
#
|
69
|
+
# Under the covers, this relationship is implemented as a +has_many+ association to a
|
70
|
+
# ActiveStorage::Attachment record and a +has_many-through+ association to a
|
71
|
+
# ActiveStorage::Blob record. These associations are available as +photos_attachments+
|
72
|
+
# and +photos_blobs+. But you shouldn't need to work with these associations directly in
|
73
|
+
# most circumstances.
|
74
|
+
#
|
75
|
+
# The system has been designed to having you go through the ActiveStorage::Attached::Many
|
76
|
+
# proxy that provides the dynamic proxy to the associations and factory methods, like +#attach+.
|
77
|
+
#
|
78
|
+
# If the +:dependent+ option isn't set, all the attachments will be purged
|
79
|
+
# (i.e. destroyed) whenever the record is destroyed.
|
80
|
+
#
|
81
|
+
# If you need the attachment to use a service which differs from the globally configured one,
|
82
|
+
# pass the +:service+ option. For instance:
|
83
|
+
#
|
84
|
+
# class Gallery < ActiveRecord::Base
|
85
|
+
# has_many_attached :photos, service: :s3
|
86
|
+
# end
|
87
|
+
#
|
88
|
+
# If you need to enable +strict_loading+ to prevent lazy loading of attachments,
|
89
|
+
# pass the +:strict_loading+ option. You can do:
|
90
|
+
#
|
91
|
+
# class Gallery < ApplicationRecord
|
92
|
+
# has_many_attached :photos, strict_loading: true
|
93
|
+
# end
|
94
|
+
#
|
95
|
+
# @param name [String, Symbol]
|
96
|
+
# @param dependent [Symbol] the action to take on the attachment when the record is destroyed
|
97
|
+
# @param strict_loading [Boolean]
|
98
|
+
# @param service [String, Symbol, nil] the service to use for the attachment
|
99
|
+
# @return [void]
|
100
|
+
def self.has_many_attached(name, dependent: :default, service: nil, strict_loading: false); end
|
101
|
+
|
102
|
+
# @return [void]
|
103
|
+
def self.attachment_changes(); end
|
104
|
+
|
105
|
+
# @return [Boolean]
|
106
|
+
def self.changed_for_autosave?; end
|
107
|
+
|
108
|
+
# @param lock [BasicObject]
|
109
|
+
# @return [self]
|
110
|
+
def self.reload(lock = false); end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -23,9 +23,17 @@ class Date
|
|
23
23
|
|
24
24
|
# @return [::Time]
|
25
25
|
def to_time; end
|
26
|
+
|
27
|
+
# @param format [Symbol]
|
28
|
+
# @return [String]
|
29
|
+
def to_formatted_s(format = :some_default); end
|
26
30
|
end
|
27
31
|
|
28
32
|
class DateTime
|
29
33
|
# @return [String]
|
30
34
|
def readable_inspect; end
|
35
|
+
|
36
|
+
# @param format [Symbol]
|
37
|
+
# @return [String]
|
38
|
+
def to_formatted_s(format = :some_default); end
|
31
39
|
end
|
data/solargraph-rails.gemspec
CHANGED
@@ -11,12 +11,6 @@ solargraph_version =
|
|
11
11
|
[
|
12
12
|
# below this isn't tested in CI
|
13
13
|
'>= 0.48.0',
|
14
|
-
# did not have support for global conventions
|
15
|
-
'!=0.53.0', '!=0.53.1', '!=0.53.2', '!=0.53.3', '!=0.53.4',
|
16
|
-
# did not have support for global conventions
|
17
|
-
'!=0.54.0', '!=0.54.1', '!=0.54.2', '!=0.54.3', '!=0.54.4', '!=0.54.5',
|
18
|
-
# did not have support for global conventions
|
19
|
-
'!=0.55.0', '!=0.55.1', '!=0.55.2', '!=0.55.3', '!=0.55.4', '!=0.55.5', '!=0.55.6', '!=0.55.7',
|
20
14
|
# above this hasn't been tested
|
21
15
|
'< 0.57'
|
22
16
|
]
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solargraph-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fritz Meissner
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-
|
10
|
+
date: 2025-08-28 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: bundler
|
@@ -98,16 +97,22 @@ dependencies:
|
|
98
97
|
name: solargraph
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
100
99
|
requirements:
|
101
|
-
- -
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 0.48.0
|
103
|
+
- - "<"
|
102
104
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
105
|
+
version: '0.57'
|
104
106
|
type: :runtime
|
105
107
|
prerelease: false
|
106
108
|
version_requirements: !ruby/object:Gem::Requirement
|
107
109
|
requirements:
|
108
|
-
- -
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 0.48.0
|
113
|
+
- - "<"
|
109
114
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
115
|
+
version: '0.57'
|
111
116
|
- !ruby/object:Gem::Dependency
|
112
117
|
name: activesupport
|
113
118
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,9 +136,8 @@ extensions: []
|
|
131
136
|
extra_rdoc_files: []
|
132
137
|
files:
|
133
138
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
134
|
-
- ".github/workflows/
|
135
|
-
- ".github/workflows/
|
136
|
-
- ".github/workflows/ruby.yml"
|
139
|
+
- ".github/workflows/linter.yml"
|
140
|
+
- ".github/workflows/test.yml"
|
137
141
|
- ".github/workflows/typecheck.yml"
|
138
142
|
- ".gitignore"
|
139
143
|
- ".overcommit.yml"
|
@@ -162,8 +166,11 @@ files:
|
|
162
166
|
- lib/solargraph/rails/annotations/action_controller.rb
|
163
167
|
- lib/solargraph/rails/annotations/action_dispatch.rb
|
164
168
|
- lib/solargraph/rails/annotations/action_mailer.rb
|
169
|
+
- lib/solargraph/rails/annotations/action_text.rb
|
170
|
+
- lib/solargraph/rails/annotations/active_job.rb
|
165
171
|
- lib/solargraph/rails/annotations/active_model.rb
|
166
172
|
- lib/solargraph/rails/annotations/active_record.rb
|
173
|
+
- lib/solargraph/rails/annotations/active_storage.rb
|
167
174
|
- lib/solargraph/rails/annotations/active_support.rb
|
168
175
|
- lib/solargraph/rails/annotations/array.rb
|
169
176
|
- lib/solargraph/rails/annotations/class.rb
|
@@ -190,7 +197,6 @@ homepage: https://github.com/iftheshoefritz/solargraph-rails
|
|
190
197
|
licenses:
|
191
198
|
- MIT
|
192
199
|
metadata: {}
|
193
|
-
post_install_message:
|
194
200
|
rdoc_options: []
|
195
201
|
require_paths:
|
196
202
|
- lib
|
@@ -205,8 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
211
|
- !ruby/object:Gem::Version
|
206
212
|
version: '0'
|
207
213
|
requirements: []
|
208
|
-
rubygems_version: 3.
|
209
|
-
signing_key:
|
214
|
+
rubygems_version: 3.6.6
|
210
215
|
specification_version: 4
|
211
216
|
summary: Solargraph plugin that adds Rails-specific code through a Convention
|
212
217
|
test_files: []
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# npm install -g act
|
2
|
-
# act pull_release -j 'runner / rubocop'
|
3
|
-
---
|
4
|
-
name: reviewdog
|
5
|
-
on:
|
6
|
-
pull_request:
|
7
|
-
permissions:
|
8
|
-
contents: read
|
9
|
-
pull-requests: write
|
10
|
-
jobs:
|
11
|
-
rubocop:
|
12
|
-
name: runner / rubocop
|
13
|
-
runs-on: ubuntu-latest
|
14
|
-
env:
|
15
|
-
BUNDLE_ONLY: rubocop
|
16
|
-
steps:
|
17
|
-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
18
|
-
- uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0
|
19
|
-
with:
|
20
|
-
ruby-version: '3.3'
|
21
|
-
bundler-cache: true
|
22
|
-
- uses: reviewdog/action-rubocop@fcb74ba274da10b18d038d0bcddaae3518739634 # v2.21.2
|
23
|
-
with:
|
24
|
-
reporter: github-pr-review # Default is github-pr-check
|
25
|
-
skip_install: true
|
26
|
-
use_bundler: true
|
27
|
-
rubocop_extensions: 'rubocop-performance:gemfile rubocop-rspec:gemfile rubocop-rake:gemfile'
|
28
|
-
fail_on_error: true
|
29
|
-
fail_level: info
|
30
|
-
rubocop_version: Gemfile
|
31
|
-
level: info
|