Sha256: 5e4e7fc3a19a96a1050a66a81335c1dd0890be9425d3cf90b487260ef50e9cc3

Contents?: true

Size: 1.08 KB

Versions: 26

Compression:

Stored size: 1.08 KB

Contents

module CiCd
	module Builder

		# ---------------------------------------------------------------------------------------------------------------
		def downcaseKey(hash,key)
			hash[key.to_s.downcase.to_sym] = hash[key]
			hash.delete(key)
			hash
		end

		# ---------------------------------------------------------------------------------------------------------------
		def downcaseHashKeys(hash)
			down = {}
			hash.each{|k,v|
				if v.is_a?(Hash)
					v = downcaseHashKeys(v)
				end
				if k.to_s.match(/[A-Z]/)
					k = k.to_s.downcase.to_sym
				end
				down[k] = v
			}
			down
		end

    # ---------------------------------------------------------------------------------------------------------------
    def addArtifact(artifacts, script, prefix, opts = {})
      key = "#{@vars[:project_name]}/#{@vars[:variant]}/#{@vars[:build_nam]}/#{script.gsub(%r|^#{prefix}|, '')}"
      # Store the artifact - be sure to inherit possible overrides in pkg name and ext but dictate the drawer!
      artifacts << {
          key: key,
          data: {:file => script}.merge(opts),
      }
    end

  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
cicd-builder-0.9.52 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.51 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.50 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.48 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.47 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.46 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.45 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.44 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.43 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.42 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.41 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.40 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.39 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.38 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.37 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.36 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.35 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.33 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.32 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.31 lib/cicd/builder/mixlib/utils.rb