wikidata-client 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 036b3598b8288484b5aebf973b3ae366126b5162
4
- data.tar.gz: 523725c269c4d52fbb0e366cffc44d18aa9e071c
3
+ metadata.gz: aeebe365f42debe5607f4dddb3debd4fdd19a5a5
4
+ data.tar.gz: 1899525deed3157e28e8dea452c05e13bf2513df
5
5
  SHA512:
6
- metadata.gz: 013beb7a6398f8b26bd835f2338e51e4c2a2b37895cba4779e8dbfe6ea5a397c6ecaf348f63993f35d1dc9f7bed63839b9e6baf17e6fdb0f0d9eb0873c39060c
7
- data.tar.gz: f9ebc57fcfce61f37b6d975030742897fcde8c0e77e0828ec8528f4affde1f762ccdaca202f3f0dc478eab6f5efdfc419af3a8e7060e589096add92d6dbc867c
6
+ metadata.gz: d44e7205da7118bf17668028a3cae4dd1b965beb5db88e7a2e53d68647f82156a0109fe95970550e60bca605660786b87807d053f217af05a131af584cf3f7e1
7
+ data.tar.gz: 5abb527250ac806b8f4503bf905fd1f0f407e668ffb2a4f37596b58a67720579189546e8be7b6f2f2c15d9b23d0e411d5931742aebf7c3ee87bae37185195e47
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  Gemfile.lock
2
+ .irb_history
data/.irbrc ADDED
@@ -0,0 +1 @@
1
+ IRB.conf[:SAVE_HISTORY] = 100
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.8
4
+
5
+ * Added support for monolingualtext
6
+
3
7
  ## 0.0.7
4
8
 
5
9
  * Added support for commonsMedia images
data/README.md CHANGED
@@ -15,7 +15,7 @@ their contents.
15
15
 
16
16
  ## Installation
17
17
 
18
- In bunler: `gem 'wikidata-client', '~> 0.0.7', require: 'wikidata'`
18
+ In bundler: `gem 'wikidata-client', '~> 0.0.7', require: 'wikidata'`
19
19
 
20
20
  Otherwise: `gem install wikidata-client`
21
21
 
data/lib/wikidata.rb CHANGED
@@ -37,6 +37,7 @@ require 'wikidata/property/time'
37
37
  require 'wikidata/property/url'
38
38
  require 'wikidata/property/globe_coordinate'
39
39
  require 'wikidata/property/commons_media'
40
+ require 'wikidata/property/monolingual_text'
40
41
  require 'wikidata/entity'
41
42
  require 'wikidata/item'
42
43
  require 'wikidata/response'
@@ -15,6 +15,8 @@ module Wikidata
15
15
  Wikidata::Item.find Wikidata::Entity.entity_id(attribute)
16
16
  when 'commonsMedia'
17
17
  Wikidata::Property::CommonsMedia.new attribute
18
+ when 'monolingualtext'
19
+ Wikidata::Property::MonolingualText.new attribute
18
20
  else
19
21
  puts "Unkown property type #{attribute.mainsnak.datatype}"
20
22
  end
@@ -0,0 +1,13 @@
1
+ module Wikidata
2
+ module Property
3
+ class MonolingualText < Wikidata::Property::Base
4
+ def text
5
+ value.text
6
+ end
7
+
8
+ def language
9
+ value.language
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Wikidata
2
- VERSION = "0.0.7".freeze
2
+ VERSION = "0.0.8".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikidata-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kévin Lacointe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-29 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -143,6 +143,7 @@ extensions: []
143
143
  extra_rdoc_files: []
144
144
  files:
145
145
  - ".gitignore"
146
+ - ".irbrc"
146
147
  - ".rspec"
147
148
  - ".travis.yml"
148
149
  - CHANGELOG.md
@@ -161,6 +162,7 @@ files:
161
162
  - lib/wikidata/property/base.rb
162
163
  - lib/wikidata/property/commons_media.rb
163
164
  - lib/wikidata/property/globe_coordinate.rb
165
+ - lib/wikidata/property/monolingual_text.rb
164
166
  - lib/wikidata/property/string.rb
165
167
  - lib/wikidata/property/time.rb
166
168
  - lib/wikidata/property/url.rb
@@ -269,3 +271,4 @@ test_files:
269
271
  - spec/wikidata/property/common_media_spec.rb
270
272
  - spec/wikidata/property/time_spec.rb
271
273
  - spec/wikidata_spec.rb
274
+ has_rdoc: