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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5e6135b0b2270eda52c710b590592559e12fb22f7072fdf511e98a1be70dbee
4
- data.tar.gz: d3f1ed467c9c0f84a55145303a60ef8c0c12895712b585b7235c1085bd63556b
3
+ metadata.gz: daf23b0913abffb109f52645a4e9f574b21006cc3ae07957638806376297cd61
4
+ data.tar.gz: 6daa17ab8a77c19ce65b4ffa4c0ec146a476460e747606f01c5ea0504bb277e2
5
5
  SHA512:
6
- metadata.gz: b8d3db65517e1e74567d53a4571e843a3758287becdee0ccaff7cb8223c387e11e4d06f260c46bf272ec36990e7bc064a03d9f0880e745536c981438274ac4fb
7
- data.tar.gz: 5f2e476e97933ce4295a71bd77c7ccea5b978b5828c98b66b2231f9c0f8ec789660cc8a7b46f92b09dcba371f63150d5871e0c0c46f15b8ca43aaa7522ba6384
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(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
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
 
@@ -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
@@ -0,0 +1,9 @@
1
+ module Koushien
2
+ class Output
3
+ attr_accessor :output_dir
4
+ # デフォルト値設定
5
+ def initialize
6
+ @output_dir = 'koushien_outputs'
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Koushien
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
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.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ms919
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-27 00:00:00.000000000 Z
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