wrapbox 0.6.0 → 0.7.0
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/README.md +2 -2
 - data/lib/wrapbox/configuration.rb +2 -0
 - data/lib/wrapbox/runner/ecs.rb +8 -2
 - data/lib/wrapbox/version.rb +1 -1
 - data/wrapbox.gemspec +2 -1
 - metadata +22 -8
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 12b4d996dbd5a6dd05a700e8654c369b670246eaaed96514e9783e94be18a506
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 06db857821782f32d3cbf3bbcd679182287735224c17256b85f57644b13ea69f
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 05f3a8b158b5c54b0f010695fd020a3ea381140a88da9b57488cd469091f66da63215b36b6973e0736b3422200495a1f6dd1d199be07ccc94f32c985f3c17762
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 10a3aecb71fb45e22b9ffe3123e592142ae4fab5ef5e70bb372c328f8c8b302ffcf8caac592305e9f3466e80570752421ed398936a5f3aabf5764faac40334ce
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -35,7 +35,7 @@ default: 
     | 
|
| 
       35 
35 
     | 
    
         | 
| 
       36 
36 
     | 
    
         
             
            docker:
         
     | 
| 
       37 
37 
     | 
    
         
             
              runner: docker
         
     | 
| 
       38 
     | 
    
         
            -
               
     | 
| 
      
 38 
     | 
    
         
            +
              keep_container: true
         
     | 
| 
       39 
39 
     | 
    
         
             
              container_definitions:
         
     | 
| 
       40 
40 
     | 
    
         
             
                - image: joker1007/wrapbox
         
     | 
| 
       41 
41 
     | 
    
         
             
                  cpu: 512
         
     | 
| 
         @@ -118,7 +118,7 @@ log_configuration: 
     | 
|
| 
       118 
118 
     | 
    
         
             
            | name                  | desc                                                        |
         
     | 
| 
       119 
119 
     | 
    
         
             
            | --------------------  | ----------------------------------------------------------- |
         
     | 
| 
       120 
120 
     | 
    
         
             
            | container_definitions | only use `image`, `cpu`, `memory`, and `memory_reservation` |
         
     | 
| 
       121 
     | 
    
         
            -
            |  
     | 
| 
      
 121 
     | 
    
         
            +
            | keep_container        | If true, doesn't delete the container when the command ends |
         
     | 
| 
       122 
122 
     | 
    
         
             
            | use_sudo              | If true, invoke `sudo docker` command                       |
         
     | 
| 
       123 
123 
     | 
    
         | 
| 
       124 
124 
     | 
    
         
             
            ## API
         
     | 
| 
         @@ -25,6 +25,7 @@ module Wrapbox 
     | 
|
| 
       25 
25 
     | 
    
         
             
                :cpu,
         
     | 
| 
       26 
26 
     | 
    
         
             
                :memory,
         
     | 
| 
       27 
27 
     | 
    
         
             
                :task_role_arn,
         
     | 
| 
      
 28 
     | 
    
         
            +
                :execution_role_arn,
         
     | 
| 
       28 
29 
     | 
    
         
             
                :keep_container,
         
     | 
| 
       29 
30 
     | 
    
         
             
                :log_fetcher
         
     | 
| 
       30 
31 
     | 
    
         
             
              ) do
         
     | 
| 
         @@ -52,6 +53,7 @@ module Wrapbox 
     | 
|
| 
       52 
53 
     | 
    
         
             
                    config["cpu"]&.to_s,
         
     | 
| 
       53 
54 
     | 
    
         
             
                    config["memory"]&.to_s,
         
     | 
| 
       54 
55 
     | 
    
         
             
                    config["task_role_arn"],
         
     | 
| 
      
 56 
     | 
    
         
            +
                    config["execution_role_arn"],
         
     | 
| 
       55 
57 
     | 
    
         
             
                    config["keep_container"],
         
     | 
| 
       56 
58 
     | 
    
         
             
                    config["log_fetcher"]&.deep_symbolize_keys
         
     | 
| 
       57 
59 
     | 
    
         
             
                  )
         
     | 
    
        data/lib/wrapbox/runner/ecs.rb
    CHANGED
    
    | 
         @@ -1,4 +1,5 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require "aws-sdk"
         
     | 
| 
      
 1 
     | 
    
         
            +
            require "aws-sdk-ecs"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "aws-sdk-cloudwatch"
         
     | 
| 
       2 
3 
     | 
    
         
             
            require "multi_json"
         
     | 
| 
       3 
4 
     | 
    
         
             
            require "thor"
         
     | 
| 
       4 
5 
     | 
    
         
             
            require "yaml"
         
     | 
| 
         @@ -42,7 +43,8 @@ module Wrapbox 
     | 
|
| 
       42 
43 
     | 
    
         
             
                    :network_configuration,
         
     | 
| 
       43 
44 
     | 
    
         
             
                    :cpu,
         
     | 
| 
       44 
45 
     | 
    
         
             
                    :memory,
         
     | 
| 
       45 
     | 
    
         
            -
                    :task_role_arn
         
     | 
