sinew 2.0.2 → 2.0.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 +4 -4
- data/README.md +4 -0
- data/lib/sinew/dsl.rb +6 -3
- data/lib/sinew/output.rb +7 -0
- data/lib/sinew/version.rb +1 -1
- data/test/test_output.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e40f156ce6a8c625a93dd1cf0f9d60db825977cb352bf736f27b24afbc6bd182
|
4
|
+
data.tar.gz: f4392ccdc53b3cc5d8a07a26fe0aef3525c0e43c3b570ab96465a208ab8c1969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa8dbb122c0ef5665822d08bb62293798873529107609718399307a0a7f31682283f7a0576b9628a4e29475031b999ebd70e07b49ab212b4b5e4002470f568dc
|
7
|
+
data.tar.gz: 9693d9fcd356e0c9e7732c186e18c228a4953117f07b57617e298a0e728e8bf8c31334de56d1ee99b43f8003fb7de0cbf219656d20f58ad68e345dc876cef229
|
data/README.md
CHANGED
@@ -173,6 +173,10 @@ noko.css("table")[4].css("td").select { |i| i[:width].to_i > 80 }.map(&:text)
|
|
173
173
|
|
174
174
|
## Changelog
|
175
175
|
|
176
|
+
#### 2.0.3 (May 2018)
|
177
|
+
|
178
|
+
* & now normalizes to & (not and)
|
179
|
+
|
176
180
|
#### 2.0.2 (May 2018)
|
177
181
|
|
178
182
|
* Support for `--limit`, `--proxy` and the `xml` variable
|
data/lib/sinew/dsl.rb
CHANGED
@@ -52,14 +52,17 @@ module Sinew
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def http(method, url, options = {})
|
55
|
-
#
|
56
|
-
|
57
|
-
instance_variable_set(i, nil)
|
55
|
+
# these need to be cleared before each request
|
56
|
+
%i[@html @noko @xml @json].each do |i|
|
57
|
+
instance_variable_set(i, nil)
|
58
58
|
end
|
59
59
|
|
60
60
|
# fetch and make response available to callers
|
61
61
|
response = sinew.http(method, url, options)
|
62
62
|
@uri, @raw = response.uri, response.body
|
63
|
+
|
64
|
+
# don't confuse the user
|
65
|
+
nil
|
63
66
|
end
|
64
67
|
|
65
68
|
#
|
data/lib/sinew/output.rb
CHANGED
data/lib/sinew/version.rb
CHANGED
data/test/test_output.rb
CHANGED
@@ -47,7 +47,7 @@ class TestOutput < MiniTest::Test
|
|
47
47
|
# convert_accented_html_entities
|
48
48
|
assert_equal('a', output.send(:normalize, 'á'))
|
49
49
|
# convert_miscellaneous_html_entities
|
50
|
-
assert_equal('
|
50
|
+
assert_equal('<&>', output.send(:normalize, '<&>'))
|
51
51
|
# to_ascii
|
52
52
|
assert_equal('cafe', output.send(:normalize, "caf\xc3\xa9"))
|
53
53
|
# squish
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinew
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Doppelt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|