Sha256: d798fe02d869870b6ca406677aeb315e60890a44048c333983aa62a3bfa45d28

Contents?: true

Size: 1.82 KB

Versions: 15

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 = gem_installed?(self)
      puts "deploy_context_installed = #{deploy_context_installed}"
      case deploy_context_installed
      when 'true'
        gem_installed?(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

    def ready_for_major_update?
      false
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
deploy-context-2.1.2 lib/deploy-context.rb
deploy-context-2.1.1.1.g9682332.1.g6ec837b lib/deploy-context.rb
deploy-context-2.1.1.1.g9682332 lib/deploy-context.rb
deploy-context-2.1.1 lib/deploy-context.rb
deploy-context-2.1.0.2.g3d63a5a lib/deploy-context.rb
deploy-context-2.1.0.1.gfc552cd lib/deploy-context.rb
deploy-context-2.1.0 lib/deploy-context.rb
deploy-context-2.0.11.1.g2fb12a4.1.g77162b5 lib/deploy-context.rb
deploy-context-2.0.11.1.g2fb12a4 lib/deploy-context.rb
deploy-context-2.0.11 lib/deploy-context.rb
deploy-context-2.0.10.1.g6db0997.1.gafb2bd3 lib/deploy-context.rb
deploy-context-2.0.10.1.g6db0997 lib/deploy-context.rb
deploy-context-2.0.10 lib/deploy-context.rb
deploy-context-2.0.9 lib/deploy-context.rb
deploy-context-2.0.8.1.gdd5846f lib/deploy-context.rb