gem4rake 1.3 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gem4rake.rb +28 -12
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90008f55a819a6ae6ec986dfd97b94ecdf80f85071168875c0169808553c6945
4
- data.tar.gz: 6748bd59dd466565e54d90b657163949990a1b602ab2a3161086b22435fa83d1
3
+ metadata.gz: 3e45d6169bce08be2a0211017c6becf9483b65c5a1669598783d4fcd3fd3fd6c
4
+ data.tar.gz: f78259e6894762ce908b431dd630704051f527cf41ff9af59a524e259c0368dd
5
5
  SHA512:
6
- metadata.gz: 467411d02a7202017ef4c0c6daea5d2dff61d015a411aba291d7a65d08b0298677dff4aec4fd1c18a20200a0cf5a56ce57c884087196417e20f278344c9ff26c
7
- data.tar.gz: 5c44cf1059904ea7014c8f7cdad5af47eef3e0500bac1f7c1fba77de55119f6da66626db014b93fca252500b08fcad9b526effb33b3da09a7d6ad845fd34ba25
6
+ metadata.gz: bffab2c7a78a105ea21639cfea4da31aa8b0b8c8aab6fbe524272d210e2209b99a34bd6689e7136f348365422fb3bb1041ee7dfdf5ca4ab376ea291c4f2fbd4a
7
+ data.tar.gz: dcd8805519f816d702532d763e78be3ed376b60764d6840cc2c9ac83f92d68b44b88780656c59489f78324e6656af8be4c5c6409fe6112afe3852d6420061b42
@@ -32,30 +32,46 @@ class Gem4Rake < ::Rake::TaskLib
32
32
  # Initialize Rake tasks to assist developing Ruby Gems.
33
33
  def initialize(version)
34
34
  @name = File.basename(Dir.getwd) # Get Gem's name from CWD basename.
35
+ @version = version
35
36
 
36
- desc "Install #{@name}-#{version}.gem"
37
+ build_task
38
+ install_tasks
39
+ push_task
40
+ clean_tasks
41
+ end
42
+
43
+ private
44
+
45
+ def build_task
46
+ desc "Build #{@name}-#{@version}.gem"
47
+ task :build do
48
+ sh "gem build #{@name}.gemspec"
49
+ end
50
+ end
51
+
52
+ def install_tasks
53
+ desc "Install #{@name}-#{@version}.gem"
37
54
  task install: :build do
38
- sh "gem install #{@name}-#{version}.gem"
55
+ sh "gem install #{@name}-#{@version}.gem"
39
56
  end
40
57
 
41
58
  desc "Uninstall #{@name} gems"
42
59
  task :uninstall do
43
60
  sh "gem uninstall #{@name}"
44
61
  end
62
+ end
45
63
 
46
- desc "Cleanup #{@name} gems"
47
- task :cleanup do
48
- sh "gem cleanup #{@name}"
49
- end
50
-
51
- desc "Push #{@name}-#{version}.gem"
64
+ def push_task
65
+ desc "Push #{@name}-#{@version}.gem"
52
66
  task push: :build do
53
- sh "gem push #{@name}-#{version}.gem"
67
+ sh "gem push #{@name}-#{@version}.gem"
54
68
  end
69
+ end
55
70
 
56
- desc "Build #{@name}-#{version}.gem"
57
- task :build do
58
- sh "gem build #{@name}.gemspec"
71
+ def clean_tasks
72
+ desc "Cleanup #{@name} gems"
73
+ task :cleanup do
74
+ sh "gem cleanup #{@name}"
59
75
  end
60
76
 
61
77
  desc "Delete #{@name}-*.gem"
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.3'
4
+ version: 1.3.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: 2019-11-30 00:00:00.000000000 Z
11
+ date: 2020-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -51,14 +51,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '2.3'
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
- rubygems_version: 3.0.3
61
+ rubygems_version: 3.1.2
62
62
  signing_key:
63
63
  specification_version: 4
64
64
  summary: Rake tasks to assist developing Ruby Gems