majortom_connector 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/lib/majortom_connector/result.rb +4 -4
- data/lib/majortom_connector/version.rb +1 -1
- data/majortom_connector.gemspec +1 -1
- metadata +11 -11
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
|
-
*
|
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.
|
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 '
|
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"
|
15
|
+
@http_status == "200"
|
16
16
|
end
|
17
17
|
|
18
18
|
def response_successful?
|
19
|
-
@code == "0"
|
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 =
|
36
|
+
json = MultiJson.decode(@http_body)
|
37
37
|
@data = json['data']
|
38
38
|
@code = json['code']
|
39
39
|
@message = json['msg']
|
data/majortom_connector.gemspec
CHANGED
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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-
|
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:
|
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:
|
29
|
+
hash: 17
|
30
30
|
segments:
|
31
31
|
- 1
|
32
|
-
-
|
33
|
-
-
|
34
|
-
version: 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.
|
90
|
+
rubygems_version: 1.6.2
|
91
91
|
signing_key:
|
92
92
|
specification_version: 3
|
93
93
|
summary: Connector gem for any MaJorToM-Server
|