miteru 2.2.3 → 2.3.0

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: ef0f7be4745e537ba70aa893d53cc2feba75aa2216181fedc70a90a1ca61d61c
4
- data.tar.gz: 8199f226be26efa86e0bb01baa7ee1233e2bbb1476d32967359d090a3e01312a
3
+ metadata.gz: 32e5b8fdac5ea26e971516d09c38d56889247b40152c844974d9bbe79be4e05d
4
+ data.tar.gz: c2fff901074852142c1ce66aeb641a5d3a512bcf286c820ededb1289df822d97
5
5
  SHA512:
6
- metadata.gz: ff0cb9a02102696c4fd22ff41894be87c6fa14415fac141bb07915d70920963d2229f5a7483133417c1fc4f162bdc4d7fadab24d6972d2c50cf60b8b04d650ed
7
- data.tar.gz: f772d4fa43d0659532752c187b7613887a41cf0b58e3b996530d6aea84ac9be1ed21b7fbb0385423f677a8f3c81d8cf61d4f1461f66e9eec9718ce92d8cec28f
6
+ metadata.gz: ec2d6bf3439e556ea0c87b43e93a80f7798f3d2f6a13c4f0ea17c632dce2d99666a7e01d666c58e942b8f84073143beaf871773fcb0d5ddca9e2b705521f1d5a
7
+ data.tar.gz: ab07eb4b67e1473d2e9940165b317c4869ef6bc0e35fb344e00a3bc705089d97fd82ff582339efa1f1726955089ab653de20220bdbd0b6d59b557833617a096f
@@ -49,8 +49,6 @@ module Miteru
49
49
  end
50
50
  end
51
51
 
52
- private
53
-
54
52
  def notifiers
55
53
  @notifiers ||= Miteru.notifiers.map(&:new)
56
54
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Miteru
4
+ class Feeds
5
+ class TweetFeed < Base
6
+ def initialize(base_url = "https://api.tweetfeed.live")
7
+ super(base_url)
8
+ end
9
+
10
+ def urls
11
+ data = get_json("/v1/today/url")
12
+ data.filter_map { |item| item["value"] }
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,7 @@
1
+ require "active_support/number_helper"
2
+
3
+ module Miteru
4
+ module Helpers
5
+ extend ActiveSupport::NumberHelper
6
+ end
7
+ end
data/lib/miteru/kit.rb CHANGED
@@ -75,7 +75,7 @@ module Miteru
75
75
  def filename_with_size
76
76
  return filename unless filesize
77
77
 
78
- "#{filename} (#{filesize.kilobytes}KB)"
78
+ "#{filename} (#{Helpers.number_to_human_size(filesize)})"
79
79
  end
80
80
 
81
81
  def id
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Miteru
4
- VERSION = "2.2.3"
4
+ VERSION = "2.3.0"
5
5
  end
data/lib/miteru.rb CHANGED
@@ -33,6 +33,9 @@ require "miteru/concerns/database_connectable"
33
33
  require "miteru/concerns/error_unwrappable"
34
34
  require "miteru/concerns/url_truncatable"
35
35
 
36
+ # Helpers
37
+ require "miteru/helpers"
38
+
36
39
  # Core classes
37
40
  require "miteru/service"
38
41
 
@@ -145,6 +148,7 @@ require "miteru/feeds/base"
145
148
 
146
149
  require "miteru/feeds/ayashige"
147
150
  require "miteru/feeds/phishing_database"
151
+ require "miteru/feeds/tweetfeed"
148
152
  require "miteru/feeds/urlscan_pro"
149
153
  require "miteru/feeds/urlscan"
150
154
 
data/miteru.gemspec CHANGED
@@ -44,7 +44,7 @@ Gem::Specification.new do |spec|
44
44
  spec.add_dependency "anyway_config", "2.6.3"
45
45
  spec.add_dependency "colorize", "1.1.0"
46
46
  spec.add_dependency "dotenv", "3.1.0"
47
- spec.add_dependency "down", "5.4.1"
47
+ spec.add_dependency "down", "5.4.2"
48
48
  spec.add_dependency "dry-files", "1.1.0"
49
49
  spec.add_dependency "dry-monads", "1.6.0"
50
50
  spec.add_dependency "http", "5.2.0"
@@ -52,13 +52,13 @@ Gem::Specification.new do |spec|
52
52
  spec.add_dependency "oga", "3.4"
53
53
  spec.add_dependency "parallel", "1.24.0"
54
54
  spec.add_dependency "puma", "6.4.2"
55
- spec.add_dependency "rack", "3.0.9.1"
55
+ spec.add_dependency "rack", "3.0.10"
56
56
  spec.add_dependency "rack-session", "2.0.0"
