lono 5.3.4 → 6.0.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.
- checksums.yaml +4 -4
 - data/.cody/demo.rb +21 -21
 - data/CHANGELOG.md +14 -0
 - data/lib/lono.rb +1 -1
 - data/lib/lono/blueprint/meta.rb +38 -0
 - data/lib/lono/cfn/base.rb +19 -12
 - data/lib/lono/cfn/delete.rb +2 -1
 - data/lib/lono/cfn/preview/changeset.rb +14 -1
 - data/lib/lono/cfn/rollback.rb +1 -1
 - data/lib/lono/cfn/status.rb +1 -1
 - data/lib/lono/help/blueprint.md +35 -24
 - data/lib/lono/help/param.md +4 -1
 - data/lib/lono/help/seed.md +13 -6
 - data/lib/lono/help/summary.md +22 -8
 - data/lib/lono/inspector/summary.rb +4 -3
 - data/lib/lono/output_template.rb +2 -2
 - data/lib/lono/s3/bucket.rb +1 -1
 - data/lib/lono/seed/base.rb +1 -0
 - data/lib/lono/seed/service_role.rb +11 -0
 - data/lib/lono/template/dsl/builder.rb +3 -7
 - data/lib/lono/template/dsl/builder/base.rb +24 -3
 - data/lib/lono/template/dsl/builder/fn.rb +15 -11
 - data/lib/lono/template/dsl/builder/{helper.rb → helpers.rb} +5 -4
 - data/lib/lono/template/dsl/builder/helpers/param_helper.rb +33 -0
 - data/lib/lono/template/dsl/builder/output.rb +4 -4
 - data/lib/lono/template/dsl/builder/parameter.rb +2 -2
 - data/lib/lono/template/dsl/builder/resource.rb +4 -3
 - data/lib/lono/template/dsl/builder/resource/property_mover.rb +4 -0
 - data/lib/lono/template/dsl/builder/syntax.rb +6 -7
 - data/lib/lono/version.rb +1 -1
 - data/lib/templates/blueprint/%blueprint_name%.gemspec.tt +1 -1
 - data/lib/templates/blueprint/.meta/config.yml.tt +2 -1
 - data/lib/templates/blueprint/README.md +1 -1
 - data/lib/templates/blueprint_types/dsl/app/templates/%blueprint_name%.rb +22 -22
 - data/lib/templates/skeleton/README.md +1 -1
 - data/lono.gemspec +1 -1
 - data/vendor/cfn-status/CHANGELOG.md +4 -0
 - data/vendor/cfn-status/README.md +4 -2
 - data/vendor/cfn-status/bin/console +1 -1
 - data/vendor/cfn-status/cfn-status.gemspec +2 -2
 - data/vendor/cfn-status/lib/cfn-status.rb +1 -1
 - data/vendor/cfn-status/lib/cfn_status.rb +245 -0
 - data/vendor/cfn-status/lib/{cfn → cfn_status}/aws_service.rb +1 -1
 - data/vendor/cfn-status/lib/cfn_status/version.rb +3 -0
 - data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-1.json +1103 -0
 - data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-2.json +1104 -0
 - data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-3.json +1103 -0
 - data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-1.json +1103 -0
 - data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-2.json +1104 -0
 - data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-3.json +1103 -0
 - data/vendor/cfn-status/spec/lib/cfn_status_spec.rb +153 -0
 - data/vendor/cfn-status/spec/spec_helper.rb +1 -1
 - metadata +17 -8
 - data/vendor/cfn-status/lib/cfn/status.rb +0 -219
 - data/vendor/cfn-status/lib/cfn/status/version.rb +0 -5
 - data/vendor/cfn-status/spec/cfn/status_spec.rb +0 -81
 
| 
         @@ -1,81 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            RSpec.describe Cfn::Status do
         
     | 
| 
       2 
     | 
    
         
            -
              it "has a version number" do
         
     | 
| 
       3 
     | 
    
         
            -
                expect(Cfn::Status::VERSION).not_to be nil
         
     | 
| 
       4 
     | 
    
         
            -
              end
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
              let(:status) do
         
     | 
| 
       7 
     | 
    
         
            -
                status = Cfn::Status.new("test-stack")
         
     | 
| 
       8 
     | 
    
         
            -
                allow(status).to receive(:cfn).and_return(cfn)
         
     | 
| 
       9 
     | 
    
         
            -
                status
         
     | 
| 
       10 
     | 
    
         
            -
              end
         
     | 
| 
       11 
     | 
    
         
            -
              let(:cfn) do
         
     | 
| 
       12 
     | 
    
         
            -
                service = double("service").as_null_object
         
     | 
| 
       13 
     | 
    
         
            -
                allow(service).to receive(:describe_stacks).and_return(stack_status)
         
     | 
| 
       14 
     | 
    
         
            -
                allow(service).to receive(:describe_stack_events).and_return(stack_events)
         
     | 
| 
       15 
     | 
    
         
            -
                service
         
     | 
| 
       16 
     | 
    
         
            -
              end
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
              context "in progress" do
         
     | 
| 
       19 
     | 
    
         
            -
                let(:stack_status) { "UPDATE_IN_PROGRESS" }
         
     | 
