relaton-iso-bib 0.2.4 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d6adc28ed85e81d6f45bf24bc4a8a9073a51df2
4
- data.tar.gz: 9042f74e28ce2ac78095d21445e314cacbadd3f5
3
+ metadata.gz: 2a8f8aa9ba99729a50ba5fc2eab63740b576628e
4
+ data.tar.gz: 247308010387c4838c56001b8efddad5fadde7fa
5
5
  SHA512:
6
- metadata.gz: b7a5b8925ff2738b7f7f2544cef274c82c95d5e2cfd1e386077d0ada859f3b62046c94c5a7d5e54afdb36c261cfa88f7c95491b36384954472699ed6d621981f
7
- data.tar.gz: e3f1246dd6b1172177cc13d1ff0f022f8d2fd2f21c187f2321a4f2eb7013faed9f57f5f5d867a8e1dd349ccc1b5f7b0d77d1b984a57b725e07bebf5a7e4f9fce
6
+ metadata.gz: 2681d0833b05755f655a423675964f093120b3bec9c7cc59b0abddc91c6effa8b3a42c125d5fc6c7b715eec235002149ab426dce4fce52148967eee86f821e8c
7
+ data.tar.gz: 9647416af631193cfb4f82e8f9ccd62db863748a364b3cfe4f3842719923f24f24c863919182d780ee9569621a10053bf8e706e9ba8ade8af80d6e4835cc65d0
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton-iso-bib (0.2.4)
4
+ relaton-iso-bib (0.3.0)
5
5
  isoics (~> 0.1.6)
6
- relaton-bib (~> 0.2.0)
6
+ relaton-bib (~> 0.3.0)
7
7
  ruby_deep_clone (~> 0.8.0)
8
8
 
9
9
  GEM
@@ -34,7 +34,7 @@ GEM
34
34
  pry (~> 0.10)
35
35
  public_suffix (3.1.1)
36
36
  rake (10.5.0)
37
- relaton-bib (0.2.5)
37
+ relaton-bib (0.3.0)
38
38
  addressable
39
39
  nokogiri (~> 1.10)
40
40
  rspec (3.8.0)
data/README.adoc CHANGED
@@ -35,7 +35,7 @@ item = RelatonIsoBib::IsoBibliographicItem.new(
35
35
  type: "sid", project_number: "ISO 1-2:2014", part: 2, subpart: 2,
36
36
  ),
37
37
  docnumber: "123456",
