diff options
| author | Luc Donnet | 2015-04-29 11:49:22 +0200 | 
|---|---|---|
| committer | Luc Donnet | 2015-04-29 11:49:22 +0200 | 
| commit | e0924ce3a2567a01c5987bd4ac07eb9d8259d584 (patch) | |
| tree | dac76fcf760142f7d73a70846fa9e652dd900f10 /config/initializers | |
| parent | 88f4c5c64615c46f6a0700cca77e0a5e139f2867 (diff) | |
| download | chouette-core-e0924ce3a2567a01c5987bd4ac07eb9d8259d584.tar.bz2 | |
Fix travis configuration for spec
Diffstat (limited to 'config/initializers')
| -rw-r--r-- | config/initializers/jruby.rb | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/config/initializers/jruby.rb b/config/initializers/jruby.rb new file mode 100644 index 000000000..4956bc424 --- /dev/null +++ b/config/initializers/jruby.rb @@ -0,0 +1,14 @@ +if RUBY_PLATFORM == 'java' # Allows the application to work with other Rubies if not JRuby +  require 'java' +  java_import 'java.lang.ClassNotFoundException' + +  begin +    security_class = java.lang.Class.for_name('javax.crypto.JceSecurity') +    restricted_field = security_class.get_declared_field('isRestricted') +    restricted_field.accessible = true +    restricted_field.set nil, false +  rescue ClassNotFoundException => e +    # Handle Mac Java, etc not having this configuration setting +    $stderr.print "Java told me: #{e}n" +  end +end | 
