reapack-index 1.1rc6 → 1.1

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: 17df7d7c772845d36de713e8bb7c27cf496a017e
4
- data.tar.gz: 68dac2cec218dc4c2377055ddf5416b8cf7dbf74
3
+ metadata.gz: dd904ac44e1103ecec541683a97a3a4cce44fa32
4
+ data.tar.gz: 5c0bcfb7ca38662c267993920846a6bdf270580f
5
5
  SHA512:
6
- metadata.gz: 2865f37adea5f2e8c9a06357224971fcadc3c184adca8db2f11fe5ad06fdc46535f8ad9d3681ae971cab3be9c13b3a135ba608db33cdb5d9c3d699d34f069c0d
7
- data.tar.gz: cfb214c725502628ddb19ce13746fdd3de9600ed0bbe309fa0e91605b0cf6603432dc83b7fcac93949b60cb10402b959feaa2dd191a858e3b388ed78c20d9029
6
+ metadata.gz: 07e3ffd47e2b8ea8dcbbba7ec78178ed2144f07c26b93b867b90f587ba0cc3b6550d02931ee426878d55b8d32fa4b066ddb596ecf4012a2e6d287a52be943ecd
7
+ data.tar.gz: 9cf9cae21b26317a80b70ee11f7e9aa5a17de84be34901263279b611ff9939164e076c4e1e20cd1d9b8fe09f2143136c2e003957dfcd760a63b707e57ac0fc54
data/.gitignore CHANGED
@@ -1,4 +1,4 @@
1
- coverage/
2
- doc/
3
- pkg/
4
- Gemfile.lock
1
+ /coverage/
2
+ /doc/
3
+ /pkg/
4
+ /Gemfile.lock
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.0
3
+ - 2.4.0
4
4
  before_install:
5
5
  - gem update bundler
6
6
  - wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb -O pandoc.deb
data/Rakefile CHANGED
@@ -1,7 +1,8 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
2
  require 'rake/testtask'
3
3
 
4
- task :default => [:test]
4
+ task default: :test
5
+
5
6
  Rake::TestTask.new do |t|
6
7
  t.test_files = FileList['test/**/test_*.rb']
7
8
  t.warning = false
@@ -345,7 +345,7 @@ private
345
345
 
346
346
  def indent(input)
347
347
  output = String.new
348
- input.lines {|l| output += "\x20\x20#{l}" }
348
+ input.each_line {|l| output += "\x20\x20#{l}" }
349
349
  output
350
350
  end
351
351
  end
@@ -1,6 +1,6 @@
1
1
  module ReaPack
2
2
  class Index
3
3
  # bump in setup/reapack-index.nsi too
4
- VERSION = '1.1rc6'
4
+ VERSION = '1.1'
5
5
  end
6
6
  end
@@ -27,9 +27,8 @@ class ReaPack::Index
27
27
 
28
28
  walker = Rugged::Walker.new @repo
29
29
  walker.sorting Rugged::SORT_TOPO | Rugged::SORT_REVERSE
30
- walker.push @repo.head.target_id
31
-
32
30
  walker.hide sha if fetch_commit sha
31
+ walker.push @repo.head.target_id
33
32
 
34
33
  walker.map {|c| Commit.new c, @repo }
35
34
  end
@@ -104,7 +103,7 @@ class ReaPack::Index
104
103
  end
105
104
  }
106
105
 
107
- hash = Rugged::Commit.create @repo, \
106
+ hash = Rugged::Commit.create @repo,
108
107
  tree: new_index.write_tree(@repo),
109
108
  message: message,
110
109
  parents: [target].compact,
@@ -163,7 +162,7 @@ class ReaPack::Index
163
162
  end
164
163
 
165
164
  def summary
166
- message.lines.first.chomp
165
+ @commit.summary
167
166
  end
168
167
 
169
168
  def time
@@ -80,9 +80,10 @@ class ReaPack::Index
80
80
  ver = @versions[name]
81
81
  else
