freebase-api 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MGFjYmM4OTcxNDU3OGYyYTMwYTBhNTAxMDBjZjgwMWM3OWI1ZDQ4MQ==
5
+ data.tar.gz: !binary |-
6
+ MzdlMTIyN2U4MzlmY2Y5MWE2ZTI3NzkxN2RiOWViZjNiNDczN2QyMg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ODQ5YjExYmExMGE4OTQwM2E5ZTgzYzAwODdkZDc5OWQwZWRjNDQ2ZjM4YTI2
10
+ OTk1ZTg1MTEwNDJiZjNiYjczMzc2NGU3ZDM3ZTRmYTFmOTk2NDljMTliOTY2
11
+ M2Y0NTA4MTdlYzNiOWRlYTY5Njc1ZGY3MzcyMTY0OWE4MWI3Mzk=
12
+ data.tar.gz: !binary |-
13
+ NjUyN2M2MDhlYzU1ZTdiMTQxNjI3NmE1ODIxNTNlZWM4NzdiZGIzMjYwNDI5
14
+ OTBiYmMyNzI4YTMzZWJhZjA5OWJlZmZmNjQ2OTA2MzFkNGYxOGJiN2U5ZGU2
15
+ NDk4YTM5MzBlNTkxZjRiYTdlODQxN2U0YTg5YWJlOTg5OTEwZWI=
@@ -25,5 +25,9 @@ module FreebaseAPI
25
25
  @type
26
26
  end
27
27
 
28
+ def inspect
29
+ "#<#{self.class}:0x#{self.__id__.to_s(16)} value: \"#{self.value}\", type: \"#{self.type}\">"
30
+ end
31
+
28
32
  end
29
33
  end
@@ -32,7 +32,7 @@ module FreebaseAPI
32
32
  end
33
33
 
34
34
  def inspect
35
- self.to_s
35
+ "#<#{self.class}:0x#{self.__id__.to_s(16)} id: \"#{self.id}\">"
36
36
  end
37
37
 
38
38
  private
@@ -121,6 +121,10 @@ module FreebaseAPI
121
121
  FreebaseAPI::Image.get(self.id, options)
122
122
  end
123
123
 
124
+ def inspect
125
+ "#<#{self.class}:0x#{self.__id__.to_s(16)} id: \"#{self.id}\", name: \"#{self.name}\">"
126
+ end
127
+
124
128
  private
125
129
 
126
130
  def extract_name
@@ -140,8 +144,8 @@ module FreebaseAPI
140
144
  end
141
145
 
142
146
  def extract_description
143
- if articles = property('/common/topic/article')
144
- articles.first.property('/common/document/text').first.value
147
+ if description = property('/common/topic/description')
148
+ description.first.value
145
149
  end
146
150
  end
147
151
 
@@ -1,3 +1,3 @@
1
1
  module FreebaseAPI
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -83,6 +83,25 @@
83
83
  ],
84
84
  "count": 1.0
85
85
  },
86
+ "/common/topic/description": {
87
+ "valuetype": "string",
88
+ "values": [
89
+ {
90
+ "text": "GitHub is a web-based hosting service for software development projects that use the Git...",
91
+ "lang": "en",
92
+ "value": "GitHub is a web-based hosting service for software development projects that use the Git revision control system. GitHub offers both paid plans for private repositories, and free accounts for open source projects. As of May 2011, GitHub was the most popular open source code repository site.\nGitHub Inc. was founded in 2008 and is based in San Francisco, California.\nIn July 2012, the company received US$100 million in Series A funding, primarily from Andreessen Horowitz.",
93
+ "creator": "/user/wikirecon_bot",
94
+ "project": "wikirecon",
95
+ "dataset": "/m/0kj4zz_",
96
+ "citation": {
97
+ "provider": "Wikipedia",
98
+ "statement": "Description licensed under the Creative Commons Attribution-ShareAlike License (http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License).",
99
+ "uri": "http://en.wikipedia.org/wiki/GitHub"
100
+ }
101
+ }
102
+ ],
103
+ "count": 17.0
104
+ },
86
105
  "/common/topic/notable_for": {
87
106
  "valuetype": "object",
88
107
  "values": [
@@ -150,7 +150,7 @@ describe FreebaseAPI::Topic do
150
150
 
151
151
  describe "#properties domains" do
152
152
  it "should return an hash containing the properties domains" do
153
- topic.properties_domains.should == { 'common' => 16, 'internet' => 1,'type' => 30 }
153
+ topic.properties_domains.should == { 'common' => 17, 'internet' => 1,'type' => 30 }
154
154
  end
155
155
  end
156
156
 
metadata CHANGED
@@ -1,27 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freebase-api
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
5
- prerelease:
4
+ version: 0.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Aymeric Brisse
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-15 00:00:00.000000000 Z
11
+ date: 2013-04-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: httparty
16
- requirement: &1 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0.10'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *1
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '0.10'
25
27
  description: A library to use the Freebase API
26
28
  email:
27
29
  - aymeric.brisse@mperfect-memory.com
@@ -58,27 +60,26 @@ files:
58
60
  - travis.yml
59
61
  homepage: https://github.com/PerfectMemory/freebase-api
60
62
  licenses: []
63
+ metadata: {}
61
64
  post_install_message:
62
65
  rdoc_options: []
63
66
  require_paths:
64
67
  - lib
65
68
  required_ruby_version: !ruby/object:Gem::Requirement
66
- none: false
67
69
  requirements:
68
- - - '>='
70
+ - - ! '>='
69
71
  - !ruby/object:Gem::Version
70
72
  version: '0'
71
73
  required_rubygems_version: !ruby/object:Gem::Requirement
72
- none: false
73
74
  requirements:
74
- - - '>='
75
+ - - ! '>='
75
76
  - !ruby/object:Gem::Version
76
77
  version: '0'
77
78
  requirements: []
78
79
  rubyforge_project:
79
- rubygems_version: 1.8.10
80
+ rubygems_version: 2.0.1
80
81
  signing_key:
81
- specification_version: 3
82
+ specification_version: 4
82
83
  summary: Provides access to both a raw-access and an abstract-layer to the Freebase
83
84
  API
84
85
  test_files: