koushien 0.1.3 → 0.1.5
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/bin/koushien +38 -0
- data/koushien.gemspec +1 -2
- data/lib/koushien/command.rb +6 -3
- data/lib/koushien/output.rb +9 -0
- data/lib/koushien/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: daf23b0913abffb109f52645a4e9f574b21006cc3ae07957638806376297cd61
|
|
4
|
+
data.tar.gz: 6daa17ab8a77c19ce65b4ffa4c0ec146a476460e747606f01c5ea0504bb277e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '095eb2bc3b051c5ad686aa8b557ac20bc69a1d9c464184f4566f473caad03a9c676acc648fed6cc062e571f21b420cad356f64a5854c30624e834d945c849a82'
|
|
7
|
+
data.tar.gz: c3b0439d6a023d7db48b3904ae06f5c3db8357f24ffae29eb4abb8525282d5d80b30171b8ac2520ada27ce45c0b0fe1f654c440b26374062f2100f1d303c50a8
|
data/bin/koushien
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require 'optparse'
|
|
4
|
+
require 'koushien/version'
|
|
5
|
+
require 'koushien'
|
|
6
|
+
require 'fileutils'
|
|
7
|
+
require 'csv'
|
|
8
|
+
|
|
9
|
+
Version = Koushien::VERSION
|
|
10
|
+
|
|
11
|
+
# コマンド定義
|
|
12
|
+
ARGV.options do |opt|
|
|
13
|
+
|
|
14
|
+
# バージョン
|
|
15
|
+
opt.on('-v', '--version') do
|
|
16
|
+
puts opt.ver
|
|
17
|
+
exit
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# CSV出力
|
|
21
|
+
opt.on('-o') do |v|
|
|
22
|
+
# ディレクトリ作成(なければ)
|
|
23
|
+
FileUtils.mkdir_p('./koushien/outputs/')
|
|
24
|
+
# csv作成
|
|
25
|
+
now = Time.now.strftime('%Y%m%d%H%M%S')
|
|
26
|
+
|
|
27
|
+
CSV.open("./koushien/outputs/koushien_#{now}.csv", 'w') do |csv|
|
|
28
|
+
csv << ['output time']
|
|
29
|
+
csv << [now]
|
|
30
|
+
end
|
|
31
|
+
exit
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
opt.parse!
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# オプションに基づいて処理を実行
|
|
38
|
+
# Koushien::Command.exec(options)
|
data/koushien.gemspec
CHANGED
|
@@ -21,10 +21,9 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
22
22
|
spec.files = Dir.chdir(__dir__) do
|
|
23
23
|
`git ls-files -z`.split("\x0").reject do |f|
|
|
24
|
-
(File.expand_path(f) == __FILE__) || f.match(%r{\A(?:(?:
|
|
24
|
+
(File.expand_path(f) == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
|
-
spec.bindir = "exe"
|
|
28
27
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
29
28
|
spec.require_paths = ["lib"]
|
|
30
29
|
|
data/lib/koushien/command.rb
CHANGED
|
@@ -2,12 +2,15 @@ require 'optparse'
|
|
|
2
2
|
|
|
3
3
|
module Koushien
|
|
4
4
|
class Command
|
|
5
|
+
attr_accessor :output_dir
|
|
6
|
+
# デフォルト値設定
|
|
7
|
+
def initialize
|
|
8
|
+
@output_dir = 'koushien_outputs'
|
|
9
|
+
end
|
|
10
|
+
|
|
5
11
|
class << self
|
|
6
12
|
def exec(options)
|
|
7
13
|
end
|
|
8
14
|
end
|
|
9
|
-
|
|
10
|
-
def initialize
|
|
11
|
-
end
|
|
12
15
|
end
|
|
13
16
|
end
|
data/lib/koushien/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: koushien
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ms919
|
|
8
8
|
autorequire:
|
|
9
|
-
bindir:
|
|
9
|
+
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-03-
|
|
11
|
+
date: 2023-03-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|
|
15
15
|
- koushien.gem@gmail.com
|
|
16
|
-
executables:
|
|
16
|
+
executables:
|
|
17
|
+
- koushien
|
|
17
18
|
extensions: []
|
|
18
19
|
extra_rdoc_files: []
|
|
19
20
|
files:
|
|
@@ -26,9 +27,11 @@ files:
|
|
|
26
27
|
- LICENSE.txt
|
|
27
28
|
- README.md
|
|
28
29
|
- Rakefile
|
|
30
|
+
- bin/koushien
|
|
29
31
|
- koushien.gemspec
|
|
30
32
|
- lib/koushien.rb
|
|
31
33
|
- lib/koushien/command.rb
|
|
34
|
+
- lib/koushien/output.rb
|
|
32
35
|
- lib/koushien/version.rb
|
|
33
36
|
- sig/koushien.rbs
|
|
34
37
|
homepage: https://github.com/ms919/koushien
|