Sha256: e98ccd55c4e378cc3bd7d56c2acb2c17be16dee9633ef456a1b2e5ebbfedb38a

Contents?: true

Size: 1.82 KB

Versions: 10

Compression:

Stored size: 1.82 KB

Contents

require 'fileutils'
require 'git-version-bump'

require_relative 'deploy-context/deploy'
require_relative 'deploy-context/deploy/git'
require_relative 'deploy-context/deploy/ruby'
require_relative 'deploy-context/deploy/cucumber'

module Context
  class DeployContext < Deploy
    include GitDeployerHelper
    include RubyDeployerHelper
    include CucumberDeployerHelper

    def initialize(deploycontext_folder)
      super('deploy-context', deploycontext_folder)
    end

    def cycle
      ruby_cycle(self)
    end

    def test_context_successful?
      puts "Check if deploy-context is install #{version}"
      deploy_context_installed = `chef exec gem list deploy-context --local -i --version #{version}`.strip
      puts "deploy_context_installed = #{deploy_context_installed}"
      case deploy_context_installed
      when 'true'
        cucumber_test(self)
      when 'false'
        puts "Test context has failed"
        false
      else
        puts "Test context is unknown with #{deploy_context_installed}"
        false
      end
    end

    def build
      ruby_build(self)
      check_folder get_context_folder(self, 'contexts')
    end

    def commit
      git_commit(self)
    end

    def release
      ruby_release(self)
      git_release(self)
    end

    def install
      ruby_install(self)
    end

    def clean
      clean_folder(self, 'contexts')
      ruby_clean(self)
    end

    def patch_bump
      git_bump(self, 'patch')
    end

    def minor_bump
      git_bump(self, 'minor')
    end

    def major_bump
      git_bump(self, 'major')
    end

    def wait_until_release_available
      wait_until_release_available unless is_present_publicaly?
    end

    def is_present_publicaly?
      ruby_check_if_available_public(self)
    end

    def new_update_available?
      git_update_available?(self)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
deploy-context-0.11.57 lib/deploy-context.rb
deploy-context-0.11.56 lib/deploy-context.rb
deploy-context-0.11.55.1.g0ddaa33 lib/deploy-context.rb
deploy-context-0.11.55 lib/deploy-context.rb
deploy-context-0.11.54 lib/deploy-context.rb
deploy-context-0.11.52 lib/deploy-context.rb
deploy-context-0.11.51 lib/deploy-context.rb
deploy-context-0.11.50 lib/deploy-context.rb
deploy-context-0.11.48 lib/deploy-context.rb
deploy-context-0.11.47 lib/deploy-context.rb