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.
- checksums.yaml +7 -0
- data/.codeclimate.yml +19 -0
- data/.gitignore +55 -0
- data/.rubocop.yml +1156 -0
- data/.travis.yml +26 -0
- data/CHANGELOG.md +5 -0
- data/Dockerfile +16 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +128 -0
- data/LICENSE.md +21 -0
- data/README.md +51 -0
- data/bin/maltese +5 -0
- data/lib/maltese/cli.rb +30 -0
- data/lib/maltese/sitemap.rb +140 -0
- data/lib/maltese/utils.rb +87 -0
- data/lib/maltese/version.rb +3 -0
- data/lib/maltese.rb +8 -0
- data/maltese.gemspec +37 -0
- data/public/sitemap.xml.gz +0 -0
- data/spec/cli_spec.rb +43 -0
- data/spec/fixtures/sitemap.json +7574 -0
- data/spec/fixtures/sitemap_nil.json +11 -0
- 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
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_data/should_report_if_there_are_works_returned_by_the_Datacite_Solr_API.yml +38 -0
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_total/with_no_works.yml +38 -0
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_total/with_works.yml +38 -0
- 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
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/push_data/should_report_if_there_are_works_returned_by_the_Datacite_Solr_API.yml +86 -0
- 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
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/queue_jobs/should_report_if_there_are_works_returned_by_the_Datacite_Solr_API.yml +270 -0
- data/spec/sitemap_spec.rb +111 -0
- data/spec/spec_helper.rb +95 -0
- metadata +310 -0
| @@ -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
         |