xdojava 1.0.3.pre → 1.0.5.pre
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/lib/xdojava.rb +11 -7
- metadata +3 -3
data/lib/xdojava.rb
CHANGED
@@ -1,23 +1,27 @@
|
|
1
|
+
require 'bundler'
|
1
2
|
module SageoneNaUtils
|
2
3
|
class XdoJava
|
4
|
+
def self.get_classpath
|
5
|
+
spec = Bundler.load.specs.find{|s| s.name == "xdojava" }
|
6
|
+
classpath = spec.gem_dir
|
7
|
+
classpath = classpath.concat("/lib")
|
8
|
+
end
|
9
|
+
|
3
10
|
# Types a character sequence, but without any special chars.
|
4
11
|
def self.type_keys(type_this)
|
5
|
-
|
6
|
-
command_line
|
7
|
-
puts Dir.pwd
|
12
|
+
command_line = 'java -classpath ' + get_classpath + ' xdojava ' + type_this
|
13
|
+
puts command_line
|
8
14
|
system(command_line)
|
9
15
|
sleep(0.5)
|
10
16
|
end
|
11
17
|
|
12
18
|
def self.tab
|
13
|
-
|
14
|
-
command_line = 'java xdojava {TAB}'
|
19
|
+
command_line = 'java -classpath ' + get_classpath + ' xdojava {TAB}'
|
15
20
|
system(command_line)
|
16
21
|
end
|
17
22
|
|
18
23
|
def self.tab_back
|
19
|
-
|
20
|
-
command_line = 'java xdojava {SHIFT_TAB}'
|
24
|
+
command_line = 'java -classpath ' + get_classpath + ' xdojava {SHIFT_TAB}'
|
21
25
|
system(command_line)
|
22
26
|
end
|
23
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xdojava
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 961915968
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
9
|
+
- 5
|
10
10
|
- pre
|
11
|
-
version: 1.0.
|
11
|
+
version: 1.0.5.pre
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- rgunter
|