extensionator 0.0.2 → 0.0.3

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: 1ac98c3c64b6524dd08f0a50fe0248e3aea73de2
4
- data.tar.gz: d6966877565e304c44487f752590fa383c65f247
3
+ metadata.gz: 42a04fbc3eed08626aabe52ce9ef6983c638e2d3
4
+ data.tar.gz: ecdf117e02ad8e8d10e3e178974ad141b39893c9
5
5
  SHA512:
6
- metadata.gz: 523fd453f76791fce831db4682c6266aef652eccb1686831e3a04013133297fddbf1a8d8cc18f8fa5e0839f5ab0809ef0bd10bdaa3d6539328d9c3acd4d7da96
7
- data.tar.gz: 8c9c2078287b693b64cd002ee18e7ab57753df4608e3fcea88777603ed8f7ef430ba994e55dae93a4795ebc74fccb256ed07fdee6d9164f9d96b750ffb7f9dd1
6
+ metadata.gz: 414cd8b206239179bc03a3fa7ad0e1013ad50aab8e4261b46ce22c5ff866e7e6870deafbcd1ed27f07fae174558f2fd3778fbff83e01fcb6bc2e475cbeecdb09
7
+ data.tar.gz: 0612aabc13aba0c5f2da36143240562b31da4e2d9edec8327994f0e0475484ae723cdb61049ec8bd24336337ecd9f8d556aadb48fcf3932a9847c4befe44e382
data/README.md CHANGED
@@ -18,12 +18,26 @@ You'll also need a directory to package up. Extensionator doesn't pay any attent
18
18
 
19
19
  OK, ready:
20
20
 
21
- ```rb
22
- Extensionator.create("directory_with_extension", "key.pem", "output_file.crx")
21
+ ```
22
+ extensionator -d directory/with/extension -i key.pem -o output.crx
23
23
  ```
24
24
 
25
25
  You can also exclude files with a regex, which will be applied to each level of the path (so if you have `foo/bar/baz.stuff`, we compare the regex to "foo", "foo/bar", and "foo/bar/baz.stuff"):
26
26
 
27
+ ```
28
+ extensiotor -d directory/with/extension -i key.pem -o output.crx -e "\.md$"
29
+ ```
30
+
31
+ # Programmatically
32
+
33
+ Same as above, but:
34
+
35
+ ```rb
36
+ Extensionator.create("directory/with/extension", "key.pem", "output_file.crx")
37
+ ```
38
+
39
+ Or with an `exclude` option:
40
+
27
41
  ```rb
28
42
  Extensionator.create("dir", "key.pem", "output_file.crx", exclude: /\.md$/)
29
43
  ```
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/ruby
2
+
3
+ require "slop"
4
+
5
+ begin
6
+ require "extensionator"
7
+ rescue LoadError
8
+ require_relative "../lib/extensionator"
9
+ end
10
+
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
16
+ o.on "-v", "--version", "Extensionator version info." do
17
+ puts Extensionator::VERSION
18
+ exit
19
+ end
20
+ o.on "-h", "--help", "Print this message" do
21
+ puts o
22
+ exit
23
+ end
24
+ end
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)
@@ -3,18 +3,20 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "extensionator"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.add_dependency "rubyzip"
6
+ spec.add_dependency "rubyzip", "~> 1.0"
7
+ spec.add_dependency "slop", "~> 4.0"
7
8
  spec.add_development_dependency "bundler", "~> 1.0"
8
9
  spec.authors = ["Isaac Cambron"]
9
- spec.description = "A Ruby tool for packaging Chrome extensions"
10
- spec.email = ["isaac@isaaccambron.com"]
11
- spec.files = %w(README.md extensionator.gemspec) + Dir["lib/**/*.rb"]
10
+ spec.description = "A tool for packaging Chrome extensions"
11
+ spec.email = %w(isaac@isaaccambron.com)
12
+ spec.executables = %w(extensionator)
13
+ spec.files = %w(README.md extensionator.gemspec bin/extensionator) + Dir["lib/**/*.rb"]
12
14
  spec.homepage = "http://icambron.github.com/extensionator/"
13
15
  spec.licenses = %w(MIT)
14
16
  spec.name = "extensionator"
15
17
  spec.require_paths = %w(lib)
16
- spec.required_ruby_version = ">= 1.9.3"
18
+ spec.required_ruby_version = ">= 2.0.0"
17
19
  spec.required_rubygems_version = ">= 1.3.5"
18
- spec.summary = spec.description
20
+ spec.summary = "Build and sign Chrome extensions (.crx files), either from the command line or using a Ruby API."
19
21
  spec.version = Extensionator::VERSION
20
22
  end
@@ -5,7 +5,7 @@ require "pathname"
5
5
  require "zip"
6
6
 
7
7
  module Extensionator
8
- VERSION = "0.0.2"
8
+ VERSION = "0.0.3"
9
9
 
10
10
  def self.create(dir, key_file, dest_filename, opts = {})
11
11
  priv_key = read_key(key_file)
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extensionator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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-03-24 00:00:00.000000000 Z
11
+ date: 2015-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: slop
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: '0'
40
+ version: '4.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -38,14 +52,16 @@ dependencies:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
54
  version: '1.0'
41
- description: A Ruby tool for packaging Chrome extensions
55
+ description: A tool for packaging Chrome extensions
42
56
  email:
43
57
  - isaac@isaaccambron.com
44
- executables: []
58
+ executables:
59
+ - extensionator
45
60
  extensions: []
46
61
  extra_rdoc_files: []
47
62
  files:
48
63
  - README.md
64
+ - bin/extensionator
49
65
  - extensionator.gemspec
50
66
  - lib/extensionator.rb
51
67
  homepage: http://icambron.github.com/extensionator/
@@ -60,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
76
  requirements:
61
77
  - - ">="
62
78
  - !ruby/object:Gem::Version
63
- version: 1.9.3
79
+ version: 2.0.0
64
80
  required_rubygems_version: !ruby/object:Gem::Requirement
65
81
  requirements:
66
82
  - - ">="
@@ -71,5 +87,6 @@ rubyforge_project:
71
87
  rubygems_version: 2.2.2
72
88
  signing_key:
73
89
  specification_version: 4
74
- summary: A Ruby tool for packaging Chrome extensions
90
+ summary: Build and sign Chrome extensions (.crx files), either from the command line
91
+ or using a Ruby API.
75
92
  test_files: []