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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0cb816b7ddd6b4c25dd868bf822331c7fa6c241
4
- data.tar.gz: 0b2ae54a538f26f1613454157d37af563c6653e8
3
+ metadata.gz: 7a6cc272131783d8247d89bcb921553a43ffbe13
4
+ data.tar.gz: d645f04e197a1f6db321de2fbd8b64759ae9171d
5
5
  SHA512:
6
- metadata.gz: a22d9dd5b6210f75a0ec272b0c457e0ddf39ad58c8dc5279b46040233d49c294a391c290db9c594d8ce4d0043f108705f754cfef6319696ce56452cc458e83f9
7
- data.tar.gz: acac8a3d5fb8a45e99dc4ee121bbc886a54a1dc973073c316090e4522c7f2e3d7e65281d8010c446c2a35609e3b25f4f025292b2aaf7a6415dc692657b8d135d
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-green.svg?style=flat-square
117
+ [phasers-image]: https://img.shields.io/badge/phasers-stun-brightgreen.svg?style=flat-square
@@ -4,7 +4,26 @@ require_relative "../extensionator"
4
4
  module Extensionator
5
5
  module CLI
6
6
  def self.start
7
- opts = Slop.parse do |o|
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)
@@ -1,3 +1,3 @@
1
1
  module Extensionator
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
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.6
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-09-04 00:00:00.000000000 Z
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.2.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