Sha256: ab464a043ca142c02cbc7b91652507d82c84f0df7a522f4ee40569324f42cc82

Contents?: true

Size: 1.76 KB

Versions: 9

Compression:

Stored size: 1.76 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 self.deployer
      @deployer = Context::DeployContext.new(Dir.pwd) if @deployer.nil?
      @deployer
    end

    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}"
      if gem_installed?(self)
        puts "Test context was successfully install on version #{version}"
        true
      else
        abort "Test context has failed to install #{version}"
      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_publicly?
    end

    def is_present_publicly?
      ruby_check_if_available_public(self)
    end

    def new_update_available?
      git_update_available?(self)
    end

    def ready_for_major_update?
      false
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
deploy-context-2.1.23 lib/deploy-context.rb
deploy-context-2.1.22.1.g7cd8ccb lib/deploy-context.rb
deploy-context-2.1.22 lib/deploy-context.rb
deploy-context-2.1.21.1.g665da28 lib/deploy-context.rb
deploy-context-2.1.21 lib/deploy-context.rb
deploy-context-2.1.20.1.gd671d80 lib/deploy-context.rb
deploy-context-2.1.20 lib/deploy-context.rb
deploy-context-2.1.19.1.g26a2b55.1.g5ba21a1.1.g32592ad lib/deploy-context.rb
deploy-context-2.1.19.1.g26a2b55.1.g5ba21a1 lib/deploy-context.rb