Skip to content

Commit 43fbd1d

Browse files
committed
Version updates
This change updates the versions of Rubocop and Yard. As with most Rubocop updates, code needed to be changed, and was.
1 parent 1fc53aa commit 43fbd1d

38 files changed

Lines changed: 107 additions & 53 deletions

.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
AllCops:
3-
Includes:
3+
Include:
44
- Rakefile
55
- rakelib/**
6-
Excludes:
6+
Exclude:
77
- build/**
88
- vendor/**
99
ClassLength:

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ GEM
3131
rspec-mocks (3.0.0.beta2)
3232
rspec-support (= 3.0.0.beta2)
3333
rspec-support (3.0.0.beta2)
34-
rubocop (0.19.1)
34+
rubocop (0.20.0)
3535
json (>= 1.7.7, < 2)
3636
parser (~> 2.1.7)
3737
powerpack (~> 0.0.6)
@@ -55,7 +55,7 @@ GEM
5555
webmock (1.17.4)
5656
addressable (>= 2.2.7)
5757
crack (>= 0.3.2)
58-
yard (0.8.7.3)
58+
yard (0.8.7.4)
5959

6060
PLATFORMS
6161
ruby

java-buildpack.iml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.0.0.beta2, rbenv: 1.9.3-p545) [gem]" level="application" />
290290
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.0.0.beta2, rbenv: 1.9.3-p545) [gem]" level="application" />
291291
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.0.0.beta2, rbenv: 1.9.3-p545) [gem]" level="application" />
292-
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.19.1, rbenv: 1.9.3-p545) [gem]" level="application" />
292+
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.20.0, rbenv: 1.9.3-p545) [gem]" level="application" />
293293
<orderEntry type="library" scope="PROVIDED" name="ruby-debug-base19x (v0.11.30.pre15, rbenv: 1.9.3-p545) [gem]" level="application" />
294294
<orderEntry type="library" scope="PROVIDED" name="ruby-debug-ide (v0.4.22, rbenv: 1.9.3-p545) [gem]" level="application" />
295295
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.4.2, rbenv: 1.9.3-p545) [gem]" level="application" />
@@ -300,7 +300,7 @@
300300
<orderEntry type="library" scope="PROVIDED" name="slop (v3.5.0, rbenv: 1.9.3-p545) [gem]" level="application" />
301301
<orderEntry type="library" scope="PROVIDED" name="tee (v1.0.0, rbenv: 1.9.3-p545) [gem]" level="application" />
302302
<orderEntry type="library" scope="PROVIDED" name="webmock (v1.17.4, rbenv: 1.9.3-p545) [gem]" level="application" />
303-
<orderEntry type="library" scope="PROVIDED" name="yard (v0.8.7.3, rbenv: 1.9.3-p545) [gem]" level="application" />
303+
<orderEntry type="library" scope="PROVIDED" name="yard (v0.8.7.4, rbenv: 1.9.3-p545) [gem]" level="application" />
304304
</component>
305305
<component name="RModuleSettingsStorage">
306306
<LOAD_PATH number="2" string0="$MODULE_DIR$/lib" string1="$MODULE_DIR$/spec" />

lib/java_buildpack/buildpack.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def release
9393

9494
BUILDPACK_MESSAGE = '-----> Java Buildpack Version: %s'.freeze
9595

96-
LOAD_ROOT = Pathname.new(__FILE__).dirname + '..'
96+
LOAD_ROOT = (Pathname.new(__FILE__).dirname + '..').freeze
97+
98+
private_constant :BUILDPACK_MESSAGE, :LOAD_ROOT
9799

98100
def initialize(app_dir, application)
99101
@logger = Logging::LoggerFactory.instance.get_logger Buildpack

lib/java_buildpack/buildpack_version.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def to_s(human_readable = true)
6363

6464
GIT_DIR = (Pathname.new(__FILE__).dirname + '../../.git').freeze
6565

66+
private_constant :GIT_DIR
67+
6668
def git(command)
6769
`git --git-dir=#{GIT_DIR} #{command}`.chomp if git? && git_dir?
6870
end

lib/java_buildpack/component/droplet.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ def copy_resources(target_directory = @sandbox)
104104

105105
RESOURCES_DIRECTORY = Pathname.new(File.expand_path('../../../../resources', __FILE__)).freeze
106106

107+
private_constant :RESOURCES_DIRECTORY
108+
107109
def in?(path, root)
108110
path.ascend do |parent|
109111
return true if parent == root

lib/java_buildpack/container/java_main.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def release
5757

5858
CLASS_PATH_PROPERTY = 'Class-Path'.freeze
5959

60+
private_constant :ARGUMENTS_PROPERTY, :CLASS_PATH_PROPERTY
61+
6062
def arguments
6163
@configuration[ARGUMENTS_PROPERTY]
6264
end

lib/java_buildpack/container/ratpack.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,17 @@ def initialize(context)
3131
super(context)
3232
end
3333

34+
# (see JavaBuildpack::Component::BaseComponent#detect)
3435
def detect
3536
JavaBuildpack::Util::RatpackUtils.is?(@application) ? id(version) : nil
3637
end
3738

39+
# (see JavaBuildpack::Component::BaseComponent#compile)
3840
def compile
3941
@droplet.additional_libraries.link_to lib_dir
4042
end
4143

44+
# (see JavaBuildpack::Component::BaseComponent#release)
4245
def release
4346
@droplet.java_opts.add_system_property 'ratpack.port', '$PORT'
4447

@@ -53,6 +56,8 @@ def release
5356

5457
RATPACK_CORE_FILE_PATTERN = 'lib/ratpack-core-*.jar'.freeze
5558

59+
private_constant :RATPACK_CORE_FILE_PATTERN
60+
5661
def id(version)
5762
"#{Ratpack.to_s.dash_case}=#{version}"
5863
end

lib/java_buildpack/container/tomcat/tomcat_redis_store.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def supports?
6363

6464
REDIS_STORE_CLASS_NAME = 'com.gopivotal.manager.redis.RedisStore'.freeze
6565

66+
private_constant :FILTER, :FLUSH_VALVE_CLASS_NAME, :KEY_HOST_NAME, :KEY_PASSWORD, :KEY_PORT,
67+
:PERSISTENT_MANAGER_CLASS_NAME, :REDIS_STORE_CLASS_NAME
68+
6669
def add_manager(context)
6770
manager = context.add_element 'Manager', 'className' => PERSISTENT_MANAGER_CLASS_NAME
6871
add_store manager

lib/java_buildpack/framework/app_dynamics_agent.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ def supports?
6060

6161
FILTER = /app-dynamics/.freeze
6262

63+
private_constant :FILTER
64+
6365
def application_name
6466
@application.details['application_name']
6567
end

0 commit comments

Comments
 (0)