mirahd 0.0.0 → 0.0.1
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.
- data/Gemfile.lock +11 -11
- data/Rakefile +4 -1
- data/VERSION +1 -1
- data/mirahd.gemspec +54 -0
- data/test/server_spec.rb +4 -3
- metadata +7 -48
data/Gemfile.lock
CHANGED
@@ -4,25 +4,25 @@ GEM
|
|
4
4
|
bitescript (0.1.0)
|
5
5
|
diff-lcs (1.1.3)
|
6
6
|
git (1.2.5)
|
7
|
-
jeweler (1.8.
|
7
|
+
jeweler (1.8.4)
|
8
8
|
bundler (~> 1.0)
|
9
9
|
git (>= 1.2.5)
|
10
10
|
rake
|
11
11
|
rdoc
|
12
|
-
json (1.7.
|
13
|
-
mirah (0.0.
|
12
|
+
json (1.7.6-java)
|
13
|
+
mirah (0.0.12-java)
|
14
14
|
bitescript (>= 0.0.8)
|
15
|
-
rake (0.
|
15
|
+
rake (10.0.3)
|
16
16
|
rdoc (3.12)
|
17
17
|
json (~> 1.4)
|
18
|
-
rspec (2.
|
19
|
-
rspec-core (~> 2.
|
20
|
-
rspec-expectations (~> 2.
|
21
|
-
rspec-mocks (~> 2.
|
22
|
-
rspec-core (2.
|
23
|
-
rspec-expectations (2.
|
18
|
+
rspec (2.12.0)
|
19
|
+
rspec-core (~> 2.12.0)
|
20
|
+
rspec-expectations (~> 2.12.0)
|
21
|
+
rspec-mocks (~> 2.12.0)
|
22
|
+
rspec-core (2.12.2)
|
23
|
+
rspec-expectations (2.12.1)
|
24
24
|
diff-lcs (~> 1.1.3)
|
25
|
-
rspec-mocks (2.
|
25
|
+
rspec-mocks (2.12.1)
|
26
26
|
|
27
27
|
PLATFORMS
|
28
28
|
java
|
data/Rakefile
CHANGED
@@ -18,7 +18,10 @@ Jeweler::Tasks.new do |gem|
|
|
18
18
|
gem.homepage = "https://github.com/jstepien/mirahd"
|
19
19
|
gem.license = "MIT"
|
20
20
|
gem.summary = %Q{Mirah compilation daemon (in dire need of Javanese name)}
|
21
|
-
gem.description =
|
21
|
+
gem.description = <<EOF
|
22
|
+
mirahd is a Mirah Daemon listening for your requests to compile something.
|
23
|
+
When it receives one it does the job quickly. Really quickly.
|
24
|
+
EOF
|
22
25
|
gem.email = "jstepien@users.sourceforge.net"
|
23
26
|
gem.authors = ["Jan Stępień"]
|
24
27
|
# dependencies defined in Gemfile
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/mirahd.gemspec
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "mirahd"
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Jan St\304\231pie\305\204"]
|
12
|
+
s.date = "2013-01-10"
|
13
|
+
s.description = "mirahd is a Mirah Daemon listening for your requests to compile something.\nWhen it receives one it does the job quickly. Really quickly.\n"
|
14
|
+
s.email = "jstepien@users.sourceforge.net"
|
15
|
+
s.executables = ["mirahd"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".rspec",
|
21
|
+
".travis.yml",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"README.md",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"bin/mirahd",
|
28
|
+
"lib/mirahd/client.rb",
|
29
|
+
"lib/mirahd/server.rb",
|
30
|
+
"mirahd.gemspec",
|
31
|
+
"test/client_spec.rb",
|
32
|
+
"test/common.rb",
|
33
|
+
"test/hello.mirah",
|
34
|
+
"test/server_spec.rb"
|
35
|
+
]
|
36
|
+
s.homepage = "https://github.com/jstepien/mirahd"
|
37
|
+
s.licenses = ["MIT"]
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
s.rubygems_version = "1.8.15"
|
40
|
+
s.summary = "Mirah compilation daemon (in dire need of Javanese name)"
|
41
|
+
|
42
|
+
if s.respond_to? :specification_version then
|
43
|
+
s.specification_version = 3
|
44
|
+
|
45
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
46
|
+
s.add_runtime_dependency(%q<mirah>, [">= 0"])
|
47
|
+
else
|
48
|
+
s.add_dependency(%q<mirah>, [">= 0"])
|
49
|
+
end
|
50
|
+
else
|
51
|
+
s.add_dependency(%q<mirah>, [">= 0"])
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
data/test/server_spec.rb
CHANGED
@@ -56,15 +56,16 @@ describe MirahD::Server do
|
|
56
56
|
|
57
57
|
it 'the #wait method should keep it running' do
|
58
58
|
# FIXME: busy waiting is considered evil.
|
59
|
-
|
59
|
+
running = false
|
60
60
|
thr = Thread.start do
|
61
61
|
@server.wait
|
62
|
-
|
62
|
+
running = @server.running?
|
63
63
|
end
|
64
64
|
sleep 0.1 until @server.running?
|
65
|
+
running = true
|
65
66
|
@server.stop
|
66
67
|
thr.join
|
67
|
-
|
68
|
+
running.should == false
|
68
69
|
end
|
69
70
|
|
70
71
|
describe 'and given a valid input file' do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: mirahd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- "Jan St\xC4\x99pie\xC5\x84"
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2013-01-10 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mirah
|
@@ -23,52 +23,10 @@ dependencies:
|
|
23
23
|
requirement: *id001
|
24
24
|
prerelease: false
|
25
25
|
type: :runtime
|
26
|
-
description:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
[](http://travis-ci.org/jstepien/mirahd)\n\n\
|
31
|
-
Usage\n\
|
32
|
-
-----\n\n\
|
33
|
-
We'll need:\n\n * Bundler,\n * Mirah, and as a result\n * JRuby 1.6.\n\n\
|
34
|
-
For your own comfort and sanity it is also advisable to install a Ruby\n\
|
35
|
-
implementation with a reasonably short start up time. MRI or Rubinius\n\
|
36
|
-
are good candidates.\n\n jruby -S bundle install\n jruby -S rspec test\n jruby -rubygems -I lib -S bin/mirahd --daemon\n ruby -I lib bin/mirahd test/hello.mirah\n\n\
|
37
|
-
Rationale\n\
|
38
|
-
---------\n\n\
|
39
|
-
Mirah is a lovely language but its low compilation speed might be discouraging.\n\
|
40
|
-
Using it in development based on a lot of small _code, test, refactor_ cycles\n\
|
41
|
-
might be problematic. JVM's start up time and a lag introduced by compilation\n\
|
42
|
-
of Mirah's sources by JRuby add up to the sum we see below\xC2\xB9.\n\n $ time mirahc test/hello.mirah > /dev/null # with disk's cache warmed up\n 18.60user 0.45system 0:11.85elapsed\n\n\
|
43
|
-
After the initial warm up JVM and JRuby are pretty fast. The goal of this\n\
|
44
|
-
project is to make the JVM start once only and then reuse the existing process\n\
|
45
|
-
for all subsequent compilation tasks.\n\n\
|
46
|
-
Run the daemon.\n\n $ jruby -rubygems -I lib -S bin/mirahd --daemon\n\n\
|
47
|
-
The first compilation is already quite quick.\n\n $ time ruby -I lib -S bin/mirahd test/hello.mirah\n 0.05user 0.00system 0:00.89elapsed\n\n\
|
48
|
-
Then JVM's JIT comes into play. Here's the tenth compilation.\n\n $ time ruby -I lib -S bin/mirahd test/hello.mirah\n 0.04user 0.00system 0:00.30elapsed\n\n\
|
49
|
-
Todo\n\
|
50
|
-
----\n\n * Security. By being able to access the port DRb is listening on you\n can `eval` whatever you want to. `$SAFE` won't work as it's unsupported\n by JRuby.\n * Enable users to specify the port number.\n * Write tests covering a server running in a different directory then the\n client. It won't be possible without spawning 2 separate processes.\n * Support `--help` et al. command line arguments.\n * Concurrency. Two compilation requests might interfere with each other,\n especially due to changing the current working directory.\n\n\
|
51
|
-
Copyrights\n\
|
52
|
-
----------\n\n\
|
53
|
-
Copyright (c) 2012 Jan St\xC4\x99pie\xC5\x84\n\n\
|
54
|
-
Permission is hereby granted, free of charge, to any person obtaining\n\
|
55
|
-
a copy of this software and associated documentation files (the\n\
|
56
|
-
\"Software\"), to deal in the Software without restriction, including\n\
|
57
|
-
without limitation the rights to use, copy, modify, merge, publish,\n\
|
58
|
-
distribute, sublicense, and/or sell copies of the Software, and to\n\
|
59
|
-
permit persons to whom the Software is furnished to do so, subject to\n\
|
60
|
-
the following conditions:\n\n\
|
61
|
-
The above copyright notice and this permission notice shall be\n\
|
62
|
-
included in all copies or substantial portions of the Software.\n\n\
|
63
|
-
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n\
|
64
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\
|
65
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n\
|
66
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n\
|
67
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n\
|
68
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n\
|
69
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\
|
70
|
-
___\n\
|
71
|
-
\xC2\xB9 That's a 64-bit OpenJDK 6 on Intel Core 2 Duo with GNU/Linux 3.2.8.\n"
|
26
|
+
description: |
|
27
|
+
mirahd is a Mirah Daemon listening for your requests to compile something.
|
28
|
+
When it receives one it does the job quickly. Really quickly.
|
29
|
+
|
72
30
|
email: jstepien@users.sourceforge.net
|
73
31
|
executables:
|
74
32
|
- mirahd
|
@@ -87,6 +45,7 @@ files:
|
|
87
45
|
- bin/mirahd
|
88
46
|
- lib/mirahd/client.rb
|
89
47
|
- lib/mirahd/server.rb
|
48
|
+
- mirahd.gemspec
|
90
49
|
- test/client_spec.rb
|
91
50
|
- test/common.rb
|
92
51
|
- test/hello.mirah
|