ecs_deployer 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20871c53d17d5880cbad461a406946237eefc9af
4
- data.tar.gz: 448e81e983fde427f655c58c338d44fdce0b96dd
3
+ metadata.gz: 63e2ad46f9cab7f78fddf9952e32b456f798d039
4
+ data.tar.gz: 89501da0f01b0ef5a60314771142a18df880cde2
5
5
  SHA512:
6
- metadata.gz: c0defb0456435c369c9d702b80cf17a978dcc3cf6519a38fac98c8d50ea1b7e4d2e14c790add458e3e2637a0e4640c77a3ce73d82c84ec0d7934103f8dc80a8b
7
- data.tar.gz: 9d40483d9921c311b35804d14562fea2eda070274d54924279af12dc87029b57d19547ba943dd0a7c22023841358f5b6f3d5f1b68830311bac5d41fcbac819c6
6
+ metadata.gz: 3c7628b60938925607c4088061bef7e01b463080271e39b1cc443769860ee12393ff03d0208911d4a8c07940a3a03d528524f13bc02add8aea81463139cbad8a
7
+ data.tar.gz: e63fa09d2794e0d25fda1e3c1b9ed0a6ab5ba33204a22eb1cea65949193cdd3797ea5f4310a2b38a2d40366ebb2dc74fe3ea399a91583fab40d7985624a76104
data/example/sample.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'bundler/setup'
2
2
  require 'ecs_deployer'
3
3
 
4
- task_path = File.expand_path('./fixtures/production.yml', File.dirname(File.realpath(__FILE__)))
4
+ task_path = File.expand_path('./fixtures/task.yml', File.dirname(File.realpath(__FILE__)))
5
5
 
6
6
  ecs_deployer = EcsDeployer::Client.new('sandbox-ecs-production')
7
7
  ecs_deployer.register_task(task_path)
@@ -23,7 +23,20 @@ module EcsDeployer
23
23
  # @return [String]
24
24
  def register_task(task_path)
25
25
  raise IOError.new("File does not exist. [#{task_path}]") if !File.exist?(task_path)
26
- register_task_process(YAML.load(File.read(task_path)))
26
+ register_task_hash(YAML.load(File.read(task_path)))
27
+ end
28
+
29
+ # @param [Hash] task_hash
30
+ # @return [String]
31
+ def register_task_hash(task_hash)
32
+ result = @ecs_command.register_task_definition(
33
+ task_hash['family'],
34
+ task_hash['containerDefinitions']
35
+ )
36
+
37
+ @family_name = result['taskDefinition']['family']
38
+ @revision = result['taskDefinition']['revision']
39
+ @new_task_definition_arn = result['taskDefinition']['taskDefinitionArn']
27
40
  end
28
41
 
29
42
  # @param [String] service_name
@@ -115,19 +128,5 @@ module EcsDeployer
115
128
 
116
129
  raise ServiceNotFoundError.new("'#{service_name}' service is not found.") unless detected_service
117
130
  end
118
-
119
- # @param [Hash] task_definition
120
- # @return [String]
121
- def register_task_process(task_definition)
122
- result = @ecs_command.register_task_definition(
123
- task_definition['family'],
124
- task_definition['containerDefinitions']
125
- )
126
-
127
- @family_name = result['taskDefinition']['family']
128
- @revision = result['taskDefinition']['revision']
129
- @new_task_definition_arn = result['taskDefinition']['taskDefinitionArn']
130
- end
131
131
  end
132
-
133
132
  end
@@ -1,3 +1,3 @@
1
1
  module EcsDeployer
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecs_deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - naomichi-y
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
- rubygems_version: 2.6.10
125
+ rubygems_version: 2.5.1
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Deploy application to ECS.