curation 1.0 → 1.1

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: 0f56e1c572c081875ce6e71608496d64a3d34ef84837c60e15c06e358ab0af44
4
- data.tar.gz: e7b3899aee83e21bad48c59b68d15d792cebdf9c84b95c24012d4329a3de08cf
3
+ metadata.gz: 14637da5bf7b047f9c34b40ff4bf108110dce7408d3c12af9e76222141bdcf65
4
+ data.tar.gz: 144487e448354476958895db783fdc681d0116ec3eca5e7ede1cd3cf1bd1d13a
5
5
  SHA512:
6
- metadata.gz: a71487cae498b7f04e028f7e6f71793e08047bddefc28e8e3700167c5bf1734cccdd5972a997cd30b07d9c69a2ebb86c4e744e9c32f63a3f0b7c75ba23bf92ef
7
- data.tar.gz: b33659760a649ff74aff8fcb821b28d073d4324ce671f1cb737107d4515043de5916d7315a385dfa0cb2517de177aa39f745f3aaad95149339cb4cd116b8cb52
6
+ metadata.gz: 303babe96daee5e792672e1ece05b49d77c115e393af00ded6902b10b9d4adb51210923c7d6c0e68a359246078618a8d09606ab57dd57fa0882db7e3a474e3e4
7
+ data.tar.gz: 451a1ad8866adc91850ff9b150847564bb9de43b15432de2dbf06fb2936a3788ed2c0bf4d9e3c9c462e13bdb5c6236bf5dc0c97a6697a8c3ea9c307bf2f35410
@@ -1,4 +1,6 @@
1
1
  require "curation/version"
2
+ require "metainspector"
3
+ require "open-uri"
2
4
 
3
5
  module Curation
4
6
  class Error < StandardError; end
@@ -32,7 +34,7 @@ module Curation
32
34
 
33
35
  def image
34
36
  @image = find_image
35
- @image = @image.gsub('http://', 'https://')
37
+ @image = @image.to_s.gsub('http://', 'https://')
36
38
  @image
37
39
  end
38
40
 
@@ -44,7 +46,6 @@ module Curation
44
46
  return ld['articleBody'] if ld.has_key? 'articleBody'
45
47
  end
46
48
  end
47
- text = ''
48
49
  h = html.dup
49
50
  BLACKLIST.each do |tag|
50
51
  h.css(tag).remove
@@ -96,7 +97,6 @@ module Curation
96
97
  end
97
98
 
98
99
  def data
99
- require 'open-uri'
100
100
  URI.open url
101
101
  rescue
102
102
  puts "Impossible to open #{url}"
@@ -1,3 +1,3 @@
1
1
  module Curation
2
- VERSION = "1.0"
2
+ VERSION = "1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curation
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Levy