Skip to content

Commit

Permalink
Merge pull request #1 from berkshelf/compat_3.1
Browse files Browse the repository at this point in the history
Change method call from status_code to set_status_code to BzrError- bump...
  • Loading branch information
Da-wei committed Aug 6, 2014
2 parents 64628ca + c175a18 commit ec0ff3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion berkshelf-bzr.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

# Runtime dependencies
spec.add_dependency 'berkshelf', '~> 3.0'
spec.add_dependency 'berkshelf', '~> 3.1'

# Development dependencies
spec.add_development_dependency 'aruba', '~> 0.5'
Expand Down
2 changes: 1 addition & 1 deletion lib/berkshelf/bzr/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Berkshelf
module Bzr
VERSION = '0.3.0'
VERSION = '0.4.0'
end
end
6 changes: 1 addition & 5 deletions lib/berkshelf/locations/bzr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module Berkshelf
class BzrLocation < BaseLocation
class BzrError < BerkshelfError; status_code(600); end
class BzrError < BerkshelfError; set_status_code(600); end

class BzrNotInstalled < BzrError
def initialize
Expand Down Expand Up @@ -53,7 +53,6 @@ def installed?
#
# @see BaseLocation#install
def install

if cached?
Dir.chdir(cache_path) do
bzr %|pull|
Expand Down Expand Up @@ -147,15 +146,13 @@ def revid(path)
end
end


# Determine if this bazaar repo has already been downloaded.
#
# @return [Boolean]
def cached?
cache_path.exist?
end


# The path where this cookbook would live in the store, if it were
# installed.
#
Expand All @@ -172,6 +169,5 @@ def cache_path
Pathname.new(Berkshelf.berkshelf_path)
.join('.cache', 'bzr', Digest::SHA1.hexdigest(uri))
end

end
end

0 comments on commit ec0ff3a

Please sign in to comment.