ruby-ldap 0.9.12 → 0.9.13

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.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +5 -1
  3. data/NOTES +7 -0
  4. data/README +1 -0
  5. data/TODO +0 -10
  6. data/lib/ldap/ldif.rb +1 -0
  7. data/rbldap.h +1 -1
  8. metadata +9 -41
  9. data/test/cookbooks/apt/metadata.rb +0 -13
  10. data/test/cookbooks/apt/providers/repository.rb +0 -73
  11. data/test/cookbooks/apt/recipes/cacher-client.rb +0 -44
  12. data/test/cookbooks/apt/recipes/cacher.rb +0 -45
  13. data/test/cookbooks/apt/recipes/default.rb +0 -50
  14. data/test/cookbooks/apt/resources/repository.rb +0 -30
  15. data/test/cookbooks/nginx/attributes/default.rb +0 -35
  16. data/test/cookbooks/nginx/definitions/nginx_site.rb +0 -35
  17. data/test/cookbooks/nginx/metadata.rb +0 -86
  18. data/test/cookbooks/nginx/recipes/default.rb +0 -56
  19. data/test/cookbooks/nginx/recipes/source.rb +0 -143
  20. data/test/cookbooks/openldap/attributes/default.rb +0 -61
  21. data/test/cookbooks/openldap/metadata.rb +0 -99
  22. data/test/cookbooks/openldap/recipes/auth.rb +0 -70
  23. data/test/cookbooks/openldap/recipes/client.rb +0 -28
  24. data/test/cookbooks/openldap/recipes/default.rb +0 -18
  25. data/test/cookbooks/openldap/recipes/server.rb +0 -110
  26. data/test/cookbooks/postgresql/attributes/default.rb +0 -68
  27. data/test/cookbooks/postgresql/metadata.rb +0 -15
  28. data/test/cookbooks/postgresql/recipes/client.rb +0 -27
  29. data/test/cookbooks/postgresql/recipes/default.rb +0 -20
  30. data/test/cookbooks/postgresql/recipes/server.rb +0 -36
  31. data/test/cookbooks/postgresql/recipes/server_debian.rb +0 -51
  32. data/test/cookbooks/postgresql/recipes/server_redhat.rb +0 -84
  33. data/test/cookbooks/sqlite/metadata.rb +0 -11
  34. data/test/cookbooks/sqlite/recipes/default.rb +0 -26
  35. data/test/cookbooks/vagrant_main/recipes/default.rb +0 -12
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: df51bf1583a52ae481a36a094cc0b13485cb4427
4
+ data.tar.gz: c68dcb046b37bf72da38bb609a4b20a041bae0ad
5
+ SHA512:
6
+ metadata.gz: 61ca227999a49618d0a87076578c7a2699f0d0fd39fab8ebfa95f011178bfeff8b120f88dc63137cec493f8d168a9a32a8462c56e1020b9b115a41e27dc9ce4f
7
+ data.tar.gz: 91b6abc130135548351a4a6450eeab35add793246d118db165d91c0fefd5c79cde9047b89401219e3a7a77527e0578cb93b19e0ecddda5c45e8d0bc10d657095
data/ChangeLog CHANGED
@@ -1,6 +1,10 @@
1
+ Wed Jun 5 17:44:47 UTC 2013 Alexey Chebotar <alexey.chebotar@gmail.com>
2
+ * Version 0.9.13
3
+ * Prevent SyntaxError raised under Ruby 2.0.0 by line 107 regex
4
+ (invalid multibyte escape). Thanks to Andrew Broman.
5
+
1
6
  Tue Dec 27 15:17:03 UTC 2011 Alexey Chebotar <alexey.chebotar@gmail.com>
2
7
  * Version 0.9.12
3
-
4
8
  * Enable client certificate authentication for mozilla ldap 6.0 only.
5
9
  Thank to Yuri Arabadji.
6
10
  * New patch for LDAP::Mod data corruption. Thanks to Aprotim Sanyal.
data/NOTES CHANGED
@@ -1,3 +1,10 @@
1
+ 0.9.13
2
+ -----
3
+
4
+ * Prevent SyntaxError raised under Ruby 2.0.0 by line 107 regex
5
+ (invalid multibyte escape)
6
+
7
+
1
8
  0.9.12
2
9
  -----
3
10
 
data/README CHANGED
@@ -246,6 +246,7 @@ This list maybe not correct. If you notice mistakes of this list, please point o
246
246
  * Adam Doligalski
