majortom_connector 0.0.3 → 0.0.4

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/README.rdoc CHANGED
@@ -4,7 +4,7 @@ This gem provides easy access to any MaJorToM-Server.
4
4
 
5
5
  == Requirements
6
6
 
7
- * JSON for ruby - http://flori.github.com/json/
7
+ * MultiJSON - https://github.com/intridea/multi_json
8
8
 
9
9
  == Install
10
10
 
@@ -13,7 +13,7 @@ This gem provides easy access to any MaJorToM-Server.
13
13
 
14
14
  == Usage
15
15
 
16
- This documentation describes the use of majortom_connector version 0.0.3.
16
+ This documentation describes the use of majortom_connector version 0.0.4.
17
17
 
18
18
  1. Before executing any request, you must connect to the server with
19
19
  c = MajortomConnector.connect "base_iri_or_map_id"
@@ -1,4 +1,4 @@
1
- require 'json'
1
+ require 'multi_json'
2
2
 
3
3
  module MajortomConnector
4
4
  class Result
@@ -12,11 +12,11 @@ module MajortomConnector
12
12
  attr_reader :data
13
13
 
14
14
  def request_successful?
15
- @http_status == "200" ? true : false
15
+ @http_status == "200"
16
16
  end
17
17
 
18
18
  def response_successful?
19
- @code == "0" ? true : false
19
+ @code == "0"
20
20
  end
21
21
 
22
22
  def parse(response, format = "", buffer = nil)
@@ -33,7 +33,7 @@ module MajortomConnector
33
33
  when 'html'
34
34
  @code = "0"
35
35
  else
36
- json = JSON.parse(@http_body)
36
+ json = MultiJson.decode(@http_body)
37
37
  @data = json['data']
38
38
  @code = json['code']
39
39
  @message = json['msg']
@@ -1,3 +1,3 @@
1
1
  module MajortomConnector
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -19,5 +19,5 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency('json', '>= 1.5.1')
22
+ s.add_dependency('multi_json', '>= 1.0.3')
23
23
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: majortom_connector
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease: false
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sven Windisch
@@ -15,23 +15,23 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-17 00:00:00 +02:00
18
+ date: 2011-08-05 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: json
22
+ name: multi_json
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 1
29
+ hash: 17
30
30
  segments:
31
31
  - 1
32
- - 5
33
- - 1
34
- version: 1.5.1
32
+ - 0
33
+ - 3
34
+ version: 1.0.3
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  description: Provides easy and configurable access to MaJorToM-Server data stores.
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  requirements: []
88
88
 
89
89
  rubyforge_project: majortom_connector
90
- rubygems_version: 1.3.7
90
+ rubygems_version: 1.6.2
91
91
  signing_key:
92
92
  specification_version: 3
93
93
  summary: Connector gem for any MaJorToM-Server