npgproject 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/npg/project.rb +40 -0
- data/lib/npg/project/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: 5670523fe24c334a0fbbcc7ce9192fd1fb814095
|
4
|
+
data.tar.gz: 96806e0f4f80b9c7e33f36ca7d54626be02c3b31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f84c1fd44d83c050af1228c62b46f20799ec8987cb9125030b53ceb26e934e288159c37ecac3a9b62afd0d9428d537594858f0c7de8fac247f5a1960f9e46ad7
|
7
|
+
data.tar.gz: 700431c6c9e193dd01485ef552871965a1508b2219b2bd4bb70aa831ec129b7b12ced5eb6252ede3dba9e7725c86c526085a6e1b49e554a2471603c04c5d6eca
|
data/lib/npg/project.rb
CHANGED
@@ -119,6 +119,46 @@ Library=../#{ini["Game"]["Library"]}
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
end
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
module Kernel
|
126
|
+
alias oreq require
|
127
|
+
def rb(code, args = nil)
|
128
|
+
open "run.rb", "w" do |f|
|
129
|
+
f.write "
|
130
|
+
class Output
|
131
|
+
def <<(obj)
|
132
|
+
puts [Marshal.dump(obj)].pack('M')
|
133
|
+
end
|
134
|
+
end
|
135
|
+
$output = Output.new
|
136
|
+
begin
|
137
|
+
"
|
138
|
+
f.write code
|
139
|
+
f.write "
|
140
|
+
rescue LoadError
|
141
|
+
$output << LoadError
|
142
|
+
end
|
143
|
+
"
|
144
|
+
end
|
145
|
+
system "ruby run.rb \#{args}> list.txt"
|
146
|
+
Marshal.load File.read('list.txt').unpack("M").first
|
147
|
+
end
|
148
|
+
|
149
|
+
private :rb
|
150
|
+
$:.concat rb %{ $output << $: }
|
151
|
+
def require(a)
|
152
|
+
u = rb %{$output << Gem.find_files(ARGV[0])}, a
|
153
|
+
raise u if u.is_a?(Exception)
|
154
|
+
u.select(&FileTest.method(:file?)).any?{|req|oreq req}
|
155
|
+
end
|
156
|
+
|
157
|
+
Object::RUBY_VERSION = rb %{$output << RUBY_VERSION}
|
158
|
+
require 'rubygems'
|
159
|
+
alias require oreq
|
160
|
+
end
|
161
|
+
|
122
162
|
}
|
123
163
|
|
124
164
|
def config_file
|
data/lib/npg/project/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: npgproject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seiran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|