kamalx 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: 3bcaac29127c31cdde9712eb8822f7d342ee1a9bc1c0a9307637cfe528399b1a
4
- data.tar.gz: efa6caefd5abe432d67bd249e77676516cdb250ea7730d908322a4a3853073cc
3
+ metadata.gz: 4ad2a42ab6abb6d1c78eed5949b7105974bf212d77f53d2bee54cc329369453c
4
+ data.tar.gz: f9f96a4b2698c805345779a79aa692c570a66e595f0fcc4590f541f2a25be3bb
5
5
  SHA512:
6
- metadata.gz: 898d3ff7ac1016e1ccbcc6dd0c2559c9d4e9e6166f95b3dc921667aa2adbac1e5b4014b1e09f24882473b404fcf3873df7cfc7c492220223bca04e049399dbc3
7
- data.tar.gz: c379ecbb7db8a11d65d4fa22c4c78e61035721ae53d0f32040d1d3553d2808d71a7e30c0ec5369fb9875fe93328cfe69cb49738a618cf7573c29ec00c20a780a
6
+ metadata.gz: d65b3ea2c2e5a0fe7eb7781b8a6505e47fa0a95ba868f9d356dbef822d410c7b9be9ba86f045795f9d2f2c094ff02cabd38f964aa66b79da8b056c1872afad67
7
+ data.tar.gz: 273c865ab781ccb63136a1c7de6928da562a56b5cfb10a471924185ff89561434ff9a12126ab8f69f19f0717d5996210d09cd6c01ed262b40b5bc588265885b8
data/spec/examples.txt ADDED
@@ -0,0 +1,7 @@
1
+ example_id | status | run_time |
2
+ -------------------------------- | ------ | --------------- |
3
+ ./spec/lib/kamalx_spec.rb[1:1:1] | failed | 0.00693 seconds |
4
+ ./spec/lib/kamalx_spec.rb[1:2:1] | failed | 0.00788 seconds |
5
+ ./spec/lib/kamalx_spec.rb[1:2:2] | passed | 0.00018 seconds |
6
+ ./spec/lib/kamalx_spec.rb[1:2:3] | passed | 0.00024 seconds |
7
+ ./spec/lib/kamalx_spec.rb[1:2:4] | passed | 0.00026 seconds |
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+ require 'kamalx'
3
+
4
+ RSpec.describe KamalX do
5
+ describe '.run' do
6
+ it 'calls EventMachine.run' do
7
+ expect(EventMachine).to receive(:run).once
8
+ KamalX.run([])
9
+ end
10
+ end
11
+
12
+ describe 'LogParser' do
13
+ let(:parser) { LogParser.new }
14
+
15
+ it 'parses stage information' do
16
+ line = 'INFO [foo] Running something on bar'
17
+ expect(parser.parse(line)).to eq([:green, [:bold, 'Stage:'], ' foo'])
18
+ end
19
+
20
+ it 'parses command information' do
21
+ line = 'INFO [foo] Finished in 2.3 seconds with exit status 0'
22
+ expect(parser.parse(line)).to eq([:yellow, [:bold, 'Command[foo@localhost]'], ' Returned Status: ', :green, '0'])
23
+ end
24
+
25
+ it 'parses debug information' do
26
+ line = 'DEBUG [foo] This is a debug message'
27
+ expect(parser.parse(line)).to eq([:yellow, [:bold, 'Command[foo@localhost]'], ' This is a debug message'])
28
+ end
29
+
30
+ it 'parses info information' do
31
+ line = 'INFO This is an info message'
32
+ expect(parser.parse(line)).to eq([:blue, [:bold, 'Info:'], ' This is an info message'])
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,23 @@
1
+ require 'kamalx'
2
+
3
+ RSpec.configure do |config|
4
+ config.expect_with :rspec do |expectations|
5
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
6
+ end
7
+
8
+ config.mock_with :rspec do |mocks|
9
+ mocks.verify_partial_doubles = true
10
+ end
11
+
12
+ config.shared_context_metadata_behavior = :apply_to_host_groups
13
+ config.filter_run_when_matching :focus
14
+ config.example_status_persistence_file_path = 'spec/examples.txt'
15
+ config.disable_monkey_patching!
16
+ config.warnings = true
17
+
18
+ config.default_formatter = 'doc' if config.files_to_run.one?
19
+
20
+ config.profile_examples = 10
21
+ config.order = :random
22
+ Kernel.srand config.seed
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamalx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Carlson
@@ -66,6 +66,9 @@ files:
66
66
  - README.md
67
67
  - bin/kamalx
68
68
  - lib/kamalx.rb
69
+ - spec/examples.txt
70
+ - spec/lib/kamalx_spec.rb
71
+ - spec/spec_helper.rb
69
72
  homepage: https://github.com/cardmagic/kamalx
70
73
  licenses:
71
74
  - MIT
@@ -88,5 +91,6 @@ requirements: []
88
91
  rubygems_version: 3.5.17
89
92
  signing_key:
90
93
  specification_version: 4
91
- summary: A command-line tool for parsing logs.
94
+ summary: A wrapper for the kamal Docker deployment tool from Basecamp/37signals to
95
+ make it easier to watch and understand the deployment process.
92
96
  test_files: []