chino 0.1.4 → 0.1.5
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 +4 -4
- data/exe/chino +11 -1
- data/lib/chino/chinofile.rb +26 -1
- data/lib/chino/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e61d646b735bb720f067b2a0a97ab8fc1e557504
|
4
|
+
data.tar.gz: 3025c568260ed0a1d56fbb6e70af138e1cd0bcb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41b58c4c0d29234adc65474d89309594e46da17a7c69245303f0244d4dcf1d62f37817646fd0facff96247f9d6168eb154c9d17803d8f0fc17991e32c9a07e47
|
7
|
+
data.tar.gz: 85f970a125b942dffb84a540d380974a32bfa60607d1c42839f9e33227685b11fcc855afa0dc8fa22b1c163a8ffcbaed6df4cf599bdf4a100611892229ba30d4
|
data/exe/chino
CHANGED
@@ -23,7 +23,17 @@ if command == "build"
|
|
23
23
|
FileUtils.rm_r("temp") if Dir.exists?("temp")
|
24
24
|
FileUtils.mkdir("temp")
|
25
25
|
FileUtils.cp_r("Resources", "temp") if Dir.exists?("Resources")
|
26
|
-
|
26
|
+
|
27
|
+
base_path = File.expand_path("./")
|
28
|
+
puts "base_path: #{base_path}"
|
29
|
+
|
30
|
+
Dir["./**/*.j"].each do |file|
|
31
|
+
cur_path = File.expand_path(file)
|
32
|
+
rel_path = cur_path.sub( Regexp.new("^#{base_path}"), "" )
|
33
|
+
|
34
|
+
FileUtils.mkdir_p( File.join("temp", File.dirname(rel_path)) )
|
35
|
+
FileUtils.cp( cur_path, File.join("temp", rel_path) )
|
36
|
+
end
|
27
37
|
|
28
38
|
config.collect_exports.each do |k,v|
|
29
39
|
FileUtils.mkdir_p( File.join("temp", File.dirname(k)) )
|
data/lib/chino/chinofile.rb
CHANGED
@@ -54,7 +54,32 @@ module Chino
|
|
54
54
|
@information[:exports][filename] = File.join(@information[:path], filename)
|
55
55
|
end
|
56
56
|
|
57
|
-
def imports(the_name, path:nil)
|
57
|
+
def imports(the_name, path: nil, version: nil)
|
58
|
+
|
59
|
+
if path == nil
|
60
|
+
# this means that the package is downloaded somewhere already
|
61
|
+
base_dir = "#{ENV['HOME']}/.chino/dependencies/#{the_name}"
|
62
|
+
|
63
|
+
if !Dir.exists?("#{ENV['HOME']}/.chino/dependencies/#{the_name}")
|
64
|
+
throw "The bundle '#{the_name}' has not been installed. Please run chino install."
|
65
|
+
end
|
66
|
+
|
67
|
+
version_list = Dir["#{base_dir}/*"].sort_by{|x| x}.reverse
|
68
|
+
|
69
|
+
if version_list.count == 0
|
70
|
+
throw "The bundle '#{the_name}' has not been installed. Please run chino install."
|
71
|
+
end
|
72
|
+
|
73
|
+
if version
|
74
|
+
if !Dir.exists?("#{base_dir}/#{version}")
|
75
|
+
throw "The bundle '#{the_name}' with version #{version} has not been installed. Please run chino install."
|
76
|
+
end
|
77
|
+
path = "#{base_dir}/#{version}"
|
78
|
+
else
|
79
|
+
path = version_list.first
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
58
83
|
|
59
84
|
file = File.join(path, "Chinofile")
|
60
85
|
dep_chinofile = Chinofile.new(path: path) do
|
data/lib/chino/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chino
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Siaw
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|