gem4rake 1.0.3 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/NOTICE +1 -1
- data/lib/gem4rake.rb +36 -31
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 802d13662d217b7c970618047fd0a31d496b2ebd5b86ec1955b82901128c9493
|
4
|
+
data.tar.gz: 72bf80bbfb23d42ee3d064faf6f2fe8fc3abe870a5424fa8273651c73cde1d1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cf1442e5335bb3f325427b4f971e3362fdb3f7b086cf2745562dabc36ceca4d971d2ceaaea94e80611ea6b6d775eaf93c4b8f4ce4867db3a2603cd0a5e7ee8e
|
7
|
+
data.tar.gz: d29ea1a4a23701155f4335ffe06c389d726bc14a0e0e91059069c5ee40d186c6a1ccdb7d61328f48a72b0259ea93f4bda3fdbbad687ceee926c2c2375d96b152
|
data/NOTICE
CHANGED
data/lib/gem4rake.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rake/tasklib'
|
2
4
|
|
3
5
|
# Rake tasks to assist developing Ruby Gems.
|
4
6
|
#
|
5
7
|
# Gem's name must match current directory's basename.
|
6
|
-
#
|
7
8
|
# A `.spec` file with that name is also required.
|
8
9
|
#
|
9
10
|
# = Usage:
|
@@ -16,7 +17,7 @@ require 'rake/tasklib'
|
|
16
17
|
# = Example:
|
17
18
|
#
|
18
19
|
# $ rake -T
|
19
|
-
# rake build # Build autoup-1.0.4.gem
|
20
|
+
# rake build # Build autoup-1.0.4.gem
|
20
21
|
# rake clean # Delete autoup-*.gem
|
21
22
|
# rake cleanup # Cleanup autoup gems
|
22
23
|
# rake install # Install autoup-1.0.4.gem
|
@@ -25,38 +26,53 @@ require 'rake/tasklib'
|
|
25
26
|
#
|
26
27
|
# = Notes:
|
27
28
|
#
|
28
|
-
#
|
29
|
-
# * `SUDO=false` env. variable is set
|
30
|
-
# * on Windows
|
29
|
+
# If you got permission denied errors, you may need: `echo gem: --user-install > ~/.gemrc`
|
31
30
|
#
|
32
31
|
class Gem4Rake < ::Rake::TaskLib
|
33
32
|
# Initialize Rake tasks to assist developing Ruby Gems.
|
34
33
|
def initialize(version)
|
34
|
+
super()
|
35
35
|
@name = File.basename(Dir.getwd) # Get Gem's name from CWD basename.
|
36
|
+
@version = version
|
37
|
+
|
38
|
+
build_task
|
39
|
+
install_tasks
|
40
|
+
push_task
|
41
|
+
clean_tasks
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
36
45
|
|
37
|
-
|
38
|
-
|
39
|
-
|
46
|
+
def build_task
|
47
|
+
desc "Build #{@name}-#{@version}.gem"
|
48
|
+
task :build do
|
49
|
+
sh "gem build #{@name}.gemspec"
|
40
50
|
end
|
51
|
+
end
|
41
52
|
|
42
|
-
|
43
|
-
|
44
|
-
|
53
|
+
def install_tasks
|
54
|
+
desc "Install #{@name}-#{@version}.gem"
|
55
|
+
task install: :build do
|
56
|
+
sh "gem install #{@name}-#{@version}.gem"
|
45
57
|
end
|
46
58
|
|
47
|
-
desc "
|
48
|
-
task :
|
49
|
-
|
59
|
+
desc "Uninstall #{@name} gems"
|
60
|
+
task :uninstall do
|
61
|
+
sh "gem uninstall #{@name}"
|
50
62
|
end
|
63
|
+
end
|
51
64
|
|
52
|
-
|
53
|
-
|
54
|
-
|
65
|
+
def push_task
|
66
|
+
desc "Push #{@name}-#{@version}.gem"
|
67
|
+
task push: :build do
|
68
|
+
sh "gem push #{@name}-#{@version}.gem"
|
55
69
|
end
|
70
|
+
end
|
56
71
|
|
57
|
-
|
58
|
-
|
59
|
-
|
72
|
+
def clean_tasks
|
73
|
+
desc "Cleanup #{@name} gems"
|
74
|
+
task :cleanup do
|
75
|
+
sh "gem cleanup #{@name}"
|
60
76
|
end
|
61
77
|
|
62
78
|
desc "Delete #{@name}-*.gem"
|
@@ -64,15 +80,4 @@ class Gem4Rake < ::Rake::TaskLib
|
|
64
80
|
rm Dir.glob("#{@name}-*.gem")
|
65
81
|
end
|
66
82
|
end
|
67
|
-
|
68
|
-
# Run the argument with sudo if not on Windows and ENV['SUDO'] != 'false'.
|
69
|
-
# Otherwise just run it.
|
70
|
-
def sudo(arg)
|
71
|
-
if ENV['SUDO'] != 'false' && ! Gem.win_platform?
|
72
|
-
sh 'sudo ' + arg
|
73
|
-
else
|
74
|
-
sh arg
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
83
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem4rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasily Korytov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '10'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '14'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,10 +29,10 @@ dependencies:
|
|
29
29
|
version: '10'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '14'
|
33
33
|
description: Tasks for developing Ruby Gems. Gem and .spec names must match directory
|
34
34
|
basename
|
35
|
-
email:
|
35
|
+
email: v.korytov@outlook.com
|
36
36
|
executables: []
|
37
37
|
extensions: []
|
38
38
|
extra_rdoc_files: []
|
@@ -43,7 +43,7 @@ homepage: https://github.com/chillum/gem4rake
|
|
43
43
|
licenses:
|
44
44
|
- Apache-2.0
|
45
45
|
metadata: {}
|
46
|
-
post_install_message:
|
46
|
+
post_install_message:
|
47
47
|
rdoc_options: []
|
48
48
|
require_paths:
|
49
49
|
- lib
|
@@ -51,16 +51,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '2.4'
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
|
-
|
62
|
-
|
63
|
-
signing_key:
|
61
|
+
rubygems_version: 3.2.3
|
62
|
+
signing_key:
|
64
63
|
specification_version: 4
|
65
64
|
summary: Rake tasks to assist developing Ruby Gems
|
66
65
|
test_files: []
|