Check-in [903a330c9e]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | constants for local directory names Things get weird when you're Dir.chdir-ing |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
903a330c9e4d0161dd14de0eaae0309c |
| User & Date: | jjmadkisson@gmail.com 2011-01-06 02:32:45 |
Context
|
2011-01-06
| ||
| 02:33 | use accessors in the templates so the source can override them check-in: e7daa2b743 user: jjmadkisson@gmail.com tags: trunk | |
| 02:32 | constants for local directory names Things get weird when you're Dir.chdir-ing check-in: 903a330c9e user: jjmadkisson@gmail.com tags: trunk | |
| 02:31 | the assemble method has moved to builder check-in: 61ca7556f3 user: jjmadkisson@gmail.com tags: trunk | |
Changes
Changes to lib/fpm/namespace.rb.
|
| | > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 |
module FPM
DIRS = {
:templates => File.expand_path(
File.join(
File.dirname(__FILE__),
'..',
'..',
'templates'
)
)
}
end
|
Changes to lib/fpm/package.rb.
| ︙ | ︙ | |||
68 69 70 71 72 73 74 |
def type
self.class.name.split(':').last.downcase
end
def template
@template ||= begin
tpl = File.read(
| | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
def type
self.class.name.split(':').last.downcase
end
def template
@template ||= begin
tpl = File.read(
"#{FPM::DIRS[:templates]}/#{type}.erb"
)
ERB.new(tpl, nil, "<>")
end
end
def default_output
"#{name}-#{version}-#{iteration}.#{architecture}.#{type}"
end
end
|