dgd-tools 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 2637c36239c1aabf37dbac03f0404cab8bb2ea493753bebc2710d44e03f78e11
4
- data.tar.gz: f544c13905cceb2c080385edc9122a4b89905700ac8195b97410ae58d829e5b6
3
+ metadata.gz: bf28b15e9e5aa7fe5c3d52835011e37c2b34f8ed839b59e6faea3ff9b23433d7
4
+ data.tar.gz: 66d8280067875fe8dfbb056e3288dec4471eba855937ee182dd24db70f30cd9b
5
5
  SHA512:
6
- metadata.gz: ce3e707b25251764367464866d71c64ece85e69cb8c39d2589d3342f263f9ba3c98270d3f130c05b481fac04d0c06e613d9992b87ab54bf99851e3fcd98ebc58
7
- data.tar.gz: 41acb15b29ca4667590ca59cace0a5563f1129845d205c32dbe662f6222aad9c174a09548e98f0e0b450c63b3e073cb5baa614eddbe390ab9e4084f1a8ca9e7d
6
+ metadata.gz: 79fb4a29346b26de15f1cf4b6fe0c81ad845f45e24688b83f91f03c6aca61b691b6fb0698d64eb2fd633ae0f52d8df2bdb2226549ba524d748201b8f728adab2
7
+ data.tar.gz: 1f4ffe31a23b5f0302b0d47815c74a4484847cfd9afce393d37c85515be981943447d5807eef11bca221269c2cde7c3137e5868561f306e8d83035ac5d03dd5b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dgd-tools (0.1.1)
4
+ dgd-tools (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/TODO ADDED
@@ -0,0 +1 @@
1
+ * Persistent data dirs. Symlinks in app-root dir for now?
@@ -24,7 +24,8 @@ when "install"
24
24
  repo.manifest_file("dgd.manifest")
25
25
  repo.assemble_app(".")
26
26
  when "server"
27
- puts "Starting DGD server... (not yet)"
27
+ puts "Starting DGD server..."
28
+ DGD::Manifest.system_call("~/.dgd-tools/dgd/bin/dgd dgd.config")
28
29
  else
29
30
  raise "Unrecognised #{$0} command: #{ARGV[0].inspect}!"
30
31
  end
@@ -9,7 +9,12 @@ module DGD; end
9
9
  module DGD::Manifest
10
10
  DGD_BUILD_COMMAND = %(make DEFINES='-DUINDEX_TYPE="unsigned int" -DUINDEX_MAX=UINT_MAX -DEINDEX_TYPE="unsigned short" -DEINDEX_MAX=USHRT_MAX -DSSIZET_TYPE="unsigned int" -DSSIZET_MAX=1048576' install
11
11
  )
12
- KERNEL_PATHS = ["include/kernel", "kernel"]
12
+ KERNEL_PATH_MAP = {
13
+ "src/kernel" => "/kernel",
14
+ "src/include" => "/include",
15
+ "src/doc/kernel" => "/doc/kernel"
16
+ }
17
+ KERNEL_PATHS = KERNEL_PATH_MAP.values
13
18
  DEFAULT_KERNELLIB_URL = "https://github.com/ChatTheatre/kernellib"
14
19
 
15
20
  GENERATED_ROOT = ".root"
@@ -69,6 +74,8 @@ module DGD::Manifest
69
74
  write_config_file("#{location}/dgd.config")
70
75
  specs = @manifest_file.specs
71
76
 
77
+ copies = []
78
+
72
79
  specs.each do |spec|
73
80
  git_repo = spec.source
74
81
  git_repo.use_details(spec.source_details)
@@ -76,12 +83,16 @@ module DGD::Manifest
76
83
  spec.paths.each do |from, to|
77
84
  from_path = "#{git_repo.local_dir}/#{from}"
78
85
  to_path = "#{dgd_root}/#{to}"
79
- to_dir = to_path.split("/")[0..-2].join("/")
80
- FileUtils.mkdir_p to_dir
81
- STDERR.puts "COPYING #{from_path.inspect} #{to_path.inspect}"
82
- FileUtils.cp_r(from_path, to_path)
86
+ copies << [from_path, to_path]
83
87
  end
84
88
  end
89
+
90
+ copies.sort_by { |c| c[1] }.each do |from_path, to_path|
91
+ to_dir = to_path.split("/")[0..-2].join("/")
92
+ FileUtils.mkdir_p to_dir
93
+ STDERR.puts "COPYING #{from_path.inspect} #{to_path.inspect}"
94
+ FileUtils.cp_r(from_path, to_path)
95
+ end
85
96
  end
86
97
 
87
98
  def write_config_file(path)
@@ -93,7 +104,7 @@ telnet_port = ([
93
104
  "*":50100 /* telnet port number */
94
105
  ]);
95
106
  binary_port = ([
96
- "*":50110, /* Failsafe */
107
+ "*":50110 /* Failsafe */
97
108
  ]); /* binary ports */
98
109
  directory = "./#{GENERATED_ROOT}";
99
110
 
@@ -196,10 +207,9 @@ CONTENTS
196
207
  puts "This dgd.manifest needs the default Kernel Library."
197
208
  # This app has specified no kernellib paths -- add them
198
209
  git_repo = @repo.git_repo(DEFAULT_KERNELLIB_URL)
199
- kl_paths = { "src/kernel" => "/kernel", "src/include/kernel" => "/include/kernel", "src/doc/kernel" => "/doc/kernel" }
200
210
  klib_spec = GoodsSpec.new @repo, name: "default Kernel Library",
201
- source: git_repo, paths: kl_paths
202
- specs.push klib_spec
211
+ source: git_repo, paths: KERNEL_PATH_MAP
212
+ specs.unshift klib_spec
203
213
  end
204
214
 
205
215
  nil
@@ -1,3 +1,3 @@
1
1
  module DGD
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dgd-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Gibbs
@@ -25,6 +25,7 @@ files:
25
25
  - Gemfile.lock
26
26
  - README.md
27
27
  - Rakefile
28
+ - TODO
28
29
  - bin/console
29
30
  - bin/setup
30
31
  - dgd-tools.gemspec