active_hash 0.8.6 → 0.8.7

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/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 2010-11-09
2
+ - Use Ruby's definition of "word character" (numbers, underscores) when forming ActiveHash::Enum constants (tstuart)
3
+
1
4
  2010-11-07
2
5
  - Get ActiveHash::Associations to return a scope for has_many active record relationships (mocoso)
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.6
1
+ 0.8.7
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active_hash}
8
- s.version = "0.8.6"
8
+ s.version = "0.8.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeff Dean", "Mike Dalessio", "Corey Innis", "Peter Jaros", "Brandon Keene", "Brian Takita", "Pat Nakajima", "John Pignata", "Michael Schubert", "Jeremy Weiskotten", "Ryan Garver", "Tom Stuart", "Joel Chippindale"]
12
- s.date = %q{2010-11-07}
12
+ s.date = %q{2010-11-09}
13
13
  s.email = %q{jeff@zilkey.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -44,7 +44,7 @@ module ActiveHash
44
44
 
45
45
  def constant_for(field_value)
46
46
  if constant = field_value.try(:dup)
47
- constant.gsub!(/[^A-Za-z]+/, "_")
47
+ constant.gsub!(/\W+/, "_")
48
48
  constant.gsub!(/^_|_$/, '')
49
49
  constant.upcase!
50
50
  constant
@@ -46,7 +46,7 @@ describe ActiveHash::Base, "enum" do
46
46
  enum_accessor :name
47
47
  end
48
48
 
49
- Movie::DIE_HARD.name.should == 'Die Hard 2'
49
+ Movie::DIE_HARD_2.name.should == 'Die Hard 2'
50
50
  Movie::THE_INFORMANT.name.should == 'The Informant!'
51
51
  Movie::IN_OUT.name.should == 'In & Out'
52
52
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_hash
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 49
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 6
10
- version: 0.8.6
9
+ - 7
10
+ version: 0.8.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeff Dean
@@ -27,7 +27,7 @@ autorequire:
27
27
  bindir: bin
28
28
  cert_chain: []
29
29
 
30
- date: 2010-11-07 00:00:00 -06:00
30
+ date: 2010-11-09 00:00:00 -07:00
31
31
  default_executable:
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency