raketary 0.1.2 → 0.2.3

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: 894f790ebfea326ca63187d1ceaf88110682114320ed9be56f6eadd2f0e83ebb
4
- data.tar.gz: b8a3f97e6d2812a596e3b002e81a508af49de233787a23ae09aa3039731624ec
3
+ metadata.gz: 6d4573e3e34e7bf212e7c2bda52a0f88f2d393e1efba08beaec5b831f4ffd59c
4
+ data.tar.gz: ab800104a012721b77ede7d4e8d40de46cf849bec9e9d774110cf1454910679c
5
5
  SHA512:
6
- metadata.gz: 3efae7f58482667ffd159129c936af00e6ab7535ab1b6426bee8ba93cbe3cc3625ac3e238c3f838b28a6fdbca28d81645e99c7e43c754b77d396ec65d3f76ea6
7
- data.tar.gz: 64083deccbd1b21f0146c64f67b969065ca4d83b3d472d8392a66dabdba90927af2cdc5ab970b93ea06895a5794dd7afaff2298c788a92ed6c57684a3f0b9b72
6
+ metadata.gz: 5a4f795a68dd99adb678188fc4d6c94bb2f3cbe81e0789a323978661160fd58d4277aa4c5eeb6346f255b2f18a078785777d314b97c444e38d01f432393d2456
7
+ data.tar.gz: 1932038ca0fbf435d0deae6158a8877480eca006425303f2ff3f855905fd1db4429239728d8089fa93168b4f7f315298e1ae3c1edbe16d46c4de42bc1afdcdd8
data/CHANGELOG.md CHANGED
@@ -1,8 +1,45 @@
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.3...HEAD)
9
+ -
10
+
11
+
12
+ ## [v0.2.3] - 2021-06-18
13
+ ### Changed
14
+ - Updated raketeer gem.
15
+
16
+
17
+ ## [v0.2.2] - 2021-06-16
18
+ ### Changed
19
+ - Formatted code with RuboCop.
20
+ - Updated Gems.
21
+
22
+
23
+ ## [v0.2.1] - 2020-03-04
24
+ ### Fixed
25
+ - Added back `irb` gem to Gemspec
26
+
27
+
28
+ ## [v0.2.0] - 2020-03-04
29
+ ### Added
30
+ - Added `GHPSyncCmd` for syncing YARDoc to GitHub Pages
31
+ - Calls `rsync` to sync `./doc/` to another local directory
32
+ - File: `lib/raketary/ghp_sync_cmd.rb`
33
+ - Sub cmd: `ghp_sync`
34
+
35
+ ### Changed
36
+ - Renamed `App*` classes (`app_*.rb` files) to `*Cmd` (`*_cmd.rb`) since they extend `Cmd`, not `App`
37
+
38
+
39
+ ## [v0.1.3] - 2020-03-02
40
+ ### Changed
41
+ - Changed AppGitHubPkg logic to not check if username is nil (minor; not a bug)
4
42
 
5
- ## [[Unreleased]](https://github.com/esotericpig/raketary/compare/v0.1.2...master)
6
43
 
7
44
  ## [v0.1.2] - 2020-03-01
8
45
  ### Added
@@ -16,10 +53,12 @@ Format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
16
53
  - Fixed AppBump (`bump` sub command) to bump the bundle after bumping all
17
54
  - Before this fix, it required you calling `bump` twice on the command line
18
55
 
56
+
19
57
  ## [v0.1.1] - 2019-12-18
20
58
  ### Changed
21
59
  - Added more info to CHANGELOG, README, TODO
22
60
 
61
+
23
62
  ## [v0.1.0] - 2019-08-06
24
63
  ### Added
25
64
  - .gitignore
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,29 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- raketary (0.1.2)
5
- irb (~> 1.0)
6
- rake (~> 12.3)
4
+ raketary (0.2.3)
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
- io-console (0.5.6)
13
- irb (1.2.3)
14
- reline (>= 0.0.1)
15
- rake (12.3.3)
16
- raketeer (0.2.8)
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.12)
17
18
  rake
18
- reline (0.1.3)
19
+ reline (0.2.5)
19
20
  io-console (~> 0.5)
21
+ yard (0.9.26)
22
+ yard_ghurt (1.2.1)
23
+ rake
24
+ yard
20
25
 
21
26
  PLATFORMS
22
27
  ruby
23
28
 
24
29
  DEPENDENCIES
25
- bundler (~> 2.0)
30
+ bundler (~> 2.2)
26
31
  raketary!
32
+ yard (~> 0.9)
27
33
 
28
34
  BUNDLED WITH
29
- 2.1.2
35
+ 2.2.20
data/README.md CHANGED
@@ -6,7 +6,12 @@
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)
10
15
 
11
16
  ![Demo of Raketary on the command line](https://github.com/esotericpig/esotericpig.github.io/blob/master/pics/raketary_demo.gif)
12
17
 
@@ -36,14 +41,13 @@ $ bundle exec rake install:local
36
41
 
37
42
  ## [Using](#contents)
38
43
 
39
- **TODO:** flesh out Using section
40
-
41
44
  ```
42
45
  $ raketary
43
46
  Usage: raketary [options] [command] [options]...
44
47
 
45
48
  Commands:
46
49
  bump Bump your project's version
50
+ ghp_sync Sync YARDoc to GitHub Pages repo
47
51
  github_pkg Publish your project's gem(s) to GitHub Packages
48
52
  irb Open an irb session loaded with your library
49
53
  nokogiri Install Nokogiri libs
@@ -62,7 +66,7 @@ $ raketary bump
62
66
  [bump] Options:
63
67
  -n, --dry-run do a dry run (do NOT write to files)
64
68
  -s, --strict enforce semantic versioning (i.e., \d+\.\d+\.\d+.*)
65
-
69
+
66
70
  -v, --ver [STR] show/set the version (e.g.: '1.2.3-alpha.4+beta.5') (default: show)
67
71
  -m, --major [INT,STR] bump/set the major number (e.g.: +2, 4) (default: +1)
68
72
  -i, --minor [INT,STR] bump/set the minor number (e.g.: +2, 4) (default: +1)
@@ -70,7 +74,7 @@ $ raketary bump
70
74
  -r, --pre [STR] set/erase the pre-release extension (e.g.: 'alpha.4') (default: erase)
71
75
  -b, --build [STR] set/erase the the build metadata (e.g.: 'beta.5') (default: erase)
72
76
  -u, --bundle bump the Gemfile.lock version
73
-
77
+
74
78
  -h, --help show this help
75
79
  -x, --example show some examples
76
80
  ```
@@ -112,6 +116,20 @@ $ raketary github_pkg -h
112
116
  -h, --help show this help
113
117
  ```
114
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
+
115
133
  ## [Hacking](#contents)
116
134
 
117
135
  ```
@@ -126,7 +144,7 @@ $ bundle exec rake -T
126
144
  [GNU LGPL v3+](LICENSE.txt)
127
145
 
128
146
  > Raketary (<https://github.com/esotericpig/raketary>)
129
- > Copyright (c) 2019-2020 Jonathan Bradley Whited (@esotericpig)
147
+ > Copyright (c) 2019-2021 Jonathan Bradley Whited
130
148
  >
131
149
  > Raketary is free software: you can redistribute it and/or modify
132
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,39 +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-2020 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_github_pkg'
26
- require 'raketary/app_irb'
27
- require 'raketary/app_nokogiri'
28
- require 'raketary/app_run'
12
+ require 'raketary/bump_cmd'
29
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'
30
19
  require 'raketary/sub_cmd'
31
20
  require 'raketary/version'
32
21
 
33
22
 
34
23
  module Raketary
35
24
  ###
36
- # @author Jonathan Bradley Whited (@esotericpig)
25
+ # @author Jonathan Bradley Whited
37
26
  # @since 0.1.0
38
27
  ###
39
28
  class App < Cmd
@@ -43,43 +32,44 @@ module Raketary
43
32
  attr_accessor :ran_cmd
44
33
  attr_accessor :soft_error
45
34
  attr_reader :version
46
-
35
+
47
36
  alias_method :ran_cmd?,:ran_cmd
48
-
37
+
49
38
  def initialize(args=ARGV)
50
39
  super(self,'raketary')
51
-
40
+
52
41
  @args = args
53
42
  @options = {}
54
43
  @parsers = []
55
44
  @ran_cmd = false
56
45
  @soft_error = nil
57
46
  @version = Raketary::VERSION
58
-
47
+
59
48
  @sub_cmds = {
60
- 'bump' => SubCmd.new(%q(Bump your project's version),AppBump),
61
- 'github_pkg' => SubCmd.new(%q(Publish your project's gem(s) to GitHub Packages),AppGitHubPkg),
62
- 'irb' => SubCmd.new('Open an irb session loaded with your library',AppIRB),
63
- 'nokogiri' => SubCmd.new('Install Nokogiri libs',AppNokogiri),
64
- '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)
65
55
  }
66
-
56
+
67
57
  parse!(true) do |op|
68
58
  op.banner = "Usage: #{@name} [options] [command] [options]..."
69
-
59
+
70
60
  op.on_tail('-v','--version',"show the version of #{@name}") do
71
61
  puts "#{@name} v#{@version}"
72
62
  exit
73
63
  end
74
64
  end
75
65
  end
76
-
77
- def run()
66
+
67
+ def run
78
68
  return if @ran_cmd
79
-
80
- puts @parsers.join()
81
-
82
- if !@soft_error.nil?()
69
+
70
+ puts @parsers.join
71
+
72
+ if !@soft_error.nil?
83
73
  puts
84
74
  puts "ERROR: #{@soft_error}"
85
75
  end