openils-mapper 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,4 @@
1
- begin
2
- require 'json/pure'
3
- rescue LoadError
4
- warn "WARNING: json-pure not found. Trying json."
5
- require 'json'
6
- end
1
+ require 'yajl'
7
2
 
8
3
  module EDI
9
4
 
@@ -64,7 +59,7 @@ class Collection
64
59
  end
65
60
 
66
61
  def to_json(*a)
67
- self.to_hash.to_json(*a)
62
+ Yajl::Encoder.encode(self.to_hash, *a)
68
63
  end
69
64
 
70
65
  end
@@ -6,12 +6,7 @@ begin
6
6
  rescue LoadError
7
7
  warn "WARNING: edi4r-tdid not found. Only EDIFACT versions d96a and d01b will be supported!"
8
8
  end
9
- begin
10
- require 'json/pure'
11
- rescue LoadError
12
- warn "WARNING: json-pure not found. Trying json."
13
- require 'json'
14
- end
9
+ require 'yajl'
15
10
 
16
11
  class String
17
12
 
@@ -103,7 +98,7 @@ module EDI::E
103
98
  end
104
99
 
105
100
  def self.from_json(json, ic_opts = {})
106
- struct = JSON.parse(json)
101
+ struct = Yajl::Parser.parse(json)
107
102
 
108
103
  json_opts = {}
109
104
  [:sender,:recipient].each { |party|
@@ -3,7 +3,7 @@ require 'edi/mapper'
3
3
  module OpenILS
4
4
 
5
5
  class Mapper < EDI::E::Mapper
6
- VERSION = '0.9.8'
6
+ VERSION = '0.9.9'
7
7
  end
8
8
 
9
9
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openils-mapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 41
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 8
10
- version: 0.9.8
9
+ - 9
10
+ version: 0.9.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael B. Klein
@@ -51,19 +51,19 @@ dependencies:
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
53
  - !ruby/object:Gem::Dependency
54
- name: json
54
+ name: yajl-ruby
55
55
  prerelease: false
56
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- hash: 21
61
+ hash: 13
62
62
  segments:
63
- - 1
64
- - 1
65
- - 3
66
- version: 1.1.3
63
+ - 0
64
+ - 7
65
+ - 7
66
+ version: 0.7.7
67
67
  type: :runtime
68
68
  version_requirements: *id003
69
69
  - !ruby/object:Gem::Dependency