caesars 0.6.5 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES.txt +7 -0
- data/README.rdoc +5 -0
- data/caesars.gemspec +2 -2
- data/lib/{orderedhash.rb → caesars/orderedhash.rb} +8 -8
- data/lib/caesars.rb +5 -3
- metadata +3 -3
data/CHANGES.txt
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
CAESARS -- CHANGES
|
2
2
|
|
3
3
|
|
4
|
+
#### 0.6.6 (2009-05-12) ###############################
|
5
|
+
|
6
|
+
* CHANGE: Renamed OrderedHash to Caesars::OrderedHash to eliminate change of namespace conflicts
|
7
|
+
* CHANGE: Caesars::VERSION is now a String an includes the TINY (0.6.6)
|
8
|
+
* FIX: OrderedHash.merge was making an inappropriate call to dup
|
9
|
+
|
10
|
+
|
4
11
|
#### 0.6.5 (2009-05-10) ###############################
|
5
12
|
|
6
13
|
* FIXED: OrderHash was missing from 0.6.4 release
|
data/README.rdoc
CHANGED
data/caesars.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
@spec = Gem::Specification.new do |s|
|
2
2
|
s.name = "caesars"
|
3
3
|
s.rubyforge_project = "caesars"
|
4
|
-
s.version = "0.6.
|
4
|
+
s.version = "0.6.6"
|
5
5
|
s.specification_version = 1 if s.respond_to? :specification_version=
|
6
6
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
7
7
|
|
@@ -22,7 +22,7 @@
|
|
22
22
|
bin/party.conf
|
23
23
|
caesars.gemspec
|
24
24
|
lib/caesars.rb
|
25
|
-
lib/orderedhash.rb
|
25
|
+
lib/caesars/orderedhash.rb
|
26
26
|
)
|
27
27
|
|
28
28
|
# s.add_dependency ''
|
@@ -8,12 +8,12 @@
|
|
8
8
|
# THANKS
|
9
9
|
# Andrew Johnson for his suggestions and fixes of Hash[],
|
10
10
|
# merge, to_a, inspect and shift
|
11
|
-
class OrderedHash < ::Hash
|
11
|
+
class Caesars::OrderedHash < ::Hash
|
12
12
|
attr_accessor :order
|
13
13
|
|
14
14
|
class << self
|
15
15
|
def [] *args
|
16
|
-
hsh = OrderedHash.new
|
16
|
+
hsh = Caesars::OrderedHash.new
|
17
17
|
if Hash === args[0]
|
18
18
|
hsh.replace args[0]
|
19
19
|
elsif (args.size % 2) != 0
|
@@ -146,7 +146,9 @@ class OrderedHash < ::Hash
|
|
146
146
|
end
|
147
147
|
alias :merge! update
|
148
148
|
def merge hsh2
|
149
|
-
self.dup update(hsh2)
|
149
|
+
##self.dup update(hsh2) ## 2009-05-12 -- delano
|
150
|
+
update hsh2 ## dup doesn't take an argument
|
151
|
+
## and there's no need for it here
|
150
152
|
end
|
151
153
|
def select
|
152
154
|
ary = []
|
@@ -157,7 +159,7 @@ class OrderedHash < ::Hash
|
|
157
159
|
Hash
|
158
160
|
end
|
159
161
|
def __class__
|
160
|
-
OrderedHash
|
162
|
+
Caesars::OrderedHash
|
161
163
|
end
|
162
164
|
|
163
165
|
attr_accessor "to_yaml_style"
|
@@ -192,8 +194,6 @@ class OrderedHash < ::Hash
|
|
192
194
|
@order.each_with_index { |k, index| yield k, self[k], index }
|
193
195
|
self
|
194
196
|
end
|
195
|
-
end # class OrderedHash
|
197
|
+
end # class Caesars::OrderedHash
|
198
|
+
|
196
199
|
|
197
|
-
def OrderedHash(*a, &b)
|
198
|
-
OrderedHash.new(*a, &b)
|
199
|
-
end
|
data/lib/caesars.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
|
2
2
|
|
3
3
|
# Caesars -- Rapid DSL prototyping in Ruby.
|
4
4
|
#
|
@@ -8,14 +8,16 @@ require 'orderedhash'
|
|
8
8
|
# See bin/example
|
9
9
|
#
|
10
10
|
class Caesars
|
11
|
-
|
11
|
+
require 'caesars/orderedhash'
|
12
|
+
|
13
|
+
VERSION = "0.6.6"
|
12
14
|
@@debug = false
|
13
15
|
@@chilled = {}
|
14
16
|
@@forced_array = {}
|
15
17
|
@@forced_ignore = {}
|
16
18
|
@@known_symbols = []
|
17
19
|
@@known_symbols_by_glass = {}
|
18
|
-
HASH_TYPE = (RUBY_VERSION =~ /1.9/) ? ::Hash : ::OrderedHash
|
20
|
+
HASH_TYPE = (RUBY_VERSION =~ /1.9/) ? ::Hash : Caesars::OrderedHash
|
19
21
|
|
20
22
|
def Caesars.enable_debug; @@debug = true; end
|
21
23
|
def Caesars.disable_debug; @@debug = false; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caesars
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delano Mandelbaum
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-18 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -33,7 +33,7 @@ files:
|
|
33
33
|
- bin/party.conf
|
34
34
|
- caesars.gemspec
|
35
35
|
- lib/caesars.rb
|
36
|
-
- lib/orderedhash.rb
|
36
|
+
- lib/caesars/orderedhash.rb
|
37
37
|
has_rdoc: true
|
38
38
|
homepage: http://github.com/delano/caesars
|
39
39
|
licenses: []
|