baja 0.7.0 → 0.7.1
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 +13 -18
- 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: 29ef01aef29fad02103fab42c93ab8c2ad1b0949
|
4
|
+
data.tar.gz: e5df013270e996a330bcfb2b687ffdd66747ea8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b55c713418021a28b1096b9f4ee854eafe2fd4e4aa51ecfe35d0828d0fcaa252254c8e7bb702d734d46e26b529ee8a6c321dda504aa44c2ae11feb57aabaad4a
|
7
|
+
data.tar.gz: bd715d887b711d56bb62e976927e8400f4fbaf9276d60a17f42b60e6c9ed30920d0e15c14e5249da28dde17cbd4113aa3fb8021b0a455ae0711f4deabed51015
|
data/lib/baja/version.rb
CHANGED
data/lib/baja.rb
CHANGED
@@ -10,19 +10,23 @@ module Baja
|
|
10
10
|
|
11
11
|
|
12
12
|
class Blast
|
13
|
-
@@
|
13
|
+
@@definition_file_paths = %w(factories test/factories spec/factories)
|
14
14
|
def self.now!
|
15
15
|
baja = YAML.load_file('baja.yml')
|
16
16
|
baja = JSON.parse(baja.to_json,:symbolize_names => true)
|
17
17
|
baja[:factories].each do |dew|
|
18
18
|
puts "drinking"
|
19
19
|
drink = IO.popen("bundle show #{dew}").readline.strip
|
20
|
-
|
21
|
-
|
20
|
+
@@definition_file_paths << Pathname.new("#{drink}/spec/factories")
|
21
|
+
@@definition_file_paths.uniq!
|
22
|
+
puts @@definition_file_paths
|
22
23
|
end
|
23
24
|
puts "throwing it down!"
|
24
|
-
|
25
|
-
|
25
|
+
|
26
|
+
|
27
|
+
end
|
28
|
+
def self.definition_file_paths
|
29
|
+
@@definition_file_paths
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
@@ -33,16 +37,12 @@ module Baja
|
|
33
37
|
end
|
34
38
|
|
35
39
|
|
40
|
+
end
|
36
41
|
|
37
|
-
|
38
|
-
module FactoryGirl
|
39
|
-
|
40
|
-
self.definition_file_paths = %w(factories test/factories spec/factories)
|
41
|
-
|
42
|
-
|
42
|
+
module FactoryGirl
|
43
43
|
def self.find_definitions
|
44
|
-
absolute_definition_file_paths = definition_file_paths.map { |path| File.expand_path(path) }
|
45
|
-
puts "defpath: #{definition_file_paths}"
|
44
|
+
absolute_definition_file_paths = Baja::Blast.definition_file_paths.map { |path| File.expand_path(path) }
|
45
|
+
puts "defpath: #{Baja::Blast.definition_file_paths}"
|
46
46
|
absolute_definition_file_paths.uniq.each do |path|
|
47
47
|
puts "abspath: #{path}"
|
48
48
|
Baja::FactoryLoad.load_path("#{path}.rb") if File.exist?("#{path}.rb")
|
@@ -57,11 +57,6 @@ module Baja
|
|
57
57
|
end
|
58
58
|
|
59
59
|
|
60
|
-
|
61
|
-
end
|
62
|
-
|
63
|
-
|
64
|
-
|
65
60
|
module FactoryLoad
|
66
61
|
@@path
|
67
62
|
def self.load_path(path)
|