freighthop 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@
4
4
  require_relative 'lib/freighthop'
5
5
 
6
6
  Vagrant.require_plugin 'landrush'
7
+ Vagrant.require_plugin 'vagrant-cachier'
7
8
 
8
9
  Vagrant.configure('2') do |config|
9
10
  config.vm.box = 'precise64'
@@ -11,14 +12,11 @@ Vagrant.configure('2') do |config|
11
12
 
12
13
  config.landrush.enable
13
14
 
14
- if config.respond_to? :cache
15
- config.cache.auto_detect = true
16
- config.cache.enable_nfs = true
17
- end
15
+ config.cache.auto_detect = true
16
+ config.cache.enable_nfs = true
18
17
 
19
18
  config.vm.define Freighthop.app_name do |node_config|
20
19
  node_config.vm.hostname = Freighthop.hostname
21
- node_config.vm.network :private_network, ip: Freighthop.ip_address
22
20
 
23
21
  node_config.vm.provider :vmware_fusion do |v|
24
22
  v.vmx['displayName'] = Freighthop.hostname
@@ -24,17 +24,13 @@ module Freighthop
24
24
  end
25
25
 
26
26
  def app_name
27
- @app_name ||= host_root.basename.to_s
27
+ @app_name ||= host_root.basename.to_s.gsub(/[_ ]/, '-')
28
28
  end
29
29
 
30
30
  def hostname
31
31
  "#{app_name}.vagrant.dev"
32
32
  end
33
33
 
34
- def ip_address
35
- "10.20.1.#{app_name.getbyte(0)}"
36
- end
37
-
38
34
  def box_url
39
35
  if vmware?
40
36
  'http://files.vagrantup.com/precise64_vmware.box'
@@ -20,7 +20,7 @@ class Freighthop::CLI::SSH
20
20
  end
21
21
 
22
22
  def ssh(cmd)
23
- exec %Q(ssh -t -F #{config} #{app_name} 'cd #{guest_root}; sudo /bin/bash -l #{cmd}')
23
+ exec %Q(ssh -t -F #{config} #{app_name} 'cd #{guest_root}; /bin/bash -l #{cmd}')
24
24
  end
25
25
 
26
26
  def config
@@ -1,3 +1,3 @@
1
1
  module Freighthop
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  class freighthop::database(
2
- $flavors
2
+ $flavors = []
3
3
  ) {
4
4
  if (member($flavors, 'postgres')) {
5
5
  class { 'freighthop::database::postgres':}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freighthop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-18 00:00:00.000000000 Z
12
+ date: 2013-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler