Skip to content

Commit

Permalink
Dependency Updates
Browse files Browse the repository at this point in the history
This change updates the development dependencies for the project.  Along with
this came a heap of rubocop updates.
  • Loading branch information
nebhale committed Aug 25, 2016
1 parent 5697f96 commit 619dbba
Show file tree
Hide file tree
Showing 92 changed files with 562 additions and 507 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/runConfigurations/rubocop.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ Metrics/ParameterLists:
Max: 6
Metrics/PerceivedComplexity:
Max: 10
RSpec/ExampleLength:
Max: 20
RSpec/AnyInstance:
Enabled: false
RSpec/FilePath:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/NestedGroups:
MaxNesting: 4
Style/Documentation:
Enabled: false
Style/EmptyLinesAroundBlockBody:
Expand All @@ -33,5 +41,7 @@ Style/EmptyLinesAroundClassBody:
Enabled: false
Style/EmptyLinesAroundModuleBody:
Enabled: false
Style/MethodMissing:
Enabled: false
Style/MultilineOperationIndentation:
Enabled: false
73 changes: 39 additions & 34 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.8)
ast (2.0.0)
astrolabe (1.3.0)
parser (>= 2.2.0.pre.3, < 3.0)
codeclimate-test-reporter (0.4.7)
addressable (2.4.0)
ast (2.3.0)
codeclimate-test-reporter (0.6.0)
simplecov (>= 0.7.1, < 1.0.0)
crack (0.4.2)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.2.5)
docile (1.1.5)
json (1.8.2)
parser (2.2.2.2)
ast (>= 1.1, < 3.0)
hashdiff (0.3.0)
json (2.0.2)
parser (2.3.1.2)
ast (~> 2.2)
powerpack (0.1.1)
rainbow (2.0.0)
rake (10.4.2)
redcarpet (3.2.3)
rspec (3.2.0)
rspec-core (~> 3.2.0)
rspec-expectations (~> 3.2.0)
rspec-mocks (~> 3.2.0)
rspec-core (3.2.3)
rspec-support (~> 3.2.0)
rspec-expectations (3.2.1)
rainbow (2.1.0)
rake (11.2.2)
redcarpet (3.3.4)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.2)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-mocks (3.2.1)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-support (3.2.2)
rubocop (0.31.0)
astrolabe (~> 1.3)
parser (>= 2.2.2.1, < 3.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rubocop (0.42.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
rubocop-rspec (1.3.0)
ruby-progressbar (1.7.5)
rubyzip (1.1.7)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
rubocop-rspec (1.7.0)
rubocop (>= 0.42.0)
ruby-progressbar (1.8.1)
rubyzip (1.2.0)
safe_yaml (1.0.4)
simplecov (0.10.0)
simplecov (0.12.0)
docile (~> 1.1.0)
json (~> 1.8)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
tee (1.0.0)
webmock (1.21.0)
unicode-display_width (1.1.0)
webmock (2.1.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
yard (0.8.7.6)
hashdiff
yard (0.9.5)

PLATFORMS
ruby
Expand All @@ -67,3 +69,6 @@ DEPENDENCIES
tee
webmock
yard

BUNDLED WITH
1.12.5
4 changes: 1 addition & 3 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@ require 'java_buildpack/buildpack'

build_dir = ARGV[0]

JavaBuildpack::Buildpack.with_buildpack(build_dir, 'Compile failed with exception %s') do |buildpack|
buildpack.compile
end
JavaBuildpack::Buildpack.with_buildpack(build_dir, 'Compile failed with exception %s', &:compile)
4 changes: 1 addition & 3 deletions bin/detect
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ require 'java_buildpack/buildpack'

build_dir = ARGV[0]

components = JavaBuildpack::Buildpack.with_buildpack(build_dir, 'Detect failed with exception %s') do |buildpack|
buildpack.detect
end.compact
components = JavaBuildpack::Buildpack.with_buildpack(build_dir, 'Detect failed with exception %s', &:detect).compact

if components.empty?
abort
Expand Down
4 changes: 1 addition & 3 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ require 'java_buildpack/buildpack'

build_dir = ARGV[0]

output = JavaBuildpack::Buildpack.with_buildpack(build_dir, 'Release failed with exception %s') do |buildpack|
buildpack.release
end
output = JavaBuildpack::Buildpack.with_buildpack(build_dir, 'Release failed with exception %s', &:release)

puts output
3 changes: 0 additions & 3 deletions ci/docker-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ RUN eval "$(rbenv init -)" \
&& git clone https://github.com/sstephenson/rbenv-default-gems.git $(rbenv root)/plugins/rbenv-default-gems \
&& echo 'bundler' >> $(rbenv root)/default-gems

RUN eval "$(rbenv init -)" \
&& rbenv install 1.9.3-p551

RUN eval "$(rbenv init -)" \
&& rbenv install 2.2.5

Expand Down
46 changes: 24 additions & 22 deletions java-buildpack.iml
Original file line number Diff line number Diff line change
Expand Up @@ -268,34 +268,36 @@
</content>
<orderEntry type="jdk" jdkName="rbenv: 2.2.5" jdkType="RUBY_SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.3.8, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ast (v2.0.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="astrolabe (v1.3.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.12.3, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="codeclimate-test-reporter (v0.4.7, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="crack (v0.4.2, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.4.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ast (v2.3.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.12.5, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="codeclimate-test-reporter (v0.6.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="crack (v0.4.3, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="docile (v1.1.5, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="json (v1.8.2, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="parser (v2.2.2.2, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="hashdiff (v0.3.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="json (v2.0.2, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="parser (v2.3.1.2, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="powerpack (v0.1.1, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rainbow (v2.0.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="redcarpet (v3.2.3, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.2.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.2.3, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.2.1, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.2.1, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.2.2, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.31.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rubocop-rspec (v1.3.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.7.5, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rubyzip (v1.1.7, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rainbow (v2.1.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rake (v11.2.2, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="redcarpet (v3.3.4, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.5.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.5.2, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.5.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.5.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.5.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.42.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rubocop-rspec (v1.7.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.8.1, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rubyzip (v1.2.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="safe_yaml (v1.0.4, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.10.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.12.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.10.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tee (v1.0.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="webmock (v1.21.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="yard (v0.8.7.6, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v1.1.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="webmock (v2.1.0, rbenv: 2.2.5) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="yard (v0.9.5, rbenv: 2.2.5) [gem]" level="application" />
</component>
<component name="RModuleSettingsStorage">
<LOAD_PATH number="4" string0="$MODULE_DIR$/lib" string1="$MODULE_DIR$/spec" string2="$MODULE_DIR$/bin" string3="$MODULE_DIR$/spec/bin" />
Expand Down
10 changes: 5 additions & 5 deletions lib/java_buildpack/buildpack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def detection(type, components, unique)
tags << result
end

fail "Application can be run by more than one #{type}: #{names detected}" if unique && detected.size > 1
raise "Application can be run by more than one #{type}: #{names detected}" if unique && detected.size > 1
[detected, tags]
end

Expand Down Expand Up @@ -187,9 +187,9 @@ def names(components)
end

def no_container
fail 'No container can run this application. Please ensure that you’ve pushed a valid JVM artifact or ' \
'artifacts using the -p command line argument or path manifest entry. Information about valid JVM ' \
'artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation. '
raise 'No container can run this application. Please ensure that you’ve pushed a valid JVM artifact or ' \
'artifacts using the -p command line argument or path manifest entry. Information about valid JVM ' \
'artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation. '
end

def require_component(component)
Expand Down Expand Up @@ -218,7 +218,7 @@ class << self
# @yield [Buildpack] the buildpack to work with
# @return [Object] the return value from the given block
def with_buildpack(app_dir, message)
app_dir = Pathname.new(File.expand_path(app_dir))
app_dir = Pathname.new(File.expand_path(app_dir))
Logging::LoggerFactory.instance.setup app_dir
application = Component::Application.new(app_dir)

Expand Down
2 changes: 1 addition & 1 deletion lib/java_buildpack/buildpack_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def to_s(human_readable = true)

private

GIT_DIR = (Pathname.new(__FILE__).dirname.join('..', '..', '.git')).freeze
GIT_DIR = Pathname.new(__FILE__).dirname.join('..', '..', '.git').freeze

private_constant :GIT_DIR

Expand Down
6 changes: 3 additions & 3 deletions lib/java_buildpack/component/base_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def initialize(context)
# an +Array<String>+ that uniquely identifies the component (e.g.
# +open_jdk=1.7.0_40+). Otherwise, +nil+.
def detect
fail "Method 'detect' must be defined"
raise "Method 'detect' must be defined"
end

# Modifies the application's file system. The component is expected to transform the application's file system in
Expand All @@ -59,7 +59,7 @@ def detect
#
# @return [Void]
def compile
fail "Method 'compile' must be defined"
raise "Method 'compile' must be defined"
end

# Modifies the application's runtime configuration. The component is expected to transform members of the
Expand All @@ -73,7 +73,7 @@ def compile
# Container and JRE components are expected to return a command required to run the
# application.
def release
fail "Method 'release' must be defined"
raise "Method 'release' must be defined"
end

protected
Expand Down
5 changes: 4 additions & 1 deletion lib/java_buildpack/component/droplet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def initialize(additional_libraries, component_id, env_vars, java_home, java_opt

@sandbox = JavaBuildpack::Util::FilteringPathname.new(sandbox_root, ->(path) { in?(path, sandbox_root) }, true)
@root = JavaBuildpack::Util::FilteringPathname.new(
root, ->(path) { !in?(path, buildpack_root) || in?(path, @sandbox) }, true)
root,
->(path) { !in?(path, buildpack_root) || in?(path, @sandbox) },
true
)
end

# Copy resources from a components resources directory to a directory
Expand Down
6 changes: 3 additions & 3 deletions lib/java_buildpack/component/modular_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def release
# @return [void, String] components other than containers are not expected to return any value. Container
# components are expected to return the command required to run the application.
def command
fail "Method 'command' must be defined"
raise "Method 'command' must be defined"
end

# The sub_components that make up this component
Expand All @@ -71,7 +71,7 @@ def command
# @return [Array<BaseComponent>] a collection of +BaseComponent+s that make up the sub_components of this
# component
def sub_components(_context)
fail "Method 'sub_components' must be defined"
raise "Method 'sub_components' must be defined"
end

# Returns a copy of the context, but with a subset of the original configuration
Expand All @@ -89,7 +89,7 @@ def sub_configuration_context(context, key)
#
# @return [Boolean] whether or not this component supports this application
def supports?
fail "Method 'supports?' must be defined"
raise "Method 'supports?' must be defined"
end

end
Expand Down
2 changes: 0 additions & 2 deletions lib/java_buildpack/component/mutable_java_home.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def java_8_or_later?
@version >= VERSION_8
end

private

VERSION_8 = JavaBuildpack::Util::TokenizedVersion.new('1.8.0').freeze

private_constant :VERSION_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def detect
#
# @return [Boolean] whether or not this component supports this application
def supports?
fail "Method 'supports?' must be defined"
raise "Method 'supports?' must be defined"
end

# Downloads a given JAR file and stores it.
Expand Down
Loading

0 comments on commit 619dbba

Please sign in to comment.