hdo-storting-importer 0.3.8 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/features/convert.feature +19 -19
  3. data/lib/hdo/storting_importer/category.rb +6 -6
  4. data/lib/hdo/storting_importer/committee.rb +4 -4
  5. data/lib/hdo/storting_importer/committee_membership.rb +7 -7
  6. data/lib/hdo/storting_importer/district.rb +4 -4
  7. data/lib/hdo/storting_importer/governing_period.rb +4 -4
  8. data/lib/hdo/storting_importer/parliament_issue.rb +6 -6
  9. data/lib/hdo/storting_importer/parliament_period.rb +6 -6
  10. data/lib/hdo/storting_importer/parliament_session.rb +7 -7
  11. data/lib/hdo/storting_importer/party.rb +6 -6
  12. data/lib/hdo/storting_importer/party_membership.rb +6 -6
  13. data/lib/hdo/storting_importer/promise.rb +10 -10
  14. data/lib/hdo/storting_importer/proposition.rb +9 -9
  15. data/lib/hdo/storting_importer/representative.rb +21 -21
  16. data/lib/hdo/storting_importer/schema/category.json +2 -2
  17. data/lib/hdo/storting_importer/schema/committee.json +1 -1
  18. data/lib/hdo/storting_importer/schema/committee_membership.json +6 -6
  19. data/lib/hdo/storting_importer/schema/district.json +1 -1
  20. data/lib/hdo/storting_importer/schema/governing_period.json +5 -5
  21. data/lib/hdo/storting_importer/schema/parliament_issue.json +6 -6
  22. data/lib/hdo/storting_importer/schema/parliament_period.json +5 -5
  23. data/lib/hdo/storting_importer/schema/parliament_session.json +5 -5
  24. data/lib/hdo/storting_importer/schema/party.json +4 -4
  25. data/lib/hdo/storting_importer/schema/party_membership.json +6 -6
  26. data/lib/hdo/storting_importer/schema/promise.json +1 -1
  27. data/lib/hdo/storting_importer/schema/proposition.json +3 -3
  28. data/lib/hdo/storting_importer/schema/representative.json +9 -9
  29. data/lib/hdo/storting_importer/schema/vote.json +4 -4
  30. data/lib/hdo/storting_importer/version.rb +1 -1
  31. data/lib/hdo/storting_importer/vote.rb +15 -15
  32. data/lib/hdo/storting_importer.rb +0 -2
  33. data/spec/hdo/storting_importer/category_spec.rb +3 -3
  34. data/spec/hdo/storting_importer/committee_membership_spec.rb +7 -7
  35. data/spec/hdo/storting_importer/committee_spec.rb +1 -1
  36. data/spec/hdo/storting_importer/district_spec.rb +1 -1
  37. data/spec/hdo/storting_importer/governing_period_spec.rb +3 -3
  38. data/spec/hdo/storting_importer/parliament_issue_spec.rb +4 -4
  39. data/spec/hdo/storting_importer/parliament_period_spec.rb +5 -5
  40. data/spec/hdo/storting_importer/parliament_session_spec.rb +5 -5
  41. data/spec/hdo/storting_importer/party_membership_spec.rb +6 -6
  42. data/spec/hdo/storting_importer/party_spec.rb +5 -5
  43. data/spec/hdo/storting_importer/promise_spec.rb +1 -1
  44. data/spec/hdo/storting_importer/representative_spec.rb +16 -16
  45. data/spec/hdo/storting_importer/vote_spec.rb +21 -21
  46. metadata +3 -4
@@ -79,8 +79,8 @@ module Hdo
79
79
  Vote.example.to_json.should be_json <<-JSON
