tempsms22 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/lib/tempsms22.rb +3 -2
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: 1faa829158e2c23fc576967dbe414a9aec307f387185dfe9bd78ec0abddea43c
|
|
4
|
+
data.tar.gz: b3dbbe605b322ef388addc03ddc87e7808743c17655a7b8a1bad6db43423c1ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c50027ab5e1a7993d1db279bf98a20c57c8491654c99705edf92bb738e2da12a99a335957061ad0ccf2f46bdedd6fbb9474511f3a72157ee1ae03e146f739a9
|
|
7
|
+
data.tar.gz: 36d71ff2ecceb4e3a7cf170fce417079b8bd9556df460fc2fd9a2413c783977766623fbe8278a9a81c3f66806992332011456f19bedc0f70bbd2f20c43b6c010
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/tempsms22.rb
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
# description: Scrapes the temporary SMS number from receive-smss.com.
|
|
6
6
|
|
|
7
7
|
require 'nokorexi'
|
|
8
|
+
require 'ostruct'
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class TempSMS22
|
|
@@ -23,10 +24,10 @@ class TempSMS22
|
|
|
23
24
|
table = doc.root.element('//table')
|
|
24
25
|
|
|
25
26
|
a = table.xpath('tbody/tr').map do |x|
|
|
26
|
-
x.xpath('td').map {|y| y.plaintext }
|
|
27
|
+
x.xpath('td').map {|y| y.plaintext.strip }
|
|
27
28
|
end
|
|
28
29
|
|
|
29
|
-
a.map {|x| %i(from text date).zip(x).to_h }
|
|
30
|
+
a.map {|x| OpenStruct.new(%i(from text date).zip(x).to_h) }
|
|
30
31
|
|
|
31
32
|
end
|
|
32
33
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|