maltese 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +19 -0
  3. data/.gitignore +55 -0
  4. data/.rubocop.yml +1156 -0
  5. data/.travis.yml +26 -0
  6. data/CHANGELOG.md +5 -0
  7. data/Dockerfile +16 -0
  8. data/Gemfile +3 -0
  9. data/Gemfile.lock +128 -0
  10. data/LICENSE.md +21 -0
  11. data/README.md +51 -0
  12. data/bin/maltese +5 -0
  13. data/lib/maltese/cli.rb +30 -0
  14. data/lib/maltese/sitemap.rb +140 -0
  15. data/lib/maltese/utils.rb +87 -0
  16. data/lib/maltese/version.rb +3 -0
  17. data/lib/maltese.rb +8 -0
  18. data/maltese.gemspec +37 -0
  19. data/public/sitemap.xml.gz +0 -0
  20. data/spec/cli_spec.rb +43 -0
  21. data/spec/fixtures/sitemap.json +7574 -0
  22. data/spec/fixtures/sitemap_nil.json +11 -0
  23. data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_data/should_report_if_there_are_no_works_returned_by_the_Datacite_Solr_API.yml +38 -0
  24. data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_data/should_report_if_there_are_works_returned_by_the_Datacite_Solr_API.yml +38 -0
  25. data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_total/with_no_works.yml +38 -0
  26. data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_total/with_works.yml +38 -0
  27. data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/push_data/should_report_if_there_are_no_works_returned_by_the_Datacite_Solr_API.yml +86 -0
  28. data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/push_data/should_report_if_there_are_works_returned_by_the_Datacite_Solr_API.yml +86 -0
  29. data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/queue_jobs/should_report_if_there_are_no_works_returned_by_the_Datacite_Solr_API.yml +38 -0
  30. data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/queue_jobs/should_report_if_there_are_works_returned_by_the_Datacite_Solr_API.yml +270 -0
  31. data/spec/sitemap_spec.rb +111 -0
  32. data/spec/spec_helper.rb +95 -0
  33. metadata +310 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "responseHeader": {
3
+ "status": 0,
4
+ "QTime": 0
5
+ },
6
+ "response": {
7
+ "numFound": 0,
8
+ "start": 0,
9
+ "docs": []
10
+ }
11
+ }
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://search.datacite.org/api?fl=doi,updated&fq=updated:%5B2005-04-07T00:00:00Z%20TO%202005-04-08T23:59:59Z%5D%20AND%20has_metadata:true%20AND%20is_active:true&q=*:*&rows=50000&sort=updated%20asc&start=0&wt=json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Maremma - https://github.com/datacite/maremma
12
+ Accept:
13
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: ''
18
+ headers:
19
+ Server:
20
+ - openresty/1.11.2.2
21
+ Date:
22
+ - Sun, 26 Feb 2017 16:36:49 GMT
23
+ Content-Type:
24
+ - application/json;charset=UTF-8
25
+ Connection:
26
+ - keep-alive
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Access-Control-Allow-Methods:
30
+ - GET, POST, OPTIONS
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"responseHeader":{"status":0,"QTime":0},"response":{"numFound":0,"start":0,"docs":[]}}
34
+
35
+ '
36
+ http_version:
37
+ recorded_at: Tue, 07 Apr 2015 22:00:00 GMT
38
+ recorded_with: VCR 3.0.3