extensionator 0.0.5 → 0.0.6
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 +14 -0
- data/bin/extensionator +15 -11
- data/lib/extensionator.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9c64ad4429d245aedfa3bc2242e32865873c1e3
|
4
|
+
data.tar.gz: da47e4ca7feb90acd55199d196b8b8c7a44e0aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7f2a7302c1ddf167f89e757b7cea1d923c06ad43b927294f321d8158734310d4dab441a1b35f258b3c9fd387368dd81f72a41d65edc54737d4b0926ae40d9de
|
7
|
+
data.tar.gz: e18f4c7772ed29138d581d685f5fbf109ef08ad4299bdf9f949df981f884c6ad419736e3c0d2bea5700db6a31e9fa5eb97802b1a39e08f40ce24f802e1fd4ccb
|
data/README.md
CHANGED
@@ -28,11 +28,25 @@ You can also exclude files with a regex, which will be applied to each level of
|
|
28
28
|
extensionator -d directory/with/extension -i key.pem -o output.crx -e "\.md$"
|
29
29
|
```
|
30
30
|
|
31
|
+
If you're one of *those* people, here's this thing:
|
32
|
+
|
33
|
+
```
|
34
|
+
-> extensionator -h
|
35
|
+
usage: /Users/isaac/.gem/ruby/2.1.5/bin/extensionator [options]
|
36
|
+
-d, --directory Directory containing the extension. (Default: .)
|
37
|
+
-i, --identity Location of the pem file to sign with. (Required)
|
38
|
+
-o, --output Location of the output file. (Default: 'extension.crx')
|
39
|
+
-e, --exclude Regular expression for filenames to exclude. (Default: .*\.crx$)
|
40
|
+
-v, --version Extensionator version info.
|
41
|
+
-h, --help Print this message.
|
42
|
+
```
|
43
|
+
|
31
44
|
# Programmatically
|
32
45
|
|
33
46
|
Same as above, but:
|
34
47
|
|
35
48
|
```rb
|
49
|
+
require "extensionator"
|
36
50
|
Extensionator.create("directory/with/extension", "key.pem", "output_file.crx")
|
37
51
|
```
|
38
52
|
|
data/bin/extensionator
CHANGED
@@ -9,23 +9,27 @@ rescue LoadError
|
|
9
9
|
end
|
10
10
|
|
11
11
|
opts = Slop.parse do |o|
|
12
|
-
o.string "-d", "--directory", "Directory containing the extension (
|
13
|
-
o.string "-i", "--identity", "Location of the pem file to sign with."
|
14
|
-
o.string "-o", "--output", "Location of the output file (
|
15
|
-
o.string "-e", "--exclude", "Regular expression for filenames to exclude.", default: nil
|
12
|
+
o.string "-d", "--directory", "Directory containing the extension. (Default: .)", default: "."
|
13
|
+
o.string "-i", "--identity", "Location of the pem file to sign with. (Required)"
|
14
|
+
o.string "-o", "--output", "Location of the output file. (Default: 'extension.crx')", default: "extension.crx"
|
15
|
+
o.string "-e", "--exclude", "Regular expression for filenames to exclude. (Default: .*\\.crx$)", default: nil
|
16
16
|
o.on "-v", "--version", "Extensionator version info." do
|
17
17
|
puts Extensionator::VERSION
|
18
18
|
exit
|
19
19
|
end
|
20
|
-
o.on "-h", "--help", "Print this message" do
|
20
|
+
o.on "-h", "--help", "Print this message." do
|
21
21
|
puts o
|
22
22
|
exit
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
unless opts[:identity]
|
27
|
+
puts("No identity file specified.")
|
28
|
+
puts(opts)
|
29
|
+
exit(-1)
|
30
|
+
else
|
31
|
+
Extensionator.create(opts[:directory],
|
32
|
+
opts[:identity],
|
33
|
+
opts[:output],
|
34
|
+
exclude: opts[:exclude] ? Regexp.new(opts[:exclude]) : nil)
|
35
|
+
end
|
data/lib/extensionator.rb
CHANGED
@@ -5,7 +5,7 @@ require "pathname"
|
|
5
5
|
require "zip"
|
6
6
|
|
7
7
|
module Extensionator
|
8
|
-
VERSION = "0.0.
|
8
|
+
VERSION = "0.0.6"
|
9
9
|
|
10
10
|
module Impl
|
11
11
|
def self.create(dir, key_file, dest_filename, opts)
|
@@ -65,7 +65,7 @@ module Extensionator
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
def self.create(dir, key_file, dest_filename, opts = {})
|
68
|
+
def self.create(dir, key_file, dest_filename, opts = {exclude: /.*\.crx/})
|
69
69
|
Impl.create(dir, key_file, dest_filename, opts)
|
70
70
|
end
|
71
71
|
end
|