kamalx 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/spec/examples.txt +7 -0
- data/spec/lib/kamalx_spec.rb +35 -0
- data/spec/spec_helper.rb +23 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eae17ac0233dd904ec5431c0b02ad96ad1e95344c10f2a9fdadb69334bf75c55
|
4
|
+
data.tar.gz: ecc0e91fef2749e224305f4a1f821e2ff921c3536c790d5414c90441a6da335a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 981e39e52fc40fec8dfbbdf13bbb5f323df595d46bc6bfb5368d47c022fc829d97ebd1bf3b41548ae4e39331eeca03fdc31a8aa28bdb3b38f32e011e5bf2097f
|
7
|
+
data.tar.gz: 172cdd2c5d36907cdabb231874ff3598382dd3712b651e2702edaf11a66be7af14c45d2a102a7521fe7369bb0be4cf00cf8b3df408478c76eb59f52f8f65187a
|
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
|
data/spec/spec_helper.rb
ADDED
@@ -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.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Carlson
|
@@ -52,8 +52,8 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: kamalx
|
56
|
-
and understand
|
55
|
+
description: kamalx wraps the kamal deploy tool to make it more user-friendly and
|
56
|
+
easier to watch and understand
|
57
57
|
email:
|
58
58
|
- lucas@carlson.net
|
59
59
|
executables:
|
@@ -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,5 @@ requirements: []
|
|
88
91
|
rubygems_version: 3.5.17
|
89
92
|
signing_key:
|
90
93
|
specification_version: 4
|
91
|
-
summary: A
|
94
|
+
summary: A wrapper for the Kamal Docker deployment tool from Basecamp to make it prettier
|
92
95
|
test_files: []
|