lyp 1.3.5 → 1.3.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 950515603fdf45dbf2925e4c1f9cab856e6011ab
4
- data.tar.gz: a2eb68573dda67d1156fe881ad639708b2d2dc86
3
+ metadata.gz: d17c4c76b6e7d80fb92d00eb7308853034f2482c
4
+ data.tar.gz: 46a6db73bcad7379c7222584f45d896aceb28b14
5
5
  SHA512:
6
- metadata.gz: b857247eb1de5b5d4e67a549d4c8ba19df1e1efbe8311f69b9dcd31f4da831ce20d72abd7cc673a7225a7722c02facaf26271d40d77123e3a9d91c62eb6f1aae
7
- data.tar.gz: d85896d55f2e5c1ee7ec7bd2bf5f9cb50ae61b6e2cd2d3901ce1655378625342825cd6e86ca62631ebeb1dbbd37bb8292e090e0f405fdaf08b416417a8c2178a
6
+ metadata.gz: e08ff84cd4fd32602a583e84ce4a501b3f201f1b346eeacc670f0055ef29b97efacc5c22cfc66d9092174c39127c906614ba954ebb69ea2c83b50368e498d98d
7
+ data.tar.gz: 83f4d533894a531c13ce561d1ea68dd1f91144e1b5adc190b44e0e36df2570f581fad3bb409d2b333df038606bbce7c35086a9a61ee8ef2722a33b4f235b1348
data/README.md CHANGED
@@ -9,11 +9,11 @@
9
9
 
