hobofields 0.9.106 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/hobo_fields.rb CHANGED
@@ -9,7 +9,7 @@ end
9
9
 
10
10
  module HoboFields
11
11
 
12
- VERSION = "0.9.106"
12
+ VERSION = "1.0.0"
13
13
 
14
14
  extend self
15
15
 
@@ -59,7 +59,7 @@ This class defines the methods `to_html` to customize the way the type is render
59
59
  # Loud text always renderd in caps.
60
60
  # It's rude to shout too much so it's not allowed to be
61
61
  # longer than 100 characters
62
- class LoudText < DelegateClass(String)
62
+ class LoudText < String
63
63
 
64
64
  COLUMN_TYPE = :string
65
65
 
@@ -80,9 +80,11 @@ This class defines the methods `to_html` to customize the way the type is render
80
80
 
81
81
  end
82
82
 
83
+ If you place this class in `app/rich_types/loud_text.rb`, Hobo will load it automatically.
84
+
83
85
  That's all there is to it. Defining `to_html`, `format` and `validate` are optional, defining `COLUMN_TYPE` and calling `HoboFields.register_type` are not.
84
86
 
85
- We use `DelegateClass` so that we can act like a string without actually being a string.
87
+ We inherit from String in this instance. This does not work for all types -- for example, with Fixnum, you should inherit from `DelegateClass(Fixnum)` instead.
86
88
 
87
89
  The format function is added as a before\_validation hook. Ensure that multiple invocations of your format function is safe -- shout.format.format should return the same as shout.format.
88
90
 
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobofields
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.106
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 0
9
+ version: 1.0.0
5
10
  platform: ruby
6
11
  authors:
7
12
  - Tom Locke
@@ -9,37 +14,46 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-26 00:00:00 -05:00
17
+ date: 2010-02-23 00:00:00 +11:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rails
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2
29
+ - 2
30
+ - 2
23
31
  version: 2.2.2
24
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: hobosupport
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - "="
32
40
  - !ruby/object:Gem::Version
33
- version: 0.9.106
34
- version:
41
+ segments:
42
+ - 1
43
+ - 0
44
+ - 0
45
+ version: 1.0.0
46
+ type: :runtime
47
+ version_requirements: *id002
35
48
  description:
36
49
  email: tom@tomlocke.com
37
50
  executables: []
38
51
 
39
52
  extensions: []
40
53
 
41
- extra_rdoc_files: []
42
-
54
+ extra_rdoc_files:
55
+ - LICENSE.txt
56
+ - README.txt
43
57
  files:
44
58
  - CHANGES.txt
45
59
  - LICENSE.txt
@@ -96,18 +110,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
110
  requirements:
97
111
  - - ">="
98
112
  - !ruby/object:Gem::Version
113
+ segments:
114
+ - 0
99
115
  version: "0"
100
- version:
101
116
  required_rubygems_version: !ruby/object:Gem::Requirement
102
117
  requirements:
103
118
  - - ">="
104
119
  - !ruby/object:Gem::Version
120
+ segments:
121
+ - 0
105
122
  version: "0"
106
- version:
107
123
  requirements: []
108
124
 
109
125
  rubyforge_project: hobo
110
- rubygems_version: 1.3.5
126
+ rubygems_version: 1.3.6
111
127
  signing_key:
112
128
  specification_version: 3
113
129
  summary: Rich field types and migration generator for Rails