57
57
  spec.add_dependency "rackup", "2.1.0"
58
- spec.add_dependency "redis", "5.1.0"
58
+ spec.add_dependency "redis", "5.2.0"
59
59
  spec.add_dependency "semantic_logger", "4.15.0"
60
- spec.add_dependency "sentry-ruby", "5.16.1"
61
- spec.add_dependency "sentry-sidekiq", "5.16.1"
60
+ spec.add_dependency "sentry-ruby", "5.17.3"
61
+ spec.add_dependency "sentry-sidekiq", "5.17.3"
62
62
  spec.add_dependency "sidekiq", "7.2.2"
63
63
  spec.add_dependency "slack-notifier", "2.4.0"
64
64
  spec.add_dependency "sqlite3", "1.7.2"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miteru
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-03 00:00:00.000000000 Z
11
+ date: 2024-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -268,14 +268,14 @@ dependencies:
268
268
  requirements:
269
269
  - - '='
270
270
  - !ruby/object:Gem::Version
271
- version: 5.4.1
271
+ version: 5.4.2
272
272
  type: :runtime
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - '='
277
277
  - !ruby/object:Gem::Version
278
- version: 5.4.1
278
+ version: 5.4.2
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: dry-files
281
281
  requirement: !ruby/object:Gem::Requirement
@@ -380,14 +380,14 @@ dependencies:
380
380
  requirements:
381
381
  - - '='
382
382
  - !ruby/object:Gem::Version
383
- version: 3.0.9.1
383
+ version: 3.0.10
384
384
  type: :runtime
385
385
  prerelease: false
386
386
  version_requirements: !ruby/object:Gem::Requirement
387
387
  requirements:
388
388
  - - '='
389
389
  - !ruby/object:Gem::Version
390
- version: 3.0.9.1
390
+ version: 3.0.10
391
391
  - !ruby/object:Gem::Dependency
392
392
  name: rack-session
393
393
  requirement: !ruby/object:Gem::Requirement
@@ -422,14 +422,14 @@ dependencies:
422
422
  requirements:
423
423
  - - '='
424
424
  - !ruby/object:Gem::Version
425
- version: 5.1.0
425
+ version: 5.2.0
426
426
  type: :runtime
427
427
  prerelease: false
428
428
  version_requirements: !ruby/object:Gem::Requirement
429
429
  requirements:
430
430
  - - '='
431
431
  - !ruby/object:Gem::Version
432
- version: 5.1.0
432
+ version: 5.2.0
433
433
  - !ruby/object:Gem::Dependency
434
434
  name: semantic_logger
435
435
  requirement: !ruby/object:Gem::Requirement
@@ -450,28 +450,28 @@ dependencies:
450
450
  requirements:
451
451
  - - '='
452
452
  - !ruby/object:Gem::Version
453
- version: 5.16.1
453
+ version: 5.17.3
454
454
  type: :runtime
455
455
  prerelease: false
456
456
  version_requirements: !ruby/object:Gem::Requirement
457
457
  requirements:
458
458
  - - '='
459
459
  - !ruby/object:Gem::Version
460
- version: 5.16.1
460
+ version: 5.17.3
461
461
  - !ruby/object:Gem::Dependency
462
462
  name: sentry-sidekiq
463
463
  requirement: !ruby/object:Gem::Requirement
464
464
  requirements:
465
465
  - - '='
466
466
  - !ruby/object:Gem::Version
467
- version: 5.16.1
467
+ version: 5.17.3
468
468
  type: :runtime
469
469
  prerelease: false
470
470
  version_requirements: !ruby/object:Gem::Requirement
471
471
  requirements:
472
472
  - - '='
473
473
  - !ruby/object:Gem::Version
474
- version: 5.16.1
474
+ version: 5.17.3
475
475
  - !ruby/object:Gem::Dependency
476
476
  name: sidekiq
477
477
  requirement: !ruby/object:Gem::Requirement
@@ -599,8 +599,10 @@ files:
599
599
  - lib/miteru/feeds/ayashige.rb
600
600
  - lib/miteru/feeds/base.rb
601
601
  - lib/miteru/feeds/phishing_database.rb
602
+ - lib/miteru/feeds/tweetfeed.rb
602
603
  - lib/miteru/feeds/urlscan.rb
603
604
  - lib/miteru/feeds/urlscan_pro.rb
605
+ - lib/miteru/helpers.rb
604
606
  - lib/miteru/http.rb
605
607
  - lib/miteru/kit.rb
606
608
  - lib/miteru/mixin.rb