| 
      
 46 
     | 
    
         
            +
                    :task_role_arn,
         
     | 
| 
      
 47 
     | 
    
         
            +
                    :execution_role_arn
         
     | 
| 
       46 
48 
     | 
    
         | 
| 
       47 
49 
     | 
    
         
             
                  def initialize(options)
         
     | 
| 
       48 
50 
     | 
    
         
             
                    @name = options[:name]
         
     | 
| 
         @@ -89,6 +91,7 @@ module Wrapbox 
     | 
|
| 
       89 
91 
     | 
    
         
             
                    end
         
     | 
| 
       90 
92 
     | 
    
         | 
| 
       91 
93 
     | 
    
         
             
                    @task_role_arn = options[:task_role_arn]
         
     | 
| 
      
 94 
     | 
    
         
            +
                    @execution_role_arn = options[:execution_role_arn]
         
     | 
| 
       92 
95 
     | 
    
         
             
                    $stdout.sync = true
         
     | 
| 
       93 
96 
     | 
    
         
             
                    @logger = Logger.new($stdout)
         
     | 
| 
       94 
97 
     | 
    
         
             
                    if options[:log_fetcher]
         
     | 
| 
         @@ -101,6 +104,7 @@ module Wrapbox 
     | 
|
| 
       101 
104 
     | 
    
         
             
                    attr_reader \
         
     | 
| 
       102 
105 
     | 
    
         
             
                      :environments,
         
     | 
| 
       103 
106 
     | 
    
         
             
                      :task_role_arn,
         
     | 
| 
      
 107 
     | 
    
         
            +
                      :execution_role_arn,
         
     | 
| 
       104 
108 
     | 
    
         
             
                      :cluster,
         
     | 
| 
       105 
109 
     | 
    
         
             
                      :timeout,
         
     | 
| 
       106 
110 
     | 
    
         
             
                      :launch_timeout,
         
     | 
| 
         @@ -389,6 +393,8 @@ module Wrapbox 
     | 
|
| 
       389 
393 
     | 
    
         
             
                        container_definitions: overrided_container_definitions,
         
     | 
| 
       390 
394 
     | 
    
         
             
                        volumes: volumes,
         
     | 
| 
       391 
395 
     | 
    
         
             
                        requires_compatibilities: requires_compatibilities,
         
     | 
| 
      
 396 
     | 
    
         
            +
                        task_role_arn: task_role_arn,
         
     | 
| 
      
 397 
     | 
    
         
            +
                        execution_role_arn: execution_role_arn
         
     | 
| 
       392 
398 
     | 
    
         
             
                      }).task_definition
         
     | 
| 
       393 
399 
     | 
    
         
             
                    rescue Aws::ECS::Errors::ClientException
         
     | 
| 
       394 
400 
     | 
    
         
             
                      raise if register_retry_count > 2
         
     | 
    
        data/lib/wrapbox/version.rb
    CHANGED
    
    
    
        data/wrapbox.gemspec
    CHANGED
    
    | 
         @@ -20,7 +20,8 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       20 
20 
     | 
    
         
             
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         
     | 
| 
       21 
21 
     | 
    
         
             
              spec.require_paths = ["lib"]
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
              spec.add_runtime_dependency "aws-sdk", " 
     | 
| 
      
 23 
     | 
    
         
            +
              spec.add_runtime_dependency "aws-sdk-ecs", "~> 1"
         
     | 
| 
      
 24 
     | 
    
         
            +
              spec.add_runtime_dependency "aws-sdk-cloudwatch", "~> 1"
         
     | 
| 
       24 
25 
     | 
    
         
             
              spec.add_runtime_dependency "activesupport", ">= 4"
         
     | 
| 
       25 
26 
     | 
    
         
             
              spec.add_runtime_dependency "docker-api"
         
     | 
| 
       26 
27 
     | 
    
         
             
              spec.add_runtime_dependency "multi_json"
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,29 +1,43 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: wrapbox
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.7.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - joker1007
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2018- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2018-07-10 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
     | 
    
         
            -
              name: aws-sdk
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: aws-sdk-ecs
         
     | 
| 
       15 
15 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
     | 
    
         
            -
                - - " 
     | 
| 
      
 17 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version:  
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '1'
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
     | 
    
         
            -
                - - " 
     | 
| 
      
 24 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '1'
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: aws-sdk-cloudwatch
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '1'
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       25 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version:  
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '1'
         
     | 
| 
       27 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
42 
     | 
    
         
             
              name: activesupport
         
     | 
| 
       29 
43 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -214,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       214 
228 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       215 
229 
     | 
    
         
             
            requirements: []
         
     | 
| 
       216 
230 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       217 
     | 
    
         
            -
            rubygems_version: 2.7. 
     | 
| 
      
 231 
     | 
    
         
            +
            rubygems_version: 2.7.7
         
     | 
| 
       218 
232 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       219 
233 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       220 
234 
     | 
    
         
             
            summary: Ruby method runner on AWS ECS
         
     |