texas 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -2,7 +2,7 @@ module Texas
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- BUILD = 2
5
+ BUILD = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, BUILD].join('.').freeze
8
8
  end
File without changes
data/spec/texas_spec.rb CHANGED
@@ -32,7 +32,7 @@ describe Texas::Runner do
32
32
  end
33
33
 
34
34
  it "run scenario for --new" do
35
- run_scenario "new"
35
+ run_scenario "new-project"
36
36
  end
37
37
 
38
38
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: texas
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
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