shimmer 0.0.27 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/.rubocop.yml +7 -0
- data/.ruby-version +1 -1
- data/.vscode/settings.json +7 -4
- data/Gemfile +42 -0
- data/Gemfile.lock +346 -34
- data/Guardfile +12 -0
- data/README.md +24 -0
- data/Rakefile +1 -1
- data/bin/_guard-core +27 -0
- data/bin/dev +2 -0
- data/bin/guard +27 -0
- data/bin/rake +27 -0
- data/bin/rspec +27 -0
- data/bin/setup +3 -0
- data/config/rubocop_base.yml +32 -14
- data/config/rubocop_extensions/graphql.yml +68 -0
- data/config/rubocop_extensions/rails.yml +34 -0
- data/config/rubocop_extensions/rspec.yml +208 -0
- data/gemfiles/Gemfile-rails-7-0 +48 -0
- data/lib/shimmer/auth/apple_provider.rb +1 -1
- data/lib/shimmer/form/builder.rb +1 -1
- data/lib/shimmer/utils/config.rb +9 -3
- data/lib/shimmer/utils/remote_navigation.rb +16 -4
- data/lib/shimmer/version.rb +1 -1
- metadata +15 -102
data/config/rubocop_base.yml
CHANGED
@@ -1,15 +1,11 @@
|
|
1
|
+
# Most of those cops are documented here:
|
2
|
+
# https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style
|
3
|
+
#
|
1
4
|
AllCops:
|
2
5
|
NewCops: disable
|
3
|
-
Exclude:
|
4
|
-
- '**/vendor/bundle/**/*'
|
5
|
-
- '**/bin/**/*'
|
6
|
-
- '**/db/schema.rb'
|
7
|
-
- '**/node_modules/**/*'
|
8
6
|
|
9
7
|
require:
|
10
|
-
- standard
|
11
|
-
- rubocop-rails
|
12
|
-
- rubocop-rake
|
8
|
+
- standard # https://github.com/standardrb/standard
|
13
9
|
|
14
10
|
inherit_gem:
|
15
11
|
standard: config/base.yml
|
@@ -23,10 +19,32 @@ Style/MutableConstant:
|
|
23
19
|
Enabled: true
|
24
20
|
EnforcedStyle: strict
|
25
21
|
|
26
|
-
#
|
27
|
-
|
28
|
-
Enabled:
|
22
|
+
# Pass &:method_name as an argument to index_by instead of a block.
|
23
|
+
Style/SymbolProc:
|
24
|
+
Enabled: true
|
25
|
+
|
26
|
+
# Prefer `[:foo, :bar]` to `%i[foo bar]`.
|
27
|
+
Style/SymbolArray:
|
28
|
+
Enabled: true
|
29
|
+
EnforcedStyle: brackets
|
30
|
+
|
31
|
+
# Prefer `["foo", "bar"]` to `%w[foo bar]`.
|
32
|
+
Style/WordArray:
|
33
|
+
Enabled: true
|
34
|
+
EnforcedStyle: brackets
|
35
|
+
|
36
|
+
# <% if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.1") %>
|
37
|
+
Style/HashSyntax:
|
38
|
+
Enabled: true
|
39
|
+
EnforcedShorthandSyntax: always
|
40
|
+
# <% end %>
|
29
41
|
|
30
|
-
#
|
31
|
-
|
32
|
-
|
42
|
+
# Keep at the end of the file (after the individual cops configuration),
|
43
|
+
# otherwise, those cops are not configured properly.
|
44
|
+
inherit_from:
|
45
|
+
# <% Dir["#{File.expand_path(__dir__)}/rubocop_extensions/*.yml"].each do |filename| %>
|
46
|
+
# <% gem_name = filename.delete_suffix(".yml").delete_prefix("#{File.expand_path(__dir__)}/rubocop_extensions/") %>
|
47
|
+
# <% if Gem.loaded_specs.key?(gem_name) %>
|
48
|
+
- rubocop_extensions/<%= gem_name %>.yml
|
49
|
+
# <% end # if Gem.loaded_specs.key? %>
|
50
|
+
# <% end # Dir.foreach %>
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Documentation on the rules can be found here:
|
2
|
+
# https://github.com/DmitryTsepelev/rubocop-graphql/tree/master/lib/rubocop/cop/graphql
|
3
|
+
#
|
4
|
+
require:
|
5
|
+
- rubocop-graphql
|
6
|
+
|
7
|
+
GraphQL:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
# Keep mutation file ordered.
|
11
|
+
GraphQL/OrderedFields:
|
12
|
+
Enabled: true
|
13
|
+
Exclude:
|
14
|
+
- "*"
|
15
|
+
Include:
|
16
|
+
- '**/mutation_type.rb'
|
17
|
+
|
18
|
+
# Ensures snake case of argument name.
|
19
|
+
GraphQL/ArgumentName:
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
# Detects duplicate argument definitions.
|
23
|
+
GraphQL/ArgumentUniqueness:
|
24
|
+
Enabled: true
|
25
|
+
|
26
|
+
# Prevents defining unnecessary resolver methods in cases when `:hash_key` option can be used.
|
27
|
+
GraphQL/FieldHashKey:
|
28
|
+
Enabled: true
|
29
|
+
|
30
|
+
# Prevents defining unnecessary resolver methods in cases when `:method option` can be used.
|
31
|
+
GraphQL/FieldMethod:
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
# Ensures snake case of field name.
|
35
|
+
GraphQL/FieldName:
|
36
|
+
Enabled: true
|
37
|
+
|
38
|
+
# Detects duplicate field definitions within the same type.
|
39
|
+
GraphQL/FieldUniqueness:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
# Ensures type definitions are class-based (no longer legacy).
|
43
|
+
GraphQL/LegacyDsl:
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
# Ensures fields with multiple definitions are grouped together
|
47
|
+
GraphQL/MultipleFieldDefinitions:
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
# Forces `Relay::Node` implementations to expose an `authorized?` method.
|
51
|
+
GraphQL/NotAuthorizedNodeType:
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
# Checks for has an unnecessary argument camelize.
|
55
|
+
GraphQL/UnnecessaryArgumentCamelize:
|
56
|
+
Enabled: true
|
57
|
+
|
58
|
+
# Prevents defining an unnecessary `alias`, `method`, or `resolver_method` arguements to fields.
|
59
|
+
GraphQL/UnnecessaryFieldAlias:
|
60
|
+
Enabled: true
|
61
|
+
|
62
|
+
# Checks for has an unnecessary field camelize.
|
63
|
+
GraphQL/UnnecessaryFieldCamelize:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
# Arguments should either be listed explicitly or `**rest` should be in the resolve signature.
|
67
|
+
GraphQL/UnusedArgument:
|
68
|
+
Enabled: true
|
@@ -0,0 +1,34 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- '**/vendor/bundle/**/*'
|
4
|
+
- '**/db/schema.rb'
|
5
|
+
|
6
|
+
require:
|
7
|
+
- rubocop-rails
|
8
|
+
|
9
|
+
Rails:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
# Prefer :bad_request over 400 to define HTTP status code.
|
13
|
+
Rails/HttpStatus:
|
14
|
+
Enabled: true
|
15
|
+
|
16
|
+
# Prefer index_by over map { ... }.to_h.
|
17
|
+
Rails/IndexBy:
|
18
|
+
Enabled: true
|
19
|
+
|
20
|
+
# Prefer index_with over each_with_object.
|
21
|
+
Rails/IndexWith:
|
22
|
+
Enabled: true
|
23
|
+
|
24
|
+
# Specify a :dependent option. (https://rails.rubystyle.guide#has_many-has_one-dependent-option)
|
25
|
+
Rails/HasManyOrHasOneDependent:
|
26
|
+
Enabled: true
|
27
|
+
|
28
|
+
# Specify an :inverse_of option.
|
29
|
+
Rails/InverseOf:
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
# Specifying the default value for foreign_key is redundant.
|
33
|
+
Rails/RedundantForeignKey:
|
34
|
+
Enabled: true
|
@@ -0,0 +1,208 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rspec
|
3
|
+
|
4
|
+
RSpec:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
# Check that instances are not being stubbed globally.
|
8
|
+
# Prefer instance doubles over stubbing any instance of a class.
|
9
|
+
RSpec/AnyInstance:
|
10
|
+
Enabled: true
|
11
|
+
|
12
|
+
# Checks that around blocks actually run the test.
|
13
|
+
# Would be a shame if the test would be green simply because it is not called.
|
14
|
+
RSpec/AroundBlock:
|
15
|
+
Enabled: true
|
16
|
+
|
17
|
+
# Be what? Not nil? Present? Truthy?
|
18
|
+
RSpec/Be:
|
19
|
+
Enabled: true
|
20
|
+
|
21
|
+
# The be matcher compares by identity while the eq matcher compares using ==.
|
22
|
+
# Booleans and nil can be compared by identity and therefore the be matcher is
|
23
|
+
# preferable as it is a more strict test.
|
24
|
+
RSpec/BeEq:
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
# The be matcher compares by identity while the eq matcher compares using ==.
|
28
|
+
# Booleans and nil can be compared by identity and therefore the be matcher is
|
29
|
+
# preferable as it is a more strict test.
|
30
|
+
RSpec/BeEql:
|
31
|
+
Enabled: true
|
32
|
+
|
33
|
+
# Prefer `.to be_nil` to `.to be(nil)`.
|
34
|
+
RSpec/BeNil:
|
35
|
+
Enabled: true
|
36
|
+
|
37
|
+
# Avoid `before(:all)`, prefer `before(:each)` within a group.
|
38
|
+
RSpec/BeforeAfterAll:
|
39
|
+
Enabled: true
|
40
|
+
|
41
|
+
# Avoid `.to change(...).by(0)`, prefer `not_to change` and `.to not_change` (for composite).
|
42
|
+
RSpec/ChangeByZero:
|
43
|
+
Enabled: true
|
44
|
+
|
45
|
+
# Expect expectations in all tests.
|
46
|
+
# If it's just expecting it to not raise, wrap it in `expect do ... end.not_to raise`.
|
47
|
+
RSpec/EmptyExampleGroup:
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
# Don't allow empty hooks.
|
51
|
+
RSpec/EmptyHook:
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
# Separate groups.
|
55
|
+
RSpec/EmptyLineAfterExampleGroup:
|
56
|
+
Enabled: true
|
57
|
+
|
58
|
+
# Separate `let`s from tests.
|
59
|
+
RSpec/EmptyLineAfterFinalLet:
|
60
|
+
Enabled: true
|
61
|
+
|
62
|
+
# Separate hooks from tests.
|
63
|
+
RSpec/EmptyLineAfterHook:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
# Don't allow specs without description.
|
67
|
+
RSpec/ExampleWithoutDescription:
|
68
|
+
Enabled: true
|
69
|
+
|
70
|
+
# Checks for common mistakes in example descriptions.
|
71
|
+
RSpec/ExampleWording:
|
72
|
+
Enabled: true
|
73
|
+
|
74
|
+
# Trim descriptions.
|
75
|
+
RSpec/ExcessiveDocstringSpacing:
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
# Do stdout expectations right.
|
79
|
+
RSpec/ExpectOutput:
|
80
|
+
Enabled: true
|
81
|
+
|
82
|
+
# Enforces spec file naming convention.
|
83
|
+
RSpec/FilePath:
|
84
|
+
Enabled: true
|
85
|
+
|
86
|
+
# Don't forget focussed tests (expecially useful for the CI to fail).
|
87
|
+
RSpec/Focus:
|
88
|
+
Enabled: true
|
89
|
+
AutoCorrect: false
|
90
|
+
|
91
|
+
# Checks for before/around/after hooks that come after an example.
|
92
|
+
RSpec/HooksBeforeExamples:
|
93
|
+
Enabled: true
|
94
|
+
|
95
|
+
# Don't expect something to be itself.
|
96
|
+
RSpec/IdenticalEqualityAssertion:
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
# Explicitly declare `it` blocks.
|
100
|
+
RSpec/ImplicitBlockExpectation:
|
101
|
+
Enabled: true
|
102
|
+
|
103
|
+
# Prevent instance variable usage in specs.
|
104
|
+
RSpec/InstanceVariable:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
# Check that all matcher is used instead of iterating over an array.
|
108
|
+
RSpec/IteratedExpectation:
|
109
|
+
Enabled: true
|
110
|
+
|
111
|
+
# Checks that no class, module, or constant is declared.
|
112
|
+
# Constants, including classes and modules, when declared in a block scope,
|
113
|
+
# are defined in global namespace, and leak between examples.
|
114
|
+
# Prevents class re-opening, leading to unpredictable side effects.
|
115
|
+
RSpec/LeakyConstantDeclaration:
|
116
|
+
Enabled: true
|
117
|
+
|
118
|
+
# Force `let`s to be before tests.
|
119
|
+
RSpec/LetBeforeExamples:
|
120
|
+
Enabled: true
|
121
|
+
|
122
|
+
# Force groups to have descriptions or symbol.
|
123
|
+
RSpec/MissingExampleGroupArgument:
|
124
|
+
Enabled: true
|
125
|
+
|
126
|
+
# Files should have only one root `describe` block.
|
127
|
+
RSpec/MultipleDescribes:
|
128
|
+
Enabled: true
|
129
|
+
|
130
|
+
# Checks if an example group defines subject multiple times.
|
131
|
+
RSpec/MultipleSubjects:
|
132
|
+
Enabled: true
|
133
|
+
|
134
|
+
# Checks if an example contains any expectation.
|
135
|
+
RSpec/NoExpectationExample:
|
136
|
+
Enabled: false # considered, but gives false positives when expectations are inside of a re-used function
|
137
|
+
|
138
|
+
# Prefer `expect(...).not_to` to `expect(...).to_not`.
|
139
|
+
RSpec/NotToNot:
|
140
|
+
Enabled: true
|
141
|
+
|
142
|
+
# Prevent setting the same `let` block more than once.
|
143
|
+
RSpec/OverwritingSetup:
|
144
|
+
Enabled: true
|
145
|
+
|
146
|
+
# Prevent useless `around` hooks.
|
147
|
+
RSpec/RedundantAround:
|
148
|
+
Enabled: true
|
149
|
+
|
150
|
+
# Prevent duplicate description.
|
151
|
+
RSpec/RepeatedDescription:
|
152
|
+
Enabled: true
|
153
|
+
|
154
|
+
# Prevent duplicate example (test).
|
155
|
+
RSpec/RepeatedExample:
|
156
|
+
Enabled: true
|
157
|
+
|
158
|
+
# Detects duplicate in example group body.
|
159
|
+
RSpec/RepeatedExampleGroupBody:
|
160
|
+
Enabled: true
|
161
|
+
|
162
|
+
# Detects duplicate in example group description.
|
163
|
+
RSpec/RepeatedExampleGroupDescription:
|
164
|
+
Enabled: true
|
165
|
+
|
166
|
+
# Check for repeated include of shared examples.
|
167
|
+
RSpec/RepeatedIncludeExample:
|
168
|
+
Enabled: true
|
169
|
+
|
170
|
+
# Keep `let` blocks together.
|
171
|
+
RSpec/ScatteredLet:
|
172
|
+
Enabled: true
|
173
|
+
|
174
|
+
# Keep `setup` blocks (ex: group `before`) together.
|
175
|
+
RSpec/ScatteredSetup:
|
176
|
+
Enabled: true
|
177
|
+
|
178
|
+
# Checks for proper shared_context and shared_examples usage.
|
179
|
+
RSpec/SharedContext:
|
180
|
+
Enabled: true
|
181
|
+
|
182
|
+
# Enforces use of string to titleize shared examples.
|
183
|
+
RSpec/SharedExamples:
|
184
|
+
Enabled: true
|
185
|
+
|
186
|
+
# Checks that chains of messages contain more than one element.
|
187
|
+
RSpec/SingleArgumentMessageChain:
|
188
|
+
Enabled: true
|
189
|
+
|
190
|
+
# Skip either the whole example of not at all.
|
191
|
+
RSpec/SkipBlockInsideExample:
|
192
|
+
Enabled: true
|
193
|
+
|
194
|
+
# Be specific about what exception/error is expected.
|
195
|
+
RSpec/UnspecifiedException:
|
196
|
+
Enabled: true
|
197
|
+
|
198
|
+
# Use symbols for `let` and `subject` names.
|
199
|
+
RSpec/VariableDefinition:
|
200
|
+
Enabled: true
|
201
|
+
|
202
|
+
# Avoid empty expectation.
|
203
|
+
RSpec/VoidExpect:
|
204
|
+
Enabled: true
|
205
|
+
|
206
|
+
# Use proper `yield` stub syntax.
|
207
|
+
RSpec/Yield:
|
208
|
+
Enabled: true
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in shimmer.gemspec
|
6
|
+
gemspec path: ".."
|
7
|
+
|
8
|
+
gem "rails", "~> 7.0.0"
|
9
|
+
gem "propshaft"
|
10
|
+
gem "sqlite3"
|
11
|
+
gem "puma"
|
12
|
+
gem "jsbundling-rails"
|
13
|
+
gem "turbo-rails"
|
14
|
+
gem "stimulus-rails"
|
15
|
+
gem "cssbundling-rails"
|
16
|
+
gem "jbuilder"
|
17
|
+
gem "bootsnap", require: false
|
18
|
+
gem "dotenv"
|
19
|
+
gem "slim-rails"
|
20
|
+
gem "awesome_print"
|
21
|
+
gem "dotenv-rails"
|
22
|
+
|
23
|
+
group :development, :test do
|
24
|
+
gem "debug", platforms: %i[mri mingw x64_mingw]
|
25
|
+
gem "rake"
|
26
|
+
gem "rspec-rails"
|
27
|
+
gem "rspec-retry"
|
28
|
+
gem "pry"
|
29
|
+
gem "pry-rails"
|
30
|
+
gem "pry-byebug"
|
31
|
+
gem "pry-doc"
|
32
|
+
gem "guard"
|
33
|
+
gem "guard-rspec"
|
34
|
+
gem "capybara"
|
35
|
+
gem "rack_session_access"
|
36
|
+
gem "cuprite"
|
37
|
+
gem "standard"
|
38
|
+
gem "rubocop"
|
39
|
+
gem "rubocop-rails"
|
40
|
+
gem "rubocop-performance"
|
41
|
+
gem "rubocop-rspec"
|
42
|
+
gem "rubocop-rake"
|
43
|
+
end
|
44
|
+
|
45
|
+
group :development do
|
46
|
+
gem "web-console"
|
47
|
+
gem "annotate"
|
48
|
+
end
|
@@ -10,7 +10,7 @@ module Shimmer
|
|
10
10
|
def request_details(params)
|
11
11
|
name = params[:user] ? JSON.parse(params[:user])["name"] : {}
|
12
12
|
headers = {
|
13
|
-
|
13
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
14
14
|
}
|
15
15
|
form = {
|
16
16
|
grant_type: "authorization_code",
|
data/lib/shimmer/form/builder.rb
CHANGED
@@ -72,7 +72,7 @@ module Shimmer
|
|
72
72
|
classes << "input--error"
|
73
73
|
errors = safe_join(object.errors[method].map { |e| content_tag :div, e, class: "input__error" })
|
74
74
|
end
|
75
|
-
label = label == false ? nil : self.label(label_method || method, label, class: "input__label")
|
75
|
+
label = (label == false) ? nil : self.label(label_method || method, label, class: "input__label")
|
76
76
|
description = description.presence ? content_tag(:div, description, class: "input__description") : nil
|
77
77
|
content_tag(:div, safe_join([label, content, description, errors, extra].compact), class: ["input"] + classes, **options)
|
78
78
|
end
|
data/lib/shimmer/utils/config.rb
CHANGED
@@ -3,16 +3,22 @@
|
|
3
3
|
module Shimmer
|
4
4
|
class Config
|
5
5
|
include Singleton
|
6
|
+
|
6
7
|
class MissingConfigError < StandardError; end
|
7
8
|
|
8
|
-
def method_missing(method_name)
|
9
|
+
def method_missing(method_name, **options)
|
10
|
+
default_provided = options.key?(:default)
|
11
|
+
default_value = options.delete(:default) if default_provided
|
12
|
+
raise ArgumentError, "unknown option#{"s" if options.length > 1}: #{options.keys.join(", ")}." if options.any?
|
13
|
+
|
9
14
|
method_name = method_name.to_s
|
10
15
|
type = :string
|
11
16
|
key = method_name.delete_suffix("!").delete_suffix("?")
|
12
17
|
required = method_name.end_with?("!")
|
13
18
|
type = :bool if method_name.end_with?("?")
|
14
19
|
value = ENV[key.upcase].presence
|
15
|
-
value ||= Rails.application.credentials.
|
20
|
+
value ||= Rails.application.credentials.public_send(key)
|
21
|
+
value = default_value if value.nil?
|
16
22
|
raise MissingConfigError, "#{key.upcase} environment value is missing" if required && value.blank?
|
17
23
|
|
18
24
|
coerce value, type
|
@@ -25,7 +31,7 @@ module Shimmer
|
|
25
31
|
private
|
26
32
|
|
27
33
|
def coerce(value, type)
|
28
|
-
return !value.in?(["n", "0", "no", "false"]) if type == :bool && value.is_a?(String)
|
34
|
+
return !value.downcase.in?(["n", "0", "no", "false"]) if type == :bool && value.is_a?(String)
|
29
35
|
|
30
36
|
value
|
31
37
|
end
|
@@ -69,22 +69,34 @@ module Shimmer
|
|
69
69
|
queued_updates.push turbo_stream.append "shimmer", "<div class='hidden' data-controller='remote-navigation'>#{script}</div>"
|
70
70
|
end
|
71
71
|
|
72
|
-
def
|
73
|
-
queued_updates.push turbo_stream.
|
72
|
+
def append(id, with:, **locals)
|
73
|
+
queued_updates.push turbo_stream.append(id, partial: with, locals: locals)
|
74
74
|
end
|
75
75
|
|
76
76
|
def prepend(id, with:, **locals)
|
77
77
|
queued_updates.push turbo_stream.prepend(id, partial: with, locals: locals)
|
78
78
|
end
|
79
79
|
|
80
|
-
def
|
81
|
-
queued_updates.push turbo_stream.
|
80
|
+
def replace(id, with: id, **locals)
|
81
|
+
queued_updates.push turbo_stream.replace(id, partial: with, locals: locals)
|
82
|
+
end
|
83
|
+
|
84
|
+
def update(id, with: id, **locals)
|
85
|
+
queued_updates.push turbo_stream.update(id, partial: with, locals: locals)
|
82
86
|
end
|
83
87
|
|
84
88
|
def remove(id)
|
85
89
|
queued_updates.push turbo_stream.remove(id)
|
86
90
|
end
|
87
91
|
|
92
|
+
def insert_before(id, with:, **locals)
|
93
|
+
queued_updates.push turbo_stream.before(id, partial: with, locals: locals)
|
94
|
+
end
|
95
|
+
|
96
|
+
def insert_after(id, with:, **locals)
|
97
|
+
queued_updates.push turbo_stream.after(id, partial: with, locals: locals)
|
98
|
+
end
|
99
|
+
|
88
100
|
def open_modal(url, id: nil, size: nil, close: true)
|
89
101
|
run_javascript "ui.modal.open(#{{url: url, id: id, size: size, close: close}.to_json})"
|
90
102
|
end
|
data/lib/shimmer/version.rb
CHANGED
metadata
CHANGED
@@ -1,113 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shimmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Ravens
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rake
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '13.0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '13.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: standardrb
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rubocop
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rubocop-rails
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rubocop-performance
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop-rspec
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop-rake
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
111
13
|
description:
|
112
14
|
email:
|
113
15
|
- jens@nerdgeschoss.de
|
@@ -118,6 +20,7 @@ files:
|
|
118
20
|
- ".editorconfig"
|
119
21
|
- ".eslintrc.js"
|
120
22
|
- ".prettierrc"
|
23
|
+
- ".rspec"
|
121
24
|
- ".rubocop.yml"
|
122
25
|
- ".ruby-version"
|
123
26
|
- ".solargraph.yml"
|
@@ -126,14 +29,24 @@ files:
|
|
126
29
|
- CODE_OF_CONDUCT.md
|
127
30
|
- Gemfile
|
128
31
|
- Gemfile.lock
|
32
|
+
- Guardfile
|
129
33
|
- LICENSE.txt
|
130
34
|
- README.md
|
131
35
|
- Rakefile
|
36
|
+
- bin/_guard-core
|
132
37
|
- bin/console
|
38
|
+
- bin/dev
|
39
|
+
- bin/guard
|
40
|
+
- bin/rake
|
41
|
+
- bin/rspec
|
133
42
|
- bin/rubocop
|
134
43
|
- bin/setup
|
135
44
|
- bin/solargraph
|
136
45
|
- config/rubocop_base.yml
|
46
|
+
- config/rubocop_extensions/graphql.yml
|
47
|
+
- config/rubocop_extensions/rails.yml
|
48
|
+
- config/rubocop_extensions/rspec.yml
|
49
|
+
- gemfiles/Gemfile-rails-7-0
|
137
50
|
- lib/shimmer.rb
|
138
51
|
- lib/shimmer/auth.rb
|
139
52
|
- lib/shimmer/auth/apple_provider.rb
|
@@ -217,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
130
|
- !ruby/object:Gem::Version
|
218
131
|
version: '0'
|
219
132
|
requirements: []
|
220
|
-
rubygems_version: 3.
|
133
|
+
rubygems_version: 3.1.6
|
221
134
|
signing_key:
|
222
135
|
specification_version: 4
|
223
136
|
summary: Shimmer brings all the bells and whistles of a hotwired application, right
|