itchy 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d34b3f182cd7b8448019d19750207a0d4c756779
4
- data.tar.gz: 8c1c95b92299172ceec21f88f3a3cacae89a5a5b
3
+ metadata.gz: 11032df3064dd6bfea58f94c9faadd8ca7754ffa
4
+ data.tar.gz: 89cb13d1c70f2cc7c517ab608c55768172ca803b
5
5
  SHA512:
6
- metadata.gz: 717b601424734dd320d2edb950d961254c65dfd41e6b40ed7da777308cbe1ba84d4410f648ff203d6ab072e892cfaf9177cdc4600a0b69e4c9ed653b4f8ce630
7
- data.tar.gz: bd9e0c13b9a74463a187985d02e71a24090a4abb4585d2aa076d3c28585000cf73c48e0f7f20deb2430f94bcfba53dc7eea5b5748606d52f7b09cbc6206be9db
6
+ metadata.gz: c341e6c9aa91ba1e01f7ce6ddf5af758905194066e075362764ca5764fe7fe2ac088f217e00a32e23b59ac3f0e4917ea73a371cd59b34dcbb98e2b1c84e963ad
7
+ data.tar.gz: ba6be78fc63d4ae2cb0a86cfc3e3c0f850c45c9fd380edbc9a325b3077e1a222020afb661d2dd0dbb4601d60c189d9eb688038a669a630440dcb426dffbd0d73
data/bin/itchy CHANGED
@@ -33,9 +33,6 @@ class ItchyRunnable < Thor
33
33
  AVAILABLE_AUTH_METHODS = %w(none basic).freeze
34
34
  ERROR_EXIT_CODE = 1
35
35
 
36
- shared_option_log_to = [:log_to, { type: :string, default: Itchy::Settings.log_to,
37
- aliases: '-l', desc: 'Logging output, file path or stderr/stdout' }]
38
-
39
36
  shared_option_log_level = [:log_level, { enum: AVAILABLE_LOG_LEVELS,
40
37
  default: Itchy::Settings.log_level,
41
38
  aliases: '-b', desc: 'Logging level' }]
@@ -52,7 +49,10 @@ class ItchyRunnable < Thor
52
49
  desc 'archive', 'Handle an incoming vmcatcher event and store it for further processing'
53
50
  method_option :metadata_dir, type: :string, default: Itchy::Settings.metadata_dir,
54
51
  aliases: '-m', desc: 'Path to a metadata directory for storing events, must be writable'
55
- method_option *shared_option_log_to
52
+ method_option :log_to, type: :string, default: Itchy::Settings.log_to.archive_log, aliasses: '-l',
53
+ desc: 'Logging output, file path or stderr/stdout'
54
+ method_option :file_permissions, type: :string, default: Itchy::Settings['permissions']['file'],
55
+ aliases: '-p', desc: 'Sets permissions for all created files'
56
56
  method_option *shared_option_log_level
57
57
  method_option *shared_option_debug
58
58
 
@@ -81,7 +81,8 @@ class ItchyRunnable < Thor
81
81
  aliases: '-e', desc: 'Path to a directory where appliance descriptors will be stored'
82
82
  method_option :file_permissions, type: :string, default: Itchy::Settings['permissions']['file'],
83
83
  aliases: '-p', desc: 'Sets permissions for all created files'
84
- method_option *shared_option_log_to
84
+ method_option :log_to, type: :string, default: Itchy::Settings.log_to.process_log, aliases: '-l',
85
+ desc: 'Logging output, file path or stderr/stdout'
85
86
  method_option *shared_option_log_level
86
87
  method_option *shared_option_debug
87
88
 
data/config/itchy.yml CHANGED
@@ -3,7 +3,9 @@ defaults: &defaults
3
3
  metadata_dir: /var/spool/itchy/metadata
4
4
  output_dir: /var/spool/itchy/output
5
5
  descriptor_dir: /var/spool/itchy/descriptors
6
- log_to: stderr
6
+ log_to:
7
+ archive_log: stderr
8
+ process_log: stderr
7
9
  log_level: error
8
10
  debug: false
9
11
  permissions:
@@ -44,6 +44,7 @@ module Itchy::EventHandlers
44
44
  temp_file.flush
45
45
 
46
46
  ::FileUtils.cp(temp_file.path, permanent_file_path)
47
+ set_file_permissions(permanent_file_path)
47
48
  temp_file.close
48
49
 
49
50
  true
@@ -72,7 +72,7 @@ module Itchy
72
72
  Itchy::VmcatcherEvent.new(::File.read(json))
73
73
  rescue => ex
74
74
  Itchy::Log.error 'Failed to load event!!!'
75
- return ex
75
+ return false
76
76
  end
77
77
 
78
78
  # Deletes event file.
data/lib/itchy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Itchy
2
- VERSION = '0.2.3' unless defined?(::Itchy::VERSION)
2
+ VERSION = '0.2.4' unless defined?(::Itchy::VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lubomir Kosaristan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-05 00:00:00.000000000 Z
12
+ date: 2016-03-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: opennebula