markcatley-enum_field 0.1.1.0.1 → 0.2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +48 -0
- data/VERSION.yml +2 -2
- data/enum_field.gemspec +46 -0
- data/init.rb +1 -0
- data/lib/enum_field.rb +2 -0
- data/rails/init.rb +2 -0
- metadata +28 -12
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2008 James Golick
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/rdoctask'
|
4
|
+
|
5
|
+
desc 'Default: run unit tests.'
|
6
|
+
task :default => :test
|
7
|
+
|
8
|
+
desc 'Test the enum_field plugin.'
|
9
|
+
Rake::TestTask.new(:test) do |t|
|
10
|
+
t.libs << 'lib'
|
11
|
+
t.pattern = 'test/**/*_test.rb'
|
12
|
+
t.verbose = true
|
13
|
+
end
|
14
|
+
|
15
|
+
begin
|
16
|
+
require 'jeweler'
|
17
|
+
Jeweler::Tasks.new do |s|
|
18
|
+
s.name = "enum_field"
|
19
|
+
s.summary = %Q{ActiveRecord enum fields on steroid}
|
20
|
+
s.email = "james@giraffesoft.ca"
|
21
|
+
s.homepage = "http://github.com/giraffesoft/enum_field"
|
22
|
+
s.description = "enum_field encapsulates a bunch of common idioms around ActiveRecord validates_inclusion_of"
|
23
|
+
s.authors = ["James Golick", "Mathieu Martin"]
|
24
|
+
end
|
25
|
+
rescue LoadError
|
26
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
27
|
+
end
|
28
|
+
|
29
|
+
desc 'Generate documentation for the enum_field plugin.'
|
30
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
31
|
+
rdoc.rdoc_dir = 'rdoc'
|
32
|
+
rdoc.title = 'enum_field'
|
33
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
34
|
+
rdoc.rdoc_files.include('README*')
|
35
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
36
|
+
end
|
37
|
+
|
38
|
+
begin
|
39
|
+
require 'rcov/rcovtask'
|
40
|
+
Rcov::RcovTask.new do |t|
|
41
|
+
t.libs << 'test'
|
42
|
+
t.test_files = FileList['test/**/*_test.rb']
|
43
|
+
t.verbose = true
|
44
|
+
end
|
45
|
+
rescue LoadError
|
46
|
+
puts "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
47
|
+
end
|
48
|
+
|
data/VERSION.yml
CHANGED
data/enum_field.gemspec
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{markcatley-enum_field}
|
5
|
+
s.version = "0.2.0.1"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["James Golick", "Mathieu Martin"]
|
9
|
+
s.date = %q{2009-06-26}
|
10
|
+
s.description = %q{enum_field encapsulates a bunch of common idioms around ActiveRecord validates_inclusion_of}
|
11
|
+
s.email = %q{james@giraffesoft.ca}
|
12
|
+
s.extra_rdoc_files = [
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".gitignore",
|
17
|
+
"MIT-LICENSE",
|
18
|
+
"README.rdoc",
|
19
|
+
"Rakefile",
|
20
|
+
"VERSION.yml",
|
21
|
+
"enum_field.gemspec",
|
22
|
+
"init.rb",
|
23
|
+
"lib/enum_field.rb",
|
24
|
+
"rails/init.rb",
|
25
|
+
"test/enum_field_test.rb"
|
26
|
+
]
|
27
|
+
s.has_rdoc = true
|
28
|
+
s.homepage = %q{http://github.com/giraffesoft/enum_field}
|
29
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
30
|
+
s.require_paths = ["lib"]
|
31
|
+
s.rubygems_version = %q{1.3.1}
|
32
|
+
s.summary = %q{ActiveRecord enum fields on steroid}
|
33
|
+
s.test_files = [
|
34
|
+
"test/enum_field_test.rb"
|
35
|
+
]
|
36
|
+
|
37
|
+
if s.respond_to? :specification_version then
|
38
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
39
|
+
s.specification_version = 2
|
40
|
+
|
41
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
42
|
+
else
|
43
|
+
end
|
44
|
+
else
|
45
|
+
end
|
46
|
+
end
|
data/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ActiveRecord::Base.class_eval { include EnumField }
|
data/lib/enum_field.rb
CHANGED
data/rails/init.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markcatley-enum_field
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.2.0.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- James Golick
|
@@ -10,7 +16,7 @@ autorequire:
|
|
10
16
|
bindir: bin
|
11
17
|
cert_chain: []
|
12
18
|
|
13
|
-
date: 2009-
|
19
|
+
date: 2009-06-26 00:00:00 +12:00
|
14
20
|
default_executable:
|
15
21
|
dependencies: []
|
16
22
|
|
@@ -20,38 +26,48 @@ executables: []
|
|
20
26
|
|
21
27
|
extensions: []
|
22
28
|
|
23
|
-
extra_rdoc_files:
|
24
|
-
|
29
|
+
extra_rdoc_files:
|
30
|
+
- README.rdoc
|
25
31
|
files:
|
32
|
+
- .gitignore
|
33
|
+
- MIT-LICENSE
|
26
34
|
- README.rdoc
|
35
|
+
- Rakefile
|
27
36
|
- VERSION.yml
|
37
|
+
- enum_field.gemspec
|
38
|
+
- init.rb
|
28
39
|
- lib/enum_field.rb
|
40
|
+
- rails/init.rb
|
29
41
|
- test/enum_field_test.rb
|
30
|
-
has_rdoc:
|
42
|
+
has_rdoc: true
|
31
43
|
homepage: http://github.com/giraffesoft/enum_field
|
32
|
-
|
33
|
-
rdoc_options: []
|
44
|
+
licenses: []
|
34
45
|
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options:
|
48
|
+
- --charset=UTF-8
|
35
49
|
require_paths:
|
36
50
|
- lib
|
37
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
38
52
|
requirements:
|
39
53
|
- - ">="
|
40
54
|
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 0
|
41
57
|
version: "0"
|
42
|
-
version:
|
43
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
59
|
requirements:
|
45
60
|
- - ">="
|
46
61
|
- !ruby/object:Gem::Version
|
62
|
+
segments:
|
63
|
+
- 0
|
47
64
|
version: "0"
|
48
|
-
version:
|
49
65
|
requirements: []
|
50
66
|
|
51
67
|
rubyforge_project:
|
52
|
-
rubygems_version: 1.
|
68
|
+
rubygems_version: 1.3.6
|
53
69
|
signing_key:
|
54
70
|
specification_version: 2
|
55
71
|
summary: ActiveRecord enum fields on steroid
|
56
|
-
test_files:
|
57
|
-
|
72
|
+
test_files:
|
73
|
+
- test/enum_field_test.rb
|