h2e-rb 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: a97854891480f5241d0c5e673e77dd00f4a2db54
4
- data.tar.gz: 20bbc9d423808232f13f1bdc38619cefdbf52a47
3
+ metadata.gz: c0638936d8279d6b544c77a81fe4555c369bde33
4
+ data.tar.gz: 286983fcf025826b04176e4ffe5e9c3e8dd121df
5
5
  SHA512:
6
- metadata.gz: a03fab1c5c0493f577f02c920ef7fb21c4a8a703dc4eee9e78bb25780b48f5406343db603b750da7310af165e9b08fed4f2dd0d746f8eec3eec83caa4a57ff55
7
- data.tar.gz: 109eeff181002f3886e845644290d3aea70c02d101eb7c55aa2c13d38ce1817b30e305be42ca3c611a1071f060206ca09c80d8b09e3e32da39174702141cea54
6
+ metadata.gz: 3a36bc4e71d9a3bfbbcdf12e39655d623765170c34297f2d81154d02c71fca73c566ae030d592e5b0a286df6029bfad13d6948f2555bdfccd0714be5cabbfb02
7
+ data.tar.gz: 0e3d2b7baf3c490709b20a2bd697acc1a28ab2455008c5048a354bea167c0ae53dfb48f6ec75fc5c163aebd4e726343ad6cb1fc091f452c4d9ae652a5d3eed85
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # H2E
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/h2e`. 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
+ This module provides to convert HTML to ENML.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,11 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ ```ruby
24
+ require 'h2e'
25
+ converer = H2E::Converter.new
26
+ enml = converter.from(html)
27
+ ```
26
28
 
27
29
  ## Development
28
30
 
@@ -32,7 +34,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
34
 
33
35
  ## Contributing
34
36
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/h2e-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/yasuhiroki/h2e-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
38
 
37
39
 
38
40
  ## License
@@ -31,7 +31,7 @@ module H2E
31
31
  end
32
32
  if not @html_base_url.nil?
33
33
  if doc.name == "a"
34
- href = doc.attribute("href").value
34
+ href = doc.attribute("href")&.value
35
35
  if href =~ %r(^/.+)
36
36
  doc.set("href", "#{@html_base_url}#{href}")
37
37
  elsif (href =~ %r(^(http|https)://.+)).nil?
@@ -1,3 +1,3 @@
1
1
  module H2E
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: h2e-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yasuhiroki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-01 00:00:00.000000000 Z
11
+ date: 2017-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oga