boxed-geminabox 1.0.b.0-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ === 1.0.b.0 (2012-2-25)
2
+ * Initial release
@@ -0,0 +1,10 @@
1
+ History.rdoc
2
+ Manifest.txt
3
+ README.rdoc
4
+ Rakefile
5
+ bin/boxed-geminabox-fg
6
+ config/config.rb
7
+ config/jobs.rb
8
+ init/boxed-geminabox
9
+ lib/boxed-geminabox/base.rb
10
+ lib/boxed-geminabox.rb
@@ -0,0 +1,45 @@
1
+ = boxed-geminabox
2
+
3
+ * http://github.com/dekellum/boxed-geminabox
4
+
5
+ == Description
6
+
7
+ A complete, boxed, and ready to run
8
+ geminabox[http://tomlea.co.uk/p/gem-in-a-box] deamon on
9
+ fishwife[https://github.com/dekellum/fishwife#readme], jetty, jruby.
10
+ Install via `gem`, then launch via command line or, with monitoring,
11
+ via Iyyov[https://github.com/dekellum/iyyov#readme].
12
+
13
+ == License
14
+
15
+ Copyright (c) 2012 David Kellum
16
+
17
+ Licensed under the Apache License, Version 2.0 (the "License"); you
18
+ may not use this file except in compliance with the License. You
19
+ may obtain a copy of the License at:
20
+
21
+ http://www.apache.org/licenses/LICENSE-2.0
22
+
23
+ Unless required by applicable law or agreed to in writing, software
24
+ distributed under the License is distributed on an "AS IS" BASIS,
25
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
26
+ implied. See the License for the specific language governing
27
+ permissions and limitations under the License.
28
+
29
+ === Geminabox
30
+
31
+ * http://tomlea.co.uk/p/gem-in-a-box
32
+ * https://github.com/cwninja/geminabox
33
+ * http://tomlea.co.uk/WTFBPPL.txt
34
+
35
+ DO WHAT THE FUCK YOU WANT TO + BEER/PIZZA PUBLIC LICENSE
36
+ Version 1, May 2011
37
+
38
+ Copyright (C) 2011 Tom Lea
39
+
40
+ DO WHAT THE FUCK YOU WANT TO + BEER/PIZZA PUBLIC LICENSE
41
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
42
+
43
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
44
+ 1. If you make a substantial amount of money by exercising clause 0,
45
+ you should consider buying the author a beer or a pizza.
@@ -0,0 +1,7 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'bundler/setup'
5
+ require 'rjack-tarpit'
6
+
7
+ RJack::TarPit.new( 'boxed-geminabox' ).define_tasks
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env jruby
2
+ #.hashdot.vm.options += -Xmx256m
3
+ # -*- ruby -*-
4
+
5
+ #--
6
+ # Copyright (c) 2012 David Kellum
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
9
+ # may not use this file except in compliance with the License. You may
10
+ # obtain a copy of the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS,
16
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17
+ # implied. See the License for the specific language governing
18
+ # permissions and limitations under the License.
19
+ #++
20
+
21
+ $LOAD_PATH.unshift File.join( File.dirname(__FILE__), "..", "lib" )
22
+
23
+ module BinScript
24
+
25
+ require 'rubygems'
26
+ require 'optparse'
27
+
28
+ require 'rjack-logback'
29
+ include RJack
30
+ Logback.config_console( :thread => true )
31
+
32
+ require 'boxed-geminabox'
33
+
34
+ Hooker.log_with { |m| SLF4J[ 'boxed.geminabox' ].info( m.rstrip ) }
35
+
36
+ OptionParser.new do |opts|
37
+ opts.on( "-v", "--version", "Display version" ) do
38
+ puts "boxed-geminabox-fg: #{ Boxed::Geminabox::VERSION }"
39
+ exit 1
40
+ end
41
+ opts.on( "-d", "--debug", "Enable verbose DEBUG logging" ) do
42
+ Logback.root.level = Logback::DEBUG
43
+ end
44
+ Hooker.register_config( opts )
45
+ end.parse!
46
+
47
+ server = Boxed::Geminabox::Server.new
48
+ server.start
49
+ server.join
50
+
51
+ end
@@ -0,0 +1,12 @@
1
+ Boxed::Geminabox.configure do |cs|
2
+
3
+ cs.setup_http_server do
4
+ { # :port => 5791
5
+ }
6
+ end
7
+
8
+ cs.setup_geminabox do |box|
9
+ # box.data = "./data"
10
+ end
11
+
12
+ end
@@ -0,0 +1,11 @@
1
+ # See Iyyov: https://github.com/dekellum/iyyov#readme
2
+
3
+ Iyyov.context do |c|
4
+
5
+ c.define_daemon do |d|
6
+ d.name = "boxed-geminabox"
7
+ d.version = "~> 1.0"
8
+ d.log_rotate
9
+ end
10
+
11
+ end
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env jruby
2
+ # -*- ruby -*-
3
+ #. hashdot.profile += daemon
4
+ #. hashdot.pid_file = ./boxed-geminabox.pid
5
+ #. hashdot.io_redirect.file = ./boxed-geminabox.log
6
+ #. hashdot.vm.options += -Xmx384m
7
+ #. hashdot.vm.options += -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
8
+
9
+ #--
10
+ # Copyright (c) 2012 David Kellum
11
+ #
12
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
13
+ # may not use this file except in compliance with the License. You may
14
+ # obtain a copy of the License at
15
+ #
16
+ # http://www.apache.org/licenses/LICENSE-2.0
17
+ #
18
+ # Unless required by applicable law or agreed to in writing, software
19
+ # distributed under the License is distributed on an "AS IS" BASIS,
20
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
21
+ # implied. See the License for the specific language governing
22
+ # permissions and limitations under the License.
23
+ #++
24
+
25
+ require 'rubygems'
26
+ gem( 'boxed-geminabox', '= 1.0.b.0' )
27
+
28
+ module BinScript
29
+
30
+ require 'rjack-logback'
31
+ include RJack
32
+ Logback.config_console( :full => true, :thread => true )
33
+
34
+ require 'boxed-geminabox'
35
+
36
+ Hooker.log_with { |m| SLF4J[ 'boxed.geminabox' ].info( m.rstrip ) }
37
+ Hooker.load_file( './config.rb' ) if File.exist?( './config.rb' )
38
+
39
+ server = Boxed::Geminabox::Server.new
40
+ server.start
41
+ server.join
42
+
43
+ end
@@ -0,0 +1,64 @@
1
+ #--
2
+ # Copyright (c) 2012 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You may
6
+ # obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ require 'fileutils'
18
+
19
+ require 'fishwife'
20
+ require 'hooker'
21
+
22
+ require 'geminabox'
23
+
24
+ require 'boxed-geminabox/base'
25
+
26
+ module Boxed::Geminabox
27
+
28
+ def self.configure( &block )
29
+ Hooker.with( :bgb, &block )
30
+ end
31
+
32
+ class Server < Fishwife::HttpServer
33
+
34
+ DEFAULT_PORT = 5791
35
+
36
+ def initialize( local_options = {} )
37
+ opts = { :port => DEFAULT_PORT,
38
+ :min_threads => 2,
39
+ :max_threads => 5,
40
+ :request_log_file => :stderr }
41
+
42
+ opts = opts.merge( local_options )
43
+ opts = Hooker.merge( [ :bgb, :http_server ], opts )
44
+ super( opts )
45
+ end
46
+
47
+ def start( app = geminabox_app )
48
+ super( app )
49
+ end
50
+
51
+ def geminabox_app
52
+ ::Geminabox.tap do |box|
53
+ box.data = './data'
54
+
55
+ Hooker.apply( [ :bgb, :geminabox ], box )
56
+
57
+ # Make our data dir if it doesn't already exist
58
+ FileUtils.mkdir_p( box.data, :mode => 0755 )
59
+ end
60
+ end
61
+
62
+ end
63
+
64
+ end
@@ -0,0 +1,22 @@
1
+ #--
2
+ # Copyright (c) 2012 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You may
6
+ # obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ module Boxed
18
+ module Geminabox
19
+ VERSION = '1.0.b.0'
20
+ LIB_DIR = File.dirname( __FILE__ )
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,134 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: boxed-geminabox
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: 4
5
+ version: 1.0.b.0
6
+ platform: java
7
+ authors:
8
+ - David Kellum
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2012-02-25 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: fishwife
17
+ version_requirements: &id001 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 1.3.0
23
+ requirement: *id001
24
+ prerelease: false
25
+ type: :runtime
26
+ - !ruby/object:Gem::Dependency
27
+ name: geminabox
28
+ version_requirements: &id002 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.5.2
34
+ requirement: *id002
35
+ prerelease: false
36
+ type: :runtime
37
+ - !ruby/object:Gem::Dependency
38
+ name: hooker
39
+ version_requirements: &id003 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: 1.0.0
45
+ requirement: *id003
46
+ prerelease: false
47
+ type: :runtime
48
+ - !ruby/object:Gem::Dependency
49
+ name: rjack-logback
50
+ version_requirements: &id004 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: "1.2"
56
+ requirement: *id004
57
+ prerelease: false
58
+ type: :runtime
59
+ - !ruby/object:Gem::Dependency
60
+ name: minitest
61
+ version_requirements: &id005 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ~>
65
+ - !ruby/object:Gem::Version
66
+ version: 2.11.2
67
+ requirement: *id005
68
+ prerelease: false
69
+ type: :development
70
+ - !ruby/object:Gem::Dependency
71
+ name: rjack-tarpit
72
+ version_requirements: &id006 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: "2.0"
78
+ requirement: *id006
79
+ prerelease: false
80
+ type: :development
81
+ description: A complete, boxed, and ready to run geminabox deamon on fishwife[https://github.com/dekellum/fishwife#readme], jetty, jruby. Install via `gem`, then launch via command line or, with monitoring, via Iyyov[https://github.com/dekellum/iyyov#readme].
82
+ email:
83
+ - dek-oss@gravitext.com
84
+ executables:
85
+ - boxed-geminabox-fg
86
+ extensions: []
87
+
88
+ extra_rdoc_files:
89
+ - History.rdoc
90
+ - README.rdoc
91
+ files:
92
+ - History.rdoc
93
+ - Manifest.txt
94
+ - README.rdoc
95
+ - Rakefile
96
+ - bin/boxed-geminabox-fg
97
+ - config/config.rb
98
+ - config/jobs.rb
99
+ - init/boxed-geminabox
100
+ - lib/boxed-geminabox/base.rb
101
+ - lib/boxed-geminabox.rb
102
+ homepage: http://github.com/dekellum/boxed-geminabox
103
+ licenses: []
104
+
105
+ post_install_message:
106
+ rdoc_options:
107
+ - --main
108
+ - README.rdoc
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ hash: 2
117
+ segments:
118
+ - 0
119
+ version: "0"
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ">"
124
+ - !ruby/object:Gem::Version
125
+ version: 1.3.1
126
+ requirements: []
127
+
128
+ rubyforge_project:
129
+ rubygems_version: 1.8.15
130
+ signing_key:
131
+ specification_version: 3
132
+ summary: A complete, boxed, and ready to run geminabox deamon on fishwife[https://github.com/dekellum/fishwife#readme], jetty, jruby.
133
+ test_files: []
134
+