runfile-tasks 1.0.0.rc2 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/docker.runfile +1 -1
  4. data/gem.runfile +26 -19
  5. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a52180fe4c5515417c8d824ff37b289e5fe0cded7ec37e9e20ae1bc60eebde9
4
- data.tar.gz: b7f3ace97f01eab2b9cdf6c1884ca5c53ea20efed7196ce4c9bce2451a124598
3
+ metadata.gz: 6c9053330f6de48b1a256bfe8878c9cd9f2caa2f39442dd6d348dd4e5b450eee
4
+ data.tar.gz: 72c148f9cdd1d450650b8e4350e14717c2c69465e0e0e184f85cd4475e741182
5
5
  SHA512:
6
- metadata.gz: bfaa1e699ce30ec6b129b1282c776fa4964035e7a5c029760769b7b326a9070107f22fc9a9e43146d29e10492a6b000c0606c3bfaa642b8432b5244e6398f896
7
- data.tar.gz: ce63acc919c87660f7cf43df2f981995bce7195ae9cdd3a1eb9db05c90757f17fc9d8cd2f33627268b42fb501f4083ec84277a1b0828b26acf750069bdc1d6b6
6
+ metadata.gz: 51f4f1d8683cb0bf6f7d17d84651317e3d51857e32a07886919814d96796e587d327cd3eacefb6c6878b693e4ccf097632c00c0297fbc72fc8fc61df5bd0d08a
7
+ data.tar.gz: 0cafcd6a005b243d84158ea943af78b6eaca197f89ed5b047ee66d3dac7980f5031326d8fed0fbf713138d325410b4c259c8293d367d86a41d9747f9658e9ad5
data/README.md CHANGED
@@ -33,7 +33,9 @@ In your Runfile, use the `import_gem` directive to require any of the runfiles:
33
33
  title 'My Runfile'
34
34
 
35
35
  # commands for building and publishing your gem
36
- import_gem 'runfile-tasks/gem', gemname: 'my-gem'
36
+ import_gem 'runfile-tasks/gem'
37
+ # or without publish/yank actions
38
+ import_gem 'runfile-tasks/gem', private: true
37
39
 
38
40
  # commands for building and publishing your Dockerfile
39
41
  import_gem 'runfile-tasks/docker', image: 'my/image', version: '1.2.3'
data/docker.runfile CHANGED
@@ -1,5 +1,5 @@
1
1
  title 'Docker image commands'
2
- summary 'Add docker building and publishing commands to your project'
2
+ summary 'Ddocker building and publishing commands'
3
3
 
4
4
  require_context :image
5
5
  require_context :version
data/gem.runfile CHANGED
@@ -1,9 +1,9 @@
1
1
  require 'fileutils'
2
2
 
3
3
  title 'Gem management commands'
4
- summary 'Add gem building and publishing to your gem project'
4
+ summary 'Gem building and publishing commands'
5
5
 
6
- require_context :gemname
6
+ require_context :private, default: false
7
7
 
8
8
  help 'Build and optionally install the gem'
9
9
  usage '(build | b) [--install]'
@@ -20,29 +20,36 @@ action :install, :i do
20
20
  install_gem
21
21
  end
22
22
 
23
- help 'Publish gem to rubygems'
24
- action :publish, :p do
25
- need_gemfile
26
- say 'g`Publishing gem`'
27
- run "gem push #{gemfile}"
28
- end
23
+ unless context[:private]
24
+ help 'Publish gem to rubygems'
25
+ action :publish, :p do
26
+ need_gemfile
27
+ say 'g`Publishing gem`'
28
+ run "gem push #{gemfile}"
29
+ end
29
30
 
30
- usage 'yank VERSION'
31
- help 'Yank gem from rubygems'
32
- action :yank do |args|
33
- version = args['VERSION']
34
- say 'rib` Yanking gem ` Are you sure?'
35
- 10.downto(0) do |i|
36
- say "Yanking in #{i} seconds - Ctrl-C to abort ", replace: true
37
- sleep 1
31
+ usage 'yank VERSION'
32
+ help 'Yank gem from rubygems'
33
+ action :yank do |args|
34
+ version = args['VERSION']
35
+ say "rib` Yank #{gemname} #{version} ` Are you sure?"
36
+ 10.downto(0) do |i|
37
+ say "Yanking in #{i} seconds - Ctrl-C to abort ", replace: true
38
+ sleep 1
39
+ end
40
+ say 'g`Yanking gem`', replace: true
41
+ run "gem yank #{gemname} -v #{version}"
38
42
  end
39
- say 'g`Yanking gem`', replace: true
40
- run "gem yank #{gemname} -v #{version}"
41
43
  end
42
44
 
43
45
  helpers do
44
46
  def gemname
45
- context[:gemname]
47
+ @gemname ||= begin
48
+ gemspec = Dir['*.gemspec'].first
49
+ raise UserError, 'Cannot find any *.gemspec' unless gemspec
50
+
51
+ Gem::Specification::load(gemspec).name
52
+ end
46
53
  end
47
54
 
48
55
  def gemfile
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runfile-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc2
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-26 00:00:00.000000000 Z
11
+ date: 2023-02-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A collection of tasks for Runfile
14
14
  email: db@dannyben.com
@@ -35,11 +35,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
35
35
  version: '2.7'
36
36
  required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3.1
40
+ version: '0'
41
41
  requirements: []
42
- rubygems_version: 3.4.5
42
+ rubygems_version: 3.4.6
43
43
  signing_key:
44
44
  specification_version: 4
45
45
  summary: Runfile tasks collection