File tree Expand file tree Collapse file tree 6 files changed +108
-3
lines changed
Expand file tree Collapse file tree 6 files changed +108
-3
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ # Cloud Foundry Java Buildpack
3+ # Copyright (c) 2013 the original author or authors.
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+ $:. unshift File . expand_path ( "../../lib" , __FILE__ )
18+ require 'java_buildpack'
19+
20+ build_dir = ARGV [ 0 ]
21+
22+ begin
23+ puts JavaBuildpack ::Release . new ( build_dir ) . run
24+ rescue => e
25+ abort e . message
26+ end
27+
Original file line number Diff line number Diff line change 1+ # Cloud Foundry Java Buildpack
2+ # Copyright (c) 2013 the original author or authors.
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ # Encapsulates the release functionality in the Java buildpack
17+ class JavaBuildpack ::Release
18+
19+ # Creates a new instance, passing in the application directory used during release
20+ #
21+ # @param [String] app_dir The application directory used during release
22+ def initialize ( app_dir )
23+
24+ end
25+
26+ # The execution entry point for release. This method is responsible for generating a payload describing the execution
27+ # command used to start the application.
28+ #
29+ # @return [String] the YAML formatted payload describing the execution command used to start the application
30+ def run
31+ {
32+ addons : [ ] ,
33+ config_vars : { } ,
34+ default_process_types : {
35+ web : ''
36+ }
37+ } . to_yaml
38+ end
39+
40+ end
Original file line number Diff line number Diff line change @@ -19,4 +19,4 @@ module JavaBuildpack
1919
2020require 'java-buildpack/compile'
2121require 'java-buildpack/detect'
22- # require 'java-buildpack/release'
22+ require 'java-buildpack/release'
Original file line number Diff line number Diff line change 1- # Git Pivotal Tracker Integration
1+ # Cloud Foundry Java Buildpack
22# Copyright (c) 2013 the original author or authors.
33#
44# Licensed under the Apache License, Version 2.0 (the "License");
Original file line number Diff line number Diff line change 1- # Git Pivotal Tracker Integration
1+ # Cloud Foundry Java Buildpack
22# Copyright (c) 2013 the original author or authors.
33#
44# Licensed under the Apache License, Version 2.0 (the "License");
Original file line number Diff line number Diff line change 1+ # Cloud Foundry Java Buildpack
2+ # Copyright (c) 2013 the original author or authors.
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ require 'spec_helper'
17+ require 'open3'
18+
19+ describe 'release' do
20+
21+ it 'should return zero if the release is successful' do
22+ # TODO Implement test as things are filled out
23+ end
24+
25+ it 'should return non-zero if an error occurs' do
26+ # TODO Implement test as things are filled out
27+ end
28+
29+ it 'should print the error message if an error occurs' do
30+ # TODO Implement test as things are filled out
31+ end
32+
33+ private
34+
35+ COMPILE = File . expand_path ( '../../../bin/release' , __FILE__ )
36+ FIXTURES_DIR = File . expand_path ( '../../fixtures' , __FILE__ )
37+
38+ end
You can’t perform that action at this time.
0 commit comments