pkgr 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -6,12 +6,10 @@ Make debian packages out of any app that can run on Heroku.
6
6
 
7
7
  ## Examples
8
8
 
9
- * Gitlab package for debian wheezy: <http://deb.pkgr.io/crohr/gitlabhq/>.
9
+ * See <http://deb.pkgr.io/> for examples of apps packaged with `pkgr` (e.g. Gitlab, Discourse).
10
10
 
11
11
  ## Installation
12
12
 
13
- Note: the new version of pkgr using buildpacks is only available as a pre-release.
14
-
15
13
  Install `pkgr` on a Debian/Ubuntu machine (only `wheezy` flavour for now):
16
14
 
17
15
  sudo apt-get install ruby1.9.1-full
@@ -45,7 +43,7 @@ Full command line options are given below:
45
43
  [--description=DESCRIPTION] # Project description
46
44
  [--version=VERSION] # Package version (if git directory given, it will use the latest git tag available)
47
45
  [--iteration=ITERATION] # Package iteration (you should keep the default here)
48
- # Default: 20131007132226
46
+ # Default: 20131016164652
49
47
  [--user=USER] # User to run the app under (defaults to your app name)
50
48
  [--group=GROUP] # Group to run the app under (defaults to your app name)
51
49
  [--compile-cache-dir=COMPILE_CACHE_DIR] # Where to store the files cached between packaging runs
@@ -54,6 +52,11 @@ Full command line options are given below:
54
52
  [--before-precompile=BEFORE_PRECOMPILE] # Provide a script to run just before the buildpack compilation
55
53
  [--host=HOST] # Remote host to build on (default: local machine)
56
54
  [--auto] # Automatically attempt to install missing dependencies
55
+ [--clean] # Automatically clean up temporary dirs
56
+ # Default: true
57
+ [--buildpack=BUILDPACK] # Custom buildpack to use
58
+ [--edge] # Always use the latest version of the buildpack if already installed
59
+ # Default: true
57
60
  [--verbose] # Run verbosely
58
61
  [--debug] # Run very verbosely
59
62
  [--name=NAME] # Application name (if directory given, it will default to the directory name)
@@ -85,7 +88,7 @@ Finally, it's a great way to share your open source software with your users and
85
88
  my-app scale web=1 worker=1
86
89
  ...
87
90
 
88
- * You app will reside in `/opt/app-name`.
91
+ * Your app will reside in `/opt/app-name`.
89
92
 
90
93
  * You'll also get a upstart based initialization script that you can use directly.
91
94
 
data/lib/pkgr.rb CHANGED
@@ -9,6 +9,7 @@ module Pkgr
9
9
  module Errors
10
10
  class Base < StandardError; end
11
11
  class UnknownAppType < Base; end
12
+ class UnknownDistribution < Base; end
12
13
  class ConfigurationInvalid < Base; end
13
14
  end
14
15
 
@@ -3,16 +3,29 @@ default:
3
3
  - mysql-common
4
4
  - libpq5
5
5
  - libsqlite3-0
6
- - libevent-1.4-2
7
- - libevent-core-1.4-2
8
- - libevent-extra-1.4-2
9
6
  - libssl0.9.8
10
7
  - openssl
11
8
  - libxml2
12
9
  - libxslt1.1
13
10
  - libreadline5
14
11
  - libreadline6
15
- squeeze:
12
+ debian-squeeze:
16
13
  - libmysqlclient16
17
- wheezy:
14
+ - libevent-1.4-2
15
+ - libevent-core-1.4-2
16
+ - libevent-extra-1.4-2
17
+ ubuntu-lucid:
18
+ - libmysqlclient16
19
+ - libevent-1.4-2
20
+ - libevent-core-1.4-2
21
+ - libevent-extra-1.4-2
22
+ debian-wheezy:
23
+ - libmysqlclient18
24
+ - libevent-2.0-5
25
+ - libevent-core-2.0-5
26
+ - libevent-extra-2.0-5
27
+ ubuntu-precise:
18
28
  - libmysqlclient18
29
+ - libevent-2.0-5
30
+ - libevent-core-2.0-5
31
+ - libevent-extra-2.0-5
@@ -1,17 +1,16 @@
1
1
  require 'pkgr/templates/file_template'
2
2
  require 'pkgr/templates/dir_template'
3
3
  require 'pkgr/distributions/debian'
4
-
4
+ require 'facter'
5
5
 
6
6
  module Pkgr
7
7
  module Distributions
8
8
  def current
9
- if File.exist?("/etc/debian_version")
10
- distro = File.read("/etc/debian_version").split("/")[0]
11
- Debian.new(distro)
12
- else
13
- raise "Don't know about the current distribution you're on"
14
- end
9
+ osfamily = Facter.value('osfamily')
10
+ klass = const_get(osfamily)
11
+ klass.new([Facter.value('operatingsystem'), Facter.value('lsbdistcodename')].join("-").downcase)
12
+ rescue NameError => e
13
+ raise Errors::UnknownDistribution, "Don't know about the current distribution you're on: #{osfamily.inspect}"
15
14
  end
16
15
  module_function :current
17
16
  end
@@ -97,7 +97,7 @@ module Pkgr
97
97
  [Buildpack.new(custom_buildpack_uri, :custom)]
98
98
  else
99
99
  case version
100
- when "wheezy"
100
+ when "ubuntu-precise", "debian-wheezy", "ubuntu-lucid", "debian-squeeze"
101
101
  %w{
102
102
  https://github.com/heroku/heroku-buildpack-ruby.git
103
103
  https://github.com/heroku/heroku-buildpack-nodejs.git
data/lib/pkgr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pkgr
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkgr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-16 00:00:00.000000000 Z
12
+ date: 2013-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -59,6 +59,22 @@ dependencies:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: facter
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
62
78
  - !ruby/object:Gem::Dependency
63
79
  name: mixlib-log
64
80
  requirement: !ruby/object:Gem::Requirement