runfile-tasks 1.0.3 → 1.1.0

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 +2 -9
  3. data/gem.runfile +26 -10
  4. data/yard.runfile +3 -3
  5. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f89325e6fa987c92d5a0524756882da6cde621871d29b6b8c1aae2eb2876d56
4
- data.tar.gz: 8637c30a8e73a5ee5ed6d21999f857f9dfd141212124801d2ef9b027c9dba4b5
3
+ metadata.gz: 3b97bebf1b4366f916fa36668b6cd8561b2bdedc01ca73da899fa3a17a3b5c0e
4
+ data.tar.gz: f5b687276e1044dd48dc7a0443f063c8f42c2dee91f6cdd001e5cc59eadce76a
5
5
  SHA512:
6
- metadata.gz: be90a2e42f99fd2265309d076d23dc0f0756bc36442d3fe7f61490c25bdaaca648d8b08828ec0b39dcb87f4f5f896d6bbef030445b926c335b0595dea5004aba
7
- data.tar.gz: 0d7650b544489d60b0579b3d52ae492eaf27f376373607cf475cc3ae0172a3c49feacf5bb5962916dcbea240fbeacfa865d5debf6b8cdfdc5bbcf7a7f04dbc3b
6
+ metadata.gz: 84f4ca165958df8dd41ae9fbce2e621e218dbc717a13e2f9312608fbaf91ae3536b8f6824072a27f042b33f8d7fa348d80513ab69e7d4417dbb27ce3c12f2c6c
7
+ data.tar.gz: c1a2ef3a04b8e3d3ac0f53f3ddae2d9c340b287064711cdbee039488922557ef34421cd5f7e21b59ad3b1c2d3fda25a41c1791db006f9cfa24e9a8c9d2d07e77
data/README.md CHANGED
@@ -2,15 +2,6 @@
2
2
 
3
3
  A library of tasks ready to be included in your [Runfile].
4
4
 
5
- Note that this version of the gem is intended for Runfile version >= 1.0.
6
-
7
- If you are using an older version of Runfile, you will also need to lock the
8
- runfile-tasks version.
9
-
10
- ```ruby
11
- gem 'runfile-tasks', '< 1.0'
12
- ```
13
-
14
5
  ## Install
15
6
 
16
7
  Manually:
@@ -36,6 +27,8 @@ title 'My Runfile'
36
27
  import_gem 'runfile-tasks/gem'
37
28
  # or without publish/yank actions
38
29
  import_gem 'runfile-tasks/gem', private: true
30
+ # or with publishing to github packages
31
+ import_gem 'runfile-tasks/gem', github_package_user: 'your-user-or-org'
39
32
 
40
33
  # commands for building and publishing your Dockerfile
41
34
  import_gem 'runfile-tasks/docker', image: 'my/image', version: '1.2.3'
data/gem.runfile CHANGED
@@ -3,23 +3,34 @@ require 'fileutils'
3
3
  summary 'Gem management commands'
4
4
 
5
5
  require_context :private, default: false
6
+ require_context :github_package_user, default: false
6
7
 
7
- help 'Build and optionally install the gem'
8
- usage '(build | b) [--install]'
9
- option '--install, -i', 'Install after building'
8
+ help 'Build the gem'
9
+ usage '(build | b) [--copy]'
10
+ option '--copy, -c', 'Copy the resulting file to the current directory'
10
11
  action :build, :b do |args|
11
- say "g`Building #{gemname}`"
12
- run "gem build #{gemname}.gemspec --output #{gemfile}"
13
- install_gem if args['--install']
12
+ build_gem
13
+ if args['--copy']
14
+ say "g`Copying #{gemfile} to current directory`"
15
+ run "cp #{gemfile} ."
16
+ end
14
17
  end
15
18
 
16
- help 'Install the last built gem'
19
+ help 'Build and install the gem'
17
20
  action :install, :i do
18
- need_gemfile
21
+ build_gem
19
22
  install_gem
20
23
  end
21
24
 
22
- unless context[:private]
25
+ if context[:github_package_user]
26
+ help 'Publish gem to Github'
27
+ action :publish, :p do
28
+ need_gemfile
29
+ say 'g`Publishing gem`'
30
+ run "gem push --key github --host https://rubygems.pkg.github.com/#{context[:github_package_user]} #{gemfile}"
31
+ end
32
+
33
+ elsif !context[:private]
23
34
  help 'Publish gem to rubygems'
24
35
  action :publish, :p do
25
36
  need_gemfile
@@ -47,7 +58,7 @@ helpers do
47
58
  gemspec = Dir['*.gemspec'].first
48
59
  raise UserError, 'Cannot find any *.gemspec' unless gemspec
49
60
 
50
- Gem::Specification::load(gemspec).name
61
+ Gem::Specification.load(gemspec).name
51
62
  end
52
63
  end
53
64
 
@@ -65,6 +76,11 @@ helpers do
65
76
  run "gem install --local #{gemfile}"
66
77
  end
67
78
 
79
+ def build_gem
80
+ say "g`Building #{gemname}`"
81
+ run "gem build #{gemname}.gemspec --output #{gemfile}"
82
+ end
83
+
68
84
  def need_gemfile
69
85
  raise UserError, "File not found #{gemfile}" unless File.exist? gemfile
70
86
  end
data/yard.runfile CHANGED
@@ -1,8 +1,8 @@
1
1
  summary 'YARD documentation commands'
2
2
 
3
- help "Run YARD server"
4
- usage "server [--port PORT]"
5
- option "--port, -p PORT", "Set server port [default: 3000]"
3
+ help 'Run YARD server'
4
+ usage 'server [--port PORT]'
5
+ option '--port, -p PORT', 'Set server port [default: 3000]'
6
6
  action :server do |args|
7
7
  system "yard server --server puma --port #{args['--port']} --bind 0.0.0.0 --reload"
8
8
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runfile-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-06 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: A collection of tasks for Runfile
14
13
  email: db@dannyben.com
@@ -24,8 +23,10 @@ homepage: https://github.com/DannyBen/runfile-tasks
24
23
  licenses:
25
24
  - MIT
26
25
  metadata:
26
+ bug_tracker_uri: https://github.com/DannyBen/runfile-tasks/issues
27
+ changelog_uri: https://github.com/DannyBen/runfile-tasks/blob/master/CHANGELOG.md
28
+ source_code_uri: https://github.com/DannyBen/runfile-tasks
27
29
  rubygems_mfa_required: 'true'
28
- post_install_message:
29
30
  rdoc_options: []
30
31
  require_paths:
31
32
  - lib
@@ -33,15 +34,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
33
34
  requirements:
34
35
  - - ">="
35
36
  - !ruby/object:Gem::Version
36
- version: '2.7'
37
+ version: '3.2'
37
38
  required_rubygems_version: !ruby/object:Gem::Requirement
38
39
  requirements:
39
40
  - - ">="
40
41
  - !ruby/object:Gem::Version
41
42
  version: '0'
42
43
  requirements: []
43
- rubygems_version: 3.5.6
44
- signing_key:
44
+ rubygems_version: 4.0.3
45
45
  specification_version: 4
46
46
  summary: Runfile tasks collection
47
47
  test_files: []