rss 0.3.1 → 0.3.2

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: 256ad5c3d40e196bf28856b91c644de51c96f739893bd758e1d708c16f3cb4ed
4
- data.tar.gz: 2d64ea8248adfc12c7b068f1b3fbe84e7bf11109ca9712f1e81808f86f330f60
3
+ metadata.gz: a2ab2e2eae9a7728b36476373e748eaf66ce357b857156f96f9afc366f747625
4
+ data.tar.gz: c92b1582e936b810d4725ca7498656a9e5014e78de7dc541b1a1825eb1b51480
5
5
  SHA512:
6
- metadata.gz: 2b2b9eeb72011de92f218871ddd0993aee856c8ec496ee4b79a98d36912c826a6860eff37ebcc9ad447f5311560c5a0906ada2b13abab8b9cad081ba62b3e495
7
- data.tar.gz: 736246b1c3b6c3eed52161fa220f170aa0da4da6c163dd2656b5ea5f4b5d77d5b96b353eea1b9b51d68e9014f1da221c1dc0a49236a6c020b2c4994d4fca2195
6
+ metadata.gz: 05e252cb211146849b60519821e591cdd7e26031817c3ef091e706b28db2316550970b015a7fe36ea2c6921a79cdadbf150012de065398ce1a5be494dab97c0d
7
+ data.tar.gz: 9beba0ef3f14611f7ddbb62b58797e8f814b64bf454fa4cf1e21276d471464d47f91fad31cf1be51d7f5c2339ded75d2c3608fe20aca5e4851d373ac809de0fe
data/NEWS.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # News
2
2
 
3
+ ## 0.3.2 - 2025-12-19
4
+
5
+ ### Improvements
6
+
7
+ * Updated documents.
8
+ * GH-59
9
+ * Patch by 1s22s1.
10
+
11
+ * Added support for Ruby 4.0.0.
12
+ * GH-62
13
+ * Patch by Taketo Takashima.
14
+
15
+ ### Thanks
16
+
17
+ * 1s22s1
18
+ * Taketo Takashima
19
+
3
20
  ## 0.3.1 - 2024-08-02
4
21
 
5
22
  ### Improvements
data/README.md CHANGED
@@ -30,20 +30,16 @@ Or install it yourself as:
30
30
 
31
31
  ### Consuming RSS
32
32
 
33
- If you'd like to read someone's RSS feed with your Ruby code, you've come to the right place. It's really easy to do this, but we'll need the help of open-uri:
33
+ If you'd like to read someone's RSS feed with your Ruby code, you've come to the right place. It's really easy to do this:
34
34
 
35
35
  ```ruby
36
- require 'rss'
37
- require 'open-uri'
38
-
39
- url = 'https://www.ruby-lang.org/en/feeds/news.rss'
40
- URI.open(url) do |rss|
41
- feed = RSS::Parser.parse(rss)
42
- puts "Title: #{feed.channel.title}"
43
- feed.items.each do |item|
44
- puts "Item: #{item.title}"
45
- end
46
- end
36
+ require 'rss'
37
+
38
+ feed = RSS::Parser.parse('https://www.ruby-lang.org/en/feeds/news.rss')
39
+ puts "Title: #{feed.channel.title}"
40
+ feed.items.each do |item|
41
+ puts "Item: #{item.title}"
42
+ end
47
43
  ```
48
44
 
49
45
  As you can see, the workhorse is RSS::Parser#parse, which takes the source of the feed and a parameter that performs validation on the feed. We get back an object that has all of the data from our feed, accessible through methods. This example shows getting the title out of the channel element, and looping through the list of items.
data/lib/rss/rss.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  require "English"
4
- require "cgi/util"
4
+ require "cgi/escape"
5
5
  require "time"
6
6
 
7
7
  class Time
data/lib/rss/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module RSS
2
2
  # The current version of RSS
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
- require "cgi/util"
3
+ require "cgi/escape"
4
4
 
5
5
  module RSS
6
6
 
data/lib/rss/xml.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
- require "cgi/util"
3
+ require "cgi/escape"
4
4
 
5
5
  module RSS
6
6
  module XML
data/lib/rss.rb CHANGED
@@ -19,19 +19,14 @@
19
19
  # == Consuming RSS
20
20
  #
21
21
  # If you'd like to read someone's RSS feed with your Ruby code, you've come to
22
- # the right place. It's really easy to do this, but we'll need the help of
23
- # open-uri:
22
+ # the right place. It's really easy to do this.
24
23
  #
25
24
  # require 'rss'
26
- # require 'open-uri'
27
- #
28
- # url = 'http://www.ruby-lang.org/en/feeds/news.rss'
29
- # URI.open(url) do |rss|
30
- # feed = RSS::Parser.parse(rss)
31
- # puts "Title: #{feed.channel.title}"
32
- # feed.items.each do |item|
33
- # puts "Item: #{item.title}"
34
- # end
25
+ #
26
+ # feed = RSS::Parser.parse('https://www.ruby-lang.org/en/feeds/news.rss')
27
+ # puts "Title: #{feed.channel.title}"
28
+ # feed.items.each do |item|
29
+ # puts "Item: #{item.title}"
35
30
  # end
36
31
  #
37
32
  # As you can see, the workhorse is RSS::Parser#parse, which takes the source of
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2024-08-02 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rexml
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
- rubygems_version: 3.6.0.dev
98
+ rubygems_version: 4.0.2
99
99
  specification_version: 4
100
100
  summary: Family of libraries that support various formats of XML "feeds".
101
101
  test_files: []