fbe 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddac42d9e960528306d9483a9842027c71058304277d762b8e60521b55fd7e4b
4
- data.tar.gz: 2acdb6268a759212fbff0f3164d34f948f5a256a6e9be911a8140dca3859c192
3
+ metadata.gz: e857aa5ed166b003997aaafddd6e7c5cf523451321b4f3fe1597ef35228b7063
4
+ data.tar.gz: bb2b3e7aa0d3a210d131618d7b444d842f4b36bdc7512aacbef429f43db024c4
5
5
  SHA512:
6
- metadata.gz: d237fc6509e2fddb2d9ae9d89982f05228692b0ad9ddb185a3ff89033ce855e7e61c18c30b8e7e376cfaa2efc8a56bab3e6dcb9de13c5808c6235963c1bfe147
7
- data.tar.gz: d3fc27efd402af4424f5fc472803569635bd0ca21cdf586dacd471ae64fad11132e94654efab4c07499049172e8ad99863c86c6589283eeb0cde9021f57846b7
6
+ metadata.gz: 4e96e84f8eba6d37456832150df00956fa456eb348f044e30714e64fb5eafd2a484eeb30f0ae90e3dd9a4ae64d5a04d55ed5b830940e3b3b0425c0a29459714d
7
+ data.tar.gz: 576278b551ac1b748526fe57b2465d176ab91208d1bcaab7eb761b1b59ceaed1d05ea818536b0b0acab581a9fb293d80e79b5383194891399c7d51f013e4bbe1
data/lib/fbe/octo.rb CHANGED
@@ -124,11 +124,8 @@ class Fbe::FakeOctokit
124
124
 
125
125
  def repositories(_user = nil)
126
126
  [
127
- {
128
- name: 'judges',
129
- full_name: 'yegor256/judges',
130
- id: 444
131
- }
127
+ repository('yegor256/judges'),
128
+ repository('yegor256/factbase')
132
129
  ]
133
130
  end
134
131
 
@@ -143,7 +140,38 @@ class Fbe::FakeOctokit
143
140
  def repository(name)
144
141
  {
145
142
  id: name_to_number(name),
146
- full_name: name.is_a?(Integer) ? 'yegor256/test' : name
143
+ full_name: name.is_a?(Integer) ? 'yegor256/test' : name,
144
+ default_branch: 'master',
145
+ private: false,
146
+ owner: { login: name.to_s.split('/')[0], id: 526_301, site_admin: false },
147
+ html_url: "https://github.com/#{name}",
148
+ description: 'something',
149
+ fork: false,
150
+ url: "https://github.com/#{name}",
151
+ created_at: random_time,
152
+ updated_at: random_time,
153
+ pushed_at: random_time,
154
+ size: 470,
155
+ stargazers_count: 1,
156
+ watchers_count: 1,
157
+ language: 'Ruby',
158
+ has_issues: true,
159
+ has_projects: true,
160
+ has_downloads: true,
161
+ has_wiki: true,
162
+ has_pages: false,
163
+ has_discussions: false,
164
+ forks_count: 0,
165
+ archived: false,
166
+ disabled: false,
167
+ open_issues_count: 6,
168
+ license: { key: 'mit', name: 'MIT License' },
169
+ allow_forking: true,
170
+ is_template: false,
171
+ visibility: 'public',
172
+ forks: 0,
173
+ open_issues: 6,
174
+ watchers: 1
147
175
  }
148
176
  end
149
177
 
@@ -171,6 +199,7 @@ class Fbe::FakeOctokit
171
199
  def issue_timeline(_repo, _issue, _options = {})