10
10
  lyp is an open-source tool that takes the pain out of working with [Lilypond](http://lilypond.org/).
11
11
 
12
- __Use packages__: Install [packages](http://lyp.noteflakes.com/lyp/#/?id=working-with-packages) to enhance your Lilypond files with additional functionality. Add [specialized tweaks](http://lyp.noteflakes.com/lyp/#/packages?id=tweaking) or even [change the music font](http://lyp.noteflakes.com/lyp/#/packages?id=fonts).
12
+ __Use packages__: Install [packages](http://lyp.noteflakes.com/#/?id=working-with-packages) to enhance your Lilypond files with additional functionality. Add [specialized tweaks](http://lyp.noteflakes.com/#/packages?id=tweaking) or even [change the music font](http://lyp.noteflakes.com/#/packages?id=fonts).
13
13
 
14
- __No hassle Lilypond installation__: with lyp you can [install Lilypond](http://lyp.noteflakes.com/lyp/#/?id=installing-and-using-lilypond) with a single easy command, no need to click links, or unzip and copy files around.
14
+ __No hassle Lilypond installation__: with lyp you can [install Lilypond](http://lyp.noteflakes.com/#/?id=installing-and-using-lilypond) with a single easy command, no need to click links, or unzip and copy files around.
15
15
 
16
- __Even more tools for power users__: watch and automatically [recompile](http://lyp.noteflakes.com/lyp/#/?id=lyp-watch) changed source files, [flatten](http://lyp.noteflakes.com/lyp/#/?id=lyp-flatten) include files, and [automatically install](http://lyp.noteflakes.com/lyp/#/?id=lyp-compile) package dependencies or any required version of Lilypond.
16
+ __Even more tools for power users__: watch and automatically [recompile](http://lyp.noteflakes.com/#/?id=lyp-watch) changed source files, [flatten](http://lyp.noteflakes.com/#/?id=lyp-flatten) include files, and [automatically install](http://lyp.noteflakes.com/#/?id=lyp-compile) package dependencies or any required version of Lilypond.
17
17
 
18
18
  For more information, see the lyp [documentation](http://lyp.noteflakes.com/).
19
19
 
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # Make sure encoding is UTF-8
4
+ Encoding.default_external = "UTF-8"
5
+
3
6
  $LOAD_PATH.unshift File.expand_path("../lib", File.dirname(__FILE__))
4
7
 
5
8
  require 'lyp/version'
@@ -117,6 +117,7 @@
117
117
  (ly:parser-include-string parser str)))
118
118
 
119
119
  (define (lyp:include parser location path once) (let* (
120
+ (path (if (symbol? path) (symbol->string path) path))
120
121
  (current-dir (lyp:this-dir))
121
122
  (abs-path (if (lyp:absolute-path? path)
122
123
  path
@@ -146,7 +147,8 @@
146
147
  )
147
148
 
148
149
  % command form
149
- require = #(define-void-function (parser location ref)(string?) (let* (
150
+ require = #(define-void-function (parser location ref)(string-or-symbol?) (let* (
151
+ (ref (if (symbol? ref) (symbol->string ref) ref))
150
152
  (name (lyp:ref->name ref))
151
153
  (package-dir (lyp:name->dir name))
152
154
  (entry-point-path (lyp:join-path package-dir "package.ly"))
@@ -160,14 +162,14 @@ require = #(define-void-function (parser location ref)(string?) (let* (
160
162
  ))
161
163
  ))
162
164
 
163
- pinclude = #(define-void-function (parser location path)(string?)
165
+ pinclude = #(define-void-function (parser location path)(string-or-symbol?)
164
166
  (lyp:include parser location path #f))
165
167
 
166
- pcondInclude = #(define-void-function (parser location expr path)(scheme? string?)
168
+ pcondInclude = #(define-void-function (parser location expr path)(scheme? string-or-symbol?)
167
169
  (if expr (lyp:include parser location path #f)))
168
170
 
169
- pincludeOnce = #(define-void-function (parser location path)(string?)
171
+ pincludeOnce = #(define-void-function (parser location path)(string-or-symbol?)
170
172
  (lyp:include parser location path #t))
171
173
 
172
- pcondIncludeOnce = #(define-void-function (parser location expr path)(scheme? string?)
174
+ pcondIncludeOnce = #(define-void-function (parser location expr path)(scheme? string-or-symbol?)
173
175
  (if expr (lyp:include parser location path #t)))
@@ -493,7 +493,7 @@ module Lyp::Lilypond
493
493
  "linux-64"
494
494
  when "ppc-linux"
495
495
  "linux-ppc"
496
- when "x64-mingw32"
496
+ when /mingw|mswin/
497
497
  "mingw"
498
498
  end
499
499
  end
@@ -120,7 +120,7 @@ module Lyp
120
120
  end
121
121
  end
122
122
 
123
- DEP_RE = /\\(require|include|pinclude|pincludeOnce) "([^"]+)"/.freeze
123
+ DEP_RE = /\\(require|include|pinclude|pincludeOnce)\s+(?:"|#')?([^\s"]+)"?/.freeze
124
124
  INCLUDE = "include".freeze
125
125
  PINCLUDE = "pinclude".freeze
126
126
  PINCLUDE_ONCE = "pincludeOnce".freeze
@@ -225,12 +225,17 @@ module Lyp
225
225
  search_paths = [dir]
226
226
  search_paths += @opts[:include_paths] if @opts[:include_paths]
227
227
 
228
+ # Reminder: return inside a proc returns from the caller
229
+ search = proc {|fn| return fn if File.file?(fn) }
230
+
228
231
  search_paths.each do |path|
229
232
  full_path = File.expand_path(ref, path)
230
- return full_path if File.file?(full_path)
233
+ search.(full_path)
234
+ search.("#{full_path}.ily")
235
+ search.("#{full_path}.ly")
231
236
  end
232
237
 
233
- error("Missing include file specified in %s", location)
238
+ error("Could not find include file reference #{ref} specified in %s", location)
234
239
  end
235
240
 
236
241
  def process_require_command(ref, dir, leaf, opts, location)
@@ -1,3 +1,3 @@
1
1
  module Lyp
2
- VERSION = "1.3.5"
2
+ VERSION = "1.3.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lyp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-16 00:00:00.000000000 Z
11
+ date: 2018-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient