andhapp-decoct 1.4.2 → 1.4.3
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/VERSION.yml +1 -1
- data/bin/decoct +1 -1
- data/decoct.gemspec +1 -1
- data/lib/dconstants.rb +1 -1
- data/lib/dmeta.rb +2 -2
- data/lib/dscript.rb +5 -5
- data/lib/templates/spec/rcov.opts +1 -2
- data/lib/templates/spec/spec_helper.rb +0 -3
- data/test/ts_script.rb +6 -6
- metadata +1 -1
data/VERSION.yml
CHANGED
data/bin/decoct
CHANGED
data/decoct.gemspec
CHANGED
data/lib/dconstants.rb
CHANGED
data/lib/dmeta.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'ftools'
|
2
|
-
require File.dirname(__FILE__)
|
2
|
+
require File.join(File.dirname(__FILE__), "..", 'lib', 'dconstants')
|
3
3
|
|
4
4
|
module Decoct
|
5
5
|
module Dmeta
|
@@ -21,7 +21,7 @@ module Decoct
|
|
21
21
|
else
|
22
22
|
attr_reader name
|
23
23
|
define_method("create_#{name}") do
|
24
|
-
path = "#{app_name}
|
24
|
+
path = "#{app_name}#{File::SEPARATOR}#{name}"
|
25
25
|
Dir.mkdir(path) if !test(?d, path)
|
26
26
|
end
|
27
27
|
end
|
data/lib/dscript.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.dirname(__FILE__)
|
1
|
+
require File.join(File.dirname(__FILE__), "..", 'lib', 'dmeta')
|
2
2
|
|
3
3
|
module Decoct
|
4
4
|
|
@@ -31,17 +31,17 @@ module Decoct
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def copy_autotest_file
|
34
|
-
copy_file(".autotest", "#{app_name}
|
34
|
+
copy_file(".autotest", "#{app_name}#{File::SEPARATOR}.autotest")
|
35
35
|
end
|
36
36
|
|
37
37
|
def copy_rspec_files
|
38
|
-
from = ["spec
|
39
|
-
to = ["#{app_name}
|
38
|
+
from = ["spec#{File::SEPARATOR}spec.opts", "spec#{File::SEPARATOR}rcov.opts", "spec#{File::SEPARATOR}spec_helper.rb", "spec#{File::SEPARATOR}app_spec.rb"]
|
39
|
+
to = ["#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec.opts", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}rcov.opts", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec_helper.rb", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}#{app_name}_spec.rb"]
|
40
40
|
copy_file(from, to)
|
41
41
|
end
|
42
42
|
|
43
43
|
def copy_app_file
|
44
|
-
copy_file("generic_app.rb", "#{app_name}
|
44
|
+
copy_file("generic_app.rb", "#{app_name}#{File::SEPARATOR}#{app_name}.rb")
|
45
45
|
end
|
46
46
|
|
47
47
|
end
|
@@ -1,2 +1 @@
|
|
1
|
-
--exclude "spec/*,gems/*"
|
2
|
-
--rails
|
1
|
+
--exclude "spec/*,gems/*"
|
data/test/ts_script.rb
CHANGED
@@ -27,10 +27,10 @@ class TestScript < Test::Unit::TestCase
|
|
27
27
|
@script.create_spec
|
28
28
|
@script.copy_rspec_files
|
29
29
|
|
30
|
-
assert File.exists?("#{@app_name}
|
31
|
-
assert File.exists?("#{@app_name}
|
32
|
-
assert File.exists?("#{@app_name}
|
33
|
-
assert File.exists?("#{@app_name}
|
30
|
+
assert File.exists?("#{@app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec.opts")
|
31
|
+
assert File.exists?("#{@app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}rcov.opts")
|
32
|
+
assert File.exists?("#{@app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec_helper.rb")
|
33
|
+
assert File.exists?("#{@app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}#{@app_name}_spec.rb")
|
34
34
|
|
35
35
|
assert_not_nil dir_in_app_folder.index("spec")
|
36
36
|
end
|
@@ -47,12 +47,12 @@ class TestScript < Test::Unit::TestCase
|
|
47
47
|
|
48
48
|
should 'copy the .autotest file to app folder' do
|
49
49
|
@script.copy_autotest_file
|
50
|
-
assert File.exists?("#{@app_name}
|
50
|
+
assert File.exists?("#{@app_name}#{File::SEPARATOR}.autotest")
|
51
51
|
end
|
52
52
|
|
53
53
|
should 'copy the app file' do
|
54
54
|
@script.copy_app_file
|
55
|
-
assert File.exists?("#{@app_name}
|
55
|
+
assert File.exists?("#{@app_name}#{File::SEPARATOR}#{@app_name}.rb")
|
56
56
|
end
|
57
57
|
|
58
58
|
teardown do
|