soloist 0.0.1 → 0.0.2

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/README.markdown CHANGED
@@ -1 +1,24 @@
1
- Nothing to see here, yet.
1
+ Example soloistrc Files
2
+ =======================
3
+
4
+ My Laptop
5
+ ---------
6
+ Cookbook_Paths:
7
+ - /Users/pivotal/chef/
8
+ Recipes:
9
+ - pivotal_workstation::text_mate
10
+ - pivotal_workstation::git
11
+ - pivotal_workstation::git_config_global_defaults
12
+ - pivotal_workstation::bash_profile-better_history
13
+ - pivotal_workstation::bash_path_order
14
+ - pivotal_workstation::bash_profile
15
+ - pivotal_workstation::finder_display_full_path
16
+ - pivotal_workstation::git_config_global_defaults
17
+ - pivotal_workstation::inputrc
18
+ - pivotal_workstation::osx_turn_on_locate
19
+ - pivotal_workstation::textmate_set_defaults
20
+ - pivotal_workstation::rvm
21
+ - pivotal_workstation::mysql
22
+ - pivotal_workstation::defaults_fast_key_repeat_rate
23
+ - pivotal_workstation::ssh_copy_id
24
+ - pivotal_workstation::ec2_api_tools
data/bin/soloist CHANGED
@@ -12,12 +12,6 @@ def fileify(contents)
12
12
  file
13
13
  end
14
14
 
15
- class Array
16
- def to_array_string
17
- "[\"#{self.join("\", \"")}\"]"
18
- end
19
- end
20
-
21
15
  def walk_up_and_find_file(filenames)
22
16
  pwd = FileUtils.pwd
23
17
  file = nil
@@ -28,18 +22,25 @@ def walk_up_and_find_file(filenames)
28
22
  path_to_file << "../" unless file
29
23
  end
30
24
  FileUtils.cd(pwd)
31
- File.read(path_to_file + file) if file
25
+ file_contents = File.read(path_to_file + file) if file
26
+ [file_contents, path_to_file]
32
27
  end
33
28
 
34
29
  log_level = ENV['LOG_LEVEL'] || "info"
35
30
 
36
- soloistrc = YAML.load(walk_up_and_find_file(["soloistrc"]))
31
+ solistrc_contents, soloistrc_path = walk_up_and_find_file(["soloistrc"])
32
+ soloistrc = YAML.load(solistrc_contents)
37
33
 
38
34
  json_contents = {
39
35
  :recipes => soloistrc["Recipes"]
40
36
  }
41
37
 
42
- solo_rb_contents = "cookbook_path #{soloistrc["Cookbook_Paths"].to_array_string}"
38
+ cookbook_paths = soloistrc["Cookbook_Paths"].map do |v|
39
+ (v =~ /\//) == 0 ? v : "#{FileUtils.pwd}/#{soloistrc_path}/#{v}"
40
+ end
41
+ puts FileUtils.pwd
42
+ puts cookbook_paths.inspect
43
+ solo_rb_contents = "cookbook_path #{cookbook_paths.inspect}"
43
44
 
44
45
  # if ARGV.length >= 1
45
46
  # json_config = JSON.parse(File.read(json_file))
@@ -1,3 +1,3 @@
1
1
  module Soloist
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soloist
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matthew Kocher
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-15 00:00:00 -08:00
18
+ date: 2010-11-16 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency