fluent-plugin-s3 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.github/workflows/linux.yml +26 -0
 - data/ChangeLog +4 -0
 - data/VERSION +1 -1
 - data/lib/fluent/plugin/out_s3.rb +20 -4
 - data/test/test_out_s3.rb +5 -5
 - metadata +4 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 48dc2fcbe8547c145e034ddf295fd5a08a586912d2b073d3f830396be3c185fc
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 65b35293564a0a3041727e7e6e896c3f35f765f7c5c81697d7d5ab0e3e83d7ea
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 4c3163351e8b8899cc229a8c6b768805e7d4d68e692e5e27df9694d0e5f295566c46c0b7499068d24e00ac3c025c9792e96ac4d433f7753b6d391aa2f3f3d9ed
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b19605dda13a4d301bc6ad5151d0233923696d8627155b15dd5ec02a2fd0c2a68b585c33de923c4790dd3ff14eb1e4fa6e310fdd5dbb1eee2808ce7fb25a6143
         
     | 
| 
         @@ -0,0 +1,26 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            name: linux
         
     | 
| 
      
 2 
     | 
    
         
            +
            on:
         
     | 
| 
      
 3 
     | 
    
         
            +
              - push
         
     | 
| 
      
 4 
     | 
    
         
            +
              - pull_request
         
     | 
| 
      
 5 
     | 
    
         
            +
            jobs:
         
     | 
| 
      
 6 
     | 
    
         
            +
              build:
         
     | 
| 
      
 7 
     | 
    
         
            +
                runs-on: ${{ matrix.os }}
         
     | 
| 
      
 8 
     | 
    
         
            +
                strategy:
         
     | 
| 
      
 9 
     | 
    
         
            +
                  fail-fast: false
         
     | 
| 
      
 10 
     | 
    
         
            +
                  matrix:
         
     | 
| 
      
 11 
     | 
    
         
            +
                    ruby: [ '2.4', '2.5', '2.6', '2.7' ]
         
     | 
| 
      
 12 
     | 
    
         
            +
                    os:
         
     | 
| 
      
 13 
     | 
    
         
            +
                      - ubuntu-latest
         
     | 
| 
      
 14 
     | 
    
         
            +
                name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
         
     | 
| 
      
 15 
     | 
    
         
            +
                steps:
         
     | 
| 
      
 16 
     | 
    
         
            +
                - uses: actions/checkout@v2
         
     | 
| 
      
 17 
     | 
    
         
            +
                - uses: ruby/setup-ruby@v1
         
     | 
| 
      
 18 
     | 
    
         
            +
                  with:
         
     | 
| 
      
 19 
     | 
    
         
            +
                    ruby-version: ${{ matrix.ruby }}
         
     | 
| 
      
 20 
     | 
    
         
            +
                - name: unit testing
         
     | 
| 
      
 21 
     | 
    
         
            +
                  env:
         
     | 
| 
      
 22 
     | 
    
         
            +
                    CI: true
         
     | 
| 
      
 23 
     | 
    
         
            +
                  run: |
         
     | 
| 
      
 24 
     | 
    
         
            +
                    gem install bundler rake
         
     | 
| 
      
 25 
     | 
    
         
            +
                    bundle install --jobs 4 --retry 3
         
     | 
| 
      
 26 
     | 
    
         
            +
                    bundle exec rake test
         
     | 
    
        data/ChangeLog
    CHANGED
    
    
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            1.5. 
     | 
| 
      
 1 
     | 
    
         
            +
            1.5.1
         
     | 
    
        data/lib/fluent/plugin/out_s3.rb
    CHANGED
    
    | 
         @@ -485,13 +485,29 @@ module Fluent::Plugin 
     | 
|
| 
       485 
485 
     | 
    
         
             
                    credentials_options[:sts_endpoint_url] = c.sts_endpoint_url if c.sts_endpoint_url
         
     | 
| 
       486 
486 
     | 
    
         
             
                    credentials_options[:sts_http_proxy] = c.sts_http_proxy if c.sts_http_proxy
         
     | 
| 
       487 
487 
     | 
    
         
             
                    if c.sts_http_proxy && c.sts_endpoint_url
         
     | 
| 
       488 
     | 
    
         
            -
                      credentials_options[:client] =  
     | 
| 
      
 488 
     | 
    
         
            +
                      credentials_options[:client] = if iam_user_credentials
         
     | 
| 
      
 489 
     | 
    
         
            +
                                                       Aws::STS::Client.new(region: region, http_proxy: c.sts_http_proxy, endpoint: c.sts_endpoint_url, credentials: iam_user_credentials)
         
     | 
| 
      
 490 
     | 
    
         
            +
                                                     else
         
     | 
| 
      
 491 
     | 
    
         
            +
                                                       Aws::STS::Client.new(region: region, http_proxy: c.sts_http_proxy, endpoint: c.sts_endpoint_url)
         
     | 
| 
      
 492 
     | 
    
         
            +
                                                     end
         
     | 
| 
       489 
493 
     | 
    
         
             
                    elsif c.sts_http_proxy
         
     | 
| 
       490 
     | 
    
         
            -
                      credentials_options[:client] =  
     | 
| 
      
 494 
     | 
    
         
            +
                      credentials_options[:client] = if iam_user_credentials
         
     | 
| 
      
 495 
     | 
    
         
            +
                                                       Aws::STS::Client.new(region: region, http_proxy: c.sts_http_proxy, credentials: iam_user_credentials)
         
     | 
| 
      
 496 
     | 
    
         
            +
                                                     else
         
     | 
| 
      
 497 
     | 
    
         
            +
                                                       Aws::STS::Client.new(region: region, http_proxy: c.sts_http_proxy)
         
     | 
| 
      
 498 
     | 
    
         
            +
                                                     end
         
     | 
| 
       491 
499 
     | 
    
         
             
                    elsif c.sts_endpoint_url
         
     | 
| 
       492 
     | 
    
         
            -
                      credentials_options[:client] =  
     | 
| 
      
 500 
     | 
    
         
            +
                      credentials_options[:client] = if iam_user_credentials
         
     | 
| 
      
 501 
     | 
    
         
            +
                                                       Aws::STS::Client.new(region: region, endpoint: c.sts_endpoint_url, credentials: iam_user_credentials)
         
     | 
| 
      
 502 
     | 
    
         
            +
                                                     else
         
     | 
| 
      
 503 
     | 
    
         
            +
                                                       Aws::STS::Client.new(region: region, endpoint: c.sts_endpoint_url)
         
     | 
| 
      
 504 
     | 
    
         
            +
                                                     end
         
     | 
| 
       493 
505 
     | 
    
         
             
                    else
         
     | 
| 
       494 
     | 
    
         
            -
                      credentials_options[:client] =  
     | 
| 
      
 506 
     | 
    
         
            +
                      credentials_options[:client] = if iam_user_credentials
         
     | 
| 
      
 507 
     | 
    
         
            +
                                                       Aws::STS::Client.new(region: region, credentials: iam_user_credentials)
         
     | 
| 
      
 508 
     | 
    
         
            +
                                                     else
         
     | 
| 
      
 509 
     | 
    
         
            +
                                                       Aws::STS::Client.new(region: region)
         
     | 
| 
      
 510 
     | 
    
         
            +
                                                     end
         
     | 
| 
       495 
511 
     | 
    
         
             
                    end
         
     | 
| 
       496 
512 
     | 
    
         | 
| 
       497 
513 
     | 
    
         
             
                    options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options)
         
     | 
    
        data/test/test_out_s3.rb
    CHANGED
    
    | 
         @@ -539,7 +539,7 @@ EOC 
     | 
|
| 
       539 
539 
     | 
    
         
             
              def test_assume_role_credentials_with_region
         
     | 
| 
       540 
540 
     | 
    
         
             
                expected_credentials = Aws::Credentials.new("test_key", "test_secret")
         
     | 
| 
       541 
541 
     | 
    
         
             
                sts_client = Aws::STS::Client.new(region: 'ap-northeast-1')
         
     | 
