sappho-data-publisher 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sappho-data-publisher/atlassian_app.rb +1 -1
- data/lib/sappho-data-publisher/configuration.rb +1 -1
- data/lib/sappho-data-publisher/custom_liquid.rb +1 -1
- data/lib/sappho-data-publisher/publisher.rb +1 -1
- data/lib/sappho-data-publisher/version.rb +1 -1
- data/lib/sappho-data-publisher.rb +1 -1
- data/test/ruby/helper.rb +6 -6
- metadata +8 -8
@@ -19,7 +19,7 @@ module Sappho
|
|
19
19
|
|
20
20
|
def connect
|
21
21
|
raise "you have already attempted to connect to #{@appName}" if @appServer or @loggedIn
|
22
|
-
modules = Sappho::
|
22
|
+
modules = Sappho::ApplicationModuleRegister.instance
|
23
23
|
@config = modules.get :configuration
|
24
24
|
@logger = modules.get :log
|
25
25
|
url = @config.data["#{@appName.downcase}.url"]
|
@@ -17,7 +17,7 @@ module Sappho
|
|
17
17
|
def initialize filename = ARGV[0]
|
18
18
|
filename = File.expand_path(filename || 'config.yml')
|
19
19
|
@data = YAML.load_file filename
|
20
|
-
Sappho::
|
20
|
+
Sappho::ApplicationModuleRegister.instance.get(:log).info "configuration loaded from #{filename}"
|
21
21
|
end
|
22
22
|
|
23
23
|
end
|
@@ -22,7 +22,7 @@ module Sappho
|
|
22
22
|
|
23
23
|
def fullname username
|
24
24
|
begin
|
25
|
-
name = Sappho::
|
25
|
+
name = Sappho::ApplicationModuleRegister.instance.get('AddressBook').getUserFullName(username)
|
26
26
|
raise 'unknown person' unless name and name.length > 0
|
27
27
|
rescue
|
28
28
|
name = '** John Doe **'
|
@@ -14,7 +14,7 @@ module Sappho
|
|
14
14
|
class Publisher
|
15
15
|
|
16
16
|
def publish
|
17
|
-
modules = Sappho::
|
17
|
+
modules = Sappho::ApplicationModuleRegister.instance
|
18
18
|
logger = modules.get :log
|
19
19
|
configurator = modules.get modules.get(:configuration).data['config.module']
|
20
20
|
globalScript = ''
|
@@ -19,7 +19,7 @@ module Sappho
|
|
19
19
|
|
20
20
|
def CommandLine.process
|
21
21
|
ENV['application.log.detail'] = 'message'
|
22
|
-
modules = Sappho::
|
22
|
+
modules = Sappho::ApplicationModuleRegister.instance
|
23
23
|
modules.get(:log).info "sappho-data-publisher version #{VERSION} - #{HOMEPAGE}"
|
24
24
|
modules.set :configuration, Configuration.new
|
25
25
|
jira = Jira.new
|
data/test/ruby/helper.rb
CHANGED
@@ -19,25 +19,25 @@ class Test::Unit::TestCase
|
|
19
19
|
|
20
20
|
def setupConfiguration (filename = testFilename('config/config.yml'))
|
21
21
|
config = Sappho::Data::Publisher::Configuration.new filename
|
22
|
-
Sappho::
|
22
|
+
Sappho::ApplicationModuleRegister.instance.set :configuration, config
|
23
23
|
end
|
24
24
|
|
25
25
|
def setupJira (moduleName, dataFilename = testFilename('data/jira.yml'))
|
26
26
|
@mockJira = MockJira.new dataFilename
|
27
|
-
Sappho::
|
27
|
+
Sappho::ApplicationModuleRegister.instance.set 'mockJira', @mockJira
|
28
28
|
@jira = Sappho::Data::Publisher::Jira.new
|
29
|
-
Sappho::
|
29
|
+
Sappho::ApplicationModuleRegister.instance.set moduleName, @jira
|
30
30
|
end
|
31
31
|
|
32
32
|
def setupConfluence moduleName
|
33
33
|
@mockConfluence = MockConfluence.new
|
34
|
-
Sappho::
|
34
|
+
Sappho::ApplicationModuleRegister.instance.set 'mockConfluence', @mockConfluence
|
35
35
|
@confluence = Sappho::Data::Publisher::Confluence.new
|
36
|
-
Sappho::
|
36
|
+
Sappho::ApplicationModuleRegister.instance.set moduleName, @confluence
|
37
37
|
end
|
38
38
|
|
39
39
|
def teardown
|
40
|
-
Sappho::
|
40
|
+
Sappho::ApplicationModuleRegister.instance.shutdown
|
41
41
|
end
|
42
42
|
|
43
43
|
def testFilename filename
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sappho-data-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Heald
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-03-
|
18
|
+
date: 2012-03-16 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|
@@ -58,12 +58,12 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
hash:
|
61
|
+
hash: 27
|
62
62
|
segments:
|
63
63
|
- 0
|
64
|
-
- 0
|
65
64
|
- 1
|
66
|
-
|
65
|
+
- 0
|
66
|
+
version: 0.1.0
|
67
67
|
type: :runtime
|
68
68
|
version_requirements: *id003
|
69
69
|
description: See the project home page for more information
|