stastic 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,10 @@ module Stastic::Command
4
4
  attr_accessor :template
5
5
 
6
6
  def initialize(args = [])
7
+ if Stastic::Config.site_defined?
8
+ printf("A site already exists in this directory.\n\n")
9
+ raise(Stastic::Command::InvalidOptions)
10
+ end
7
11
  case args.size
8
12
  when 0
9
13
  self.name = nil
@@ -14,11 +18,11 @@ module Stastic::Command
14
18
  self.name = args.first
15
19
  end
16
20
  when 2
17
- raise(Stastic::InvalidOptions) unless args.first == "--template"
21
+ raise(Stastic::Command::InvalidOptions) unless args.first == "--template"
18
22
  self.template = "default"
19
23
  self.name = args.last
20
24
  else
21
- raise(Stastic::InvalidOptions)
25
+ raise(Stastic::Command::InvalidOptions)
22
26
  end
23
27
  end
24
28
 
@@ -54,9 +58,9 @@ module Stastic::Command
54
58
  d = File.join(dest, file)
55
59
 
56
60
  if File.directory?(s)
57
- FileUtils.cp_r(s, d, :preserve => true)
61
+ FileUtils.cp_r(s, d)
58
62
  else
59
- FileUtils.cp(s,d, :preserve => true)
63
+ FileUtils.cp(s,d)
60
64
  end
61
65
  end
62
66
 
data/lib/stastic.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Stastic
2
2
 
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
 
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brian Smith
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-06 00:00:00 -08:00
17
+ date: 2011-03-08 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency