parsing-utils 1.1.0 → 1.2.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.2.0
@@ -51,5 +51,23 @@ module ParsingUtils
51
51
  end
52
52
  end
53
53
  end
54
+
55
+
56
+ class IdentityParser
57
+ class << self
58
+ attr_accessor :supported_mime_types
59
+ def dependencies
60
+ end
61
+ def default_mime_type
62
+ 'text/plain'
63
+ end
64
+ def dump(object, options = {})
65
+ object
66
+ end
67
+ def load(object, options = {})
68
+ object
69
+ end
70
+ end
71
+ end
54
72
 
55
73
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{parsing-utils}
8
- s.version = "1.1.0"
8
+ s.version = "1.2.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"]
@@ -29,4 +29,22 @@ describe ParsingUtils do
29
29
  end
30
30
  end
31
31
 
32
+ describe ParsingUtils::IdentityParser do
33
+ it "should behave like a parser" do
34
+ ParsingUtils::IdentityParser.default_mime_type.should == 'text/plain'
35
+ ParsingUtils::IdentityParser.should respond_to(:dump)
36
+ ParsingUtils::IdentityParser.should respond_to(:load)
37
+ ParsingUtils::IdentityParser.should respond_to(:dependencies)
38
+ ParsingUtils::IdentityParser.should respond_to(:supported_mime_types)
39
+ ParsingUtils::IdentityParser.should respond_to(:supported_mime_types=)
40
+ end
41
+ it "behave such as the dumped object be the same as original object" do
42
+ object = mock("object")
43
+ ParsingUtils::IdentityParser.dump(object).should == object
44
+ end
45
+ it "behave such as the loaded object be the same as original object" do
46
+ object = mock("object")
47
+ ParsingUtils::IdentityParser.load(object).should == object
48
+ end
49
+ end
32
50
  end
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.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Rohr