bosdk 1.0.2-universal-java-1.6 → 1.0.3-universal-java-1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +21 -1
- data/bin/boirb +52 -0
- data/bosdk.gemspec +9 -1
- data/lib/bosdk.rb +2 -2
- metadata +30 -9
data/README.rdoc
CHANGED
@@ -34,7 +34,27 @@ Alternatively you can use the #connect closure.
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
== BOIRB
|
38
|
+
|
39
|
+
The library ships with an extension to the standard irb shell that connects you
|
40
|
+
to a cms and gives you a handful of helpful shortcuts.
|
41
|
+
|
42
|
+
connect(cms, username, password, options = Hash.new)
|
43
|
+
Creates a new EnterpriseSession and binds it to @boe.
|
44
|
+
|
45
|
+
connected?
|
46
|
+
Tests whether @boe is connected to a cms.
|
47
|
+
|
48
|
+
disconnect
|
49
|
+
Disconnects @boe from the cms.
|
50
|
+
|
51
|
+
query(stmt)
|
52
|
+
Runs the provided query on @boe and returns the resulting InfoObject array.
|
53
|
+
|
54
|
+
open(docid)
|
55
|
+
Opens the specified InfoObject using a ReportEngine and returns the doc handle.
|
56
|
+
|
37
57
|
== Resources
|
38
58
|
|
39
59
|
- Website: http://semmons99.github.com/bosdk
|
40
|
-
- Git Repo: http://github.com/semmons99/bosdk
|
60
|
+
- Git Repo: http://github.com/semmons99/bosdk
|
data/bin/boirb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
|
3
|
+
require 'irb'
|
4
|
+
|
5
|
+
module IRB
|
6
|
+
def self.start_session(binding)
|
7
|
+
IRB.setup(nil)
|
8
|
+
|
9
|
+
workspace = WorkSpace.new(binding)
|
10
|
+
|
11
|
+
if @CONF[:SCRIPT]
|
12
|
+
irb = Irb.new(workspace, @CONF[:SCRIPT])
|
13
|
+
else
|
14
|
+
irb = Irb.new(workspace)
|
15
|
+
end
|
16
|
+
|
17
|
+
@CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
|
18
|
+
@CONF[:MAIN_CONTEXT] = irb.context
|
19
|
+
|
20
|
+
trap("SIGINT") do
|
21
|
+
irb.signal_handle
|
22
|
+
end
|
23
|
+
|
24
|
+
catch(:IRB_EXIT) do
|
25
|
+
irb.eval_input
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
require 'bosdk'
|
31
|
+
|
32
|
+
def connect(cms, username, password, options = Hash.new)
|
33
|
+
@boe = BOSDK::EnterpriseSession.new(cms, username, password, options)
|
34
|
+
end
|
35
|
+
|
36
|
+
def connected?
|
37
|
+
@boe and @boe.connected?
|
38
|
+
end
|
39
|
+
|
40
|
+
def disconnect
|
41
|
+
@boe.disconnect if connected?
|
42
|
+
end
|
43
|
+
|
44
|
+
def query(stmt)
|
45
|
+
@boe.query(stmt) if connected?
|
46
|
+
end
|
47
|
+
|
48
|
+
def open_webi(docid)
|
49
|
+
@boe.open_webi(docid) if connected?
|
50
|
+
end
|
51
|
+
|
52
|
+
IRB.start_session(Kernel.binding)
|
data/bosdk.gemspec
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "bosdk"
|
3
|
-
s.version = "1.0.
|
3
|
+
s.version = "1.0.3"
|
4
4
|
|
5
5
|
s.author = "Shane Emmons"
|
6
6
|
s.description = "A JRuby wrapper for the Business Objects Java SDK"
|
7
7
|
s.email = "semmons99@gmail.com"
|
8
8
|
s.files = [
|
9
9
|
"README.rdoc", "MIT-LICENSE", "bosdk.gemspec", "Rakefile",
|
10
|
+
"bin/boirb",
|
10
11
|
"lib/bosdk.rb",
|
11
12
|
"lib/bosdk/enterprise_session.rb",
|
12
13
|
"lib/bosdk/info_object.rb",
|
@@ -15,9 +16,16 @@ Gem::Specification.new do |s|
|
|
15
16
|
"spec/info_object_spec.rb",
|
16
17
|
"spec/webi_report_engine_spec.rb",
|
17
18
|
]
|
19
|
+
s.bindir = "bin"
|
20
|
+
s.executables = ["boirb"]
|
21
|
+
s.default_executable = "boirb"
|
18
22
|
|
19
23
|
s.homepage = "http://semmons99.github.com/bosdk"
|
20
24
|
s.summary = "JRuby Business Object Java SDK wrapper"
|
21
25
|
s.platform = Gem::Platform::CURRENT
|
22
26
|
s.requirements = "An environment variable 'BOE_JAVA_LIB' pointing to the Business Objects Java SDK directory"
|
27
|
+
s.has_rdoc = true
|
28
|
+
s.extra_rdoc_files = ["README.rdoc", "MIT-LICENSE"]
|
29
|
+
s.add_development_dependency("rspec", ">= 1.3.0")
|
30
|
+
s.add_development_dependency("hanna", ">= 0.1.12")
|
23
31
|
end
|
data/lib/bosdk.rb
CHANGED
@@ -32,8 +32,8 @@ require 'bosdk/webi_report_engine'
|
|
32
32
|
|
33
33
|
module BOSDK
|
34
34
|
# A closure over EnterpriseSession
|
35
|
-
def BOSDK.connect(cms, username, password, &block)
|
36
|
-
session = EnterpriseSession.new(cms, username, password)
|
35
|
+
def BOSDK.connect(cms, username, password, options = Hash.new, &block)
|
36
|
+
session = EnterpriseSession.new(cms, username, password, options)
|
37
37
|
yield session
|
38
38
|
session.disconnect
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: universal-java-1.6
|
6
6
|
authors:
|
7
7
|
- Shane Emmons
|
@@ -9,23 +9,44 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
13
|
-
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
12
|
+
date: 2010-02-03 00:00:00 -05:00
|
13
|
+
default_executable: boirb
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rspec
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.3.0
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: hanna
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.12
|
34
|
+
version:
|
16
35
|
description: A JRuby wrapper for the Business Objects Java SDK
|
17
36
|
email: semmons99@gmail.com
|
18
|
-
executables:
|
19
|
-
|
37
|
+
executables:
|
38
|
+
- boirb
|
20
39
|
extensions: []
|
21
40
|
|
22
|
-
extra_rdoc_files:
|
23
|
-
|
41
|
+
extra_rdoc_files:
|
42
|
+
- README.rdoc
|
43
|
+
- MIT-LICENSE
|
24
44
|
files:
|
25
45
|
- README.rdoc
|
26
46
|
- MIT-LICENSE
|
27
47
|
- bosdk.gemspec
|
28
48
|
- Rakefile
|
49
|
+
- bin/boirb
|
29
50
|
- lib/bosdk.rb
|
30
51
|
- lib/bosdk/enterprise_session.rb
|
31
52
|
- lib/bosdk/info_object.rb
|