File tree Expand file tree Collapse file tree
lib/java_buildpack/util/play Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
22language : ruby
33rvm :
4- - 2.0.0
5- - 1.9.3
4+ - 2.0.0-p353
5+ - 1.9.3-p484
66before_script : " if [[ $TRAVIS_RUBY_VERSION != '1.9.3' || $TRAVIS_SECURE_ENV_VARS != 'true' ]]; then unset CODECLIMATE_REPO_TOKEN; fi"
77install : bundle install --deployment --without debug
88notifications :
Original file line number Diff line number Diff line change @@ -73,6 +73,14 @@ def augment_classpath
7373 fail "Method 'augment_classpath' must be defined"
7474 end
7575
76+ # Find the single directory in the root of the droplet
77+ #
78+ # @return [Pathname, nil] the single directory in the root of the droplet, otherwise +nil+
79+ def find_single_directory
80+ roots = ( @droplet . root + '*' ) . glob . select { |child | child . directory? }
81+ roots . size == 1 ? roots . first : nil
82+ end
83+
7684 # Returns the +JAVA_OPTS+ in the form that they need to be added to the command line
7785 #
7886 # @return [Array<String>] the +JAVA_OPTS+ in the form that they need to be added to the command line
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class Post22 < Base
2525 protected
2626
2727 def augment_classpath
28- additional_classpath = @droplet . additional_libraries . map do |additional_library |
28+ additional_classpath = @droplet . additional_libraries . sort . map do |additional_library |
2929 "$app_home/#{ additional_library . relative_path_from ( start_script . dirname ) } "
3030 end
3131
Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ class Post22Dist < Post22
2323
2424 protected
2525
26- def root
27- roots = ( @droplet . root + '*' ) . glob . select { |child | child . directory? }
28- roots . size == 1 ? roots . first : nil
29- end
26+ alias_method :root , :find_single_directory
3027
3128 end
3229
Original file line number Diff line number Diff line change @@ -43,10 +43,7 @@ def lib_dir
4343 root + 'lib'
4444 end
4545
46- def root
47- roots = ( @droplet . root + '*' ) . glob . select { |child | child . directory? }
48- roots . size == 1 ? roots . first : nil
49- end
46+ alias_method :root , :find_single_directory
5047
5148 end
5249
You can’t perform that action at this time.
0 commit comments