homeseed 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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZThkMTQyNTZhOTFlNzk2OTNkNDY4MDk5ZDcwZjQ2NWUzZDg5OTQyMw==
4
+ OWRkNzAwZDZmNGUyMDRjYzFlN2U1ODcxOGI2OGZkMDQzNDY4MTQzOQ==
5
5
  data.tar.gz: !binary |-
6
- ZjVjM2YxMTQ4ODYwNWI2N2ZiNDE1NTliM2JhMGEyZjQ1ZTAxMzExOQ==
6
+ NGYwZmJlMDc2ZDdhYTZmOWQyYTU2MzQ0NDE3ODJkZGQwNzY3MDAyMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTNkZjBiMTFkNTQzMmI3NDk5ZWFmMGZkYmFkZmRkMTI1YmVlMzAzZDExZWJl
10
- YWI5MzExZTZiZGE3MGQxYzRlMmJmZmEwODU2ZTNkZDJhYjBhNzc1YzE5YmVk
11
- N2Q3ZGNjNjgxYTIzZDU5YTc2M2Y3Mzk2ODVmN2IzNzA4MjQ2MzU=
9
+ ZDY4Nzk5MjQxYjUyNjNhMDM0ZTliNWJmMzkzYTYwNTAxNDk1Y2M4NTJmZDRi
10
+ ZGFmZGJkNGJhNjcwN2I1NDljOTE4MzJkMWJkODc4MDE3ZDNlMzc3Y2U0NWFj
11
+ MGEwYmZjZjRkMGE1ZTFhNDE4ZDMzZTg1OTRkOTM3YjdmMmJiZTY=
12
12
  data.tar.gz: !binary |-
13
- NmZkZGQ1ODEwYmNhMTk3MGFmYzczYTNjNTdlYmIyNDQxZTgzYzIzNTFiZTY3
14
- YzhhNjg2MmM2YzViYWFhYzc1YTNlNDkyNGY2ZTUyMzljN2ZmOGU5ZTVkYjJl
15
- OGU2MTFjZjliOWZmNmEzNWNkZWYyMjNlY2NjNTUzNmM2MmNmOTg=
13
+ ZDNiNDk3ZjU1ZTlmMjhlMmNiOGI3M2FiNzJhNzM5NTE4NGNhYzA1ZmRlYzY2
14
+ MWYyN2EwNjBhYzU4ZmI1MmE1NjI3NTU1OTdkNTc5YzcyNTFiZGFjNzE5ZmRm
15
+ YTcxMWNlNTBmYjc0NDBhNjhkOTkzZjAyYTA2NTgyMGI4NmE1MWQ=
data/bin/homeseed CHANGED
@@ -5,9 +5,10 @@ require 'thor'
5
5
 
6
6
  module Homeseed
7
7
  class HomeseedCliApp < Thor
8
- desc 'plant [-s <servers>] [-f <files>] [-u <user>]', ''
8
+ desc 'plant [-s <servers>] [-e <command> or -f <files>] [-u <user>]', ''
9
9
  option :servers, required: true, aliases: '-s', desc: 'ssh hostname(s)'
10
- option :files, required: true, aliases: '-f', desc: 'yml command file(s) to exec'
10
+ option :command, aliases: '-e', desc: 'bash command to exec'
11
+ option :files, aliases: '-f', desc: 'yml command file(s) to exec'
11
12
  option :user, aliases: '-u', desc: 'ssh username', default: ENV['USER']
12
13
  method_option :has_password, aliases: '-p', type: :boolean, default: false, desc: 'has password; no ssh keys'
13
14
  def plant
@@ -1,10 +1,5 @@
1
- git:
2
- clone:
3
- - git://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick
4
1
  source:
5
2
  - "$HOME/.homesick/repos/homeshick/homeshick.sh"
6
- rm:
7
- - -rf $HOME/git
8
3
  homeshick:
9
4
  clone:
10
5
  - https://github.com/git/git.git --batch
@@ -13,5 +8,7 @@ homeshick:
13
8
  link:
14
9
  - terminator --force
15
10
  - vim-4-eva --force
11
+ rm:
12
+ - -rf $HOME/git
16
13
  ln:
17
14
  - -s -f $HOME/.homesick/repos/git $HOME/git
@@ -1,3 +1,3 @@
1
1
  module Homeseed
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/homeseed.rb CHANGED
@@ -15,18 +15,22 @@ module Homeseed
15
15
  end
16
16
 
17
17
  def initialize(params={})
18
- raise unless params[:servers] and params[:files] and params[:user]
18
+ raise unless params[:servers] and (params[:files] or params[:command]) and params[:user]
19
19
  @servers = params[:servers].split(',')
20
- @files = params[:files].split(',')
21
20
  @user = params[:user]
22
21
  @has_password = params[:password]
23
22
 
24
- @flat_commands = ''
25
- @files.each do |file|
26
- yml_commands = YAML.load_file(file)
27
- commands = []
28
- self.process_hash(commands, '', yml_commands)
29
- @flat_commands += commands.join('; ') + ';'
23
+ if params[:command]
24
+ @flat_commands = params[:command]
25
+ else
26
+ @files = params[:files].split(',')
27
+ @flat_commands = ''
28
+ @files.each do |file|
29
+ yml_commands = YAML.load_file(file)
30
+ commands = []
31
+ self.process_hash(commands, '', yml_commands)
32
+ @flat_commands += commands.join('; ') + ';'
33
+ end
30
34
  end
31
35
  end
32
36
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homeseed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rbuchss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-08 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler