reapack-index 1.1rc5 → 1.1rc6

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: 521e9cf95253116fdbdae336d5e103e412800a63
4
- data.tar.gz: 0ba6258b623ec7dc4daefc2055ba8cd9e5a147a8
3
+ metadata.gz: 17df7d7c772845d36de713e8bb7c27cf496a017e
4
+ data.tar.gz: 68dac2cec218dc4c2377055ddf5416b8cf7dbf74
5
5
  SHA512:
6
- metadata.gz: 0cbe24ed175822879c0dc9fff484b6311c7d3a53d4000d8ee7036d885184e85b448f8f953fb5ca5f50b872556cc826e2b521845166fca18637867d98f9dc5624
7
- data.tar.gz: a747dc392326879db9980f449ac483d13b92d8a6d0de0e003f2b6242957cf23e718f24ea8cc4b9af68b6d5f55f20ffdc2e48770b95a504ae3543120e300adcc3
6
+ metadata.gz: 2865f37adea5f2e8c9a06357224971fcadc3c184adca8db2f11fe5ad06fdc46535f8ad9d3681ae971cab3be9c13b3a135ba608db33cdb5d9c3d699d34f069c0d
7
+ data.tar.gz: cfb214c725502628ddb19ce13746fdd3de9600ed0bbe309fa0e91605b0cf6603432dc83b7fcac93949b60cb10402b959feaa2dd191a858e3b388ed78c20d9029
@@ -3,6 +3,6 @@ rvm:
3
3
  - 2.3.0
4
4
  before_install:
5
5
  - gem update bundler
6
- - wget https://github.com/jgm/pandoc/releases/download/1.17.2/pandoc-1.17.2-1-amd64.deb -O pandoc.deb
6
+ - wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb -O pandoc.deb
7
7
  - sudo dpkg -i pandoc.deb
8
8
  cache: bundler
@@ -37,7 +37,8 @@ class ReaPack::Index
37
37
  effect: %w{jsfx},
38
38
  data: %w{data},
39
39
  theme: %w{theme},
40
- langpack: %w{ReaperLangPack},
40
+ langpack: %w{reaperlangpack},
41
+ webinterface: %w{www},
41
42
  }.freeze
42
43
 
43
44
  FS_ROOT = File.expand_path('/').freeze
@@ -57,10 +58,11 @@ class ReaPack::Index
57
58
  def type_of(path)
58
59
  # don't treat files in the root directory as packages
59
60
  # because they don't have a category
60
- return if File.dirname(path) == '.'
61
61
 
62
- ext = File.extname(path)[1..-1]
63
- PKG_TYPES.find {|_, v| v.include? ext }&.first if ext
62
+ if File.dirname(path) != '.' && (ext = File.extname(path)[1..-1])
63
+ ext.downcase!
64
+ PKG_TYPES.find {|_, v| v.include? ext }&.first
65
+ end
64
66
  end
65
67
 
66
68
  alias :is_package? :type_of
@@ -1,6 +1,6 @@
1
1
  module ReaPack
2
2
  class Index
3
3
  # bump in setup/reapack-index.nsi too
4
- VERSION = '1.1rc5'
4
+ VERSION = '1.1rc6'
5
5
  end
6
6
  end
@@ -37,12 +37,13 @@ class ReaPack::Index
37
37
 
38
38
  HEADER_ALIASES = {
39
39
  [:reascript_name, :jsfx_name, :theme_name,
40
- :extension_name, :desc, :name] => :description,
40
+ :extension_name, :langpack_name, :webinterface_name,
41
+ :desc, :name] => :description,
41
42
  [:links, :website] => :link,
42
43
  :screenshots => :screenshot,
43
44
  }.freeze
44
45
 
45
- META_TYPES = [:extension, :data, :theme].freeze
46
+ META_TYPES = [:extension, :data, :theme, :webinterface].freeze
46
47
 
47
48
  def initialize(cat, pkg, mh, index)
48
49
  @cat, @pkg, @mh, @index = cat, pkg, mh, index
@@ -4,16 +4,16 @@ Unicode true
4
4
  !include Sections.nsh
5
5
  !include StrRep.nsh
6
6
 
7
- !define VERSION "1.1rc5"
7
+ !define VERSION "1.1rc6"
8
8
  !define NAME "reapack-index ${VERSION}"
9
9
  !define LONG_VERSION "0.1.0.0"
10
10
 
11
- !define RUBY_VERSION "2.3.1"
11
+ !define RUBY_VERSION "2.3.3"
12
12
  !define RUBYINSTALLER_FILE "rubyinstaller-${RUBY_VERSION}.exe"
13
13
  !define RUBYINSTALLER_URL \
14
14
  "http://dl.bintray.com/oneclick/rubyinstaller/${RUBYINSTALLER_FILE}"
15
15
 
16
- !define PANDOC_VERSION "1.18"
16
+ !define PANDOC_VERSION "1.19.1"
17
17
  !define PANDOC_FILE "pandoc-${PANDOC_VERSION}-windows.msi"
18
18
  !define PANDOC_URL \
19
19
  "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/${PANDOC_FILE}"
@@ -252,4 +252,31 @@ class TestIndex::Scan < MiniTest::Test
252
252
  index.write!
253
253
  assert_equal expected, File.read(index.path)
254
254
  end
255
+
256
+ def test_webinterface
257
+ index = ReaPack::Index.new @dummy_path
258
+ index.url_template = 'http://host/$path'
259
+ index.files = ['Web Interfaces/Test.www']
260
+
261
+ index.scan index.files.first, <<-IN
262
+ @version 1.0
263
+ @provides test.html http://host/test.html
264
+ IN
265
+
266
+ expected = <<-XML
267
+ <?xml version="1.0" encoding="utf-8"?>
268
+ <index version="1">
269
+ <category name="Web Interfaces">
270
+ <reapack name="Test.www" type="webinterface">
271
+ <version name="1.0">
272
+ <source file="test.html">http://host/test.html</source>
273
+ </version>
274
+ </reapack>
275
+ </category>
276
+ </index>
277
+ XML
278
+
279
+ index.write!
280
+ assert_equal expected, File.read(index.path)
281
+ end
255
282
  end
@@ -162,7 +162,7 @@ class TestConflictDetector < MiniTest::Test
162
162
  cd['test'].clear
163
163
  cd['test'].push :grp, :all, 'file'
164
164
 
165
- assert_equal nil, cd.resolve(:grp, 'test')
165
+ assert_nil cd.resolve(:grp, 'test')
166
166
  end
167
167
 
168
168
  def test_clone
@@ -185,7 +185,7 @@ class TestConflictDetector < MiniTest::Test
185
185
  cd.clear
186
186
  cd['test'].push :grp, :all, 'file'
187
187
 
188
- assert_equal nil, cd.resolve(:grp, 'test')
188
+ assert_nil cd.resolve(:grp, 'test')
189
189
  end
190
190
 
191
191
  def test_load_xml
@@ -9,10 +9,13 @@ class TestIndex < MiniTest::Test
9
9
  end
10
10
 
11
11
  def test_type_of
12
+ [
13
+ 'src/main.cpp',
14
+ 'src/noext',
15
+ 'in_root',
16
+ ].each {|fn| assert_nil ReaPack::Index.type_of(fn) }
17
+
12
18
  {
13
- 'src/main.cpp' => nil,
14
- 'src/noext' => nil,
15
- 'in_root' => nil,
16
19
  'Cat/test.lua' => :script,
17
20
  'Cat/test.eel' => :script,
18
21
  'Cat/test.py' => :script,
@@ -20,7 +23,9 @@ class TestIndex < MiniTest::Test
20
23
  'Cat/test.jsfx' => :effect,
21
24
  'Cat/test.data' => :data,
22
25
  'Cat/test.theme' => :theme,
26
+ 'Cat/test.reaperlangpack' => :langpack,
23
27
  'Cat/test.ReaperLangPack' => :langpack,
28
+ 'Cat/test.www' => :webinterface,
24
29
  }.each {|fn, type|
25
30
  actual = ReaPack::Index.type_of fn
26
31
  assert_equal type, actual,
@@ -30,19 +35,22 @@ class TestIndex < MiniTest::Test
30
35
  end
31
36
 
32
37
  def test_resolve_type
38
+ assert_nil ReaPack::Index.resolve_type('hello')
39
+
33
40
  {
34
- 'hello' => nil,
35
- :script => :script,
36
- 'lua' => :script,
37
- 'eel' => :script,
38
- 'effect' => :effect,
39
- :jsfx => :effect,
40
- 'jsfx' => :effect,
41
- 'extension' => :extension,
42
- 'ext' => :extension,
43
- 'data' => :data,
44
- 'theme' => :theme,
45
- 'langpack' => :langpack,
41
+ :script => :script,
42
+ 'lua' => :script,
43
+ 'eel' => :script,
44
+ 'effect' => :effect,
45
+ :jsfx => :effect,
46
+ 'jsfx' => :effect,
47
+ 'extension' => :extension,
48
+ 'ext' => :extension,
49
+ 'data' => :data,
50
+ 'theme' => :theme,
51
+ 'langpack' => :langpack,
52
+ 'www' => :webinterface,
53
+ 'webinterface' => :webinterface,
46
54
  }.each {|input, type|
47
55
  actual = ReaPack::Index.resolve_type input
48
56
  assert_equal type, actual,
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.1rc5
4
+ version: 1.1rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - cfillion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-14 00:00:00.000000000 Z
11
+ date: 2016-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  version: 1.3.1
269
269
  requirements: []
270
270
  rubyforge_project:
271
- rubygems_version: 2.5.1
271
+ rubygems_version: 2.5.2
272
272
  signing_key:
273
273
  specification_version: 4
274
274
  summary: Package indexer for git-based ReaPack repositories