koushien 0.1.6 → 0.1.7

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: 1e9fa9ecf20d82a03e9114f05b8073a4a74592b17757a6134c5e31d813d41ade
4
- data.tar.gz: 9492b69cf7ba2e0d4c588ad3f07f86acfb067c459c49450bb69c7fa66f7ec5bc
3
+ metadata.gz: 7e9e7e8811c5fca89a34b9cfee9d0c7a7b78d0b046a24a83cc4c6fc5b8e1a7b2
4
+ data.tar.gz: 9cfb263783b7c50b556a68e945d96872535babcc9e5b1e1034f71cfc6963b82e
5
5
  SHA512:
6
- metadata.gz: 65fa14e51783c5fb092165121e4a5d0fcd7ffeddab42c4f6bb11b67cb0e4f407213a962f9cdbae32174e6869f6fdd478a12421a001ee68c48dc82c6a3adf7448
7
- data.tar.gz: 33c92959083b6c05be891b4df111a49791138997b394b0beb7074c242285b92c10a575861246e815c18b1851bebd84cb5ffc91e85c2468a0583fc80329a3b8b8
6
+ metadata.gz: a2fd9cbe2d1b3b9906f0ecc448c254b9e72755c54d4fcdcb098e03e92af0e9c8033b44af1274cb566313cc82957609819f0bed88ea88074df7d90b2edd52a8b1
7
+ data.tar.gz: d1504ca8faef8d6ec5cba6b874dcb097a19e78398bf9dd57f0fd7e32000dfcb226564c58841268dedf070510ecb74ec8c34acef531403c2e2a6a1f4ccae71a4a
data/bin/koushien CHANGED
@@ -24,18 +24,25 @@ ARGV.options do |opt|
24
24
  }
25
25
  arr.each {|x| x.strip!}
26
26
 
27
- a = arr.filter_map do |y|
28
- y if /^t\..*/.match(y)
27
+ if RUBY_VERSION.to_f >= 2.7
28
+ a = arr.filter_map do |y|
29
+ y if /^t\..*/.match(y)
30
+ end
31
+ else
32
+ a = arr.map do |y|
33
+ y if /^t\..*/.match(y)
34
+ end
35
+ a.compact!
29
36
  end
30
37
 
31
38
  # ディレクトリ作成(なければ)
32
39
  FileUtils.mkdir_p('./koushien/outputs/')
33
40
  # csv作成
34
- now = Time.now.strftime('%Y%m%d%H%M%S')
41
+ today = Time.now.strftime('%Y%m%d')
35
42
 
36
- CSV.open("./koushien/outputs/koushien_#{now}.csv", 'w') do |csv|
43
+ CSV.open("./koushien/outputs/koushien_#{today}.csv", 'a') do |csv|
37
44
  csv << ['output time']
38
- csv << [now]
45
+ csv << [today]
39
46
  csv << []
40
47
  csv << a
41
48
  end
data/koushien.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = "output koushien data."
12
12
  spec.homepage = "https://github.com/ms919/koushien"
13
13
  spec.license = "MIT"
14
- spec.required_ruby_version = ">= 2.6.0"
14
+ spec.required_ruby_version = ">= 2.7.0"
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
17
  spec.metadata["source_code_uri"] = "https://github.com/ms919/koushien"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Koushien
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.7"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koushien
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
  - ms919
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-03 00:00:00.000000000 Z
11
+ date: 2023-04-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -49,7 +49,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
49
49
  requirements:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 2.6.0
52
+ version: 2.7.0
53
53
  required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - ">="