File tree 12 files changed +205
-5
lines changed
jruby-complete/src/it/integrity
jruby-dist/src/it/integrity
jruby-jars/src/it/integrity
jruby-noasm/src/it/integrity
12 files changed +205
-5
lines changed Original file line number Diff line number Diff line change 131
131
</arguments >
132
132
</configuration >
133
133
</execution >
134
+ <execution >
135
+ <id >ensure there is no org.objectweb.asm.ClassWriter</id >
136
+ <phase >test</phase >
137
+ <goals >
138
+ <goal >exec</goal >
139
+ </goals >
140
+ <configuration >
141
+ <executable >java</executable >
142
+ <arguments >
143
+ <argument >-classpath</argument >
144
+ <!-- automatically creates the classpath using all project dependencies,
145
+ also adding the project build directory -->
146
+ <classpath />
147
+ <argument >org.jruby.Main</argument >
148
+ <argument >-e</argument >
149
+ <!-- make sure openssl loads -->
150
+ <argument >
151
+ begin
152
+ import_java "org.objectweb.asm.ClassWriter"
153
+ raise "error there is org.objectweb.asm.ClassWriter on the classpath"
154
+ rescue NameError => e
155
+ puts "there is NO org.objectweb.asm.ClassWriter on the classpath"
156
+ end
157
+ </argument >
158
+ </arguments >
159
+ </configuration >
160
+ </execution >
134
161
</executions >
135
162
</plugin >
136
163
</plugins >
Original file line number Diff line number Diff line change @@ -38,3 +38,8 @@ if ( !log.contains( expected ) )
38
38
{
39
39
throw new RuntimeException( "log file does not contain '" + expected + "'" );
40
40
}
41
+ expected = "there is NO org.objectweb.asm.ClassWriter on the classpath";
42
+ if ( !log.contains( expected ) )
43
+ {
44
+ throw new RuntimeException( "log file does not contain '" + expected + "'" );
45
+ }
Original file line number Diff line number Diff line change 148
148
</arguments >
149
149
</configuration >
150
150
</execution >
151
+ <execution >
152
+ <id >ensure there is no org.objectweb.asm.ClassWriter</id >
153
+ <phase >test</phase >
154
+ <goals >
155
+ <goal >exec</goal >
156
+ </goals >
157
+ <configuration >
158
+ <executable >java</executable >
159
+ <arguments >
160
+ <argument >-classpath</argument >
161
+ <!-- automatically creates the classpath using all project dependencies,
162
+ also adding the project build directory -->
163
+ <classpath />
164
+ <argument >org.jruby.Main</argument >
165
+ <argument >-e</argument >
166
+ <!-- make sure openssl loads -->
167
+ <argument >
168
+ begin
169
+ import_java "org.objectweb.asm.ClassWriter"
170
+ raise "error there is org.objectweb.asm.ClassWriter on the classpath"
171
+ rescue NameError => e
172
+ puts "there is NO org.objectweb.asm.ClassWriter on the classpath"
173
+ end
174
+ </argument >
175
+ </arguments >
176
+ </configuration >
177
+ </execution >
151
178
</executions >
152
179
</plugin >
153
180
</plugins >
Original file line number Diff line number Diff line change 1
1
import java.io.*;
2
- import org.codehaus.plexus.util.FileUtils ;
2
+ import org.codehaus.plexus.util.fileutils ;
3
3
4
4
5
- String log = FileUtils.fileRead ( new File ( basedir, "build.log" ) );
6
- String expected = "rake (10.1.0)";
5
+ string log = fileutils.fileread ( new file ( basedir, "build.log" ) );
6
+ string expected = "rake (10.1.0)";
7
7
if ( !log.contains( expected ) )
8
8
{
9
- throw new RuntimeException ( "log file does not contain '" + expected + "'" );
9
+ throw new runtimeexception ( "log file does not contain '" + expected + "'" );
10
10
}
11
11
expected = "4.1.0";
12
12
if ( !log.contains( expected ) )
13
13
{
14
- throw new RuntimeException ( "log file does not contain '" + expected + "'" );
14
+ throw new runtimeexception ( "log file does not contain '" + expected + "'" );
15
15
}
16
16
expected = "json (1.8.0 java)";
17
17
if ( !log.contains( expected ) )
@@ -38,3 +38,8 @@ if ( !log.contains( expected ) )
38
38
{
39
39
throw new RuntimeException( "log file does not contain '" + expected + "'" );
40
40
}
41
+ expected = "there is NO org.objectweb.asm.ClassWriter on the classpath";
42
+ if ( !log.contains( expected ) )
43
+ {
44
+ throw new RuntimeException( "log file does not contain '" + expected + "'" );
45
+ }
Original file line number Diff line number Diff line change 137
137
</arguments >
138
138
</configuration >
139
139
</execution >
140
+ <execution >
141
+ <id >ensure there is no org.objectweb.asm.ClassWriter</id >
142
+ <phase >test</phase >
143
+ <goals >
144
+ <goal >exec</goal >
145
+ </goals >
146
+ <configuration >
147
+ <executable >java</executable >
148
+ <arguments >
149
+ <argument >-classpath</argument >
150
+ <argument >${gem.home} /gems/jruby-jars-${ruby.version} /lib/jruby-core-@project.version@.jar${path.separator}${gem.home} /gems/jruby-jars-${ruby.version} /lib/jruby-stdlib-@project.version@.jar</argument >
151
+ <argument >org.jruby.Main</argument >
152
+ <argument >-e</argument >
153
+ <!-- make sure openssl loads -->
154
+ <argument >
155
+ begin
156
+ import_java "org.objectweb.asm.ClassWriter"
157
+ raise "error there is org.objectweb.asm.ClassWriter on the classpath"
158
+ rescue NameError => e
159
+ puts "there is NO org.objectweb.asm.ClassWriter on the classpath"
160
+ end
161
+ </argument >
162
+ </arguments >
163
+ </configuration >
164
+ </execution >
140
165
</executions >
141
166
</plugin >
142
167
</plugins >
Original file line number Diff line number Diff line change @@ -38,3 +38,8 @@ if ( !log.contains( expected ) )
38
38
{
39
39
throw new RuntimeException( "log file does not contain '" + expected + "'" );
40
40
}
41
+ expected = "there is NO org.objectweb.asm.ClassWriter on the classpath";
42
+ if ( !log.contains( expected ) )
43
+ {
44
+ throw new RuntimeException( "log file does not contain '" + expected + "'" );
45
+ }
Original file line number Diff line number Diff line change 131
131
</arguments >
132
132
</configuration >
133
133
</execution >
134
+ <execution >
135
+ <id >ensure there is no org.objectweb.asm.ClassWriter</id >
136
+ <phase >test</phase >
137
+ <goals >
138
+ <goal >exec</goal >
139
+ </goals >
140
+ <configuration >
141
+ <executable >java</executable >
142
+ <arguments >
143
+ <argument >-classpath</argument >
144
+ <!-- automatically creates the classpath using all project dependencies,
145
+ also adding the project build directory -->
146
+ <classpath />
147
+ <argument >org.jruby.Main</argument >
148
+ <argument >-e</argument >
149
+ <!-- make sure openssl loads -->
150
+ <argument >
151
+ begin
152
+ import_java "org.objectweb.asm.ClassWriter"
153
+ raise "error there is org.objectweb.asm.ClassWriter on the classpath"
154
+ rescue NameError => e
155
+ puts "there is NO org.objectweb.asm.ClassWriter on the classpath"
156
+ end
157
+ </argument >
158
+ </arguments >
159
+ </configuration >
160
+ </execution >
134
161
</executions >
135
162
</plugin >
136
163
</plugins >
Original file line number Diff line number Diff line change @@ -38,3 +38,8 @@ if ( !log.contains( expected ) )
38
38
{
39
39
throw new RuntimeException( "log file does not contain '" + expected + "'" );
40
40
}
41
+ expected = "there is NO org.objectweb.asm.ClassWriter on the classpath";
42
+ if ( !log.contains( expected ) )
43
+ {
44
+ throw new RuntimeException( "log file does not contain '" + expected + "'" );
45
+ }
Original file line number Diff line number Diff line change 131
131
</arguments >
132
132
</configuration >
133
133
</execution >
134
+ <execution >
135
+ <id >there is org.objectweb.asm.ClassWriter</id >
136
+ <phase >test</phase >
137
+ <goals >
138
+ <goal >exec</goal >
139
+ </goals >
140
+ <configuration >
141
+ <executable >java</executable >
142
+ <arguments >
143
+ <argument >-classpath</argument >
144
+ <!-- automatically creates the classpath using all project dependencies,
145
+ also adding the project build directory -->
146
+ <classpath />
147
+ <argument >org.jruby.Main</argument >
148
+ <argument >-e</argument >
149
+ <!-- make sure openssl loads -->
150
+ <argument >
151
+ begin
152
+ java_import "org.objectweb.asm.ClassWriter"
153
+ puts "there is org.objectweb.asm.ClassWriter on the classpath"
154
+ rescue NameError => e
155
+ raise "error there is NO org.objectweb.asm.ClassWriter on the classpath"
156
+ end
157
+ </argument >
158
+ </arguments >
159
+ </configuration >
160
+ </execution >
134
161
</executions >
135
162
</plugin >
136
163
</plugins >
Original file line number Diff line number Diff line change @@ -38,3 +38,8 @@ if ( !log.contains( expected ) )
38
38
{
39
39
throw new RuntimeException( "log file does not contain '" + expected + "'" );
40
40
}
41
+ expected = "there is org.objectweb.asm.ClassWriter on the classpath";
42
+ if ( !log.contains( expected ) )
43
+ {
44
+ throw new RuntimeException( "log file does not contain '" + expected + "'" );
45
+ }
Original file line number Diff line number Diff line change
1
+ require 'rspec'
2
+
3
+ if RbConfig ::CONFIG [ 'host_os' ] =~ /mingw|mswin/
4
+ describe "GH-2008: multi args 'system' method on Windows" do
5
+ let ( :test_dir_name ) { "this_is_test_dir" }
6
+ before :each do
7
+ if Dir . exists? test_dir_name
8
+ Dir . rmdir test_dir_name
9
+ end
10
+ end
11
+ after :each do
12
+ if Dir . exists? test_dir_name
13
+ Dir . rmdir test_dir_name
14
+ end
15
+ end
16
+
17
+ it "can create directory by intenal command" do
18
+ result = system ( "mkdir" , test_dir_name )
19
+ result . should be_true
20
+ Dir . should be_exists ( test_dir_name )
21
+ end
22
+ end
23
+ end
Original file line number Diff line number Diff line change
1
+ require 'test/unit'
2
+ require 'openssl'
3
+
4
+ class TestOpenssl < Test ::Unit ::TestCase
5
+ def test_adding_pem
6
+ # mimic what rubygems/request#add_rubygems_trusted_certs does
7
+ # to find the pem certificates
8
+ base = $LOAD_PATH. detect { |p | p =~ /shared/ }
9
+ pems = Dir [ File . join ( base , 'rubygems/ssl_certs/*pem' ) ]
10
+ assert_equal ( 7 , pems . size )
11
+ pems . each do |pem |
12
+ store = OpenSSL ::X509 ::Store . new
13
+ cert = OpenSSL ::X509 ::Certificate . new ( File . read ( pem ) )
14
+ assert ( !store . verify ( cert ) )
15
+ store . add_file ( pem )
16
+ assert ( store . verify ( cert ) )
17
+ end
18
+ end
19
+ end
You can’t perform that action at this time.
0 commit comments