247
247
  * Akinori MUSHA
248
248
  * Akira Yamada
249
+ * Andrew Broman
249
250
  * Anthony M. Martinez
250
251
  * Antonio Terceiro
251
252
  * Aprotim Sanyal
data/TODO CHANGED
@@ -3,16 +3,6 @@
3
3
  To-do list
4
4
  ----------
5
5
 
6
- - Setup a vagrant boxes for tests:
7
- * 32/64 Ubuntu Lucid ( ruby-ldap http://packages.ubuntu.com/lucid/libldap-ruby1.8 )
8
- * 32/64 Debian 6.0.3 ( ruby-ldap http://packages.debian.org/sid/ruby/libldap-ruby1.8 )
9
- * 32/64 Arch 2011.08.19 ( ruby-ldap https://aur.archlinux.org/packages.php?ID=13471 )
10
- * 32/64 FreeBSD 8.2 (9.0-RC1, 7.4) ( ruby-ldap http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/ruby-ldap/ )
11
-
12
-
13
- Ian's Td-do list
14
- ----------
15
-
16
6
  - Support for more LDAPv3 controls and extensions.
17
7
 
18
8
  - DSML support.
data/lib/ldap/ldif.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: US-ASCII
1
2
  # Manipulation of LDIF data.
2
3
  #
3
4
  #--
data/rbldap.h CHANGED
@@ -28,7 +28,7 @@
28
28
  #define RB_LDAP_MAJOR_VERSION 0
29
29
  #define RB_LDAP_MINOR_VERSION 9
30
30
  #define RB_LDAP_PATCH_VERSION 12
31
- #define RB_LDAP_VERSION "0.9.12"
31
+ #define RB_LDAP_VERSION "0.9.13"
32
32
 
33
33
  #define LDAP_GET_OPT_MAX_BUFFER_SIZE (1024) /* >= sizeof(LDAPAPIInfo) */
34
34
 
metadata CHANGED
@@ -1,21 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-ldap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.12
5
- prerelease:
4
+ version: 0.9.13
6
5
  platform: ruby
7
6
  authors:
8
7
  - Alexey Chebotar
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2011-12-27 00:00:00.000000000 Z
11
+ date: 2013-06-05 00:00:00.000000000 Z
13
12
  dependencies: []
14
- description: ! 'It provides the interface to some LDAP libraries (e.g. OpenLDAP, Netscape
15
- SDK and Active Directory). The common API for application development is described
16
- in RFC1823 and is supported by Ruby/LDAP.
17
-
18
- '
13
+ description: |
14
+ It provides the interface to some LDAP libraries (e.g. OpenLDAP, Netscape SDK and Active Directory). The common API for application development is described in RFC1823 and is supported by Ruby/LDAP.
19
15
  email: alexey.chebotar@gmail.com
20
16
  executables: []
21
17
  extensions:
@@ -41,33 +37,6 @@ files:
41
37
  - test/bind.rb
42
38
  - test/compare.rb
43
39
  - test/conf.rb
44
- - test/cookbooks/apt/metadata.rb
45
- - test/cookbooks/apt/providers/repository.rb
46
- - test/cookbooks/apt/recipes/cacher-client.rb
47
- - test/cookbooks/apt/recipes/cacher.rb
48
- - test/cookbooks/apt/recipes/default.rb
49
- - test/cookbooks/apt/resources/repository.rb
50
- - test/cookbooks/nginx/attributes/default.rb
51
- - test/cookbooks/nginx/definitions/nginx_site.rb
52
- - test/cookbooks/nginx/metadata.rb
53
- - test/cookbooks/nginx/recipes/default.rb
54
- - test/cookbooks/nginx/recipes/source.rb
55
- - test/cookbooks/openldap/attributes/default.rb
56
- - test/cookbooks/openldap/metadata.rb
57
- - test/cookbooks/openldap/recipes/auth.rb
58
- - test/cookbooks/openldap/recipes/client.rb
59
- - test/cookbooks/openldap/recipes/default.rb
60
- - test/cookbooks/openldap/recipes/server.rb
61
- - test/cookbooks/postgresql/attributes/default.rb
62
- - test/cookbooks/postgresql/metadata.rb
63
- - test/cookbooks/postgresql/recipes/client.rb
64
- - test/cookbooks/postgresql/recipes/default.rb
65
- - test/cookbooks/postgresql/recipes/server.rb
66
- - test/cookbooks/postgresql/recipes/server_debian.rb
67
- - test/cookbooks/postgresql/recipes/server_redhat.rb
68
- - test/cookbooks/sqlite/metadata.rb
69
- - test/cookbooks/sqlite/recipes/default.rb
70
- - test/cookbooks/vagrant_main/recipes/default.rb
71
40
  - test/delete.rb
72
41
  - test/ext.rb
73
42
  - test/misc1.rb
@@ -98,26 +67,25 @@ files:
98
67
  - win/wldap32.def
99
68
  homepage: http://ruby-ldap.sourceforge.net/
100
69
  licenses: []
70
+ metadata: {}
101
71
  post_install_message:
102
72
  rdoc_options: []
103
73
  require_paths:
104
74
  - lib
105
75
  required_ruby_version: !ruby/object:Gem::Requirement
106
- none: false
107
76
  requirements:
108
- - - ! '>='
77
+ - - '>='
109
78
  - !ruby/object:Gem::Version
110
79
  version: '0'
111
80
  required_rubygems_version: !ruby/object:Gem::Requirement
112
- none: false
113
81
  requirements:
114
- - - ! '>='
82
+ - - '>='
115
83
  - !ruby/object:Gem::Version
116
84
  version: '0'
117
85
  requirements: []
118
86
  rubyforge_project: ruby-ldap
119
- rubygems_version: 1.8.13
87
+ rubygems_version: 2.0.2
120
88
  signing_key:
121
- specification_version: 3
89
+ specification_version: 4
122
90
  summary: Ruby/LDAP is an extension module for Ruby
123
91
  test_files: []
@@ -1,13 +0,0 @@
1
- maintainer "Opscode, Inc."
2
- maintainer_email "cookbooks@opscode.com"
3
- license "Apache 2.0"
4
- description "Configures apt and apt services and an LWRP for managing apt repositories"
5
- long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
6
- version "1.2.0"
7
- recipe "apt", "Runs apt-get update during compile phase and sets up preseed directories"
8
- recipe "apt::cacher", "Set up an APT cache"
9
- recipe "apt::cacher-client", "Client for the apt::cacher server"
10
-
11
- %w{ ubuntu debian }.each do |os|
12
- supports os
13
- end
@@ -1,73 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Provider:: repository
4
- #
5
- # Copyright 2010-2011, Opscode, Inc.
6
- #
7
- # Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- # See the License for the specific language governing permissions and
17
- # limitations under the License.
18
- #
19
-
20
- action :add do
21
- unless ::File.exists?("/etc/apt/sources.list.d/#{new_resource.repo_name}-source.list")
22
- Chef::Log.info "Adding #{new_resource.repo_name} repository to /etc/apt/sources.list.d/#{new_resource.repo_name}-source.list"
23
- # add key
24
- if new_resource.keyserver && new_resource.key
25
- execute "install-key #{new_resource.key}" do
26
- command "apt-key adv --keyserver #{new_resource.keyserver} --recv #{new_resource.key}"
27
- action :nothing
28
- end.run_action(:run)
29
- elsif new_resource.key && (new_resource.key =~ /http/)
30
- key_name = new_resource.key.split(/\//).last
31
- remote_file "#{Chef::Config[:file_cache_path]}/#{key_name}" do
32
- source new_resource.key
33
- mode "0644"
34
- action :nothing
35
- end.run_action(:create_if_missing)
36
- execute "install-key #{key_name}" do
37
- command "apt-key add #{Chef::Config[:file_cache_path]}/#{key_name}"
38
- action :nothing
39
- end.run_action(:run)
40
- end
41
- # build our listing
42
- repository = "deb"
43
- repository = "deb-src" if new_resource.deb_src
44
- repository = "# Created by the Chef apt_repository LWRP\n" + repository
45
- repository += " #{new_resource.uri}"
46
- repository += " #{new_resource.distribution}"
47
- new_resource.components.each {|component| repository += " #{component}"}
48
- # write out the file, replace it if it already exists
49
- file "/etc/apt/sources.list.d/#{new_resource.repo_name}-source.list" do
50
- owner "root"
51
- group "root"
52
- mode 0644
53
- content repository + "\n"
54
- action :nothing
55
- end.run_action(:create)
56
- execute "update package index" do
57
- command "apt-get update"
58
- ignore_failure true
59
- action :nothing
60
- end.run_action(:run)
61
- new_resource.updated_by_last_action(true)
62
- end
63
- end
64
-
65
- action :remove do
66
- if ::File.exists?("/etc/apt/sources.list.d/#{new_resource.repo_name}-source.list")
67
- Chef::Log.info "Removing #{new_resource.repo_name} repository from /etc/apt/sources.list.d/"
68
- file "/etc/apt/sources.list.d/#{new_resource.repo_name}-source.list" do
69
- action :delete
70
- end
71
- new_resource.updated_by_last_action(true)
72
- end
73
- end
@@ -1,44 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Recipe:: cacher-client
4
- #
5
- # Copyright 2011, Opscode, Inc.
6
- #
7
- # Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- # See the License for the specific language governing permissions and
17
- # limitations under the License.
18
- #
19
-
20
- #remove Acquire::http::Proxy lines from /etc/apt/apt.conf since we use 01proxy
21
- #these are leftover from preseed installs
22
- execute "Remove proxy from /etc/apt/apt.conf" do
23
- command "sed --in-place '/^Acquire::http::Proxy/d' /etc/apt/apt.conf"
24
- only_if "grep Acquire::http::Proxy /etc/apt/apt.conf"
25
- end
26
-
27
- servers = search(:node, 'recipes:apt\:\:cacher') || []
28
- if servers.length > 0
29
- Chef::Log.info("apt-cacher server found on #{servers[0]}.")
30
- proxy = "Acquire::http::Proxy \"http://#{servers[0].ipaddress}:3142\";\n"
31
- file "/etc/apt/apt.conf.d/01proxy" do
32
- owner "root"
33
- group "root"
34
- mode "0644"
35
- content proxy
36
- action :create
37
- end
38
- else
39
- Chef::Log.info("No apt-cacher server found.")
40
- file "/etc/apt/apt.conf.d/01proxy" do
41
- action :delete
42
- only_if {File.exists?("/etc/apt/apt.conf.d/01proxy")}
43
- end
44
- end
@@ -1,45 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Recipe:: cacher
4
- #
5
- # Copyright 2008-2011, Opscode, Inc.
6
- #
7
- # Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- # See the License for the specific language governing permissions and
17
- # limitations under the License.
18
- #
19
- package "apt-cacher" do
20
- action :install
21
- end
22
-
23
- service "apt-cacher" do
24
- supports :restart => true, :status => false
25
- action [ :enable, :start ]
26
- end
27
-
28
- cookbook_file "/etc/apt-cacher/apt-cacher.conf" do
29
- source "apt-cacher.conf"
30
- owner "root"
31
- group "root"
32
- mode 0644
33
- notifies :restart, resources(:service => "apt-cacher")
34
- end
35
-
36
- cookbook_file "/etc/default/apt-cacher" do
37
- source "apt-cacher"
38
- owner "root"
39
- group "root"
40
- mode 0644
41
- notifies :restart, resources(:service => "apt-cacher")
42
- end
43
-
44
- #this will help seed the proxy
45
- include_recipe "apt::cacher-client"
@@ -1,50 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Recipe:: default
4
- #
5
- # Copyright 2008-2011, Opscode, Inc.
6
- # Copyright 2009, Bryan McLellan <btm@loftninjas.org>
7
- #
8
- # Licensed under the Apache License, Version 2.0 (the "License");
9
- # you may not use this file except in compliance with the License.
10
- # You may obtain a copy of the License at
11
- #
12
- # http://www.apache.org/licenses/LICENSE-2.0
13
- #
14
- # Unless required by applicable law or agreed to in writing, software
15
- # distributed under the License is distributed on an "AS IS" BASIS,
16
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
-
21
- # Run apt-get update to create the stamp file
22
- execute "apt-get-update" do
23
- command "apt-get update"
24
- ignore_failure true
25
- not_if do ::File.exists?('/var/lib/apt/periodic/update-success-stamp') end
26
- action :nothing
27
- end
28
-
29
- # provides /var/lib/apt/periodic/update-success-stamp on apt-get update
30
- package "update-notifier-common" do
31
- notifies :run, resources(:execute => "apt-get-update"), :immediately
32
- end
33
-
34
- execute "apt-get-update-periodic" do
35
- command "apt-get update"
36
- ignore_failure true
37
- only_if do
38
- File.exists?('/var/lib/apt/periodic/update-success-stamp') &&
39
- File.mtime('/var/lib/apt/periodic/update-success-stamp') < Time.now - 86400
40
- end
41
- end
42
-
43
- %w{/var/cache/local /var/cache/local/preseeding}.each do |dirname|
44
- directory dirname do
45
- owner "root"
46
- group "root"
47
- mode 0644
48
- action :create
49
- end
50
- end
@@ -1,30 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Resource:: repository
4
- #
5
- # Copyright 2010-2011, Opscode, Inc.
6
- #
7
- # Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- # See the License for the specific language governing permissions and
17
- # limitations under the License.
18
- #
19
-
20
- actions :add, :remove
21
-
22
- #name of the repo, used for source.list filename
23
- attribute :repo_name, :kind_of => String, :name_attribute => true
24
- attribute :uri, :kind_of => String
25
- attribute :distribution, :kind_of => String
26
- attribute :components, :kind_of => Array, :default => []
27
- #whether or not to add the repository as a source repo as well
28
- attribute :deb_src, :default => false
29
- attribute :keyserver, :kind_of => String, :default => nil
30
- attribute :key, :kind_of => String, :default => nil
@@ -1,35 +0,0 @@
1
- default[:nginx][:version] = "0.8.54"
2
-
3
- case platform
4
- when "debian","ubuntu"
5
- set[:nginx][:dir] = "/etc/nginx"
6
- set[:nginx][:log_dir] = "/var/log/nginx"
7
- set[:nginx][:user] = "www-data"
8
- set[:nginx][:binary] = "/usr/sbin/nginx"
9
- else
10
- set[:nginx][:dir] = "/etc/nginx"
11
- set[:nginx][:log_dir] = "/var/log/nginx"
12
- set[:nginx][:user] = "www-data"
13
- set[:nginx][:binary] = "/usr/sbin/nginx"
14
- end
15
-
16
- default[:nginx][:gzip] = "on"
17
- default[:nginx][:gzip_http_version] = "1.0"
18
- default[:nginx][:gzip_comp_level] = "2"
19
- default[:nginx][:gzip_proxied] = "any"
20
- default[:nginx][:gzip_types] = [
21
- "text/plain",
22
- "text/html",
23
- "text/css",
24
- "application/x-javascript",
25
- "text/xml",
26
- "application/xml",
27
- "application/xml+rss",
28
- "text/javascript"
29
- ]
30
-
31
- default[:nginx][:keepalive] = "on"
32
- default[:nginx][:keepalive_timeout] = 65
33
- default[:nginx][:worker_processes] = cpu[:total]
34
- default[:nginx][:worker_connections] = 2048
35
- default[:nginx][:server_names_hash_bucket_size] = 64
@@ -1,35 +0,0 @@
1
- #
2
- # Cookbook Name:: nginx
3
- # Definition:: nginx_site
4
- # Author:: AJ Christensen <aj@junglist.gen.nz>
5
- #
6
- # Copyright 2008-2009, Opscode, Inc.
7
- #
8
- # Licensed under the Apache License, Version 2.0 (the "License");
9
- # you may not use this file except in compliance with the License.
10
- # You may obtain a copy of the License at
11
- #
12
- # http://www.apache.org/licenses/LICENSE-2.0
13
- #
14
- # Unless required by applicable law or agreed to in writing, software
15
- # distributed under the License is distributed on an "AS IS" BASIS,
16
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
-
21
- define :nginx_site, :enable => true do
22
- if params[:enable]
23
- execute "nxensite #{params[:name]}" do
24
- command "/usr/sbin/nxensite #{params[:name]}"
25
- notifies :restart, resources(:service => "nginx")
26
- not_if do ::File.symlink?("#{node[:nginx][:dir]}/sites-enabled/#{params[:name]}") end
27
- end
28
- else
29
- execute "nxdissite #{params[:name]}" do
30
- command "/usr/sbin/nxdissite #{params[:name]}"
31
- notifies :restart, resources(:service => "nginx")
32
- only_if do ::File.symlink?("#{node[:nginx][:dir]}/sites-enabled/#{params[:name]}") end
33
- end
34
- end
35
- end
@@ -1,86 +0,0 @@
1
- maintainer "Opscode, Inc."
2
- maintainer_email "cookbooks@opscode.com"
3
- license "Apache 2.0"
4
- description "Installs and configures nginx"
5
- version "0.99.0"
6
-
7
- recipe "nginx", "Installs nginx package and sets up configuration with Debian apache style with sites-enabled/sites-available"
8
- recipe "nginx::source", "Installs nginx from source and sets up configuration with Debian apache style with sites-enabled/sites-available"
9
-
10
- %w{ ubuntu debian centos redhat fedora }.each do |os|
11
- supports os
12
- end
13
-
14
- %w{ build-essential runit }.each do |cb|
15
- depends cb
16
- end
17
-
18
- attribute "nginx/dir",
19
- :display_name => "Nginx Directory",
20
- :description => "Location of nginx configuration files",
21
- :default => "/etc/nginx"
22
-
23
- attribute "nginx/log_dir",
24
- :display_name => "Nginx Log Directory",
25
- :description => "Location for nginx logs",
26
- :default => "/var/log/nginx"
27
-
28
- attribute "nginx/user",
29
- :display_name => "Nginx User",
30
- :description => "User nginx will run as",
31
- :default => "www-data"
32
-
33
- attribute "nginx/binary",
34
- :display_name => "Nginx Binary",
35
- :description => "Location of the nginx server binary",
36
- :default => "/usr/sbin/nginx"
37
-
38
- attribute "nginx/gzip",
39
- :display_name => "Nginx Gzip",
40
- :description => "Whether gzip is enabled",
41
- :default => "on"
42
-
43
- attribute "nginx/gzip_http_version",
44
- :display_name => "Nginx Gzip HTTP Version",
45
- :description => "Version of HTTP Gzip",
46
- :default => "1.0"
47
-
48
- attribute "nginx/gzip_comp_level",
49
- :display_name => "Nginx Gzip Compression Level",
50
- :description => "Amount of compression to use",
51
- :default => "2"
52
-
53
- attribute "nginx/gzip_proxied",
54
- :display_name => "Nginx Gzip Proxied",
55
- :description => "Whether gzip is proxied",
56
- :default => "any"
57
-
58
- attribute "nginx/gzip_types",
59
- :display_name => "Nginx Gzip Types",
60
- :description => "Supported MIME-types for gzip",
61
- :type => "array",
62
- :default => [ "text/plain", "text/html", "text/css", "application/x-javascript", "text/xml", "application/xml", "application/xml+rss", "text/javascript" ]
63
-
64
- attribute "nginx/keepalive",
65
- :display_name => "Nginx Keepalive",
66
- :description => "Whether to enable keepalive",
67
- :default => "on"
68
-
69
- attribute "nginx/keepalive_timeout",
70
- :display_name => "Nginx Keepalive Timeout",
71
- :default => "65"
72
-
73
- attribute "nginx/worker_processes",
74
- :display_name => "Nginx Worker Processes",
75
- :description => "Number of worker processes",
76
- :default => "1"
77
-
78
- attribute "nginx/worker_connections",
79
- :display_name => "Nginx Worker Connections",
80
- :description => "Number of connections per worker",
81
- :default => "1024"
82
-
83
- attribute "nginx/server_names_hash_bucket_size",
84
- :display_name => "Nginx Server Names Hash Bucket Size",
85
- :default => "64"
86
-
@@ -1,56 +0,0 @@
1
- #
2
- # Cookbook Name:: nginx
3
- # Recipe:: default
4
- # Author:: AJ Christensen <aj@junglist.gen.nz>
5
- #
6
- # Copyright 2008-2009, Opscode, Inc.
7
- #
8
- # Licensed under the Apache License, Version 2.0 (the "License");
9
- # you may not use this file except in compliance with the License.
10
- # You may obtain a copy of the License at
11
- #
12
- # http://www.apache.org/licenses/LICENSE-2.0
13
- #
14
- # Unless required by applicable law or agreed to in writing, software
15
- # distributed under the License is distributed on an "AS IS" BASIS,
16
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
-
21
- package "nginx"
22
-
23
- directory node[:nginx][:log_dir] do
24
- mode 0755
25
- owner node[:nginx][:user]
26
- action :create
27
- end
28
-
29
- %w{nxensite nxdissite}.each do |nxscript|
30
- template "/usr/sbin/#{nxscript}" do
31
- source "#{nxscript}.erb"
32
- mode 0755
33
- owner "root"
34
- group "root"
35
- end
36
- end
37
-
38
- template "nginx.conf" do
39
- path "#{node[:nginx][:dir]}/nginx.conf"
40
- source "nginx.conf.erb"
41
- owner "root"
42
- group "root"
43
- mode 0644
44
- end
45
-
46
- template "#{node[:nginx][:dir]}/sites-available/default" do
47
- source "default-site.erb"
48
- owner "root"
49
- group "root"
50
- mode 0644
51
- end
52
-
53
- service "nginx" do
54
- supports :status => true, :restart => true, :reload => true
55
- action [ :enable, :start ]
56
- end