factory_toys 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -0
- data/VERSION +1 -1
- data/factory_toys.gemspec +2 -2
- data/lib/factory_toys/f_factory.rb +2 -1
- data/lib/factory_toys.rb +10 -2
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -21,6 +21,8 @@ Add the following lines of code tyo you capybara/cucumber env.rb file
|
|
21
21
|
require 'factory_toys'
|
22
22
|
FactoryToys.update_features
|
23
23
|
|
24
|
+
Updated System to only update file if the source has changed (does not handle file deletion)
|
25
|
+
|
24
26
|
=== Configuration Options:
|
25
27
|
|
26
28
|
Set the Directory to read the configuration files from
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/factory_toys.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{factory_toys}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.4.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["David Henry", "Thomas Brand"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-10-01}
|
13
13
|
s.description = %q{Simplify Feature Management}
|
14
14
|
s.email = %q{dw_henry@yahoo.com.au}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -12,7 +12,8 @@ module FactoryToys
|
|
12
12
|
def initialize(filename)
|
13
13
|
@filename = filename
|
14
14
|
|
15
|
-
@output = "#
|
15
|
+
@output = "#last update: #{File.mtime(@file_name)}"
|
16
|
+
@output += "# Auto Generated Features\n"
|
16
17
|
@output += "# Generated: #{Time.now.to_s}\n"
|
17
18
|
@output += "# Source File: #{@filename}\n\n"
|
18
19
|
end
|
data/lib/factory_toys.rb
CHANGED
@@ -35,11 +35,19 @@ module FactoryToys
|
|
35
35
|
return "Source Directory Does not exist: #{self.source_directory}"
|
36
36
|
end
|
37
37
|
|
38
|
+
def update_required(file)
|
39
|
+
File.open(file) {|f| return "#last update: #{File.mtime(file)}" != f.readline}
|
40
|
+
rescue
|
41
|
+
true
|
42
|
+
end
|
43
|
+
|
38
44
|
public
|
39
45
|
def update_features
|
40
46
|
self.source_files.each do |file|
|
41
|
-
|
42
|
-
|
47
|
+
if self.update_required(file)
|
48
|
+
ft = FactoryToys::FFactory.new(file)
|
49
|
+
ft.write
|
50
|
+
end
|
43
51
|
end
|
44
52
|
end
|
45
53
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_toys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 4
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Henry
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-10-01 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|