172
200
  [
173
201
  {
202
+ event: 'renamed',
174
203
  actor: {
175
204
  id: 888,
176
205
  login: 'torvalds'
@@ -179,7 +208,6 @@ class Fbe::FakeOctokit
179
208
  id: name_to_number('yegor256/judges'),
180
209
  full_name: 'yegor256/judges'
181
210
  },
182
- event: 'renamed',
183
211
  rename: {
184
212
  from: 'before',
185
213
  to: 'after'
@@ -187,6 +215,7 @@ class Fbe::FakeOctokit
187
215
  created_at: random_time
188
216
  },
189
217
  {
218
+ event: 'labeled',
190
219
  actor: {
191
220
  id: 888,
192
221
  login: 'torvalds'
@@ -195,7 +224,6 @@ class Fbe::FakeOctokit
195
224
  id: name_to_number('yegor256/judges'),
196
225
  full_name: 'yegor256/judges'
197
226
  },
198
- event: 'labeled',
199
227
  label: {
200
228
  name: 'bug'
201
229
  },
@@ -208,27 +236,36 @@ class Fbe::FakeOctokit
208
236
  [
209
237
  {
210
238
  id: '123',
239
+ type: 'PushEvent',
211
240
  repo: {
212
241
  id: name_to_number(repo),
213
- name: repo
242
+ name: repo,
243
+ url: "https://api.github.com/repos/#{repo}"
214
244
  },
215
- type: 'PushEvent',
216
245
  payload: {
217
- push_id: 42
246
+ push_id: 42,
247
+ ref: 'refs/heads/master',
248
+ size: 1,
249
+ distinct_size: 0,
250
+ head: 'b7089c51cc2526a0d2619d35379f921d53c72731',
251
+ before: '12d3bff1a55bad50ee2e8f29ade7f1c1e07bb025'
218
252
  },
219
253
  actor: {
220
254
  id: 888,
221
- login: 'torvalds'
255
+ login: 'torvalds',
256
+ display_login: 'torvalds'
222
257
  },
223
- created_at: random_time
258
+ created_at: random_time,
259
+ public: true
224
260
  },
225
261
  {
226
262
  id: '124',
263
+ type: 'IssuesEvent',
227
264
  repo: {
228
265
  id: name_to_number(repo),
229
- name: repo
266
+ name: repo,
267
+ url: "https://api.github.com/repos/#{repo}"
230
268
  },
231
- type: 'IssuesEvent',
232
269
  payload: {
233
270
  action: 'closed',
234
271
  issue: {
@@ -237,17 +274,20 @@ class Fbe::FakeOctokit
237
274
  },
238
275
  actor: {
239
276
  id: 888,
240
- login: 'torvalds'
277
+ login: 'torvalds',
278
+ display_login: 'torvalds'
241
279
  },
242
- created_at: random_time
280
+ created_at: random_time,
281
+ public: true
243
282
  },
244
283
  {
245
284
  id: '125',
285
+ type: 'IssuesEvent',
246
286
  repo: {
247
287
  id: name_to_number(repo),
248
- name: repo
288
+ name: repo,
289
+ url: "https://api.github.com/repos/#{repo}"
249
290
  },
250
- type: 'IssuesEvent',
251
291
  payload: {
252
292
  action: 'opened',
253
293
  issue: {
@@ -256,9 +296,11 @@ class Fbe::FakeOctokit
256
296
  },
257
297
  actor: {
258
298
  id: 888,
259
- login: 'torvalds'
299
+ login: 'torvalds',
300
+ display_login: 'torvalds'
260
301
  },
261
- created_at: random_time
302
+ created_at: random_time,
303
+ public: true
262
304
  }
263
305
  ]
264
306
  end
data/lib/fbe.rb CHANGED
@@ -27,5 +27,5 @@
27
27
  # License:: MIT
28
28
  module Fbe
29
29
  # Current version of the gem (changed by .rultor.yml on every release)
30
- VERSION = '0.0.16'
30
+ VERSION = '0.0.17'
31
31
  end
@@ -52,6 +52,7 @@ class TestOcto < Minitest::Test
52
52
  end
53
53
 
54
54
  def test_with_broken_token
55
+ skip # it's a "live" test, run it manually if you need it
55
56
  global = {}
56
57
  options = Judges::Options.new({ 'github_token' => 'incorrect-value' })
57
58
  o = Fbe.octo(loog: Loog::NULL, global:, options:)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fbe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-15 00:00:00.000000000 Z
11
+ date: 2024-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace