reapack-index 1.2.3rc1 → 1.2.3rc2

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
  SHA256:
3
- metadata.gz: 5326de32c33b763e737211b02a854e59c12fcd29982d3b835ae80d2c797d46c3
4
- data.tar.gz: 20ee6a02cc538a3bcf6ffff3a0cae3f7e50f98252efcd89dbcef5ff054a86adc
3
+ metadata.gz: d784a376ff02ae17a66655bde854cfd515f570d48ebcd34b43d11e91e8f568b0
4
+ data.tar.gz: 8f3ed362da5976afadd52d71e27ebfa209b0f17e69711f5cb44415d20f39e1c3
5
5
  SHA512:
6
- metadata.gz: 7a2421af8f16e88a29cd7c86f5becfd96c5e22d04e344214e4fff22ef3821023d2e54cdb7bba54c4eeb4053b82f3724c98765e1674748ea4d3cd409957608cd4
7
- data.tar.gz: f2668253f9110713cb107b779ca9adc52b36ca5449075e493f61f1881343de6f16bad76fda0cb7d6d6008622e6bd65c8e6a53fd5ea46c92f892a3ff26cf3a429
6
+ metadata.gz: 463ae58c7b47ef181738acb3e688c97125d997843bc8e05298b180c480963b1685eccacccc12781a7dc61b159218a27c3a529e9914c515f02df6b0ab5ab58b4f
7
+ data.tar.gz: b2b28025f20b4b0f0aea9cccd791954a023bb39d5ca91af5460f15a00b189ed271e3785732bcff3079b9b8410bf4f7a823717c40238bbf34ac8cd67eac3451bb
@@ -77,6 +77,15 @@ class ReaPack::Index
77
77
  .find {|name, exts| input.to_sym == name || exts.include?(input.to_s) }
78
78
  &.first
79
79
  end
80
+
81
+ def parse(contents)
82
+ mh = MetaHeader.parse contents
83
+ unless mh.has? :changelog
84
+ wp = WordpressChangelog.new mh
85
+ wp.parse contents
86
+ end
87
+ mh
88
+ end
80
89
  end
81
90
 
82
91
  def initialize(path)
@@ -120,16 +129,7 @@ class ReaPack::Index
120
129
  type = self.class.type_of path
121
130
  return unless type
122
131
 
123
- mh = if contents.is_a? MetaHeader
124
- contents
125
- else
126
- mh = MetaHeader.parse contents
127
- unless mh.has? :changelog
128
- wp = WordpressChangelog.new mh
129
- wp.parse contents
130
- end
131
- mh
132
- end
132
+ mh = contents.is_a?(MetaHeader) ? contents : self.class.parse(contents)
133
133
 
134
134
  if mh[:noindex]
135
135
  remove path
@@ -1,5 +1,5 @@
1
1
  module ReaPack
2
2
  class Index
3
- VERSION = '1.2.3rc1'
3
+ VERSION = '1.2.3rc2'
4
4
  end
5
5
  end
@@ -232,7 +232,7 @@ class ReaPack::Index
232
232
  end
233
233
 
234
234
  def new_header
235
- @new_header ||= MetaHeader.parse @new_content if new_content
235
+ @new_header ||= ReaPack::Index.parse @new_content if new_content
236
236
  end
237
237
  end
238
238
  end
@@ -32,6 +32,6 @@ Gem::Specification.new do |spec|
32
32
  spec.add_runtime_dependency 'metaheader', '~> 2.0'
33
33
  spec.add_runtime_dependency 'nokogiri', '~> 1.7'
34
34
  spec.add_runtime_dependency 'pandoc-ruby', '~> 2.0'
35
- spec.add_runtime_dependency 'rugged', '~> 0.25'
35
+ spec.add_runtime_dependency 'rugged', '~> 0.99'
36
36
  spec.add_runtime_dependency 'stable_sort', '~> 1.1'
37
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reapack-index
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3rc1
4
+ version: 1.2.3rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cfillion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-20 00:00:00.000000000 Z
11
+ date: 2020-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0.25'
173
+ version: '0.99'
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0.25'
180
+ version: '0.99'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: stable_sort
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -264,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
264
  - !ruby/object:Gem::Version
265
265
  version: 1.3.1
266
266
  requirements: []
267
- rubygems_version: 3.0.2
267
+ rubygems_version: 3.1.2
268
268
  signing_key:
269
269
  specification_version: 4
270
270
  summary: Package indexer for git-based ReaPack repositories