raketary 0.1.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,43 @@
1
+ # encoding: UTF-8
2
+ # frozen_string_literal: true
3
+
4
+ #--
5
+ # This file is part of Raketary.
6
+ # Copyright (c) 2019-2021 Jonathan Bradley Whited
7
+ #
8
+ # SPDX-License-Identifier: LGPL-3.0-or-later
9
+ #++
10
+
11
+
12
+ require 'rake'
13
+ require 'raketary/cmd'
14
+ require 'raketeer/irb_task'
15
+
16
+
17
+ module Raketary
18
+ ###
19
+ # @author Jonathan Bradley Whited
20
+ # @since 0.1.0
21
+ ###
22
+ class IRBCmd < Cmd
23
+ def initialize(*)
24
+ super
25
+
26
+ parse! do |op|
27
+ #op.separator op.summary_indent
28
+ end
29
+ end
30
+
31
+ def run
32
+ super()
33
+
34
+ irb_task = Raketeer::IRBTask.new
35
+ irb_task = Rake::Task[irb_task.name]
36
+
37
+ irb_task.reenable
38
+ irb_task.invoke
39
+
40
+ app.ran_cmd = true
41
+ end
42
+ end
43
+ end
@@ -1,23 +1,11 @@
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
 
@@ -25,18 +13,19 @@ require 'raketary/cmd'
25
13
  require 'raketary/errors'
26
14
  require 'raketeer/nokogiri_install_tasks'
27
15
 
16
+
28
17
  module Raketary
29
18
  ###
30
- # @author Jonathan Bradley Whited (@esotericpig)
19
+ # @author Jonathan Bradley Whited
31
20
  # @since 0.1.0
32
21
  ###
33
- class AppNokogiri < Cmd
22
+ class NokogiriCmd < Cmd
34
23
  def initialize(*)
35
24
  super
36
-
25
+
37
26
  @main_opts = 0
38
-
39
- parse!() do |op|
27
+
28
+ parse! do |op|
40
29
  op.on('-a','--apt','install Nokogiri libs for Ubuntu/Debian') do
41
30
  @main_opts += 1
42
31
  true
@@ -52,28 +41,28 @@ module Raketary
52
41
  op.separator op.summary_indent
53
42
  end
54
43
  end
55
-
56
- def run()
44
+
45
+ def run
57
46
  super()
58
47
  return if @main_opts <= 0
59
-
48
+
60
49
  if @main_opts >= 2
61
50
  raise DoNotRunCmdError,'Please choose only one platform to install the libs for.'
62
51
  end
63
-
52
+
64
53
  install_task = nil
65
-
54
+
66
55
  if app.options[:apt]
67
- install_task = Raketeer::NokogiriAPTTask.new()
56
+ install_task = Raketeer::NokogiriAPTTask.new
68
57
  elsif app.options[:dnf]
69
- install_task = Raketeer::NokogiriDNFTask.new()
58
+ install_task = Raketeer::NokogiriDNFTask.new
70
59
  elsif app.options[:other]
71
- install_task = Raketeer::NokogiriOtherTask.new()
60
+ install_task = Raketeer::NokogiriOtherTask.new
72
61
  end
73
-
74
- if !install_task.nil?()
62
+
63
+ if !install_task.nil?
75
64
  install_task.run(install_task,nil)
76
-
65
+
77
66
  app.ran_cmd = true
78
67
  end
79
68
  end
@@ -0,0 +1,47 @@
1
+ # encoding: UTF-8
2
+ # frozen_string_literal: true
3
+
4
+ #--
5
+ # This file is part of Raketary.
6
+ # Copyright (c) 2019-2021 Jonathan Bradley Whited
7
+ #
8
+ # SPDX-License-Identifier: LGPL-3.0-or-later
9
+ #++
10
+
11
+
12
+ require 'rake'
13
+ require 'raketary/cmd'
14
+ require 'raketeer/run_task'
15
+
16
+
17
+ module Raketary
18
+ ###
19
+ # @author Jonathan Bradley Whited
20
+ # @since 0.1.0
21
+ ###
22
+ class RunCmd < Cmd
23
+ def initialize(*)
24
+ super
25
+
26
+ parse! do |op|
27
+ #op.separator op.summary_indent
28
+ end
29
+ end
30
+
31
+ def run
32
+ super()
33
+
34
+ run_task = Raketeer::RunTask.new
35
+
36
+ ARGV << run_task.name.to_s
37
+ ARGV.push(*@leftover_args)
38
+
39
+ run_task = Rake::Task[run_task.name]
40
+
41
+ run_task.reenable
42
+ run_task.invoke
43
+
44
+ app.ran_cmd = true
45
+ end
46
+ end
47
+ end
@@ -1,35 +1,23 @@
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
12
  module Raketary
25
13
  ###
26
- # @author Jonathan Bradley Whited (@esotericpig)
14
+ # @author Jonathan Bradley Whited
27
15
  # @since 0.1.0
28
16
  ###
29
17
  class SubCmd
30
18
  attr_reader :cmd_class
31
19
  attr_reader :desc
32
-
20
+
33
21
  def initialize(desc,cmd_class)
34
22
  @cmd_class = cmd_class
35
23
  @desc = desc
@@ -1,26 +1,14 @@
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
12
  module Raketary
25
- VERSION = '0.1.2'
13
+ VERSION = '0.2.3'
26
14
  end
data/raketary.gemspec CHANGED
@@ -1,64 +1,49 @@
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
  lib = File.expand_path(File.join('..','lib'),__FILE__)
24
6
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
25
7
 
26
8
  require 'raketary/version'
27
9
 
28
- Gem::Specification.new() do |spec|
10
+
11
+ Gem::Specification.new do |spec|
29
12
  spec.name = 'raketary'
30
13
  spec.version = Raketary::VERSION
31
- spec.authors = ['Jonathan Bradley Whited (@esotericpig)']
32
- spec.email = ['bradley@esotericpig.com']
14
+ spec.authors = ['Jonathan Bradley Whited']
15
+ spec.email = ['code@esotericpig.com']
33
16
  spec.licenses = ['LGPL-3.0-or-later']
34
17
  spec.homepage = 'https://github.com/esotericpig/raketary'
35
- spec.summary = 'CLI for Raketeer.'
18
+ spec.summary = 'CLI app for commonly-used Rake tasks.'
36
19
  spec.description = spec.summary
37
-
20
+
38
21
  spec.metadata = {
39
22
  'bug_tracker_uri' => 'https://github.com/esotericpig/raketary/issues',
40
23
  'changelog_uri' => 'https://github.com/esotericpig/raketary/blob/master/CHANGELOG.md',
41
24
  'homepage_uri' => 'https://github.com/esotericpig/raketary',
42
25
  'source_code_uri' => 'https://github.com/esotericpig/raketary'
43
26
  }
44
-
27
+
45
28
  spec.require_paths = ['lib']
46
29
  spec.bindir = 'bin'
47
30
  spec.executables = [spec.name]
48
-
31
+
49
32
  spec.files = Dir.glob(File.join("{#{spec.require_paths.join(',')}}",'**','*.{erb,rb}')) +
50
- Dir.glob(File.join(spec.bindir,'**',"{#{spec.executables.join(',')}}")) +
33
+ Dir.glob(File.join(spec.bindir,'*')) +
51
34
  Dir.glob(File.join('{test,yard}','**','*.{erb,rb}')) +
52
- %W( Gemfile Gemfile.lock #{spec.name}.gemspec Rakefile ) +
53
- %w( CHANGELOG.md LICENSE.txt README.md )
54
-
35
+ %W[ Gemfile Gemfile.lock #{spec.name}.gemspec Rakefile ] +
36
+ %w[ CHANGELOG.md LICENSE.txt README.md ]
37
+
38
+ spec.required_ruby_version = '>= 2.4'
39
+
40
+ spec.add_runtime_dependency 'irb' ,'~> 1.3' # For Raketeer::IRBTask
41
+ spec.add_runtime_dependency 'rake' ,'~> 13.0' # For using custom Rake tasks
42
+ spec.add_runtime_dependency 'raketeer' ,'~> 0.2' # For general Rake tasks
43
+ spec.add_runtime_dependency 'yard_ghurt','~> 1.2' # For YARDoc Rake tasks
44
+
45
+ spec.add_development_dependency 'bundler','~> 2.2'
46
+ spec.add_development_dependency 'yard' ,'~> 0.9' # For documentation
47
+
55
48
  spec.post_install_message = "You can now use [#{spec.executables.join(', ')}] on the command line."
56
-
57
- spec.required_ruby_version = '>= 2.4.6'
58
-
59
- spec.add_runtime_dependency 'irb' ,'~> 1.0' # For Raketeer::IRBTask
60
- spec.add_runtime_dependency 'rake' ,'~> 12.3' # For Raketeer
61
- spec.add_runtime_dependency 'raketeer','~> 0.2'
62
-
63
- spec.add_development_dependency 'bundler','~> 2.0'
64
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raketary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
- - Jonathan Bradley Whited (@esotericpig)
8
- autorequire:
7
+ - Jonathan Bradley Whited
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-01 00:00:00.000000000 Z
11
+ date: 2021-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: irb
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '12.3'
33
+ version: '13.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '12.3'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: raketeer
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,23 +52,51 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: yard_ghurt
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.2'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.2'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '2.0'
75
+ version: '2.2'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.2'
83
+ - !ruby/object:Gem::Dependency
84
+ name: yard
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.9'
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
94
  - - "~>"
67
95
  - !ruby/object:Gem::Version
68
- version: '2.0'
69
- description: CLI for Raketeer.
96
+ version: '0.9'
97
+ description: CLI app for commonly-used Rake tasks.
70
98
  email:
71
- - bradley@esotericpig.com
99
+ - code@esotericpig.com
72
100
  executables:
73
101
  - raketary
74
102
  extensions: []
@@ -83,13 +111,14 @@ files:
83
111
  - bin/raketary
84
112
  - lib/raketary.rb
85
113
  - lib/raketary/app.rb
86
- - lib/raketary/app_bump.rb
87
- - lib/raketary/app_github_pkg.rb
88
- - lib/raketary/app_irb.rb
89
- - lib/raketary/app_nokogiri.rb
90
- - lib/raketary/app_run.rb
114
+ - lib/raketary/bump_cmd.rb
91
115
  - lib/raketary/cmd.rb
92
116
  - lib/raketary/errors.rb
117
+ - lib/raketary/ghp_sync_cmd.rb
118
+ - lib/raketary/github_pkg_cmd.rb
119
+ - lib/raketary/irb_cmd.rb
120
+ - lib/raketary/nokogiri_cmd.rb
121
+ - lib/raketary/run_cmd.rb
93
122
  - lib/raketary/sub_cmd.rb
94
123
  - lib/raketary/version.rb
95
124
  - raketary.gemspec
@@ -109,15 +138,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
138
  requirements:
110
139
  - - ">="
111
140
  - !ruby/object:Gem::Version
112
- version: 2.4.6
141
+ version: '2.4'
113
142
  required_rubygems_version: !ruby/object:Gem::Requirement
114
143
  requirements:
115
144
  - - ">="
116
145
  - !ruby/object:Gem::Version
117
146
  version: '0'
118
147
  requirements: []
119
- rubygems_version: 3.1.2
120
- signing_key:
148
+ rubygems_version: 3.2.15
149
+ signing_key:
121
150
  specification_version: 4
122
- summary: CLI for Raketeer.
151
+ summary: CLI app for commonly-used Rake tasks.
123
152
  test_files: []