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 +4 -4
- data/Gemfile.lock +1 -1
- data/features/generator.feature +5 -5
- data/lib/crane_rails/cli.rb +1 -0
- data/lib/crane_rails/templates/Vagrantfile +0 -2
- data/lib/crane_rails/templates/override-plugin.rb +45 -0
- data/lib/crane_rails/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79a0cfc0c039108eecee7743780ada7bfb4e67d9
|
4
|
+
data.tar.gz: 763cd3be89ec84c8efdcc4abb395c83e49259bd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dccbdcda3835994df19cfa8f982889a607c2c90859c569ff0670df3d9560dbd0b68bbc45d16f20139e4b4581ea0d164aaaedc46df3a6f4d78c0ddfba9e9b99b
|
7
|
+
data.tar.gz: c3a1d9489058f419b02cf132ce63eda57ab3e55986b68ceda531cc68e8201add6842a53bdc7d70b88b88ebbe56e239ae02fc96efe7fbd0ffab3b5c7219a215e1
|
data/Gemfile.lock
CHANGED
data/features/generator.feature
CHANGED
@@ -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
|
-
|
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
|
+
"""
|
data/lib/crane_rails/cli.rb
CHANGED
@@ -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>
|
data/lib/crane_rails/version.rb
CHANGED
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.
|
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-
|
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
|