famili 0.0.4 → 0.0.5
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/README.rdoc +1 -0
- data/Rakefile +14 -4
- data/lib/famili/mother.rb +3 -1
- data/lib/famili.rb +1 -1
- data/spec/famili_spec.rb +8 -0
- data/spec/spec_helper.rb +1 -0
- metadata +20 -8
data/README.rdoc
CHANGED
@@ -115,6 +115,7 @@ and then
|
|
115
115
|
* 0.0.1 - created
|
116
116
|
* 0.0.2 - add inheritance, and mother methods [unique,sequence_number]
|
117
117
|
* 0.0.3 - fix Mother.create call model.save!; Mother.hash return symbolized hash
|
118
|
+
* 0.0.5 - add raise NoMethodError if property declared without block (becose it is error-prone), fix Famili::Mother.class#name method
|
118
119
|
|
119
120
|
== TODO
|
120
121
|
|
data/Rakefile
CHANGED
@@ -2,18 +2,28 @@ require 'rake'
|
|
2
2
|
require 'rake/testtask'
|
3
3
|
require 'rake/rdoctask'
|
4
4
|
require 'rake/gempackagetask'
|
5
|
+
require 'rubygems'
|
6
|
+
require 'spec/rake/spectask'
|
7
|
+
|
5
8
|
|
6
9
|
desc 'Default: run unit tests.'
|
7
10
|
task :default => :test
|
8
11
|
|
9
12
|
desc 'Test the pg_gnostic plugin.'
|
10
|
-
Rake::TestTask.new(:test) do |t|
|
13
|
+
#Rake::TestTask.new(:test) do |t|
|
14
|
+
#t.libs << 'lib'
|
15
|
+
#t.libs << 'spec'
|
16
|
+
#t.pattern = 'spec/**/*_spec.rb'
|
17
|
+
#t.verbose = true
|
18
|
+
#end
|
19
|
+
|
20
|
+
Spec::Rake::SpecTask.new(:test) do |t|
|
11
21
|
t.libs << 'lib'
|
12
|
-
t.
|
13
|
-
t.
|
14
|
-
t.verbose = true
|
22
|
+
t.warning = true
|
23
|
+
t.rcov = true
|
15
24
|
end
|
16
25
|
|
26
|
+
|
17
27
|
desc 'Generate documentation for the pg_gnostic plugin.'
|
18
28
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
19
29
|
rdoc.rdoc_dir = 'rdoc'
|
data/lib/famili/mother.rb
CHANGED
@@ -38,11 +38,13 @@ module Famili
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def name(&block)
|
41
|
+
return class_name unless block_given?
|
41
42
|
field(:name,&block)
|
42
43
|
end
|
43
44
|
|
44
45
|
def method_missing(method,&block)
|
45
|
-
field(method,&block)
|
46
|
+
return field(method,&block) if block_given?
|
47
|
+
super
|
46
48
|
end
|
47
49
|
|
48
50
|
def attribures
|
data/lib/famili.rb
CHANGED
data/spec/famili_spec.rb
CHANGED
@@ -83,4 +83,12 @@ describe Famili do
|
|
83
83
|
end
|
84
84
|
logins.include?(Famili::User.hash[:login]).should_not be_true
|
85
85
|
end
|
86
|
+
|
87
|
+
it "should not add attribuite name" do
|
88
|
+
Famili::User.name
|
89
|
+
Famili::User.attribures.should_not include(:name)
|
90
|
+
lambda {
|
91
|
+
Famili::User.unexisting
|
92
|
+
}.should raise_error(NoMethodError)
|
93
|
+
end
|
86
94
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: famili
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- niquola
|
@@ -9,7 +15,7 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-09-27 00:00:00 +04:00
|
13
19
|
default_executable:
|
14
20
|
dependencies: []
|
15
21
|
|
@@ -22,14 +28,14 @@ extensions: []
|
|
22
28
|
extra_rdoc_files:
|
23
29
|
- README.rdoc
|
24
30
|
files:
|
25
|
-
- README.rdoc
|
26
31
|
- Rakefile
|
32
|
+
- README.rdoc
|
27
33
|
- lib/famili/mother.rb
|
28
34
|
- lib/famili.rb
|
29
|
-
- spec/
|
35
|
+
- spec/spec_helper.rb
|
30
36
|
- spec/database.yml
|
37
|
+
- spec/famili_spec.rb
|
31
38
|
- spec/db/schema.rb
|
32
|
-
- spec/spec_helper.rb
|
33
39
|
has_rdoc: true
|
34
40
|
homepage: http://github.com/niquola/famili
|
35
41
|
licenses: []
|
@@ -40,21 +46,27 @@ rdoc_options: []
|
|
40
46
|
require_paths:
|
41
47
|
- lib
|
42
48
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
43
50
|
requirements:
|
44
51
|
- - ">="
|
45
52
|
- !ruby/object:Gem::Version
|
53
|
+
hash: 3
|
54
|
+
segments:
|
55
|
+
- 0
|
46
56
|
version: "0"
|
47
|
-
version:
|
48
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
49
59
|
requirements:
|
50
60
|
- - ">="
|
51
61
|
- !ruby/object:Gem::Version
|
62
|
+
hash: 3
|
63
|
+
segments:
|
64
|
+
- 0
|
52
65
|
version: "0"
|
53
|
-
version:
|
54
66
|
requirements: []
|
55
67
|
|
56
68
|
rubyforge_project:
|
57
|
-
rubygems_version: 1.3.
|
69
|
+
rubygems_version: 1.3.7
|
58
70
|
signing_key:
|
59
71
|
specification_version: 3
|
60
72
|
summary: Rails plugin for postgres
|