pkgr 1.2.0 → 1.3.0

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 (51) hide show
  1. data/README.md +16 -2
  2. data/data/build_dependencies/centos.yml +13 -0
  3. data/{lib/pkgr/data/distributions/debian/build_dependencies.yml → data/build_dependencies/debian.yml} +2 -2
  4. data/data/build_dependencies/ubuntu.yml +15 -0
  5. data/data/buildpacks/centos-6 +2 -0
  6. data/data/buildpacks/debian-6 +2 -0
  7. data/{lib/pkgr/data/distributions/debian/buildpacks/debian_wheezy → data/buildpacks/debian-7} +1 -1
  8. data/data/buildpacks/ubuntu-10.04 +2 -0
  9. data/{lib/pkgr/data/distributions/debian/buildpacks/ubuntu_precise → data/buildpacks/ubuntu-12.04} +1 -1
  10. data/{lib/pkgr/data/distributions/debian/runner.erb → data/cli/cli.sh.erb} +105 -57
  11. data/data/dependencies/centos.yml +9 -0
  12. data/{lib/pkgr/data/distributions/debian/dependencies.yml → data/dependencies/debian.yml} +2 -2
  13. data/data/dependencies/ubuntu.yml +21 -0
  14. data/data/environment/default.erb +9 -0
  15. data/{lib/pkgr/data/distributions/debian → data}/hooks/postinstall.sh +7 -4
  16. data/data/hooks/preinstall.sh +13 -0
  17. data/{lib/pkgr/data/distributions/debian/sysv → data/init/sysv/lsb-3.1}/master.erb +0 -0
  18. data/{lib/pkgr/data/distributions/debian/sysv → data/init/sysv/lsb-3.1}/process.erb +84 -11
  19. data/{lib/pkgr/data/distributions/debian/sysv → data/init/sysv/lsb-3.1}/process_master.erb +0 -0
  20. data/{lib/pkgr/data/distributions/debian/upstart → data/init/upstart/1.5}/init.d.sh.erb +0 -0
  21. data/{lib/pkgr/data/distributions/debian/upstart → data/init/upstart/1.5}/master.conf.erb +0 -0
  22. data/{lib/pkgr/data/distributions/debian/upstart → data/init/upstart/1.5}/process.conf.erb +0 -0
  23. data/{lib/pkgr/data/distributions/debian/upstart → data/init/upstart/1.5}/process_master.conf.erb +0 -0
  24. data/{lib/pkgr/data/distributions/debian → data/logrotate}/logrotate.erb +0 -0
  25. data/lib/pkgr.rb +1 -1
  26. data/lib/pkgr/builder.rb +8 -2
  27. data/lib/pkgr/buildpack.rb +1 -0
  28. data/lib/pkgr/cli.rb +12 -6
  29. data/lib/pkgr/config.rb +20 -2
  30. data/lib/pkgr/distributions.rb +9 -7
  31. data/lib/pkgr/distributions/base.rb +159 -0
  32. data/lib/pkgr/distributions/centos.rb +12 -0
  33. data/lib/pkgr/distributions/debian.rb +39 -163
  34. data/lib/pkgr/distributions/redhat.rb +51 -0
  35. data/lib/pkgr/distributions/runner.rb +39 -0
  36. data/lib/pkgr/distributions/ubuntu.rb +17 -0
  37. data/lib/pkgr/version.rb +1 -1
  38. metadata +30 -29
  39. data/lib/pkgr/app.rb +0 -279
  40. data/lib/pkgr/data/bin/executable +0 -36
  41. data/lib/pkgr/data/config/pre_boot.rb +0 -15
  42. data/lib/pkgr/data/distributions/debian/buildpacks/debian_squeeze +0 -2
  43. data/lib/pkgr/data/distributions/debian/buildpacks/ubuntu_lucid +0 -2
  44. data/lib/pkgr/data/distributions/debian/cron.d +0 -4
  45. data/lib/pkgr/data/distributions/debian/default.erb +0 -12
  46. data/lib/pkgr/data/distributions/debian/hooks/preinstall.sh +0 -9
  47. data/lib/pkgr/data/pkgr.yml +0 -32
  48. data/lib/pkgr/distributions/debian_squeeze.rb +0 -11
  49. data/lib/pkgr/distributions/debian_wheezy.rb +0 -11
  50. data/lib/pkgr/distributions/ubuntu_lucid.rb +0 -15
  51. data/lib/pkgr/distributions/ubuntu_precise.rb +0 -15
@@ -1,36 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'yaml'
4
-
5
- config = YAML.load_file(::File.expand_path("../../config/pkgr.yml", __FILE__))
6
-
7
- require ::File.expand_path("../../config/boot", __FILE__)
8
-
9
- supported_commands = ["server", "rake", "console"]
10
- command = ARGV.shift
11
-
12
- case command
13
- when "rake"
14
- ENV['RACK_ENV'] ||= "production"
15
- ARGV << "-f" << ::File.expand_path("../../Rakefile", __FILE__)
16
- require 'rake'
17
- Rake.application.run
18
- when "console"
19
- APP_PATH = ::File.expand_path('../../config/application', __FILE__)
20
- require ::File.expand_path('../../config/boot', __FILE__)
21
- ARGV.push("production") if ARGV.empty?
22
- ARGV.unshift("console")
23
- require 'rails/commands'
24
- when "server"
25
- require 'thin'
26
- rackup_file = ::File.expand_path('../../config.ru', __FILE__)
27
- argv = ARGV
28
- argv << ["-R", rackup_file] unless ARGV.include?("-R")
29
- argv << ["-p", "8000"] unless ARGV.include?("-p")
30
- argv << ["-e", "production"] unless ARGV.include?("-e")
31
- argv << ["--tag", "#{config['name']}-#{config['version']}"] unless ARGV.include?("--tag")
32
- Thin::Runner.new(argv.flatten).run!
33
- else
34
- STDERR.puts "You must choose one of the following commands: #{supported_commands.inspect}"
35
- exit(1)
36
- end
@@ -1,15 +0,0 @@
1
- # This part of code is added by Pkgr, before the original content of the
2
- # `config/boot.rb` file.
3
- require 'rubygems'
4
-
5
- # Attempts to use a vendored Bundler, if any
6
- vendored_gems = File.expand_path(
7
- '../../vendor/bundle/ruby/1.9.1/gems', __FILE__
8
- )
9
-
10
- vendored_bundler = Dir["#{vendored_gems}/bundler-*/lib"].sort.last
11
-
12
- if !vendored_bundler.nil? && !$LOAD_PATH.include?(vendored_bundler)
13
- $LOAD_PATH.unshift(vendored_bundler)
14
- end
15
-
@@ -1,2 +0,0 @@
1
- https://github.com/heroku/heroku-buildpack-ruby.git
2
- https://github.com/heroku/heroku-buildpack-nodejs.git
@@ -1,2 +0,0 @@
1
- https://github.com/heroku/heroku-buildpack-ruby.git
2
- https://github.com/heroku/heroku-buildpack-nodejs.git
@@ -1,4 +0,0 @@
1
- #
2
- # Put your cron tasks here
3
- #
4
- # 0 4 * * * root [ -x /usr/bin/some_script ] && /usr/bin/some_script
@@ -1,12 +0,0 @@
1
- export HOME="<%= home %>"
2
- export APP_NAME="<%= name %>"
3
- export APP_GROUP="<%= group %>"
4
- export APP_USER="<%= user %>"
5
-
6
- for file in /etc/${APP_NAME}/conf.d/*; do
7
- if [ -f $file ]; then . $file; fi
8
- done
9
-
10
- for file in ${HOME}/.profile.d/*.sh; do
11
- if [ -f $file ]; then . $file; fi
12
- done
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -e
4
-
5
- APP_USER="<%= user %>"
6
-
7
- if ! getent passwd ${APP_USER} > /dev/null; then
8
- adduser ${APP_USER} --disabled-login --group --system --quiet --shell /bin/bash
9
- fi
@@ -1,32 +0,0 @@
1
- version: 0.0.0
2
- name:
3
- description:
4
- # The git reference from which to build the package:
5
- git_ref: HEAD
6
- # The list of configuration files taht you want to see in /etc/{{name}}/
7
- config_files:
8
- - pkgr.yml
9
- - database.yml
10
- # The target architecture of the server on which your app will be built (must
11
- # be the same as the one on which it is deployed):
12
- architecture: amd64
13
- # The list of dependencies required for your app to correctly run:
14
- debian_runtime_dependencies:
15
- - ${shlibs:Depends}
16
- - ${misc:Depends}
17
- - ruby1.9.1-full
18
- - git-core
19
- - libxml2
20
- - libxslt1.1
21
- # The list of dependencies required for your app to be packaged (i.e.
22
- # dependencies of your app's gems + dependencies required to build the
23
- # package):
24
- debian_build_dependencies:
25
- - debhelper (>= 7)
26
- - dpkg-dev
27
- - ruby1.9.1-full
28
- - libmysqlclient15-dev
29
- - libxml2-dev
30
- - libxslt-dev
31
- - libsqlite3-dev
32
-
@@ -1,11 +0,0 @@
1
- require "pkgr/distributions/debian"
2
-
3
- module Pkgr
4
- module Distributions
5
- class DebianSqueeze < Debian
6
- def codename
7
- "squeeze"
8
- end
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- require "pkgr/distributions/debian"
2
-
3
- module Pkgr
4
- module Distributions
5
- class DebianWheezy < Debian
6
- def codename
7
- "wheezy"
8
- end
9
- end
10
- end
11
- end
@@ -1,15 +0,0 @@
1
- require "pkgr/distributions/debian_squeeze"
2
-
3
- module Pkgr
4
- module Distributions
5
- class UbuntuLucid < DebianSqueeze
6
- def codename
7
- "lucid"
8
- end
9
-
10
- def osfamily
11
- "ubuntu"
12
- end
13
- end
14
- end
15
- end
@@ -1,15 +0,0 @@
1
- require "pkgr/distributions/debian_wheezy"
2
-
3
- module Pkgr
4
- module Distributions
5
- class UbuntuPrecise < DebianWheezy
6
- def codename
7
- "precise"
8
- end
9
-
10
- def osfamily
11
- "ubuntu"
12
- end
13
- end
14
- end
15
- end