38
- titles: [
38
+ title: [
39
39
  { title_intro: "Geographic information", title_main: "Metadata",
40
40
  title_part: "Part 1: Fundamentals", language: "en", script: "Latn" },
41
41
  { title_intro: "Information géographique", title_main: "Métadonnées",
@@ -55,17 +55,17 @@ item = RelatonIsoBib::IsoBibliographicItem.new(
55
55
  { content: "L'ISO 19115-1:2014 définit le schéma requis pour ...",
56
56
  language: "fr", script: "Latn", format: "text/plain" },
57
57
  ],
58
- contributors: [
58
+ contributor: [
59
59
  { entity: { name: "International Organization for Standardization",
60
60
  url: "www.iso.org", abbreviation: "ISO" },
61
- roles: ["publisher"] },
61
+ role: ["publisher"] },
62
62
  {
63
63
  entity: RelatonBib::Person.new(
64
64
  name: RelatonBib::FullName.new(
65
65
  completename: RelatonBib::LocalizedString.new("John Smith"),
66
66
  ),
67
67
  ),
68
- roles: ["author"],
68
+ role: ["author"],
69
69
  },
70
70
  ],
71
71
  copyright: { owner: {
@@ -79,7 +79,7 @@ item = RelatonIsoBib::IsoBibliographicItem.new(
79
79
  { type: "rss", content: "https://www.iso.org/contents/data/standard"\
80
80
  "/05/37/53798.detail.rss" },
81
81
  ],
82
- relations: [
82
+ relation: [
83
83
  RelatonBib::DocumentRelation.new(
84
84
  type: "updates",
85
85
  bibitem: RelatonIsoBib::IsoBibliographicItem.new(
@@ -284,7 +284,7 @@ wg = item.editorialgroup
284
284
 
285
285
  [source,ruby]
286
286
  ----
287
- item.relations
287
+ item.relation
288
288
  => [#<RelatonBib::DocumentRelation:0x007fe5198cec80
289
289
  @bib_locality=[#<RelatonBib::BibItemLocality:0x007fe5198cef78 @reference_from="Reference form", @reference_to=nil, @type="updates">],
290
290
  @bibitem=
@@ -319,7 +319,7 @@ item.title(lang: "en")
319
319
  item.shortref(item.structuredidentifier)
320
320
  => "ISO1-2014(allparts):2014: All Parts"
321
321
 
322
- item.relations.last.bibitem.title
322
+ item.relation.last.bibitem.title
323
323
  => [#<RelatonIsoBib::TypedTitleString:0x007fe51b293620
324
324
  @title=#<RelatonBib::FormattedString:0x007fe51b293530 @content="Metadata", @format="text/plain", @language=["en"], @script=["Latn"]>,
325
325
  @type="title-main">,
@@ -65,12 +65,12 @@ module RelatonIsoBib
65
65
  # @param docid [Array<RelatonBib::DocumentIdentifier>]
66
66
  # @param structuredidentifier [RelatonIsoBib::StructuredIdentifier]
67
67
  #
68
- # @param titles [Array<Hash>]
69
- # @option titles [String] :title_intro
70
- # @option titles [String] :title_main
71
- # @option titles [String] :title_part
72
- # @option titles [String] :language
73
- # @option titles [String] :script
68
+ # @param title [Array<Hash>]
69
+ # @option title [String] :title_intro
70
+ # @option title [String] :title_main
71
+ # @option title [String] :title_part
72
+ # @option title [String] :language
73
+ # @option title [String] :script
74
74
  #
75
75
  # @param editorialgroup [Hash, RelatonIsoBib::EditorialGroup]
76
76
  # @option workgrpup [String] :name
@@ -86,10 +86,10 @@ module RelatonIsoBib
86
86
  # @option ics [Integer] :group
87
87
  # @option ics [Integer] :subgroup
88
88
  #
89
- # @param dates [Array<Hash>]
90
- # @option dates [String] :type
91
- # @option dates [String] :from
92
- # @option dates [String] :to
89
+ # @param date [Array<Hash>]
90
+ # @option date [String] :type
91
+ # @option date [String] :from
92
+ # @option date [String] :to
93
93
  #
94
94
  # @param abstract [Array<Hash>]
95
95
  # @option abstract [String] :content
@@ -97,12 +97,12 @@ module RelatonIsoBib
97
97
  # @option abstract [String] :script
98
98
  # @option abstract [String] :type
99
99
  #
100
- # @param contributors [Array<Hash>]
101
- # @option contributors [Hash] :entity
100
+ # @param contributor [Array<Hash>]
101
+ # @option contributor [Hash] :entity
102
102
  # @option entity [String] :name
103
103
  # @option entity [String] :url
104
104
  # @option entity [String] :abbreviation
105
- # @option contributors [Array<String>] :roles
105
+ # @option contributor [Array<String>] :role
106
106
  #
107
107
  # @param copyright [Hash]
108
108
  # @option copyright [Hash] :owner
@@ -112,14 +112,14 @@ module RelatonIsoBib
112
112
  # @option copyright [String] :from
113
113
  # @option copyright [String] :to
114
114
  #
115
- # @param link [Array<Hash, RelatonIsoBib::TypedUri>]
115
+ # @param link [Array<Hash, RelatonBib::TypedUri>]
116
116
  # @option link [String] :type
117
117
  # @option link [String] :content
118
118
  #
119
- # @param relations [Array<Hash>]
120
- # @option relations [String] :type
121
- # @option relations [RelatonIsoBib::IsoBibliographicItem] :bibitem
122
- # @option relations [Array<RelatonBib::BibItemLocality>] :bib_locality
119
+ # @param relation [Array<Hash>]
120
+ # @option relation [String] :type
121
+ # @option relation [RelatonIsoBib::IsoBibliographicItem] :bibitem
122
+ # @option relation [Array<RelatonBib::BibItemLocality>] :bib_locality
123
123
  #
124
124
  # @raise [ArgumentError]
125
125
  def initialize(**args)
@@ -128,14 +128,14 @@ module RelatonIsoBib
128
128
  #check_script args.fetch(:script, [])
129
129
 
130
130
  super_args = args.select do |k|
131
- %i[id docnumber language script docstatus dates abstract contributors
132
- edition version relations biblionote series medium place copyright
131
+ %i[id docnumber language script docstatus date abstract contributor
132
+ edition version relation biblionote series medium place copyright
133
133
  link fetched docid formattedref extent accesslocation classification
134
134
  validity].include? k
135
135
  end.merge(type: "standard")
136
136
  super(super_args)
137
137
 
138
- @title = args.fetch(:titles, []).reduce([]) do |a, t|
138
+ @title = args.fetch(:title, []).reduce([]) do |a, t|
139
139
  if t.is_a? Hash
140
140
  a + typed_titles(t)
141
141
  else
@@ -153,9 +153,9 @@ module RelatonIsoBib
153
153
  @structuredidentifier = args[:structuredidentifier]
154
154
  @doctype ||= args[:type]
155
155
  @ics = args.fetch(:ics, []).map { |i| i.is_a?(Hash) ? Ics.new(i) : i }
156
- @link = args.fetch(:link, []).map do |s|
157
- s.is_a?(Hash) ? RelatonBib::TypedUri.new(s) : s
158
- end
156
+ # @link = args.fetch(:link, []).map do |s|
157
+ # s.is_a?(Hash) ? RelatonBib::TypedUri.new(s) : s
158
+ # end
159
159
  @id_attribute = true
160
160
  end
161
161
  # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
@@ -169,7 +169,7 @@ module RelatonIsoBib
169
169
  def to_all_parts
170
170
  me = DeepClone.clone(self)
171
171
  me.disable_id_attribute
172
- @relations << RelatonBib::DocumentRelation.new(
172
+ @relation << RelatonBib::DocumentRelation.new(
173
173
  type: "partOf", bibitem: me,
174
174
  )
175
175
  @language.each do |l|
@@ -193,9 +193,9 @@ module RelatonIsoBib
193
193
  def to_most_recent_reference
194
194
  me = DeepClone.clone(self)
195
195
  me.disable_id_attribute
196
- @relations << RelatonBib::DocumentRelation.new(type: "instance", bibitem: me)
196
+ @relation << RelatonBib::DocumentRelation.new(type: "instance", bibitem: me)
197
197
  @abstract = []
198
- @dates = []
198
+ @date = []
199
199
  @docidentifier.each &:remove_date
200
200
  @structuredidentifier&.remove_date
201
201
  @id&.sub! /-[12]\d\d\d/, ""
@@ -1,3 +1,3 @@
1
1
  module RelatonIsoBib
2
- VERSION = "0.2.4".freeze
2
+ VERSION = "0.3.0".freeze
3
3
  end
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "debase"
36
36
 
37
37
  spec.add_dependency "isoics", "~> 0.1.6"
38
- spec.add_dependency "relaton-bib", "~>0.2.0"
38
+ spec.add_dependency "relaton-bib", "~>0.3.0"
39
39
  spec.add_dependency "ruby_deep_clone", "~> 0.8.0"
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-22 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.2.0
145
+ version: 0.3.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.2.0
152
+ version: 0.3.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: ruby_deep_clone
155
155
  requirement: !ruby/object:Gem::Requirement