| 
       20 
     | 
    
         
            -
                let(:stack_events) { JSON.load(IO.read("spec/fixtures/cfn/stack-events-in-progress.json")) }
         
     | 
| 
       21 
     | 
    
         
            -
                it "lists events since user initiated event" do
         
     | 
| 
       22 
     | 
    
         
            -
                  status.refresh_events
         
     | 
| 
       23 
     | 
    
         
            -
                  i = status.find_index(:start)
         
     | 
| 
       24 
     | 
    
         
            -
                  expect(i).to eq 15
         
     | 
| 
       25 
     | 
    
         
            -
                  # uncomment to view and debug
         
     | 
| 
       26 
     | 
    
         
            -
                  # status.show_events
         
     | 
| 
       27 
     | 
    
         
            -
                  # puts "****"
         
     | 
| 
       28 
     | 
    
         
            -
                  # status.show_events # show not show anything
         
     | 
| 
       29 
     | 
    
         
            -
                end
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                it "lists events since last shown event" do
         
     | 
| 
       32 
     | 
    
         
            -
                  # first display
         
     | 
| 
       33 
     | 
    
         
            -
                  status.refresh_events
         
     | 
| 
       34 
     | 
    
         
            -
                  i = status.find_index(:start)
         
     | 
| 
       35 
     | 
    
         
            -
                  expect(i).to eq 15
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
                  # move the last event back in time 4 events, so should print 3 events
         
     | 
| 
       38 
     | 
    
         
            -
                  status.instance_variable_set(:@last_shown_event_id, "TargetGroup-ec634c43-b887-4bde-a525-7c69782865a6")
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                  captured_events = []
         
     | 
| 
       41 
     | 
    
         
            -
                  allow(status).to receive(:print_event) do |e|
         
     | 
| 
       42 
     | 
    
         
            -
                    captured_events << "#{e["resource_type"]} #{e["resource_status"]}"
         
     | 
| 
       43 
     | 
    
         
            -
                  end
         
     | 
| 
       44 
     | 
    
         
            -
                  status.show_events
         
     | 
| 
       45 
     | 
    
         
            -
                  expect(captured_events).to eq([
         
     | 
| 
       46 
     | 
    
         
            -
                    "AWS::ElasticLoadBalancingV2::LoadBalancer DELETE_IN_PROGRESS",
         
     | 
| 
       47 
     | 
    
         
            -
                    "AWS::ElasticLoadBalancingV2::LoadBalancer DELETE_COMPLETE",
         
     | 
| 
       48 
     | 
    
         
            -
                    "AWS::EC2::SecurityGroup DELETE_IN_PROGRESS",
         
     | 
| 
       49 
     | 
    
         
            -
                  ])
         
     | 
| 
       50 
     | 
    
         
            -
                end
         
     | 
| 
       51 
     | 
    
         
            -
              end
         
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
              context "complete" do
         
     | 
| 
       54 
     | 
    
         
            -
                let(:stack_status) { "UPDATE_COMPLETE" }
         
     | 
| 
       55 
     | 
    
         
            -
                let(:stack_events) { JSON.load(IO.read("spec/fixtures/cfn/stack-events-complete.json")) }
         
     | 
| 
       56 
     | 
    
         
            -
                it "lists events all the way to completion" do
         
     | 
| 
       57 
     | 
    
         
            -
                  status.refresh_events
         
     | 
| 
       58 
     | 
    
         
            -
                  i = status.find_index(:start)
         
     | 
| 
       59 
     | 
    
         
            -
                  expect(i).to eq 17
         
     | 
| 
       60 
     | 
    
         
            -
                  # uncomment to view and debug
         
     | 
| 
       61 
     | 
    
         
            -
                  # status.show_events
         
     | 
| 
       62 
     | 
    
         
            -
                end
         
     | 
| 
       63 
     | 
    
         
            -
              end
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
              context "update_rollback" do
         
     | 
| 
       66 
     | 
    
         
            -
                let(:stack_status) { "UPDATE_ROLLBACK_COMPLETE" }
         
     | 
| 
       67 
     | 
    
         
            -
                let(:stack_events) { JSON.load(IO.read("spec/fixtures/cfn/stack-events-update-rollback-complete.json")) }
         
     | 
| 
       68 
     | 
    
         
            -
                it "lists events all the way to update rollback complete" do
         
     | 
| 
       69 
     | 
    
         
            -
                  status.refresh_events
         
     | 
| 
       70 
     | 
    
         
            -
                  expect(status.success?).to be false
         
     | 
| 
       71 
     | 
    
         
            -
                  expect(status.update_rollback?).to be true
         
     | 
| 
       72 
     | 
    
         
            -
                  expect(status.rollback_error_message).to include("STATIC_NAME")
         
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
                  # i = status.find_index(:start)
         
     | 
| 
       75 
     | 
    
         
            -
                  # expect(i).to eq 17
         
     | 
| 
       76 
     | 
    
         
            -
                  # uncomment to view and debug
         
     | 
| 
       77 
     | 
    
         
            -
                  # status.show_events
         
     | 
| 
       78 
     | 
    
         
            -
                end
         
     | 
| 
       79 
     | 
    
         
            -
              end
         
     | 
| 
       80 
     | 
    
         
            -
            end
         
     | 
| 
       81 
     | 
    
         
            -
             
     |