beerdb 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,7 @@ class Beer < ActiveRecord::Base
13
13
  has_many :taggings, :as => :taggable, :class_name => 'WorldDb::Models::Tagging'
14
14
  has_many :tags, :through => :taggings, :class_name => 'WorldDb::Models::Tag'
15
15
 
16
+ validates :key, :format => { :with => /^[a-z][a-z0-9]+$/, :message => 'expected two or more lowercase letters a-z or 0-9 digits' }
16
17
 
17
18
  ### support old names (read-only) for now (remove later)
18
19
 
@@ -34,6 +35,10 @@ class Beer < ActiveRecord::Base
34
35
 
35
36
 
36
37
  def self.create_or_update_from_values( new_attributes, values )
38
+
39
+ ## fix: add/configure logger for ActiveRecord!!!
40
+ logger = LogKernel::Logger.root
41
+
37
42
  value_tag_keys = []
38
43
 
39
44
  ### check for "default" tags - that is, if present new_attributes[:tags] remove from hash
@@ -15,6 +15,8 @@ class Brewery < ActiveRecord::Base
15
15
  has_many :taggings, :as => :taggable, :class_name => 'WorldDb::Models::Tagging'
16
16
  has_many :tags, :through => :taggings, :class_name => 'WorldDb::Models::Tag'
17
17
 
18
+ validates :key, :format => { :with => /^[a-z][a-z0-9]+$/, :message => 'expected two or more lowercase letters a-z or 0-9 digits' }
19
+
18
20
  ### support old names (read-only) for now (remove later)
19
21
 
20
22
  def founded
@@ -29,6 +31,9 @@ class Brewery < ActiveRecord::Base
29
31
 
30
32
  def self.create_or_update_from_values( new_attributes, values )
31
33
 
34
+ ## fix: add/configure logger for ActiveRecord!!!
35
+ logger = LogKernel::Logger.root
36
+
32
37
  value_tag_keys = []
33
38
 
34
39
  ### check for "default" tags - that is, if present new_attributes[:tags] remove from hash
@@ -1,4 +1,4 @@
1
1
 
2
2
  module BeerDb
3
- VERSION = '0.5.1'
3
+ VERSION = '0.5.2'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beerdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-04-23 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &21079044 !ruby/object:Gem::Requirement
16
+ requirement: &20592228 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *21079044
24
+ version_requirements: *20592228
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: worlddb
27
- requirement: &21078780 !ruby/object:Gem::Requirement
27
+ requirement: &20591964 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.6'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *21078780
35
+ version_requirements: *20591964
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: commander
38
- requirement: &21078516 !ruby/object:Gem::Requirement
38
+ requirement: &20591700 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 4.1.3
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *21078516
46
+ version_requirements: *20591700
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rdoc
49
- requirement: &21078252 !ruby/object:Gem::Requirement
49
+ requirement: &20591436 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '4.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *21078252
57
+ version_requirements: *20591436
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: hoe
60
- requirement: &21077988 !ruby/object:Gem::Requirement
60
+ requirement: &20591172 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '3.6'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *21077988
68
+ version_requirements: *20591172
69
69
  description: beerdb - beer.db command line tool
70
70
  email: beerdb@googlegroups.com
71
71
  executables: