herd-rb 0.4.0 → 0.5.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -1
  3. data/lib/herd/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad0f13503109d91f099f4b40a1c208bafd460fd6efbcfe8d15cb92c3d0bad66b
4
- data.tar.gz: 2a793b3ff5246eabb9ea55cd67b507786b1226afc40ace46208737176f0bd4df
3
+ metadata.gz: ded7f78ffd316333cc6e7177d7ec84ad9ac91ec6cd9b10a9b3e55c7851fa6e22
4
+ data.tar.gz: fb2aed4ff5ae882238b6a38905d0685af26a03d11149ae3e1cfe2d4846287e08
5
5
  SHA512:
6
- metadata.gz: 2a2b263aec47c102e8d60069352b46814032a90b546928bb5a7cb4ed5ee2cae93cfc05e2b153e71a0366249c4e59a8a84903a5f3e6c7efd34de1a2d7771023b0
7
- data.tar.gz: 02e6e5e6bd999632457f7521ae443fa55847d8ef9d8a563cc01b5fcf5a9a3f033064e06b869b36962170ba134006decee2e104f73e9dbaeae863d35715b4d2e7
6
+ metadata.gz: ccaa31336a819b2e845f0a713696303900a049f764d5eb7b1233e554f15fcf497a2d74109a2bf293e3d309a82bc711ad07cd9d38acfac18811f32e9c29869250
7
+ data.tar.gz: 1088e0d0613804db1ef7a1c2f098bdc63bc01aadf391ab4e712019f65461f4fc8d10ba65d84fd556f6065816c41213e7b5b6aed54b1db29028a2aa1555521d87
data/README.md CHANGED
@@ -11,7 +11,7 @@ Fast host configuration tool.
11
11
  * [x] Copy dirs
12
12
  * [ ] Compare with Rsync
13
13
  * [x] Crontab
14
- * [ ] Log all commands for all hosts
14
+ * [x] Log all commands for all hosts
15
15
  * [ ] Add user to group
16
16
 
17
17
  ## Installation
@@ -144,6 +144,19 @@ end
144
144
  crontab("* * * * * /some-script.sh")
145
145
  ```
146
146
 
147
+ ### Logs
148
+ Herd logs all commands, outputs and errors into the `log/<host>_<port>_<user>/<timestamp>.json` files:
149
+
150
+ ```json
151
+ {
152
+ {"vars":{"alias":"alpha001","port":22,"host":"tesla.com","user":"elon"}},
153
+ {"timestamp":"2025-11-09 18:10:21.134","command":"test -a /home/elon/.herd-version; echo $?"},
154
+ {"timestamp":"2025-11-09 18:10:21.395","command":"test -a /home/elon/.herd-version; echo $?","output":"4\r\n","time":0.261358},
155
+ {"timestamp":"2025-11-09 18:10:22.013","command":"cat /home/home/.herd-version"},
156
+ {"timestamp":"2025-11-09 18:10:22.314","command":"cat /home/home/.herd-version","output":"4\r\n","time":0.301}
157
+ }
158
+ ```
159
+
147
160
  ## Development
148
161
 
149
162
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/lib/herd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Herd
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herd-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Kotlyarov