80
80
  {
81
81
  "kind": "hdo#vote",
82
- "externalId": "2175",
83
- "externalIssueId": "51448",
82
+ "external_id": "2175",
83
+ "external_issue_id": "51448",
84
84
  "counts": {
85
85
  "for": 2,
86
86
  "against": 96,
@@ -90,41 +90,41 @@ module Hdo
90
90
  "enacted": false,
91
91
  "subject": "Forslag 24 - 26 på vegne av Per Olaf Lundteigen",
92
92
  "method": "ikke_spesifisert",
93
- "resultType": "ikke_spesifisert",
93
+ "result_type": "ikke_spesifisert",
94
94
  "time": "2012-04-12T16:37:27.053",
95
95
  "representatives": [
96
96
  {
97
97
  "kind": "hdo#representative",
98
- "externalId": "ADA",
99
- "firstName": "André Oktay",
100
- "lastName": "Dahl",
98
+ "external_id": "ADA",
99
+ "first_name": "André Oktay",
100
+ "last_name": "Dahl",
101
101
  "gender": "M",
102
- "dateOfBirth": "1975-07-07T00:00:00",
103
- "dateOfDeath": "0001-01-01T00:00:00",
102
+ "date_of_birth": "1975-07-07T00:00:00",
103
+ "date_of_death": "0001-01-01T00:00:00",
104
104
  "district": "Akershus",
105
- "parties": [{"kind": "hdo#partyMembership", "externalId": "H", "startDate": "2011-10-01", "endDate": null}],
106
- "committees": [{"kind": "hdo#committeeMembership", "externalId": "JUSTIS", "startDate": "2011-10-01", "endDate": null}],
107
- "voteResult": "for"
105
+ "parties": [{"kind": "hdo#party_membership", "external_id": "H", "start_date": "2011-10-01", "end_date": null}],
106
+ "committees": [{"kind": "hdo#committee_membership", "external_id": "JUSTIS", "start_date": "2011-10-01", "end_date": null}],
107
+ "vote_result": "for"
108
108
  }
109
109
  ],
110
110
  "propositions": [
111
111
  {
112
112
  "kind": "hdo#proposition",
113
- "externalId": "1234",
113
+ "external_id": "1234",
114
114
  "description": "description",
115
- "onBehalfOf": "on behalf of",
115
+ "on_behalf_of": "on behalf of",
116
116
  "body": "body",
117
- "deliveredBy": {
117
+ "delivered_by": {
118
118
  "kind": "hdo#representative",
119
- "externalId": "ADA",
120
- "firstName": "André Oktay",
121
- "lastName": "Dahl",
119
+ "external_id": "ADA",
120
+ "first_name": "André Oktay",
121
+ "last_name": "Dahl",
122
122
  "gender": "M",
123
- "dateOfBirth": "1975-07-07T00:00:00",
124
- "dateOfDeath": "0001-01-01T00:00:00",
123
+ "date_of_birth": "1975-07-07T00:00:00",
124
+ "date_of_death": "0001-01-01T00:00:00",
125
125
  "district": "Akershus",
126
- "parties": [{"kind": "hdo#partyMembership", "externalId": "H", "startDate": "2011-10-01", "endDate": null}],
127
- "committees": [{"kind": "hdo#committeeMembership", "externalId": "JUSTIS", "startDate": "2011-10-01", "endDate": null}]
126
+ "parties": [{"kind": "hdo#party_membership", "external_id": "H", "start_date": "2011-10-01", "end_date": null}],
127
+ "committees": [{"kind": "hdo#committee_membership", "external_id": "JUSTIS", "start_date": "2011-10-01", "end_date": null}]
128
128
  }
129
129
  }
130
130
  ]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hdo-storting-importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-09 00:00:00.000000000 Z
11
+ date: 2013-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
347
347
  version: '0'
348
348
  requirements: []
349
349
  rubyforge_project:
350
- rubygems_version: 2.0.7
350
+ rubygems_version: 2.0.3
351
351
  signing_key:
352
352
  specification_version: 4
353
353
  summary: Gem to process data from data.stortinget.no
@@ -372,4 +372,3 @@ test_files:
372
372
  - spec/spec_helper.rb
373
373
  - spec/support/shared_examples_for_json_schema.rb
374
374
  - spec/support/shared_examples_for_short_inspect.rb
375
- has_rdoc: