lyp 0.1.3 → 0.1.4

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: af573692d11d242223f7cacfd3c03aafd2013e75
4
- data.tar.gz: ebd0f0f9b0f1da5c7561df7cbea69c41db9d4665
3
+ metadata.gz: da31da8efa75b8704dab5d48b0c44173cae0d9ff
4
+ data.tar.gz: da5431609dfffd0e2a0f813231ced74b17a47878
5
5
  SHA512:
6
- metadata.gz: 9e0839bada15ee142ce3b4d8d5a9f827cdedc235bc53cfa0760be0af3129963e2ce8c691bcef7bffb77b65965981cdddb9566fa5c420d7a36e452ba9b697f1f3
7
- data.tar.gz: 3795e21469164bb52b2e10a96f2d96641ae2b28e678b50cfeccd38153d1a65506ae7ea9c1f42229d006caaad1d9d9a3d285baa5496d9c29676da6b9ce17302e6
6
+ metadata.gz: b6dc9a5578f26af2c369a76cb8c9e1798cfd563c8a9bdb620f55dc25b8d75f39aa8a4a93f377ebacc4c9ebfff7b8912765c2a8831c5f9e11cb80eb94a3ea6b54
7
+ data.tar.gz: ba944bce979da2914064406b47ef8dcccd09e52069d32c12c637ba0c37e3415373b93695f3ef29b56fdca72624bbac0437456808314309856a8e746414d328f8
data/README.md CHANGED
@@ -53,7 +53,7 @@ or with Wget:
53
53
  wget -qO- https://git.io/getlyp | bash
54
54
  ```
55
55
 
56
- **Note**: installing the standalone release of lyp requires a having git installed.
56
+ **Note**: installing the standalone release of lyp requires having git on your machine.
57
57
 
58
58
  ### How lyp works
59
59
 
@@ -209,10 +209,10 @@ In order to facilitate writing complex packages, lyp defines a few lilypond comm
209
209
 
210
210
  The following variables are defined:
211
211
 
212
+ - `lyp-current-package-dir` - the absolute directory path for the current package
212
213
  - `lyp-input-filename` - the absolute path for the user's file being compiled
213
214
  - `lyp-input-dirname` - the absolute directory path for the user's file being compiled
214
215
  - `lyp-cwd` - the current working directory
215
- - `current-package-dir` - the absolute directory path for the current package
216
216
 
217
217
  In addition, lyp provides the `\pinclude` command for including files residing in the current package using relative paths. The `\pinclude` commands loads a given file only once:
218
218
 
@@ -21,7 +21,7 @@ download() {
21
21
  }
22
22
 
23
23
  WORKDIR="/tmp/lyp-release-installer"
24
- LYP_VERSION="0.1.3"
24
+ LYP_VERSION="0.1.4"
25
25
  URL_BASE="https://github.com/noteflakes/lyp/releases/download/v$LYP_VERSION"
26
26
 
27
27
  PLATFORM=`uname -sp`
data/lib/lyp/package.rb CHANGED
@@ -73,11 +73,15 @@ module Lyp::Package
73
73
  info[:version]
74
74
  end
75
75
 
76
+ LOCAL_PACKAGE_WRAPPER =
77
+ "#(set! lyp-current-package-dir \"%s\")\n\\include \"%s\"\n"
78
+
76
79
  def install_from_local_files(package, version, opts)
77
80
  version =~ /^([^\:]+)\:(.+)$/
78
81
  version, local_path = $1, $2
79
82
 
80
83
  entry_point_path = nil
84
+ local_path = File.expand_path(local_path)
81
85
  if File.directory?(local_path)
82
86
  ly_path = File.join(local_path, "package.ly")
83
87
  if File.file?(ly_path)
@@ -91,13 +95,14 @@ module Lyp::Package
91
95
  raise "Could not find #{local_path}"
92
96
  end
93
97
 
98
+ entry_point_dirname = File.dirname(entry_point_path)
94
99
  package_path = "#{Lyp.packages_dir}/#{package}@#{version}"
95
100
  package_ly_path = "#{package_path}/package.ly"
96
101
 
97
102
  FileUtils.rm_rf(package_path)
98
103
  FileUtils.mkdir_p(package_path)
99
104
  File.open(package_ly_path, 'w+') do |f|
100
- f << "\\include \"#{entry_point_path}\"\n"
105
+ f << LOCAL_PACKAGE_WRAPPER % [entry_point_dirname, entry_point_path]
101
106
  end
102
107
 
103
108
  {version: version, path: package_path}
data/lib/lyp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lyp
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lyp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner