Debian Codegraph @

debian/patches/use-correct-path-for-bundled-files

raw symbols SCIP
1 Description: Use the correct path to load the blunded files
2
3 Author: David Suárez <[email protected]>
4 Last-Update: 2014-09-22
5
6 --- a/lib/aws/core.rb
7 +++ b/lib/aws/core.rb
8 @@ -151,6 +151,8 @@ module AWS
9
10 SRC = ROOT #+ '/vendor_ruby/aws'
11
12 + SHARE = '/usr/share/ruby-aws-sdk'
13 +
14 autoload :Errors, "#{SRC}/errors"
15 autoload :Record, "#{SRC}/record"
16 autoload :VERSION, "#{SRC}/version"
17 @@ -655,7 +657,7 @@ module AWS
18 @versions ||= begin
19 # get a list of support services/apis from disk
20 versions = {}
21 - pattern = File.join(File.dirname(__FILE__), 'api_config', '*.yml')
22 + pattern = File.join(AWS::SHARE, 'api_config', '*.yml')
23 Dir.glob(pattern).each do |path|
24 path.match(/(\w+)-(\d{4}-\d{2}-\d{2})/)
25 svc = SERVICES[$1].full_name
26 --- a/lib/aws/core/client.rb
27 +++ b/lib/aws/core/client.rb
28 @@ -688,8 +688,8 @@ module AWS
29 # (e.g. '2012-01-05').
30 # @return [Hash]
31 def load_api_config api_version
32 - lib = File.dirname(File.dirname(__FILE__))
33 - path = "#{lib}/api_config/#{service_name}-#{api_version}.yml"
34 + #lib = File.dirname(File.dirname(__FILE__))
35 + path = File.join(AWS::SHARE, "api_config/#{service_name}-#{api_version}.yml")
36 YAML.load(File.read(path))
37 end
38
39 --- a/lib/aws/core/configuration.rb
40 +++ b/lib/aws/core/configuration.rb
41 @@ -509,7 +509,7 @@ module AWS
42 add_option :ssl_verify_peer, true, :boolean => true
43
44 add_option :ssl_ca_file,
45 - File.expand_path(File.dirname(__FILE__) + "/../../../ca-bundle.crt")
46 + File.join(AWS::SHARE, 'ca-bundle.crt')
47
48 add_option :ssl_ca_path
49
50 --- a/lib/aws/core/endpoints.rb
51 +++ b/lib/aws/core/endpoints.rb
52 @@ -27,7 +27,7 @@ module AWS
53
54 def endpoints
55 @endpoints ||= begin
56 - JSON.parse(File.read(File.join(AWS::ROOT, 'endpoints.json')))
57 + JSON.parse(File.read(File.join(AWS::SHARE, 'endpoints.json')))
58 end
59 end
60 module_function :endpoints