f78162fd41
While parsing check for existance of attribute
...
When parsing rel attributes, check for existance of the href attribute
before extracting the text, sometimes like in this post somewhere
https://www.patreon.com/posts/jeenas-excellent-6467133 it might be empty
and causes an exception. All the other uses above this one check that too.
2016-08-03 21:40:11 +02:00
Shane Becker
945ffe6c6e
Version bump to 2.0.2
2016-05-04 14:07:03 -07:00
Jeena
a54c64034d
Don't crash if it's not possible to attach to property
...
Normally one can attach to properties, but if it is of a type URL then
it crashes hard. This check just drops everything which can't be
attached by `<<`.
2016-04-24 02:11:56 +02:00
Jeena
6c90f01ae7
Resolve relative URLs (bugfix)
...
When the <base> tag is used, the @base wasn't handed down all the way to URLs
and photos, this patch fixes this problem.
In addition to that it also makes it possible to handle u-url on <input> tags.
2015-08-21 21:17:54 +02:00
Jessica Lynn Suttles
840fdff624
Bump version to 2.0.1
2014-03-10 15:56:27 -07:00
Jessica Lynn Suttles
cb918e2dd1
Add specs for Microformats2::AbsoluteUri
2014-03-10 12:26:24 -07:00
Jessica Lynn Suttles
d8545d9930
Do not log URI::InvalidURIError error message
2014-03-07 16:41:34 -08:00
Jessica Lynn Suttles
25f5fda178
Allow u-* properties to be invalid URIs
2014-03-07 14:19:51 -08:00
Jessica Lynn Suttles
78927d36b8
Bump version to 2.0.0
...
Fixes #24
2014-02-25 15:23:57 -08:00
jessicard
0eb04480f5
Normalize u-* property values for implied properties
2013-11-04 16:03:41 -08:00
Jessica Lynn Suttles
e65c1a2407
Normalize u-* property values
2013-11-04 15:13:34 -08:00
Jessica Lynn Suttles
cdce96db13
Simplify Microformats::Collection#absolutize
2013-11-04 13:58:02 -08:00
jessicard
e630923e1d
normalizes rels urls in issue https://github.com/G5/microformats2/issues/16
2013-11-03 16:55:37 -08:00
Don Petersen
07ab221d3e
Don't explode when a rel attribute exists without a base tag.
...
It tries to build an absolute URL for link tags that contain a rel
attribute and a relative URL, using the <base> tag to decide what to
prefix the relative URLs with. It's very common for people to omit the
base tag and to use rel attributes in stylesheets, and that blows up the
parser.
Now we don't attempt to build absolute URLs when the base URL can't be
determined.
2013-10-08 22:06:59 +00:00
Tom Morris
7daf6c5e11
modified collection.rb to parse rels and alternates
...
in order to parse relative URLs in rels, we need to parse the base/@href of
the page if there, or to pass the URL in, so added the relevant stuff to support
that.
2013-09-15 11:52:53 +01:00
Jessica Dillon & Jessica Lynn Suttles
c0a86fa6b0
updates version
2013-07-01 18:32:38 -07:00
Jessica Dillon & Jessica Lynn Suttles
1311dec8a3
removes saved headers from param defaults
2013-07-01 18:31:25 -07:00
Jessica Dillon & Jessica Lynn Suttles
3f61f48025
adds parser specs
2013-07-01 17:34:15 -07:00
Jessica Dillon & Jessica Lynn Suttles
78df1dc8bc
sets Microformats2::Parser#http_headers on initialize
2013-07-01 16:47:28 -07:00
Jessica Dillon & Jessica Lynn Suttles
ed2f66002e
adds Microformats2::Parser#http_headers and Microformats2::Parser#http_body and saves them from the response
2013-07-01 16:46:08 -07:00
Jessica Dillon & Jessica Lynn Suttles
22d84e0845
adds Microformats::Parser to move module methods into class instance
2013-07-01 16:31:39 -07:00
Michael Mitchell + Chris Stringer
5b8df0f0a9
Bump version
2013-04-18 22:13:39 -07:00
Michael Mitchell + Chris Stringer
dcbcc5123a
Remove un-needed to_s method on DateTime
2013-04-18 22:13:38 -07:00
Michael Mitchell + Chris Stringer
d11b0f182c
Support for string arg on Embedded
2013-04-18 22:13:38 -07:00
Michael Mitchell
0817798de2
bumps version number to pre3
2013-04-18 22:13:38 -07:00
Michael Mitchell
309c0dfcd0
defines the accesors on the singelton class only
2013-04-18 22:13:38 -07:00
Michael Mitchell + Chris Stringer
f4d5f31243
Bump version
2013-04-18 22:13:38 -07:00
Michael Mitchell + Chris Stringer
4b052695cc
Jessica has strong feelings on whitespace
2013-04-18 22:13:38 -07:00
Michael Mitchell + Chris Stringer
65fb44239c
DRY up the logic to create new property classes.
...
Take some code that was duplicated in both the PropertyParser and
Format classes and move into a method in the Property module.
2013-04-18 22:13:38 -07:00
Michael Mitchell + Chris Stringer
e8d9e77e41
InvalidPropertyPrefix error class
...
Raise a InvalidPropertyPrefix error if the prefix is invalid.
2013-04-18 22:13:38 -07:00
Michael Mitchell + Chris Stringer
e8be12b66e
Refactor add_property
...
Change implementation of the add_property method which allows for
dynamically adding attributes from outside the gem. We made it
simpler to construct the args needed for this method and refactored
the logic and tests.
2013-04-18 22:13:38 -07:00
Michael Mitchell + Chris Stringer
5deb796829
Add the add_property method
...
Adds support for a public add_property method which exposes adding
a property to a Format object dynamically while still doing the
right thing with to_hash and to_json.
2013-04-18 22:13:38 -07:00
Jessica Lynn Suttles
f968a7ba0c
bumps version
2013-04-18 22:13:37 -07:00
Jessica Lynn Suttles
bffa750923
adds Property::Foundation#format
2013-04-18 22:13:37 -07:00
Jessica Lynn Suttles
b3ed1207c6
defines pluralized format methods on Collection objects
2013-04-18 22:13:37 -07:00
Jessica Lynn Suttles
04206e40a6
renames ImpliedProperty::Foundation#value to #to_s
2013-04-18 22:13:37 -07:00
Jessica Lynn Suttles
16dd0cebee
defines pluralized property methods on Format objects
2013-04-18 22:13:37 -07:00
Jessica Lynn Suttles
56a8239482
adds activesupport gem dependency
2013-04-18 22:13:37 -07:00
Jessica Lynn Suttles
a33ce3f699
renames Property::Foundation#value to #to_s
2013-04-18 22:13:37 -07:00
Jessica Lynn Suttles
8344b85938
makes specs way more readable
2013-04-18 22:13:37 -07:00
Jessica Lynn Suttles
fb7cc7f2eb
adds more tests from microformats wiki
2013-04-18 22:13:37 -07:00
Jessica Lynn Suttles
7385f09eaf
cleans up implied properties and fixes spec
2013-04-18 22:13:36 -07:00
Jessica Lynn Suttles
10ea0256fc
cleans up implied property and adds lots of specs for them
2013-04-18 22:13:36 -07:00
Jessica Lynn Suttles
3f2a627816
crudley implements implied properties. needs more specs
2013-04-18 22:13:36 -07:00
Jessica Lynn Suttles
1d8e46ce95
fixes whitespace issue. uses two spaces instead of tabs
2013-04-18 22:13:36 -07:00
Jessica Lynn Suttles
b4084d5325
yay the world is fixed
2013-04-18 22:13:36 -07:00
Jessica Lynn Suttles
40fcdf22d9
fixes the world minus nested formats
2013-04-18 22:13:36 -07:00
Jessica Lynn Suttles
081d0e5000
organizing broke the world
2013-04-18 22:13:36 -07:00
Jessica Lynn Suttles
113d95af17
simplifies properties
2013-04-18 22:13:36 -07:00
Jessica Lynn Suttles
915250f5b0
implements property parsers as defined in wiki
2013-04-18 22:13:36 -07:00