raketary 0.1.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73333a3212384440ea74bde271093ab1858d69bf6d99f14bee2d97359fb7e4cc
4
- data.tar.gz: db6a6efecd0b115a549ca9832382412c3678adcdeb78d00752751ba00e674b00
3
+ metadata.gz: a0e9cee720593352639f0730260e1ced416f72c4f359d160790861cfcbebbdd5
4
+ data.tar.gz: 130dde3aa7ca111fe6b2c7cdb9dc7e84c32df24316636897bdb3e3912e949f31
5
5
  SHA512:
6
- metadata.gz: 505613ae4e2eb0df532ef071899b4f3b48811e6fecbc902da2748b9157acd1c83b5272a20870b0dd9708b122eb79093b9c696be31e77fc3eae3bb34ec174c34d
7
- data.tar.gz: dec0c32f73a776857b3d3f2cdc4e1249c2624aac7c2873b44a561c0c48cc5e3e5cf40621837466a20a35ff8d1aa01d6c1516419bf39edcf5eda928cc6f3dc021
6
+ metadata.gz: a95bd2139952da7fe69a623f67e9a51d46f18fc283e27ac89c5346ba5965ddc0992d9e0295da79b267e914f2285ed37cec7f35655f8b2dee7ed06c89fb1f5ac7
7
+ data.tar.gz: 81a71a41cf9a0027a4e68c118400a15d7d743f5ec6ffaf0ab7bd413580b4a510014e88861f3fdb7de2bf4c81eba5990d6e1528da526d45b12bf842286682ff11
data/CHANGELOG.md CHANGED
@@ -1,12 +1,58 @@
1
1
  # Changelog | Raketary
2
2
 
