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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bf7e02a6a12e734151b7043da79f1600ab9373b
4
- data.tar.gz: 2e8e6f6a12e16e305020d66899980218543c501c
3
+ metadata.gz: b53681562af23588f73c2b92aee228e5406c60f0
4
+ data.tar.gz: 4ee728a6887f29c32b299aa8aa5b2d0023a46adc
5
5
  SHA512:
6
- metadata.gz: 4431d363669af1ca47e214a014a3b010f12b5c610955c5d3347177eb75b8a5cb583a39c2a92b24d7d0edfee59964a2ac0bfd398a5654198d54dbb0b7739bafd3
7
- data.tar.gz: 42616df5374054cd5994366d231a68a06864e4312205382f2b981c66fd65a82706ed856e62557351e9232bc077a49cde49ec8dd755575772c3c2d6e7192e00ab
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! There are single-letter versions of most of these:
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 --help
48
- usage: /Users/isaac/.gem/ruby/2.1.5/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. Defaults to crx
54
- --inject-version Inject a version number into the manifest file.
55
- --inject-key Inject a key parameter into the manifest file.
56
- -v, --version Extensionator version info.
57
- -h, --help Print this message.
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
@@ -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.string "--skip-validation", "Don't try to validate this extension. Currently just checks that the manifest is parsable."
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
- inject_key: false,
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)
@@ -1,3 +1,3 @@
1
1
  module Extensionator
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extensionator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Cambron