furikake 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdc9e754ec890d31c38d2b4c6d1f2ec7fe5f143739b89898f8ff117b0477280e
4
- data.tar.gz: 1d09564fe81ce399f44e91958654218bd103d0220f665602b198f1442ab8d91c
3
+ metadata.gz: b4e9ff346a0ba1c616e1bd95fe56daeff8e14993b1bfbac5a30afc948d30284b
4
+ data.tar.gz: af7c57a0eebe4239245fd95525d9e9077889d50460fe6d95cb136ce183339403
5
5
  SHA512:
6
- metadata.gz: 19d8e751e35ce1a69417f948f8ab6bf97b991cc5c61022bbc2a95251b33dcbbe1529e4d71bfd817e17153270141e5fbb514ca9a2473d9c035e0e8e8d3226ad1d
7
- data.tar.gz: e9b41587735901c32f905484845a8babb165d9277fb7b791e628b380f2a6d5681efdb194bbb21a0315f0870679152baf6ea8c98dda82bf960abf66e8681df55f
6
+ metadata.gz: 4ab877f29e6fe9f6cfab8f84f19ae7abe207b739027b439f70be29228e7452349f9de442c88fb0649948d60829c2d6fc57c05f577e40c940dd058395cbdb13f2
7
+ data.tar.gz: 394a286bc0c7b710ff48af5f1d8f5ede0f3ffb101a04134176dab1abeafae94dfba56e718114289c93e2c96fa8892db00e80463233eaa24e8bce3708bb29fd68
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- furikake (0.1.7)
4
+ furikake (0.1.8)
5
5
  aws-sdk
6
6
  backlog_kit
7
7
  markdown-tables
@@ -7,7 +7,8 @@ module Furikake
7
7
  def initialize(cli, params = nil)
8
8
  $stdout.sync = true
9
9
  @logger = Logger.new($stdout)
10
- @params = cli ? read_furikake_yaml : params
10
+ @cli = cli
11
+ @params = @cli ? read_furikake_yaml : params
11
12
  raise ArgumentError, 'パラメータが設定されていません.' if @params.nil?
12
13
  end
13
14
 
@@ -34,7 +35,7 @@ module Furikake
34
35
  private
35
36
 
36
37
  def generate(header, footer)
37
- resource = Furikake::Resource.generate
38
+ resource = Furikake::Resource.generate(@cli, @params['resources'])
38
39
  documents = <<"EOS"
39
40
  #{header}
40
41
  #{resource}
@@ -1,8 +1,8 @@
1
1
  module Furikake
2
2
  class Resource
3
- def self.generate
3
+ def self.generate(cli, resources)
4
4
  documents = ''
5
- load_resource_type.each do |type|
5
+ load_resource_type(cli, resources).each do |type|
6
6
  if type.include?('addon')
7
7
  $LOAD_PATH.push(Dir.pwd + '/addons')
8
8
  require "#{type}"
@@ -26,9 +26,9 @@ module Furikake
26
26
  documents
27
27
  end
28
28
 
29
- def self.load_resource_type
29
+ def self.load_resource_type(cli, resources)
30
30
  type = []
31
- config_defined_resources = load_config_resource_type
31
+ config_defined_resources = cli ? load_config_resource_type : resources['aws'].sort
32
32
  default_resources = load_default_resource_type
33
33
  if default_resources == config_defined_resources
34
34
  type.push(default_resources)
@@ -1,3 +1,3 @@
1
1
  module Furikake
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: furikake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - inokappa