Sha256: 17e89ab83384f5e0ca1ede45a140e97b995d934fddefb7e0580f2c35d2651db6

Contents?: true

Size: 1.52 KB

Versions: 25

Compression:

Stored size: 1.52 KB

Contents

#
# Copyright:: Copyright (c) 2014 Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require 'chef-dk/helpers'

RSpec.shared_context "fixture cookbooks checksums" do

  def id_to_dotted(sha1_id)
    major = sha1_id[0...14]
    minor = sha1_id[14...28]
    patch = sha1_id[28..40]
    decimal_integers =[major, minor, patch].map {|hex| hex.to_i(16) }
    decimal_integers.join(".")
  end

  let(:cookbook_foo_cksum) { "467dc855408ce8b74f991c5dc2fd72a6aa369b60" }

  let(:cookbook_foo_cksum_dotted) { id_to_dotted(cookbook_foo_cksum) }

  let(:cookbook_bar_cksum) { "4c538def500b75e744a3af05df66afd04dc3b3c5" }

  let(:cookbook_bar_cksum_dotted) { id_to_dotted(cookbook_bar_cksum) }

  let(:cookbook_baz_cksum) { "5c9063efbc5b5d8acc37024d7383f7dd010ae728" }

  let(:cookbook_baz_cksum_dotted) { id_to_dotted(cookbook_baz_cksum) }

  let(:cookbook_dep_of_bar_cksum) { "a4a6a5e4c6d95a580d291f6415d55b010669feac" }

  let(:cookbook_dep_of_bar_cksum_dotted) { id_to_dotted(cookbook_dep_of_bar_cksum) }

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
chef-dk-1.2.22 spec/shared/fixture_cookbook_checksums.rb
chef-dk-1.2.20 spec/shared/fixture_cookbook_checksums.rb
chef-dk-1.1.16 spec/shared/fixture_cookbook_checksums.rb
chef-dk-1.0.3 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.19.6 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.18.30 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.18.26 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.17.17 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.16.28 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.14.25 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.11.2 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.11.0 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.10.0 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.8.0 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.7.0 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.6.2 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.6.1 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.6.0 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.5.1 spec/shared/fixture_cookbook_checksums.rb
chef-dk-0.5.0 spec/shared/fixture_cookbook_checksums.rb