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 +4 -4
- data/Gemfile.lock +3 -3
- data/lib/put_rake/version.rb +1 -1
- data/lib/put_rake.rb +5 -5
- data/lib/templates/Rakefile_git_auto +2 -6
- data/lib/templates/Rakefile_template +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5d9d7bf945364e75b449387e94d81b7bc7f2b727d7ac2f8b0dbb5967542c2cf
|
4
|
+
data.tar.gz: beb82ce8e9af4a5fe17c38154278a91592f11f1a203b5fb76df388d2f6951566
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
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 (
|
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.
|
29
|
+
thor (1.3.1)
|
30
30
|
|
31
31
|
PLATFORMS
|
32
32
|
arm64-darwin-20
|
data/lib/put_rake/version.rb
CHANGED
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
|
-
|
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.
|
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 "%
|
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
|
-
|
21
|
-
|
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
|
11
|
-
task 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.
|
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:
|
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.
|
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.
|