html_to_ansi 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: faf7abed42e123a51749b6b623336e43ad227c4d0318d0322a6eaef890988312
4
- data.tar.gz: 4dcc23dbca613db1b3afb96909725027572080bdf2dfca6841c8815c869af9fd
3
+ metadata.gz: 39bcd17b0bcd685c4eebb8a0032275f206b8abdf54497206624c79037d3d7b82
4
+ data.tar.gz: 442976231587a0f3a2698c88f97a4d4ac655984288e497b5933b961ad1860b10
5
5
  SHA512:
6
- metadata.gz: 117a42d669b76e50e31a9fca72af4f193ce0b4e89f293be0879ae476e6472882da8b037d0ae49b35c89ba5e2c61cd5d0a7ae847b40445ad9e2b874f2844755b7
7
- data.tar.gz: fd1ef67c61cc24b1b48c5fae5c5706b9348004764a1e0f9f54ba46a6307ee1c05ab3e4374b913daf08c697c5c8c56d8bd9af49f292cf793e50a050aeba781f37
6
+ metadata.gz: 5bf9a12a87d570c6d96858b7f861cc418c3ba20efe02b1d446bbbd27b3afa28bf99d4e249689a40a8c3aa8b69f7a02e62a1bce74847fab8fc386b5fef3d463f8
7
+ data.tar.gz: e446843d4ad9b1fe3da80e0c0b56c66ad305d08128a37396877302c63910c5042e130c6227059e880b2648c12f55997c99b88d7344154d814dd6b4269ee9312e
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ Gemfile.lock
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # HtmlToAnsi
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/html_to_ansi`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Generate ANSI text with escape sequences to emulate basic HTML formatting.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,17 +20,62 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ ### Paragraphs
24
+
25
+ Code:
26
+
27
+ ```ruby
28
+ HtmlToAnsi.convert(%(
29
+ <p>First paragraph</p>
30
+ <p>Second paragraph</p>
31
+ ))
32
+ ```
33
+
34
+ Output:
35
+
36
+ > First paragraph
37
+ >
38
+ > Second paragraph
39
+
40
+ ### Ordered List
41
+
42
+ Code:
26
43
 
27
- ## Development
44
+ ```ruby
45
+ HtmlToAnsi.convert(%(
46
+ <ul>
47
+ <li>One</li>
48
+ <li>Two</li>
49
+ </ul>
50
+ ))
51
+ ```
52
+
53
+ Output:
54
+
55
+ > 1. One
56
+ > 2. Two
57
+
58
+ ### Unordered List
59
+
60
+ Code:
61
+
62
+ ```ruby
63
+ HtmlToAnsi.convert(%(
64
+ <ul>
65
+ <li>One</li>
66
+ <li>Two</li>
67
+ </ul>
68
+ ))
69
+ ```
28
70
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
71
+ Output:
30
72
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
73
+ > * One
74
+ > * Two
32
75
 
33
76
  ## Contributing
34
77
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/html_to_ansi.
78
+ Bug reports and pull requests are welcome on GitHub at https://github.com/castwide/html_to_ansi.
36
79
 
37
80
  ## License
38
81
 
data/html_to_ansi.gemspec CHANGED
@@ -21,6 +21,8 @@ Gem::Specification.new do |spec|
21
21
  end
22
22
  spec.require_paths = ["lib"]
23
23
 
24
+ spec.add_dependency 'rexml', '~> 3.2'
25
+
24
26
  spec.add_development_dependency "bundler", "~> 2.0"
25
27
  spec.add_development_dependency "rake", "~> 10.0"
26
28
  spec.add_development_dependency "rspec", "~> 3.0"
@@ -1,3 +1,3 @@
1
1
  module HtmlToAnsi
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_to_ansi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-17 00:00:00.000000000 Z
11
+ date: 2023-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rexml
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -77,7 +91,6 @@ files:
77
91
  - ".rspec"
78
92
  - ".travis.yml"
79
93
  - Gemfile
80
- - Gemfile.lock
81
94
  - LICENSE.txt
82
95
  - README.md
83
96
  - Rakefile
@@ -92,7 +105,7 @@ homepage: http://castwide.com
92
105
  licenses:
93
106
  - MIT
94
107
  metadata: {}
95
- post_install_message:
108
+ post_install_message:
96
109
  rdoc_options: []
97
110
  require_paths:
98
111
  - lib
@@ -107,8 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
120
  - !ruby/object:Gem::Version
108
121
  version: '0'
109
122
  requirements: []
110
- rubygems_version: 3.0.3
111
- signing_key:
123
+ rubygems_version: 3.3.7
124
+ signing_key:
112
125
  specification_version: 4
113
126
  summary: HTML to ANSI conversion tool
114
127
  test_files: []
data/Gemfile.lock DELETED
@@ -1,43 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- html_to_ansi (0.1.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- diff-lcs (1.3)
10
- docile (1.3.1)
11
- json (2.2.0)
12
- rake (10.5.0)
13
- rspec (3.8.0)
14
- rspec-core (~> 3.8.0)
15
- rspec-expectations (~> 3.8.0)
16
- rspec-mocks (~> 3.8.0)
17
- rspec-core (3.8.0)
18
- rspec-support (~> 3.8.0)
19
- rspec-expectations (3.8.2)
20
- diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.8.0)
22
- rspec-mocks (3.8.0)
23
- diff-lcs (>= 1.2.0, < 2.0)
24
- rspec-support (~> 3.8.0)
25
- rspec-support (3.8.0)
26
- simplecov (0.16.1)
27
- docile (~> 1.1)
28
- json (>= 1.8, < 3)
29
- simplecov-html (~> 0.10.0)
30
- simplecov-html (0.10.2)
31
-
32
- PLATFORMS
33
- x64-mingw32
34
-
35
- DEPENDENCIES
36
- bundler (~> 2.0)
37
- html_to_ansi!
38
- rake (~> 10.0)
39
- rspec (~> 3.0)
40
- simplecov (~> 0.14)
41
-
42
- BUNDLED WITH
43
- 2.0.1