smartguard 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,7 @@ module Smartguard
10
10
  Logging.logger.info "Starting scheduler"
11
11
 
12
12
  run @path, {
13
- 'RAILS_ENV' => Smartguard.environment.to_s
13
+ 'RACK_ENV' => Smartguard.environment.to_s
14
14
  }, "rake", "schedule"
15
15
  end
16
16
 
@@ -6,25 +6,25 @@ module Smartguard
6
6
  super
7
7
 
8
8
  if Smartguard.environment == :development
9
- Logging.logger.info "Skipping thin; Please run manually".black_on_white.bold
9
+ Logging.logger.info "Skipping web; Please run manually with `rack web`".black_on_white.bold
10
10
  return true
11
11
  else
12
- Logging.logger.info "Starting thin"
12
+ Logging.logger.info "Starting web"
13
13
  end
14
14
 
15
- log_path = @path.join('log/thin.log')
15
+ log_path = @path.join('log/web.log')
16
16
 
17
- if !run(@path,
18
- {},
17
+ if !run(@path, {
18
+ 'RACK_ENV' => Smartguard.environment.to_s
19
+ },
19
20
  "bundle", "exec",
20
- "thin", "-e", Smartguard.environment.to_s, "-p", "3000", "-l", "#{log_path}",
21
- "start"
21
+ "rack", "web"
22
22
  )
23
23
  return false
24
24
  end
25
25
 
26
26
  result = without_respawn do
27
- wait_for_port 3000
27
+ wait_for_port 3001
28
28
  end
29
29
 
30
30
  result
@@ -33,7 +33,7 @@ module Smartguard
33
33
  def stop
34
34
  super
35
35
 
36
- Logging.logger.info "Stoping thin"
36
+ Logging.logger.info "Stoping web"
37
37
  kill_and_wait :TERM, 15
38
38
  end
39
39
  end
@@ -13,7 +13,7 @@ module Smartguard
13
13
  @services = {
14
14
  smartware: Smartware.new(wrap_path),
15
15
  sidekiq: Sidekiq.new(wrap_path),
16
- thin: Thin.new(wrap_path),
16
+ web: Web.new(wrap_path),
17
17
  scheduler: Scheduler.new(wrap_path),
18
18
  }
19
19
  end
@@ -79,14 +79,9 @@ module Smartguard
79
79
  end
80
80
 
81
81
  Logging.logger.info "Migrating database"
82
- if !system("bundle", "exec", "rake", "db:migrate", "--trace", "RAILS_ENV=production")
82
+ if !system("bundle", "exec", "rake", "db:migrate", "--trace", "RACK_ENV=production")
83
83
  raise "migration failed"
84
84
  end
85
-
86
- Logging.logger.info "Compiling assets"
87
- if !system("bundle", "exec", "rake", "assets:precompile", "--trace", "RAILS_ENV=production")
88
- raise "asset precompilation failed"
89
- end
90
85
  end
91
86
 
92
87
  begin
@@ -1,3 +1,3 @@
1
1
  module Smartguard
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.9"
3
3
  end
data/lib/smartguard.rb CHANGED
@@ -17,7 +17,7 @@ require 'smartguard/applications/smartkiosk'
17
17
  require 'smartguard/applications/smartkiosk/sidekiq'
18
18
  require 'smartguard/applications/smartkiosk/smartware'
19
19
  require 'smartguard/applications/smartkiosk/scheduler'
20
- require 'smartguard/applications/smartkiosk/thin'
20
+ require 'smartguard/applications/smartkiosk/web'
21
21
 
22
22
  module Smartguard
23
23
  class << self
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.3.8
4
+ version: 0.3.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: smartkiosk-common
16
- requirement: &70134897221900 !ruby/object:Gem::Requirement
16
+ requirement: &70271466544820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70134897221900
24
+ version_requirements: *70271466544820
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: i18n
27
- requirement: &70134897221100 !ruby/object:Gem::Requirement
27
+ requirement: &70271466542920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70134897221100
35
+ version_requirements: *70271466542920
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activesupport
38
- requirement: &70134897236580 !ruby/object:Gem::Requirement
38
+ requirement: &70271466541980 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70134897236580
46
+ version_requirements: *70271466541980
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: trollop
49
- requirement: &70134897235080 !ruby/object:Gem::Requirement
49
+ requirement: &70271466540600 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70134897235080
57
+ version_requirements: *70271466540600
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: colored
60
- requirement: &70134897234440 !ruby/object:Gem::Requirement
60
+ requirement: &70271466721780 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70134897234440
68
+ version_requirements: *70271466721780
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
- requirement: &70134897233740 !ruby/object:Gem::Requirement
71
+ requirement: &70271466721180 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70134897233740
79
+ version_requirements: *70271466721180
80
80
  description: Smartguard is the Smartkiosk services control daemon
81
81
  email:
82
82
  - boris@roundlake.ru
@@ -99,7 +99,7 @@ files:
99
99
  - lib/smartguard/applications/smartkiosk/scheduler.rb
100
100
  - lib/smartguard/applications/smartkiosk/sidekiq.rb
101
101
  - lib/smartguard/applications/smartkiosk/smartware.rb
102
- - lib/smartguard/applications/smartkiosk/thin.rb
102
+ - lib/smartguard/applications/smartkiosk/web.rb
103
103
  - lib/smartguard/client.rb
104
104
  - lib/smartguard/logging.rb
105
105
  - lib/smartguard/process.rb