handle-system 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,8 +2,6 @@ require 'tempfile'
2
2
 
3
3
  module Handle
4
4
  module Command
5
- HDL_HOME = ENV['HDL_HOME'] || '/usr/local/handle'
6
-
7
5
  class Batch
8
6
  def initialize(handle, index, auth)
9
7
  @batch_file = Tempfile.new('hdl')
@@ -19,7 +17,7 @@ module Handle
19
17
 
20
18
  def execute!
21
19
  @batch_file.close
22
- cmd = File.join(HDL_HOME, 'bin', 'hdl-genericbatch')
20
+ cmd = File.join(Handle::HOME, 'bin', 'hdl-genericbatch')
23
21
  output = `#{cmd} #{@batch_file.path} 2>/dev/null`
24
22
  results = output.lines.select { |line| line =~ /^=+>/ }
25
23
  results.each do |rs|
@@ -108,7 +106,7 @@ module Handle
108
106
  end
109
107
 
110
108
  def resolve_handle(handle, types=[], indexes=[], auth=true)
111
- cmd = File.join(HDL_HOME, 'bin', 'hdl-qresolver')
109
+ cmd = File.join(Handle::HOME, 'bin', 'hdl-qresolver')
112
110
  response = `#{cmd} #{handle} 2>/dev/null`.strip
113
111
  if response =~ /^Got Response:/
114
112
  response = response.lines.select { |line| line =~ /^\s*index=/ }.join("")
data/lib/handle/java.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'java'
2
2
  # Load all jarfiles in $HDL_HOME/lib
3
- hdl_home = ENV['HDL_HOME'] || File.expand_path('../../../vendor/handle',__FILE__)
4
- Dir[File.join(hdl_home,'lib','*.jar')].each { |f| require f }
3
+ Dir[File.join(Handle::HOME,'lib','*.jar')].each { |f| require f }
5
4
 
6
5
  module Handle
7
6
  module Java
@@ -1,3 +1,3 @@
1
1
  module Handle
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/handle.rb CHANGED
@@ -4,6 +4,8 @@ require "handle/field"
4
4
  require "handle/field/admin"
5
5
 
6
6
  module Handle
7
+ HOME = ENV['HDL_HOME'] || File.expand_path('../../vendor/handle',__FILE__)
8
+
7
9
  persistence_module = Module.const_defined?('JRuby') ? 'java' : 'command'
8
10
  require "handle/#{persistence_module}"
9
11
  Record.send(:include, Handle::Persistence)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: handle-system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-02 00:00:00.000000000 Z
12
+ date: 2014-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  segments:
110
110
  - 0
111
- hash: 2695510527502502615
111
+ hash: -4294713473393746594
112
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  none: false
114
114
  requirements:
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  segments:
119
119
  - 0
120
- hash: 2695510527502502615
120
+ hash: -4294713473393746594
121
121
  requirements: []
122
122
  rubyforge_project:
123
123
  rubygems_version: 1.8.23