ruby-readability 0.7.2 → 0.7.3

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: f83eb55e4c0c4c30ad54e8e7104d68da8a5eb2b4d9cc76b45255055d89bf4b5c
4
- data.tar.gz: 4d003c39b589477449bedd34634c5482dd503e94bfe24b9a5c29ea94f9b49f83
3
+ metadata.gz: 455beda0016e95aa0057d33089fca6e29d50f73953a223db29ab46f0032e15ef
4
+ data.tar.gz: 23c7a22fec6caae75eb1d65c4fd9ee48bf3ab7e34871a38fbd9c256abddebc25
5
5
  SHA512:
6
- metadata.gz: e799e831297b18b381c3b1caad19531f99fe084f640afbddd1cf91e75fe234d3af4618f07e02a0c6214824726e3afe79accbb8ea5f0d66d9117b13112d22e8ef
7
- data.tar.gz: 404d3a1bc702f3bd609e8c3ba8e37d6f023b2a3c126c278e7463a3dfee1cc5bf683f6c0c75cfabbb14e477f582b33cc8204d8682f33ed9a235b6fac8e90d9ad2
6
+ metadata.gz: ce9e49fcb5de2fbe8ceac074da8768f982c4715a9d717833e8e1b4b8be0293750d01d21a2771f2acc6eda3e07b1aa3c41356b0489ab255016cba8e40096fa1ca
7
+ data.tar.gz: 3dc6fe16a7a43070ba3b5c0feaeb8370cce66dc447c2beb9ad025b59e8aaec4e428f025467bdc5af355394f4902780d1ec40cbf181eb7abbe16ceb5d5e9b13c7
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  strategy:
14
14
  matrix:
15
- ruby-version: ['2.7']
15
+ ruby-version: ['2.7', '3.3']
16
16
 
17
17
  steps:
18
18
  - uses: actions/checkout@v2
data/README.md CHANGED
@@ -28,7 +28,7 @@ Example
28
28
  require 'readability'
29
29
  require 'open-uri'
30
30
 
31
- source = open('http://lab.arc90.com/experiments/readability/').read
31
+ source = URI.parse('http://lab.arc90.com/experiments/readability/').read
32
32
  puts Readability::Document.new(source).content
33
33
 
34
34
 
data/bin/readability CHANGED
@@ -2,7 +2,7 @@
2
2
  require 'rubygems'
3
3
  require 'open-uri'
4
4
  require 'optparse'
5
- require File.dirname(__FILE__) + '/../lib/readability'
5
+ require_relative '../lib/readability'
6
6
 
7
7
  options = { :debug => false, :images => false }
8
8
  options_parser = OptionParser.new do |opts|
@@ -28,7 +28,7 @@ if ARGV.length != 1
28
28
  exit 1
29
29
  end
30
30
 
31
- text = open(ARGV.first).read
31
+ text = URI.parse(ARGV.first).read
32
32
  params = if options[:images]
33
33
  { :tags => %w[div p img a],
34
34
  :attributes => %w[src href],
data/lib/readability.rb CHANGED
@@ -43,7 +43,7 @@ module Readability
43
43
  @options = DEFAULT_OPTIONS.merge(options)
44
44
  @input = input
45
45
 
46
- if RUBY_VERSION =~ /^(1\.9|2)/ && !@options[:encoding]
46
+ if RUBY_VERSION =~ /^(1\.9|2|3)/ && !@options[:encoding]
47
47
  @input = GuessHtmlEncoding.encode(@input, @options[:html_headers]) unless @options[:do_not_guess_encoding]
48
48
  @options[:encoding] = @input.encoding.to_s
49
49
  end
@@ -3,12 +3,16 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ruby-readability"
6
- s.version = '0.7.2'
6
+ s.version = '0.7.3'
7
7
  s.authors = ["Andrew Cantino", "starrhorne", "libc", "Kyle Maxwell"]
8
8
  s.email = ["andrew@iterationlabs.com"]
9
9
  s.homepage = "http://github.com/cantino/ruby-readability"
10
10
  s.summary = %q{Port of arc90's readability project to ruby}
11
11
  s.description = %q{Port of arc90's readability project to ruby}
12
+ s.metadata = {
13
+ "bug_tracker_uri" => "https://github.com/cantino/ruby-readability/issues",
14
+ "source_code_uri" => "https://github.com/cantino/ruby-readability",
15
+ }
12
16
 
13
17
  s.files = `git ls-files`.split("\n")
14
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-readability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Cantino
8
8
  - starrhorne
9
9
  - libc
10
10
  - Kyle Maxwell
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-08-29 00:00:00.000000000 Z
14
+ date: 2025-12-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec
@@ -118,8 +118,10 @@ files:
118
118
  - spec/spec_helper.rb
119
119
  homepage: http://github.com/cantino/ruby-readability
120
120
  licenses: []
121
- metadata: {}
122
- post_install_message:
121
+ metadata:
122
+ bug_tracker_uri: https://github.com/cantino/ruby-readability/issues
123
+ source_code_uri: https://github.com/cantino/ruby-readability
124
+ post_install_message:
123
125
  rdoc_options: []
124
126
  require_paths:
125
127
  - lib
@@ -134,8 +136,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
136
  - !ruby/object:Gem::Version
135
137
  version: '0'
136
138
  requirements: []
137
- rubygems_version: 3.5.14
138
- signing_key:
139
+ rubygems_version: 3.0.3.1
140
+ signing_key:
139
141
  specification_version: 4
140
142
  summary: Port of arc90's readability project to ruby
141
143
  test_files: