rob_cap_recipes 0.0.5.alpha4 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -2
- data/lib/rob_cap_recipes/device.rb +1 -0
- data/lib/rob_cap_recipes/recipes/device.cap +20 -0
- data/lib/rob_cap_recipes/recipes/mysql.cap +0 -1
- data/lib/rob_cap_recipes/recipes/templates/device_ldap.yml.erb +52 -0
- data/lib/rob_cap_recipes/recipes/templates/nginx.erb +1 -1
- data/lib/rob_cap_recipes/recipes.rb +0 -8
- data/lib/rob_cap_recipes/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9eb893060fbb1f9b79f531cab0fbf6896d12f466
|
4
|
+
data.tar.gz: 00b7089d158f2be6e9ef083ae2f137d16f36ac59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c13822a5aa5a385ed903b6ce9488879d8b2d990af2509e23ac94a28152e10704f50a4b66e97b75ce11191526563422c68dfdc27df0fa48e31ec4954b356f0fce
|
7
|
+
data.tar.gz: 1c0b886205fec0be75c67ce4612a18c5318d121c4f985f3d5b5e9241b9b027c3e4f905273bd2326f1f541a6f78a626ef77695be5f80f775731d9e9b1dc89dcbd
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# CapRecipes
|
2
2
|
|
3
|
-
|
3
|
+
Some simple recips to use with Capistrano 3 to simplify a deployment
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,13 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
To include in deployment add this line to youre deploy.rb after you have "set :application 'MyApp'"
|
22
|
+
|
23
|
+
require 'rob_cap_recipes/recipes'
|
24
|
+
|
25
|
+
To include generation of ldap.yml at deploy:install add this line to youre deploy.rb file after 'rob_cap_recipes/recipes'
|
26
|
+
|
27
|
+
require 'rob_cap_recipes/device'
|
22
28
|
|
23
29
|
## Contributing
|
24
30
|
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../recipes/device.cap', __FILE__)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
namespace :device do
|
2
|
+
ask(:ldap_host, "ldap.stridsberg.nu" )
|
3
|
+
ask(:ldap_port, "636, 389")
|
4
|
+
ask(:ldap_base, "cn=users,dc=stridsberg,dc=nu")
|
5
|
+
ask(:ldap_user, "uid=admin,dc=stridsberg,dc=nu")
|
6
|
+
ask(:ldap_user_password, "")
|
7
|
+
|
8
|
+
set :linked_files, fetch(:linked_files) + %w{config/ldap.yml}
|
9
|
+
|
10
|
+
task :setup do
|
11
|
+
on roles( :app ) do
|
12
|
+
execute :mkdir, '-pv', "#{shared_path}/config"
|
13
|
+
unless File.exist?("#{shared_path}/config/ldap.yml")
|
14
|
+
template "device_ldap.yml.erb", "#{shared_path}/config/ldap.yml"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
after "deploy:install", "device:setup"
|
19
|
+
|
20
|
+
end
|
@@ -18,7 +18,6 @@ namespace :mysql do
|
|
18
18
|
|
19
19
|
task :setup do
|
20
20
|
on roles( :app ) do
|
21
|
-
# execute %{mkdir -pv "#{shared_path}/config"}
|
22
21
|
execute :mkdir, '-pv', "#{shared_path}/config"
|
23
22
|
unless File.exist?("#{shared_path}/config/database.yml")
|
24
23
|
template "mysql.yml.erb", "#{shared_path}/config/database.yml"
|
@@ -0,0 +1,52 @@
|
|
1
|
+
## Authorizations
|
2
|
+
# Uncomment out the merging for each environment that you'd like to include.
|
3
|
+
# You can also just copy and paste the tree (do not include the "authorizations") to each
|
4
|
+
# environment if you need something different per enviornment.
|
5
|
+
authorizations: &AUTHORIZATIONS
|
6
|
+
#group_base: ou=groups,dc=test,dc=com
|
7
|
+
## Requires config.ldap_check_group_membership in devise.rb be true
|
8
|
+
# Can have multiple values, must match all to be authorized
|
9
|
+
#required_groups:
|
10
|
+
# If only a group name is given, membership will be checked against "uniqueMember"
|
11
|
+
#- cn=admins,ou=groups,dc=test,dc=com
|
12
|
+
#- cn=users,ou=groups,dc=test,dc=com
|
13
|
+
# If an array is given, the first element will be the attribute to check against, the second the group name
|
14
|
+
#- ["moreMembers", "cn=users,ou=groups,dc=test,dc=com"]
|
15
|
+
## Requires config.ldap_check_attributes in devise.rb to be true
|
16
|
+
## Can have multiple attributes and values, must match all to be authorized
|
17
|
+
require_attribute:
|
18
|
+
objectClass: inetOrgPerson
|
19
|
+
authorizationRole: postsAdmin
|
20
|
+
|
21
|
+
## Environment
|
22
|
+
|
23
|
+
development:
|
24
|
+
host: <%= fetch(:ldap_host) %>
|
25
|
+
port: <%= fetch(:ldap_port%>
|
26
|
+
attribute: mail
|
27
|
+
base: <%= fetch(:ldap_base) %>
|
28
|
+
admin_user: <%= fetch(:ldap_user) %>
|
29
|
+
admin_password: <%= fetch(:ldap_user_password)%>
|
30
|
+
ssl: false
|
31
|
+
# <<: *AUTHORIZATIONS
|
32
|
+
|
33
|
+
test:
|
34
|
+
host: <%= fetch(:ldap_host) %> ldap.stridsberg.nu
|
35
|
+
port: <%= fetch(:ldap_port%>
|
36
|
+
attribute: mail
|
37
|
+
base: <%= fetch(:ldap_base) %>
|
38
|
+
admin_user: <%= fetch(:ldap_user) %>
|
39
|
+
admin_password: <%= fetch(:ldap_user_password)%>
|
40
|
+
ssl: false
|
41
|
+
# <<: *AUTHORIZATIONS
|
42
|
+
|
43
|
+
production:
|
44
|
+
host: <%= fetch(:ldap_host) %>
|
45
|
+
port: <%= fetch(:ldap_port%>
|
46
|
+
attribute: mail
|
47
|
+
base: <%= fetch(:ldap_base) %>
|
48
|
+
admin_user: <%= fetch(:ldap_user) %>
|
49
|
+
admin_password: <%= fetch(:ldap_user_password)%>
|
50
|
+
ssl: start_tls
|
51
|
+
# <<: *AUTHORIZATIONS
|
52
|
+
|
@@ -1,11 +1,3 @@
|
|
1
|
-
#require "rob_cap_recipes/recipes/base"
|
2
|
-
#require "rob_cap_recipes/recipes/nginx"
|
3
|
-
##require "rob_cap_recipes/recipes/puma"
|
4
|
-
##require "rob_cap_recipes/recipes/unicorn"
|
5
|
-
#require "rob_cap_recipes/recipes/nodejs"
|
6
|
-
##require "rob_cap_recipes/recipes/rbenv"
|
7
|
-
#require "rob_cap_recipes/recipes/check"
|
8
|
-
#require 'rob_cap_recipes/recipes/mysql'
|
9
1
|
load File.expand_path('../recipes/base.cap', __FILE__)
|
10
2
|
load File.expand_path('../recipes/nodejs.cap', __FILE__)
|
11
3
|
load File.expand_path('../recipes/check.cap', __FILE__)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rob_cap_recipes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Stridsberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -37,16 +37,19 @@ files:
|
|
37
37
|
- README.md
|
38
38
|
- Rakefile
|
39
39
|
- lib/rob_cap_recipes.rb
|
40
|
+
- lib/rob_cap_recipes/device.rb
|
40
41
|
- lib/rob_cap_recipes/railtie.rb
|
41
42
|
- lib/rob_cap_recipes/recipes.rb
|
42
43
|
- lib/rob_cap_recipes/recipes/base.cap
|
43
44
|
- lib/rob_cap_recipes/recipes/check.cap
|
44
45
|
- lib/rob_cap_recipes/recipes/common.rb
|
46
|
+
- lib/rob_cap_recipes/recipes/device.cap
|
45
47
|
- lib/rob_cap_recipes/recipes/mysql.cap
|
46
48
|
- lib/rob_cap_recipes/recipes/nginx.cap
|
47
49
|
- lib/rob_cap_recipes/recipes/nodejs.cap
|
48
50
|
- lib/rob_cap_recipes/recipes/puma.cap
|
49
51
|
- lib/rob_cap_recipes/recipes/rbenv.cap
|
52
|
+
- lib/rob_cap_recipes/recipes/templates/device_ldap.yml.erb
|
50
53
|
- lib/rob_cap_recipes/recipes/templates/mysql.yml.erb
|
51
54
|
- lib/rob_cap_recipes/recipes/templates/nginx.erb
|
52
55
|
- lib/rob_cap_recipes/recipes/templates/puma.rb.erb
|
@@ -72,9 +75,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
75
|
version: '0'
|
73
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
77
|
requirements:
|
75
|
-
- - '
|
78
|
+
- - '>='
|
76
79
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
80
|
+
version: '0'
|
78
81
|
requirements: []
|
79
82
|
rubyforge_project:
|
80
83
|
rubygems_version: 2.0.6
|