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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4554574d967be292bf3ffe06f26d5e6dd09adb7b
4
- data.tar.gz: bc009ad8ecd2fb85dda6ebad45488eaf7edfb29e
3
+ metadata.gz: b9c64ad4429d245aedfa3bc2242e32865873c1e3
4
+ data.tar.gz: da47e4ca7feb90acd55199d196b8b8c7a44e0aef
5
5
  SHA512:
6
- metadata.gz: bd010870c3de4d5d5b41ef0bff5ec959dae8583a6840881ea7efb86809ce49dc38193ff0a3cba64f8d9ccd7c6002975888ee467614f6ff1b02042059a36efff1
7
- data.tar.gz: 33b937c2beeadc388408ade3c2064978c712bc475a182e69c438c15e45df0adbbe990499862ab98ff4122c766065f3f6c80b215d80a6e29294ae2a483d430aaf
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 (default .)", default: "."
13
- o.string "-i", "--identity", "Location of the pem file to sign with."
14
- o.string "-o", "--output", "Location of the output file (defaults 'extension.crx')", default: "extension.crx"
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
- fail("No identity file specified") unless opts[:identity]
27
-
28
- Extensionator.create(opts[:directory],
29
- opts[:identity],
30
- opts[:output],
31
- exclude: opts[:exclude] ? Regexp.new(opts[:exclude]) : nil)
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.5"
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
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: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Cambron