Skip to content

Commit 9fc04b7

Browse files
authored
Merge pull request #47 from bittrance/master
Ruby 3 support and string diffs
2 parents a4be581 + d6d1d83 commit 9fc04b7

18 files changed

+1058
-855
lines changed

.github/workflows/pr.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
ruby-version: [ "3.0.1", "2.6.7" ]
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Ruby ${{ matrix.ruby-version }}
18+
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
19+
with:
20+
ruby-version: ${{ matrix.ruby-version }}
21+
- name: Install dependencies
22+
run: bundle install
23+
- name: Run tests
24+
run: bundle exec rspec

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.5
1+
3.1.0

.travis.yml

-6
This file was deleted.

Gemfile.lock

+51-44
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,82 @@
11
PATH
22
remote: .
33
specs:
4-
cuffsert (0.13.0)
5-
aws-sdk-cloudformation (~> 1.3.0)
6-
aws-sdk-s3 (~> 1.8.0)
4+
cuffsert (0.14.2)
5+
aws-sdk-cloudformation (~> 1.67.0)
6+
aws-sdk-s3 (~> 1.112.0)
77
colorize
88
hashdiff (~> 1.0)
9+
nokogiri
910
ruby-termios
1011
rx
1112

1213
GEM
1314
remote: https://rubygems.org/
1415
specs:
15-
aws-eventstream (1.0.0)
16-
aws-partitions (1.87.0)
17-
aws-sdk-cloudformation (1.3.0)
18-
aws-sdk-core (~> 3)
19-
aws-sigv4 (~> 1.0)
20-
aws-sdk-core (3.21.2)
21-
aws-eventstream (~> 1.0)
22-
aws-partitions (~> 1.0)
23-
aws-sigv4 (~> 1.0)
16+
aws-eventstream (1.2.0)
17+
aws-partitions (1.554.0)
18+
aws-sdk-cloudformation (1.67.0)
19+
aws-sdk-core (~> 3, >= 3.126.0)
20+
aws-sigv4 (~> 1.1)
21+
aws-sdk-core (3.126.0)
22+
aws-eventstream (~> 1, >= 1.0.2)
23+
aws-partitions (~> 1, >= 1.525.0)
24+
aws-sigv4 (~> 1.1)
2425
jmespath (~> 1.0)
25-
aws-sdk-kms (1.5.0)
26-
aws-sdk-core (~> 3)
27-
aws-sigv4 (~> 1.0)
28-
aws-sdk-s3 (1.8.2)
29-
aws-sdk-core (~> 3)
26+
aws-sdk-kms (1.54.0)
27+
aws-sdk-core (~> 3, >= 3.126.0)
28+
aws-sigv4 (~> 1.1)
29+
aws-sdk-s3 (1.112.0)
30+
aws-sdk-core (~> 3, >= 3.126.0)
3031
aws-sdk-kms (~> 1)
31-
aws-sigv4 (~> 1.0)
32-
aws-sigv4 (1.0.2)
33-
byebug (9.0.6)
32+
aws-sigv4 (~> 1.4)
33+
aws-sigv4 (1.4.0)
34+
aws-eventstream (~> 1, >= 1.0.2)
35+
byebug (11.1.3)
3436
colorize (0.8.1)
35-
diff-lcs (1.2.5)
36-
docile (1.1.5)
37-
jmespath (1.3.1)
38-
hashdiff (1.0.0)
39-
json (2.0.2)
40-
rspec (3.5.0)
41-
rspec-core (~> 3.5.0)
42-
rspec-expectations (~> 3.5.0)
43-
rspec-mocks (~> 3.5.0)
44-
rspec-core (3.5.4)
45-
rspec-support (~> 3.5.0)
46-
rspec-expectations (3.5.0)
37+
diff-lcs (1.5.0)
38+
docile (1.4.0)
39+
hashdiff (1.0.1)
40+
jmespath (1.5.0)
41+
mini_portile2 (2.7.1)
42+
nokogiri (1.13.1)
43+
mini_portile2 (~> 2.7.0)
44+
racc (~> 1.4)
45+
racc (1.6.0)
46+
rspec (3.11.0)
47+
rspec-core (~> 3.11.0)
48+
rspec-expectations (~> 3.11.0)
49+
rspec-mocks (~> 3.11.0)
50+
rspec-core (3.11.0)
51+
rspec-support (~> 3.11.0)
52+
rspec-expectations (3.11.0)
4753
diff-lcs (>= 1.2.0, < 2.0)
48-
rspec-support (~> 3.5.0)
49-
rspec-mocks (3.5.0)
54+
rspec-support (~> 3.11.0)
55+
rspec-mocks (3.11.0)
5056
diff-lcs (>= 1.2.0, < 2.0)
51-
rspec-support (~> 3.5.0)
52-
rspec-support (3.5.0)
53-
ruby-termios (1.0.2)
57+
rspec-support (~> 3.11.0)
58+
rspec-support (3.11.0)
59+
ruby-termios (1.1.0)
5460
rx (0.0.3)
5561
rx-rspec (0.4.3)
5662
rx
57-
simplecov (0.12.0)
58-
docile (~> 1.1.0)
59-
json (>= 1.8, < 3)
60-
simplecov-html (~> 0.10.0)
61-
simplecov-html (0.10.0)
63+
simplecov (0.21.2)
64+
docile (~> 1.1)
65+
simplecov-html (~> 0.11)
66+
simplecov_json_formatter (~> 0.1)
67+
simplecov-html (0.12.3)
68+
simplecov_json_formatter (0.1.3)
6269

