Skip to content

Commit

Permalink
Detect script
Browse files Browse the repository at this point in the history
Previously, the buildpack did not meet the contractual obligations for
the detect phase of the buildpack lifecycle.  This change adds a
bin/detect shell script which delegates to a ruby class internally.
This class currently does nothing, but will need to delegate to
buildpack components in the future.

[#49320357]
  • Loading branch information
nebhale committed May 7, 2013
1 parent f65aa90 commit b86bbc6
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NOTICE
@@ -1,2 +1,2 @@
Cloud Foundry Java Buildpack Utilities
Cloud Foundry Java Buildpack
Copyright 2013 the original author or authors.
22 changes: 22 additions & 0 deletions bin/detect
@@ -0,0 +1,22 @@
#!/usr/bin/env ruby
# Cloud Foundry Java Buildpack
# Copyright (c) 2013 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

$:.unshift File.expand_path("../../lib", __FILE__)
require 'java_buildpack'

build_dir = ARGV[0]

JavaBuildpack::Detect.new(build_dir).run
26 changes: 26 additions & 0 deletions lib/java-buildpack/detect.rb
@@ -0,0 +1,26 @@
# Cloud Foundry Java Buildpack
# Copyright (c) 2013 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

class JavaBuildpack::Detect

def initialize(app_dir)

end

def run

end

end
4 changes: 2 additions & 2 deletions lib/java_buildpack.rb
Expand Up @@ -14,9 +14,9 @@
# limitations under the License.

# A Cloud Foundry buildpack for running Java applications
module JavaBuildpackUtils
module JavaBuildpack
end

#require 'java-buildpack/detect'
require 'java-buildpack/detect'
#require 'java-buildpack/compile'
#require 'java-buildpack/release'

0 comments on commit b86bbc6

Please sign in to comment.