texas 0.1.2 → 0.1.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/lib/texas/task/new.rb +9 -2
- data/lib/texas/version.rb +1 -1
- data/spec/fixtures/{new → new-project}/contents/contents.tex.erb +0 -0
- data/spec/fixtures/{new → new-project}/lib/helpers/document_helper.rb +0 -0
- data/spec/fixtures/{new → new-project}/lib/init.rb +0 -0
- data/spec/texas_spec.rb +1 -1
- metadata +4 -4
data/lib/texas/task/new.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
module Texas
|
2
2
|
module Task
|
3
3
|
class New < Base
|
4
|
-
|
5
4
|
def source_dir
|
6
|
-
File.join(Texas.texas_dir, "spec", "fixtures", "new")
|
5
|
+
File.join(Texas.texas_dir, "spec", "fixtures", "new-project")
|
7
6
|
end
|
8
7
|
|
9
8
|
def dest_dir
|
@@ -11,6 +10,14 @@ module Texas
|
|
11
10
|
end
|
12
11
|
|
13
12
|
def run
|
13
|
+
if File.exists?(dest_dir)
|
14
|
+
if Dir[File.join(dest_dir, "*")].empty?
|
15
|
+
FileUtils.rm_r dest_dir
|
16
|
+
else
|
17
|
+
warn "texas: directory is not empty: #{dest_dir}"
|
18
|
+
exit 1
|
19
|
+
end
|
20
|
+
end
|
14
21
|
FileUtils.cp_r source_dir, dest_dir
|
15
22
|
end
|
16
23
|
end
|
data/lib/texas/version.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/spec/texas_spec.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: texas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- "Ren\xC3\xA9 F\xC3\xB6hring"
|
@@ -120,9 +120,9 @@ files:
|
|
120
120
|
- spec/fixtures/lib-helpers/contents/contents.tex.should
|
121
121
|
- spec/fixtures/lib-helpers/lib/helpers/document_helper.rb
|
122
122
|
- spec/fixtures/lib-helpers/lib/init.rb
|
123
|
-
- spec/fixtures/new/contents/contents.tex.erb
|
124
|
-
- spec/fixtures/new/lib/helpers/document_helper.rb
|
125
|
-
- spec/fixtures/new/lib/init.rb
|
123
|
+
- spec/fixtures/new-project/contents/contents.tex.erb
|
124
|
+
- spec/fixtures/new-project/lib/helpers/document_helper.rb
|
125
|
+
- spec/fixtures/new-project/lib/init.rb
|
126
126
|
- spec/fixtures/rerun/contents/contents.tex.erb
|
127
127
|
- spec/fixtures/rerun/contents/contents.tex.should
|
128
128
|
- spec/fixtures/texasrc/contents/contents.tex.erb
|