furikake 0.1.6 → 0.1.7

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: ef9b8d6d6913739ca4b51d210b85f7513b60f5b670e1b12f7c45223738f81a3e
4
- data.tar.gz: b5e8a93dfc74a45c288a1ae6e15ff0eba2168f3227e5dbb55a6567415ff81d7f
3
+ metadata.gz: fdc9e754ec890d31c38d2b4c6d1f2ec7fe5f143739b89898f8ff117b0477280e
4
+ data.tar.gz: 1d09564fe81ce399f44e91958654218bd103d0220f665602b198f1442ab8d91c
5
5
  SHA512:
6
- metadata.gz: 2a4bf4c1f24067079cee3ff94eccc5f3f517be82c52dcf828cf4088c605a32d74add13e347e6e9488ef39617dcdea757504870a61f00e9fc6b33ddac944aa3f6
7
- data.tar.gz: d1565f7669a722a2f790d05abbe1ca3081e707e85b6c21d6a8ac7671e30a5838699ccbe6a4ff90284525ceeb142812bd4b0f2b291445ea4aba03a2d772540089
6
+ metadata.gz: 19d8e751e35ce1a69417f948f8ab6bf97b991cc5c61022bbc2a95251b33dcbbe1529e4d71bfd817e17153270141e5fbb514ca9a2473d9c035e0e8e8d3226ad1d
7
+ data.tar.gz: e9b41587735901c32f905484845a8babb165d9277fb7b791e628b380f2a6d5681efdb194bbb21a0315f0870679152baf6ea8c98dda82bf960abf66e8681df55f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- furikake (0.1.6)
4
+ furikake (0.1.7)
5
5
  aws-sdk
6
6
  backlog_kit
7
7
  markdown-tables
data/README.md CHANGED
@@ -43,6 +43,12 @@ export AWS_PROFILE=your-profile
43
43
  export AWS_REGION=ap-northeast-1
44
44
  ```
45
45
 
46
+ BACKLOG_API キーについても環境変数に指定することも可能です.
47
+
48
+ ```sh
49
+ export BACKLOG_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
50
+ ```
51
+
46
52
  ### Step 3: Generate && Modify .frikake.yml
47
53
 
48
54
  If you're starting on a fresh furikake project, you can use furikake to generate your .furikake.yml:
@@ -98,6 +104,18 @@ bundle exec furikake show
98
104
  bundle exec furikake publish
99
105
  ```
100
106
 
107
+ ### Step x: Monitor
108
+
109
+ `monitor` コマンドを利用することで, `publish` コマンドを常駐化することが可能です.
110
+
111
+ ```sh
112
+ # 1 時間毎に対象をチェックして wiki に登録する
113
+ bundle exec furikake monitor
114
+
115
+ # 10 分毎に対象をチェックして wiki に登録する
116
+ bundle exec furikake monitor --interval=600
117
+ ```
118
+
101
119
  ## Tips
102
120
 
103
121
  ### 検索対象リソース追加 (addons ディレクトリ)
data/lib/furikake/cli.rb CHANGED
@@ -9,13 +9,13 @@ module Furikake
9
9
 
10
10
  desc 'show', 'resouces print.'
11
11
  def show
12
- report = Furikake::Report.new
12
+ report = Furikake::Report.new(true)
13
13
  report.show
14
14
  end
15
15
 
16
16
  desc 'publish', 'resouces publish to something. (Default: Backlog)'
17
17
  def publish
18
- report = Furikake::Report.new
18
+ report = Furikake::Report.new(true)
19
19
  report.publish
20
20
  end
21
21
 
@@ -4,14 +4,15 @@ module Furikake
4
4
  class Report
5
5
  include Furikake::Config
6
6
 
7
- def initialize
7
+ def initialize(cli, params = nil)
8
8
  $stdout.sync = true
9
9
  @logger = Logger.new($stdout)
10
+ @params = cli ? read_furikake_yaml : params
11
+ raise ArgumentError, 'パラメータが設定されていません.' if @params.nil?
10
12
  end
11
13
 
12
14
  def show
13
- params = read_furikake_yaml
14
- params['backlog']['projects'].each do |p|
15
+ @params['backlog']['projects'].each do |p|
15
16
  header = insert_published_by(p['header'])
16
17
  footer = p['footer']
17
18
  puts generate(header, footer)
@@ -19,8 +20,7 @@ module Furikake
19
20
  end
20
21
 
21
22
  def publish
22
- params = read_furikake_yaml
23
- params['backlog']['projects'].each do |p|
23
+ @params['backlog']['projects'].each do |p|
24
24
  header = insert_published_by(p['header'])
25
25
  footer = p['footer']
26
26
  document = generate(header, footer)
@@ -31,10 +31,6 @@ module Furikake
31
31
  end
32
32
  end
33
33
 
34
- # def monitor_test
35
- # show
36
- # end
37
-
38
34
  private
39
35
 
40
36
  def generate(header, footer)
@@ -1,3 +1,3 @@
1
1
  module Furikake
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
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.1.6
4
+ version: 0.1.7
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-25 00:00:00.000000000 Z
11
+ date: 2018-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler