agent_jones 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +13 -0
- data/Rakefile +2 -0
- data/agent_jones.gemspec +25 -0
- data/bin/agent_jones +4 -0
- data/lib/agent_jones.rb +53 -0
- data/lib/agent_jones/version.rb +3 -0
- metadata +96 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1e27d12fb1c603de13faeccdb1a52e9928a84eb0
|
4
|
+
data.tar.gz: db75f92316e90bc102805dc06a3b2d4c81fb2fec
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 564118f8c7a586c1d66fe141c0c666025de80a064f4816171da06a52d8d58928f51b77f7eb246492a61ffc77032b90892f19086225dbd16dc86161a7e1ca687c
|
7
|
+
data.tar.gz: c88a45d88eca02f7ac5d0cefede4cea3e9befaa79e1d8c1a074f7c67ce276221df11b8995c7d71df9d0b22cd93ed36853649cd4bd6d1b5114bc0b6bf1f41bd40
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Luca Querella
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Agent Jones
|
2
|
+
----
|
3
|
+
|
4
|
+
After the wild success of Agent Smith I'm happy to introduce Agent Jones.
|
5
|
+
It is a tiny small tool that allow you to import certificates for the iOS signing process fetching them from a repository
|
6
|
+
|
7
|
+
How to Install
|
8
|
+
----
|
9
|
+
|
10
|
+
```
|
11
|
+
gem install agent_jones
|
12
|
+
```
|
13
|
+
|
data/Rakefile
ADDED
data/agent_jones.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'agent_jones/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "agent_jones"
|
8
|
+
spec.version = AgentJones::VERSION
|
9
|
+
spec.authors = ["Luca Querella"]
|
10
|
+
spec.email = ["luca.querella@gmail.com"]
|
11
|
+
spec.summary = "Manage your organization iOS signing certificates."
|
12
|
+
spec.description = "A simple gem to fetch iOS signing certificates from a git repository"
|
13
|
+
|
14
|
+
spec.homepage = "https://github.com/BendingSpoons/agent-jones"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_dependency "thor", "~> 0.19.1"
|
25
|
+
end
|
data/bin/agent_jones
ADDED
data/lib/agent_jones.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
require "agent_jones/version"
|
2
|
+
require "thor"
|
3
|
+
require 'pathname'
|
4
|
+
|
5
|
+
module AgentJones
|
6
|
+
class CLI < ::Thor
|
7
|
+
|
8
|
+
option :repo, :required => true
|
9
|
+
option :password
|
10
|
+
option :temp_dir
|
11
|
+
option :keychain, :required => true
|
12
|
+
|
13
|
+
|
14
|
+
desc "import", "import certificates from a repository"
|
15
|
+
def import
|
16
|
+
|
17
|
+
passwords = {}
|
18
|
+
options[:password].split(',').each do |element|
|
19
|
+
components = element.split('=')
|
20
|
+
|
21
|
+
if components.count == 1
|
22
|
+
passwords['/'] = components.first
|
23
|
+
elsif components.count == 2
|
24
|
+
passwords[components.first] = components.last
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
passwords['/'] ||= ''
|
29
|
+
|
30
|
+
Dir.chdir (options[:temp_dir] || Dir.mktmpdir) do
|
31
|
+
|
32
|
+
system "git clone #{options[:repo]} repo &> /dev/null"
|
33
|
+
|
34
|
+
certificates = Dir["repo/**/**.{p12,cer}"]
|
35
|
+
puts "#{certificates.count} certificates found"
|
36
|
+
|
37
|
+
certificates.each do |certificate|
|
38
|
+
|
39
|
+
puts "installing #{certificate}..."
|
40
|
+
path = "/" + Pathname(certificate).each_filename.to_a[1..-2].join('/')
|
41
|
+
password = passwords[path] || passwords['/']
|
42
|
+
|
43
|
+
cmd = "security import #{certificate} -k #{options[:keychain]} -T /usr/bin/codesign"
|
44
|
+
cmd += " -P #{password}" if password.length > 0
|
45
|
+
|
46
|
+
system(cmd)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
metadata
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: agent_jones
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Luca Querella
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.19.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.19.1
|
55
|
+
description: A simple gem to fetch iOS signing certificates from a git repository
|
56
|
+
email:
|
57
|
+
- luca.querella@gmail.com
|
58
|
+
executables:
|
59
|
+
- agent_jones
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- .gitignore
|
64
|
+
- Gemfile
|
65
|
+
- LICENSE.txt
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- agent_jones.gemspec
|
69
|
+
- bin/agent_jones
|
70
|
+
- lib/agent_jones.rb
|
71
|
+
- lib/agent_jones/version.rb
|
72
|
+
homepage: https://github.com/BendingSpoons/agent-jones
|
73
|
+
licenses:
|
74
|
+
- MIT
|
75
|
+
metadata: {}
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options: []
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - '>='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
requirements: []
|
91
|
+
rubyforge_project:
|
92
|
+
rubygems_version: 2.1.11
|
93
|
+
signing_key:
|
94
|
+
specification_version: 4
|
95
|
+
summary: Manage your organization iOS signing certificates.
|
96
|
+
test_files: []
|