3
- Format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ Format is based on [Keep a Changelog v1.0.0](https://keepachangelog.com/en/1.0.0),
6
+ and this project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [[Unreleased]](https://github.com/esotericpig/raketary/compare/v0.2.2...HEAD)
9
+ -
10
+
11
+
12
+ ## [v0.2.2] - 2021-06-16
13
+ ### Changed
14
+ - Formatted code with RuboCop.
15
+ - Updated Gems.
16
+
17
+
18
+ ## [v0.2.1] - 2020-03-04
19
+ ### Fixed
20
+ - Added back `irb` gem to Gemspec
21
+
22
+
23
+ ## [v0.2.0] - 2020-03-04
24
+ ### Added
25
+ - Added `GHPSyncCmd` for syncing YARDoc to GitHub Pages
26
+ - Calls `rsync` to sync `./doc/` to another local directory
27
+ - File: `lib/raketary/ghp_sync_cmd.rb`
28
+ - Sub cmd: `ghp_sync`
29
+
30
+ ### Changed
31
+ - Renamed `App*` classes (`app_*.rb` files) to `*Cmd` (`*_cmd.rb`) since they extend `Cmd`, not `App`
32
+
33
+
34
+ ## [v0.1.3] - 2020-03-02
35
+ ### Changed
36
+ - Changed AppGitHubPkg logic to not check if username is nil (minor; not a bug)
37
+
38
+
39
+ ## [v0.1.2] - 2020-03-01
40
+ ### Added
41
+ - Added `github_pkg` sub command using AppGitHubPkg & Raketeer::GitHubPkgTask
42
+ - This will publish/push your `pkg/*.gem` release(s) to GitHub Packages
43
+
44
+ ### Changed
45
+ - Updated Gemfile.lock
46
+
47
+ ### Fixed
48
+ - Fixed AppBump (`bump` sub command) to bump the bundle after bumping all
49
+ - Before this fix, it required you calling `bump` twice on the command line
4
50
 
5
- ## [[Unreleased]](https://github.com/esotericpig/raketary/compare/v0.1.1...master)
6
51
 
7
52
  ## [v0.1.1] - 2019-12-18
8
53
  ### Changed
9
- - Add more info to CHANGELOG, README, TODO
54
+ - Added more info to CHANGELOG, README, TODO
55
+
10
56
 
11
57
  ## [v0.1.0] - 2019-08-06
12
58
  ### Added
data/Gemfile CHANGED
@@ -1,24 +1,6 @@
1
1
  # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
 
4
- #--
5
- # This file is part of Raketary.
6
- # Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
7
- #
8
- # Raketary is free software: you can redistribute it and/or modify
9
- # it under the terms of the GNU Lesser General Public License as published by
10
- # the Free Software Foundation, either version 3 of the License, or
11
- # (at your option) any later version.
12
- #
13
- # Raketary is distributed in the hope that it will be useful,
14
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- # GNU Lesser General Public License for more details.
17
- #
18
- # You should have received a copy of the GNU Lesser General Public License
19
- # along with Raketary. If not, see <https://www.gnu.org/licenses/>.
20
- #++
21
-
22
4
 
23
5
  source 'https://rubygems.org'
24
6
 
data/Gemfile.lock CHANGED
@@ -1,27 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- raketary (0.1.1)
5
- irb (~> 1.0)
6
- rake (~> 12.3)
4
+ raketary (0.2.2)
5
+ irb (~> 1.3)
6
+ rake (~> 13.0)
7
7
  raketeer (~> 0.2)
8
+ yard_ghurt (~> 1.2)
8
9
 
9
10
  GEM
10
11
  remote: https://rubygems.org/
11
12
  specs:
12
- irb (1.2.0)
13
- reline (>= 0.0.1)
14
- rake (12.3.3)
15
- raketeer (0.2.7)
13
+ io-console (0.5.9)
14
+ irb (1.3.5)
15
+ reline (>= 0.1.5)
16
+ rake (13.0.3)
17
+ raketeer (0.2.11)
16
18
  rake
17
- reline (0.0.7)
19
+ reline (0.2.5)
20
+ io-console (~> 0.5)
21
+ yard (0.9.26)
22
+ yard_ghurt (1.2.1)
23
+ rake
24
+ yard
18
25
 
19
26
  PLATFORMS
20
27
  ruby
21
28
 
22
29
  DEPENDENCIES
23
- bundler (~> 2.0)
30
+ bundler (~> 2.2)
24
31
  raketary!
32
+ yard (~> 0.9)
25
33
 
26
34
  BUNDLED WITH
27
- 2.0.2
35
+ 2.2.20
data/README.md CHANGED
@@ -6,7 +6,14 @@
6
6
  [![Changelog](https://img.shields.io/badge/changelog-md-%23A0522D.svg?style=for-the-badge)](CHANGELOG.md)
7
7
  [![License](https://img.shields.io/github/license/esotericpig/raketary.svg?color=%23A0522D&style=for-the-badge)](LICENSE.txt)
8
8
 
9
- CLI for [Raketeer](https://github.com/esotericpig/raketeer).
9
+ CLI app for commonly-used Rake tasks.
10
+
11
+ Includes:
12
+
13
+ - [Raketeer](https://github.com/esotericpig/raketeer)
14
+ - [YardGhurt](https://github.com/esotericpig/yard_ghurt)
15
+
16
+ ![Demo of Raketary on the command line](https://github.com/esotericpig/esotericpig.github.io/blob/master/pics/raketary_demo.gif)
10
17
 
11
18
  ## Contents
12
19
 
@@ -34,14 +41,14 @@ $ bundle exec rake install:local
34
41
 
35
42
  ## [Using](#contents)
36
43
 
37
- **TODO:** flesh out Using section
38
-
39
44
  ```
40
45
  $ raketary
41
46
  Usage: raketary [options] [command] [options]...
42
47
 
43
48
  Commands:
44
49
  bump Bump your project's version
50
+ ghp_sync Sync YARDoc to GitHub Pages repo
51
+ github_pkg Publish your project's gem(s) to GitHub Packages
45
52
  irb Open an irb session loaded with your library
46
53
  nokogiri Install Nokogiri libs
47
54
  run Run your project's main file: raketary run -- --version
@@ -59,7 +66,7 @@ $ raketary bump
59
66
  [bump] Options:
60
67
  -n, --dry-run do a dry run (do NOT write to files)
61
68
  -s, --strict enforce semantic versioning (i.e., \d+\.\d+\.\d+.*)
62
-
69
+
63
70
  -v, --ver [STR] show/set the version (e.g.: '1.2.3-alpha.4+beta.5') (default: show)
64
71
  -m, --major [INT,STR] bump/set the major number (e.g.: +2, 4) (default: +1)
65
72
  -i, --minor [INT,STR] bump/set the minor number (e.g.: +2, 4) (default: +1)
@@ -67,7 +74,7 @@ $ raketary bump
67
74
  -r, --pre [STR] set/erase the pre-release extension (e.g.: 'alpha.4') (default: erase)
68
75
  -b, --build [STR] set/erase the the build metadata (e.g.: 'beta.5') (default: erase)
69
76
  -u, --bundle bump the Gemfile.lock version
70
-
77
+
71
78
  -h, --help show this help
72
79
  -x, --example show some examples
73
80
  ```
@@ -99,10 +106,35 @@ raketary bump -b 'beta.5' # Set the build metadata
99
106
  raketary bump -u # Bump the Gemfile.lock version
100
107
  ```
101
108
 
109
+ **GitHub Pkg**
110
+
111
+ ```
112
+ $ raketary github_pkg -h
113
+ ...
114
+ [github_pkg] Options:
115
+ -u, --user [STR] set the GitHub username
116
+ -h, --help show this help
117
+ ```
118
+
119
+ **GitHub Pages Sync**
120
+
121
+ ```
122
+ $ raketary ghp_sync -h
123
+ ...
124
+ [ghp_sync] Options:
125
+ -g, --ghp-dir STR the destination (GitHub Pages) directory to sync "doc/" to
126
+
127
+ -d, --deploy actually deploy (don't just do a dry-run)
128
+ -s, --sync-args STR additional args to pass to the sync command
129
+
130
+ -h, --help show this help
131
+ ```
132
+
102
133
  ## [Hacking](#contents)
103
134
 
104
135
  ```
105
136
  $ git clone 'https://github.com/esotericpig/raketary.git'
137
+ $ cd raketary
106
138
  $ bundle install
107
139
  $ bundle exec rake -T
108
140
  ```
@@ -112,7 +144,7 @@ $ bundle exec rake -T
112
144
  [GNU LGPL v3+](LICENSE.txt)
113
145
 
114
146
  > Raketary (<https://github.com/esotericpig/raketary>)
115
- > Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
147
+ > Copyright (c) 2019-2021 Jonathan Bradley Whited
116
148
  >
117
149
  > Raketary is free software: you can redistribute it and/or modify
118
150
  > it under the terms of the GNU Lesser General Public License as published by
data/Rakefile CHANGED
@@ -1,31 +1,28 @@
1
1
  # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
 
4
- #--
5
- # This file is part of Raketary.
6
- # Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
7
- #
8
- # Raketary is free software: you can redistribute it and/or modify
9
- # it under the terms of the GNU Lesser General Public License as published by
10
- # the Free Software Foundation, either version 3 of the License, or
11
- # (at your option) any later version.
12
- #
13
- # Raketary is distributed in the hope that it will be useful,
14
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- # GNU Lesser General Public License for more details.
17
- #
18
- # You should have received a copy of the GNU Lesser General Public License
19
- # along with Raketary. If not, see <https://www.gnu.org/licenses/>.
20
- #++
21
-
22
4
 
23
5
  require 'bundler/gem_tasks'
24
6
 
25
7
  require 'rake/clean'
8
+ require 'raketary/version'
26
9
  require 'raketeer/run'
10
+ require 'yard'
11
+
27
12
 
28
13
  task default: [:run]
29
14
 
30
15
  CLEAN.exclude('.git/','stock/')
31
16
  CLOBBER.include('doc/')
17
+
18
+
19
+ YARD::Rake::YardocTask.new do |task|
20
+ task.files = [File.join('lib','**','*.rb')]
21
+
22
+ task.options += ['--files','CHANGELOG.md,LICENSE.txt']
23
+ task.options += ['--readme','README.md']
24
+
25
+ task.options << '--protected' # Show protected methods
26
+ #task.options += ['--template-path',File.join('yard','templates')]
27
+ task.options += ['--title',"Raketary v#{Raketary::VERSION} Doc"]
28
+ end
data/bin/raketary CHANGED
@@ -4,25 +4,14 @@
4
4
 
5
5
  #--
6
6
  # This file is part of Raketary.
7
- # Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
8
- #
9
- # Raketary 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
- # Raketary 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 Raketary. If not, see <https://www.gnu.org/licenses/>.
7
+ # Copyright (c) 2019-2021 Jonathan Bradley Whited
8
+ #
9
+ # SPDX-License-Identifier: LGPL-3.0-or-later
21
10
  #++
22
11
 
23
12
 
24
13
  require 'raketary'
25
14
 
26
- app = Raketary::App.new()
15
+ app = Raketary::App.new
27
16
 
28
- app.run()
17
+ app.run
data/lib/raketary.rb CHANGED
@@ -1,27 +1,15 @@
1
- #!/usr/bin/env ruby
2
1
  # encoding: UTF-8
3
2
  # frozen_string_literal: true
4
3
 
5
4
  #--
6
5
  # This file is part of Raketary.
7
- # Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
8
- #
9
- # Raketary 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
- # Raketary 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 Raketary. If not, see <https://www.gnu.org/licenses/>.
6
+ # Copyright (c) 2019-2021 Jonathan Bradley Whited
7
+ #
8
+ # SPDX-License-Identifier: LGPL-3.0-or-later
21
9
  #++
22
10
 
23
11
 
24
- TESTING_RAKETARY = ($0 == __FILE__)
12
+ TESTING_RAKETARY = ($PROGRAM_NAME == __FILE__)
25
13
 
26
14
  if TESTING_RAKETARY
27
15
  require 'rubygems'
@@ -29,20 +17,23 @@ if TESTING_RAKETARY
29
17
  end
30
18
 
31
19
  require 'raketary/app'
32
- require 'raketary/app_bump'
33
- require 'raketary/app_irb'
34
- require 'raketary/app_nokogiri'
35
- require 'raketary/app_run'
20
+ require 'raketary/bump_cmd'
36
21
  require 'raketary/cmd'
37
22
  require 'raketary/errors'
23
+ require 'raketary/ghp_sync_cmd'
24
+ require 'raketary/github_pkg_cmd'
25
+ require 'raketary/irb_cmd'
26
+ require 'raketary/nokogiri_cmd'
27
+ require 'raketary/run_cmd'
38
28
  require 'raketary/sub_cmd'
39
29
  require 'raketary/version'
40
30
 
31
+
41
32
  ###
42
- # @author Jonathan Bradley Whited (@esotericpig)
33
+ # @author Jonathan Bradley Whited
43
34
  # @since 0.1.0
44
35
  ###
45
36
  module Raketary
46
37
  end
47
38
 
48
- Raketary::App.new().run() if TESTING_RAKETARY
39
+ Raketary::App.new.run if TESTING_RAKETARY
data/lib/raketary/app.rb CHANGED
@@ -1,37 +1,28 @@
1
- #!/usr/bin/env ruby
2
1
  # encoding: UTF-8
3
2
  # frozen_string_literal: true
4
3
 
5
4
  #--
6
5
  # This file is part of Raketary.
7
- # Copyright (c) 2019 Jonathan Bradley Whited (@esotericpig)
8
- #
9
- # Raketary 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
- # Raketary 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 Raketary. If not, see <https://www.gnu.org/licenses/>.
6
+ # Copyright (c) 2019-2021 Jonathan Bradley Whited
7
+ #
8
+ # SPDX-License-Identifier: LGPL-3.0-or-later
21
9
  #++
22
10
 
23
11
 
24
- require 'raketary/app_bump'
25
- require 'raketary/app_irb'
26
- require 'raketary/app_nokogiri'
27
- require 'raketary/app_run'
12
+ require 'raketary/bump_cmd'
28
13
  require 'raketary/cmd'
14
+ require 'raketary/ghp_sync_cmd'
15
+ require 'raketary/github_pkg_cmd'
16
+ require 'raketary/irb_cmd'
17
+ require 'raketary/nokogiri_cmd'
18
+ require 'raketary/run_cmd'
29
19
  require 'raketary/sub_cmd'
30
20
  require 'raketary/version'
31
21
 
22
+
32
23
  module Raketary
33
24
  ###
34
- # @author Jonathan Bradley Whited (@esotericpig)
25
+ # @author Jonathan Bradley Whited
35
26
  # @since 0.1.0
36
27
  ###
37
28
  class App < Cmd
@@ -41,42 +32,44 @@ module Raketary
41
32
  attr_accessor :ran_cmd
42
33
  attr_accessor :soft_error
43
34
  attr_reader :version
44
-
35
+
45
36
  alias_method :ran_cmd?,:ran_cmd
46
-
37
+
47
38
  def initialize(args=ARGV)
48
39
  super(self,'raketary')
49
-
40
+
50
41
  @args = args
51
42
  @options = {}
52
43
  @parsers = []
53
44
  @ran_cmd = false
54
45
  @soft_error = nil
55
46
  @version = Raketary::VERSION
56
-
47
+
57
48
  @sub_cmds = {
58
- 'bump' => SubCmd.new(%q(Bump your project's version),AppBump),
59
- 'irb' => SubCmd.new('Open an irb session loaded with your library',AppIRB),
60
- 'nokogiri' => SubCmd.new('Install Nokogiri libs',AppNokogiri),
61
- 'run' => SubCmd.new(%Q(Run your project's main file: #{@name} run -- --version),AppRun)
49
+ 'bump' => SubCmd.new("Bump your project's version",BumpCmd),
50
+ 'ghp_sync' => SubCmd.new('Sync YARDoc to GitHub Pages repo',GHPSyncCmd),
51
+ 'github_pkg' => SubCmd.new("Publish your project's gem(s) to GitHub Packages",GitHubPkgCmd),
52
+ 'irb' => SubCmd.new('Open an irb session loaded with your library',IRBCmd),
53
+ 'nokogiri' => SubCmd.new('Install Nokogiri libs',NokogiriCmd),
54
+ 'run' => SubCmd.new("Run your project's main file: #{@name} run -- --version",RunCmd)
62
55
  }
63
-
56
+
64
57
  parse!(true) do |op|
65
58
  op.banner = "Usage: #{@name} [options] [command] [options]..."
66
-
59
+
67
60
  op.on_tail('-v','--version',"show the version of #{@name}") do
68
61
  puts "#{@name} v#{@version}"
69
62
  exit
70
63
  end
71
64
  end
72
65
  end
73
-
74
- def run()
66
+
67
+ def run
75
68
  return if @ran_cmd
76
-
77
- puts @parsers.join()
78
-
79
- if !@soft_error.nil?()
69
+
70
+ puts @parsers.join
71
+
72
+ if !@soft_error.nil?
80
73
  puts
81
74
  puts "ERROR: #{@soft_error}"
82
75
  end