pechkin 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27d78c857bcd762e9b36cbaa234120e6caa91b67604344f1602e0e64bcffe7c0
4
- data.tar.gz: 1bfcf6b1b346efd49f02f47995f561825b8bdffdf8dd193a586c37d30855d9ad
3
+ metadata.gz: 2166aaacd30bc05dfd296593e02d22cc097d5106dd7dad58572650d4580b6342
4
+ data.tar.gz: fcc1bd8cb27ad1d4d7758574b1ee33706aac3d76c033fb7b3558b9a46fc3ff0d
5
5
  SHA512:
6
- metadata.gz: cea8fa824f2bbcf23f75612d528fbab474c9ac1ad9e0c860301100e5e44d030e137f2d2456438ac7a42c220c03d06406462c2bf0f886575bf72ec970898cffd2
7
- data.tar.gz: 5bd402593bca10b7a3b92d88e217a06847539f1b90e2225f2c4643b1c6f18db86c3826ae50f7dcc2eb447a01d6969d68d7ad1e73608b5f3cc64aab43df9d36c4
6
+ metadata.gz: 63f33140ef49b37016263d006ef0ae7b0dd7773b5d865584a8eb9f784b498e1998b0218120105be6337db739f9e1daaf44b333d0a490f33b153591dba2168421
7
+ data.tar.gz: 7c80b47d54c900718b9defb2533b45d35597ba2db15bc66f944f96ca7f8a09a57573761628171505846f7dfc4ded42483fffd993e7bda587f7925ebe6974f9d3
@@ -10,14 +10,19 @@ module Pechkin # :nodoc:
10
10
  def run
11
11
  options = CLI.parse(ARGV)
12
12
  configuration = Config.new(options.config_file)
13
- log_dir = options.log_dir
13
+ setup_logging(options.log_dir) if options.log_dir
14
14
  app = Pechkin.create(configuration)
15
- if log_dir
16
- app.logger = ::Logger.new(File.join(log_dir, 'pechkin.log'), 'daily')
17
- end
15
+ PechkinAPI.logger.info 'Starting pechkin service...'
18
16
  Rack::Server.start(app: app,
19
17
  Port: options.port || configuration.port,
20
18
  pid: options.pid_file)
21
19
  end
20
+
21
+ def setup_logging(log_dir)
22
+ logger = ::Logger.new(File.join(log_dir, 'pechkin.log'), 'daily')
23
+ logger.level = ::Logger::INFO
24
+
25
+ PechkinAPI.logger = logger
26
+ end
22
27
  end
23
28
  end
@@ -1,7 +1,7 @@
1
1
  module Pechkin
2
2
  # Keeps actual version
3
3
  module Version
4
- VERSION = [0, 0, 4].freeze
4
+ VERSION = [0, 0, 5].freeze
5
5
  class << self
6
6
  def version_string
7
7
  VERSION.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pechkin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Arkhanhelsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-07 00:00:00.000000000 Z
11
+ date: 2018-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '1.5'
33
+ version: 2.0.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '1.5'
40
+ version: 2.0.6
41
41
  description:
42
42
  email: ilya.arkhanhelsky at gmail.com
43
43
  executables: