put_rake 0.1.6 → 0.1.9

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: b5d9d7bf945364e75b449387e94d81b7bc7f2b727d7ac2f8b0dbb5967542c2cf
4
- data.tar.gz: beb82ce8e9af4a5fe17c38154278a91592f11f1a203b5fb76df388d2f6951566
3
+ metadata.gz: 38b16796199bf8584a64561bb577ad6190badd246fb4dc28c8e1fea14be7edc8
4
+ data.tar.gz: 2992d80362a76cb65c446b807e8470053c6eaece1264d4be45aa1e688172d6b3
5
5
  SHA512:
6
- metadata.gz: 5d41721998e5048d73d90c28901f925dee374d8ec3ce5b2f19052e75ac13239e6d548ab4ad08163d094f6fdd04c1c93ad5ae7b90850eef82a7209ee7e5101a25
7
- data.tar.gz: 34d26cabc80f71336eac48d4edfb46dbbcf3859da2e56d8a5cbb5e8d132ca7e998fdeeccb36d9547160bcb2215e7a1322a746ed5dcbf3c94b933ec4954535bbf
6
+ metadata.gz: 484990da8b7497af01bbfe995e2646fe0deec1113315bd25c221c96cc7eeece28656afb522582aba906e8e4452a3b127ac37f563d4821c0493d03d3551415f0a
7
+ data.tar.gz: 91dcf91ae56e2cee44bf88ec96864220e44d3be66b97ba53b574ea00f3afa27168e9c3a6fab8ba84098fe6f3367877842881c1b42cff616797182b3cc4f43531
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- put_rake (0.1.6)
4
+ put_rake (0.1.7)
5
5
  colorize
6
6
  command_line
7
7
  thor
@@ -26,10 +26,11 @@ 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.3.1)
29
+ thor (1.3.2)
30
30
 
31
31
  PLATFORMS
32
32
  arm64-darwin-20
33
+ x86_64-linux
33
34
 
34
35
  DEPENDENCIES
35
36
  put_rake!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PutRake
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.9"
5
5
  end
data/lib/put_rake.rb CHANGED
@@ -32,14 +32,17 @@ module PutRake
32
32
  puts "* Rakefile template paths\n #{@gem_template_dirs.join("\n ")}"
33
33
  end
34
34
 
35
- desc "add PATH", "add Rakefile template PATH"
35
+ desc "add PATH", "How to add Rakefile template PATH"
36
36
  def add(*args)
37
37
  add = args[0]
38
38
  puts "Additional template paths are obtained from ENV['PUT_RAKE_PATH']."
39
- puts "Add default paths, put 'setenv PUT_RAKE_PATH ...' on ~/.config/fish/fishconfig.fish."
40
- p additional_path = [ENV["PUT_RAKE_PATH"].split(":"), add].join(":")
41
- p comm = "setenv #{additional_path}"
42
- system comm
39
+ ENV["PUT_RAKE_PATH"] ||= ''
40
+ p additional_path = [add, ENV["PUT_RAKE_PATH"].split(" ")].join(" ")
41
+ puts "Add default paths, put
42
+ \'setenv PUT_RAKE_PATH \'#{additional_path}\'\'
43
+ on ~/.config/fish/fishconfig.fish."
44
+ # p comm = "set -Ux PUT_RAKE_PATH \'#{additional_path}\'"
45
+ # system comm
43
46
  end
44
47
 
45
48
  desc "for [EXT]", "put Rakefile for [EXT]"
@@ -95,9 +98,11 @@ HEREDOC
95
98
  @rake_file_path << file
96
99
  key = file.match(/Rakefile_(.*)/)[1]
97
100
  res = command_line "rake -T -f #{file}"
98
- command = res.stdout.split("\n")[0]
99
- if command
100
- puts "%20s: %s" % [key, command.scan(/#.+/)[0]]
101
+ command = res.stdout.split("\n").collect do |line|
102
+ line.include?(key) ? line : nil
103
+ end
104
+ if command.compact[0] != nil
105
+ puts "%20s: %s" % [key, command.compact[0].scan(/#.+/)[0]]
101
106
  else
102
107
  puts "%20s: %s" % [key, File.basename(file)]
103
108
  end
@@ -7,7 +7,7 @@ task :default do
7
7
  end
8
8
 
9
9
  namespace :some_name_space do
10
- desc "task desciption" #desc -> descriptin
10
+ desc "task description" #desc -> description
11
11
  task :task_name do # any name on task_name
12
12
  # your code goes
13
13
  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.6
4
+ version: 0.1.9
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: 2024-05-29 00:00:00.000000000 Z
11
+ date: 2024-11-09 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.5.6
114
+ rubygems_version: 3.5.21
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Put a template of Rakefiles on the local dir.