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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c51032c9ca912048c8d0c49fce9d6226da6247eb
4
- data.tar.gz: f89f6deb7b30f34d2d148801da1c7ac6470f4737
2
+ SHA256:
3
+ metadata.gz: cbe591e5b9bda529f1230fc41005966d667ff6e773ebe6de9b5d4ce323525e25
4
+ data.tar.gz: df5fdb2843d7ce0b3d3b9ffa6f6564c08f7419d6a59fa57939d88820a3315f54
5
5
  SHA512:
6
- metadata.gz: dd0c15c730568c77cdf45ccc8d5edf8d751cea35bd489b1999d87b0aa0f2d65665460961a2d2799e8b34e6c3640d9dbffa8f41bf970935bac9eb38b219c9d513
7
- data.tar.gz: d53eb7d691c1c4f263442358669ba66708fd160d95305396017063c652aab7abc503dc309a9ecb5bd912ca4b58e40caad8f566088f8c2113cac5d3996d578a98
6
+ metadata.gz: fbf8265abe3f5b91a5f9913bf5f3e4d908fc232b070f1c2c6851ae1f43540b15d0e216509c5a810cb12d8674314c1874193c26a628cae93c837ff22a0afb1b16
7
+ data.tar.gz: f0bb7cadb51368e7306d7ab890581977e5e5ef34d267490871488ae486236e081745ed357d5710bc77429e4f12e00a0f9830fdbbdc1cb28f69fe9e8d93a4b6ae
@@ -1,5 +1,6 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.1
3
+
1
4
  inherit_from:
2
5
  - https://raw.githubusercontent.com/everypolitician/everypolitician-data/master/.rubocop_base.yml
3
6
  - .rubocop_todo.yml
4
-
5
-
@@ -1,11 +1,22 @@
1
1
  language: ruby
2
- script:
3
- - bundle exec rake test
4
- - bundle exec rake rubocop
2
+ script:
3
+ - bundle exec rake test
4
+ - bundle exec rake rubocop
5
5
  cache: bundler
6
6
  rvm:
7
- - 2.0.0
8
- - 2.1.8
9
- - 2.2.4
10
- - 2.3.0
11
- before_install: gem install bundler -v 1.11.2
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
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [0.9.0] - 2018-04-07
7
+
8
+ ### Added
9
+
10
+ - `Membership#sources`
11
+
6
12
  ## [0.8.0] - 2016-10-28
7
13
 
8
14
  ### Added
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in everypolitician-popolo.gemspec
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']
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'everypolitician/popolo'
@@ -1,5 +1,7 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
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 'rubocop', '~> 0.42.0'
28
+ spec.add_development_dependency 'rake', '~> 10.0'
29
+ spec.add_development_dependency 'rubocop', '~> 0.53.0'
28
30
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'require_all'
3
5
 
@@ -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,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Everypolitician
2
4
  module Popolo
3
5
  class Collection
@@ -1,3 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'collection'
4
+ require_relative 'event'
5
+
1
6
  module Everypolitician
2
7
  module Popolo
3
8
  class Election < Event
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Everypolitician
2
4
  module Popolo
3
5
  class Entity
@@ -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 Event < Entity
@@ -1,3 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'collection'
4
+ require_relative 'event'
5
+
1
6
  module Everypolitician
2
7
  module Popolo
3
8
  class LegislativePeriod < Event
@@ -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 Organization < Entity
@@ -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
@@ -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 Post < Entity
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Everypolitician
2
4
  module Popolo
3
- VERSION = '0.8.0'.freeze
5
+ VERSION = '0.9.0'.freeze
4
6
  end
5
7
  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.8.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: 2016-10-28 00:00:00.000000000 Z
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: rake
42
+ name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
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: '10.0'
54
+ version: '5.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: minitest
56
+ name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.0'
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: '5.0'
68
+ version: '0.10'
69
69
  - !ruby/object:Gem::Dependency
70
- name: pry
70
+ name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.10'
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.10'
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.42.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.42.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.5.1
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