webtoon_source 0.2.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e01897ab0c714df766b92a86412296a451166eb78bdaa971a13d6b1198f0524
4
- data.tar.gz: 1d7d42c8b0b675f9fb55524aa51982f86c3c7617b434093f59ead8d51e2bb45b
3
+ metadata.gz: 84c3872b98c0871c7ebb7de85a05e6da119187e8cbb44dfec8e6ff9a6166d3ed
4
+ data.tar.gz: 1c9f93cf981fb435571ce93a3b3469b5282c0200aca40db058426eba714f82cd
5
5
  SHA512:
6
- metadata.gz: 8177a11c251862874e602ef1ba26f19509efaadcd05fd3eebeb543527ebdb8f4a9f6843d3884bbd17a54a8ff6e8483695607e7093f82eb1553d68547d04b91c3
7
- data.tar.gz: e1c2a8ab0e642bfba313ec89a15daf4a3540851106264eeda824503ffb6af62b80f6fbc28267a6f419eced7e15492907f5424dd222622b444cff3dd9e0d79b48
6
+ metadata.gz: 35b20661e7c04540c4ef3e8f21d35bb8f308f64c1ca15d13c3720c899a5795d01c4e958e370b7bef2cd3594c569dfe7cbf21bd222e8946b4eee5c798cf6f936f
7
+ data.tar.gz: 8881783a6941ab286dbffa44fa8b7fe1f2b1fa13e8d574a281c7dd56a268140ba6ff64e24cf6be4cb8371e3974a95a907dcbec96498c70156389d5ab6cfedafd
@@ -1,27 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module WebtoonSource
4
- class AsuraScans
5
- HOST_NAME = "https://asuracomic.net"
3
+ class WebtoonSource::AsuraScans
4
+ HOST_NAME = "https://asuracomic.net"
6
5
 
7
- def initialize(host_name = HOST_NAME)
8
- @conn = Faraday.new(host_name)
9
- end
6
+ def initialize(host_name = HOST_NAME)
7
+ @conn = Faraday.new(host_name)
8
+ end
10
9
 
11
- def latest_updates(params = { page: 1 })
12
- response = @conn.get("/series", params)
13
- # Capture group 1 - series slug
14
- # Capture group 2 - anchor tag inner content.
15
- series_pattern = %r{<a\s+href="series/([^"]+)"[^>]*>(.*?)</a>}
10
+ def latest_updates(params = { page: 1 })
11
+ response = @conn.get("/series", params)
12
+ # Capture group 1 - series slug
13
+ # Capture group 2 - anchor tag inner content.
14
+ series_pattern = %r{<a\s+href="series/([^"]+)"[^>]*>(.*?)</a>}
16
15
 
17
- matches = response.body.scan(series_pattern)
16
+ matches = response.body.scan(series_pattern)
18
17
 
19
- matches.map do |match|
20
- slug, anchor_inner_content = match
21
- _, thumbnail_link = anchor_inner_content.match(/src="([^"]*)"/).to_a
18
+ matches.map do |match|
19
+ slug, anchor_inner_content = match
20
+ _, thumbnail_link = anchor_inner_content.match(/src="([^"]*)"/).to_a
22
21
 
23
- [slug, thumbnail_link]
24
- end
22
+ [slug, thumbnail_link]
25
23
  end
26
24
  end
27
25
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WebtoonSource
4
- VERSION = "0.2.0"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webtoon_source
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Kenneth Sinay