micromicro 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +3 -3
- data/README.md +14 -13
- data/lib/micro_micro/collections/relationships_collection.rb +2 -2
- data/lib/micro_micro/document.rb +6 -6
- data/lib/micro_micro/item.rb +2 -2
- data/lib/micro_micro/parsers/base_property_parser.rb +2 -2
- data/lib/micro_micro/parsers/date_time_parser.rb +1 -1
- data/lib/micro_micro/parsers/date_time_property_parser.rb +3 -3
- data/lib/micro_micro/parsers/embedded_markup_property_parser.rb +1 -1
- data/lib/micro_micro/parsers/implied_name_property_parser.rb +1 -1
- data/lib/micro_micro/parsers/implied_photo_property_parser.rb +2 -2
- data/lib/micro_micro/parsers/implied_url_property_parser.rb +1 -1
- data/lib/micro_micro/parsers/plain_text_property_parser.rb +1 -1
- data/lib/micro_micro/parsers/url_property_parser.rb +3 -3
- data/lib/micro_micro/parsers/value_class_pattern_parser.rb +2 -2
- data/lib/micro_micro/version.rb +1 -1
- data/lib/micromicro.rb +1 -1
- data/micromicro.gemspec +7 -7
- metadata +12 -24
- data/.editorconfig +0 -14
- data/.gitignore +0 -34
- data/.gitmodules +0 -3
- data/.reek.yml +0 -8
- data/.rspec +0 -2
- data/.rubocop +0 -3
- data/.rubocop.yml +0 -25
- data/.ruby-version +0 -1
- data/.simplecov +0 -13
- data/.travis.yml +0 -19
- data/Gemfile +0 -14
- data/Rakefile +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 468713aa68dff8d4c8cf860b8b66e973edc430d44ad246f0079ac0a66cfed10f
|
4
|
+
data.tar.gz: ca17b8077a3934e23c73664ddaba7bd4e3a3e481cea778137fad5870fb6a9734
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccd1d37c3b516590e84b6e28369bf90acd000b9ada071c10554cecfdeab190416efc1b8d1fca14615c78350d4608c1972d4d45939756c2bbd2dc7b097a25285f
|
7
|
+
data.tar.gz: ec458a5204f172e33eefdee4898f1d98c7cf21d14772d6cb91f0c3e75645c0d55807057cbc6d1b11828b12cd84bf4eb0522b8c093607e28b6461696eb4bbd73f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.1.0 / 2021-06-10
|
4
|
+
|
5
|
+
- Replace Absolutely dependency with Addressable (e93721b)
|
6
|
+
- Add support for Ruby 3.0 (d897c54)
|
7
|
+
- Update development Ruby version to 2.5.9 (051c9ad)
|
8
|
+
|
3
9
|
## 1.0.0 / 2020-11-08
|
4
10
|
|
5
11
|
- Add `MicroMicro::Item#plain_text_properties` and `MicroMicro::Item#url_properties` methods (351e1f1)
|
data/CONTRIBUTING.md
CHANGED
@@ -8,9 +8,9 @@ There are a couple ways you can help improve MicroMicro:
|
|
8
8
|
|
9
9
|
## Getting Started
|
10
10
|
|
11
|
-
MicroMicro is developed using Ruby 2.5.
|
11
|
+
MicroMicro is developed using Ruby 2.5.9 and is additionally tested against Ruby 2.6, 2.7, and 3.0 using [CircleCI](https://app.circleci.com/pipelines/github/jgarber623/micromicro).
|
12
12
|
|
13
|
-
Before making changes to MicroMicro, you'll want to install Ruby 2.5.
|
13
|
+
Before making changes to MicroMicro, you'll want to install Ruby 2.5.9. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm). Once you've installed Ruby 2.5.9 using your method of choice, install the project's gems by running:
|
14
14
|
|
15
15
|
```sh
|
16
16
|
bundle install
|
@@ -22,7 +22,7 @@ bundle install
|
|
22
22
|
1. Install development dependencies as outlined above.
|
23
23
|
1. Create a feature branch for the code changes you're looking to make: `git checkout -b my-new-feature`.
|
24
24
|
1. _Write some code!_
|
25
|
-
1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `
|
25
|
+
1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bin/ci`.
|
26
26
|
1. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`. _(See [this excellent article](https://chris.beams.io/posts/git-commit/) for tips on writing useful Git commit messages.)_
|
27
27
|
1. Push the branch to your fork: `git push -u origin my-new-feature`.
|
28
28
|
1. Create a new [pull request][pulls] and we'll review your changes.
|
data/README.md
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
# MicroMicro
|
2
2
|
|
3
|
-
**A Ruby gem for extracting [microformats2](
|
3
|
+
**A Ruby gem for extracting [microformats2](https://microformats.org/wiki/microformats2)-encoded data from HTML documents.**
|
4
4
|
|
5
|
-
[](https://rubygems.org/gems/micromicro)
|
6
|
+
[](https://rubygems.org/gems/micromicro)
|
7
|
+
[](https://app.circleci.com/pipelines/github/jgarber623/micromicro)
|
8
|
+
[](https://codeclimate.com/github/jgarber623/micromicro)
|
9
|
+
[](https://codeclimate.com/github/jgarber623/micromicro/code)
|
9
10
|
|
10
11
|
## Key Features
|
11
12
|
|
12
|
-
- Parses microformats2-encoded HTML documents according to the [microformats2 parsing specification](
|
13
|
+
- Parses microformats2-encoded HTML documents according to the [microformats2 parsing specification](https://microformats.org/wiki/microformats2-parsing)
|
13
14
|
- Passes all microformats2 tests from [the official test suite](https://github.com/microformats/tests)¹
|
14
15
|
- Supports Ruby 2.5 and newer
|
15
16
|
|
16
|
-
**Note:** MicroMicro **does not** parse [Classic Microformats](
|
17
|
+
**Note:** MicroMicro **does not** parse [Classic Microformats](https://microformats.org/wiki/Main_Page#Classic_Microformats) (referred to in [the parsing specification](https://microformats.org/wiki/microformats2-parsing#note_backward_compatibility_details) as "backcompat root classes" and "backcompat properties" and in vocabulary specifications in the "Parser Compatibility" sections [e.g. [h-entry](https://microformats.org/wiki/h-entry#Parser_Compatibility)]). To parse documents marked up with Classic Microformats, consider using [the official microformats-ruby parser](https://github.com/microformats/microformats-ruby).
|
17
18
|
|
18
19
|
<small>¹ …with some exceptions until [this pull request](https://github.com/microformats/tests/pull/112) is merged.</small>
|
19
20
|
|
@@ -21,7 +22,7 @@
|
|
21
22
|
|
22
23
|
Before installing and using MicroMicro, you'll want to have [Ruby](https://www.ruby-lang.org) 2.5 (or newer) installed. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm).
|
23
24
|
|
24
|
-
MicroMicro is developed using Ruby 2.5.
|
25
|
+
MicroMicro is developed using Ruby 2.5.9 and is additionally tested against Ruby 2.6, 2.7, and 3.0 using [CircleCI](https://app.circleci.com/pipelines/github/jgarber623/micromicro).
|
25
26
|
|
26
27
|
## Installation
|
27
28
|
|
@@ -64,10 +65,10 @@ The `Hash` produced by calling `doc.to_h` may be converted to JSON (e.g. `doc.to
|
|
64
65
|
Another example pulling the source HTML from [Tantek](https://tantek.com)'s website:
|
65
66
|
|
66
67
|
```ruby
|
67
|
-
require
|
68
|
-
require
|
68
|
+
require 'net/http'
|
69
|
+
require 'micromicro'
|
69
70
|
|
70
|
-
url =
|
71
|
+
url = 'https://tantek.com'
|
71
72
|
rsp = Net::HTTP.get(URI.parse(url))
|
72
73
|
|
73
74
|
doc = MicroMicro.parse(rsp, url)
|
@@ -144,11 +145,11 @@ doc.relationships.find { |relationship| relationship.rels.include?('webmention')
|
|
144
145
|
|
145
146
|
## Contributing
|
146
147
|
|
147
|
-
Interested in helping improve MicroMicro? Awesome! Your help is greatly appreciated. See [CONTRIBUTING.md](https://github.com/jgarber623/micromicro/blob/
|
148
|
+
Interested in helping improve MicroMicro? Awesome! Your help is greatly appreciated. See [CONTRIBUTING.md](https://github.com/jgarber623/micromicro/blob/main/CONTRIBUTING.md) for details.
|
148
149
|
|
149
150
|
## Acknowledgments
|
150
151
|
|
151
|
-
MicroMicro wouldn't exist without the hard work of everyone involved in the [microformats](
|
152
|
+
MicroMicro wouldn't exist without the hard work of everyone involved in the [microformats](https://microformats.org) community. Additionally, the comprehensive [microformats test suite](https://github.com/microformats/tests) was invaluable in the development of this Ruby gem.
|
152
153
|
|
153
154
|
MicroMicro is written and maintained by [Jason Garber](https://sixtwothree.org).
|
154
155
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module MicroMicro
|
2
2
|
module Collections
|
3
3
|
class RelationshipsCollection < BaseCollection
|
4
|
-
# @see
|
4
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parse_a_hyperlink_element_for_rel_microformats
|
5
5
|
#
|
6
6
|
# @return [Hash{Symbol => Hash{Symbol => Array, String}}]
|
7
7
|
def group_by_url
|
8
8
|
group_by(&:href).symbolize_keys.transform_values { |relationships| relationships.first.to_h.slice!(:href) }
|
9
9
|
end
|
10
10
|
|
11
|
-
# @see
|
11
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parse_a_hyperlink_element_for_rel_microformats
|
12
12
|
#
|
13
13
|
# @return [Hash{Symbol => Array<String>}]
|
14
14
|
def group_by_rel
|
data/lib/micro_micro/document.rb
CHANGED
@@ -65,7 +65,7 @@ module MicroMicro
|
|
65
65
|
|
66
66
|
# Return the parsed document as a Hash.
|
67
67
|
#
|
68
|
-
# @see
|
68
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parse_a_document_for_microformats
|
69
69
|
#
|
70
70
|
# @return [Hash{Symbol => Array, Hash}]
|
71
71
|
def to_h
|
@@ -91,8 +91,8 @@ module MicroMicro
|
|
91
91
|
%w[script style template]
|
92
92
|
end
|
93
93
|
|
94
|
-
# @see
|
95
|
-
# @see
|
94
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parse_an_element_for_properties
|
95
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
|
96
96
|
#
|
97
97
|
# @param context [Nokogiri::HTML::Document, Nokogiri::XML::NodeSet, Nokogiri::XML::Element]
|
98
98
|
# @yield [context]
|
@@ -122,7 +122,7 @@ module MicroMicro
|
|
122
122
|
def resolve_relative_urls
|
123
123
|
HTML_URL_ATTRIBUTES_MAP.each do |attribute, names|
|
124
124
|
document.xpath(*names.map { |name| "//#{name}[@#{attribute}]" }).each do |node|
|
125
|
-
node[attribute] =
|
125
|
+
node[attribute] = Addressable::URI.join(resolved_base_url, node[attribute].strip).normalize.to_s
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
@@ -130,7 +130,7 @@ module MicroMicro
|
|
130
130
|
document.xpath(*names.map { |name| "//#{name}[@#{attribute}]" }).each do |node|
|
131
131
|
candidates = node[attribute].split(',').map(&:strip).map { |candidate| candidate.match(/^(?<url>.+?)(?<descriptor>\s+.+)?$/) }
|
132
132
|
|
133
|
-
node[attribute] = candidates.map { |candidate| "#{
|
133
|
+
node[attribute] = candidates.map { |candidate| "#{Addressable::URI.join(resolved_base_url, candidate[:url]).normalize}#{candidate[:descriptor]}" }.join(', ')
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
@@ -141,7 +141,7 @@ module MicroMicro
|
|
141
141
|
def resolved_base_url
|
142
142
|
@resolved_base_url ||= begin
|
143
143
|
if base_element
|
144
|
-
|
144
|
+
Addressable::URI.join(base_url, base_element['href'].strip).normalize.to_s
|
145
145
|
else
|
146
146
|
base_url
|
147
147
|
end
|
data/lib/micro_micro/item.rb
CHANGED
@@ -15,7 +15,7 @@ module MicroMicro
|
|
15
15
|
|
16
16
|
# A collection of child items parsed from the node.
|
17
17
|
#
|
18
|
-
# @see
|
18
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parse_an_element_for_class_microformats
|
19
19
|
#
|
20
20
|
# @return [MicroMicro::Collections::ItemsCollection]
|
21
21
|
def children
|
@@ -50,7 +50,7 @@ module MicroMicro
|
|
50
50
|
|
51
51
|
# Return the parsed item as a Hash.
|
52
52
|
#
|
53
|
-
# @see
|
53
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parse_an_element_for_class_microformats
|
54
54
|
#
|
55
55
|
# @return [Hash]
|
56
56
|
def to_h
|
@@ -7,8 +7,8 @@ module MicroMicro
|
|
7
7
|
@node = property.node
|
8
8
|
end
|
9
9
|
|
10
|
-
# @see
|
11
|
-
# @see
|
10
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parsing_a_p-_property
|
11
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property
|
12
12
|
#
|
13
13
|
# @return [String]
|
14
14
|
def value
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module MicroMicro
|
2
2
|
module Parsers
|
3
3
|
class DateTimeParser
|
4
|
-
# @see
|
4
|
+
# @see https://microformats.org/wiki/value-class-pattern#Date_and_time_parsing
|
5
5
|
#
|
6
6
|
# Regexp pattern matching YYYY-MM-DD and YYY-DDD
|
7
7
|
DATE_REGEXP_PATTERN = '(?<year>\d{4})-((?<ordinal>3[0-6]{2}|[0-2]\d{2})|(?<month>0\d|1[0-2])-(?<day>3[0-1]|[0-2]\d))'.freeze
|
@@ -7,7 +7,7 @@ module MicroMicro
|
|
7
7
|
'value' => %w[data input]
|
8
8
|
}.freeze
|
9
9
|
|
10
|
-
# @see
|
10
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parsing_a_dt-_property
|
11
11
|
#
|
12
12
|
# @return [String]
|
13
13
|
def value
|
@@ -16,7 +16,7 @@ module MicroMicro
|
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
|
-
# @see
|
19
|
+
# @see https://microformats.org/wiki/value-class-pattern#microformats2_parsers_implied_date
|
20
20
|
#
|
21
21
|
# @return [MicroMicro::Parsers::DateTimeParser, nil]
|
22
22
|
def adopted_date_time_parser
|
@@ -37,7 +37,7 @@ module MicroMicro
|
|
37
37
|
@date_time_parser ||= DateTimeParser.new(ValueClassPatternParser.new(node, ' ').value)
|
38
38
|
end
|
39
39
|
|
40
|
-
# @see
|
40
|
+
# @see https://microformats.org/wiki/value-class-pattern#microformats2_parsers_implied_date
|
41
41
|
#
|
42
42
|
# @return [Boolean]
|
43
43
|
def imply_date?
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module MicroMicro
|
2
2
|
module Parsers
|
3
3
|
class EmbeddedMarkupPropertyParser < BasePropertyParser
|
4
|
-
# @see
|
4
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property
|
5
5
|
#
|
6
6
|
# @return [Hash{Symbol => String}]
|
7
7
|
def value
|
@@ -6,7 +6,7 @@ module MicroMicro
|
|
6
6
|
'title' => %w[abbr]
|
7
7
|
}.freeze
|
8
8
|
|
9
|
-
# @see
|
9
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
|
10
10
|
#
|
11
11
|
# @return [String]
|
12
12
|
def value
|
@@ -6,8 +6,8 @@ module MicroMicro
|
|
6
6
|
'object' => 'data'
|
7
7
|
}.freeze
|
8
8
|
|
9
|
-
# @see
|
10
|
-
# @see
|
9
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
|
10
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parse_an_img_element_for_src_and_alt
|
11
11
|
#
|
12
12
|
# @return [String, Hash{Symbol => String}, nil]
|
13
13
|
def value
|
@@ -6,7 +6,7 @@ module MicroMicro
|
|
6
6
|
'area' => 'href'
|
7
7
|
}.freeze
|
8
8
|
|
9
|
-
# @see
|
9
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
|
10
10
|
#
|
11
11
|
# @return [String, nil]
|
12
12
|
def value
|
@@ -13,8 +13,8 @@ module MicroMicro
|
|
13
13
|
'value' => %w[data input]
|
14
14
|
}.freeze
|
15
15
|
|
16
|
-
# @see
|
17
|
-
# @see
|
16
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parsing_a_u-_property
|
17
|
+
# @see https://microformats.org/wiki/microformats2-parsing#parse_an_img_element_for_src_and_alt
|
18
18
|
#
|
19
19
|
# @return [String, Hash{Symbol => String}]
|
20
20
|
def value
|
@@ -42,7 +42,7 @@ module MicroMicro
|
|
42
42
|
|
43
43
|
# @return [String]
|
44
44
|
def resolved_value
|
45
|
-
@resolved_value ||=
|
45
|
+
@resolved_value ||= Addressable::URI.join(node.document.url, unresolved_value.strip).to_s
|
46
46
|
end
|
47
47
|
|
48
48
|
# @return [String]
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module MicroMicro
|
2
2
|
module Parsers
|
3
3
|
class ValueClassPatternParser
|
4
|
-
# @see
|
5
|
-
# @see
|
4
|
+
# @see https://microformats.org/wiki/value-class-pattern#Basic_Parsing
|
5
|
+
# @see https://microformats.org/wiki/value-class-pattern#Date_and_time_values
|
6
6
|
HTML_ATTRIBUTES_MAP = {
|
7
7
|
'alt' => %w[area img],
|
8
8
|
'value' => %w[data],
|
data/lib/micro_micro/version.rb
CHANGED
data/lib/micromicro.rb
CHANGED
data/micromicro.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative 'lib/micro_micro/version'
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '<
|
4
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4')
|
5
5
|
|
6
6
|
spec.name = 'micromicro'
|
7
7
|
spec.version = MicroMicro::VERSION
|
@@ -13,16 +13,16 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = 'https://github.com/jgarber623/micromicro'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
|
-
spec.files = Dir.
|
17
|
-
|
18
|
-
|
16
|
+
spec.files = Dir['lib/**/*'].reject { |f| File.directory?(f) }
|
17
|
+
spec.files += %w[LICENSE CHANGELOG.md CONTRIBUTING.md README.md]
|
18
|
+
spec.files += %w[micromicro.gemspec]
|
19
19
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
|
23
23
|
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md"
|
24
24
|
|
25
|
-
spec.add_runtime_dependency '
|
26
|
-
spec.add_runtime_dependency 'activesupport', '~> 6.
|
27
|
-
spec.add_runtime_dependency 'nokogiri', '~> 1.
|
25
|
+
spec.add_runtime_dependency 'addressable', '~> 2.7'
|
26
|
+
spec.add_runtime_dependency 'activesupport', '~> 6.1'
|
27
|
+
spec.add_runtime_dependency 'nokogiri', '~> 1.11'
|
28
28
|
end
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: micromicro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Garber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: addressable
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '6.
|
33
|
+
version: '6.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '6.
|
40
|
+
version: '6.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.11'
|
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: '1.
|
54
|
+
version: '1.11'
|
55
55
|
description: Extract microformats2-encoded data from HTML documents.
|
56
56
|
email:
|
57
57
|
- jason@sixtwothree.org
|
@@ -59,22 +59,10 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- ".editorconfig"
|
63
|
-
- ".gitignore"
|
64
|
-
- ".gitmodules"
|
65
|
-
- ".reek.yml"
|
66
|
-
- ".rspec"
|
67
|
-
- ".rubocop"
|
68
|
-
- ".rubocop.yml"
|
69
|
-
- ".ruby-version"
|
70
|
-
- ".simplecov"
|
71
|
-
- ".travis.yml"
|
72
62
|
- CHANGELOG.md
|
73
63
|
- CONTRIBUTING.md
|
74
|
-
- Gemfile
|
75
64
|
- LICENSE
|
76
65
|
- README.md
|
77
|
-
- Rakefile
|
78
66
|
- lib/micro_micro/collectible.rb
|
79
67
|
- lib/micro_micro/collections/base_collection.rb
|
80
68
|
- lib/micro_micro/collections/items_collection.rb
|
@@ -103,7 +91,7 @@ licenses:
|
|
103
91
|
- MIT
|
104
92
|
metadata:
|
105
93
|
bug_tracker_uri: https://github.com/jgarber623/micromicro/issues
|
106
|
-
changelog_uri: https://github.com/jgarber623/micromicro/blob/v1.
|
94
|
+
changelog_uri: https://github.com/jgarber623/micromicro/blob/v1.1.0/CHANGELOG.md
|
107
95
|
post_install_message:
|
108
96
|
rdoc_options: []
|
109
97
|
require_paths:
|
@@ -115,14 +103,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
103
|
version: '2.5'
|
116
104
|
- - "<"
|
117
105
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
106
|
+
version: '4'
|
119
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
108
|
requirements:
|
121
109
|
- - ">="
|
122
110
|
- !ruby/object:Gem::Version
|
123
111
|
version: '0'
|
124
112
|
requirements: []
|
125
|
-
rubygems_version: 3.
|
113
|
+
rubygems_version: 3.2.16
|
126
114
|
signing_key:
|
127
115
|
specification_version: 4
|
128
116
|
summary: Extract microformats2-encoded data from HTML documents.
|
data/.editorconfig
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# EditorConfig is awesome: https://EditorConfig.org
|
2
|
-
root = true
|
3
|
-
|
4
|
-
[*]
|
5
|
-
charset = utf-8
|
6
|
-
end_of_line = lf
|
7
|
-
insert_final_newline = true
|
8
|
-
indent_size = 2
|
9
|
-
indent_style = space
|
10
|
-
trim_trailing_whitespace = true
|
11
|
-
|
12
|
-
[*.md]
|
13
|
-
indent_size = 4
|
14
|
-
indent_style = tab
|
data/.gitignore
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
/.config
|
4
|
-
/coverage/
|
5
|
-
/InstalledFiles
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/spec/examples.txt
|
9
|
-
/test/tmp/
|
10
|
-
/test/version_tmp/
|
11
|
-
/tmp/
|
12
|
-
|
13
|
-
# Used by dotenv library to load environment variables.
|
14
|
-
# .env
|
15
|
-
|
16
|
-
# Documentation cache and generated files:
|
17
|
-
/.yardoc/
|
18
|
-
/_yardoc/
|
19
|
-
/doc/
|
20
|
-
/rdoc/
|
21
|
-
|
22
|
-
# Environment normalization:
|
23
|
-
/.bundle/
|
24
|
-
/vendor/bundle
|
25
|
-
/lib/bundler/man/
|
26
|
-
|
27
|
-
# for a library or gem, you might want to ignore these files since the code is
|
28
|
-
# intended to run in multiple environments; otherwise, check them in:
|
29
|
-
Gemfile.lock
|
30
|
-
# .ruby-version
|
31
|
-
# .ruby-gemset
|
32
|
-
|
33
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
-
.rvmrc
|
data/.gitmodules
DELETED
data/.reek.yml
DELETED
data/.rspec
DELETED
data/.rubocop
DELETED
data/.rubocop.yml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require:
|
2
|
-
- rubocop-performance
|
3
|
-
- rubocop-rspec
|
4
|
-
|
5
|
-
AllCops:
|
6
|
-
NewCops: enable
|
7
|
-
|
8
|
-
Layout/HashAlignment:
|
9
|
-
EnforcedHashRocketStyle: table
|
10
|
-
|
11
|
-
Layout/LineLength:
|
12
|
-
Enabled: false
|
13
|
-
|
14
|
-
Metrics/BlockLength:
|
15
|
-
Exclude:
|
16
|
-
- spec/**/*.rb
|
17
|
-
|
18
|
-
Style/Documentation:
|
19
|
-
Enabled: false
|
20
|
-
|
21
|
-
Style/FrozenStringLiteralComment:
|
22
|
-
Enabled: false
|
23
|
-
|
24
|
-
Style/SymbolArray:
|
25
|
-
Enabled: false
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.5.8
|
data/.simplecov
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'simplecov-console'
|
2
|
-
|
3
|
-
formatters = [SimpleCov::Formatter::HTMLFormatter]
|
4
|
-
|
5
|
-
# rubocop:disable Style/IfUnlessModifier
|
6
|
-
if RSpec.configuration.files_to_run.length > 1
|
7
|
-
formatters << SimpleCov::Formatter::Console
|
8
|
-
end
|
9
|
-
# rubocop:enable Style/IfUnlessModifier
|
10
|
-
|
11
|
-
SimpleCov.start do
|
12
|
-
formatter SimpleCov::Formatter::MultiFormatter.new(formatters)
|
13
|
-
end
|
data/.travis.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
dist: bionic
|
2
|
-
language: ruby
|
3
|
-
rvm:
|
4
|
-
- 2.5
|
5
|
-
- 2.6
|
6
|
-
- 2.7
|
7
|
-
cache:
|
8
|
-
- bundler
|
9
|
-
before_script:
|
10
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
11
|
-
- chmod +x ./cc-test-reporter
|
12
|
-
- ./cc-test-reporter before-build
|
13
|
-
after_script:
|
14
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
15
|
-
notifications:
|
16
|
-
email: false
|
17
|
-
slack:
|
18
|
-
rooms:
|
19
|
-
secure: JmMccxJmz97LtzKLPd+Hp1MeRUKL8kscN2A2CPyEyRJC7u/U+41SHtXkojR4OpQDoCsP3MexhqoJ/Fu1eLDxZ3e1B7PFrwKCfSQc8YZhLYfE0B9Tfy4M+LBQkgoLwsUHP2Vxyho0iZ1knL+070EJQlEpTox+9N8eTfOX6SOpiNLDHTRd4217yI7faog790OYGKTbOCRj5fo+kPAeN8NrEZavjx6QeWBcJ/wRv6O2V6dhrnqOho2ktSj14/yeNsVoYc4Ondk5Hy/zSCPRjvqFO9wI2mC6l7u9W0ffy09trvkXTTmPQeCbzFKgybHSKpmxCE6frFOSkO+aBVGJ/p4hxej5001nzZrCfZF3MBEKQwAFHBLX6hIIbCOZmR915vl+8NGPkCy4o8W/BlRWKtVWIbDCk8sxf+WbIHLkSsfBBGHmABxQXvDS3ejKh+Rm35ejdrak2jWg/cxYHBbZDHBNPjLHbYzfziMSlNgbQ3V9fVfpNC1AI7jXNSgOsuX6Uv5dvTk40Wa4xEiNOkEtLMn55exnrxoJ+B68aZPvA/71/rvHKPyjgBNxu7Zb+5mrVHja+DNTdotomWdzfmILn2CV1xvfhQAFmph4lagiRHqpLXATJ6N0907tNILJUzbvMPONVbcyQlx1UHnbiezagjQ+dwoOyjof184M8jECba7zXzs=
|
data/Gemfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in micromicro.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
gem 'pry-byebug', '~> 3.9'
|
7
|
-
gem 'rake', '~> 13.0'
|
8
|
-
gem 'reek', '~> 6.0'
|
9
|
-
gem 'rspec', '~> 3.10'
|
10
|
-
gem 'rubocop', '~> 1.2'
|
11
|
-
gem 'rubocop-performance', '~> 1.8'
|
12
|
-
gem 'rubocop-rspec', '~> 2.0'
|
13
|
-
gem 'simplecov', '~> 0.19.1'
|
14
|
-
gem 'simplecov-console', '~> 0.7.2'
|
data/Rakefile
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|
2
|
-
|
3
|
-
require 'reek/rake/task'
|
4
|
-
require 'rspec/core/rake_task'
|
5
|
-
require 'rubocop/rake_task'
|
6
|
-
|
7
|
-
Reek::Rake::Task.new do |task|
|
8
|
-
task.fail_on_error = false
|
9
|
-
task.source_files = FileList['**/*.rb'].exclude('vendor/**/*.rb')
|
10
|
-
end
|
11
|
-
|
12
|
-
RSpec::Core::RakeTask.new
|
13
|
-
|
14
|
-
RuboCop::RakeTask.new do |task|
|
15
|
-
task.fail_on_error = false
|
16
|
-
end
|
17
|
-
|
18
|
-
task default: [:rubocop, :reek, :spec]
|