crane_rails 0.1.0 → 0.1.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 +4 -4
- data/Gemfile.lock +1 -1
- data/features/generator.feature +3 -11
- data/lib/crane_rails/cli.rb +2 -3
- data/lib/crane_rails/templates/Vagrantfile +7 -3
- data/lib/crane_rails/templates/database.yml +10 -38
- data/lib/crane_rails/templates/rails.yml +12 -0
- data/lib/crane_rails/version.rb +1 -1
- metadata +3 -5
- data/lib/crane_rails/templates/database-ci.yml +0 -29
- data/lib/crane_rails/templates/database-dev.yml +0 -29
- data/lib/crane_rails/templates/database-test.yml +0 -29
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 84e55868b7c1f38715a0a2cde15dc9e866ff327f
|
|
4
|
+
data.tar.gz: 492054d55627439cf91154933967b8a309a98238
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e02dac47e4b91361a91b2aa94d325c9ede9fed6da2eb90ddee83e6e7a77181d88bf30d8cdbf5fd1440471ef00683fa6bc7516808fd15e0bf1770d771365a82be
|
|
7
|
+
data.tar.gz: 261ce49b692bf2ae1aad331d6ea93b65f7665cdd4875dcdda9b073abd90452e26fe12d091a18bb8f37e396fd2c562ddadf152b3444e25bd2821f2c49d0f79411
|
data/Gemfile.lock
CHANGED
data/features/generator.feature
CHANGED
|
@@ -5,8 +5,6 @@ Feature: Generating Config Files
|
|
|
5
5
|
|
|
6
6
|
Scenario: Bootstrap
|
|
7
7
|
When I run `crane_rails bootstrap`
|
|
8
|
-
Then the following files should exist:
|
|
9
|
-
| Vagrantfile | Gemfile | Gemfile.lock | config/database.yml |
|
|
10
8
|
Then the file "Vagrantfile" should contain:
|
|
11
9
|
"""
|
|
12
10
|
Vagrant.configure('2') do |config|
|
|
@@ -22,18 +20,12 @@ Feature: Generating Config Files
|
|
|
22
20
|
GEM
|
|
23
21
|
remote:
|
|
24
22
|
"""
|
|
25
|
-
Then the file "config/database
|
|
23
|
+
Then the file "config/database.yml" should contain:
|
|
26
24
|
"""
|
|
27
25
|
development:
|
|
28
26
|
adapter: postgresql
|
|
29
27
|
"""
|
|
30
|
-
Then the file "
|
|
28
|
+
Then the file "tmuxinator-sample.yml" should contain:
|
|
31
29
|
"""
|
|
32
|
-
|
|
33
|
-
adapter: postgresql
|
|
34
|
-
"""
|
|
35
|
-
Then the file "config/database-ci.yml" should contain:
|
|
36
|
-
"""
|
|
37
|
-
ci:
|
|
38
|
-
adapter: postgresql
|
|
30
|
+
# ~/.tmuxinator/rails.yml
|
|
39
31
|
"""
|
data/lib/crane_rails/cli.rb
CHANGED
|
@@ -13,9 +13,8 @@ module CraneRails
|
|
|
13
13
|
template 'Vagrantfile', 'Vagrantfile'
|
|
14
14
|
get 'https://raw.githubusercontent.com/shicholas/Dockerfile-rails/master/Gemfile', 'Gemfile'
|
|
15
15
|
get 'https://raw.githubusercontent.com/shicholas/Dockerfile-rails/master/Gemfile.lock', 'Gemfile.lock'
|
|
16
|
-
template 'database
|
|
17
|
-
template '
|
|
18
|
-
template 'database-ci.yml', 'config/database-ci.yml'
|
|
16
|
+
template 'database.yml', 'config/database.yml'
|
|
17
|
+
template 'rails.yml', 'tmuxinator-sample.yml'
|
|
19
18
|
end
|
|
20
19
|
|
|
21
20
|
default_task :bootstrap
|
|
@@ -2,7 +2,7 @@ Vagrant.configure('2') do |config|
|
|
|
2
2
|
config.vm.box = 'coreos'
|
|
3
3
|
config.vm.box_url = 'http://storage.core-os.net/coreos/amd64-generic/dev-channel/coreos_production_vagrant.box'
|
|
4
4
|
|
|
5
|
-
config.vm.synced_folder '.', '/home/core/
|
|
5
|
+
config.vm.synced_folder '.', '/home/core/rails', id: 'core', type: 'rsync'
|
|
6
6
|
|
|
7
7
|
# Rails server port
|
|
8
8
|
config.vm.provider 'forwarded_port', guest: 3000, host: 3000
|
|
@@ -22,7 +22,11 @@ Vagrant.configure('2') do |config|
|
|
|
22
22
|
config.vbguest.auto_update = false
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
# install service containers for rails application
|
|
26
|
+
config.vm.provision 'shell', inline: <<-COMMANDS
|
|
27
|
+
docker run --name=pg -P shicholas/postgres
|
|
28
|
+
docker pull shicholas/rails-server
|
|
27
29
|
COMMANDS
|
|
30
|
+
|
|
31
|
+
config.vm.provision 'forwarded_port', guest: 3000, host: 3000
|
|
28
32
|
end
|
|
@@ -3,47 +3,19 @@ development:
|
|
|
3
3
|
encoding: unicode
|
|
4
4
|
database: rails_development
|
|
5
5
|
pool: 5
|
|
6
|
-
username:
|
|
7
|
-
password:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# domain sockets, so uncomment these lines.
|
|
12
|
-
host: $PG_PORT_5432_TCP_ADDR
|
|
13
|
-
|
|
14
|
-
# The TCP port the server listens on. Defaults to 5432.
|
|
15
|
-
# If your server runs on a different port number, change accordingly.
|
|
16
|
-
port: 5432
|
|
17
|
-
|
|
18
|
-
# Schema search path. The server defaults to $user,public
|
|
19
|
-
#schema_search_path: myapp,sharedapp,public
|
|
20
|
-
|
|
21
|
-
# Minimum log levels, in increasing order:
|
|
22
|
-
# debug5, debug4, debug3, debug2, debug1,
|
|
23
|
-
# log, notice, warning, error, fatal, and panic
|
|
24
|
-
# Defaults to warning.
|
|
25
|
-
#min_messages: notice
|
|
26
|
-
|
|
27
|
-
# Warning: The database defined as "test" will be erased and
|
|
28
|
-
# re-generated from your development database when you run "rake".
|
|
29
|
-
# Do not set this db to the same as development or production.
|
|
6
|
+
username: docker
|
|
7
|
+
password: docker
|
|
8
|
+
template: template0
|
|
9
|
+
host: <%= ENV['PG_PORT_5432_TCP_ADDR'] %>
|
|
10
|
+
port: <%= ENV['PG_PORT_5432_TCP_PORT'] %>
|
|
30
11
|
|
|
31
12
|
test:
|
|
32
13
|
adapter: postgresql
|
|
33
14
|
encoding: unicode
|
|
34
15
|
database: rails_test
|
|
35
16
|
pool: 5
|
|
36
|
-
username:
|
|
37
|
-
password:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
# production:
|
|
43
|
-
# adapter: postgresql
|
|
44
|
-
# encoding: unicode
|
|
45
|
-
# database: rails_production
|
|
46
|
-
# pool: 5
|
|
47
|
-
# username: rails
|
|
48
|
-
# password: password
|
|
49
|
-
|
|
17
|
+
username: docker
|
|
18
|
+
password: docker
|
|
19
|
+
template: template0
|
|
20
|
+
host: <%= ENV['PG_PORT_5432_TCP_ADDR'] %>
|
|
21
|
+
port: <%= ENV['PG_PORT_5432_TCP_PORT'] %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# ~/.tmuxinator/rails.yml
|
|
2
|
+
|
|
3
|
+
name: rails
|
|
4
|
+
root: .
|
|
5
|
+
|
|
6
|
+
# Initialize vagrant if it does not exist
|
|
7
|
+
pre: vagrant up
|
|
8
|
+
|
|
9
|
+
windows:
|
|
10
|
+
- vim: vim .
|
|
11
|
+
- server: vagrant ssh && docker run --name=server --link=pg:pg --volume=/rails:/rails:rw shicholas/rails-server
|
|
12
|
+
- misc: vagrant rsync-auto
|
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.1.
|
|
4
|
+
version: 0.1.2
|
|
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-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|
|
@@ -75,10 +75,8 @@ files:
|
|
|
75
75
|
- lib/crane_rails/generators/bootstrap.rb
|
|
76
76
|
- lib/crane_rails/templates/Vagrantfile
|
|
77
77
|
- lib/crane_rails/templates/crane.yml
|
|
78
|
-
- lib/crane_rails/templates/database-ci.yml
|
|
79
|
-
- lib/crane_rails/templates/database-dev.yml
|
|
80
|
-
- lib/crane_rails/templates/database-test.yml
|
|
81
78
|
- lib/crane_rails/templates/database.yml
|
|
79
|
+
- lib/crane_rails/templates/rails.yml
|
|
82
80
|
- lib/crane_rails/version.rb
|
|
83
81
|
homepage: https://github.com/shicholas/crane_rails
|
|
84
82
|
licenses: []
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
development:
|
|
2
|
-
adapter: postgresql
|
|
3
|
-
encoding: unicode
|
|
4
|
-
database: rails_development
|
|
5
|
-
pool: 5
|
|
6
|
-
username: rails
|
|
7
|
-
password: password
|
|
8
|
-
host: $PG_PORT_5432_TCP_ADDR
|
|
9
|
-
port: 5432
|
|
10
|
-
|
|
11
|
-
# test:
|
|
12
|
-
# adapter: postgresql
|
|
13
|
-
# encoding: unicode
|
|
14
|
-
# database: rails_test
|
|
15
|
-
# pool: 5
|
|
16
|
-
# username: rails
|
|
17
|
-
# password: password
|
|
18
|
-
# host: $PG_PORT_5432_TCP_ADDR
|
|
19
|
-
# port: 5432
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# production:
|
|
23
|
-
# adapter: postgresql
|
|
24
|
-
# encoding: unicode
|
|
25
|
-
# database: rails_production
|
|
26
|
-
# pool: 5
|
|
27
|
-
# username: rails
|
|
28
|
-
# password: password
|
|
29
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
development:
|
|
2
|
-
adapter: postgresql
|
|
3
|
-
encoding: unicode
|
|
4
|
-
database: rails_development
|
|
5
|
-
pool: 5
|
|
6
|
-
username: rails
|
|
7
|
-
password: password
|
|
8
|
-
host: $PG_PORT_5432_TCP_ADDR
|
|
9
|
-
port: 5432
|
|
10
|
-
|
|
11
|
-
# test:
|
|
12
|
-
# adapter: postgresql
|
|
13
|
-
# encoding: unicode
|
|
14
|
-
# database: rails_test
|
|
15
|
-
# pool: 5
|
|
16
|
-
# username: rails
|
|
17
|
-
# password: password
|
|
18
|
-
# host: $PG_PORT_5432_TCP_ADDR
|
|
19
|
-
# port: 5432
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# production:
|
|
23
|
-
# adapter: postgresql
|
|
24
|
-
# encoding: unicode
|
|
25
|
-
# database: rails_production
|
|
26
|
-
# pool: 5
|
|
27
|
-
# username: rails
|
|
28
|
-
# password: password
|
|
29
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
development:
|
|
2
|
-
adapter: postgresql
|
|
3
|
-
encoding: unicode
|
|
4
|
-
database: rails_development
|
|
5
|
-
pool: 5
|
|
6
|
-
username: rails
|
|
7
|
-
password: password
|
|
8
|
-
host: $PG_PORT_5432_TCP_ADDR
|
|
9
|
-
port: 5432
|
|
10
|
-
|
|
11
|
-
# test:
|
|
12
|
-
# adapter: postgresql
|
|
13
|
-
# encoding: unicode
|
|
14
|
-
# database: rails_test
|
|
15
|
-
# pool: 5
|
|
16
|
-
# username: rails
|
|
17
|
-
# password: password
|
|
18
|
-
# host: $PG_PORT_5432_TCP_ADDR
|
|
19
|
-
# port: 5432
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# production:
|
|
23
|
-
# adapter: postgresql
|
|
24
|
-
# encoding: unicode
|
|
25
|
-
# database: rails_production
|
|
26
|
-
# pool: 5
|
|
27
|
-
# username: rails
|
|
28
|
-
# password: password
|
|
29
|
-
|