baja 0.6.7 → 0.6.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/baja/version.rb +1 -1
- data/lib/baja.rb +19 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fb56a593b6bea4d6596e259d098c0aa2defd774
|
4
|
+
data.tar.gz: bada4eadb349e86b1d92d4e98c47c3edbae3e61c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09bc12712286586683c2932efbbb531f7d02f6ec99ef821655101c8e211423e86133801f36d83f438995e307e13d40170034e1e628df10672132008a366420b8
|
7
|
+
data.tar.gz: 470fd53043bbad11cd9db8e00203d61845a29416ffbb7d879d53693b87330978eb759cc6ff3803f04d681f685d376e766594a4905be34a8e323151e46dccd107
|
data/lib/baja/version.rb
CHANGED
data/lib/baja.rb
CHANGED
@@ -25,6 +25,25 @@ module Baja
|
|
25
25
|
load "tasks/baja.rake"
|
26
26
|
end
|
27
27
|
end
|
28
|
+
|
29
|
+
module FactoryGirl
|
30
|
+
def self.find_definitions
|
31
|
+
absolute_definition_file_paths = definition_file_paths.map { |path| File.expand_path(path) }
|
32
|
+
puts "defpath: #{definition_file_paths}"
|
33
|
+
absolute_definition_file_paths.uniq.each do |path|
|
34
|
+
puts "abspath: #{path}"
|
35
|
+
Baja::FactoryLoad.load_path("#{path}.rb") if File.exist?("#{path}.rb")
|
36
|
+
|
37
|
+
if File.directory? path
|
38
|
+
Dir[File.join(path, '**', '*.rb')].sort.each do |file|
|
39
|
+
Baja::FactoryLoad.load_path(file)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
|
28
47
|
module FactoryLoad
|
29
48
|
@@path
|
30
49
|
def self.load_path(path)
|
@@ -82,21 +101,6 @@ end
|
|
82
101
|
end
|
83
102
|
end
|
84
103
|
|
85
|
-
module FactoryGirl
|
86
|
-
def self.find_definitions
|
87
|
-
absolute_definition_file_paths = definition_file_paths.map { |path| File.expand_path(path) }
|
88
|
-
puts "defpath: #{definition_file_paths}"
|
89
|
-
absolute_definition_file_paths.uniq.each do |path|
|
90
|
-
puts "abspath: #{path}"
|
91
|
-
Baja::FactoryLoad.load_path("#{path}.rb") if File.exist?("#{path}.rb")
|
92
104
|
|
93
|
-
if File.directory? path
|
94
|
-
Dir[File.join(path, '**', '*.rb')].sort.each do |file|
|
95
|
-
Baja::FactoryLoad.load_path(file)
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
101
105
|
|
102
106
|
|