6370
PLATFORMS
6471
ruby
6572

6673
DEPENDENCIES
67-
bundler (~> 1.12)
74+
bundler (~> 2.3)
6875
byebug
6976
cuffsert!
7077
rspec (~> 3.0)
7178
rx-rspec (~> 0.4.3)
7279
simplecov
7380

7481
BUNDLED WITH
75-
1.13.6
82+
2.3.7

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The primary goal of cuffsert is to provide a quick "up-arrow-enter" loading of a CloudFormation stack with good feedback, removing the need to click through three pesky screens each time. It figures out whether the stack needs to be created or rolled-back and whether it needs to be deleted first.
44

5+
![Create and update stack](cuffsert.gif)
6+
57
## Getting started
68

79
Update a stack from a provided template without changing any parameters on the stack:

cuffsert.gemspec

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ Gem::Specification.new do |spec|
1515

1616
spec.required_ruby_version = '>= 2.0.0'
1717

18-
spec.add_runtime_dependency 'aws-sdk-cloudformation', '~> 1.3.0'
19-
spec.add_runtime_dependency 'aws-sdk-s3', '~> 1.8.0'
18+
spec.add_runtime_dependency 'aws-sdk-cloudformation', '~> 1.67.0'
19+
spec.add_runtime_dependency 'aws-sdk-s3', '~> 1.112.0'
2020
spec.add_runtime_dependency 'colorize'
2121
spec.add_runtime_dependency 'hashdiff', '~> 1.0'
22+
spec.add_runtime_dependency 'nokogiri'
2223
spec.add_runtime_dependency 'ruby-termios'
2324
spec.add_runtime_dependency 'rx'
2425

25-
spec.add_development_dependency 'bundler', '~> 1.12'
26+
spec.add_development_dependency 'bundler', '~> 2.3'
2627
spec.add_development_dependency 'byebug'
2728
spec.add_development_dependency 'rspec', '~> 3.0'
2829
spec.add_development_dependency 'rx-rspec', '~> 0.4.3'

cuffsert.gif

1.05 MB
Loading

examples/imap.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
AWSTemplateFormatVersion: 2010-09-09
2+
Resources:
3+
ImapServer:
4+
Type: AWS::AutoScaling::AutoScalingGroup
5+
Properties:
6+
AutoScalingGroupName: imap-server
7+
LaunchConfigurationName: !Ref ImapConfig
8+
MinSize: 0
9+
MaxSize: 1
10+
VPCZoneIdentifier:
11+
- subnet-f8597791
12+
ImapConfig:
13+
Type: AWS::AutoScaling::LaunchConfiguration
14+
Properties:
15+
ImageId: ami-0c6b1d09930fac512
16+
SecurityGroups:
17+
- !Ref ImapSG
18+
InstanceType: t2.nano
19+
ImapSG:
20+
Type: AWS::EC2::SecurityGroup
21+
Properties:
22+
VpcId: vpc-fc702695
23+
GroupDescription: Global IMAPS access
24+
SecurityGroupIngress:
25+
- CidrIp: 0.0.0.0/0
26+
IpProtocol: tcp
27+
FromPort: 993
28+
ToPort: 993

lib/cuffsert/main.rb

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
require 'cuffsert/messages'
66
require 'cuffsert/metadata'
77
require 'cuffsert/presenters'
8+
require 'cuffsert/rendering'
89
require 'cuffsert/rxcfclient'
910
require 'cuffsert/rxs3client'
1011
require 'rx'

lib/cuffsert/messages.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'rx'
2+
13
module CuffSert
24
class Message
35
attr_reader :message

0 commit comments

Comments
 (0)