mort666-pricetag 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 82b8632164b7f88debbc7cabbee1406b45a6087c
4
+ data.tar.gz: 27f169c236e89e0bfd81813b57a345e2341965a2
5
+ SHA512:
6
+ metadata.gz: c73d81176c92b29cd08bdfd7799d57f142bd5164fcae76b15ab349e0cfb731c8a2d2548b9104953d892f600df3b8b6aae8624457ba212dd73db53bc04709d705
7
+ data.tar.gz: f2509ac420a70628a2ff833519fef6cf38d7f2cefd1d856712ea9651a595bf9eef0763ac9952b7495df8f849fd4bff8f13f1e78e7dcd629b80ee48aff94786b4
@@ -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) - 1)
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
@@ -1,3 +1,3 @@
1
1
  module PriceTag
2
- Version = VERSION = '0.1.10'
2
+ Version = VERSION = '0.1.11'
3
3
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mort666-pricetag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
5
- prerelease:
4
+ version: 0.1.11
6
5
  platform: ruby
7
6
  authors:
8
7
  - Mattt Thompson
@@ -15,92 +14,82 @@ dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: shoulda
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - ">="
21
19
  - !ruby/object:Gem::Version
22
20
  version: '0'
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: bundler
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ~>
32
+ - - "~>"
37
33
  - !ruby/object:Gem::Version
38
34
  version: 1.0.0
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ~>
39
+ - - "~>"
45
40
  - !ruby/object:Gem::Version
46
41
  version: 1.0.0
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: jeweler
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ~>
46
+ - - "~>"
53
47
  - !ruby/object:Gem::Version
54
48
  version: 1.5.1
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ~>
53
+ - - "~>"
61
54
  - !ruby/object:Gem::Version
62
55
  version: 1.5.1
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: rcov
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - ">="
69
61
  - !ruby/object:Gem::Version
70
62
  version: '0'
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - ">="
77
68
  - !ruby/object:Gem::Version
78
69
  version: '0'
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: nokogiri
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ! '>'
74
+ - - ">"
85
75
  - !ruby/object:Gem::Version
86
76
  version: '1.4'
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ! '>'
81
+ - - ">"
93
82
  - !ruby/object:Gem::Version
94
83
  version: '1.4'
95
84
  description: PriceTag converts HTML documents into light markup languages. Currently
96
85
  supports Markdown and Textile.
97
- email: m@mattt.me
86
+ email: m@mattt.me mort666@virus.org
98
87
  executables: []
99
88
  extensions: []
100
89
  extra_rdoc_files:
101
90
  - README.md
102
91
  files:
103
- - .document
92
+ - ".document"
104
93
  - Gemfile
105
94
  - Gemfile.lock
106
95
  - README.md
@@ -117,27 +106,27 @@ files:
117
106
  homepage: http://github.com/mort666/pricetag
118
107
  licenses:
119
108
  - MIT
109
+ metadata: {}
120
110
  post_install_message:
121
111
  rdoc_options: []
122
112
  require_paths:
123
113
  - lib
124
114
  required_ruby_version: !ruby/object:Gem::Requirement
125
- none: false
126
115
  requirements:
127
- - - ! '>='
116
+ - - ">="
128
117
  - !ruby/object:Gem::Version
129
118
  version: '0'
130
119
  required_rubygems_version: !ruby/object:Gem::Requirement
131
- none: false
132
120
  requirements:
133
- - - ! '>='
121
+ - - ">="
134
122
  - !ruby/object:Gem::Version
135
123
  version: '0'
136
124
  requirements: []
137
125
  rubyforge_project:
138
- rubygems_version: 1.8.24
126
+ rubygems_version: 2.4.3
139
127
  signing_key:
140
128
  specification_version: 3
141
129
  summary: Convert HTML into your favorite lightweight markup language
142
130
  test_files:
143
131
  - test/helper.rb
132
+ has_rdoc: