active_delivery 0.4.4 → 1.0.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +62 -0
- data/LICENSE.txt +19 -17
- data/README.md +595 -33
- data/lib/.rbnext/3.0/abstract_notifier/async_adapters/active_job.rb +27 -0
- data/lib/.rbnext/3.0/active_delivery/base.rb +248 -0
- data/lib/.rbnext/3.0/active_delivery/callbacks.rb +101 -0
- data/lib/.rbnext/3.0/active_delivery/lines/base.rb +89 -0
- data/lib/.rbnext/3.0/active_delivery/lines/mailer.rb +26 -0
- data/lib/.rbnext/3.0/active_delivery/testing.rb +62 -0
- data/lib/.rbnext/3.1/abstract_notifier/base.rb +217 -0
- data/lib/.rbnext/3.1/active_delivery/base.rb +248 -0
- data/lib/.rbnext/3.1/active_delivery/lines/base.rb +89 -0
- data/lib/abstract_notifier/async_adapters/active_job.rb +27 -0
- data/lib/abstract_notifier/async_adapters.rb +16 -0
- data/lib/abstract_notifier/base.rb +217 -0
- data/lib/abstract_notifier/callbacks.rb +94 -0
- data/lib/abstract_notifier/testing/minitest.rb +51 -0
- data/lib/abstract_notifier/testing/rspec.rb +164 -0
- data/lib/abstract_notifier/testing.rb +53 -0
- data/lib/abstract_notifier/version.rb +5 -0
- data/lib/abstract_notifier.rb +75 -0
- data/lib/active_delivery/base.rb +147 -27
- data/lib/active_delivery/callbacks.rb +25 -25
- data/lib/active_delivery/ext/string_constantize.rb +24 -0
- data/lib/active_delivery/lines/base.rb +42 -16
- data/lib/active_delivery/lines/mailer.rb +7 -18
- data/lib/active_delivery/lines/notifier.rb +53 -0
- data/lib/active_delivery/raitie.rb +9 -0
- data/lib/active_delivery/testing/rspec.rb +59 -12
- data/lib/active_delivery/testing.rb +19 -5
- data/lib/active_delivery/version.rb +1 -1
- data/lib/active_delivery.rb +8 -0
- metadata +63 -54
- data/.gem_release.yml +0 -3
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -24
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -24
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -23
- data/.github/workflows/docs-lint.yml +0 -72
- data/.github/workflows/rspec-jruby.yml +0 -35
- data/.github/workflows/rspec.yml +0 -51
- data/.github/workflows/rubocop.yml +0 -21
- data/.gitignore +0 -43
- data/.mdlrc +0 -1
- data/.rspec +0 -2
- data/.rubocop-md.yml +0 -16
- data/.rubocop.yml +0 -28
- data/Gemfile +0 -17
- data/RELEASING.md +0 -43
- data/Rakefile +0 -20
- data/active_delivery.gemspec +0 -35
- data/forspell.dict +0 -8
- data/gemfiles/jruby.gemfile +0 -5
- data/gemfiles/rails42.gemfile +0 -8
- data/gemfiles/rails5.gemfile +0 -5
- data/gemfiles/rails50.gemfile +0 -8
- data/gemfiles/rails6.gemfile +0 -5
- data/gemfiles/railsmaster.gemfile +0 -6
- data/gemfiles/rubocop.gemfile +0 -4
- data/lefthook.yml +0 -18
- data/lib/active_delivery/action_mailer/parameterized.rb +0 -92
@@ -2,12 +2,13 @@
|
|
2
2
|
|
3
3
|
module ActiveDelivery
|
4
4
|
class HaveDeliveredTo < RSpec::Matchers::BuiltIn::BaseMatcher
|
5
|
-
attr_reader :delivery_class, :event, :args, :params, :sync_value
|
5
|
+
attr_reader :delivery_class, :event, :args, :kwargs, :params, :sync_value
|
6
6
|
|
7
|
-
def initialize(delivery_class, event = nil, *args)
|
7
|
+
def initialize(delivery_class, event = nil, *args, **kwargs)
|
8
8
|
@delivery_class = delivery_class
|
9
9
|
@event = event
|
10
10
|
@args = args
|
11
|
+
@kwargs = kwargs
|
11
12
|
set_expected_number(:exactly, 1)
|
12
13
|
end
|
13
14
|
|
@@ -64,17 +65,25 @@ module ActiveDelivery
|
|
64
65
|
actual_deliveries = TestDelivery.store
|
65
66
|
|
66
67
|
@matching_deliveries, @unmatching_deliveries =
|
67
|
-
actual_deliveries.partition do |(delivery,
|
68
|
-
next false unless delivery_class
|
68
|
+
actual_deliveries.partition do |(delivery, options)|
|
69
|
+
next false unless delivery_class == delivery.owner.class
|
69
70
|
|
70
|
-
next false
|
71
|
-
|
71
|
+
next false if !sync_value.nil? && (options.fetch(:sync, false) != sync_value)
|
72
|
+
|
73
|
+
next false unless params.nil? || params === delivery.owner.params
|
74
|
+
|
75
|
+
next false unless event.nil? || event == delivery.notification
|
76
|
+
|
77
|
+
actual_args = delivery.params
|
78
|
+
actual_kwargs = delivery.options
|
72
79
|
|
73
80
|
next false unless args.each.with_index.all? do |arg, i|
|
74
81
|
arg === actual_args[i]
|
75
82
|
end
|
76
83
|
|
77
|
-
next false
|
84
|
+
next false unless kwargs.all? do |k, v|
|
85
|
+
v === actual_kwargs[k]
|
86
|
+
end
|
78
87
|
|
79
88
|
true
|
80
89
|
end
|
@@ -127,7 +136,7 @@ module ActiveDelivery
|
|
127
136
|
end
|
128
137
|
|
129
138
|
def message_expectation_modifier
|
130
|
-
number_modifier = @expected_number == 1 ? "once" : "#{@expected_number} times"
|
139
|
+
number_modifier = (@expected_number == 1) ? "once" : "#{@expected_number} times"
|
131
140
|
case @expectation_type
|
132
141
|
when :exactly then "exactly #{number_modifier}"
|
133
142
|
when :at_most then "at most #{number_modifier}"
|
@@ -145,12 +154,13 @@ module ActiveDelivery
|
|
145
154
|
end
|
146
155
|
|
147
156
|
def deliveries_description(deliveries)
|
148
|
-
deliveries.each.with_object(+"") do |(delivery,
|
149
|
-
msg << "\n :#{
|
157
|
+
deliveries.each.with_object(+"") do |(delivery, options), msg|
|
158
|
+
msg << "\n :#{delivery.notification} via #{delivery.owner.class}" \
|
150
159
|
"#{options[:sync] ? " (sync)" : ""}" \
|
151
160
|
" with:" \
|
152
|
-
"\n - params: #{delivery.params.empty? ? "<none>" : delivery.params.
|
153
|
-
"\n - args: #{
|
161
|
+
"\n - params: #{delivery.owner.params.empty? ? "<none>" : delivery.owner.params.inspect}" \
|
162
|
+
"\n - args: #{delivery.params}" \
|
163
|
+
"\n - kwargs: #{delivery.options}"
|
154
164
|
end
|
155
165
|
end
|
156
166
|
|
@@ -162,6 +172,37 @@ module ActiveDelivery
|
|
162
172
|
end
|
163
173
|
end
|
164
174
|
end
|
175
|
+
|
176
|
+
class DeliverVia < RSpec::Matchers::BuiltIn::BaseMatcher
|
177
|
+
attr_reader :lines
|
178
|
+
|
179
|
+
def initialize(*lines)
|
180
|
+
@actual_lines = []
|
181
|
+
@lines = lines.sort
|
182
|
+
end
|
183
|
+
|
184
|
+
def supports_block_expectations?
|
185
|
+
true
|
186
|
+
end
|
187
|
+
|
188
|
+
def matches?(proc)
|
189
|
+
raise ArgumentError, "deliver_via only supports block expectations" unless Proc === proc
|
190
|
+
|
191
|
+
TestDelivery.lines.clear
|
192
|
+
|
193
|
+
proc.call
|
194
|
+
|
195
|
+
@actual_lines = TestDelivery.lines.sort
|
196
|
+
|
197
|
+
lines == @actual_lines
|
198
|
+
end
|
199
|
+
|
200
|
+
private
|
201
|
+
|
202
|
+
def failure_message
|
203
|
+
"expected to deliver via #{lines.join(", ")} lines, but delivered to #{@actual_lines.any? ? @actual_lines.join(", ") : "none"}"
|
204
|
+
end
|
205
|
+
end
|
165
206
|
end
|
166
207
|
|
167
208
|
RSpec.configure do |config|
|
@@ -170,6 +211,12 @@ RSpec.configure do |config|
|
|
170
211
|
ActiveDelivery::HaveDeliveredTo.new(*args)
|
171
212
|
end
|
172
213
|
end)
|
214
|
+
|
215
|
+
config.include(Module.new do
|
216
|
+
def deliver_via(*args)
|
217
|
+
ActiveDelivery::DeliverVia.new(*args)
|
218
|
+
end
|
219
|
+
end, type: :delivery)
|
173
220
|
end
|
174
221
|
|
175
222
|
RSpec::Matchers.define_negated_matcher :have_not_delivered_to, :have_delivered_to
|
@@ -18,25 +18,39 @@ module ActiveDelivery
|
|
18
18
|
Thread.current.thread_variable_get(:active_delivery_testing) == true
|
19
19
|
end
|
20
20
|
|
21
|
-
def track(delivery,
|
22
|
-
store << [delivery,
|
21
|
+
def track(delivery, options)
|
22
|
+
store << [delivery, options]
|
23
|
+
end
|
24
|
+
|
25
|
+
def track_line(line)
|
26
|
+
lines << line
|
23
27
|
end
|
24
28
|
|
25
29
|
def store
|
26
|
-
|
30
|
+
Thread.current.thread_variable_get(:active_delivery_testing_store) || Thread.current.thread_variable_set(:active_delivery_testing_store, [])
|
31
|
+
end
|
32
|
+
|
33
|
+
def lines
|
34
|
+
Thread.current.thread_variable_get(:active_delivery_testing_lines) || Thread.current.thread_variable_set(:active_delivery_testing_lines, [])
|
27
35
|
end
|
28
36
|
|
29
37
|
def clear
|
30
38
|
store.clear
|
39
|
+
lines.clear
|
31
40
|
end
|
32
41
|
end
|
33
42
|
|
34
|
-
def
|
43
|
+
def perform_notify(delivery, **options)
|
35
44
|
return super unless test?
|
36
|
-
TestDelivery.track(
|
45
|
+
TestDelivery.track(delivery, options)
|
37
46
|
nil
|
38
47
|
end
|
39
48
|
|
49
|
+
def notify_line(line, ...)
|
50
|
+
res = super
|
51
|
+
TestDelivery.track_line(line) if res
|
52
|
+
end
|
53
|
+
|
40
54
|
def test?
|
41
55
|
TestDelivery.enabled?
|
42
56
|
end
|
data/lib/active_delivery.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "ruby-next"
|
4
|
+
require "ruby-next/language/setup"
|
5
|
+
RubyNext::Language.setup_gem_load_path(transpile: true)
|
6
|
+
|
3
7
|
require "active_delivery/version"
|
4
8
|
require "active_delivery/base"
|
5
9
|
require "active_delivery/callbacks" if defined?(ActiveSupport)
|
@@ -7,4 +11,8 @@ require "active_delivery/callbacks" if defined?(ActiveSupport)
|
|
7
11
|
require "active_delivery/lines/base"
|
8
12
|
require "active_delivery/lines/mailer" if defined?(ActionMailer)
|
9
13
|
|
14
|
+
require "active_delivery/raitie" if defined?(::Rails::Railtie)
|
10
15
|
require "active_delivery/testing" if ENV["RACK_ENV"] == "test" || ENV["RAILS_ENV"] == "test"
|
16
|
+
|
17
|
+
require "abstract_notifier"
|
18
|
+
require "active_delivery/lines/notifier"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_delivery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,100 +16,109 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.15'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.15'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.9'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
54
|
+
version: '3.9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec-rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '4.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
|
68
|
+
version: '4.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: ruby-next-core
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.15.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.15.0
|
83
|
+
description: Ruby and Rails framework for managing all types of notifications in one
|
84
|
+
place
|
70
85
|
email:
|
71
|
-
-
|
86
|
+
- Vladimir Dementyev
|
72
87
|
executables: []
|
73
88
|
extensions: []
|
74
89
|
extra_rdoc_files: []
|
75
90
|
files:
|
76
|
-
- ".gem_release.yml"
|
77
|
-
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
78
|
-
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
79
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
80
|
-
- ".github/workflows/docs-lint.yml"
|
81
|
-
- ".github/workflows/rspec-jruby.yml"
|
82
|
-
- ".github/workflows/rspec.yml"
|
83
|
-
- ".github/workflows/rubocop.yml"
|
84
|
-
- ".gitignore"
|
85
|
-
- ".mdlrc"
|
86
|
-
- ".rspec"
|
87
|
-
- ".rubocop-md.yml"
|
88
|
-
- ".rubocop.yml"
|
89
91
|
- CHANGELOG.md
|
90
|
-
- Gemfile
|
91
92
|
- LICENSE.txt
|
92
93
|
- README.md
|
93
|
-
- RELEASING.md
|
94
|
-
- Rakefile
|
95
|
-
- active_delivery.gemspec
|
96
94
|
- bin/console
|
97
95
|
- bin/setup
|
98
|
-
-
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
102
|
-
-
|
103
|
-
-
|
104
|
-
-
|
105
|
-
-
|
106
|
-
-
|
96
|
+
- lib/.rbnext/3.0/abstract_notifier/async_adapters/active_job.rb
|
97
|
+
- lib/.rbnext/3.0/active_delivery/base.rb
|
98
|
+
- lib/.rbnext/3.0/active_delivery/callbacks.rb
|
99
|
+
- lib/.rbnext/3.0/active_delivery/lines/base.rb
|
100
|
+
- lib/.rbnext/3.0/active_delivery/lines/mailer.rb
|
101
|
+
- lib/.rbnext/3.0/active_delivery/testing.rb
|
102
|
+
- lib/.rbnext/3.1/abstract_notifier/base.rb
|
103
|
+
- lib/.rbnext/3.1/active_delivery/base.rb
|
104
|
+
- lib/.rbnext/3.1/active_delivery/lines/base.rb
|
105
|
+
- lib/abstract_notifier.rb
|
106
|
+
- lib/abstract_notifier/async_adapters.rb
|
107
|
+
- lib/abstract_notifier/async_adapters/active_job.rb
|
108
|
+
- lib/abstract_notifier/base.rb
|
109
|
+
- lib/abstract_notifier/callbacks.rb
|
110
|
+
- lib/abstract_notifier/testing.rb
|
111
|
+
- lib/abstract_notifier/testing/minitest.rb
|
112
|
+
- lib/abstract_notifier/testing/rspec.rb
|
113
|
+
- lib/abstract_notifier/version.rb
|
107
114
|
- lib/active_delivery.rb
|
108
|
-
- lib/active_delivery/action_mailer/parameterized.rb
|
109
115
|
- lib/active_delivery/base.rb
|
110
116
|
- lib/active_delivery/callbacks.rb
|
117
|
+
- lib/active_delivery/ext/string_constantize.rb
|
111
118
|
- lib/active_delivery/lines/base.rb
|
112
119
|
- lib/active_delivery/lines/mailer.rb
|
120
|
+
- lib/active_delivery/lines/notifier.rb
|
121
|
+
- lib/active_delivery/raitie.rb
|
113
122
|
- lib/active_delivery/testing.rb
|
114
123
|
- lib/active_delivery/testing/rspec.rb
|
115
124
|
- lib/active_delivery/version.rb
|
@@ -117,12 +126,12 @@ homepage: https://github.com/palkan/active_delivery
|
|
117
126
|
licenses:
|
118
127
|
- MIT
|
119
128
|
metadata:
|
120
|
-
bug_tracker_uri:
|
129
|
+
bug_tracker_uri: https://github.com/palkan/active_delivery/issues
|
121
130
|
changelog_uri: https://github.com/palkan/active_delivery/blob/master/CHANGELOG.md
|
122
|
-
documentation_uri:
|
123
|
-
homepage_uri:
|
124
|
-
source_code_uri:
|
125
|
-
post_install_message:
|
131
|
+
documentation_uri: https://github.com/palkan/active_delivery
|
132
|
+
homepage_uri: https://github.com/palkan/active_delivery
|
133
|
+
source_code_uri: https://github.com/palkan/active_delivery
|
134
|
+
post_install_message:
|
126
135
|
rdoc_options: []
|
127
136
|
require_paths:
|
128
137
|
- lib
|
@@ -130,15 +139,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
139
|
requirements:
|
131
140
|
- - ">="
|
132
141
|
- !ruby/object:Gem::Version
|
133
|
-
version: '2.
|
142
|
+
version: '2.7'
|
134
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
144
|
requirements:
|
136
145
|
- - ">="
|
137
146
|
- !ruby/object:Gem::Version
|
138
147
|
version: '0'
|
139
148
|
requirements: []
|
140
|
-
rubygems_version: 3.
|
141
|
-
signing_key:
|
149
|
+
rubygems_version: 3.4.8
|
150
|
+
signing_key:
|
142
151
|
specification_version: 4
|
143
|
-
summary: Rails framework for managing all types of notifications in one place
|
152
|
+
summary: Ruby and Rails framework for managing all types of notifications in one place
|
144
153
|
test_files: []
|
data/.gem_release.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Bug report
|
3
|
-
about: Create a report to help us improve
|
4
|
-
title: ''
|
5
|
-
labels: ''
|
6
|
-
assignees: palkan
|
7
|
-
|
8
|
-
---
|
9
|
-
|
10
|
-
## What did you do?
|
11
|
-
|
12
|
-
## What did you expect to happen?
|
13
|
-
|
14
|
-
## What actually happened?
|
15
|
-
|
16
|
-
## Additional context
|
17
|
-
|
18
|
-
## Environment
|
19
|
-
|
20
|
-
**Ruby Version:**
|
21
|
-
|
22
|
-
**Framework Version (Rails, whatever):**
|
23
|
-
|
24
|
-
**Active Delivery Version:**
|
@@ -1,24 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Feature request
|
3
|
-
about: Suggest an idea for this project
|
4
|
-
title: ''
|
5
|
-
labels: enhancement
|
6
|
-
assignees: palkan
|
7
|
-
|
8
|
-
---
|
9
|
-
|
10
|
-
## Is your feature request related to a problem? Please describe.
|
11
|
-
|
12
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
13
|
-
|
14
|
-
## Describe the solution you'd like
|
15
|
-
|
16
|
-
A clear and concise description of what you want to happen.
|
17
|
-
|
18
|
-
## Describe alternatives you've considered
|
19
|
-
|
20
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
21
|
-
|
22
|
-
## Additional context
|
23
|
-
|
24
|
-
Add any other context or screenshots about the feature request here.
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
First of all, thanks for contributing!
|
3
|
-
|
4
|
-
If it's a typo fix or minor documentation update feel free to skip the rest of this template!
|
5
|
-
-->
|
6
|
-
|
7
|
-
## What is the purpose of this pull request?
|
8
|
-
|
9
|
-
<!--
|
10
|
-
If it's a bug fix, then link it to the issue, for example:
|
11
|
-
|
12
|
-
Fixes #xxx
|
13
|
-
-->
|
14
|
-
|
15
|
-
## What changes did you make? (overview)
|
16
|
-
|
17
|
-
## Is there anything you'd like reviewers to focus on?
|
18
|
-
|
19
|
-
## Checklist
|
20
|
-
|
21
|
-
- [ ] I've added tests for this change
|
22
|
-
- [ ] I've added a Changelog entry
|
23
|
-
- [ ] I've updated a documentation
|
@@ -1,72 +0,0 @@
|
|
1
|
-
name: Lint Docs
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- master
|
7
|
-
paths:
|
8
|
-
- "*.md"
|
9
|
-
- "**/*.md"
|
10
|
-
pull_request:
|
11
|
-
paths:
|
12
|
-
- "*.md"
|
13
|
-
- "**/*.md"
|
14
|
-
|
15
|
-
jobs:
|
16
|
-
markdownlint:
|
17
|
-
runs-on: ubuntu-latest
|
18
|
-
steps:
|
19
|
-
- uses: actions/checkout@v2
|
20
|
-
- uses: ruby/setup-ruby@v1
|
21
|
-
with:
|
22
|
-
ruby-version: 2.7
|
23
|
-
- name: Run Markdown linter
|
24
|
-
run: |
|
25
|
-
gem install mdl
|
26
|
-
mdl *.md
|
27
|
-
rubocop:
|
28
|
-
runs-on: ubuntu-latest
|
29
|
-
steps:
|
30
|
-
- uses: actions/checkout@v2
|
31
|
-
- uses: ruby/setup-ruby@v1
|
32
|
-
with:
|
33
|
-
ruby-version: 2.7
|
34
|
-
- name: Lint Markdown files with RuboCop
|
35
|
-
run: |
|
36
|
-
gem install bundler
|
37
|
-
bundle install --gemfile gemfiles/rubocop.gemfile --jobs 4 --retry 3
|
38
|
-
bundle exec --gemfile gemfiles/rubocop.gemfile rubocop -c .rubocop-md.yml
|
39
|
-
forspell:
|
40
|
-
runs-on: ubuntu-latest
|
41
|
-
steps:
|
42
|
-
- uses: actions/checkout@v2
|
43
|
-
- name: Install Hunspell
|
44
|
-
run: |
|
45
|
-
sudo apt-get install hunspell
|
46
|
-
- uses: ruby/setup-ruby@v1
|
47
|
-
with:
|
48
|
-
ruby-version: 2.7
|
49
|
-
- name: Cache installed gems
|
50
|
-
uses: actions/cache@v1
|
51
|
-
with:
|
52
|
-
path: /home/runner/.rubies/ruby-2.7.0/lib/ruby/gems/2.7.0
|
53
|
-
key: gems-cache-${{ runner.os }}
|
54
|
-
- name: Install Forspell
|
55
|
-
run: gem install forspell
|
56
|
-
- name: Run Forspell
|
57
|
-
run: forspell *.md .github/**/*.md
|
58
|
-
liche:
|
59
|
-
runs-on: ubuntu-latest
|
60
|
-
env:
|
61
|
-
GO111MODULE: on
|
62
|
-
steps:
|
63
|
-
- uses: actions/checkout@v2
|
64
|
-
- name: Set up Go
|
65
|
-
uses: actions/setup-go@v1
|
66
|
-
with:
|
67
|
-
go-version: 1.13.x
|
68
|
-
- name: Run liche
|
69
|
-
run: |
|
70
|
-
export PATH=$PATH:$(go env GOPATH)/bin
|
71
|
-
go get -u github.com/raviqqe/liche
|
72
|
-
liche README.md CHANGELOG.md
|
@@ -1,35 +0,0 @@
|
|
1
|
-
name: JRuby Build
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- master
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
rspec:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
env:
|
13
|
-
BUNDLE_JOBS: 4
|
14
|
-
BUNDLE_RETRY: 3
|
15
|
-
CI: true
|
16
|
-
steps:
|
17
|
-
- uses: actions/checkout@v2
|
18
|
-
- uses: actions/cache@v1
|
19
|
-
with:
|
20
|
-
path: /home/runner/bundle
|
21
|
-
key: bundle-${{ hashFiles('**/gemfiles/jruby.gemfile') }}-${{ hashFiles('**/*.gemspec') }}
|
22
|
-
restore-keys: |
|
23
|
-
bundle-
|
24
|
-
- uses: ruby/setup-ruby@v1
|
25
|
-
with:
|
26
|
-
ruby-version: jruby
|
27
|
-
- name: Bundle install
|
28
|
-
run: |
|
29
|
-
bundle config --global gemfile gemfiles/jruby.gemfile
|
30
|
-
bundle config path /home/runner/bundle
|
31
|
-
bundle install
|
32
|
-
bundle update
|
33
|
-
- name: Run RSpec
|
34
|
-
run: |
|
35
|
-
bundle exec rspec
|
data/.github/workflows/rspec.yml
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
name: Build
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- master
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
rspec:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
env:
|
13
|
-
BUNDLE_JOBS: 4
|
14
|
-
BUNDLE_RETRY: 3
|
15
|
-
CI: true
|
16
|
-
strategy:
|
17
|
-
fail-fast: false
|
18
|
-
matrix:
|
19
|
-
ruby: ["2.7"]
|
20
|
-
gemfile: [
|
21
|
-
"gemfiles/rails6.gemfile"
|
22
|
-
]
|
23
|
-
include:
|
24
|
-
- ruby: "2.5"
|
25
|
-
gemfile: "gemfiles/rails42.gemfile"
|
26
|
-
- ruby: "2.6"
|
27
|
-
gemfile: "gemfiles/rails50.gemfile"
|
28
|
-
- ruby: "2.6"
|
29
|
-
gemfile: "gemfiles/rails5.gemfile"
|
30
|
-
- ruby: "2.7"
|
31
|
-
gemfile: "gemfiles/railsmaster.gemfile"
|
32
|
-
steps:
|
33
|
-
- uses: actions/checkout@v2
|
34
|
-
- uses: actions/cache@v1
|
35
|
-
with:
|
36
|
-
path: /home/runner/bundle
|
37
|
-
key: bundle-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ hashFiles(matrix.gemfile) }}-${{ hashFiles('**/*.gemspec') }}
|
38
|
-
restore-keys: |
|
39
|
-
bundle-${{ matrix.ruby }}-${{ matrix.gemfile }}-
|
40
|
-
- uses: ruby/setup-ruby@v1
|
41
|
-
with:
|
42
|
-
ruby-version: ${{ matrix.ruby }}
|
43
|
-
- name: Bundle install
|
44
|
-
run: |
|
45
|
-
bundle config path /home/runner/bundle
|
46
|
-
bundle config --global gemfile ${{ matrix.gemfile }}
|
47
|
-
bundle install
|
48
|
-
bundle update
|
49
|
-
- name: Run RSpec
|
50
|
-
run: |
|
51
|
-
bundle exec rspec
|
@@ -1,21 +0,0 @@
|
|
1
|
-
name: Lint Ruby
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- master
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
rubocop:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
steps:
|
13
|
-
- uses: actions/checkout@v2
|
14
|
-
- uses: ruby/setup-ruby@v1
|
15
|
-
with:
|
16
|
-
ruby-version: 2.7
|
17
|
-
- name: Lint Ruby code with RuboCop
|
18
|
-
run: |
|
19
|
-
gem install bundler
|
20
|
-
bundle install --gemfile gemfiles/rubocop.gemfile --jobs 4 --retry 3
|
21
|
-
bundle exec --gemfile gemfiles/rubocop.gemfile rubocop
|