smartguard 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'smartguard'
4
+ require 'colored'
4
5
  require 'dante'
5
6
 
7
+ Smartkiosk::Common::Patches.dante_should_log_with Smartguard::Logging.logger
8
+
6
9
  runner = Dante::Runner.new('smartguard')
7
10
  runner.description = "Smartkiosk services control daemon"
8
11
 
@@ -2,7 +2,9 @@ require 'active_support/all'
2
2
  require 'pathname'
3
3
  require 'fileutils'
4
4
  require 'drb'
5
- require "socket"
5
+ require 'socket'
6
+
7
+ require 'smartkiosk/common'
6
8
 
7
9
  require 'smartguard/version'
8
10
  require 'smartguard/logging'
@@ -5,18 +5,17 @@ module Smartguard
5
5
  def start
6
6
  super
7
7
 
8
- Logging.logger.info "Starting thin"
9
-
10
8
  if Smartguard.environment == :development
11
- port = 3001
9
+ Logging.logger.info "Skipping thin; Please run manually".black_on_white.bold
10
+ return true
12
11
  else
13
- port = 3000
12
+ Logging.logger.info "Starting thin"
14
13
  end
15
14
 
16
15
  if !run(@path,
17
16
  {},
18
17
  "bundle", "exec",
19
- "thin", "-e", Smartguard.environment.to_s, "-p", port.to_s,
18
+ "thin", "-e", Smartguard.environment.to_s, "-p", 3000,
20
19
  "start"
21
20
  )
22
21
  return false
@@ -1,32 +1,5 @@
1
- require 'logger'
2
-
3
1
  module Smartguard
4
- module Logging
5
-
6
- def self.logdir=(dir)
7
- @logdir = dir
8
- end
9
-
10
- def self.logger
11
- @logger ||= begin
12
- log = Logger.new(STDOUT)
13
- log.level = Logger::DEBUG
14
- log.formatter = Logger::Formatter.new
15
- log
16
- end
17
- end
18
-
19
- def self.logger=(val)
20
- @logger = (val ? val : Logger.new('/dev/null'))
21
- end
22
-
23
- def self.logfile=(val)
24
- @logfile = val
25
- end
26
-
27
- def self.logfile
28
- @logfile
29
- end
30
-
2
+ module Logging extend Smartkiosk::Common::Logging
3
+ self.service = 'Smartguard'
31
4
  end
32
5
  end
@@ -1,3 +1,3 @@
1
1
  module Smartguard
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
@@ -17,9 +17,11 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.add_runtime_dependency "i18n"
21
- gem.add_runtime_dependency "activesupport"
22
- gem.add_runtime_dependency "dante"
20
+ gem.add_dependency 'smartkiosk-common'
21
+ gem.add_dependency 'i18n'
22
+ gem.add_dependency 'activesupport'
23
+ gem.add_dependency 'dante'
24
+ gem.add_dependency 'colored'
23
25
 
24
- gem.add_development_dependency "pry"
26
+ gem.add_development_dependency 'pry'
25
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartguard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-13 00:00:00.000000000 Z
12
+ date: 2013-01-14 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: smartkiosk-common
16
+ requirement: &70155562307000 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70155562307000
14
25
  - !ruby/object:Gem::Dependency
15
26
  name: i18n
16
- requirement: &70259522045200 !ruby/object:Gem::Requirement
27
+ requirement: &70155562306420 !ruby/object:Gem::Requirement
17
28
  none: false
18
29
  requirements:
19
30
  - - ! '>='
@@ -21,10 +32,10 @@ dependencies:
21
32
  version: '0'
22
33
  type: :runtime
23
34
  prerelease: false
24
- version_requirements: *70259522045200
35
+ version_requirements: *70155562306420
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: activesupport
27
- requirement: &70259522044780 !ruby/object:Gem::Requirement
38
+ requirement: &70155562305820 !ruby/object:Gem::Requirement
28
39
  none: false
29
40
  requirements:
30
41
  - - ! '>='
@@ -32,10 +43,21 @@ dependencies:
32
43
  version: '0'
33
44
  type: :runtime
34
45
  prerelease: false
35
- version_requirements: *70259522044780
46
+ version_requirements: *70155562305820
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: dante
38
- requirement: &70259522044320 !ruby/object:Gem::Requirement
49
+ requirement: &70155562304860 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70155562304860
58
+ - !ruby/object:Gem::Dependency
59
+ name: colored
60
+ requirement: &70155562304200 !ruby/object:Gem::Requirement
39
61
  none: false
40
62
  requirements:
41
63
  - - ! '>='
@@ -43,10 +65,10 @@ dependencies:
43
65
  version: '0'
44
66
  type: :runtime
45
67
  prerelease: false
46
- version_requirements: *70259522044320
68
+ version_requirements: *70155562304200
47
69
  - !ruby/object:Gem::Dependency
48
70
  name: pry
49
- requirement: &70259522043880 !ruby/object:Gem::Requirement
71
+ requirement: &70155562303400 !ruby/object:Gem::Requirement
50
72
  none: false
51
73
  requirements:
52
74
  - - ! '>='
@@ -54,7 +76,7 @@ dependencies:
54
76
  version: '0'
55
77
  type: :development
56
78
  prerelease: false
57
- version_requirements: *70259522043880
79
+ version_requirements: *70155562303400
58
80
  description: Smartguard is the Smartkiosk services control daemon
59
81
  email:
60
82
  - boris@roundlake.ru