perus 1.0.2 → 1.0.7

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
- SHA1:
3
- metadata.gz: 4d1f5ab6c78638c560680e41320b47788c7edd15
4
- data.tar.gz: 6dae1beb40ed5328a140cce153cebf87193a3aae
2
+ SHA256:
3
+ metadata.gz: df4ce5229a3b9fd5cbc92f3a9105347d6714c92dc55ddb0f9105cecf77023767
4
+ data.tar.gz: 8ad4ddd70b9f80542df426b80adf7677ecfe1c7f3256908101bed18d7f3fc0f2
5
5
  SHA512:
6
- metadata.gz: 034124412a729dc1c06c7f4da61548ec7060deb5a154939b8e9e1b00d220233e1fd0f94c00dda23f614b30523c9d8346bb3a0425a98da219e27c05509f78a13b
7
- data.tar.gz: 638f34d47a0fc40f2297ef7d898820584f616b25f35cf693485fac164a5f066076b7b251201c4ed4f63f239a290e6b8d615c370ea2fe5f29e1fad459d988d9c5
6
+ metadata.gz: f1ede48efa2ec9903ca2ae2a431d32061c5baec5b8c313895ab17ff0c42b11c2842e86b0c246d7ae86d41d3276049ab95ed6fe36e92bd1a6c1617d633f9caf4f
7
+ data.tar.gz: 498318d3b3f91988175328c563121e60d49d13108ec7c169cedfd4a50186f62d6e8bcf63a47bbcf904d064b8537b88a2e6a4092e679538316585559b65ffd954
@@ -8,7 +8,7 @@ module Perus
8
8
 
9
9
  def load(path, defaults)
10
10
  if File.exists?(path)
11
- user_options = IniParse.parse(IO.read(path)).to_h
11
+ user_options = IniParse.parse(IO.read(path))
12
12
  else
13
13
  user_options = {}
14
14
  end
@@ -26,7 +26,7 @@ module Perus::Pinger
26
26
 
27
27
  if restricted
28
28
  allowed = Pinger.options[@command.name.demodulize][@name.to_s]
29
- raise "the value passed to #{@name} is not allowed" unless allowed.include?(value)
29
+ raise "the value, #{value}, passed to #{@name} is not allowed" unless allowed.include?(value)
30
30
  end
31
31
 
32
32
  results[name] = value
@@ -5,7 +5,7 @@ module Perus::Pinger
5
5
  description 'Deletes a file or folder. If "path" is a folder, all files
6
6
  and folders within the folder are deleted as well. Valid
7
7
  values for "path" are contained in the pinger config file.'
8
- option :path, restricted: true
8
+ option :path, restricted: false
9
9
 
10
10
  def run
11
11
  FileUtils.rm_rf([File.expand_path(options.path)], secure: true)
@@ -2,7 +2,7 @@ module Perus::Pinger
2
2
  class RunInstalledCommand < Command
3
3
  description 'Run the command specified with "path". Valid values for
4
4
  "path" are contained in the pinger config file.'
5
- option :path, restricted: true
5
+ option :path, restricted: false
6
6
 
7
7
  def run
8
8
  shell(options.path)
@@ -2,7 +2,7 @@ module Perus::Pinger
2
2
  class UpstartStart < Command
3
3
  description 'Start the upstart job specified with "job". Valid values
4
4
  for "job" are contained in the pinger config file.'
5
- option :job, restricted: true
5
+ option :job, restricted: false
6
6
 
7
7
  def run
8
8
  result = shell("sudo start #{options.job}")
@@ -2,7 +2,7 @@ module Perus::Pinger
2
2
  class UpstartStop < Command
3
3
  description 'Stop the upstart job specified with "job". Valid values
4
4
  for "job" are contained in the pinger config file.'
5
- option :job, restricted: true
5
+ option :job, restricted: false
6
6
 
7
7
  def run
8
8
  result = shell("sudo stop #{options.job}")
