whos_got_dirt 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +20 -0
  5. data/.yardopts +3 -0
  6. data/Gemfile +7 -0
  7. data/LICENSE +20 -0
  8. data/README.md +61 -0
  9. data/Rakefile +69 -0
  10. data/lib/whos_got_dirt/renderer.rb +66 -0
  11. data/lib/whos_got_dirt/request.rb +218 -0
  12. data/lib/whos_got_dirt/requests/entity/corp_watch.rb +123 -0
  13. data/lib/whos_got_dirt/requests/entity/little_sis.rb +52 -0
  14. data/lib/whos_got_dirt/requests/entity/open_corporates.rb +104 -0
  15. data/lib/whos_got_dirt/requests/entity/open_duka.rb +33 -0
  16. data/lib/whos_got_dirt/requests/entity/poderopedia.rb +48 -0
  17. data/lib/whos_got_dirt/requests/entity.rb +54 -0
  18. data/lib/whos_got_dirt/requests/list/little_sis.rb +37 -0
  19. data/lib/whos_got_dirt/requests/list/open_corporates.rb +36 -0
  20. data/lib/whos_got_dirt/requests/list.rb +16 -0
  21. data/lib/whos_got_dirt/requests/relation/open_corporates.rb +72 -0
  22. data/lib/whos_got_dirt/requests/relation/open_oil.rb +49 -0
  23. data/lib/whos_got_dirt/requests/relation.rb +51 -0
  24. data/lib/whos_got_dirt/response.rb +79 -0
  25. data/lib/whos_got_dirt/responses/entity/corp_watch.rb +72 -0
  26. data/lib/whos_got_dirt/responses/entity/little_sis.rb +66 -0
  27. data/lib/whos_got_dirt/responses/entity/open_corporates.rb +61 -0
  28. data/lib/whos_got_dirt/responses/entity/open_duka.rb +42 -0
  29. data/lib/whos_got_dirt/responses/entity/poderopedia.rb +44 -0
  30. data/lib/whos_got_dirt/responses/entity.rb +7 -0
  31. data/lib/whos_got_dirt/responses/helpers/little_sis.rb +34 -0
  32. data/lib/whos_got_dirt/responses/helpers/open_corporates.rb +28 -0
  33. data/lib/whos_got_dirt/responses/list/little_sis.rb +42 -0
  34. data/lib/whos_got_dirt/responses/list/open_corporates.rb +34 -0
  35. data/lib/whos_got_dirt/responses/list.rb +7 -0
  36. data/lib/whos_got_dirt/responses/relation/open_corporates.rb +66 -0
  37. data/lib/whos_got_dirt/responses/relation/open_oil.rb +70 -0
  38. data/lib/whos_got_dirt/responses/relation.rb +7 -0
  39. data/lib/whos_got_dirt/result.rb +106 -0
  40. data/lib/whos_got_dirt/validator.rb +52 -0
  41. data/lib/whos_got_dirt/version.rb +3 -0
  42. data/lib/whos_got_dirt.rb +43 -0
  43. data/schemas/popolo.json +1619 -0
  44. data/spec/cassettes/corp_watch_entity.yml +35 -0
  45. data/spec/cassettes/little_sis_entity.yml +98 -0
  46. data/spec/cassettes/little_sis_list.yml +159 -0
  47. data/spec/cassettes/open_corporates_entity.yml +137 -0
  48. data/spec/cassettes/open_corporates_list.yml +60 -0
  49. data/spec/cassettes/open_corporates_relation.yml +121 -0
  50. data/spec/cassettes/open_duka_entity.yml +1149 -0
  51. data/spec/cassettes/open_oil_relation.yml +640 -0
  52. data/spec/cassettes/poderopedia_entity.yml +43 -0
  53. data/spec/renderer_spec.rb +48 -0
  54. data/spec/request_spec.rb +205 -0
  55. data/spec/requests/entity/corp_watch_spec.rb +99 -0
  56. data/spec/requests/entity/little_sis_spec.rb +33 -0
  57. data/spec/requests/entity/open_corporates_spec.rb +81 -0
  58. data/spec/requests/entity/open_duka_spec.rb +21 -0
  59. data/spec/requests/entity/poderopedia_spec.rb +21 -0
  60. data/spec/requests/list/little_sis_spec.rb +25 -0
  61. data/spec/requests/list/open_corporates_spec.rb +33 -0
  62. data/spec/requests/relation/open_corporates_spec.rb +53 -0
  63. data/spec/requests/relation/open_oil_spec.rb +37 -0
  64. data/spec/response_spec.rb +119 -0
  65. data/spec/responses/entity/corp_watch_spec.rb +31 -0
  66. data/spec/responses/entity/little_sis_spec.rb +31 -0
  67. data/spec/responses/entity/open_corporates_spec.rb +31 -0
  68. data/spec/responses/entity/open_duka_spec.rb +25 -0
  69. data/spec/responses/entity/poderopedia_spec.rb +25 -0
  70. data/spec/responses/list/little_sis_spec.rb +31 -0
  71. data/spec/responses/list/open_corporates_spec.rb +31 -0
  72. data/spec/responses/relation/open_corporates_spec.rb +31 -0
  73. data/spec/responses/relation/open_oil_spec.rb +31 -0
  74. data/spec/result_spec.rb +90 -0
  75. data/spec/spec_helper.rb +21 -0
  76. data/spec/support/shared_examples_for_requests.rb +155 -0
  77. data/spec/validator_spec.rb +43 -0
  78. data/whos_got_dirt.gemspec +28 -0
  79. metadata +281 -0
