freighthop 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  class Freighthop::Config
2
2
  def self.file
3
- Freighthop.root.join('.freighthop.json')
3
+ Freighthop.host_root.join('.freighthop.json')
4
4
  end
5
5
 
6
6
  def self.config
@@ -1,3 +1,3 @@
1
1
  module Freighthop
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/freighthop.rb CHANGED
@@ -21,7 +21,7 @@ module Freighthop
21
21
  end
22
22
 
23
23
  def app_name
24
- @app_name ||= host_rails_root.basename.to_s
24
+ @app_name ||= host_root.basename.to_s
25
25
  end
26
26
 
27
27
  def hostname
@@ -43,8 +43,8 @@ module Freighthop
43
43
  def mounts
44
44
  Freighthop::Config.fetch("freighthop::mounts").map do |host, guest|
45
45
  [
46
- File.expand_path(host_rails_root.join(host)),
47
- File.expand_path(guest_rails_root.join(guest)),
46
+ File.expand_path(host_root.join(host)),
47
+ File.expand_path(guest_root.join(guest)),
48
48
  ]
49
49
  end
50
50
  end
@@ -1,7 +1,8 @@
1
1
  class freighthop(
2
2
  $databases,
3
3
  $database_users,
4
- $packages = ['git-core'],
4
+ $packages = $freighthop::params::packages,
5
+ $ppas = $freighthop::params::ppas,
5
6
  $ruby_version = $freighthop::params::ruby_version,
6
7
  $app_name = $freighthop::params::app_name,
7
8
  $app_root = $freighthop::params::app_root,
@@ -13,6 +14,9 @@ class freighthop(
13
14
  ) inherits freighthop::params {
14
15
  include apt
15
16
 
17
+ class { 'freighthop::ppas':
18
+ ppas => $ppas,
19
+ } ->
16
20
  class { 'freighthop::pkgs':
17
21
  packages => $packages,
18
22
  } ->
@@ -1,4 +1,6 @@
1
1
  class freighthop::params {
2
+ $packages = ['git-core']
3
+ $ppas = []
2
4
  $ruby_version = '1.9.3-p392'
3
5
  $app_name = $::hostname
4
6
  $app_root = "/srv/${app_name}"
@@ -0,0 +1,9 @@
1
+ class freighthop::ppas(
2
+ $ppas
3
+ ) {
4
+ # required ppas
5
+ apt::ppa { 'ppa:gds/govuk': }
6
+ apt::ppa { 'ppa:phinze/rbenv': }
7
+
8
+ apt::ppa { $ppas: }
9
+ }
@@ -1,12 +1,8 @@
1
1
  class freighthop::rbenv(
2
2
  $ruby_version
3
3
  ) {
4
- apt::ppa { 'ppa:gds/govuk': }
5
- apt::ppa { 'ppa:phinze/rbenv': }
6
-
7
4
  class { '::rbenv':
8
5
  global_version => $ruby_version,
9
- require => Apt::Ppa['ppa:gds/govuk'],
10
6
  }
11
7
 
12
8
  rbenv::version { $ruby_version: }
@@ -1,7 +1,8 @@
1
1
  class freighthop(
2
2
  $databases,
3
3
  $database_users,
4
- $packages = ['git-core'],
4
+ $packages = $freighthop::params::packages,
5
+ $ppas = $freighthop::params::ppas,
5
6
  $ruby_version = $freighthop::params::ruby_version,
6
7
  $app_name = $freighthop::params::app_name,
7
8
  $app_root = $freighthop::params::app_root,
@@ -13,6 +14,9 @@ class freighthop(
13
14
  ) inherits freighthop::params {
14
15
  include apt
15
16
 
17
+ class { 'freighthop::ppas':
18
+ ppas => $ppas,
19
+ } ->
16
20
  class { 'freighthop::pkgs':
17
21
  packages => $packages,
18
22
  } ->
@@ -1,4 +1,6 @@
1
1
  class freighthop::params {
2
+ $packages = ['git-core']
3
+ $ppas = []
2
4
  $ruby_version = '1.9.3-p392'
3
5
  $app_name = $::hostname
4
6
  $app_root = "/srv/${app_name}"
@@ -0,0 +1,9 @@
1
+ class freighthop::ppas(
2
+ $ppas
3
+ ) {
4
+ # required ppas
5
+ apt::ppa { 'ppa:gds/govuk': }
6
+ apt::ppa { 'ppa:phinze/rbenv': }
7
+
8
+ apt::ppa { $ppas: }
9
+ }
@@ -1,12 +1,8 @@
1
1
  class freighthop::rbenv(
2
2
  $ruby_version
3
3
  ) {
4
- apt::ppa { 'ppa:gds/govuk': }
5
- apt::ppa { 'ppa:phinze/rbenv': }
6
-
7
4
  class { '::rbenv':
8
5
  global_version => $ruby_version,
9
- require => Apt::Ppa['ppa:gds/govuk'],
10
6
  }
11
7
 
12
8
  rbenv::version { $ruby_version: }
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.0.3
4
+ version: 0.0.4
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-09-24 00:00:00.000000000 Z
12
+ date: 2013-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -141,6 +141,7 @@ files:
141
141
  - local_modules/freighthop/manifests/params.pp
142
142
  - local_modules/freighthop/manifests/pkgs.pp
143
143
  - local_modules/freighthop/manifests/postgres.pp
144
+ - local_modules/freighthop/manifests/ppas.pp
144
145
  - local_modules/freighthop/manifests/rbenv.pp
145
146
  - local_modules/freighthop/manifests/redis.pp
146
147
  - local_modules/freighthop/templates/nginx/vagrant-rails.conf.erb
@@ -270,6 +271,7 @@ files:
270
271
  - modules/freighthop/manifests/params.pp
271
272
  - modules/freighthop/manifests/pkgs.pp
272
273
  - modules/freighthop/manifests/postgres.pp
274
+ - modules/freighthop/manifests/ppas.pp
273
275
  - modules/freighthop/manifests/rbenv.pp
274
276
  - modules/freighthop/manifests/redis.pp
275
277
  - modules/freighthop/templates/nginx/vagrant-rails.conf.erb
@@ -656,7 +658,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
656
658
  version: '0'
657
659
  segments:
658
660
  - 0
659
- hash: 3310240632279879997
661
+ hash: -3032814133313184341
660
662
  required_rubygems_version: !ruby/object:Gem::Requirement
661
663
  none: false
662
664
  requirements:
@@ -665,7 +667,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
665
667
  version: '0'
666
668
  segments:
667
669
  - 0
668
- hash: 3310240632279879997
670
+ hash: -3032814133313184341
669
671
  requirements: []
670
672
  rubyforge_project:
671
673
  rubygems_version: 1.8.23