rjack-tarpit 2.0.0-java
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/History.rdoc +71 -0
- data/Manifest.txt +45 -0
- data/NOTICE.txt +2 -0
- data/README.rdoc +124 -0
- data/Rakefile +21 -0
- data/lib/rjack-tarpit.rb +40 -0
- data/lib/rjack-tarpit/base.rb +22 -0
- data/lib/rjack-tarpit/base_strategy.rb +175 -0
- data/lib/rjack-tarpit/clean.rb +43 -0
- data/lib/rjack-tarpit/doc.rb +67 -0
- data/lib/rjack-tarpit/gem.rb +119 -0
- data/lib/rjack-tarpit/git.rb +45 -0
- data/lib/rjack-tarpit/line_match.rb +134 -0
- data/lib/rjack-tarpit/readme_parser.rb +74 -0
- data/lib/rjack-tarpit/spec.rb +314 -0
- data/lib/rjack-tarpit/test.rb +110 -0
- data/lib/rjack-tarpit/util.rb +37 -0
- data/test/jproject/History.rdoc +2 -0
- data/test/jproject/Manifest.static +10 -0
- data/test/jproject/Manifest.txt +11 -0
- data/test/jproject/NOTICE.txt +2 -0
- data/test/jproject/README.rdoc +24 -0
- data/test/jproject/Rakefile +7 -0
- data/test/jproject/jproject.gemspec +15 -0
- data/test/jproject/lib/jproject.rb +11 -0
- data/test/jproject/lib/jproject/base.rb +3 -0
- data/test/jproject/pom.xml +75 -0
- data/test/jproject/test/setup.rb +7 -0
- data/test/jproject/test/test_jproject.rb +14 -0
- data/test/setup.rb +7 -0
- data/test/test_projects.rb +71 -0
- data/test/test_readme_parser.rb +97 -0
- data/test/test_tarpit.rb +33 -0
- data/test/zookeeper/History.rdoc +2 -0
- data/test/zookeeper/Manifest.static +10 -0
- data/test/zookeeper/Manifest.txt +13 -0
- data/test/zookeeper/README.rdoc +23 -0
- data/test/zookeeper/Rakefile +7 -0
- data/test/zookeeper/assembly.xml +15 -0
- data/test/zookeeper/lib/rjack-zookeeper.rb +29 -0
- data/test/zookeeper/lib/rjack-zookeeper/base.rb +23 -0
- data/test/zookeeper/pom.xml +73 -0
- data/test/zookeeper/rjack-zookeeper.gemspec +18 -0
- data/test/zookeeper/test/setup.rb +17 -0
- data/test/zookeeper/test/test_zookeeper.rb +14 -0
- metadata +186 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
= jproject
|
2
|
+
|
3
|
+
* http://rjack.rubyforge.org/tarpit
|
4
|
+
|
5
|
+
== Description
|
6
|
+
|
7
|
+
A simple project for testing. This project contains a single java jar
|
8
|
+
built from source.
|
9
|
+
|
10
|
+
== License
|
11
|
+
|
12
|
+
Copyright (c) 2011 David Kellum
|
13
|
+
|
14
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you
|
15
|
+
may not use this file except in compliance with the License. You
|
16
|
+
may obtain a copy of the License at:
|
17
|
+
|
18
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
19
|
+
|
20
|
+
Unless required by applicable law or agreed to in writing, software
|
21
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
22
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
23
|
+
implied. See the License for the specific language governing
|
24
|
+
permissions and limitations under the License.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- ruby -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'rjack-tarpit/spec'
|
4
|
+
|
5
|
+
RJack::TarPit.specify do |s|
|
6
|
+
require 'jproject/base'
|
7
|
+
|
8
|
+
s.version = JProject::VERSION
|
9
|
+
|
10
|
+
s.add_developer 'David Kellum', 'dek-oss@gravitext.com'
|
11
|
+
|
12
|
+
s.maven_strategy = :no_assembly
|
13
|
+
|
14
|
+
s.depend 'minitest', '~> 2.3', :dev
|
15
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
2
|
+
|
3
|
+
<modelVersion>4.0.0</modelVersion>
|
4
|
+
<groupId>rjack.tarpit</groupId>
|
5
|
+
<artifactId>jproject</artifactId>
|
6
|
+
<packaging>jar</packaging>
|
7
|
+
<version>1.0.0</version>
|
8
|
+
<name>Simple Java project</name>
|
9
|
+
|
10
|
+
<properties>
|
11
|
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
12
|
+
</properties>
|
13
|
+
|
14
|
+
<developers>
|
15
|
+
<developer>
|
16
|
+
<id>david</id>
|
17
|
+
<name>David Kellum</name>
|
18
|
+
<email>dek-oss@[org]</email>
|
19
|
+
<organization>Gravitext</organization>
|
20
|
+
<organizationUrl>http://gravitext.com</organizationUrl>
|
21
|
+
</developer>
|
22
|
+
</developers>
|
23
|
+
|
24
|
+
<licenses>
|
25
|
+
<license>
|
26
|
+
<name>Apache License, Version 2.0</name>
|
27
|
+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
28
|
+
<distribution>repo</distribution>
|
29
|
+
</license>
|
30
|
+
</licenses>
|
31
|
+
|
32
|
+
<dependencies>
|
33
|
+
|
34
|
+
<dependency>
|
35
|
+
<groupId>org.slf4j</groupId>
|
36
|
+
<artifactId>slf4j-api</artifactId>
|
37
|
+
<version>[1.6.1,1.6.9999]</version>
|
38
|
+
<scope>compile</scope>
|
39
|
+
</dependency>
|
40
|
+
|
41
|
+
</dependencies>
|
42
|
+
|
43
|
+
<build>
|
44
|
+
<plugins>
|
45
|
+
|
46
|
+
<plugin>
|
47
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
48
|
+
<version>2.3.2</version>
|
49
|
+
<configuration>
|
50
|
+
<source>1.6</source>
|
51
|
+
<target>1.6</target>
|
52
|
+
<optimize>true</optimize>
|
53
|
+
<debug>true</debug>
|
54
|
+
<encoding>UTF-8</encoding>
|
55
|
+
<showDeprecation>true</showDeprecation>
|
56
|
+
<showWarnings>true</showWarnings>
|
57
|
+
</configuration>
|
58
|
+
</plugin>
|
59
|
+
|
60
|
+
<plugin>
|
61
|
+
<artifactId>maven-source-plugin</artifactId>
|
62
|
+
<version>2.1.2</version>
|
63
|
+
<executions>
|
64
|
+
<execution>
|
65
|
+
<goals>
|
66
|
+
<goal>jar</goal>
|
67
|
+
</goals>
|
68
|
+
</execution>
|
69
|
+
</executions>
|
70
|
+
</plugin>
|
71
|
+
|
72
|
+
</plugins>
|
73
|
+
</build>
|
74
|
+
|
75
|
+
</project>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
#.hashdot.profile += jruby-shortlived
|
3
|
+
|
4
|
+
require File.join( File.dirname( __FILE__ ), "setup" )
|
5
|
+
|
6
|
+
require 'jproject'
|
7
|
+
|
8
|
+
class TestJProject < MiniTest::Unit::TestCase
|
9
|
+
|
10
|
+
def test
|
11
|
+
assert_equal( "Hello", JProject::Sample.hello )
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
data/test/setup.rb
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
#. hashdot.profile += jruby-shortlived
|
3
|
+
#. jruby.launch.inproc = false
|
4
|
+
|
5
|
+
#--
|
6
|
+
# Copyright (c) 2009-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
|
+
require File.join( File.dirname( __FILE__ ), "setup" )
|
22
|
+
|
23
|
+
require 'rjack-tarpit'
|
24
|
+
require 'fileutils'
|
25
|
+
|
26
|
+
class TestProjects < MiniTest::Unit::TestCase
|
27
|
+
include FileUtils
|
28
|
+
|
29
|
+
BASEDIR = File.dirname( __FILE__ )
|
30
|
+
|
31
|
+
if RUBY_PLATFORM =~ /java/
|
32
|
+
|
33
|
+
def setup
|
34
|
+
# We clean anyway, but for test consistency...
|
35
|
+
%w[ jproject zookeeper ].each do |p|
|
36
|
+
rm_rf( path( p, 'target' ) )
|
37
|
+
rm_rf( path( p, 'pkg' ) )
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_jproject
|
42
|
+
pt = path( 'jproject' )
|
43
|
+
assert runv( pt, "clean test gem" )
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_zookeeper
|
47
|
+
pt = path( 'zookeeper' )
|
48
|
+
assert runv( pt, "manifest" )
|
49
|
+
assert runv( pt, "clean test gem" )
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
def path( *args )
|
55
|
+
File.join( BASEDIR, *args )
|
56
|
+
end
|
57
|
+
|
58
|
+
def runv( dir, targets )
|
59
|
+
# Shell cd is most reliabe, given java path duality and potential
|
60
|
+
# for jruby to attempt inproc otherwise.
|
61
|
+
c = "cd #{dir} && jruby -S rake #{targets}"
|
62
|
+
puts
|
63
|
+
puts "=== #{c} ==="
|
64
|
+
# Disable seemingly lame bundler ENV mods to make these tests work
|
65
|
+
# the same as if we ran it in our own shell.
|
66
|
+
r = Bundler.with_clean_env { system( c ) }
|
67
|
+
puts
|
68
|
+
r
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
#.hashdot.profile += jruby-shortlived
|
3
|
+
#--
|
4
|
+
# Copyright (c) 2009-2012 David Kellum
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
7
|
+
# may not use this file except in compliance with the License. You
|
8
|
+
# may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
15
|
+
# implied. See the License for the specific language governing
|
16
|
+
# permissions and limitations under the License.
|
17
|
+
#++
|
18
|
+
|
19
|
+
require File.join( File.dirname( __FILE__ ), "setup" )
|
20
|
+
|
21
|
+
require 'rjack-tarpit/readme_parser'
|
22
|
+
|
23
|
+
require 'stringio'
|
24
|
+
|
25
|
+
class TestReadmeParser < MiniTest::Unit::TestCase
|
26
|
+
include RJack::TarPit::ReadmeParser
|
27
|
+
|
28
|
+
attr_accessor :summary
|
29
|
+
attr_accessor :description
|
30
|
+
attr_accessor :homepage
|
31
|
+
|
32
|
+
def test_one_liner
|
33
|
+
self.desc = <<TXT
|
34
|
+
A gem packaging of {Marble Bread}[http://special/marble-bread/]
|
35
|
+
TXT
|
36
|
+
parse_readme( nil )
|
37
|
+
|
38
|
+
assert_equal( "http://rjack.rubyforge.org/foo", homepage )
|
39
|
+
assert_equal( "A gem packaging of Marble Bread", summary )
|
40
|
+
assert_nil( description )
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_one_line_punct
|
44
|
+
self.desc = <<TXT
|
45
|
+
A gem packaging of Marbles[http://special/marbles/].
|
46
|
+
TXT
|
47
|
+
parse_readme( nil )
|
48
|
+
|
49
|
+
assert_equal( "A gem packaging of Marbles.", summary )
|
50
|
+
assert_nil( description )
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_two_sentences
|
54
|
+
self.desc = <<TXT
|
55
|
+
A gem packaging of Marbles!
|
56
|
+
Highly valued!
|
57
|
+
TXT
|
58
|
+
parse_readme( nil )
|
59
|
+
|
60
|
+
assert_equal( "A gem packaging of Marbles!", summary )
|
61
|
+
assert_equal( "A gem packaging of Marbles! Highly valued!", description )
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_colon
|
65
|
+
self.desc = <<TXT
|
66
|
+
A gem packaging of special sauces:
|
67
|
+
|
68
|
+
* Mustard
|
69
|
+
* Honey
|
70
|
+
TXT
|
71
|
+
parse_readme( nil )
|
72
|
+
|
73
|
+
assert_equal( "A gem packaging of special sauces.", summary )
|
74
|
+
assert_nil( description )
|
75
|
+
end
|
76
|
+
|
77
|
+
def readme_file_open( file )
|
78
|
+
yield StringIO.new( @test_readme_input )
|
79
|
+
end
|
80
|
+
|
81
|
+
def desc=( desc )
|
82
|
+
@test_readme_input = <<RDOC
|
83
|
+
= name
|
84
|
+
|
85
|
+
* http://rjack.rubyforge.org/foo
|
86
|
+
* http://rjack.rubyforge.org/other
|
87
|
+
|
88
|
+
== Description
|
89
|
+
|
90
|
+
#{desc}
|
91
|
+
|
92
|
+
== License
|
93
|
+
RDOC
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
data/test/test_tarpit.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
#.hashdot.profile += jruby-shortlived
|
3
|
+
#--
|
4
|
+
# Copyright (c) 2009-2012 David Kellum
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
7
|
+
# may not use this file except in compliance with the License. You
|
8
|
+
# may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
15
|
+
# implied. See the License for the specific language governing
|
16
|
+
# permissions and limitations under the License.
|
17
|
+
#++
|
18
|
+
|
19
|
+
require File.join( File.dirname( __FILE__ ), "setup" )
|
20
|
+
|
21
|
+
require 'rjack-tarpit'
|
22
|
+
|
23
|
+
class TestTarpit < MiniTest::Unit::TestCase
|
24
|
+
include RJack
|
25
|
+
|
26
|
+
def test
|
27
|
+
tp = TarPit.new( "rjack-tarpit" )
|
28
|
+
pass #load worked
|
29
|
+
|
30
|
+
assert_instance_of( Gem::Specification, tp.spec )
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
History.rdoc
|
2
|
+
Manifest.txt
|
3
|
+
README.rdoc
|
4
|
+
Rakefile
|
5
|
+
assembly.xml
|
6
|
+
pom.xml
|
7
|
+
lib/rjack-zookeeper/base.rb
|
8
|
+
lib/rjack-zookeeper.rb
|
9
|
+
test/setup.rb
|
10
|
+
test/test_zookeeper.rb
|
11
|
+
lib/rjack-zookeeper/jline-1.0.jar
|
12
|
+
lib/rjack-zookeeper/netty-3.2.7.Final.jar
|
13
|
+
lib/rjack-zookeeper/zookeeper-3.4.1.jar
|