gem4rake 1.0.3 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gem4rake.rb +11 -13
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0921404c7aa1385644c390983c8a20884a6d17ee
|
4
|
+
data.tar.gz: 752098702d25b0c9c86323e3c7ea8dee99afaa29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f4976291e903dfa8a95c7a7cece3c3d394485a73c6158f41cf5e1bfaed4c9e602a05f0de67f1a1e7320261f7fe362851d495f706fe79f047ae5fad84e0299b8
|
7
|
+
data.tar.gz: 71936d99b6e77cf0d319cf7bbdcf7af0f351bb0433f7e56861bbd4884fb30579ea87d41991e28315c2fd5e1076ee9c4e21fd7e5076c037ffadfd5355e25aad7d
|
data/lib/gem4rake.rb
CHANGED
@@ -3,7 +3,6 @@ require 'rake/tasklib'
|
|
3
3
|
# Rake tasks to assist developing Ruby Gems.
|
4
4
|
#
|
5
5
|
# Gem's name must match current directory's basename.
|
6
|
-
#
|
7
6
|
# A `.spec` file with that name is also required.
|
8
7
|
#
|
9
8
|
# = Usage:
|
@@ -16,7 +15,7 @@ require 'rake/tasklib'
|
|
16
15
|
# = Example:
|
17
16
|
#
|
18
17
|
# $ rake -T
|
19
|
-
# rake build # Build autoup-1.0.4.gem
|
18
|
+
# rake build # Build autoup-1.0.4.gem
|
20
19
|
# rake clean # Delete autoup-*.gem
|
21
20
|
# rake cleanup # Cleanup autoup gems
|
22
21
|
# rake install # Install autoup-1.0.4.gem
|
@@ -25,9 +24,8 @@ require 'rake/tasklib'
|
|
25
24
|
#
|
26
25
|
# = Notes:
|
27
26
|
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
# * on Windows
|
27
|
+
# On Windows we don't use `--user-install` for install and uninstall.
|
28
|
+
# On other platforms we do.
|
31
29
|
#
|
32
30
|
class Gem4Rake < ::Rake::TaskLib
|
33
31
|
# Initialize Rake tasks to assist developing Ruby Gems.
|
@@ -36,17 +34,17 @@ class Gem4Rake < ::Rake::TaskLib
|
|
36
34
|
|
37
35
|
desc "Install #{@name}-#{version}.gem"
|
38
36
|
task :install => :build do
|
39
|
-
|
37
|
+
user_install "gem install #{@name}-#{version}.gem"
|
40
38
|
end
|
41
39
|
|
42
40
|
desc "Uninstall #{@name} gems"
|
43
41
|
task :uninstall do
|
44
|
-
|
42
|
+
user_install "gem uninstall #{@name}"
|
45
43
|
end
|
46
44
|
|
47
45
|
desc "Cleanup #{@name} gems"
|
48
46
|
task :cleanup do
|
49
|
-
|
47
|
+
sh "gem cleanup #{@name}"
|
50
48
|
end
|
51
49
|
|
52
50
|
desc "Push #{@name}-#{version}.gem"
|
@@ -65,13 +63,13 @@ class Gem4Rake < ::Rake::TaskLib
|
|
65
63
|
end
|
66
64
|
end
|
67
65
|
|
68
|
-
# Run the argument with
|
66
|
+
# Run the argument with `--user-install` if not on Windows.
|
69
67
|
# Otherwise just run it.
|
70
|
-
def
|
71
|
-
if
|
72
|
-
sh 'sudo ' + arg
|
73
|
-
else
|
68
|
+
def user_install(arg)
|
69
|
+
if Gem.win_platform?
|
74
70
|
sh arg
|
71
|
+
else
|
72
|
+
sh arg + ' --user-install'
|
75
73
|
end
|
76
74
|
end
|
77
75
|
|
metadata
CHANGED
@@ -1,33 +1,33 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem4rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasily Korytov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '10'
|
20
|
-
- -
|
20
|
+
- - <
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '13'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '10'
|
30
|
-
- -
|
30
|
+
- - <
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '13'
|
33
33
|
description: Tasks for developing Ruby Gems. Gem and .spec names must match directory
|
@@ -49,17 +49,17 @@ require_paths:
|
|
49
49
|
- lib
|
50
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.9.2
|
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
61
|
rubyforge_project:
|
62
|
-
rubygems_version: 2.
|
62
|
+
rubygems_version: 2.0.14.1
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Rake tasks to assist developing Ruby Gems
|