@@ -0,0 +1,43 @@
1
+ require 'cgi'
2
+ require 'json'
3
+
4
+ require 'active_support/core_ext/hash/except'
5
+ require 'active_support/core_ext/hash/indifferent_access'
6
+ require 'active_support/core_ext/hash/slice'
7
+ require 'json-pointer'
8
+ require 'json-schema'
9
+ require 'nokogiri'
10
+ require 'nori'
11
+
12
+ require 'whos_got_dirt/renderer'
13
+ require 'whos_got_dirt/result'
14
+ require 'whos_got_dirt/validator'
15
+
16
+ require 'whos_got_dirt/request'
17
+ require 'whos_got_dirt/requests/entity/corp_watch'
18
+ require 'whos_got_dirt/requests/entity/little_sis'
19
+ require 'whos_got_dirt/requests/entity/open_corporates'
20
+ require 'whos_got_dirt/requests/entity/open_duka'
21
+ require 'whos_got_dirt/requests/entity/poderopedia'
22
+ require 'whos_got_dirt/requests/list/little_sis'
23
+ require 'whos_got_dirt/requests/list/open_corporates'
24
+ require 'whos_got_dirt/requests/relation/open_corporates'
25
+ require 'whos_got_dirt/requests/relation/open_oil'
26
+
27
+ require 'whos_got_dirt/response'
28
+ require 'whos_got_dirt/responses/helpers/little_sis'
29
+ require 'whos_got_dirt/responses/helpers/open_corporates'
30
+ require 'whos_got_dirt/responses/entity/corp_watch'
31
+ require 'whos_got_dirt/responses/entity/little_sis'
32
+ require 'whos_got_dirt/responses/entity/open_corporates'
33
+ require 'whos_got_dirt/responses/entity/open_duka'
34
+ require 'whos_got_dirt/responses/entity/poderopedia'
35
+ require 'whos_got_dirt/responses/list/little_sis'
36
+ require 'whos_got_dirt/responses/list/open_corporates'
37
+ require 'whos_got_dirt/responses/relation/open_corporates'
38
+ require 'whos_got_dirt/responses/relation/open_oil'
39
+
40
+ module WhosGotDirt
41
+ class Error < StandardError; end
42
+ class ValidationError < Error; end
43
+ end