@@ -3,7 +3,7 @@ module Perus::Pinger
3
3
  description 'Reports "yes" if "process_path" is running, "no"
4
4
  otherwise. Valid values for "process_path" are contained
5
5
  in the pinger config file.'
6
- option :process_path, restricted: true
6
+ option :process_path, restricted: false
7
7
  metric!
8
8
 
9
9
  def run
@@ -2,7 +2,7 @@ module Perus::Pinger
2
2
  class Temp < Command
3
3
  description 'Measures the temperature of "device" on the client. By
4
4
  default, this will be a CPU.'
5
- option :device, default: 'Physical id 0'
5
+ option :device, default: 'Package id 0'
6
6
  metric!
7
7
 
8
8
  def run
@@ -1,8 +1,16 @@
1
1
  Sequel.migration do
2
2
  up do
3
- execute("ALTER TABLE values CHANGE timestamp timestamp BIGINT")
4
- execute("ALTER TABLE errors CHANGE timestamp timestamp BIGINT")
5
- execute("ALTER TABLE actions CHANGE timestamp timestamp BIGINT")
6
- execute("ALTER TABLE active_alerts CHANGE timestamp timestamp BIGINT")
3
+ execute("ALTER TABLE values ALTER COLUMN timestamp TYPE bigint")
4
+ execute("ALTER TABLE errors ALTER COLUMN timestamp TYPE bigint")
5
+ execute("ALTER TABLE actions ALTER COLUMN timestamp TYPE bigint")
6
+ execute("ALTER TABLE active_alerts ALTER COLUMN timestamp TYPE bigint")
7
+
8
+ execute("ALTER TABLE values ALTER COLUMN id TYPE bigint")
9
+ execute("ALTER TABLE metrics ALTER COLUMN id TYPE bigint")
10
+ execute("ALTER TABLE alerts ALTER COLUMN id TYPE bigint")
11
+ execute("ALTER TABLE active_alerts ALTER COLUMN id TYPE bigint")
12
+
13
+ # If a reset needs to be made due to ID limit
14
+ # "ALTER SEQUENCE values_id_seq RESTART WITH 1;"
7
15
  end
8
16
  end
@@ -1,3 +1,3 @@
1
1
  module Perus
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.7"
3
3
  end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_dependency 'concurrent-ruby', '~> 0.8'
26
26
  spec.add_dependency 'faye-websocket', '~> 0.10'
27
27
  spec.add_dependency 'websocket-driver', '>= 0.6.4'
28
- spec.add_dependency 'rest-client', '~> 1.8'
28
+ spec.add_dependency 'rest-client', '~> 2.1.0'
29
29
  spec.add_dependency 'sinatra', '~> 1.4'
30
30
  spec.add_dependency 'sinatra-contrib', '~> 1.4'
31
31
  spec.add_dependency 'sequel', '~> 4.23'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Cannings
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-10 00:00:00.000000000 Z
11
+ date: 2020-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '1.8'
103
+ version: 2.1.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '1.8'
110
+ version: 2.1.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: sinatra
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -192,7 +192,7 @@ dependencies:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0.10'
195
- description:
195
+ description:
196
196
  email:
197
197
  - me@willcannings.com
198
198
  executables:
@@ -333,7 +333,7 @@ homepage: https://github.com/cotag/perus
333
333
  licenses:
334
334
  - MIT
335
335
  metadata: {}
336
- post_install_message:
336
+ post_install_message:
337
337
  rdoc_options: []
338
338
  require_paths:
339
339
  - lib
@@ -348,9 +348,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
348
348
  - !ruby/object:Gem::Version
349
349
  version: '0'
350
350
  requirements: []
351
- rubyforge_project:
352
- rubygems_version: 2.6.14
353
- signing_key:
351
+ rubyforge_project:
352
+ rubygems_version: 2.7.7
353
+ signing_key:
354
354
  specification_version: 4
355
355
  summary: Simple system overview server
356
356
  test_files: []