everypolitician-popolo 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +3 -2
- data/.travis.yml +19 -8
- data/CHANGELOG.md +6 -0
- data/Gemfile +2 -0
- data/README.md +10 -0
- data/Rakefile +3 -0
- data/bin/console +1 -0
- data/everypolitician-popolo.gemspec +6 -4
- data/lib/everypolitician/popolo.rb +2 -0
- data/lib/everypolitician/popolo/area.rb +5 -4
- data/lib/everypolitician/popolo/collection.rb +2 -0
- data/lib/everypolitician/popolo/election.rb +5 -0
- data/lib/everypolitician/popolo/entity.rb +2 -0
- data/lib/everypolitician/popolo/event.rb +5 -0
- data/lib/everypolitician/popolo/legislative_period.rb +5 -0
- data/lib/everypolitician/popolo/membership.rb +9 -0
- data/lib/everypolitician/popolo/organization.rb +5 -0
- data/lib/everypolitician/popolo/person.rb +5 -4
- data/lib/everypolitician/popolo/post.rb +5 -0
- data/lib/everypolitician/popolo/version.rb +3 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cbe591e5b9bda529f1230fc41005966d667ff6e773ebe6de9b5d4ce323525e25
|
4
|
+
data.tar.gz: df5fdb2843d7ce0b3d3b9ffa6f6564c08f7419d6a59fa57939d88820a3315f54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbf8265abe3f5b91a5f9913bf5f3e4d908fc232b070f1c2c6851ae1f43540b15d0e216509c5a810cb12d8674314c1874193c26a628cae93c837ff22a0afb1b16
|
7
|
+
data.tar.gz: f0bb7cadb51368e7306d7ab890581977e5e5ef34d267490871488ae486236e081745ed357d5710bc77429e4f12e00a0f9830fdbbdc1cb28f69fe9e8d93a4b6ae
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,11 +1,22 @@
|
|
1
1
|
language: ruby
|
2
|
-
script:
|
3
|
-
|
4
|
-
|
2
|
+
script:
|
3
|
+
- bundle exec rake test
|
4
|
+
- bundle exec rake rubocop
|
5
5
|
cache: bundler
|
6
6
|
rvm:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
- 2.1
|
8
|
+
- 2.2
|
9
|
+
- 2.3
|
10
|
+
- 2.4
|
11
|
+
- 2.5
|
12
|
+
before_install:
|
13
|
+
- gem update --system
|
14
|
+
- gem install bundler --no-doc
|
15
|
+
deploy:
|
16
|
+
provider: rubygems
|
17
|
+
api_key:
|
18
|
+
secure: W+NXaXWzlyIA4rDr6HxV7WckySVWnnHBT6s6gl64D0efJtF5/lgs9qAV8rfD9iXmrtcKth6AbclOZR+kYmSwdAE7RFJnnYuLYqei9EmXx6KJkdz3GSzoHxj+aC8nFzVsYD4kVygcTK59WRSEka3PK3Oo1N/XfXQaciDH3ZE21jeRvUYSTVMXzNOoOMW6Qyfq2ehgm1ImRTwuI8DUSrXwHTlAG+iSl7RDrePCQEGSCbR3MUd/twOkuSa2UXd9zGZ/QGjtrri3QX6x62qzy1TpVtsCumRO4TgPWxKZD1o/u95+61rLdEJ4CyCz6LbbkY8N869xpiqnsOjsv/hyfkFdHxj3/UaK2SfkCbyf94oQz6sxqCNewTQo5pPLZFzNZxnE3d4H+nJCbgxMin3Nl8fyevnuq/06/9zLU6+9l+vkw80sT8CQYKg8xr1Qp5fkVRqcZgpaflga6wUJCb4SrKFZtoUOlLZkdRwhiebRd4z3+DG0p9+uE8NQefLhQXXlCFq888oGlUxRVbW+JOaY03tySk04D3lm3+ymNjORR8ORei0Yn6Ur+ursUB0P0el6tzMG2M66ck/y/LNdjQsCknRA+1hYwWFo3+cP9lQAE9WqvZQ0h77Zmc7lMlvHxSAgieFDQIck3X8VTYNS763D8OWkle7vZElI7mxhMAWzFMerH7M=
|
19
|
+
gem: everypolitician-popolo
|
20
|
+
on:
|
21
|
+
tags: true
|
22
|
+
repo: everypolitician/everypolitician-popolo
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -105,6 +105,16 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
105
105
|
|
106
106
|
Bug reports and pull requests are welcome on GitHub at https://github.com/everypolitician/everypolitician-popolo.
|
107
107
|
|
108
|
+
## Releasing
|
109
|
+
|
110
|
+
After you've added a new feature or fixed a bug you should release the gem to rubygems.org.
|
111
|
+
|
112
|
+
TravisCI will take care of this for us as long as the release is tagged.
|
113
|
+
|
114
|
+
For example, to release to release version `0.12.0`:
|
115
|
+
|
116
|
+
git tag -a -m "everypolitician-popolo v0.12.0" v0.12.0
|
117
|
+
git push origin --tags
|
108
118
|
|
109
119
|
## License
|
110
120
|
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler/gem_tasks'
|
2
4
|
require 'rake/testtask'
|
3
5
|
require 'rubocop/rake_task'
|
@@ -5,6 +7,7 @@ require 'rubocop/rake_task'
|
|
5
7
|
RuboCop::RakeTask.new
|
6
8
|
|
7
9
|
Rake::TestTask.new(:test) do |t|
|
10
|
+
t.warning = true
|
8
11
|
t.libs << 'test'
|
9
12
|
t.libs << 'lib'
|
10
13
|
t.test_files = FileList['test/**/*_test.rb']
|
data/bin/console
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
lib = File.expand_path('lib', __dir__)
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
6
|
require 'everypolitician/popolo/version'
|
5
7
|
|
@@ -21,8 +23,8 @@ Gem::Specification.new do |spec|
|
|
21
23
|
spec.add_dependency 'require_all'
|
22
24
|
|
23
25
|
spec.add_development_dependency 'bundler', '~> 1.11'
|
24
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
25
26
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
26
27
|
spec.add_development_dependency 'pry', '~> 0.10'
|
27
|
-
spec.add_development_dependency '
|
28
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
29
|
+
spec.add_development_dependency 'rubocop', '~> 0.53.0'
|
28
30
|
end
|
@@ -1,3 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'collection'
|
4
|
+
require_relative 'entity'
|
5
|
+
|
1
6
|
module Everypolitician
|
2
7
|
module Popolo
|
3
8
|
class Area < Entity
|
@@ -16,10 +21,6 @@ module Everypolitician
|
|
16
21
|
def type
|
17
22
|
document.fetch(:type, nil)
|
18
23
|
end
|
19
|
-
|
20
|
-
def wikidata
|
21
|
-
identifier('wikidata')
|
22
|
-
end
|
23
24
|
end
|
24
25
|
|
25
26
|
class Areas < Collection
|
@@ -1,3 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'collection'
|
4
|
+
require_relative 'entity'
|
5
|
+
|
1
6
|
module Everypolitician
|
2
7
|
module Popolo
|
3
8
|
class Membership < Entity
|
@@ -37,6 +42,10 @@ module Everypolitician
|
|
37
42
|
document.fetch(:end_date, nil)
|
38
43
|
end
|
39
44
|
|
45
|
+
def sources
|
46
|
+
document.fetch(:sources, [])
|
47
|
+
end
|
48
|
+
|
40
49
|
def person
|
41
50
|
popolo.persons.find_by(id: person_id)
|
42
51
|
end
|
@@ -1,3 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'collection'
|
4
|
+
require_relative 'entity'
|
5
|
+
|
1
6
|
module Everypolitician
|
2
7
|
module Popolo
|
3
8
|
class Person < Entity
|
@@ -91,10 +96,6 @@ module Everypolitician
|
|
91
96
|
document.fetch(:patronymic_name, nil)
|
92
97
|
end
|
93
98
|
|
94
|
-
def identifiers
|
95
|
-
document.fetch(:identifiers, [])
|
96
|
-
end
|
97
|
-
|
98
99
|
def images
|
99
100
|
document.fetch(:images, [])
|
100
101
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: everypolitician-popolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Mytton
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: require_all
|
@@ -39,61 +39,61 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.11'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '5.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '5.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0.10'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0.10'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0
|
75
|
+
version: '10.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0
|
82
|
+
version: '10.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rubocop
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.53.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.53.0
|
97
97
|
description:
|
98
98
|
email:
|
99
99
|
- chrismytton@gmail.com
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.
|
149
|
+
rubygems_version: 2.7.7
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Makes it easy to work with EveryPolitician's Popolo output files from Ruby
|