persvr 0.2.2-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ .DS_Store
2
+ vendor/persevere
3
+ pkg/*
4
+ tmp/*
5
+ resource/persevere_home
@@ -0,0 +1,3 @@
1
+ Dir['tasks/*.rake'].each {|t| import t }
2
+
3
+ task 'build' => ['persevere']
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.2.2
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require File.join(File.dirname(__FILE__),'..','lib','persvr')
5
+ require 'persvr/command'
6
+
7
+ Persvr::Command.start
@@ -0,0 +1,16 @@
1
+ $:.unshift(File.expand_path(File.dirname(__FILE__))) unless
2
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
+
4
+ require 'java'
5
+ begin
6
+ require 'jettr'
7
+ rescue LoadError
8
+ puts "Could not load jettr. Please install jettr gem or add to loadpath."
9
+ end
10
+
11
+ module Persvr
12
+ PERSVR_HOME = File.expand_path(File.join(File.dirname(__FILE__), '..')) unless defined? PERSVR_HOME
13
+ # Dir[File.join(File.dirname(__FILE__),'persvr','jars','*.jar')].each {|jar| require jar}
14
+ end
15
+
16
+
@@ -0,0 +1,37 @@
1
+ require 'thor'
2
+ require 'persvr'
3
+ require 'fileutils'
4
+
5
+ module Persvr
6
+ class Command < Thor
7
+ include Thor::Actions
8
+ source_paths << File.join(PERSVR_HOME,'resource','persevere_home')
9
+ source_paths << File.join(PERSVR_HOME,'resource','persevere_pages')
10
+
11
+ desc "create PATH_TO_INSTANCE [-f]", "creates a persevere instance"
12
+ method_option :force, :type => :boolean, :default => false, :aliases => '-f'
13
+ def create(path)
14
+ directory 'WEB-INF', File.join(path,'WEB-INF'), :force => options[:force]
15
+ empty_directory File.join(path,'WEB-INF','jslib')
16
+ empty_directory File.join(path,'WEB-INF','data')
17
+ copy_file 'index.html', File.join(path,'index.html'), :force => options[:force]
18
+ end
19
+
20
+ desc "clear PATH_TO_INSTANCE", "clears the persevere database"
21
+ def clear(path)
22
+ raise "No instance was found at #{path}" unless File.exist?(path)
23
+ Dir[File.join(path,'WEB-INF','data/*')].each do |file|
24
+ FileUtils.rm_rf file
25
+ end
26
+ end
27
+
28
+ desc "start [PATH_TO_INSTANCE]", "runs the persevere instance"
29
+ method_option :port, :type => :numeric, :default => 8080, :aliases => "-p"
30
+ method_option :uri, :type => :string, :default => "/", :aliases => "-u"
31
+ def start(path='.')
32
+ require 'jettr/command'
33
+ jettr = Jettr::Command.new([], options)
34
+ jettr.invoke(:start, [path])
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,75 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{persvr}
8
+ s.version = "0.2.2"
9
+ s.platform = %q{java}
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.authors = ["Ryan Heimbuch"]
13
+ s.date = %q{2010-02-09}
14
+ s.default_executable = %q{persvr}
15
+ s.email = %q{rheimbuch@gmail.com}
16
+ s.executables = ["persvr"]
17
+ s.files = [
18
+ ".gitignore",
19
+ "Rakefile",
20
+ "VERSION",
21
+ "bin/persvr",
22
+ "lib/persvr.rb",
23
+ "lib/persvr/command.rb",
24
+ "persvr.gemspec",
25
+ "resource/persevere_home/WEB-INF/config/core.json",
26
+ "resource/persevere_home/WEB-INF/lib/cometd-api-1.0.beta4.jar",
27
+ "resource/persevere_home/WEB-INF/lib/cometd-jetty-6.1.14.jar",
28
+ "resource/persevere_home/WEB-INF/lib/commons-cli-1.1.jar",
29
+ "resource/persevere_home/WEB-INF/lib/commons-codec-1.3.jar",
30
+ "resource/persevere_home/WEB-INF/lib/commons-dbcp-1.2.2.jar",
31
+ "resource/persevere_home/WEB-INF/lib/commons-fileupload-1.2.1.jar",
32
+ "resource/persevere_home/WEB-INF/lib/commons-httpclient-3.0.1.jar",
33
+ "resource/persevere_home/WEB-INF/lib/commons-io-1.4.jar",
34
+ "resource/persevere_home/WEB-INF/lib/commons-logging-1.1.jar",
35
+ "resource/persevere_home/WEB-INF/lib/commons-pool-1.5.2.jar",
36
+ "resource/persevere_home/WEB-INF/lib/jetty-util5-6.1.14.jar",
37
+ "resource/persevere_home/WEB-INF/lib/jline-0.9.94.jar",
38
+ "resource/persevere_home/WEB-INF/lib/js.jar",
39
+ "resource/persevere_home/WEB-INF/lib/persevere.jar",
40
+ "resource/persevere_home/WEB-INF/lib/resourceaccelerate.jar",
41
+ "resource/persevere_home/WEB-INF/mimetypes.xml",
42
+ "resource/persevere_home/WEB-INF/templates/ReadMe",
43
+ "resource/persevere_home/WEB-INF/templates/index.html",
44
+ "resource/persevere_home/WEB-INF/templates/tests.js",
45
+ "resource/persevere_home/WEB-INF/web.xml",
46
+ "resource/persevere_home/WEB-INF/web.xml.generic",
47
+ "resource/persevere_home/WEB-INF/web.xml.tomcat",
48
+ "resource/persevere_pages/index.html",
49
+ "tasks/jeweler.rake",
50
+ "tasks/persevere.rake",
51
+ "tasks/persvr.thor"
52
+ ]
53
+ s.homepage = %q{http://github.com/rheimbuch/persvr}
54
+ s.rdoc_options = ["--charset=UTF-8"]
55
+ s.require_paths = ["lib"]
56
+ s.rubygems_version = %q{1.3.5}
57
+ s.summary = %q{Create and run instances of the Persevere JS Database.}
58
+
59
+ if s.respond_to? :specification_version then
60
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
61
+ s.specification_version = 3
62
+
63
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
64
+ s.add_runtime_dependency(%q<jettr>, ["~> 0.2.1"])
65
+ s.add_runtime_dependency(%q<thor>, [">= 0"])
66
+ else
67
+ s.add_dependency(%q<jettr>, ["~> 0.2.1"])
68
+ s.add_dependency(%q<thor>, [">= 0"])
69
+ end
70
+ else
71
+ s.add_dependency(%q<jettr>, ["~> 0.2.1"])
72
+ s.add_dependency(%q<thor>, [">= 0"])
73
+ end
74
+ end
75
+
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
+
8
+ <title>Persevere Server</title>
9
+
10
+ </head>
11
+
12
+ <body>
13
+
14
+
15
+ </body>
16
+ </html>
@@ -0,0 +1,21 @@
1
+ begin
2
+ require 'jeweler'
3
+
4
+ Jeweler::Tasks.new do |gem|
5
+ gem.name = "persvr"
6
+ gem.summary = "Create and run instances of the Persevere JS Database."
7
+ gem.email = "rheimbuch@gmail.com"
8
+ gem.homepage = "http://github.com/rheimbuch/persvr"
9
+ gem.authors = ["Ryan Heimbuch"]
10
+
11
+ gem.platform = 'java'
12
+
13
+ gem.files.include ['resource/**/*']
14
+ gem.files.exclude 'resource/persevere_home/WEB-INF/src/**/*'
15
+
16
+ gem.add_dependency 'jettr', "~>0.2.1"
17
+ gem.add_dependency 'thor'
18
+ end
19
+ rescue LoadError
20
+ puts "Jeweler no available. Install with: gem install jeweler"
21
+ end
@@ -0,0 +1,80 @@
1
+ require 'rake/clean'
2
+
3
+ CLOBBER.include "vendor/persevere"
4
+
5
+ task :clean do
6
+ if File.exist? "vendor/persevere"
7
+ cd "vendor/persevere" do
8
+ sh "ant clean"
9
+ end
10
+ end
11
+ end
12
+
13
+ desc "Builds and prepares persevere jars and persevere base directory."
14
+ task :persevere => ['persevere:lib','persevere:resource']
15
+
16
+ namespace :persevere do
17
+
18
+
19
+ PERSVR_SVN = "http://persevere-framework.googlecode.com/svn/branches/1.0"
20
+
21
+ directory "vendor"
22
+ file "vendor/persevere" => ['vendor'] do |t|
23
+ sh "svn co #{PERSVR_SVN} #{t.name}"
24
+ end
25
+
26
+ file "vendor/persevere/builds/persevereJ2EE" => "vendor/persevere" do
27
+ cd "vendor/persevere" do
28
+ sh "ant pkgPersevereJ2EE"
29
+ end
30
+ end
31
+
32
+
33
+
34
+ # file "vendor/persevere/builds/persevereJ2EE/WEB-INF/lib" => 'vendor/persevere/builds/persevereJ2EE'
35
+ # file "lib/persvr/jars" => "vendor/persevere/builds/persevereJ2EE/WEB-INF/lib" do |t|
36
+ # cp_r t.prerequisites.first, t.name
37
+ # end
38
+ #
39
+ # task :lib => 'lib/persvr/jars'
40
+ task :lib
41
+ file "resource/persevere_home" => "vendor/persevere/builds/persevereJ2EE" do |t|
42
+ cp_r t.prerequisites.first, t.name
43
+ rm_rf FileList["#{t.name}/*"].exclude("#{t.name}/WEB-INF")
44
+ touch "#{t.name}/WEB-INF/jslib/.empty_directory"
45
+ end
46
+ task :resource => "resource/persevere_home"
47
+
48
+ # directory "resource/persevere_home"
49
+ # file "vendor/persevere/builds/persevereJ2EE/etc" => 'vendor/persevere/builds/persevereJ2EE'
50
+ # file "resource/persevere_home/etc" => ['vendor/persevere/builds/persevereJ2EE/etc', 'resource/persevere_home'] do |t|
51
+ # cp_r t.prerequisites.first, t.name
52
+ # end
53
+ #
54
+ # directory "resource/persevere_home/WEB-INF"
55
+ # file "vendor/persevere/builds/persevereJ2EE/WEB-INF/web.xml.generic" => "vendor/persevere/builds/persevereJ2EE"
56
+ # file "resource/persevere_home/WEB-INF/web.xml" => ['vendor/persevere/builds/persevereJ2EE/WEB-INF/web.xml.generic', 'resource/persevere_home/WEB-INF'] do |t|
57
+ # cp_r t.prerequisites.first, t.name
58
+ # end
59
+ #
60
+ # file 'vendor/persevere/builds/persevereJ2EE/WEB-INF/config' => 'vendor/persevere/builds/persevereJ2EE'
61
+ # file "resource/persevere_home/WEB-INF/config" => ['vendor/persevere/builds/persevereJ2EE/WEB-INF/config', 'resource/persevere_home/WEB-INF'] do |t|
62
+ # cp_r t.prerequisites.first, t.name
63
+ # end
64
+ #
65
+ # directory "resource/persevere_home/WEB-INF/data"
66
+ # directory "resource/persevere_home/WEB-INF/jslib"
67
+ # directory "resource/persevere_home/WEB-INF/tests"
68
+ #
69
+ # task :resource => [
70
+ # "resource/persevere_home/etc",
71
+ # "resource/persevere_home/WEB-INF",
72
+ # "resource/persevere_home/WEB-INF/web.xml",
73
+ # "resource/persevere_home/WEB-INF/config",
74
+ # "resource/persevere_home/WEB-INF/data",
75
+ # "resource/persevere_home/WEB-INF/jslib",
76
+ # "resource/persevere_home/WEB-INF/tests"
77
+ # ]
78
+
79
+ CLEAN.include "resource/persevere_home"
80
+ end
@@ -0,0 +1,6 @@
1
+ require 'thor'
2
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'persvr')
3
+
4
+ # Thor::Util.load_thorfile(File.join(Persvr::PERSVR_HOME, 'lib', 'persvr', 'command.rb'))
5
+ require 'persvr/command'
6
+ Persvr::Command.namespace(:persvr)
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: persvr
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.2
5
+ platform: java
6
+ authors:
7
+ - Ryan Heimbuch
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-02-09 00:00:00 -07:00
13
+ default_executable: persvr
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: jettr
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 0.2.1
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: thor
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ description:
36
+ email: rheimbuch@gmail.com
37
+ executables:
38
+ - persvr
39
+ extensions: []
40
+
41
+ extra_rdoc_files: []
42
+
43
+ files:
44
+ - .gitignore
45
+ - Rakefile
46
+ - VERSION
47
+ - bin/persvr
48
+ - lib/persvr.rb
49
+ - lib/persvr/command.rb
50
+ - persvr.gemspec
51
+ - resource/persevere_home/WEB-INF/config/core.json
52
+ - resource/persevere_home/WEB-INF/lib/cometd-api-1.0.beta4.jar
53
+ - resource/persevere_home/WEB-INF/lib/cometd-jetty-6.1.14.jar
54
+ - resource/persevere_home/WEB-INF/lib/commons-cli-1.1.jar
55
+ - resource/persevere_home/WEB-INF/lib/commons-codec-1.3.jar
56
+ - resource/persevere_home/WEB-INF/lib/commons-dbcp-1.2.2.jar
57
+ - resource/persevere_home/WEB-INF/lib/commons-fileupload-1.2.1.jar
58
+ - resource/persevere_home/WEB-INF/lib/commons-httpclient-3.0.1.jar
59
+ - resource/persevere_home/WEB-INF/lib/commons-io-1.4.jar
60
+ - resource/persevere_home/WEB-INF/lib/commons-logging-1.1.jar
61
+ - resource/persevere_home/WEB-INF/lib/commons-pool-1.5.2.jar
62
+ - resource/persevere_home/WEB-INF/lib/jetty-util5-6.1.14.jar
63
+ - resource/persevere_home/WEB-INF/lib/jline-0.9.94.jar
64
+ - resource/persevere_home/WEB-INF/lib/js.jar
65
+ - resource/persevere_home/WEB-INF/lib/persevere.jar
66
+ - resource/persevere_home/WEB-INF/lib/resourceaccelerate.jar
67
+ - resource/persevere_home/WEB-INF/mimetypes.xml
68
+ - resource/persevere_home/WEB-INF/templates/ReadMe
69
+ - resource/persevere_home/WEB-INF/templates/index.html
70
+ - resource/persevere_home/WEB-INF/templates/tests.js
71
+ - resource/persevere_home/WEB-INF/web.xml
72
+ - resource/persevere_home/WEB-INF/web.xml.generic
73
+ - resource/persevere_home/WEB-INF/web.xml.tomcat
74
+ - resource/persevere_pages/index.html
75
+ - tasks/jeweler.rake
76
+ - tasks/persevere.rake
77
+ - tasks/persvr.thor
78
+ has_rdoc: true
79
+ homepage: http://github.com/rheimbuch/persvr
80
+ licenses: []
81
+
82
+ post_install_message:
83
+ rdoc_options:
84
+ - --charset=UTF-8
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: "0"
92
+ version:
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: "0"
98
+ version:
99
+ requirements: []
100
+
101
+ rubyforge_project:
102
+ rubygems_version: 1.3.5
103
+ signing_key:
104
+ specification_version: 3
105
+ summary: Create and run instances of the Persevere JS Database.
106
+ test_files: []
107
+