pennyworth 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -13
- data/bin/pennyworth +1 -1
- data/lib/pennyworth/cli.rb +16 -13
- data/lib/pennyworth/identity.rb +8 -3
- data/lib/pennyworth/kits/clipboard.rb +1 -2
- data/lib/pennyworth/kits/string.rb +2 -2
- data/lib/tasks/rspec.rake +6 -0
- data/lib/tasks/rubocop.rake +6 -0
- metadata +52 -31
- checksums.yaml.gz.sig +0 -3
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2392eaa6b397cba873effe698263cc1a8c5dbb27
|
|
4
|
+
data.tar.gz: d08cbbf2fcb46a431390fbe030d2edbdacd06035
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 02a344cb739bceea46ed49f5ed683299c85d0dee443f960cd89169f85aa607aeb42edd9081a517dd4ce523f40cc2c38dbc5c3141fe64ead6f26f6da8a79712b7
|
|
7
|
+
data.tar.gz: 21ac2f81421e223f653d3134f0c14f27f3da03464ca2a4920c415cb3608b13c097eae570300046259f575b46428b03f1e0db87c30063c25221c0bd8fe8136afe
|
data/README.md
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Pennyworth
|
|
2
2
|
|
|
3
|
-
[](http://badge.fury.io/rb/pennyworth)
|
|
4
|
+
[](https://codeclimate.com/github/bkuhlmann/pennyworth)
|
|
5
|
+
[](https://codeclimate.com/github/bkuhlmann/pennyworth)
|
|
6
|
+
[](https://gemnasium.com/bkuhlmann/pennyworth)
|
|
7
|
+
[](https://travis-ci.org/bkuhlmann/pennyworth)
|
|
8
|
+
[](https://www.patreon.com/bkuhlmann)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
A command line interface that enhances and extends Alfred with Ruby support.
|
|
11
|
+
|
|
12
|
+
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
|
13
|
+
|
|
14
|
+
# Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Features](#features)
|
|
17
|
+
- [Requirements](#requirements)
|
|
18
|
+
- [Setup](#setup)
|
|
19
|
+
- [Usage](#usage)
|
|
20
|
+
- [Tests](#tests)
|
|
21
|
+
- [Versioning](#versioning)
|
|
22
|
+
- [Code of Conduct](#code-of-conduct)
|
|
23
|
+
- [Contributions](#contributions)
|
|
24
|
+
- [License](#license)
|
|
25
|
+
- [History](#history)
|
|
26
|
+
- [Credits](#credits)
|
|
27
|
+
|
|
28
|
+
<!-- Tocer[finish]: Auto-generated, don't remove. -->
|
|
11
29
|
|
|
12
30
|
# Features
|
|
13
31
|
|
|
@@ -21,11 +39,11 @@ Enhances and extends Alfred by providing a Ruby command line interface (CLI).
|
|
|
21
39
|
|
|
22
40
|
# Requirements
|
|
23
41
|
|
|
24
|
-
0. [OSX](
|
|
25
|
-
0. [Alfred](
|
|
26
|
-
0. [Alfred Powerpack](
|
|
42
|
+
0. [OSX](https://www.apple.com/osx).
|
|
43
|
+
0. [Alfred](https://www.alfredapp.com) (Version 2.x.x or higher).
|
|
44
|
+
0. [Alfred Powerpack](https://www.alfredapp.com/purchase).
|
|
27
45
|
0. [rbenv](https://github.com/sstephenson/rbenv).
|
|
28
|
-
0. [MRI 2.x.x](
|
|
46
|
+
0. [MRI 2.x.x](https://www.ruby-lang.org).
|
|
29
47
|
|
|
30
48
|
# Setup
|
|
31
49
|
|
|
@@ -80,7 +98,7 @@ gem is prefixed with _Pennyworth_.
|
|
|
80
98
|
|
|
81
99
|
To test, run:
|
|
82
100
|
|
|
83
|
-
bundle exec
|
|
101
|
+
bundle exec rake
|
|
84
102
|
|
|
85
103
|
# Versioning
|
|
86
104
|
|
data/bin/pennyworth
CHANGED
data/lib/pennyworth/cli.rb
CHANGED
|
@@ -4,10 +4,13 @@ require "thor/actions"
|
|
|
4
4
|
require "thor_plus/actions"
|
|
5
5
|
|
|
6
6
|
module Pennyworth
|
|
7
|
+
# The Command Line Interface (CLI) for the gem.
|
|
7
8
|
class CLI < Thor
|
|
8
9
|
include Thor::Actions
|
|
9
10
|
include ThorPlus::Actions
|
|
10
11
|
|
|
12
|
+
package_name Pennyworth::Identity.version_label
|
|
13
|
+
|
|
11
14
|
# Overwrites the Thor template source root.
|
|
12
15
|
def self.source_root
|
|
13
16
|
File.expand_path File.join(File.dirname(__FILE__), "templates")
|
|
@@ -28,15 +31,15 @@ module Pennyworth
|
|
|
28
31
|
method_option :length, aliases: "-l", desc: "Answer the length of a string.", type: :array
|
|
29
32
|
def string
|
|
30
33
|
case
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
when options[:downcase]
|
|
35
|
+
Pennyworth::Kits::String.downcase options[:downcase]
|
|
36
|
+
when options[:upcase]
|
|
37
|
+
Pennyworth::Kits::String.upcase options[:upcase]
|
|
38
|
+
when options[:capitalize]
|
|
39
|
+
Pennyworth::Kits::String.capitalize options[:capitalize]
|
|
40
|
+
when options[:length]
|
|
41
|
+
Pennyworth::Kits::String.length options[:length]
|
|
42
|
+
else say("Type 'pennyworth help string' for usage.")
|
|
40
43
|
end
|
|
41
44
|
end
|
|
42
45
|
|
|
@@ -69,22 +72,22 @@ module Pennyworth
|
|
|
69
72
|
say
|
|
70
73
|
end
|
|
71
74
|
|
|
72
|
-
desc "-e, [edit]", "Edit
|
|
75
|
+
desc "-e, [--edit]", "Edit #{Pennyworth::Identity.label} settings in default editor."
|
|
73
76
|
map %w(-e --edit) => :edit
|
|
74
77
|
def edit
|
|
75
78
|
`#{editor} #{@settings_file}`
|
|
76
79
|
end
|
|
77
80
|
|
|
78
|
-
desc "-v, [--version]", "Show version."
|
|
81
|
+
desc "-v, [--version]", "Show #{Pennyworth::Identity.label} version."
|
|
79
82
|
map %w(-v --version) => :version
|
|
80
83
|
def version
|
|
81
|
-
say Pennyworth::Identity.
|
|
84
|
+
say Pennyworth::Identity.version_label
|
|
82
85
|
end
|
|
83
86
|
|
|
84
87
|
desc "-h, [--help=HELP]", "Show this message or get help for a command."
|
|
85
88
|
map %w(-h --help) => :help
|
|
86
89
|
def help task = nil
|
|
87
|
-
say
|
|
90
|
+
say && super
|
|
88
91
|
end
|
|
89
92
|
end
|
|
90
93
|
end
|
data/lib/pennyworth/identity.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
module Pennyworth
|
|
2
|
+
# Gem identity information.
|
|
2
3
|
module Identity
|
|
3
4
|
def self.name
|
|
4
5
|
"pennyworth"
|
|
@@ -9,11 +10,15 @@ module Pennyworth
|
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
def self.version
|
|
12
|
-
"3.
|
|
13
|
+
"3.2.0"
|
|
13
14
|
end
|
|
14
15
|
|
|
15
|
-
def self.
|
|
16
|
-
|
|
16
|
+
def self.version_label
|
|
17
|
+
"#{label} #{version}"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.file_name
|
|
21
|
+
".#{name}rc"
|
|
17
22
|
end
|
|
18
23
|
end
|
|
19
24
|
end
|
|
@@ -2,12 +2,11 @@ module Pennyworth
|
|
|
2
2
|
module Kits
|
|
3
3
|
# Provides OSX clipboard utility methods.
|
|
4
4
|
class Clipboard
|
|
5
|
-
|
|
6
5
|
# Copies text to the OSX clipboard.
|
|
7
6
|
# ==== Parameters
|
|
8
7
|
# * +text+ - Required. The text to send to the clipboard.
|
|
9
8
|
def self.copy text
|
|
10
|
-
IO.popen("pbcopy",
|
|
9
|
+
IO.popen("pbcopy", "w").print text
|
|
11
10
|
text
|
|
12
11
|
end
|
|
13
12
|
end
|
|
@@ -6,7 +6,7 @@ module Pennyworth
|
|
|
6
6
|
# ==== Parameters
|
|
7
7
|
# * +array+ - Required. The array to build a string from.
|
|
8
8
|
# * +delimiter+ - Optional. The delimiter used to join each array element. Default: ' '
|
|
9
|
-
def self.array_to_string array, delimiter =
|
|
9
|
+
def self.array_to_string array, delimiter = " "
|
|
10
10
|
array * delimiter
|
|
11
11
|
end
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ module Pennyworth
|
|
|
30
30
|
# ==== Parameters
|
|
31
31
|
# * +array+ - Required. The string array to process.
|
|
32
32
|
def self.capitalize array
|
|
33
|
-
words = array.map
|
|
33
|
+
words = array.map(&:capitalize)
|
|
34
34
|
words = Pennyworth::Kits::String.array_to_string words
|
|
35
35
|
puts Pennyworth::Kits::Clipboard.copy(words)
|
|
36
36
|
end
|
metadata
CHANGED
|
@@ -1,36 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pennyworth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brooke Kuhlmann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
|
-
cert_chain:
|
|
11
|
-
-
|
|
12
|
-
-----BEGIN CERTIFICATE-----
|
|
13
|
-
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMQ8wDQYDVQQDDAZicm9v
|
|
14
|
-
a2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQBGRYC
|
|
15
|
-
aW8wHhcNMTUwNzA1MTQ1MzExWhcNMTYwNzA0MTQ1MzExWjBBMQ8wDQYDVQQDDAZi
|
|
16
|
-
cm9va2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQB
|
|
17
|
-
GRYCaW8w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Q==
|
|
32
|
-
-----END CERTIFICATE-----
|
|
33
|
-
date: 2015-07-05 00:00:00.000000000 Z
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
|
34
12
|
dependencies:
|
|
35
13
|
- !ruby/object:Gem::Dependency
|
|
36
14
|
name: thor
|
|
@@ -74,6 +52,20 @@ dependencies:
|
|
|
74
52
|
- - "~>"
|
|
75
53
|
- !ruby/object:Gem::Version
|
|
76
54
|
version: '10.0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: gemsmith
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
77
69
|
- !ruby/object:Gem::Dependency
|
|
78
70
|
name: pry
|
|
79
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -103,7 +95,7 @@ dependencies:
|
|
|
103
95
|
- !ruby/object:Gem::Version
|
|
104
96
|
version: '0'
|
|
105
97
|
- !ruby/object:Gem::Dependency
|
|
106
|
-
name: pry-
|
|
98
|
+
name: pry-remote
|
|
107
99
|
requirement: !ruby/object:Gem::Requirement
|
|
108
100
|
requirements:
|
|
109
101
|
- - ">="
|
|
@@ -117,7 +109,7 @@ dependencies:
|
|
|
117
109
|
- !ruby/object:Gem::Version
|
|
118
110
|
version: '0'
|
|
119
111
|
- !ruby/object:Gem::Dependency
|
|
120
|
-
name: pry-
|
|
112
|
+
name: pry-state
|
|
121
113
|
requirement: !ruby/object:Gem::Requirement
|
|
122
114
|
requirements:
|
|
123
115
|
- - ">="
|
|
@@ -144,6 +136,20 @@ dependencies:
|
|
|
144
136
|
- - ">="
|
|
145
137
|
- !ruby/object:Gem::Version
|
|
146
138
|
version: '0'
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: pry-stack_explorer
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ">="
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '0'
|
|
146
|
+
type: :development
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - ">="
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '0'
|
|
147
153
|
- !ruby/object:Gem::Dependency
|
|
148
154
|
name: rspec
|
|
149
155
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -214,6 +220,20 @@ dependencies:
|
|
|
214
220
|
- - ">="
|
|
215
221
|
- !ruby/object:Gem::Version
|
|
216
222
|
version: '0'
|
|
223
|
+
- !ruby/object:Gem::Dependency
|
|
224
|
+
name: rubocop
|
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
|
226
|
+
requirements:
|
|
227
|
+
- - ">="
|
|
228
|
+
- !ruby/object:Gem::Version
|
|
229
|
+
version: '0'
|
|
230
|
+
type: :development
|
|
231
|
+
prerelease: false
|
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
233
|
+
requirements:
|
|
234
|
+
- - ">="
|
|
235
|
+
- !ruby/object:Gem::Version
|
|
236
|
+
version: '0'
|
|
217
237
|
- !ruby/object:Gem::Dependency
|
|
218
238
|
name: codeclimate-test-reporter
|
|
219
239
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -228,8 +248,7 @@ dependencies:
|
|
|
228
248
|
- - ">="
|
|
229
249
|
- !ruby/object:Gem::Version
|
|
230
250
|
version: '0'
|
|
231
|
-
description:
|
|
232
|
-
detailspec.
|
|
251
|
+
description: A command line interface that enhances and extends Alfred with Ruby support.
|
|
233
252
|
email:
|
|
234
253
|
- brooke@alchemists.io
|
|
235
254
|
executables:
|
|
@@ -255,6 +274,8 @@ files:
|
|
|
255
274
|
- lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/F03EB975-27A1-49C1-BB1D-42886955C024.png
|
|
256
275
|
- lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/icon.png
|
|
257
276
|
- lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/info.plist
|
|
277
|
+
- lib/tasks/rspec.rake
|
|
278
|
+
- lib/tasks/rubocop.rake
|
|
258
279
|
homepage: https://github.com/bkuhlmann/pennyworth
|
|
259
280
|
licenses:
|
|
260
281
|
- MIT
|
|
@@ -275,8 +296,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
275
296
|
version: '0'
|
|
276
297
|
requirements: []
|
|
277
298
|
rubyforge_project:
|
|
278
|
-
rubygems_version: 2.
|
|
299
|
+
rubygems_version: 2.5.0
|
|
279
300
|
signing_key:
|
|
280
301
|
specification_version: 4
|
|
281
|
-
summary:
|
|
302
|
+
summary: A command line interface that enhances and extends Alfred with Ruby support.
|
|
282
303
|
test_files: []
|
checksums.yaml.gz.sig
DELETED
data.tar.gz.sig
DELETED
|
Binary file
|
metadata.gz.sig
DELETED
|
Binary file
|