lyp-win 1.3.5 → 1.3.6

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: 3697173d85f0c79b8d561bfe268d0a0510795188
4
- data.tar.gz: a2eb68573dda67d1156fe881ad639708b2d2dc86
3
+ metadata.gz: a8ddfa93aaf441e4688e44b31900162f0252b23c
4
+ data.tar.gz: 07ecb2fea3e896584d4e442eccc2c99ab5f0ef3d
5
5
  SHA512:
6
- metadata.gz: 7d763075113f6cc130927168ce8eea57646574f1373db1cb79963f27cbe46af6851b2197464069f4f35b215d8571fcf8e6558701fbfa1709da9f28bf186f28d1
7
- data.tar.gz: d85896d55f2e5c1ee7ec7bd2bf5f9cb50ae61b6e2cd2d3901ce1655378625342825cd6e86ca62631ebeb1dbbd37bb8292e090e0f405fdaf08b416417a8c2178a
6
+ metadata.gz: 53cbdad5f31bc13daab2eecb5ce28173f0171c2a6db665b2370a5db51c704a603c04a6735b9a15454ea23630d79ab9854f4a027bec629f1a793b23ae344f4c16
7
+ data.tar.gz: 21e90a809e8b729903bd6445bc70a40ce1e95130e1bb04de35d7e77996142d20c0a1113d31be462c954d71130c5d18b6b6a2f54d2c880e83d201611399666a23
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-win
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