ios_config_profile 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.drone.yml +29 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -1
- data/README.md +7 -7
- data/ios_config_profile.gemspec +9 -9
- data/lib/ios_config_profile/base.rb +6 -4
- data/lib/ios_config_profile/version.rb +1 -1
- data/spec/base_spec.rb +13 -13
- data/spec/device/vpn_payload_spec.rb +2 -2
- data/spec/encrypted_payload_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 889636415cef851431c9077a6ce5bfc63041c29133bc1100a39d644a75b703ce
|
4
|
+
data.tar.gz: 55faa37cb10608d82b5102aed60c2c486dd3c6a90434c1081ea535ab55a0e649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f91a65823f624a2f61e0e4d977ba8d7ea98361852bd7da74e5e860ae9190b0b810f7e4881f0651c12bbb8338111801697e79aa0255f2c5ddf6a7c974fbefad96
|
7
|
+
data.tar.gz: f90dfb0b9f27be10f6b2aa2de2d30a6239e07913c2986042adce644abf51f6322b57200dc300a8c0943afd923ca27320f6706a07319c06123312e9299f91ffe7
|
data/.drone.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
kind: pipeline
|
2
|
+
type: docker
|
3
|
+
name: test
|
4
|
+
|
5
|
+
steps:
|
6
|
+
- name: Test Ruby
|
7
|
+
image: ruby:3.0.1
|
8
|
+
commands:
|
9
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > "${HOME}/bin/cc-test-reporter"
|
10
|
+
- chmod +x "${HOME}/bin/cc-test-reporter"
|
11
|
+
- bundle -v
|
12
|
+
- bundle install
|
13
|
+
- cc-test-reporter before-build
|
14
|
+
- bundle exec rake
|
15
|
+
- cc-test-reporter after-build --exit-code $? -t simplecov
|
16
|
+
environment:
|
17
|
+
CC_TEST_REPORTER_ID: 7579537dde1ab4906da756393278a55e18ed1257f4ab6a235aa154fa718fc42a
|
18
|
+
|
19
|
+
- name: Upload to RubyGems
|
20
|
+
image: ruby:3.0.1
|
21
|
+
commands:
|
22
|
+
- gem build ios_config_profile.gemspec
|
23
|
+
- gem push -V *.gem
|
24
|
+
environment:
|
25
|
+
GEM_HOST_API_KEY:
|
26
|
+
from_secret: RUBYGEMS_API_KEY
|
27
|
+
when:
|
28
|
+
event:
|
29
|
+
- tag
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem "ios-cert-enrollment", git: "https://github.com/
|
3
|
+
gem "ios-cert-enrollment", git: "https://github.com/albertyw/ios-cert-enrollment"
|
4
4
|
# Specify your gem's dependencies in ios_config_profile.gemspec
|
5
5
|
gemspec
|
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# IOSConfigProfile
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/ios_config_profile.svg)](https://badge.fury.io/rb/ios_config_profile)
|
4
|
-
[
|
5
|
-
[![Dependency Status](https://
|
6
|
-
[![Code Climate](https://codeclimate.com/github/
|
7
|
-
[![Test Coverage](https://codeclimate.com/github/
|
8
|
-
[![security](https://hakiri.io/github/
|
4
|
+
[![Build Status](https://drone.albertyw.com/api/badges/albertyw/ios_config_profile/status.svg)](https://drone.albertyw.com/albertyw/ios_config_profile)
|
5
|
+
[![Dependency Status](https://img.shields.io/librariesio/release/rubygems/ios_config_profile.svg)](https://libraries.io/rubygems/ios_config_profile)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/albertyw/ios_config_profile/badges/gpa.svg)](https://codeclimate.com/github/albertyw/ios_config_profile)
|
7
|
+
[![Test Coverage](https://codeclimate.com/github/albertyw/ios_config_profile/badges/coverage.svg)](https://codeclimate.com/github/albertyw/ios_config_profile/coverage)
|
8
|
+
[![security](https://hakiri.io/github/albertyw/ios_config_profile/master.svg)](https://hakiri.io/github/albertyw/ios_config_profile/master)
|
9
9
|
|
10
10
|
Gem for creating and manipulating Apple Configuration Profiles and Mobile
|
11
11
|
Device Management (MDM) Protocols
|
@@ -15,12 +15,12 @@ Device Management (MDM) Protocols
|
|
15
15
|
Add this to your Gemfile
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
gem 'ios-cert-enrollment', git: 'https://github.com/
|
18
|
+
gem 'ios-cert-enrollment', git: 'https://github.com/albertyw/ios-cert-enrollment'
|
19
19
|
gem 'ios_config_profile'
|
20
20
|
```
|
21
21
|
|
22
22
|
This gem requires IOSCertEnrollment. The [rubygems version](https://rubygems.org/gems/ios-cert-enrollment) works
|
23
|
-
but it is highly recommended to use an [updated version](https://github.com/
|
23
|
+
but it is highly recommended to use an [updated version](https://github.com/albertyw/ios-cert-enrollment).
|
24
24
|
|
25
25
|
## Usage
|
26
26
|
|
data/ios_config_profile.gemspec
CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "ios_config_profile"
|
8
8
|
spec.version = IOSConfigProfile::VERSION
|
9
9
|
spec.authors = ["Albert Wang"]
|
10
|
-
spec.email = ["
|
10
|
+
spec.email = ["git@albertyw.com"]
|
11
11
|
spec.description = "Generate Apple iOS configuration profiles and payloads"
|
12
12
|
spec.summary = "This gem provides an easy way to generate configuration profiles for use with Apple iOS devices. These profiles and payloads can be delivered via Apple MDM, Apple's Configurator, or the iPhone Configuration Utility (IPCU)."
|
13
|
-
spec.homepage = "https://github.com/
|
13
|
+
spec.homepage = "https://github.com/albertyw/ios_config_profile"
|
14
14
|
spec.license = "AGPL-3.0"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -18,11 +18,11 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "CFPropertyList", "~>
|
22
|
-
spec.add_dependency "plist", "~> 3.
|
23
|
-
spec.add_development_dependency "bundler", "~>
|
24
|
-
spec.add_development_dependency "rake", "~>
|
25
|
-
spec.add_development_dependency "rspec", "~> 3.
|
26
|
-
spec.add_development_dependency "rspec-its", "~> 1.
|
27
|
-
spec.add_development_dependency "
|
21
|
+
spec.add_dependency "CFPropertyList", "~> 3.0"
|
22
|
+
spec.add_dependency "plist", "~> 3.6"
|
23
|
+
spec.add_development_dependency "bundler", "~> 2.2"
|
24
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
25
|
+
spec.add_development_dependency "rspec", "~> 3.10"
|
26
|
+
spec.add_development_dependency "rspec-its", "~> 1.3"
|
27
|
+
spec.add_development_dependency "simplecov", "~> 0.21"
|
28
28
|
end
|
@@ -1,18 +1,20 @@
|
|
1
1
|
module IOSConfigProfile
|
2
|
-
@@root_domain =
|
2
|
+
@@root_domain = "com.cellabus"
|
3
3
|
|
4
|
-
def self.root_domain=
|
4
|
+
def self.root_domain=(x)
|
5
5
|
@@root_domain = x
|
6
6
|
end
|
7
|
+
|
7
8
|
def self.root_domain
|
8
9
|
@@root_domain
|
9
10
|
end
|
10
11
|
|
11
|
-
@@organization =
|
12
|
+
@@organization = "Cellabus, Inc."
|
12
13
|
|
13
|
-
def self.organization=
|
14
|
+
def self.organization=(x)
|
14
15
|
@@organization = x
|
15
16
|
end
|
17
|
+
|
16
18
|
def self.organization
|
17
19
|
@@organization
|
18
20
|
end
|
data/spec/base_spec.rb
CHANGED
@@ -1,33 +1,33 @@
|
|
1
|
-
require
|
1
|
+
require "spec_helper"
|
2
2
|
|
3
3
|
describe IOSConfigProfile do
|
4
|
-
context
|
4
|
+
context "@@root_domain" do
|
5
5
|
after :all do
|
6
|
-
IOSConfigProfile.root_domain =
|
6
|
+
IOSConfigProfile.root_domain = "com.cellabus"
|
7
7
|
end
|
8
8
|
|
9
|
-
it
|
10
|
-
expect(IOSConfigProfile.root_domain).to eq
|
9
|
+
it "has a root domain" do
|
10
|
+
expect(IOSConfigProfile.root_domain).to eq "com.cellabus"
|
11
11
|
end
|
12
12
|
|
13
|
-
it
|
14
|
-
example =
|
13
|
+
it "can set a root_domain" do
|
14
|
+
example = "com.example"
|
15
15
|
IOSConfigProfile.root_domain = example
|
16
16
|
expect(IOSConfigProfile.root_domain).to eq example
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
context
|
20
|
+
context "@@organization" do
|
21
21
|
after :all do
|
22
|
-
IOSConfigProfile.organization =
|
22
|
+
IOSConfigProfile.organization = "Cellabus, Inc."
|
23
23
|
end
|
24
24
|
|
25
|
-
it
|
26
|
-
expect(IOSConfigProfile.organization).to eq
|
25
|
+
it "has an organization" do
|
26
|
+
expect(IOSConfigProfile.organization).to eq "Cellabus, Inc."
|
27
27
|
end
|
28
28
|
|
29
|
-
it
|
30
|
-
example =
|
29
|
+
it "can set an organization" do
|
30
|
+
example = "example"
|
31
31
|
IOSConfigProfile.organization = example
|
32
32
|
expect(IOSConfigProfile.organization).to eq example
|
33
33
|
end
|
@@ -46,7 +46,7 @@ describe IOSConfigProfile::VPNPayload do
|
|
46
46
|
end
|
47
47
|
it "calls appropriate function" do
|
48
48
|
expect(subject).to receive(:get_l2tp_config).and_return "asdf"
|
49
|
-
expect(subject.send
|
49
|
+
expect(subject.send(:get_vendor_config)).to eq "asdf"
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -67,7 +67,7 @@ describe IOSConfigProfile::VPNPayload do
|
|
67
67
|
it "returns the IPSec configuration" do
|
68
68
|
config = subject.send :get_ipsec_config
|
69
69
|
expect(config["RemoteAddress"]).to eq "asdf.com"
|
70
|
-
expect(config.include?
|
70
|
+
expect(config.include?("LocalIdentifier")).to be_falsey
|
71
71
|
end
|
72
72
|
it "adds in local identifier if using shared secret" do
|
73
73
|
subject.vpn_config[:authentication_method] = "SharedSecret"
|
@@ -20,7 +20,7 @@ describe IOSConfigProfile::EncryptedPayload do
|
|
20
20
|
expect(subject).to receive(:encrypt).with("cert").and_return(mock)
|
21
21
|
expect(mock).to receive(:certificate).and_return("asdf")
|
22
22
|
expect(subject).to receive(:configuration).and_return("encrypted_cert")
|
23
|
-
expect(subject.encrypted_configuration
|
23
|
+
expect(subject.encrypted_configuration("cert")).to eq "encrypted_cert"
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ios_config_profile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert Wang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: CFPropertyList
|
@@ -16,106 +16,107 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: plist
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
33
|
+
version: '3.6'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
40
|
+
version: '3.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
75
|
+
version: '3.10'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
82
|
+
version: '3.10'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec-its
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
89
|
+
version: '1.3'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
96
|
+
version: '1.3'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: simplecov
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0.
|
103
|
+
version: '0.21'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0.
|
110
|
+
version: '0.21'
|
111
111
|
description: Generate Apple iOS configuration profiles and payloads
|
112
112
|
email:
|
113
|
-
-
|
113
|
+
- git@albertyw.com
|
114
114
|
executables: []
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
118
|
- ".codeclimate.yml"
|
119
|
+
- ".drone.yml"
|
119
120
|
- ".gitignore"
|
120
121
|
- ".rspec"
|
121
122
|
- ".rubocop.yml"
|
@@ -186,7 +187,7 @@ files:
|
|
186
187
|
- spec/device/vpn_payload_spec.rb
|
187
188
|
- spec/encrypted_payload_spec.rb
|
188
189
|
- spec/spec_helper.rb
|
189
|
-
homepage: https://github.com/
|
190
|
+
homepage: https://github.com/albertyw/ios_config_profile
|
190
191
|
licenses:
|
191
192
|
- AGPL-3.0
|
192
193
|
metadata: {}
|
@@ -205,8 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
206
|
- !ruby/object:Gem::Version
|
206
207
|
version: '0'
|
207
208
|
requirements: []
|
208
|
-
|
209
|
-
rubygems_version: 2.5.1
|
209
|
+
rubygems_version: 3.2.15
|
210
210
|
signing_key:
|
211
211
|
specification_version: 4
|
212
212
|
summary: This gem provides an easy way to generate configuration profiles for use
|