furikake 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/lib/furikake/report.rb +20 -8
- data/lib/furikake/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a48a8d087b6d3f13f9721174b8720b2981cdbf555c0e00672fee4d73228977b0
|
4
|
+
data.tar.gz: 99c71d756ea80ee8dbc2f93422fe5ce801126f8d27aa0a465f3cfe8864e1b49b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80c734f4f02e18888202b9035a97a75e713999bbf85092a62690871a0db90d34f179482e50be7852fb98ab389eeae8011ba7d9b845ebeadcc799cc726a6f3598
|
7
|
+
data.tar.gz: a853e642726214479882d9e64e10c40e7d1fad89a626217481735e85860afa146c2553eaf2a152284626cec5c2d2f2247c7aed5eccb923393ee73b6dbed27d4a
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
* 利用している AWS リソースを Backlog の Wiki ページ (Markdown フォーマットのみ) に良しなに纏めてドキュメント化してくれるコマンドラインツールです
|
7
7
|
* 簡単なコードを追加することで, 取得する AWS リソースを増やすことが出来るようにはしています
|
8
8
|
* Backlog Wiki 以外にも登録出来るようにはしています
|
9
|
+
* Docker で実行出来るようにもしました (https://github.com/inokappa/furikake-docker)
|
9
10
|
|
10
11
|
## Install
|
11
12
|
|
data/lib/furikake/report.rb
CHANGED
@@ -4,13 +4,11 @@ module Furikake
|
|
4
4
|
class Report
|
5
5
|
include Furikake::Config
|
6
6
|
|
7
|
-
def initialize
|
8
|
-
@params = read_furikake_yaml
|
9
|
-
@resource = Furikake::Resource.generate
|
10
|
-
end
|
7
|
+
def initialize; end
|
11
8
|
|
12
9
|
def show
|
13
|
-
|
10
|
+
params = read_furikake_yaml
|
11
|
+
params['backlog']['projects'].each do |p|
|
14
12
|
header = insert_published_by(p['header'])
|
15
13
|
footer = p['footer']
|
16
14
|
puts generate(header, footer)
|
@@ -18,26 +16,40 @@ module Furikake
|
|
18
16
|
end
|
19
17
|
|
20
18
|
def publish
|
21
|
-
|
19
|
+
params = read_furikake_yaml
|
20
|
+
params['backlog']['projects'].each do |p|
|
22
21
|
header = insert_published_by(p['header'])
|
23
22
|
footer = p['footer']
|
24
23
|
document = generate(header, footer)
|
25
24
|
p['wiki_contents'] = document
|
26
|
-
|
25
|
+
param = check_api_key(p)
|
26
|
+
Furikake::Reporters::Backlog.new(param).publish
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
30
|
private
|
31
31
|
|
32
32
|
def generate(header, footer)
|
33
|
+
resource = Furikake::Resource.generate
|
33
34
|
documents = <<"EOS"
|
34
35
|
#{header}
|
35
|
-
#{
|
36
|
+
#{resource}
|
36
37
|
#{footer}
|
37
38
|
EOS
|
38
39
|
documents
|
39
40
|
end
|
40
41
|
|
42
|
+
def check_api_key(param)
|
43
|
+
if !param.has_key?(:api_key) or !param['api_key'].nil?
|
44
|
+
if !ENV['BACKLOG_API_KEY'].nil? or !ENV['BACKLOG_API_KEY'] == ''
|
45
|
+
param['api_key'] = ENV['BACKLOG_API_KEY']
|
46
|
+
return param
|
47
|
+
end
|
48
|
+
raise 'API キーを読み込むことが出来ませんでした.'
|
49
|
+
end
|
50
|
+
param
|
51
|
+
end
|
52
|
+
|
41
53
|
def insert_published_by(header)
|
42
54
|
headers = header.split("\n")
|
43
55
|
headers.insert(1, published_by)
|
data/lib/furikake/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: furikake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- inokappa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|