Skip to content

Commit 40cdefd

Browse files
committed
Polishing
[resolves #784] Signed-off-by: Ben Hale <[email protected]>
1 parent a89b117 commit 40cdefd

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

lib/java_buildpack/framework/riverbed_appinternals_agent.rb

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,17 @@
1818
require 'fileutils'
1919
require 'java_buildpack/component/versioned_dependency_component'
2020
require 'java_buildpack/framework'
21+
2122
module JavaBuildpack
2223
module Framework
2324

2425
# Encapsulates the functionality for running the Riverbed Appinternals Agent support.
2526
class RiverbedAppinternalsAgent < JavaBuildpack::Component::VersionedDependencyComponent
2627

27-
# Creates an instance
28-
#
29-
# @param [Hash] context a collection of utilities used the component
30-
def initialize(context)
31-
super(context)
32-
### @uri = download_url(credentials, @uri)
33-
end
34-
3528
# (see JavaBuildpack::Component::BaseComponent#compile)
3629
def compile
37-
### JavaBuildpack::Util::Cache::InternetAvailability.instance.available(
38-
### true, 'Downloading from Riverbed AppInternals Service Broker'
39-
### ) do
40-
download_zip(false, @droplet.sandbox, @component_name)
41-
### end
30+
download_zip(false, @droplet.sandbox, @component_name)
4231
@droplet.copy_resources
43-
### rescue StandardError => e
44-
### raise "Riverbed AppInternals download failed: #{e}"
4532
end
4633

4734
# (see JavaBuildpack::Component::BaseComponent#release)
@@ -69,8 +56,6 @@ def supports?
6956

7057
private
7158

72-
PROFILERURL = 'profilerUrlLinux'
73-
7459
FILTER = /appinternals/.freeze
7560

7661
private_constant :FILTER
@@ -107,10 +92,6 @@ def rvbd_moniker(credentials)
10792
credentials['rvbd_moniker'] || @configuration['rvbd_moniker']
10893
end
10994

110-
### def download_url(credentials, default_url)
111-
### (credentials[PROFILERURL] unless credentials.nil?) || default_url
112-
### end
113-
11495
end
11596
end
11697
end

spec/java_buildpack/framework/riverbed_appinternals_agent_spec.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
before do
3232
allow(services).to receive(:one_service?).with(/appinternals/).and_return(true)
3333

34-
### allow(services).to receive(:find_service).and_return('credentials' => { 'profilerUrlLinux' =>
35-
### 'http://testfoobar/profiler.zip' })
36-
3734
allow(application_cache).to receive(:get).with('http://testfoobar/profiler.zip')
3835
.and_yield(Pathname.new('spec/fixtures/'\
3936
'stub-riverbed-appinternals-agent.zip').open, false)

0 commit comments

Comments
 (0)