mort666-pricetag 0.1.11 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -4
- data/Gemfile.lock +67 -11
- data/Rakefile +1 -18
- data/lib/pricetag/processors/markdown.rb +9 -9
- data/lib/pricetag/version.rb +1 -1
- metadata +9 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36a122661b4c96424d32a11bc1c9b75f35241dd5
|
4
|
+
data.tar.gz: 21bd78be9fd5efd549befc160550125b6a04118b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa2ef6c43c1df5b9fdcb570e1369f67a009356c7507d785c5d8d93ff6e72b29fcfe90529408aa2dc4b1e999e6303e2041ff29787989b159c96c17bf4f7cb6e37
|
7
|
+
data.tar.gz: 1c425c17f3bb808afe7bac7d75337786e501f9883b2a20d864e68c0689959c34bfa17f44229c6a5d7e0cea95d939db09ca975b7c9075b08a6065fbf07dd8cc2a
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,22 +1,78 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
activesupport (5.1.3)
|
5
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
6
|
+
i18n (~> 0.7)
|
7
|
+
minitest (~> 5.1)
|
8
|
+
tzinfo (~> 1.1)
|
9
|
+
addressable (2.4.0)
|
10
|
+
builder (3.2.3)
|
11
|
+
concurrent-ruby (1.0.5)
|
12
|
+
descendants_tracker (0.0.4)
|
13
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
14
|
+
faraday (0.9.2)
|
15
|
+
multipart-post (>= 1.2, < 3)
|
16
|
+
git (1.3.0)
|
17
|
+
github_api (0.16.0)
|
18
|
+
addressable (~> 2.4.0)
|
19
|
+
descendants_tracker (~> 0.0.4)
|
20
|
+
faraday (~> 0.8, < 0.10)
|
21
|
+
hashie (>= 3.4)
|
22
|
+
mime-types (>= 1.16, < 3.0)
|
23
|
+
oauth2 (~> 1.0)
|
24
|
+
hashie (3.5.6)
|
25
|
+
highline (1.7.8)
|
26
|
+
i18n (0.8.6)
|
27
|
+
jeweler (2.3.7)
|
28
|
+
builder
|
29
|
+
bundler (>= 1)
|
7
30
|
git (>= 1.2.5)
|
31
|
+
github_api (~> 0.16.0)
|
32
|
+
highline (>= 1.6.15)
|
33
|
+
nokogiri (>= 1.5.10)
|
34
|
+
psych (~> 2.2)
|
8
35
|
rake
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
36
|
+
rdoc
|
37
|
+
semver2
|
38
|
+
jwt (1.5.6)
|
39
|
+
mime-types (2.99.3)
|
40
|
+
mini_portile2 (2.2.0)
|
41
|
+
minitest (5.10.3)
|
42
|
+
multi_json (1.12.2)
|
43
|
+
multi_xml (0.6.0)
|
44
|
+
multipart-post (2.0.0)
|
45
|
+
nokogiri (1.8.0)
|
46
|
+
mini_portile2 (~> 2.2.0)
|
47
|
+
oauth2 (1.4.0)
|
48
|
+
faraday (>= 0.8, < 0.13)
|
49
|
+
jwt (~> 1.0)
|
50
|
+
multi_json (~> 1.3)
|
51
|
+
multi_xml (~> 0.5)
|
52
|
+
rack (>= 1.2, < 3)
|
53
|
+
psych (2.2.4)
|
54
|
+
rack (2.0.3)
|
55
|
+
rake (12.0.0)
|
56
|
+
rdoc (5.1.0)
|
57
|
+
semver2 (3.4.2)
|
58
|
+
shoulda (3.5.0)
|
59
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
60
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
61
|
+
shoulda-context (1.2.2)
|
62
|
+
shoulda-matchers (2.8.0)
|
63
|
+
activesupport (>= 3.0.0)
|
64
|
+
thread_safe (0.3.6)
|
65
|
+
tzinfo (1.2.3)
|
66
|
+
thread_safe (~> 0.1)
|
13
67
|
|
14
68
|
PLATFORMS
|
15
69
|
ruby
|
16
70
|
|
17
71
|
DEPENDENCIES
|
18
|
-
bundler
|
19
|
-
jeweler
|
20
|
-
nokogiri (~> 1.
|
21
|
-
rcov
|
72
|
+
bundler
|
73
|
+
jeweler
|
74
|
+
nokogiri (~> 1.8.0)
|
22
75
|
shoulda
|
76
|
+
|
77
|
+
BUNDLED WITH
|
78
|
+
1.14.6
|
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ Jeweler::Tasks.new do |gem|
|
|
18
18
|
gem.description = "PriceTag converts HTML documents into light markup languages. Currently supports Markdown and Textile."
|
19
19
|
gem.email = "m@mattt.me"
|
20
20
|
gem.authors = ["Mattt Thompson"]
|
21
|
-
|
21
|
+
|
22
22
|
gem.add_development_dependency 'nokogiri', '> 1.4'
|
23
23
|
end
|
24
24
|
Jeweler::RubygemsDotOrgTasks.new
|
@@ -30,21 +30,4 @@ Rake::TestTask.new(:test) do |test|
|
|
30
30
|
test.verbose = true
|
31
31
|
end
|
32
32
|
|
33
|
-
require 'rcov/rcovtask'
|
34
|
-
Rcov::RcovTask.new do |test|
|
35
|
-
test.libs << 'test'
|
36
|
-
test.pattern = 'test/**/test_*.rb'
|
37
|
-
test.verbose = true
|
38
|
-
end
|
39
|
-
|
40
33
|
task :default => :test
|
41
|
-
|
42
|
-
require 'rake/rdoctask'
|
43
|
-
Rake::RDocTask.new do |rdoc|
|
44
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
45
|
-
|
46
|
-
rdoc.rdoc_dir = 'rdoc'
|
47
|
-
rdoc.title = "pricetag #{version}"
|
48
|
-
rdoc.rdoc_files.include('README*')
|
49
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
50
|
-
end
|
@@ -13,11 +13,11 @@ module PriceTag
|
|
13
13
|
|
14
14
|
PriceTag::Document.class_eval do
|
15
15
|
include PriceTag::Processors
|
16
|
-
|
16
|
+
|
17
17
|
def to_markdown(options = {})
|
18
18
|
options[:heading_style] ||= :atx
|
19
19
|
options[:link_style] ||= :reference
|
20
|
-
|
20
|
+
|
21
21
|
@markdown ||= @xml.dup
|
22
22
|
@markdown.search("root > *").each do |node|
|
23
23
|
Markdown::process!(node, options)
|
@@ -39,12 +39,12 @@ module PriceTag
|
|
39
39
|
output << " \"#{title}\"" if title and title != ""
|
40
40
|
output << "\n"
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
return output
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
private
|
47
|
-
|
47
|
+
|
48
48
|
def text_for_node(node, options = {})
|
49
49
|
case tag = node.name.to_sym
|
50
50
|
when :h1, :h2, :h3, :h4, :h5, :h6
|
@@ -60,7 +60,7 @@ module PriceTag
|
|
60
60
|
"#{octothorps} #{node.text}\n"
|
61
61
|
end
|
62
62
|
when :li
|
63
|
-
indentation = "\t" * (indentation_level_for_list_item(node)
|
63
|
+
indentation = "\t" * (indentation_level_for_list_item(node) - 1)
|
64
64
|
if node.parent.name == "ol"
|
65
65
|
position = node['data-position']
|
66
66
|
"#{indentation}#{position}. #{node.text}"
|
@@ -112,9 +112,9 @@ module PriceTag
|
|
112
112
|
" \n"
|
113
113
|
when :td, :th
|
114
114
|
"#{node.text}|"
|
115
|
-
when :thead
|
115
|
+
when :thead
|
116
116
|
"#{node.text}|----------|----------|\n"
|
117
|
-
when :table, :tbody, :tfooter
|
117
|
+
when :table, :tbody, :tfooter
|
118
118
|
"#{node.text}"
|
119
119
|
when :tr
|
120
120
|
"|#{node.text.gsub("\n","")}\n"
|
@@ -129,4 +129,4 @@ module PriceTag
|
|
129
129
|
end
|
130
130
|
end
|
131
131
|
end
|
132
|
-
end
|
132
|
+
end
|
data/lib/pricetag/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mort666-pricetag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattt Thompson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
@@ -29,58 +29,44 @@ dependencies:
|
|
29
29
|
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 1.0.0
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 1.0.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: jeweler
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - ">"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: 1.5.1
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - "
|
53
|
+
- - ">"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 1.5.1
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: rcov
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0'
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
56
|
- !ruby/object:Gem::Dependency
|
71
57
|
name: nokogiri
|
72
58
|
requirement: !ruby/object:Gem::Requirement
|
73
59
|
requirements:
|
74
60
|
- - ">"
|
75
61
|
- !ruby/object:Gem::Version
|
76
|
-
version: '1.
|
62
|
+
version: '1.8'
|
77
63
|
type: :development
|
78
64
|
prerelease: false
|
79
65
|
version_requirements: !ruby/object:Gem::Requirement
|
80
66
|
requirements:
|
81
67
|
- - ">"
|
82
68
|
- !ruby/object:Gem::Version
|
83
|
-
version: '1.
|
69
|
+
version: '1.8'
|
84
70
|
description: PriceTag converts HTML documents into light markup languages. Currently
|
85
71
|
supports Markdown and Textile.
|
86
72
|
email: m@mattt.me mort666@virus.org
|
@@ -123,10 +109,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
109
|
version: '0'
|
124
110
|
requirements: []
|
125
111
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.6.12
|
127
113
|
signing_key:
|
128
114
|
specification_version: 3
|
129
115
|
summary: Convert HTML into your favorite lightweight markup language
|
130
116
|
test_files:
|
131
117
|
- test/helper.rb
|
132
|
-
has_rdoc:
|