provisinfo 0.1.1 → 0.1.2
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 +4 -4
- data/README.md +15 -4
- data/bin/provisinfo +7 -5
- data/lib/provisinfo/provisioning.rb +26 -9
- data/lib/provisinfo/version.rb +1 -1
- data/lib/provisinfo.rb +2 -3
- data/provisinfo.gemspec +1 -5
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d22528b09799941149d986289567291a08e13e7
|
4
|
+
data.tar.gz: 9ea6321928f50b94c3fd57b92aee37104e8019f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38c4ee23e7cc65358d6a16c21061d73887060716a5d414b56d33e8b94a4a9aa7d87ccd61c4ec6879a4d8d860c292d566effb993bb70e8264c52c4893395bf537
|
7
|
+
data.tar.gz: 2037140deecb00dbcb3731b148a86834c598524e8dac1e01e8d2348b127b5fa0b14e801c5ebc4746fd3e5c30b51fd14327cae0a661b237d9520c9770bf33a9cd
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Provisinfo
|
2
2
|
|
3
|
-
Welcome to provisinfo Gem! It a CLI tool to extract metadata information
|
3
|
+
Welcome to provisinfo Gem! It a CLI tool and a ruby library to extract metadata information (name, UUId, AppID, type) from binary .mobileprovision files (a kind of .plist file)
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -19,9 +19,20 @@ Or install it yourself as:
|
|
19
19
|
$ gem install provisinfo
|
20
20
|
|
21
21
|
## Usage
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
It can be used like a CLI client:
|
23
|
+
|
24
|
+
provisinfo info --filepath p1.mobileprovision
|
25
|
+
|
26
|
+
Or you can use in your code:
|
27
|
+
|
28
|
+
p1 = Provisioning.new('prov1.mobileprision')
|
29
|
+
#show human readable information
|
30
|
+
p1.show_info()
|
31
|
+
|
32
|
+
#access to any property
|
33
|
+
p1.appID
|
34
|
+
|
35
|
+
|
25
36
|
## Development
|
26
37
|
|
27
38
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/bin/provisinfo
CHANGED
@@ -5,16 +5,18 @@ require 'commander/import'
|
|
5
5
|
require 'provisinfo'
|
6
6
|
|
7
7
|
program :version, '0.0.1'
|
8
|
-
program :description, 'Provisioning for Human beings'
|
9
|
-
|
8
|
+
program :description, 'CLI for \'provisinfo\' - Provisioning for Human beings. Extracts info from .mobileprovision files.'
|
9
|
+
program :help, 'Author', 'Oswaldo Rubio <osrufung@gmail.com>'
|
10
|
+
program :help, 'GitHub', 'https://github.com/osrufung/provisinfo'
|
11
|
+
|
10
12
|
command :info do |c|
|
11
13
|
c.syntax = 'provisinfo info [options]'
|
12
14
|
c.summary = 'Extracts information from mobileprovision file'
|
13
|
-
c.description = ''
|
14
|
-
c.example 'description', '
|
15
|
+
c.description = 'Show user friendly information from mobileprovision file'
|
16
|
+
c.example 'description', 'provisinfo info --filename prov1.mobileprovision'
|
15
17
|
c.option '--filename STRING', 'String','.mobileprovision filepath'
|
16
18
|
c.action do |args, options|
|
17
19
|
# Do something or c.when_called Provisioning info::Commands::Name
|
18
|
-
Provisinfo.
|
20
|
+
Provisinfo.show_info(options.filename)
|
19
21
|
end
|
20
22
|
end
|
@@ -1,10 +1,12 @@
|
|
1
1
|
require 'plist'
|
2
|
+
require 'json'
|
2
3
|
|
3
4
|
class Provisioning
|
4
5
|
attr_accessor :name
|
5
6
|
attr_accessor :type
|
6
7
|
attr_accessor :uuid
|
7
|
-
attr_accessor
|
8
|
+
attr_accessor :appID
|
9
|
+
attr_accessor :teamID
|
8
10
|
attr_accessor :filename
|
9
11
|
|
10
12
|
#by default, it will load the first .mobileprovision file in current directory
|
@@ -16,20 +18,21 @@ class Provisioning
|
|
16
18
|
end
|
17
19
|
|
18
20
|
if @filename
|
19
|
-
self.load_from_file(
|
21
|
+
self.load_from_file()
|
20
22
|
else
|
21
23
|
@name ="Unknown"
|
22
24
|
end
|
23
25
|
|
24
26
|
end
|
25
27
|
|
26
|
-
def load_from_file(
|
27
|
-
@filename
|
28
|
-
|
29
|
-
|
28
|
+
def load_from_file()
|
29
|
+
xml_raw = `security cms -D -i #{@filename}`
|
30
|
+
xml_parsed = Plist::parse_xml(xml_raw)
|
31
|
+
@teamID = xml_parsed['Entitlements']['com.apple.developer.team-identifier']
|
30
32
|
@name = xml_parsed['Name']
|
31
|
-
@uuid = xml_parsed['UUID']
|
32
|
-
@appID = xml_parsed['application-identifier']
|
33
|
+
@uuid = xml_parsed['UUID']
|
34
|
+
@appID = xml_parsed['Entitlements']['application-identifier']
|
35
|
+
puts xml_parsed['application-identifier']
|
33
36
|
|
34
37
|
end
|
35
38
|
|
@@ -40,5 +43,19 @@ class Provisioning
|
|
40
43
|
end
|
41
44
|
provisioning_file_paths
|
42
45
|
end
|
46
|
+
|
47
|
+
def show_info()
|
48
|
+
puts "Name:"+self.name
|
49
|
+
puts "UUDID:"+self.uuid
|
50
|
+
puts "AppID:"+self.appID
|
51
|
+
puts "TeamID:"+self.teamID
|
52
|
+
|
53
|
+
end
|
54
|
+
|
43
55
|
end
|
44
|
-
|
56
|
+
|
57
|
+
|
58
|
+
if __FILE__ == $0
|
59
|
+
#p1 = Provisioning.new('failed.mobileprovision')
|
60
|
+
#p1.show_info()
|
61
|
+
end
|
data/lib/provisinfo/version.rb
CHANGED
data/lib/provisinfo.rb
CHANGED
@@ -2,9 +2,8 @@ require 'provisinfo/version'
|
|
2
2
|
require 'provisinfo/provisioning'
|
3
3
|
|
4
4
|
module Provisinfo
|
5
|
-
def self.
|
5
|
+
def self.show_info(provisioninFileName)
|
6
6
|
p1 = Provisioning.new(provisioninFileName)
|
7
|
-
|
8
|
-
puts "UUDID:"+p1.uuid
|
7
|
+
p1.show_info()
|
9
8
|
end
|
10
9
|
end
|
data/provisinfo.gemspec
CHANGED
@@ -15,11 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
|
16
16
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
17
17
|
# delete this section to allow pushing this gem to any host.
|
18
|
-
|
19
|
-
spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
20
|
-
else
|
21
|
-
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
22
|
-
end
|
18
|
+
|
23
19
|
|
24
20
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
21
|
spec.bindir = "bin"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: provisinfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oswaldo Rubio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,8 +88,7 @@ files:
|
|
88
88
|
- provisinfo.gemspec
|
89
89
|
homepage: https://github.com/osrufung/provisinfo
|
90
90
|
licenses: []
|
91
|
-
metadata:
|
92
|
-
allowed_push_host: 'TODO: Set to ''http://mygemserver.com'''
|
91
|
+
metadata: {}
|
93
92
|
post_install_message:
|
94
93
|
rdoc_options: []
|
95
94
|
require_paths:
|
@@ -106,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
105
|
version: '0'
|
107
106
|
requirements: []
|
108
107
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.4.6
|
110
109
|
signing_key:
|
111
110
|
specification_version: 4
|
112
111
|
summary: A provisioning profile CLI inspector
|