so_far_so_good 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/far +3 -0
- data/lib/so_far_so_good/subpart.rb +2 -2
- data/lib/so_far_so_good/version.rb +1 -1
- data/so_far_so_good.gemspec +1 -1
- data/test/so_far_so_good_bin_test.rb +3 -1
- data/test/so_far_so_good_subpart_test.rb +4 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2ca1e1faee170885d750ae8aa87c30a61df066c
|
4
|
+
data.tar.gz: a79f4c6c6c6dbeab6d07c69adf9a637b991a6ceb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dafecb860e56a9597298eefa47168d583b162d6ec8348abb7acc8ba181dcc4f66aa3cac185bfdca8b6fa27da2454e9f36e26a56f63450c5c819e807c540bcc86
|
7
|
+
data.tar.gz: 877882c0ebcbe79822c0d03937bda564a066641b83ee4405b0429ee984d162144bc4ff299ee229dfb497f5043aeb3e24bd953eb0e6e6816a3dc5cd2a1a948e12
|
data/bin/far
CHANGED
@@ -43,7 +43,7 @@ module SoFarSoGood
|
|
43
43
|
options = {:format => :html}.merge(options)
|
44
44
|
@extract ||= node.css("EXTRACT").inner_html
|
45
45
|
if options[:format] == :markdown
|
46
|
-
ReverseMarkdown.convert @extract
|
46
|
+
ReverseMarkdown.convert @extract, :unknown_tags => :bypass
|
47
47
|
else
|
48
48
|
@extract
|
49
49
|
end
|
@@ -53,7 +53,7 @@ module SoFarSoGood
|
|
53
53
|
options = {:format => :html}.merge(options)
|
54
54
|
@body ||= node.css("> P").to_html
|
55
55
|
if options[:format] == :markdown
|
56
|
-
ReverseMarkdown.convert @body
|
56
|
+
ReverseMarkdown.convert @body, :unknown_tags => :bypass
|
57
57
|
else
|
58
58
|
@body
|
59
59
|
end
|
data/so_far_so_good.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency "nokogiri"
|
22
22
|
spec.add_dependency "terminal-table"
|
23
|
-
spec.add_dependency "reverse_markdown"
|
23
|
+
spec.add_dependency "reverse_markdown", "~> 0.7"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.6"
|
25
25
|
spec.add_development_dependency "rake"
|
26
26
|
spec.add_development_dependency('pry', '~> 0.9')
|
@@ -1,8 +1,10 @@
|
|
1
1
|
require 'helper'
|
2
|
+
require 'open3'
|
2
3
|
|
3
4
|
class TestSoFarSoGoodBin < Minitest::Test
|
4
5
|
should "work via CLI" do
|
5
|
-
output =
|
6
|
+
output, status = Open3.capture2e("bundle", "exec", "bin/far", "52.222-3")
|
7
|
+
assert_equal 0, status.exitstatus
|
6
8
|
assert output.include? "Convict Labor"
|
7
9
|
end
|
8
10
|
end
|
@@ -49,6 +49,10 @@ class TestSoFarSoGoodSubpart < Minitest::Test
|
|
49
49
|
assert_includes @subpart.extract(:format => :markdown), "### Covenant Against Contingent Fees (APR 1984)\n\n(a)"
|
50
50
|
end
|
51
51
|
|
52
|
+
should "not pass unknown tags in markdown" do
|
53
|
+
refute_match /gpotable/, SoFarSoGood["52.225-4"].extract(:format => :markdown)
|
54
|
+
end
|
55
|
+
|
52
56
|
should "build the link" do
|
53
57
|
assert_equal "http://www.law.cornell.edu/cfr/text/48/52.203-5", @subpart.link
|
54
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: so_far_so_good
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: reverse_markdown
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '0.7'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '0.7'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|