noticesys 0.1.0 → 0.1.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/noticesys.rb +11 -6
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f52334e0ac6ba38a848d59f0c5c39b30d0897f7b6c3b066339781539ac004a4a
|
|
4
|
+
data.tar.gz: 847c834db47cac18f304e3951307b5f95081349b250861db669f365b1e6e3547
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cea704e02792d97d19637aadd36cadfd6815a00cf41e69e29c69458e72f2f06fd9cda8873d5eeb6666dbab43ab65c75128404d5c6230cbc2359e8de98436c98e
|
|
7
|
+
data.tar.gz: 8c0614e9bcac61516ec4dc7bf3db4cf371fd5141aae862428b854420dc787e6e715d3e9e9f2524494ce30aac079b3e5d239800c408662e3ebcefa5c4f2bb5651
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/noticesys.rb
CHANGED
|
@@ -10,8 +10,8 @@ module NoticeSys
|
|
|
10
10
|
|
|
11
11
|
class Client
|
|
12
12
|
|
|
13
|
-
def initialize(user='', rmagick=nil)
|
|
14
|
-
@user, @rmagick = user, rmagick
|
|
13
|
+
def initialize(user='', rmagick=nil, debug: false)
|
|
14
|
+
@user, @rmagick, @debug = user, rmagick, debug
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# params expected: msg, file1, file2, file3
|
|
@@ -39,16 +39,21 @@ module NoticeSys
|
|
|
39
39
|
|
|
40
40
|
h2 = OgExtractor.new(urls.last).to_h
|
|
41
41
|
|
|
42
|
+
puts 'h2: ' + h2.inspect if @debug
|
|
43
|
+
|
|
42
44
|
if h2 then
|
|
43
45
|
h = {msg: msg, files: files}
|
|
44
46
|
|
|
45
47
|
h[:site]= h2[:url][/https?:\/\/([^\/]+)/,1].sub(/^www\./,'')
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
if h2[:img] then
|
|
50
|
+
tmpfile = Down.download h2[:img]
|
|
51
|
+
files2 = scale_img tmpfile.to_path
|
|
52
|
+
end
|
|
49
53
|
|
|
50
|
-
h[:files] = files2
|
|
51
|
-
h[:card] = {h2[:card] => { title: h2[:title], desc: h2[:desc],
|
|
54
|
+
h[:files] = files2 || []
|
|
55
|
+
h[:card] = {h2[:card] => { title: h2[:title], desc: h2[:desc],
|
|
56
|
+
url: h2[:url]}}
|
|
52
57
|
h[:msg] = msg.sub(urls.last,'')
|
|
53
58
|
|
|
54
59
|
return "notice/%s/json: %s" % [@user, h.to_json]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: noticesys
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
|
35
35
|
iGAgDWBQqM/kdjDslqjBGtyWyFyuYHzXMU1gO/P0aE3rh1enqahZ8BqY+gxXLGrR
|
|
36
36
|
sU+WFV9qPqoqNOG0tOknOZXN
|
|
37
37
|
-----END CERTIFICATE-----
|
|
38
|
-
date: 2021-04-
|
|
38
|
+
date: 2021-04-03 00:00:00.000000000 Z
|
|
39
39
|
dependencies:
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: down
|
|
@@ -66,7 +66,7 @@ dependencies:
|
|
|
66
66
|
version: '0.1'
|
|
67
67
|
- - ">="
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 0.1.
|
|
69
|
+
version: 0.1.3
|
|
70
70
|
type: :runtime
|
|
71
71
|
prerelease: false
|
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -76,7 +76,7 @@ dependencies:
|
|
|
76
76
|
version: '0.1'
|
|
77
77
|
- - ">="
|
|
78
78
|
- !ruby/object:Gem::Version
|
|
79
|
-
version: 0.1.
|
|
79
|
+
version: 0.1.3
|
|
80
80
|
description:
|
|
81
81
|
email: digital.robertson@gmail.com
|
|
82
82
|
executables: []
|
metadata.gz.sig
CHANGED
|
Binary file
|