82
82
  @versions.each_key {|other|
83
- normalized = [other.dup, name.dup].each {|ver|
84
- ver.gsub! /(?<![\d\w])0+/, ''
85
- ver.gsub! /[^\d\w]+/, '.'
83
+ normalized = [other, name].map {|ver|
84
+ ver.scan(/(\d+)|([a-zA-Z]+)/).map {|match|
85
+ match.first ? match.first.to_i : match.last
86
+ }.join '.'
86
87
  }
87
88
 
88
89
  if normalized.uniq.size < 2
@@ -195,7 +195,7 @@ class ReaPack::Index
195
195
  tag ||= type
196
196
 
197
197
  @pkg.metadata.replace_links type do
198
- @mh[tag].to_s.lines {|line|
198
+ @mh[tag].to_s.each_line {|line|
199
199
  line.strip!
200
200
  @pkg.metadata.push_link type, *Link.split(line) unless line.empty?
201
201
  }
@@ -55,7 +55,7 @@ class ReaPack::Index
55
55
  @sections = []
56
56
 
57
57
  if (@type || pkg.type) == :script
58
- @sections << \
58
+ @sections <<
59
59
  case pkg.topdir.downcase
60
60
  when 'midi editor'
61
61
  :midi_editor
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.add_runtime_dependency 'colorize', '~> 0.7'
31
31
  spec.add_runtime_dependency 'gitable', '~> 0.3'
32
32
  spec.add_runtime_dependency 'metaheader', '~> 1.3'
33
- spec.add_runtime_dependency 'nokogiri', '~> 1.6.8'
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.24'
35
+ spec.add_runtime_dependency 'rugged', '~> 0.25'
36
36
  spec.add_runtime_dependency 'stable_sort', '~> 1.1'
37
37
  end
@@ -4,7 +4,7 @@ Unicode true
4
4
  !include Sections.nsh
5
5
  !include StrRep.nsh
6
6
 
7
- !define VERSION "1.1rc6"
7
+ !define VERSION "1.1"
8
8
  !define NAME "reapack-index ${VERSION}"
9
9
  !define LONG_VERSION "0.1.0.0"
10
10
 
@@ -18,10 +18,10 @@ Unicode true
18
18
  !define PANDOC_URL \
19
19
  "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/${PANDOC_FILE}"
20
20
 
21
- !define RUGGED_VERSION "0.24.0"
21
+ !define RUGGED_VERSION "0.25.1"
22
22
  !define RUGGED_FILE "rugged-${RUGGED_VERSION}-%PLATFORM%.gem"
23
23
  !define RUGGED_URL \
24
- "https://github.com/cfillion/reapack-index/releases/download/v1.0beta4/${RUGGED_FILE}"
24
+ "https://github.com/cfillion/reapack-index/releases/download/v1.1/${RUGGED_FILE}"
25
25
 
26
26
  Name "${NAME}"
27
27
  OutFile "reapack-index-${VERSION}.exe"
@@ -35,7 +35,7 @@ VIAddVersionKey "ProductName" "${NAME}"
35
35
  VIAddVersionKey "ProductVersion" "${LONG_VERSION}"
36
36
  VIAddVersionKey "FileDescription" "${NAME} Setup"
37
37
  VIAddVersionKey "FileVersion" "${LONG_VERSION}"
38
- VIAddVersionKey "LegalCopyright" "Copyright (C) 2015-2016 Christian Fillion"
38
+ VIAddVersionKey "LegalCopyright" "Copyright (C) 2015-2017 Christian Fillion"
39
39
 
40
40
  !define ABORT_MSG "Installation aborted."
41
41
 
@@ -75,8 +75,8 @@ class TestGit < MiniTest::Test
75
75
  end
76
76
 
77
77
  def test_commit_info
78
- commit = @git.create_commit "initial commit\ndescription", [mkfile('file')]
79
- assert_equal "initial commit\ndescription", commit.message
78
+ commit = @git.create_commit "initial commit\n\ndescription", [mkfile('file')]
79
+ assert_equal "initial commit\n\ndescription", commit.message
80
80
  assert_equal 'initial commit', commit.summary
81
81
 
82
82
  assert commit.id.start_with?(commit.short_id)
@@ -135,6 +135,20 @@ class TestPackage < MiniTest::Test
135
135
  pkg.version '1//1'
136
136
  end
137
137
  assert_equal 'version 1//1 is a duplicate of version 1.01', error.message
138
+
139
+ pkg.version '1.0.1' # should not be mistaken for 1.1
140
+ error = assert_raises ReaPack::Index::Error do
141
+ pkg.version '1.000.1'
142
+ end
143
+ assert_equal 'version 1.000.1 is a duplicate of version 1.0.1', error.message
144
+
145
+ pkg.version '01pre1'
146
+ error = assert_raises ReaPack::Index::Error do
147
+ pkg.version '1.pre01'
148
+ end
149
+ assert_equal 'version 1.pre01 is a duplicate of version 01pre1', error.message
150
+
151
+ pkg.version '1PRE1' # not the same as 01pre1
138
152
  end
139
153
 
140
154
  def test_category_and_path
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.1rc6
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - cfillion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-19 00:00:00.000000000 Z
11
+ date: 2017-01-16 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: 1.6.8
145
+ version: '1.7'
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: 1.6.8
152
+ version: '1.7'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: pandoc-ruby
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0.24'
173
+ version: '0.25'
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.24'
180
+ version: '0.25'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: stable_sort
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -263,12 +263,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
263
263
  version: '2.3'
264
264
  required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  requirements:
266
- - - ">"
266
+ - - ">="
267
267
  - !ruby/object:Gem::Version
268
- version: 1.3.1
268
+ version: '0'
269
269
  requirements: []
270
270
  rubyforge_project:
271
- rubygems_version: 2.5.2
271
+ rubygems_version: 2.6.8
272
272
  signing_key:
273
273
  specification_version: 4
274
274
  summary: Package indexer for git-based ReaPack repositories