parsing-utils 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/parsing_utils.rb +4 -1
- data/parsing-utils.gemspec +2 -2
- data/spec/parsing_utils_spec.rb +1 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.0
|
data/lib/parsing_utils.rb
CHANGED
@@ -12,7 +12,7 @@ module ParsingUtils
|
|
12
12
|
def available_parsers; @@available_parsers; end
|
13
13
|
def add(parser, *mime_types)
|
14
14
|
parser.dependencies
|
15
|
-
parser.supported_mime_types = mime_types
|
15
|
+
parser.supported_mime_types = [mime_types, parser.default_mime_type].flatten.compact.uniq
|
16
16
|
@@available_parsers << parser
|
17
17
|
self
|
18
18
|
end
|
@@ -34,6 +34,9 @@ module ParsingUtils
|
|
34
34
|
def dependencies
|
35
35
|
require 'json'
|
36
36
|
end
|
37
|
+
def default_mime_type
|
38
|
+
'application/json'
|
39
|
+
end
|
37
40
|
def dump(object, options = {})
|
38
41
|
options = options.dup
|
39
42
|
case options.delete(:format)
|
data/parsing-utils.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{parsing-utils}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Cyril Rohr"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-22}
|
13
13
|
s.description = %q{Some classes useful for parsing matters (especially to select a parser based on a given mime type)}
|
14
14
|
s.email = %q{cyril.rohr@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/parsing_utils_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parsing-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Rohr
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-22 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|