framework_fixture 0.1.0 → 0.1.2
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.md +6 -1
- data/lib/framework_fixture.rb +7 -6
- data/lib/framework_fixture/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -3,7 +3,12 @@ FrameworkFixture
|
|
3
3
|
|
4
4
|
Dynamically generate Rails and Sinatra apps to be tested by <code>Rack::Test</code>.
|
5
5
|
|
6
|
-
Why?
|
6
|
+
Why?
|
7
|
+
----
|
8
|
+
|
9
|
+
It is annoying to commit a bunch of Rails apps to my projects solely for the purpose of testing.
|
10
|
+
|
11
|
+
Seems more DRY to generate them when I run the test and automatically copy specific files into it.
|
7
12
|
|
8
13
|
Requirements
|
9
14
|
------------
|
data/lib/framework_fixture.rb
CHANGED
@@ -45,13 +45,14 @@ class FrameworkFixture
|
|
45
45
|
else
|
46
46
|
FileUtils.mkdir_p @build
|
47
47
|
end
|
48
|
+
end
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
if config = @config[@framework][@loose_version]
|
51
|
+
config.each do |dir, files|
|
52
|
+
files.each do |f|
|
53
|
+
if File.exists?(from = "#{@root}/#{dir}/#{File.basename(f)}")
|
54
|
+
FileUtils.mkdir_p File.dirname("#{@build}/#{f}")
|
55
|
+
FileUtils.cp from, "#{@build}/#{f}"
|
55
56
|
end
|
56
57
|
end
|
57
58
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Winton Welsh
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-11-
|
17
|
+
date: 2010-11-30 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|