put_rake 0.1.5 → 0.1.6

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: dab232f839de21bea557cbdfdffbd8f274b1a200f3920fbad9ec3e3c22cabf4b
4
- data.tar.gz: 38a0219457b0888ba8b6224f44b8bbaa723dfb29481c4c12d67f4239325ae17e
3
+ metadata.gz: b5d9d7bf945364e75b449387e94d81b7bc7f2b727d7ac2f8b0dbb5967542c2cf
4
+ data.tar.gz: beb82ce8e9af4a5fe17c38154278a91592f11f1a203b5fb76df388d2f6951566
5
5
  SHA512:
6
- metadata.gz: 2beb7bb3a9d083f29f83221813cd574704f25fd13e180806574a60b7439f876f869ad1290e94addb5ad8828f1128ad4902d471e3fd5be3c2883cde657569ec60
7
- data.tar.gz: 749699dad4fe56c1c4f1c440435674d17978e97708006a33a4a94b976d0b2eb75d87d0f503ac35f9eaa57410cdf956d16335db4672c838352b3696cce2f61b9f
6
+ metadata.gz: 5d41721998e5048d73d90c28901f925dee374d8ec3ce5b2f19052e75ac13239e6d548ab4ad08163d094f6fdd04c1c93ad5ae7b90850eef82a7209ee7e5101a25
7
+ data.tar.gz: 34d26cabc80f71336eac48d4edfb46dbbcf3859da2e56d8a5cbb5e8d132ca7e998fdeeccb36d9547160bcb2215e7a1322a746ed5dcbf3c94b933ec4954535bbf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- put_rake (0.1.4)
4
+ put_rake (0.1.6)
5
5
  colorize
6
6
  command_line
7
7
  thor
@@ -9,7 +9,7 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- colorize (0.8.1)
12
+ colorize (1.1.0)
13
13
  command_line (2.0.1)
14
14
  diff-lcs (1.5.0)
15
15
  rake (13.0.6)
@@ -26,7 +26,7 @@ GEM
26
26
  diff-lcs (>= 1.2.0, < 2.0)
27
27
  rspec-support (~> 3.12.0)
28
28
  rspec-support (3.12.0)
29
- thor (1.2.1)
29
+ thor (1.3.1)
30
30
 
31
31
  PLATFORMS
32
32
  arm64-darwin-20
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PutRake
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
data/lib/put_rake.rb CHANGED
@@ -23,9 +23,9 @@ module PutRake
23
23
  end
24
24
 
25
25
  desc "path", "show Rakefile template path"
26
-
27
26
  def path
28
- additional_path = ENV["PUT_RAKE_PATH"].split(":")
27
+ tmp = ENV["PUT_RAKE_PATH"] || ""
28
+ additional_path = tmp.split(":")
29
29
  @gem_template_dirs = [
30
30
  File.join(File.dirname(__FILE__), "templates"), additional_path,
31
31
  ].flatten
@@ -33,7 +33,6 @@ module PutRake
33
33
  end
34
34
 
35
35
  desc "add PATH", "add Rakefile template PATH"
36
-
37
36
  def add(*args)
38
37
  add = args[0]
39
38
  puts "Additional template paths are obtained from ENV['PUT_RAKE_PATH']."
@@ -65,7 +64,7 @@ HEREDOC
65
64
  exit
66
65
  end
67
66
  @file_path = @file_path[0]
68
- if File.exists?("./Rakefile") # check exist and -a -f
67
+ if File.exist?("./Rakefile") # check exist and -a -f
69
68
  if options[:force]
70
69
  comm = "cp #{@file_path} ./Rakefile"
71
70
  elsif options[:add]
@@ -86,12 +85,13 @@ HEREDOC
86
85
  path()
87
86
  @rake_file_path = []
88
87
  puts "* Available Rakefiles"
89
- puts "%10s: %s" % ["EXT", "full path"]
88
+ puts "%20s: %s" % ["EXT", "some description"]
90
89
  @gem_template_dirs.each do |gem_template_dir|
91
90
  puts "** #{gem_template_dir}"
92
91
  files = File.join(gem_template_dir, "*")
93
92
  Dir.glob(files).each do |file|
94
93
  next if file[-1] == "~"
94
+ next unless File.basename(file) =~ /^Rakefile/
95
95
  @rake_file_path << file
96
96
  key = file.match(/Rakefile_(.*)/)[1]
97
97
  res = command_line "rake -T -f #{file}"
@@ -17,12 +17,8 @@ task :git_auto do
17
17
  "git push origin main"].each do |comm|
18
18
  puts comm.cyan
19
19
  res = command_line comm
20
- if res.stderr != ''
21
- puts res.stderr.red
22
- exit
23
- else
24
- puts res.stdout.green
25
- end
20
+ puts res.stderr.red
21
+ puts res.stdout.green
26
22
  end
27
23
  end
28
24
 
@@ -7,8 +7,8 @@ task :default do
7
7
  end
8
8
 
9
9
  namespace :some_name_space do
10
- desc "task desciption" #desc descriptio
11
- task task_name: do # any name on task_name
10
+ desc "task desciption" #desc -> descriptin
11
+ task :task_name do # any name on task_name
12
12
  # your code goes
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: put_rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shigeto R. Nishiani
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-28 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubygems_version: 3.2.22
114
+ rubygems_version: 3.5.6
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Put a template of Rakefiles on the local dir.