extensionator 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -12
- data/lib/extensionator/cli.rb +3 -3
- data/lib/extensionator/creator.rb +2 -5
- data/lib/extensionator/version.rb +1 -1
- 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: b53681562af23588f73c2b92aee228e5406c60f0
|
4
|
+
data.tar.gz: 4ee728a6887f29c32b299aa8aa5b2d0023a46adc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6f7a50d748309b6ac30fce50744a9f79f71ba363bce2bfa07fc0a46a335f755129720cd61362067e54dc69bed24c136026050f32b614776cac2b304af94be7b
|
7
|
+
data.tar.gz: b655756d86416f4305ea97aefbc2026503a1906e64b0740715de73541338dbb97995dbbe7ed4280f0efc7dee4c3466708b6cc65176d49e2a4f7e51aea6ade170
|
data/README.md
CHANGED
@@ -31,7 +31,7 @@ That's the file you'll use as `key.pem` below.
|
|
31
31
|
extensionator -d directory/with/extension -i key.pem -o output.crx
|
32
32
|
```
|
33
33
|
|
34
|
-
Useful options!
|
34
|
+
Useful options!
|
35
35
|
|
36
36
|
* `-e` `--exclude`. Specify a regex of things to exclude. Matches on the whole path. `-e "\.md$"
|
37
37
|
|
@@ -44,17 +44,18 @@ Useful options! There are single-letter versions of most of these:
|
|
44
44
|
Here's the whole shebang:
|
45
45
|
|
46
46
|
```
|
47
|
-
-> extensionator
|
48
|
-
usage:
|
49
|
-
-d, --directory
|
50
|
-
-i, --identity
|
51
|
-
-o, --output
|
52
|
-
-e, --exclude
|
53
|
-
-f, --format
|
54
|
-
--inject-version
|
55
|
-
--inject-key
|
56
|
-
-
|
57
|
-
-
|
47
|
+
-> bin/extensionator
|
48
|
+
usage: bin/extensionator [options]
|
49
|
+
-d, --directory Directory containing the extension. (Default: .)
|
50
|
+
-i, --identity Location of the pem file to sign with.
|
51
|
+
-o, --output Location of the output file. (Default: 'extension.[zip|crx]')
|
52
|
+
-e, --exclude Regular expression for filenames to exclude. (Default: .crx$)
|
53
|
+
-f, --format Type of file to produce, either zip or crx. (Default: crx)
|
54
|
+
--inject-version Inject a version number into the manifest file. (Default: none)
|
55
|
+
--inject-key Inject a key parameter into the manifest file. (Default: no)
|
56
|
+
--skip-validation Don't try to validate this extension. Currently just checks that the manifest is parsable. (Default: no)
|
57
|
+
-v, --version Extensionator version info.
|
58
|
+
-h, --help Print this message.
|
58
59
|
```
|
59
60
|
|
60
61
|
## Programmatically
|
data/lib/extensionator/cli.rb
CHANGED
@@ -12,7 +12,7 @@ module Extensionator
|
|
12
12
|
o.string "-f", "--format", "Type of file to produce, either zip or crx. (Default: crx)"
|
13
13
|
o.string "--inject-version", "Inject a version number into the manifest file. (Default: none)"
|
14
14
|
o.bool "--inject-key", "Inject a key parameter into the manifest file. (Default: no)"
|
15
|
-
o.
|
15
|
+
o.bool "--skip-validation", "Don't try to validate this extension. Currently just checks that the manifest is parsable."
|
16
16
|
o.on "-v", "--version", "Extensionator version info." do
|
17
17
|
puts Extensionator::VERSION
|
18
18
|
exit
|
@@ -28,19 +28,19 @@ module Extensionator
|
|
28
28
|
exit
|
29
29
|
end
|
30
30
|
|
31
|
-
creator = Creator.new(opts[:directory] || ".", opts)
|
31
|
+
creator = Creator.new(opts[:directory] || ".", fixup_options(opts))
|
32
32
|
if opts[:format] == "zip"
|
33
33
|
creator.zip(opts[:output] || "output.zip")
|
34
34
|
else
|
35
35
|
creator.crx(opts[:output] || "output.crx")
|
36
36
|
end
|
37
|
-
|
38
37
|
end
|
39
38
|
|
40
39
|
def self.fixup_options(in_opts)
|
41
40
|
opts = in_opts.clone
|
42
41
|
opts[:output] = output.to_sym if opts[:output]
|
43
42
|
opts[:exclude] = Regexp.new(opts[:exclude]) if opts[:exclude]
|
43
|
+
opts
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -8,11 +8,8 @@ module Extensionator
|
|
8
8
|
|
9
9
|
def initialize(dir, options)
|
10
10
|
@dir = dir
|
11
|
-
@opts =
|
12
|
-
|
13
|
-
inject_version: nil,
|
14
|
-
skip_validation: false
|
15
|
-
}.merge(options)
|
11
|
+
@opts = options
|
12
|
+
@opts[:exclude] ||= /\.crx$/
|
16
13
|
end
|
17
14
|
|
18
15
|
def zip(destination)
|