Sha256: daeb76144ed6d861d10cfd5358c9b2139ca996d965dbe5018e1475e5e74d73d9

Contents?: true

Size: 827 Bytes

Versions: 29

Compression:

Stored size: 827 Bytes

Contents

module PowerStencil
  module Project

    module Versioning

      def check_project_version
        return if project_version_valid?
        raise PowerStencil::Error, msg
      end

      private

      def project_version_valid?
        unless config[:min_power_stencil_version].nil?
          framework_version = PowerStencil::Utils::SemanticVersion.new PowerStencil::VERSION
          is_valid = framework_version >= config[:min_power_stencil_version]
          if is_valid
            logger.debug "PowerStencil version (v: #{framework_version}) is advanced enough to handle project required version (v: #{config[:min_power_stencil_version]})"
          end
          return is_valid
        end
        logger.debug 'Project does not require any specific PowerStencil version'
        true
      end

    end

  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
power_stencil-0.4.18 lib/power_stencil/project/versioning.rb
power_stencil-0.4.17 lib/power_stencil/project/versioning.rb
power_stencil-0.4.16 lib/power_stencil/project/versioning.rb
power_stencil-0.4.15 lib/power_stencil/project/versioning.rb
power_stencil-0.4.14 lib/power_stencil/project/versioning.rb
power_stencil-0.4.13 lib/power_stencil/project/versioning.rb
power_stencil-0.4.12 lib/power_stencil/project/versioning.rb
power_stencil-0.4.11 lib/power_stencil/project/versioning.rb
power_stencil-0.4.10 lib/power_stencil/project/versioning.rb
power_stencil-0.4.9 lib/power_stencil/project/versioning.rb
power_stencil-0.4.8 lib/power_stencil/project/versioning.rb
power_stencil-0.4.7 lib/power_stencil/project/versioning.rb
power_stencil-0.4.6 lib/power_stencil/project/versioning.rb
power_stencil-0.4.5 lib/power_stencil/project/versioning.rb
power_stencil-0.4.4 lib/power_stencil/project/versioning.rb
power_stencil-0.4.3 lib/power_stencil/project/versioning.rb
power_stencil-0.4.2 lib/power_stencil/project/versioning.rb
power_stencil-0.4.1 lib/power_stencil/project/versioning.rb
power_stencil-0.4.0 lib/power_stencil/project/versioning.rb
power_stencil-0.3.9 lib/power_stencil/project/versioning.rb