sirius-client-core 2013.4.1.0 → 2013.4.30.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +31 -1
- data/lib/sirius/core.rb +3 -3
- data/lib/sirius/core/system.rb +8 -8
- data/lib/sirius/core/system/dir.rb +5 -5
- data/lib/sirius/core/system/file.rb +2 -2
- data/lib/sirius/core/system/sys.rb +2 -2
- metadata +2 -2
data/Rakefile
CHANGED
@@ -2,6 +2,8 @@ require 'rubygems'
|
|
2
2
|
require 'rubygems/package_task'
|
3
3
|
require 'cucumber'
|
4
4
|
require 'cucumber/rake/task'
|
5
|
+
require 'rake/testtask'
|
6
|
+
require 'fileutils'
|
5
7
|
|
6
8
|
spec = Gem::Specification.new do |s|
|
7
9
|
s.platform = Gem::Platform::RUBY
|
@@ -16,9 +18,37 @@ spec = Gem::Specification.new do |s|
|
|
16
18
|
s.email="kolesnik.nickolay@gmail.com"
|
17
19
|
end
|
18
20
|
|
21
|
+
task :clean do |t|
|
22
|
+
FileUtils.rm_r 'pkg', :force => true
|
23
|
+
end
|
24
|
+
|
25
|
+
task :rubocop do |t|
|
26
|
+
includes = Dir['lib/**/*']
|
27
|
+
excludes = Dir['lib/sirius/core/system/**/*']
|
28
|
+
|
29
|
+
file_list = (includes - excludes ).reject {|fn| File.directory?(fn)}
|
30
|
+
|
31
|
+
file_list.each do |path|
|
32
|
+
sh "call rubocop -c .rubocop.yml -e #{path}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
Rake::TestTask.new(:install_test) do |task|
|
37
|
+
task.name = 'install_test'
|
38
|
+
task.libs << "test"
|
39
|
+
task.test_files = FileList['tests/install/**/*.rb']
|
40
|
+
task.verbose = true
|
41
|
+
end
|
42
|
+
|
19
43
|
Gem::PackageTask.new(spec) do |pkg|
|
20
44
|
end
|
21
45
|
|
22
46
|
Cucumber::Rake::Task.new(:test) do |t|
|
23
47
|
t.cucumber_opts = "tests/features --format pretty --guess"
|
24
|
-
end
|
48
|
+
end
|
49
|
+
|
50
|
+
task :push => [:package] do |t|
|
51
|
+
sh "call gem push -V pkg/#{spec.name}-#{spec.version}.gem"
|
52
|
+
end
|
53
|
+
|
54
|
+
task :all => [:clean,:rubocop,:package,:install_test]
|
data/lib/sirius/core.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
require 'core/system.rb'
|
1
|
+
require 'sirius/core/system.rb'
|
2
2
|
|
3
3
|
module Sirius
|
4
4
|
module Client
|
5
5
|
module Core
|
6
6
|
class Core
|
7
7
|
attr_accessor(:system)
|
8
|
-
def initialize(host =
|
9
|
-
@system = System::System.new(host,port)
|
8
|
+
def initialize(host = 'localhost', port = '21212')
|
9
|
+
@system = System::System.new(host, port)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
data/lib/sirius/core/system.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
require 'system/dir.rb'
|
2
|
-
require 'system/file.rb'
|
3
|
-
require 'system/sys.rb'
|
1
|
+
require 'sirius/core/system/dir.rb'
|
2
|
+
require 'sirius/core/system/file.rb'
|
3
|
+
require 'sirius/core/system/sys.rb'
|
4
4
|
|
5
5
|
module Sirius
|
6
6
|
module Client
|
7
7
|
module Core
|
8
8
|
module System
|
9
9
|
class System
|
10
|
-
attr_accessor(:dir
|
11
|
-
def initialize(host =
|
12
|
-
@dir = DirectoryOperations.new(host,port)
|
13
|
-
@file = FileOperations.new(host,port)
|
14
|
-
@sys = SystemOperations.new(host,port)
|
10
|
+
attr_accessor(:dir, :file, :sys)
|
11
|
+
def initialize(host = 'localhost', port = '21212')
|
12
|
+
@dir = DirectoryOperations.new(host, port)
|
13
|
+
@file = FileOperations.new(host, port)
|
14
|
+
@sys = SystemOperations.new(host, port)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -6,18 +6,18 @@ module Sirius
|
|
6
6
|
module System
|
7
7
|
class DirectoryOperations
|
8
8
|
attr_accessor(:host, :port, :client)
|
9
|
-
def initialize(host =
|
9
|
+
def initialize(host = 'localhost', port = '21212' )
|
10
10
|
@host = host
|
11
11
|
@port = port
|
12
12
|
|
13
13
|
@client = Savon.client do |wsdl|
|
14
|
-
wsdl.endpoint
|
15
|
-
wsdl.namespace
|
14
|
+
wsdl.endpoint("http://#{@host}:#{@port}/system/file?wsdl")
|
15
|
+
wsdl.namespace('http://system.server.sirius.org/')
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
def copy_ex(origin,destination,overwrite)
|
20
|
-
response = @client.request :sys,
|
19
|
+
def copy_ex(origin, destination, overwrite)
|
20
|
+
response = @client.request :sys, 'copyEx' do
|
21
21
|
soap.body = {
|
22
22
|
:origin => origin,
|
23
23
|
:destination => destination,
|
@@ -11,8 +11,8 @@ module Sirius
|
|
11
11
|
@port = port
|
12
12
|
|
13
13
|
@client = Savon.client do |wsdl|
|
14
|
-
wsdl.endpoint
|
15
|
-
wsdl.namespace
|
14
|
+
wsdl.endpoint("http://#{@host}:#{@port}/system/file?wsdl")
|
15
|
+
wsdl.namespace("http://system.server.sirius.org/")
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -11,8 +11,8 @@ module Sirius
|
|
11
11
|
@port = port
|
12
12
|
|
13
13
|
@client = Savon.client do |wsdl|
|
14
|
-
wsdl.endpoint
|
15
|
-
wsdl.namespace
|
14
|
+
wsdl.endpoint("http://#{@host}:#{@port}/system/file?wsdl")
|
15
|
+
wsdl.namespace("http://system.server.sirius.org/")
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sirius-client-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2013.4.
|
4
|
+
version: 2013.4.30.0
|
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: 2013-04-
|
12
|
+
date: 2013-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: The client for Sirius system
|
15
15
|
email: kolesnik.nickolay@gmail.com
|