npgproject 0.0.4 → 0.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23a249914b3b3448aa477beebb95428a3e812dbf
4
- data.tar.gz: fde2bdad25043f16406964952867a2cf45df8146
3
+ metadata.gz: 5670523fe24c334a0fbbcc7ce9192fd1fb814095
4
+ data.tar.gz: 96806e0f4f80b9c7e33f36ca7d54626be02c3b31
5
5
  SHA512:
6
- metadata.gz: 7217a6108c7c7f8ba90bca51956b181f043e5eab8d292e29e75e13d02c5103eff0cb68fff8fdd4be0a95973e893645d1a2862cd3c810507549125e96c53cd9c5
7
- data.tar.gz: fa852329076e2321d8c08431a3534b41f0519c5da66b8cfa4d4d390573722c67c151617d7cbec02af06548f08f1ed2ffb83efdd1372bbb30827ca4085b331556
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
@@ -1,3 +1,3 @@
1
1
  module Project
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.6"
3
3
  end
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
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-19 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler