commonmeta-ruby 3.3.15 → 3.3.16
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/commonmeta/readers/json_feed_reader.rb +4 -3
- data/lib/commonmeta/version.rb +1 -1
- data/spec/cli_spec.rb +2 -2
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_by_blog.yml +189 -1704
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/json_feed_unregistered.yml +54 -1969
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/by_blog_id.yml +210 -518
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/not_indexed_posts.yml +6 -1450
- data/spec/fixtures/vcr_cassettes/Commonmeta_Metadata/get_json_feed/unregistered_posts.yml +54 -8
- data/spec/readers/json_feed_reader_spec.rb +3 -3
- metadata +2 -5
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/blog_post.yml +0 -360
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed/blog_post_uuid.yml +0 -980
- data/spec/fixtures/vcr_cassettes/Commonmeta_CLI/json_feed_unregistered/blog_post_uuid.yml +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1959fba18a127e97c92b94c7e0e78d42c4538e3bccf6b9e6019035931e19d2f4
|
4
|
+
data.tar.gz: 190a4ddc0e6789c56f6f9a5a97355c8684e103abf121d2dfefdd5c1d816bd2d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5994587ca3efda69c8f1e4efca204a89db31d9e4b48a4b683e0312e32209c720f3a24506026152dd69d6ee49895919d72ee4d3aea6557da2b972a1fdb94092a
|
7
|
+
data.tar.gz: 56b4e03114cff5155c502f08f953afb3f2ba13c82bdefecfed73b752131b6b718cd21460eaa8d6506b7b50ded9655330e7c040c833a81c5feeb105c489306ab9
|
data/Gemfile.lock
CHANGED
@@ -111,7 +111,7 @@ module Commonmeta
|
|
111
111
|
return { "string" => nil, "state" => "not_found" } unless response.status.success?
|
112
112
|
|
113
113
|
posts = JSON.parse(response.body.to_s)
|
114
|
-
posts.map { |post| post["
|
114
|
+
posts.map { |post| post["id"] }.first
|
115
115
|
end
|
116
116
|
|
117
117
|
def get_json_feed_not_indexed
|
@@ -122,7 +122,8 @@ module Commonmeta
|
|
122
122
|
return { "string" => nil, "state" => "not_found" } unless response.status.success?
|
123
123
|
|
124
124
|
posts = JSON.parse(response.body.to_s)
|
125
|
-
posts.
|
125
|
+
puts posts.inspect
|
126
|
+
posts.map { |post| post["id"] }.first
|
126
127
|
end
|
127
128
|
|
128
129
|
def get_json_feed_by_blog(blog_id)
|
@@ -133,7 +134,7 @@ module Commonmeta
|
|
133
134
|
return { "string" => nil, "state" => "not_found" } unless response.status.success?
|
134
135
|
|
135
136
|
blog = JSON.parse(response.body.to_s)
|
136
|
-
blog["items"].map { |item| item["
|
137
|
+
blog["items"].map { |item| item["id"] }.first
|
137
138
|
end
|
138
139
|
|
139
140
|
def get_doi_prefix_by_blog_id(blog_id)
|
data/lib/commonmeta/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -367,7 +367,7 @@ describe Commonmeta::CLI do
|
|
367
367
|
|
368
368
|
describe "json_feed", vcr: true do
|
369
369
|
it "json_feed_unregistered" do
|
370
|
-
expect { subject.json_feed_unregistered }.to output(/
|
370
|
+
expect { subject.json_feed_unregistered }.to output(/3023e24a-817d-452e-bb6e-ddadecce94c6/).to_stdout
|
371
371
|
end
|
372
372
|
|
373
373
|
it "json_feed_not_indexed" do
|
@@ -376,7 +376,7 @@ describe Commonmeta::CLI do
|
|
376
376
|
|
377
377
|
it "json_feed_by_blog" do
|
378
378
|
input = "tyfqw20"
|
379
|
-
expect { subject.json_feed_by_blog input }.to output(/
|
379
|
+
expect { subject.json_feed_by_blog input }.to output(/37538c38-66e6-4ac4-ab5c-679684622ade/).to_stdout
|
380
380
|
end
|
381
381
|
end
|
382
382
|
end
|