sleeping_king_studios-tasks 0.3.0 → 0.4.0

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: c9380cfb581917cac00ae5102325dd895fcbd1364b4d8a53844f9ead55a41173
4
- data.tar.gz: 69647411117043bf53bf24c4f47231de7d970de6c3adff412cc4a5228af7939e
3
+ metadata.gz: 6b22e56277e42bd23403ac607dd21057d5c6c6e870655a326e16524d1c1eb051
4
+ data.tar.gz: 4ab2e01510d48601888a8239a85b928ab610a111ea57aa6abce24c418cd7d85d
5
5
  SHA512:
6
- metadata.gz: 563983af6ab016118a21b810e8c5b2f61ef915ddee3bdce425f8945c5bf2bfb5dfc21a14acf8a07a7c08776443fd0cf7e46e5f96ff2c708a88f0834e4d856e51
7
- data.tar.gz: 0b2d75151cc7513903514ed8f60041c5b7e73b2723373ceedb7f904a65059e8815f100f9cb54f745c6619274650f3ca7b2da063b50082b5548159fcf0d3918d9
6
+ metadata.gz: a5f679f0abaa9b54de43b0eff521b9ea0a4275f82925bf9a4821f2d97260a0b29beccc49bc115067585c91ba1fd90800f07d580bfc49df3742536ae2e2cb9524
7
+ data.tar.gz: 8978756f73cfff58d8ab49809ddfd3ca6eed68868f48124d524280f2e008bfec3c42615e6a9f97a2c9fe1a653c65c4ebb2f13174464d300e332f954de0c02dc2
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0
4
+
5
+ - Fix deprecations from SleepingKingStudios::Tools.
6
+ - Add support for Ruby 3.0.
7
+
3
8
  ## 0.3.0
4
9
 
5
10
  - Fix deprecation warnings in Ruby 2.7.
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # SleepingKingStudios::Tasks [![Build Status](https://travis-ci.org/sleepingkingstudios/sleeping_king_studios-tasks.svg?branch=master)](https://travis-ci.org/sleepingkingstudios/sleeping_king_studios-tasks)
2
2
 
3
+ **Note:** This project is deprecated, and will not receive further feature updates.
4
+
3
5
  A toolkit providing an encapsulation layer around the Thor CLI library, with predefined tasks for development and continuous integration.
4
6
 
5
7
  See also [https://github.com/erikhuda/thor](https://github.com/erikhuda/thor).
@@ -10,10 +12,6 @@ See also [https://github.com/erikhuda/thor](https://github.com/erikhuda/thor).
10
12
 
11
13
  The canonical repository for this gem is on [GitHub](https://github.com/sleepingkingstudios/sleeping_king_studios-tasks).
12
14
 
13
- ### A Note From The Developer
14
-
15
- Hi, I'm Rob Smith, a Ruby Engineer and the developer of this library. I use these tools every day, but they're not just written for me. If you find this project helpful in your own work, or if you have any questions, suggestions or critiques, please feel free to get in touch! I can be reached on GitHub (see above, and feel encouraged to submit bug reports or merge requests there) or via email at `merlin@sleepingkingstudios.com`. I look forward to hearing from you!
16
-
17
15
  ## Task Classes
18
16
 
19
17
  SleepingKingStudios::Tasks defines a wrapper around the Thor CLI.
@@ -23,7 +23,7 @@ module SleepingKingStudios::Tasks
23
23
 
24
24
  apps.each do |key, data|
25
25
  name = key.to_s
26
- data = tools.hash.convert_keys_to_symbols(data)
26
+ data = tools.hsh.convert_keys_to_symbols(data)
27
27
 
28
28
  data[:name] ||= name
29
29
 
@@ -49,7 +49,7 @@ module SleepingKingStudios::Tasks::Apps
49
49
 
50
50
  define_method :short_name do
51
51
  # rubocop:disable Style/RedundantSelf
52
- tools.string.underscore(self.name.gsub(/\s+/, '_'))
52
+ tools.str.underscore(self.name.gsub(/\s+/, '_'))
53
53
  # rubocop:enable Style/RedundantSelf
54
54
  end # define_method
55
55
 
@@ -1,6 +1,6 @@
1
1
  # lib/sleeping_king_studios/tasks/apps/ci/results_reporter.rb
2
2
 
3
- require 'sleeping_king_studios/tools/toolbox/delegator'
3
+ require 'forwardable'
4
4
 
5
5
  require 'sleeping_king_studios/tasks/apps/ci'
6
6
  require 'sleeping_king_studios/tasks/ci/results_helpers'
@@ -9,21 +9,23 @@ module SleepingKingStudios::Tasks::Apps::Ci
9
9
  # Reports on the results of a multi-application continuous integration
10
10
  # process, printing the step results grouped by application.
11
11
  class ResultsReporter
12
- extend SleepingKingStudios::Tools::Toolbox::Delegator
12
+ extend Forwardable
13
13
 
14
14
  include SleepingKingStudios::Tasks::Ci::ResultsHelpers
15
15
 
16
- delegate \
17
- :applications,
16
+ def_delegators :@context,
18
17
  :print_table,
19
18
  :say,
20
- :set_color,
21
- :to => :@context
19
+ :set_color
22
20
 
23
21
  def initialize context
24
22
  @context = context
25
23
  end # method initialize
26
24
 
25
+ def applications
26
+ @context.send(:applications)
27
+ end
28
+
27
29
  def call results
28
30
  width = 1 + heading_width(results)
29
31
 
@@ -179,7 +179,7 @@ module SleepingKingStudios::Tasks::Ci
179
179
  end # method keys
180
180
 
181
181
  def pluralize count, singular, plural = nil
182
- "#{count} #{tools.integer.pluralize count, singular, plural}"
182
+ "#{count} #{tools.int.pluralize count, singular, plural}"
183
183
  end # method pluralize
184
184
 
185
185
  def tools
@@ -98,7 +98,7 @@ module SleepingKingStudios::Tasks::Ci
98
98
  end
99
99
 
100
100
  def pluralize count, singular, plural = nil
101
- "#{count} #{tools.integer.pluralize count, singular, plural}"
101
+ "#{count} #{tools.int.pluralize count, singular, plural}"
102
102
  end
103
103
 
104
104
  def relative_path path
@@ -92,7 +92,7 @@ module SleepingKingStudios::Tasks::Ci
92
92
  end
93
93
 
94
94
  def pluralize count, singular, plural = nil
95
- "#{count} #{tools.integer.pluralize count, singular, plural}"
95
+ "#{count} #{tools.int.pluralize count, singular, plural}"
96
96
  end
97
97
 
98
98
  def start_time
@@ -84,7 +84,7 @@ module SleepingKingStudios::Tasks::Ci
84
84
  end # method pending_files
85
85
 
86
86
  def pluralize count, singular, plural = nil
87
- "#{count} #{tools.integer.pluralize count, singular, plural}"
87
+ "#{count} #{tools.int.pluralize count, singular, plural}"
88
88
  end # method pluralize
89
89
 
90
90
  # @return [Hash] The hash representation of the results.
@@ -85,7 +85,7 @@ module SleepingKingStudios::Tasks::Ci
85
85
  end # method pending_count
86
86
 
87
87
  def pluralize count, singular, plural = nil
88
- "#{count} #{tools.integer.pluralize count, singular, plural}"
88
+ "#{count} #{tools.int.pluralize count, singular, plural}"
89
89
  end # method pluralize
90
90
 
91
91
  # @return [Hash] The hash representation of the results.
@@ -1,25 +1,24 @@
1
1
  # lib/sleeping_king_studios/tasks/ci/simplecov_results.rb
2
2
 
3
- require 'sleeping_king_studios/tools/toolbox/delegator'
3
+ require 'forwardable'
4
4
 
5
5
  require 'sleeping_king_studios/tasks/ci'
6
6
 
7
7
  module SleepingKingStudios::Tasks::Ci
8
8
  # Encapsulates the results of aggregated SimpleCov data.
9
9
  class SimpleCovResults
10
- extend SleepingKingStudios::Tools::Toolbox::Delegator
10
+ extend Forwardable
11
11
 
12
12
  # @param results [SimpleCov::Result] The raw results of the SimpleCov call.
13
13
  def initialize results
14
14
  @results = results
15
15
  end # constructor
16
16
 
17
- delegate \
17
+ def_delegators :@results,
18
18
  :covered_lines,
19
19
  :covered_percent,
20
20
  :missed_lines,
21
- :total_lines,
22
- :to => :@results
21
+ :total_lines
23
22
 
24
23
  # @return [Boolean] True if there are no covered lines, otherwise false.
25
24
  def empty?
@@ -58,7 +58,7 @@ module SleepingKingStudios::Tasks::Ci
58
58
  def require_path class_name
59
59
  class_name.
60
60
  split('::').
61
- map { |str| tools.string.underscore(str) }.
61
+ map { |str| tools.str.underscore(str) }.
62
62
  join '/'
63
63
  end # method require_path
64
64
 
@@ -52,7 +52,7 @@ module SleepingKingStudios::Tasks::Ci
52
52
  end # method failing?
53
53
 
54
54
  def format_failures failing_steps
55
- tools.array.humanize_list(failing_steps) do |name|
55
+ tools.ary.humanize_list(failing_steps) do |name|
56
56
  set_color(name, :red)
57
57
  end # humanize list
58
58
  end # method format_failures
@@ -142,13 +142,13 @@ module SleepingKingStudios::Tasks::File
142
142
  template = spec_file? ? 'rspec.erb' : 'ruby.erb'
143
143
 
144
144
  preview_file file_path, :max => max, :template => template do
145
- tools.string.indent(rendered_source, 4)
145
+ tools.str.indent(rendered_source, 4)
146
146
  end # preview_file
147
147
 
148
148
  return unless spec? && !spec_file?
149
149
 
150
150
  preview_file spec_path, :max => max, :template => 'rspec.erb' do
151
- tools.string.indent(rendered_spec, 4)
151
+ tools.str.indent(rendered_spec, 4)
152
152
  end # preview_file
153
153
  end # method preview_files
154
154
  # rubocop:enable Metrics/AbcSize
@@ -6,7 +6,7 @@ require '<%= full_path.join('/') %>'
6
6
 
7
7
  <%
8
8
  qualified_module =
9
- full_path.map { |rel| tools.string.camelize(rel) }.join('::')
9
+ full_path.map { |rel| tools.str.camelize(rel) }.join('::')
10
10
  %>
11
11
  RSpec.describe <%= qualified_module %> do
12
12
  pending
@@ -3,24 +3,24 @@
3
3
  <% tools = SleepingKingStudios::Tools::Toolbelt.new %>
4
4
  <% if relative_path.empty? %>
5
5
  <% if defined?(superclass) %>
6
- class <%= tools.string.camelize file_name %> < <%= superclass %>
6
+ class <%= tools.str.camelize file_name %> < <%= superclass %>
7
7
 
8
8
  end
9
9
  <% else %>
10
- module <%= tools.string.camelize file_name %>
10
+ module <%= tools.str.camelize file_name %>
11
11
 
12
12
  end
13
13
  <% end %>
14
14
  <% else %>
15
15
  require '<%= relative_path.join('/') %>'
16
16
 
17
- module <%= relative_path.map { |rel| tools.string.camelize(rel) }.join('::') %>
17
+ module <%= relative_path.map { |rel| tools.str.camelize(rel) }.join('::') %>
18
18
  <% if defined?(superclass) %>
19
- class <%= tools.string.camelize file_name %> < <%= superclass %>
19
+ class <%= tools.str.camelize file_name %> < <%= superclass %>
20
20
 
21
21
  end
22
22
  <% else %>
23
- module <%= tools.string.camelize file_name %>
23
+ module <%= tools.str.camelize file_name %>
24
24
 
25
25
  end
26
26
  <% end %>
@@ -39,7 +39,7 @@ module SleepingKingStudios::Tasks
39
39
  default_env.
40
40
  merge(env).
41
41
  map do |key, value|
42
- key = tools.string.underscore(key).upcase
42
+ key = tools.str.underscore(key).upcase
43
43
  value = %("#{value}") if value.is_a?(String)
44
44
 
45
45
  "#{key}=#{value}"
@@ -36,14 +36,14 @@ module SleepingKingStudios::Tasks
36
36
  def task_name
37
37
  tools = SleepingKingStudios::Tools::Toolbelt.instance
38
38
 
39
- tools.string.underscore(name.split('::').last).sub(/_task$/, '')
39
+ tools.str.underscore(name.split('::').last).sub(/_task$/, '')
40
40
  end # method task_name
41
41
 
42
42
  private
43
43
 
44
44
  def define_helpers option_name, option_params
45
45
  tools = SleepingKingStudios::Tools::Toolbelt.instance
46
- name = tools.string.underscore option_name
46
+ name = tools.str.underscore option_name
47
47
 
48
48
  define_method(name) { options[option_name.to_s] }
49
49
 
@@ -11,7 +11,7 @@ module SleepingKingStudios
11
11
  # Major version.
12
12
  MAJOR = 0
13
13
  # Minor version.
14
- MINOR = 3
14
+ MINOR = 4
15
15
  # Patch version.
16
16
  PATCH = 0
17
17
  # Prerelease version.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sleeping_king_studios-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob "Merlin" Smith
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-11 00:00:00.000000000 Z
11
+ date: 2020-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -36,20 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.7'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 0.7.1
39
+ version: '0.8'
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
46
43
  requirements:
47
44
  - - "~>"
48
45
  - !ruby/object:Gem::Version
49
- version: '0.7'
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 0.7.1
46
+ version: '0.8'
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: erubi
55
49
  requirement: !ruby/object:Gem::Requirement
@@ -253,7 +247,7 @@ homepage: http://sleepingkingstudios.com
253
247
  licenses:
254
248
  - MIT
255
249
  metadata: {}
256
- post_install_message:
250
+ post_install_message:
257
251
  rdoc_options: []
258
252
  require_paths:
259
253
  - lib
@@ -268,8 +262,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
262
  - !ruby/object:Gem::Version
269
263
  version: '0'
270
264
  requirements: []
271
- rubygems_version: 3.1.2
272
- signing_key:
265
+ rubygems_version: 3.2.3
266
+ signing_key:
273
267
  specification_version: 4
274
268
  summary: A tasks toolkit for rapid development.
275
269
  test_files: []