Skip to content

Commit

Permalink
Merge pull request #47 from bittrance/master
Browse files Browse the repository at this point in the history
Ruby 3 support and string diffs
  • Loading branch information
bittrance authored Apr 15, 2024
2 parents a4be581 + d6d1d83 commit 9fc04b7
Show file tree
Hide file tree
Showing 18 changed files with 1,058 additions and 855 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [ "3.0.1", "2.6.7" ]
steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rspec
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.5
3.1.0
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

95 changes: 51 additions & 44 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,75 +1,82 @@
PATH
remote: .
specs:
cuffsert (0.13.0)
aws-sdk-cloudformation (~> 1.3.0)
aws-sdk-s3 (~> 1.8.0)
cuffsert (0.14.2)
aws-sdk-cloudformation (~> 1.67.0)
aws-sdk-s3 (~> 1.112.0)
colorize
hashdiff (~> 1.0)
nokogiri
ruby-termios
rx

GEM
remote: https://rubygems.org/
specs:
aws-eventstream (1.0.0)
aws-partitions (1.87.0)
aws-sdk-cloudformation (1.3.0)
aws-sdk-core (~> 3)
aws-sigv4 (~> 1.0)
aws-sdk-core (3.21.2)
aws-eventstream (~> 1.0)
aws-partitions (~> 1.0)
aws-sigv4 (~> 1.0)
aws-eventstream (1.2.0)
aws-partitions (1.554.0)
aws-sdk-cloudformation (1.67.0)
aws-sdk-core (~> 3, >= 3.126.0)
aws-sigv4 (~> 1.1)
aws-sdk-core (3.126.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.5.0)
aws-sdk-core (~> 3)
aws-sigv4 (~> 1.0)
aws-sdk-s3 (1.8.2)
aws-sdk-core (~> 3)
aws-sdk-kms (1.54.0)
aws-sdk-core (~> 3, >= 3.126.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.112.0)
aws-sdk-core (~> 3, >= 3.126.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.0)
aws-sigv4 (1.0.2)
byebug (9.0.6)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.4.0)
aws-eventstream (~> 1, >= 1.0.2)
byebug (11.1.3)
colorize (0.8.1)
diff-lcs (1.2.5)
docile (1.1.5)
jmespath (1.3.1)
hashdiff (1.0.0)
json (2.0.2)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (1.5.0)
docile (1.4.0)
hashdiff (1.0.1)
jmespath (1.5.0)
mini_portile2 (2.7.1)
nokogiri (1.13.1)
mini_portile2 (~> 2.7.0)
racc (~> 1.4)
racc (1.6.0)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
ruby-termios (1.0.2)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
ruby-termios (1.1.0)
rx (0.0.3)
rx-rspec (0.4.3)
rx
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.12)
bundler (~> 2.3)
byebug
cuffsert!
rspec (~> 3.0)
rx-rspec (~> 0.4.3)
simplecov

BUNDLED WITH
1.13.6
2.3.7
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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.

![Create and update stack](cuffsert.gif)

## Getting started

Update a stack from a provided template without changing any parameters on the stack:
Expand Down
7 changes: 4 additions & 3 deletions cuffsert.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 2.0.0'

spec.add_runtime_dependency 'aws-sdk-cloudformation', '~> 1.3.0'
spec.add_runtime_dependency 'aws-sdk-s3', '~> 1.8.0'
spec.add_runtime_dependency 'aws-sdk-cloudformation', '~> 1.67.0'
spec.add_runtime_dependency 'aws-sdk-s3', '~> 1.112.0'
spec.add_runtime_dependency 'colorize'
spec.add_runtime_dependency 'hashdiff', '~> 1.0'
spec.add_runtime_dependency 'nokogiri'
spec.add_runtime_dependency 'ruby-termios'
spec.add_runtime_dependency 'rx'

spec.add_development_dependency 'bundler', '~> 1.12'
spec.add_development_dependency 'bundler', '~> 2.3'
spec.add_development_dependency 'byebug'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rx-rspec', '~> 0.4.3'
Expand Down
Binary file added cuffsert.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions examples/imap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
AWSTemplateFormatVersion: 2010-09-09
Resources:
ImapServer:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
AutoScalingGroupName: imap-server
LaunchConfigurationName: !Ref ImapConfig
MinSize: 0
MaxSize: 1
VPCZoneIdentifier:
- subnet-f8597791
ImapConfig:
Type: AWS::AutoScaling::LaunchConfiguration
Properties:
ImageId: ami-0c6b1d09930fac512
SecurityGroups:
- !Ref ImapSG
InstanceType: t2.nano
ImapSG:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId: vpc-fc702695
GroupDescription: Global IMAPS access
SecurityGroupIngress:
- CidrIp: 0.0.0.0/0
IpProtocol: tcp
FromPort: 993
ToPort: 993
1 change: 1 addition & 0 deletions lib/cuffsert/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require 'cuffsert/messages'
require 'cuffsert/metadata'
require 'cuffsert/presenters'
require 'cuffsert/rendering'
require 'cuffsert/rxcfclient'
require 'cuffsert/rxs3client'
require 'rx'
Expand Down
2 changes: 2 additions & 0 deletions lib/cuffsert/messages.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'rx'

module CuffSert
class Message
attr_reader :message
Expand Down
Loading

0 comments on commit 9fc04b7

Please sign in to comment.