Skip to content

Commit

Permalink
Resolved merge conflict (version number)
Browse files Browse the repository at this point in the history
  • Loading branch information
delano committed Jun 23, 2009
2 parents b9c101d + 548ec1f commit 1a8a7e7
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
@@ -1,6 +1,10 @@
CAESARS -- CHANGES


#### 0.7.3 (2009-06-23) ###############################

* FIXED: Caesars::Config now correctly reports the config file in exceptions

#### 0.7.2 (2009-06-13) ###############################

* FIXED: Caesars::Hash method missing now correctly returns
Expand Down
4 changes: 4 additions & 0 deletions caesars.gemspec
@@ -1,7 +1,11 @@
@spec = Gem::Specification.new do |s|
s.name = "caesars"
s.rubyforge_project = "caesars"
<<<<<<< HEAD:caesars.gemspec
s.version = "0.7.2"
=======
s.version = "0.7.3"
>>>>>>> master:caesars.gemspec
s.specification_version = 1 if s.respond_to? :specification_version=
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=

Expand Down
7 changes: 5 additions & 2 deletions lib/caesars.rb
Expand Up @@ -13,15 +13,18 @@ class Caesars
require 'caesars/exceptions'
require 'caesars/config'

VERSION = "0.7.2"
VERSION = "0.7.3"

@@debug = false
@@chilled = {}
@@forced_array = {}
@@forced_ignore = {}
@@known_symbols = []
@@known_symbols_by_glass = {}

HASH_TYPE = (RUBY_VERSION =~ /1.9/) ? ::Hash : Caesars::OrderedHash

DIGEST_TYPE = Digest::SHA1

require 'caesars/hash'

def Caesars.enable_debug; @@debug = true; end
Expand Down
2 changes: 1 addition & 1 deletion lib/caesars/config.rb
Expand Up @@ -93,7 +93,7 @@ def refresh
puts "Loading config from #{path}" if @verbose || Caesars.debug?
dsl = File.read path
# eval so the DSL code can be executed in this namespace.
eval dsl, binding, __FILE__, __LINE__
eval dsl, binding, path
end

# Execute Caesars::Config.postprocesses after all files are loaded.
Expand Down
22 changes: 17 additions & 5 deletions lib/caesars/hash.rb
@@ -1,10 +1,13 @@

# A subclass of ::Hash that provides method names for hash parameters.
# It's like a lightweight OpenStruct.
# ch = Caesars::Hash[:tabasco => :lots!]
# puts ch.tabasco # => lots!
#
class Caesars
# = Caesars::Hash
#
# A subclass of ::Hash (1.9) or Caesars::OrderedHash (1.8) that provides
# method names for hash parameters. It's like a lightweight OpenStruct.
#
# ch = Caesars::Hash[:tabasco => :lots!]
# puts ch.tabasco # => lots!
#
class Hash < HASH_TYPE

def method_missing(meth)
Expand Down Expand Up @@ -33,5 +36,14 @@ def __class__
HASH_TYPE
end


##def githash(s)
## # http://stackoverflow.com/questions/552659/assigning-git-sha1s-without-git
## # http://github.com/mojombo/grit/blob/master/lib/grit/git-ruby/git_object.rb#L81
## # http://github.com/mojombo/grit/blob/master/lib/grit/git-ruby/git_object.rb#L225
## # http://www.kernel.org/pub/software/scm/git-core/docs/git-hash-object.html
## # $ git hash-object file
## DIGEST_TYPE.hexdigest(("%s %d\0" % ['blob', s.length]) << s)
##end
end
end

0 comments on commit 1a8a7e7

Please sign in to comment.