scatter 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/scatter.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'yaml'
2
+
1
3
  require File.dirname(__FILE__) + '/scatter/cli'
2
4
  require File.dirname(__FILE__) + '/scatter/command'
3
5
  require File.dirname(__FILE__) + '/scatter/super_command'
@@ -10,7 +10,9 @@ module Scatter
10
10
 
11
11
  def execute!
12
12
  FileUtils.mkdir_p File.dirname(Scatter::Config.file_name)
13
- Scatter::Config.save!
13
+ unless File.exists?(Scatter::Config.file_name)
14
+ File.open(Scatter::Config.file_name, 'w') { |file| file.puts({}.to_yaml) }
15
+ end
14
16
  end
15
17
  end
16
18
  end
@@ -39,8 +39,10 @@ module Scatter
39
39
 
40
40
  def load!
41
41
  @loaded ||= begin
42
- @config = YAML.load(File.read(file_name)) rescue {}
42
+ @config = YAML.load(File.read(file_name)) || {}
43
43
  true
44
+ rescue
45
+ raise Scatter::CommandLineError, "Configuration file not found. Run: scatter init"
44
46
  end
45
47
  end
46
48
 
@@ -1,5 +1,5 @@
1
1
  module Scatter
2
2
  def self.version
3
- "0.0.1"
3
+ "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 2
9
+ version: 0.0.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - imedo GmbH
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-04-17 00:00:00 +02:00
17
+ date: 2010-04-21 00:00:00 +02:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -23,20 +28,16 @@ extra_rdoc_files: []
23
28
 
24
29
  files:
25
30
  - bin/scatter
26
- - lib/scatter
27
31
  - lib/scatter/cli.rb
28
32
  - lib/scatter/command.rb
29
- - lib/scatter/commands
30
33
  - lib/scatter/commands/init.rb
31
34
  - lib/scatter/commands/list.rb
32
- - lib/scatter/commands/node
33
35
  - lib/scatter/commands/node/add.rb
34
36
  - lib/scatter/commands/node/list.rb
35
37
  - lib/scatter/commands/node/rm.rb
36
38
  - lib/scatter/commands/node.rb
37
39
  - lib/scatter/commands/push.rb
38
40
  - lib/scatter/commands/receive.rb
39
- - lib/scatter/commands/remote
40
41
  - lib/scatter/commands/remote/add.rb
41
42
  - lib/scatter/commands/remote/list.rb
42
43
  - lib/scatter/commands/remote/rm.rb
@@ -51,8 +52,10 @@ files:
51
52
  - lib/scatter/super_command.rb
52
53
  - lib/scatter/version.rb
53
54
  - lib/scatter.rb
54
- has_rdoc: false
55
+ has_rdoc: true
55
56
  homepage: http://www.imedo.de/
57
+ licenses: []
58
+
56
59
  post_install_message:
57
60
  rdoc_options: []
58
61
 
@@ -62,20 +65,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
65
  requirements:
63
66
  - - ">="
64
67
  - !ruby/object:Gem::Version
68
+ segments:
69
+ - 0
65
70
  version: "0"
66
- version:
67
71
  required_rubygems_version: !ruby/object:Gem::Requirement
68
72
  requirements:
69
73
  - - ">="
70
74
  - !ruby/object:Gem::Version
75
+ segments:
76
+ - 0
71
77
  version: "0"
72
- version:
73
78
  requirements: []
74
79
 
75
80
  rubyforge_project:
76
- rubygems_version: 1.3.1
81
+ rubygems_version: 1.3.6
77
82
  signing_key:
78
- specification_version: 2
83
+ specification_version: 3
79
84
  summary: Gem deployment tool
80
85
  test_files: []
81
86