extensionator 1.1.6 → 1.1.7
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 +2 -2
- data/lib/extensionator/cli.rb +20 -16
- data/lib/extensionator/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a6cc272131783d8247d89bcb921553a43ffbe13
|
4
|
+
data.tar.gz: d645f04e197a1f6db321de2fbd8b64759ae9171d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53e413893f1ec1dfb71cc4be5f977389952c0a932164793c101e11ad6bbba260f7172bcfcd1920742ce4c46435203ea650762c4a34ef0a10090fcb757d65840e
|
7
|
+
data.tar.gz: 4a9cec57ec9d7d4a57f5db087fe472d3f2fae86d4ef72ad01a19104a9f7be1b1b8b1a480cded75cf1db9fee91565c2a8ee9dc6b1c2b45103bb1a8b1c763a149d
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ extensionator -d directory/with/extension -i key.pem -o output.crx
|
|
33
33
|
|
34
34
|
Useful options!
|
35
35
|
|
36
|
-
* `-e` `--exclude`. Specify a regex of things to exclude. Matches on the whole path. `-e "\.md$"
|
36
|
+
* `-e` `--exclude`. Specify a regex of things to exclude. Matches on the whole path. `-e "\.md$"`
|
37
37
|
|
38
38
|
* `-f` `--format`. "zip" or "crx". Zip is what the Chrome store has you upload, since it does its own signing. You won't need the `-i` option unless you do something weird with the other options. Dir is useful for using the inject_key option with.
|
39
39
|
|
@@ -114,4 +114,4 @@ Copyright 2015 Zensight. Distributed under the MIT License. See the [LICENSE][]
|
|
114
114
|
|
115
115
|
[crxmake-url]: https://github.com/Constellation/crxmake
|
116
116
|
|
117
|
-
[phasers-image]: https://img.shields.io/badge/phasers-stun-
|
117
|
+
[phasers-image]: https://img.shields.io/badge/phasers-stun-brightgreen.svg?style=flat-square
|
data/lib/extensionator/cli.rb
CHANGED
@@ -4,7 +4,26 @@ require_relative "../extensionator"
|
|
4
4
|
module Extensionator
|
5
5
|
module CLI
|
6
6
|
def self.start
|
7
|
-
|
7
|
+
|
8
|
+
opts = parse_opts
|
9
|
+
|
10
|
+
if opts.used_options.empty?
|
11
|
+
puts opts
|
12
|
+
exit
|
13
|
+
end
|
14
|
+
|
15
|
+
method, default = case opts[:format]
|
16
|
+
when "zip" then [:zip, "output.zip"]
|
17
|
+
when "dir" then [:copy, "output"]
|
18
|
+
else [:crx, "output.crx"]
|
19
|
+
end
|
20
|
+
|
21
|
+
creator = Creator.new(opts[:directory] || ".", fixup_options(opts))
|
22
|
+
creator.send(method, opts[:output] || default)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.parse_opts
|
26
|
+
Slop.parse do |o|
|
8
27
|
o.string "-d", "--directory", "Directory containing the extension. (Default: .)"
|
9
28
|
o.string "-i", "--identity", "Location of the pem file to sign with."
|
10
29
|
o.string "-o", "--output", "Location of the output file. (Default: 'extension.[zip|crx]')"
|
@@ -23,21 +42,6 @@ module Extensionator
|
|
23
42
|
exit
|
24
43
|
end
|
25
44
|
end
|
26
|
-
|
27
|
-
if opts.used_options.empty?
|
28
|
-
puts opts
|
29
|
-
exit
|
30
|
-
end
|
31
|
-
|
32
|
-
creator = Creator.new(opts[:directory] || ".", fixup_options(opts))
|
33
|
-
case opts[:format]
|
34
|
-
when "zip"
|
35
|
-
creator.zip(opts[:output] || "output.zip")
|
36
|
-
when "dir"
|
37
|
-
creator.copy(opts[:output] || "output")
|
38
|
-
else
|
39
|
-
creator.crx(opts[:output] || "output.crx")
|
40
|
-
end
|
41
45
|
end
|
42
46
|
|
43
47
|
def self.fixup_options(in_opts)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extensionator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Cambron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: 1.3.5
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.4.5.1
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Build and sign Chrome extensions (.crx files), either from the command line
|