crane_rails 0.2.6 → 0.3.1

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 717faf363ec82fcb8133290562c437815d96d0be
4
- data.tar.gz: 10ef00e530a7033dfea57d733bf31c3d14f5f8a2
3
+ metadata.gz: 79a0cfc0c039108eecee7743780ada7bfb4e67d9
4
+ data.tar.gz: 763cd3be89ec84c8efdcc4abb395c83e49259bd3
5
5
  SHA512:
6
- metadata.gz: 16e3a26e33a175abf90192cb43b3514c5676c657576ffd9efed86f2d2bccc069add33b117427a177a45412e9982f1bedbde76a3e313813cd794c776adc0cac73
7
- data.tar.gz: baa50bc9d7f612452a1720b7f786172d8c7c9abb7e35b36ff87304919bcdba8e5d57e8fb734df3e4ccd47c7672488a5779f8371be601edb8a40dddbd1f3e5144
6
+ metadata.gz: 5dccbdcda3835994df19cfa8f982889a607c2c90859c569ff0670df3d9560dbd0b68bbc45d16f20139e4b4581ea0d164aaaedc46df3a6f4d78c0ddfba9e9b99b
7
+ data.tar.gz: c3a1d9489058f419b02cf132ce63eda57ab3e55986b68ceda531cc68e8201add6842a53bdc7d70b88b88ebbe56e239ae02fc96efe7fbd0ffab3b5c7219a215e1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- crane_rails (0.2.3)
4
+ crane_rails (0.2.6)
5
5
  thor (= 0.18.1)
6
6
 
7
7
  GEM
@@ -7,11 +7,7 @@ Feature: Generating Config Files
7
7
  When I run `crane_rails bootstrap`
8
8
  Then the file "Vagrantfile" should contain:
9
9
  """
10
- config.vm.provision 'docker' do |d|
11
- d.run 'shicholas/postgresql', args: '-d --name=pg'
12
- d.pull_images 'shicholas/rails-server'
13
- d.pull_images 'shicholas/rails-guard'
14
- end
10
+ Vagrant.configure
15
11
  """
16
12
  Then the file "Gemfile" should contain:
17
13
  """
@@ -35,3 +31,7 @@ Feature: Generating Config Files
35
31
  """
36
32
  guard :rspec
37
33
  """
34
+ Then the file "override-plugin.rb" should contain:
35
+ """
36
+ # # vi: set ft=ruby :
37
+ """
@@ -17,6 +17,7 @@ module CraneRails
17
17
 
18
18
  copy_file '../templates/database.yml', 'config/database.yml'
19
19
 
20
+ template 'override-plugin.rb', 'override-plugin.rb'
20
21
  template 'rails.yml', 'tmuxinator-sample.yml'
21
22
  template 'Guardfile', 'Guardfile'
22
23
  end
@@ -5,8 +5,6 @@ Vagrant.configure('2') do |config|
5
5
 
6
6
  config.vm.network 'forwarded_port', guest: 3000, host: 3000
7
7
 
8
- config.vm.provision 'docker' do |d|
9
- end
10
8
  config.vm.provision 'shell', inline: <<-COMMANDS
11
9
  docker run --name=pg -d shicholas/postgresql
12
10
  docker pull shicholas/rails-server
@@ -0,0 +1,45 @@
1
+ # -*- mode: ruby -*-
2
+ # # vi: set ft=ruby :
3
+
4
+ # <hack>
5
+
6
+ # NOTE: This monkey-patching of the coreos guest plugin is a terrible
7
+ # hack that needs to be removed once the upstream plugin works with the
8
+ # new CoreOS images.
9
+
10
+ require Vagrant.source_root.join("plugins/guests/coreos/cap/configure_networks.rb")
11
+
12
+ module VagrantPlugins
13
+ module GuestCoreOS
14
+ module Cap
15
+ class ConfigureNetworks
16
+ include Vagrant::Util
17
+
18
+ def self.configure_networks(machine, networks)
19
+ machine.communicate.tap do |comm|
20
+ # Read network interface names
21
+ interfaces = []
22
+ comm.sudo("ifconfig | grep enp0 | cut -f1 -d:") do |_, result|
23
+ interfaces = result.split("interfaces\n")
24
+ end
25
+
26
+ # Configure interfaces
27
+ # FIXME: fix matching of interfaces with IP adresses
28
+ networks.each do |network|
29
+ comm.sudo("imagesfconfig #{interfaces[network[:interface].to_i]} #{network[:ip]} netmask #{network[:netmask]}")
30
+ end
31
+
32
+ end
33
+ end
34
+ end
35
+
36
+ class ChangeHostName
37
+ def self.change_host_name(machine, name)
38
+ # do nothing!
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+
45
+ # </hack>
@@ -1,3 +1,3 @@
1
1
  module CraneRails
2
- VERSION = '0.2.6'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crane_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Shook
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-26 00:00:00.000000000 Z
11
+ date: 2014-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -76,6 +76,7 @@ files:
76
76
  - lib/crane_rails/templates/Vagrantfile
77
77
  - lib/crane_rails/templates/crane.yml
78
78
  - lib/crane_rails/templates/database.yml
79
+ - lib/crane_rails/templates/override-plugin.rb
79
80
  - lib/crane_rails/templates/rails.yml
80
81
  - lib/crane_rails/version.rb
81
82
  homepage: https://github.com/shicholas/crane_rails