raketeer 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/README.md +12 -1
- data/lib/raketeer.rb +3 -1
- data/lib/raketeer/all.rb +3 -1
- data/lib/raketeer/github_pkg.rb +36 -0
- data/lib/raketeer/github_pkg_task.rb +71 -0
- data/lib/raketeer/util.rb +18 -1
- data/lib/raketeer/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 643b4e0e40f07b06dbbeb4e657c933a120913bccd8f11092d2fef59880205ccb
|
4
|
+
data.tar.gz: eb8cd4d531b70b30194cd262e86ed2a0f43363ccd05bef0480c451f57f9d18c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '098c9e27b22dce5a44dc0030e5d4b784baca723ee3fdea62fb949a7cb470dc9b770094b40000dc914e36351f3ab37c6d3e0d7a41b3a8886a984afdef2854eb97'
|
7
|
+
data.tar.gz: 70fec0564a8d1a560d365cfd6eca9d9091bd9aa77797701484ec632d437b09924c07c633bd099c2ef656ab277e0566465b15e17d7de78901162def2e77cba249
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,13 @@
|
|
2
2
|
|
3
3
|
Format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
4
4
|
|
5
|
-
## [[Unreleased]](https://github.com/esotericpig/raketeer/compare/v0.2.
|
5
|
+
## [[Unreleased]](https://github.com/esotericpig/raketeer/compare/v0.2.8...master)
|
6
|
+
|
7
|
+
## [v0.2.8] - 2020-03-01
|
8
|
+
### Added
|
9
|
+
- GitHubPkg (lib/raketeer/github_pkg.rb)
|
10
|
+
- GitHubPkgTask (lib/raketeer/github_pkg_task.rb)
|
11
|
+
- Publish/Push your `pkg/*.gem` release(s) to GitHub Packages
|
6
12
|
|
7
13
|
## [v0.2.7] - 2019-12-18
|
8
14
|
### Added
|
data/README.md
CHANGED
@@ -65,6 +65,7 @@ Or, include the specific tasks that you need:
|
|
65
65
|
|
66
66
|
```Ruby
|
67
67
|
require 'raketeer/bump'
|
68
|
+
require 'raketeer/github_pkg'
|
68
69
|
require 'raketeer/irb'
|
69
70
|
require 'raketeer/nokogiri_installs'
|
70
71
|
require 'raketeer/run'
|
@@ -89,6 +90,7 @@ rake bump:major[major] # Bump/Set the major version
|
|
89
90
|
rake bump:minor[minor] # Bump/Set the minor version
|
90
91
|
rake bump:patch[patch] # Bump/Set the patch version
|
91
92
|
rake bump:pre[pre] # Set/Erase the pre-release version
|
93
|
+
rake github_pkg # Publish this project's gem(s) to GitHub Packages
|
92
94
|
rake irb # Open an irb session loaded with this library
|
93
95
|
rake nokogiri_apt # Install Nokogiri libs for Ubuntu/Debian
|
94
96
|
rake nokogiri_dnf # Install Nokogiri libs for Fedora/CentOS/Red Hat
|
@@ -132,6 +134,7 @@ rake bump:bundle # Bump the Gemfile.lock version
|
|
132
134
|
If you need more control, for now, please look at the accessors of each task (better documentation is planned for v1.0.0):
|
133
135
|
|
134
136
|
- [BumpTask](lib/raketeer/bump_task.rb)
|
137
|
+
- [GitHubPkgTask](lib/raketeer/github_pkg_task.rb)
|
135
138
|
- [IRBTask](lib/raketeer/irb_task.rb)
|
136
139
|
- [NokogiriAPTTask](lib/raketeer/nokogiri_install_tasks.rb)
|
137
140
|
- [NokogiriDNFTask](lib/raketeer/nokogiri_install_tasks.rb)
|
@@ -146,12 +149,20 @@ require 'raketeer/bump_task'
|
|
146
149
|
Raketeer::BumpTask.new() do |task|
|
147
150
|
task.strict = true
|
148
151
|
end
|
152
|
+
|
153
|
+
require 'raketeer/github_pkg_task'
|
154
|
+
|
155
|
+
Raketeer::GitHubPkgTask.new() do |task|
|
156
|
+
task.deps << 'test'
|
157
|
+
task.username = 'esotericpig'
|
158
|
+
end
|
149
159
|
```
|
150
160
|
|
151
161
|
## [Hacking](#contents)
|
152
162
|
|
153
163
|
```
|
154
164
|
$ git clone 'https://github.com/esotericpig/raketeer.git'
|
165
|
+
$ cd raketeer
|
155
166
|
$ bundle install
|
156
167
|
$ bundle exec rake -T
|
157
168
|
```
|
@@ -161,7 +172,7 @@ $ bundle exec rake -T
|
|
161
172
|
[GNU LGPL v3+](LICENSE.txt)
|
162
173
|
|
163
174
|
> Raketeer (<https://github.com/esotericpig/raketeer>)
|
164
|
-
> Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
|
175
|
+
> Copyright (c) 2019-2020 Jonathan Bradley Whited (@esotericpig)
|
165
176
|
>
|
166
177
|
> Raketeer is free software: you can redistribute it and/or modify
|
167
178
|
> it under the terms of the GNU Lesser General Public License as published by
|
data/lib/raketeer.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
#--
|
6
6
|
# This file is part of Raketeer.
|
7
|
-
# Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
|
7
|
+
# Copyright (c) 2019-2020 Jonathan Bradley Whited (@esotericpig)
|
8
8
|
#
|
9
9
|
# Raketeer is free software: you can redistribute it and/or modify
|
10
10
|
# it under the terms of the GNU Lesser General Public License as published by
|
@@ -24,6 +24,7 @@
|
|
24
24
|
require 'raketeer/bump_task'
|
25
25
|
require 'raketeer/bump_ver'
|
26
26
|
require 'raketeer/files_bumper'
|
27
|
+
require 'raketeer/github_pkg_task'
|
27
28
|
require 'raketeer/irb_task'
|
28
29
|
require 'raketeer/nokogiri_install_tasks'
|
29
30
|
require 'raketeer/run_task'
|
@@ -31,6 +32,7 @@ require 'raketeer/sem_ver'
|
|
31
32
|
require 'raketeer/util'
|
32
33
|
require 'raketeer/version'
|
33
34
|
|
35
|
+
|
34
36
|
###
|
35
37
|
# @author Jonathan Bradley Whited (@esotericpig)
|
36
38
|
# @since 0.1.0
|
data/lib/raketeer/all.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
#--
|
6
6
|
# This file is part of Raketeer.
|
7
|
-
# Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
|
7
|
+
# Copyright (c) 2019-2020 Jonathan Bradley Whited (@esotericpig)
|
8
8
|
#
|
9
9
|
# Raketeer is free software: you can redistribute it and/or modify
|
10
10
|
# it under the terms of the GNU Lesser General Public License as published by
|
@@ -22,10 +22,12 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
require 'raketeer/bump' # @since 0.2.4
|
25
|
+
require 'raketeer/github_pkg' # @since 0.2.8
|
25
26
|
require 'raketeer/irb' # @since 0.2.0
|
26
27
|
require 'raketeer/nokogiri_installs' # @since 0.1.0
|
27
28
|
require 'raketeer/run' # @since 0.2.2
|
28
29
|
|
30
|
+
|
29
31
|
module Raketeer
|
30
32
|
###
|
31
33
|
# Defines all Raketeer tasks in your Rakefile.
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
#--
|
6
|
+
# This file is part of Raketeer.
|
7
|
+
# Copyright (c) 2020 Jonathan Bradley Whited (@esotericpig)
|
8
|
+
#
|
9
|
+
# Raketeer is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# Raketeer is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU Lesser General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU Lesser General Public License
|
20
|
+
# along with Raketeer. If not, see <https://www.gnu.org/licenses/>.
|
21
|
+
#++
|
22
|
+
|
23
|
+
|
24
|
+
require 'raketeer/github_pkg_task'
|
25
|
+
|
26
|
+
|
27
|
+
module Raketeer
|
28
|
+
###
|
29
|
+
# @author Jonathan Bradley Whited (@esotericpig)
|
30
|
+
# @since 0.2.8
|
31
|
+
###
|
32
|
+
module GitHubPkg
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
Raketeer::GitHubPkgTask.new() # @since 0.2.8
|
@@ -0,0 +1,71 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
#--
|
6
|
+
# This file is part of Raketeer.
|
7
|
+
# Copyright (c) 2020 Jonathan Bradley Whited (@esotericpig)
|
8
|
+
#
|
9
|
+
# Raketeer is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# Raketeer is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU Lesser General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU Lesser General Public License
|
20
|
+
# along with Raketeer. If not, see <https://www.gnu.org/licenses/>.
|
21
|
+
#++
|
22
|
+
|
23
|
+
|
24
|
+
require 'rake'
|
25
|
+
require 'rake/tasklib'
|
26
|
+
require 'raketeer/util'
|
27
|
+
|
28
|
+
|
29
|
+
module Raketeer
|
30
|
+
###
|
31
|
+
# @author Jonathan Bradley Whited (@esotericpig)
|
32
|
+
# @since 0.2.8
|
33
|
+
###
|
34
|
+
class GitHubPkgTask < Rake::TaskLib
|
35
|
+
attr_accessor :deps
|
36
|
+
attr_accessor :description
|
37
|
+
attr_accessor :name
|
38
|
+
attr_accessor :username
|
39
|
+
|
40
|
+
def initialize(name=:github_pkg)
|
41
|
+
super()
|
42
|
+
|
43
|
+
@deps = [:build]
|
44
|
+
@description = %Q(Publish this project's gem(s) to GitHub Packages)
|
45
|
+
@name = name
|
46
|
+
@username = nil
|
47
|
+
|
48
|
+
yield self if block_given?()
|
49
|
+
|
50
|
+
@username = Util.find_github_username() if @username.nil?()
|
51
|
+
|
52
|
+
raise "#{self.class.name}.username is nil" if @username.nil?()
|
53
|
+
|
54
|
+
define()
|
55
|
+
end
|
56
|
+
|
57
|
+
def define()
|
58
|
+
desc @description
|
59
|
+
task @name => Array(@deps) do |task,args|
|
60
|
+
sh_cmd = ['gem']
|
61
|
+
|
62
|
+
sh_cmd.push('push')
|
63
|
+
sh_cmd.push('--key','github')
|
64
|
+
sh_cmd.push('--host',"https://rubygems.pkg.github.com/#{username}")
|
65
|
+
sh_cmd.push(*Dir.glob(File.join('pkg','*.gem'))) # Is this okay for multiple gems?
|
66
|
+
|
67
|
+
sh(*sh_cmd)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
data/lib/raketeer/util.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
#--
|
6
6
|
# This file is part of Raketeer.
|
7
|
-
# Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
|
7
|
+
# Copyright (c) 2019-2020 Jonathan Bradley Whited (@esotericpig)
|
8
8
|
#
|
9
9
|
# Raketeer is free software: you can redistribute it and/or modify
|
10
10
|
# it under the terms of the GNU Lesser General Public License as published by
|
@@ -30,6 +30,23 @@ module Raketeer
|
|
30
30
|
# @since 0.2.4
|
31
31
|
TRUE_BOOLS = ['1','on','t','true','y','yes'].freeze()
|
32
32
|
|
33
|
+
# This is pretty hacky...
|
34
|
+
#
|
35
|
+
# @since 0.2.8
|
36
|
+
def self.find_github_username()
|
37
|
+
Dir.glob('*.gemspec') do |file|
|
38
|
+
File.foreach(file) do |line|
|
39
|
+
md = line.match(%r{(github\.com/)([^/]+)}i)
|
40
|
+
|
41
|
+
next if md.nil?() || md.length < 3
|
42
|
+
|
43
|
+
return md[2].gsub(/\s+/,'')
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
return nil
|
48
|
+
end
|
49
|
+
|
33
50
|
def self.find_main_executable(bin_dir='bin')
|
34
51
|
# Try the bin/ dir
|
35
52
|
main_exe = Dir.glob(File.join(bin_dir,'*'))
|
data/lib/raketeer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raketeer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Bradley Whited (@esotericpig)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -85,6 +85,8 @@ files:
|
|
85
85
|
- lib/raketeer/bump_task.rb
|
86
86
|
- lib/raketeer/bump_ver.rb
|
87
87
|
- lib/raketeer/files_bumper.rb
|
88
|
+
- lib/raketeer/github_pkg.rb
|
89
|
+
- lib/raketeer/github_pkg_task.rb
|
88
90
|
- lib/raketeer/irb.rb
|
89
91
|
- lib/raketeer/irb_task.rb
|
90
92
|
- lib/raketeer/nokogiri_install_tasks.rb
|
@@ -118,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
120
|
- !ruby/object:Gem::Version
|
119
121
|
version: '0'
|
120
122
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
123
|
+
rubygems_version: 3.1.2
|
122
124
|
signing_key:
|
123
125
|
specification_version: 4
|
124
126
|
summary: Extra Ruby Rake Tasks.
|