| 
       542 
     | 
    
         
            -
                mock(Aws::STS::Client).new(region: 'ap-northeast-1' 
     | 
| 
      
 542 
     | 
    
         
            +
                mock(Aws::STS::Client).new(region: 'ap-northeast-1'){ sts_client }
         
     | 
| 
       543 
543 
     | 
    
         
             
                mock(Aws::AssumeRoleCredentials).new(role_arn: "test_arn",
         
     | 
| 
       544 
544 
     | 
    
         
             
                                                     role_session_name: "test_session",
         
     | 
| 
       545 
545 
     | 
    
         
             
                                                     client: sts_client){
         
     | 
| 
         @@ -591,7 +591,7 @@ EOC 
     | 
|
| 
       591 
591 
     | 
    
         
             
                expected_region = "ap-northeast-1"
         
     | 
| 
       592 
592 
     | 
    
         
             
                expected_sts_http_proxy = 'http://example.com'
         
     | 
| 
       593 
593 
     | 
    
         
             
                sts_client = Aws::STS::Client.new(region: expected_region, http_proxy: expected_sts_http_proxy)
         
     | 
| 
       594 
     | 
    
         
            -
                mock(Aws::STS::Client).new(region:expected_region, http_proxy: expected_sts_http_proxy 
     | 
| 
      
 594 
     | 
    
         
            +
                mock(Aws::STS::Client).new(region:expected_region, http_proxy: expected_sts_http_proxy){ sts_client }
         
     | 
| 
       595 
595 
     | 
    
         
             
                mock(Aws::AssumeRoleCredentials).new(role_arn: "test_arn",
         
     | 
| 
       596 
596 
     | 
    
         
             
                                                     role_session_name: "test_session",
         
     | 
| 
       597 
597 
     | 
    
         
             
                                                     client: sts_client,
         
     | 
| 
         @@ -618,7 +618,7 @@ EOC 
     | 
|
| 
       618 
618 
     | 
    
         
             
                expected_credentials = Aws::Credentials.new("test_key", "test_secret")
         
     | 
| 
       619 
619 
     | 
    
         
             
                expected_sts_http_proxy = 'http://example.com'
         
     | 
| 
       620 
620 
     | 
    
         
             
                sts_client = Aws::STS::Client.new(region: "us-east-1", http_proxy: expected_sts_http_proxy)
         
     | 
| 
       621 
     | 
    
         
            -
                mock(Aws::STS::Client).new(region: "us-east-1", http_proxy: expected_sts_http_proxy 
     | 
| 
      
 621 
     | 
    
         
            +
                mock(Aws::STS::Client).new(region: "us-east-1", http_proxy: expected_sts_http_proxy){ sts_client }
         
     | 
| 
       622 
622 
     | 
    
         
             
                mock(Aws::AssumeRoleCredentials).new(role_arn: "test_arn",
         
     | 
| 
       623 
623 
     | 
    
         
             
                                                     role_session_name: "test_session",
         
     | 
| 
       624 
624 
     | 
    
         
             
                                                     client: sts_client,
         
     | 
| 
         @@ -644,7 +644,7 @@ EOC 
     | 
|
| 
       644 
644 
     | 
    
         
             
                expected_credentials = Aws::Credentials.new("test_key", "test_secret")
         
     | 
| 
       645 
645 
     | 
    
         
             
                expected_sts_endpoint_url = 'http://example.com'
         
     | 
| 
       646 
646 
     | 
    
         
             
                sts_client = Aws::STS::Client.new(region: "us-east-1", endpoint: expected_sts_endpoint_url)
         
     | 
| 
       647 
     | 
    
         
            -
                mock(Aws::STS::Client).new(region: "us-east-1", endpoint: expected_sts_endpoint_url 
     | 
| 
      
 647 
     | 
    
         
            +
                mock(Aws::STS::Client).new(region: "us-east-1", endpoint: expected_sts_endpoint_url){ sts_client }
         
     | 
| 
       648 
648 
     | 
    
         
             
                mock(Aws::AssumeRoleCredentials).new(role_arn: "test_arn",
         
     | 
| 
       649 
649 
     | 
    
         
             
                                                     role_session_name: "test_session",
         
     | 
| 
       650 
650 
     | 
    
         
             
                                                     client: sts_client,
         
     | 
| 
         @@ -670,7 +670,7 @@ EOC 
     | 
|
| 
       670 
670 
     | 
    
         
             
                expected_credentials = Aws::Credentials.new("test_key", "test_secret")
         
     | 
| 
       671 
671 
     | 
    
         
             
                expected_sts_region = 'ap-south-1'
         
     | 
| 
       672 
672 
     | 
    
         
             
                sts_client = Aws::STS::Client.new(region: expected_sts_region)
         
     | 
| 
       673 
     | 
    
         
            -
                mock(Aws::STS::Client).new(region: expected_sts_region 
     | 
| 
      
 673 
     | 
    
         
            +
                mock(Aws::STS::Client).new(region: expected_sts_region){ sts_client }
         
     | 
| 
       674 
674 
     | 
    
         
             
                mock(Aws::AssumeRoleCredentials).new(role_arn: "test_arn",
         
     | 
| 
       675 
675 
     | 
    
         
             
                                                     role_session_name: "test_session",
         
     | 
| 
       676 
676 
     | 
    
         
             
                                                     client: sts_client){
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: fluent-plugin-s3
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.5. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.5.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Sadayuki Furuhashi
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date:  
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2021-02-16 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: fluentd
         
     | 
| 
         @@ -121,6 +121,7 @@ executables: [] 
     | 
|
| 
       121 
121 
     | 
    
         
             
            extensions: []
         
     | 
| 
       122 
122 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       123 
123 
     | 
    
         
             
            files:
         
     | 
| 
      
 124 
     | 
    
         
            +
            - ".github/workflows/linux.yml"
         
     | 
| 
       124 
125 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
       125 
126 
     | 
    
         
             
            - ".travis.yml"
         
     | 
| 
       126 
127 
     | 
    
         
             
            - AUTHORS
         
     | 
| 
         @@ -162,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       162 
163 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       163 
164 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       164 
165 
     | 
    
         
             
            requirements: []
         
     | 
| 
       165 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 166 
     | 
    
         
            +
            rubygems_version: 3.1.4
         
     | 
| 
       166 
167 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       167 
168 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       168 
169 
     | 
    
         
             
            summary: Amazon S3 output plugin for Fluentd event collector
         
     |