external_services 0.5.4 → 0.6.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/.github/workflows/gem-push.yml +1 -1
- data/.github/workflows/ruby.yml +7 -2
- data/.gitignore +2 -1
- data/.rubocop.yml +14 -7
- data/Gemfile +10 -4
- data/Gemfile.lock +179 -170
- data/app/models/external_services/api_action.rb +2 -2
- data/bin/rails +1 -0
- data/external_services.gemspec +2 -8
- data/lib/external_services/active_record.rb +4 -4
- data/lib/external_services/api.rb +2 -1
- data/lib/external_services/version.rb +1 -1
- data/lib/rspec/helpers.rb +2 -4
- metadata +9 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50ae130fd4d89f6230416819d0d07441348c127965597638182b17212a54bc88
|
4
|
+
data.tar.gz: ae072008e02902ea405120769030d97edbd21c2d3411b75a4b5ccf1fe13538e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef6ad5c6e3d26da498f25b9252defd2af9fa7488f5feebacdb79555fba26a15ae9f98a3935387a2bad231e431e262dd76ffab4a4a232a11a19aa919a8a4273d2
|
7
|
+
data.tar.gz: 416cf1be6535af279afc0f1acf413fc41ceb10ef2c4807d7392ec0f07df74791fd0d84094cbeb0cc78d256db18f0763e4f264ab7d0007d0da0a4829c7e910350
|
data/.github/workflows/ruby.yml
CHANGED
@@ -10,6 +10,9 @@ name: Test
|
|
10
10
|
on:
|
11
11
|
push:
|
12
12
|
branches: [ '*' ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ '*' ]
|
15
|
+
|
13
16
|
|
14
17
|
permissions:
|
15
18
|
contents: read
|
@@ -20,10 +23,10 @@ jobs:
|
|
20
23
|
strategy:
|
21
24
|
matrix:
|
22
25
|
os: [ubuntu, macos]
|
23
|
-
ruby-version: ['
|
26
|
+
ruby-version: ['3.2', '3.3']
|
24
27
|
|
25
28
|
steps:
|
26
|
-
- uses: actions/checkout@
|
29
|
+
- uses: actions/checkout@v4
|
27
30
|
- name: Set up Ruby
|
28
31
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
29
32
|
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
@@ -33,5 +36,7 @@ jobs:
|
|
33
36
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
34
37
|
- name: Prepare DB
|
35
38
|
run: bundle exec rake db:create --trace && bundle exec rake db:migrate --trace
|
39
|
+
- name: Run rubocop
|
40
|
+
run: bundle exec rubocop
|
36
41
|
- name: Run tests
|
37
42
|
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,33 +1,40 @@
|
|
1
|
+
plugins:
|
2
|
+
- rubocop-factory_bot
|
3
|
+
- rubocop-rspec
|
4
|
+
- rubocop-rspec_rails
|
5
|
+
- rubocop-rake
|
6
|
+
|
1
7
|
AllCops:
|
2
8
|
TargetRubyVersion: 2.7
|
9
|
+
NewCops: disable
|
3
10
|
Exclude:
|
4
11
|
- 'lib/generators/templates/**/*'
|
5
12
|
- 'spec/dummy/**/*'
|
13
|
+
- 'vendor/**/*'
|
6
14
|
|
7
|
-
|
15
|
+
Layout/LineLength:
|
8
16
|
Max: 140
|
9
17
|
|
10
18
|
Metrics/AbcSize:
|
11
19
|
Max: 25
|
12
20
|
|
13
21
|
Metrics/MethodLength:
|
14
|
-
Max:
|
22
|
+
Max: 25
|
15
23
|
|
16
24
|
Metrics/ModuleLength:
|
17
|
-
Max:
|
25
|
+
Max: 250
|
18
26
|
|
19
27
|
Metrics/ClassLength:
|
20
28
|
Max: 300
|
21
29
|
|
22
30
|
Metrics/CyclomaticComplexity:
|
23
|
-
Max:
|
31
|
+
Max: 10
|
24
32
|
|
25
33
|
Metrics/PerceivedComplexity:
|
26
|
-
Max:
|
27
|
-
|
34
|
+
Max: 10
|
28
35
|
|
29
36
|
Style/Documentation:
|
30
37
|
Enabled: false
|
31
38
|
|
32
|
-
|
39
|
+
Naming/PredicateName:
|
33
40
|
Enabled: false
|
data/Gemfile
CHANGED
@@ -6,15 +6,21 @@ source 'https://rubygems.org'
|
|
6
6
|
gemspec
|
7
7
|
|
8
8
|
gem 'rake', '~> 13.0'
|
9
|
-
gem 'sqlite3'
|
9
|
+
gem 'sqlite3', '~> 2.6'
|
10
10
|
|
11
|
+
gem 'fiddle'
|
11
12
|
gem 'net-smtp', require: false # HACK: for pre 7.0.1 rails and 3.1 ruby
|
13
|
+
gem 'observer'
|
14
|
+
|
12
15
|
gem 'overcommit'
|
13
|
-
gem 'rubocop', '~> 1.0'
|
14
|
-
gem 'rubocop-
|
16
|
+
gem 'rubocop', '~> 1.0'
|
17
|
+
gem 'rubocop-factory_bot', '~> 2.27'
|
18
|
+
gem 'rubocop-rake', '~> 0.7'
|
19
|
+
gem 'rubocop-rspec', '~> 3.5'
|
20
|
+
gem 'rubocop-rspec_rails', '~> 2.31'
|
15
21
|
|
16
22
|
gem 'pry', '>= 0.14'
|
17
|
-
gem 'pry-rails', '~> 0.3
|
23
|
+
gem 'pry-rails', '~> 0.3'
|
18
24
|
|
19
25
|
gem 'factory_bot_rails'
|
20
26
|
gem 'rspec-rails'
|
data/Gemfile.lock
CHANGED
@@ -1,143 +1,126 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
external_services (0.
|
5
|
-
faraday (>=
|
6
|
-
|
7
|
-
rails (>= 4.2.5, < 8)
|
4
|
+
external_services (0.6.0)
|
5
|
+
faraday (>= 2.0, < 3)
|
6
|
+
rails (>= 5.0.7, < 8)
|
8
7
|
|
9
8
|
GEM
|
10
9
|
remote: https://rubygems.org/
|
11
10
|
specs:
|
12
|
-
actioncable (7.
|
13
|
-
actionpack (= 7.
|
14
|
-
activesupport (= 7.
|
11
|
+
actioncable (7.2.2.1)
|
12
|
+
actionpack (= 7.2.2.1)
|
13
|
+
activesupport (= 7.2.2.1)
|
15
14
|
nio4r (~> 2.0)
|
16
15
|
websocket-driver (>= 0.6.1)
|
17
16
|
zeitwerk (~> 2.6)
|
18
|
-
actionmailbox (7.
|
19
|
-
actionpack (= 7.
|
20
|
-
activejob (= 7.
|
21
|
-
activerecord (= 7.
|
22
|
-
activestorage (= 7.
|
23
|
-
activesupport (= 7.
|
24
|
-
mail (>= 2.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
activejob (= 7.1.3.3)
|
32
|
-
activesupport (= 7.1.3.3)
|
33
|
-
mail (~> 2.5, >= 2.5.4)
|
34
|
-
net-imap
|
35
|
-
net-pop
|
36
|
-
net-smtp
|
17
|
+
actionmailbox (7.2.2.1)
|
18
|
+
actionpack (= 7.2.2.1)
|
19
|
+
activejob (= 7.2.2.1)
|
20
|
+
activerecord (= 7.2.2.1)
|
21
|
+
activestorage (= 7.2.2.1)
|
22
|
+
activesupport (= 7.2.2.1)
|
23
|
+
mail (>= 2.8.0)
|
24
|
+
actionmailer (7.2.2.1)
|
25
|
+
actionpack (= 7.2.2.1)
|
26
|
+
actionview (= 7.2.2.1)
|
27
|
+
activejob (= 7.2.2.1)
|
28
|
+
activesupport (= 7.2.2.1)
|
29
|
+
mail (>= 2.8.0)
|
37
30
|
rails-dom-testing (~> 2.2)
|
38
|
-
actionpack (7.
|
39
|
-
actionview (= 7.
|
40
|
-
activesupport (= 7.
|
31
|
+
actionpack (7.2.2.1)
|
32
|
+
actionview (= 7.2.2.1)
|
33
|
+
activesupport (= 7.2.2.1)
|
41
34
|
nokogiri (>= 1.8.5)
|
42
35
|
racc
|
43
|
-
rack (>= 2.2.4)
|
36
|
+
rack (>= 2.2.4, < 3.2)
|
44
37
|
rack-session (>= 1.0.1)
|
45
38
|
rack-test (>= 0.6.3)
|
46
39
|
rails-dom-testing (~> 2.2)
|
47
40
|
rails-html-sanitizer (~> 1.6)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
41
|
+
useragent (~> 0.16)
|
42
|
+
actiontext (7.2.2.1)
|
43
|
+
actionpack (= 7.2.2.1)
|
44
|
+
activerecord (= 7.2.2.1)
|
45
|
+
activestorage (= 7.2.2.1)
|
46
|
+
activesupport (= 7.2.2.1)
|
53
47
|
globalid (>= 0.6.0)
|
54
48
|
nokogiri (>= 1.8.5)
|
55
|
-
actionview (7.
|
56
|
-
activesupport (= 7.
|
49
|
+
actionview (7.2.2.1)
|
50
|
+
activesupport (= 7.2.2.1)
|
57
51
|
builder (~> 3.1)
|
58
52
|
erubi (~> 1.11)
|
59
53
|
rails-dom-testing (~> 2.2)
|
60
54
|
rails-html-sanitizer (~> 1.6)
|
61
|
-
activejob (7.
|
62
|
-
activesupport (= 7.
|
55
|
+
activejob (7.2.2.1)
|
56
|
+
activesupport (= 7.2.2.1)
|
63
57
|
globalid (>= 0.3.6)
|
64
|
-
activemodel (7.
|
65
|
-
activesupport (= 7.
|
66
|
-
activerecord (7.
|
67
|
-
activemodel (= 7.
|
68
|
-
activesupport (= 7.
|
58
|
+
activemodel (7.2.2.1)
|
59
|
+
activesupport (= 7.2.2.1)
|
60
|
+
activerecord (7.2.2.1)
|
61
|
+
activemodel (= 7.2.2.1)
|
62
|
+
activesupport (= 7.2.2.1)
|
69
63
|
timeout (>= 0.4.0)
|
70
|
-
activestorage (7.
|
71
|
-
actionpack (= 7.
|
72
|
-
activejob (= 7.
|
73
|
-
activerecord (= 7.
|
74
|
-
activesupport (= 7.
|
64
|
+
activestorage (7.2.2.1)
|
65
|
+
actionpack (= 7.2.2.1)
|
66
|
+
activejob (= 7.2.2.1)
|
67
|
+
activerecord (= 7.2.2.1)
|
68
|
+
activesupport (= 7.2.2.1)
|
75
69
|
marcel (~> 1.0)
|
76
|
-
activesupport (7.
|
70
|
+
activesupport (7.2.2.1)
|
77
71
|
base64
|
72
|
+
benchmark (>= 0.3)
|
78
73
|
bigdecimal
|
79
|
-
concurrent-ruby (~> 1.0, >= 1.
|
74
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
80
75
|
connection_pool (>= 2.2.5)
|
81
76
|
drb
|
82
77
|
i18n (>= 1.6, < 2)
|
78
|
+
logger (>= 1.4.2)
|
83
79
|
minitest (>= 5.1)
|
84
|
-
|
85
|
-
tzinfo (~> 2.0)
|
86
|
-
ast (2.4.
|
80
|
+
securerandom (>= 0.3)
|
81
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
82
|
+
ast (2.4.3)
|
87
83
|
base64 (0.2.0)
|
88
|
-
|
89
|
-
|
84
|
+
benchmark (0.4.0)
|
85
|
+
bigdecimal (3.1.9)
|
86
|
+
builder (3.3.0)
|
90
87
|
childprocess (0.9.0)
|
91
88
|
ffi (~> 1.0, >= 1.0.11)
|
92
89
|
coderay (1.1.3)
|
93
|
-
concurrent-ruby (1.
|
94
|
-
connection_pool (2.
|
90
|
+
concurrent-ruby (1.3.5)
|
91
|
+
connection_pool (2.5.0)
|
95
92
|
crass (1.0.6)
|
96
|
-
date (3.
|
97
|
-
diff-lcs (1.
|
93
|
+
date (3.4.1)
|
94
|
+
diff-lcs (1.6.0)
|
98
95
|
drb (2.2.1)
|
99
|
-
erubi (1.
|
96
|
+
erubi (1.13.1)
|
100
97
|
factory_bot (4.11.1)
|
101
98
|
activesupport (>= 3.0.0)
|
102
99
|
factory_bot_rails (4.11.1)
|
103
100
|
factory_bot (~> 4.11.1)
|
104
101
|
railties (>= 3.0.0)
|
105
|
-
faraday (
|
106
|
-
|
107
|
-
faraday-
|
108
|
-
faraday-excon (~> 1.1)
|
109
|
-
faraday-httpclient (~> 1.0)
|
110
|
-
faraday-multipart (~> 1.0)
|
111
|
-
faraday-net_http (~> 1.0)
|
112
|
-
faraday-net_http_persistent (~> 1.0)
|
113
|
-
faraday-patron (~> 1.0)
|
114
|
-
faraday-rack (~> 1.0)
|
115
|
-
faraday-retry (~> 1.0)
|
102
|
+
faraday (2.8.1)
|
103
|
+
base64
|
104
|
+
faraday-net_http (>= 2.0, < 3.1)
|
116
105
|
ruby2_keywords (>= 0.0.4)
|
117
|
-
faraday-
|
118
|
-
faraday-em_synchrony (1.0.0)
|
119
|
-
faraday-excon (1.1.0)
|
120
|
-
faraday-httpclient (1.0.1)
|
121
|
-
faraday-multipart (1.0.4)
|
122
|
-
multipart-post (~> 2)
|
123
|
-
faraday-net_http (1.0.1)
|
124
|
-
faraday-net_http_persistent (1.2.0)
|
125
|
-
faraday-patron (1.0.0)
|
126
|
-
faraday-rack (1.0.0)
|
127
|
-
faraday-retry (1.0.3)
|
128
|
-
faraday_middleware (1.2.0)
|
129
|
-
faraday (~> 1.0)
|
106
|
+
faraday-net_http (3.0.2)
|
130
107
|
ffi (1.15.5)
|
108
|
+
fiddle (1.1.6)
|
131
109
|
globalid (1.2.1)
|
132
110
|
activesupport (>= 6.1)
|
133
|
-
i18n (1.14.
|
111
|
+
i18n (1.14.7)
|
134
112
|
concurrent-ruby (~> 1.0)
|
135
113
|
iniparse (1.4.4)
|
136
|
-
io-console (0.
|
137
|
-
irb (1.
|
114
|
+
io-console (0.8.0)
|
115
|
+
irb (1.15.1)
|
116
|
+
pp (>= 0.6.0)
|
138
117
|
rdoc (>= 4.0.0)
|
139
118
|
reline (>= 0.4.2)
|
140
|
-
|
119
|
+
json (2.10.2)
|
120
|
+
language_server-protocol (3.17.0.4)
|
121
|
+
lint_roller (1.1.0)
|
122
|
+
logger (1.6.6)
|
123
|
+
loofah (2.24.0)
|
141
124
|
crass (~> 1.0.2)
|
142
125
|
nokogiri (>= 1.12.0)
|
143
126
|
mail (2.8.1)
|
@@ -148,126 +131,147 @@ GEM
|
|
148
131
|
marcel (1.0.4)
|
149
132
|
method_source (1.1.0)
|
150
133
|
mini_mime (1.1.5)
|
151
|
-
mini_portile2 (2.8.
|
152
|
-
minitest (5.
|
153
|
-
|
154
|
-
mutex_m (0.2.0)
|
155
|
-
net-imap (0.4.11)
|
134
|
+
mini_portile2 (2.8.8)
|
135
|
+
minitest (5.25.5)
|
136
|
+
net-imap (0.5.6)
|
156
137
|
date
|
157
138
|
net-protocol
|
158
139
|
net-pop (0.1.2)
|
159
140
|
net-protocol
|
160
141
|
net-protocol (0.2.2)
|
161
142
|
timeout
|
162
|
-
net-smtp (0.5.
|
143
|
+
net-smtp (0.5.1)
|
163
144
|
net-protocol
|
164
|
-
nio4r (2.7.
|
165
|
-
nokogiri (1.
|
145
|
+
nio4r (2.7.4)
|
146
|
+
nokogiri (1.18.5)
|
166
147
|
mini_portile2 (~> 2.8.2)
|
167
148
|
racc (~> 1.4)
|
149
|
+
observer (0.1.2)
|
168
150
|
overcommit (0.46.0)
|
169
151
|
childprocess (~> 0.6, >= 0.6.3)
|
170
152
|
iniparse (~> 1.4)
|
171
|
-
parallel (1.
|
172
|
-
parser (3.
|
153
|
+
parallel (1.26.3)
|
154
|
+
parser (3.3.7.2)
|
173
155
|
ast (~> 2.4.1)
|
174
|
-
|
156
|
+
racc
|
157
|
+
pp (0.6.2)
|
158
|
+
prettyprint
|
159
|
+
prettyprint (0.2.0)
|
160
|
+
pry (0.15.2)
|
175
161
|
coderay (~> 1.1)
|
176
162
|
method_source (~> 1.0)
|
177
|
-
pry-rails (0.3.
|
178
|
-
pry (>= 0.
|
179
|
-
psych (5.
|
163
|
+
pry-rails (0.3.11)
|
164
|
+
pry (>= 0.13.0)
|
165
|
+
psych (5.2.3)
|
166
|
+
date
|
180
167
|
stringio
|
181
|
-
racc (1.8.
|
182
|
-
rack (3.
|
183
|
-
rack-session (2.
|
168
|
+
racc (1.8.1)
|
169
|
+
rack (3.1.12)
|
170
|
+
rack-session (2.1.0)
|
171
|
+
base64 (>= 0.1.0)
|
184
172
|
rack (>= 3.0.0)
|
185
|
-
rack-test (2.
|
173
|
+
rack-test (2.2.0)
|
186
174
|
rack (>= 1.3)
|
187
|
-
rackup (2.1
|
175
|
+
rackup (2.2.1)
|
188
176
|
rack (>= 3)
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
activesupport (= 7.1.3.3)
|
177
|
+
rails (7.2.2.1)
|
178
|
+
actioncable (= 7.2.2.1)
|
179
|
+
actionmailbox (= 7.2.2.1)
|
180
|
+
actionmailer (= 7.2.2.1)
|
181
|
+
actionpack (= 7.2.2.1)
|
182
|
+
actiontext (= 7.2.2.1)
|
183
|
+
actionview (= 7.2.2.1)
|
184
|
+
activejob (= 7.2.2.1)
|
185
|
+
activemodel (= 7.2.2.1)
|
186
|
+
activerecord (= 7.2.2.1)
|
187
|
+
activestorage (= 7.2.2.1)
|
188
|
+
activesupport (= 7.2.2.1)
|
202
189
|
bundler (>= 1.15.0)
|
203
|
-
railties (= 7.
|
190
|
+
railties (= 7.2.2.1)
|
204
191
|
rails-dom-testing (2.2.0)
|
205
192
|
activesupport (>= 5.0.0)
|
206
193
|
minitest
|
207
194
|
nokogiri (>= 1.6)
|
208
|
-
rails-html-sanitizer (1.6.
|
195
|
+
rails-html-sanitizer (1.6.2)
|
209
196
|
loofah (~> 2.21)
|
210
|
-
nokogiri (
|
211
|
-
railties (7.
|
212
|
-
actionpack (= 7.
|
213
|
-
activesupport (= 7.
|
214
|
-
irb
|
197
|
+
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)
|
198
|
+
railties (7.2.2.1)
|
199
|
+
actionpack (= 7.2.2.1)
|
200
|
+
activesupport (= 7.2.2.1)
|
201
|
+
irb (~> 1.13)
|
215
202
|
rackup (>= 1.0.0)
|
216
203
|
rake (>= 12.2)
|
217
204
|
thor (~> 1.0, >= 1.2.2)
|
218
205
|
zeitwerk (~> 2.6)
|
219
206
|
rainbow (3.1.1)
|
220
207
|
rake (13.2.1)
|
221
|
-
rdoc (6.
|
208
|
+
rdoc (6.12.0)
|
222
209
|
psych (>= 4.0.0)
|
223
|
-
regexp_parser (2.
|
224
|
-
reline (0.
|
210
|
+
regexp_parser (2.10.0)
|
211
|
+
reline (0.6.0)
|
225
212
|
io-console (~> 0.5)
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
rspec-expectations (3.10.1)
|
213
|
+
rspec-core (3.13.3)
|
214
|
+
rspec-support (~> 3.13.0)
|
215
|
+
rspec-expectations (3.13.3)
|
230
216
|
diff-lcs (>= 1.2.0, < 2.0)
|
231
|
-
rspec-support (~> 3.
|
232
|
-
rspec-mocks (3.
|
217
|
+
rspec-support (~> 3.13.0)
|
218
|
+
rspec-mocks (3.13.2)
|
233
219
|
diff-lcs (>= 1.2.0, < 2.0)
|
234
|
-
rspec-support (~> 3.
|
235
|
-
rspec-rails (
|
236
|
-
actionpack (>=
|
237
|
-
activesupport (>=
|
238
|
-
railties (>=
|
239
|
-
rspec-core (~> 3.
|
240
|
-
rspec-expectations (~> 3.
|
241
|
-
rspec-mocks (~> 3.
|
242
|
-
rspec-support (~> 3.
|
243
|
-
rspec-support (3.
|
244
|
-
rubocop (1.
|
220
|
+
rspec-support (~> 3.13.0)
|
221
|
+
rspec-rails (7.1.1)
|
222
|
+
actionpack (>= 7.0)
|
223
|
+
activesupport (>= 7.0)
|
224
|
+
railties (>= 7.0)
|
225
|
+
rspec-core (~> 3.13)
|
226
|
+
rspec-expectations (~> 3.13)
|
227
|
+
rspec-mocks (~> 3.13)
|
228
|
+
rspec-support (~> 3.13)
|
229
|
+
rspec-support (3.13.2)
|
230
|
+
rubocop (1.74.0)
|
231
|
+
json (~> 2.3)
|
232
|
+
language_server-protocol (~> 3.17.0.2)
|
233
|
+
lint_roller (~> 1.1.0)
|
245
234
|
parallel (~> 1.10)
|
246
|
-
parser (>= 3.
|
235
|
+
parser (>= 3.3.0.2)
|
247
236
|
rainbow (>= 2.2.2, < 4.0)
|
248
|
-
regexp_parser (>=
|
249
|
-
|
250
|
-
rubocop-ast (>= 1.17.0, < 2.0)
|
237
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
238
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
251
239
|
ruby-progressbar (~> 1.7)
|
252
|
-
unicode-display_width (>=
|
253
|
-
rubocop-ast (1.
|
254
|
-
parser (>= 3.
|
255
|
-
rubocop-
|
256
|
-
|
257
|
-
|
240
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
241
|
+
rubocop-ast (1.41.0)
|
242
|
+
parser (>= 3.3.7.2)
|
243
|
+
rubocop-factory_bot (2.27.1)
|
244
|
+
lint_roller (~> 1.1)
|
245
|
+
rubocop (~> 1.72, >= 1.72.1)
|
246
|
+
rubocop-rake (0.7.1)
|
247
|
+
lint_roller (~> 1.1)
|
248
|
+
rubocop (>= 1.72.1)
|
249
|
+
rubocop-rspec (3.5.0)
|
250
|
+
lint_roller (~> 1.1)
|
251
|
+
rubocop (~> 1.72, >= 1.72.1)
|
252
|
+
rubocop-rspec_rails (2.31.0)
|
253
|
+
lint_roller (~> 1.1)
|
254
|
+
rubocop (~> 1.72, >= 1.72.1)
|
255
|
+
rubocop-rspec (~> 3.5)
|
256
|
+
ruby-progressbar (1.13.0)
|
258
257
|
ruby2_keywords (0.0.5)
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
258
|
+
securerandom (0.4.1)
|
259
|
+
sqlite3 (2.6.0)
|
260
|
+
mini_portile2 (~> 2.8.0)
|
261
|
+
stringio (3.1.5)
|
262
|
+
thor (1.3.2)
|
263
|
+
timeout (0.4.3)
|
263
264
|
tzinfo (2.0.6)
|
264
265
|
concurrent-ruby (~> 1.0)
|
265
|
-
unicode-display_width (
|
266
|
-
|
267
|
-
|
266
|
+
unicode-display_width (3.1.4)
|
267
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
268
|
+
unicode-emoji (4.0.4)
|
269
|
+
useragent (0.16.11)
|
270
|
+
websocket-driver (0.7.7)
|
271
|
+
base64
|
268
272
|
websocket-extensions (>= 0.1.0)
|
269
273
|
websocket-extensions (0.1.5)
|
270
|
-
zeitwerk (2.
|
274
|
+
zeitwerk (2.7.2)
|
271
275
|
|
272
276
|
PLATFORMS
|
273
277
|
ruby
|
@@ -275,15 +279,20 @@ PLATFORMS
|
|
275
279
|
DEPENDENCIES
|
276
280
|
external_services!
|
277
281
|
factory_bot_rails
|
282
|
+
fiddle
|
278
283
|
net-smtp
|
284
|
+
observer
|
279
285
|
overcommit
|
280
286
|
pry (>= 0.14)
|
281
|
-
pry-rails (~> 0.3
|
287
|
+
pry-rails (~> 0.3)
|
282
288
|
rake (~> 13.0)
|
283
289
|
rspec-rails
|
284
290
|
rubocop (~> 1.0)
|
285
|
-
rubocop-
|
286
|
-
|
291
|
+
rubocop-factory_bot (~> 2.27)
|
292
|
+
rubocop-rake (~> 0.7)
|
293
|
+
rubocop-rspec (~> 3.5)
|
294
|
+
rubocop-rspec_rails (~> 2.31)
|
295
|
+
sqlite3 (~> 2.6)
|
287
296
|
|
288
297
|
BUNDLED WITH
|
289
|
-
2.
|
298
|
+
2.6.6
|
@@ -6,7 +6,7 @@ module ExternalServices
|
|
6
6
|
|
7
7
|
MAX_ACTION_AGE = ENV.fetch('EXTERNAL_SERVICES_MAX_ACTION_AGE', '90').to_i.days
|
8
8
|
|
9
|
-
|
9
|
+
attr_writer :async
|
10
10
|
|
11
11
|
self.table_name = :external_services_api_actions
|
12
12
|
|
@@ -85,7 +85,7 @@ module ExternalServices
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def async
|
88
|
-
@async.nil?
|
88
|
+
@async.nil? || @async
|
89
89
|
end
|
90
90
|
|
91
91
|
private
|
data/bin/rails
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
ENGINE_ROOT = File.expand_path('..', __dir__)
|
8
8
|
ENGINE_PATH = File.expand_path('../lib/external_services/engine', __dir__)
|
9
|
+
APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__)
|
9
10
|
|
10
11
|
# Set up gems listed in the Gemfile.
|
11
12
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
data/external_services.gemspec
CHANGED
@@ -17,14 +17,8 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.post_install_message = <<-MSG
|
21
|
-
WARNING: since v0.4 active_job queues are prefixed, so you should check sidekiq config.
|
22
|
-
And there is a sidekiq queue clean function, you should use it on Sidekiq start instead of cleaning all Redis db.
|
23
|
-
MSG
|
24
|
-
|
25
20
|
spec.required_ruby_version = '>= 2.7'
|
26
21
|
|
27
|
-
spec.add_dependency 'faraday', '>=
|
28
|
-
spec.add_dependency '
|
29
|
-
spec.add_dependency 'rails', '>= 4.2.5', '< 8'
|
22
|
+
spec.add_dependency 'faraday', '>= 2.0', '< 3'
|
23
|
+
spec.add_dependency 'rails', '>= 5.0.7', '< 8'
|
30
24
|
end
|
@@ -29,7 +29,7 @@ module ExternalServices
|
|
29
29
|
begin
|
30
30
|
service_module = const_get(name.to_s.camelize, false)
|
31
31
|
include service_module
|
32
|
-
rescue NameError
|
32
|
+
rescue NameError # rubocop:disable Lint/SuppressedException
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
@@ -88,7 +88,7 @@ module ExternalServices
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
-
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
91
|
+
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
92
92
|
def define_external_service_callbacks(name, options = {})
|
93
93
|
service_assoc = :"#{name}_service"
|
94
94
|
only_api_actions = (options[:only_api_actions] == true)
|
@@ -140,7 +140,7 @@ module ExternalServices
|
|
140
140
|
throw :abort
|
141
141
|
end
|
142
142
|
end
|
143
|
-
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
143
|
+
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
144
144
|
|
145
145
|
include callbacks_module
|
146
146
|
end
|
@@ -262,7 +262,7 @@ module ExternalServices
|
|
262
262
|
path = args[:path] || send(:"#{name}_api_path")
|
263
263
|
data = args[:data] || send(:"#{name}_api_data")
|
264
264
|
options = args[:options] || {}
|
265
|
-
async = args[:async].nil?
|
265
|
+
async = args[:async].nil? || args[:async]
|
266
266
|
|
267
267
|
options[:change_external_id] = true if options[:change_external_id].nil?
|
268
268
|
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'faraday'
|
4
|
-
require 'faraday_middleware'
|
5
4
|
|
6
5
|
module ExternalServices
|
7
6
|
module Api
|
@@ -10,6 +9,8 @@ module ExternalServices
|
|
10
9
|
|
11
10
|
def initialize(response)
|
12
11
|
@response = response
|
12
|
+
|
13
|
+
super
|
13
14
|
end
|
14
15
|
|
15
16
|
def message
|
data/lib/rspec/helpers.rb
CHANGED
@@ -18,8 +18,7 @@ module ExternalServices
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
|
22
|
-
|
21
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity, Metrics/BlockLength
|
23
22
|
def describe_external_service_api(object:, api_name:, **kwargs, &blk)
|
24
23
|
action_class = kwargs[:action_class] || "ExternalServices::ApiActions::#{api_name.to_s.camelize}".constantize
|
25
24
|
methods = %i[create update destroy]
|
@@ -88,9 +87,8 @@ module ExternalServices
|
|
88
87
|
|
89
88
|
instance_exec(&blk) if block_given?
|
90
89
|
end
|
91
|
-
|
92
|
-
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
|
93
90
|
end
|
91
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity, Metrics/BlockLength
|
94
92
|
end
|
95
93
|
|
96
94
|
def remove_api_actions(api_name)
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: external_services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Gnuskov
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-21 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: faraday
|
@@ -16,47 +15,27 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
18
|
+
version: '2.0'
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
21
|
+
version: '3'
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
24
|
version_requirements: !ruby/object:Gem::Requirement
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
28
|
+
version: '2.0'
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: faraday_middleware
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '1.0'
|
40
|
-
- - "<"
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '2'
|
43
|
-
type: :runtime
|
44
|
-
prerelease: false
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - ">="
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '1.0'
|
50
|
-
- - "<"
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '2'
|
31
|
+
version: '3'
|
53
32
|
- !ruby/object:Gem::Dependency
|
54
33
|
name: rails
|
55
34
|
requirement: !ruby/object:Gem::Requirement
|
56
35
|
requirements:
|
57
36
|
- - ">="
|
58
37
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
38
|
+
version: 5.0.7
|
60
39
|
- - "<"
|
61
40
|
- !ruby/object:Gem::Version
|
62
41
|
version: '8'
|
@@ -66,11 +45,10 @@ dependencies:
|
|
66
45
|
requirements:
|
67
46
|
- - ">="
|
68
47
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
48
|
+
version: 5.0.7
|
70
49
|
- - "<"
|
71
50
|
- !ruby/object:Gem::Version
|
72
51
|
version: '8'
|
73
|
-
description:
|
74
52
|
email:
|
75
53
|
- sergey.gnuskov@flant.com
|
76
54
|
executables: []
|
@@ -115,9 +93,6 @@ homepage: https://github.com/flant/external_services
|
|
115
93
|
licenses:
|
116
94
|
- MIT
|
117
95
|
metadata: {}
|
118
|
-
post_install_message: |2
|
119
|
-
WARNING: since v0.4 active_job queues are prefixed, so you should check sidekiq config.
|
120
|
-
And there is a sidekiq queue clean function, you should use it on Sidekiq start instead of cleaning all Redis db.
|
121
96
|
rdoc_options: []
|
122
97
|
require_paths:
|
123
98
|
- lib
|
@@ -132,8 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
107
|
- !ruby/object:Gem::Version
|
133
108
|
version: '0'
|
134
109
|
requirements: []
|
135
|
-
rubygems_version: 3.
|
136
|
-
signing_key:
|
110
|
+
rubygems_version: 3.6.2
|
137
111
|
specification_version: 4
|
138
112
|
summary: Gem helps syncronizing objects to different external services like Gitlab,
|
139
113
|
Redmine and any other.
|