ios_config 1.2.3 → 1.3.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.
- data/README.md +19 -0
- data/lib/ios_config/payload/custom.rb +24 -0
- data/lib/ios_config/version.rb +1 -1
- data/lib/ios_config.rb +1 -0
- metadata +5 -4
data/README.md
CHANGED
@@ -209,6 +209,25 @@ proxy_password
|
|
209
209
|
proxy_url
|
210
210
|
```
|
211
211
|
|
212
|
+
### Custom Payloads
|
213
|
+
|
214
|
+
If you need to create a payload that isn't supported by the library, you can do so using the `IOSConfig::Payload::Custom` class.
|
215
|
+
|
216
|
+
The construction of this payload is similar to the ready-made ones with two exceptions: You must specify the payload type and the actual structure of the payload.
|
217
|
+
|
218
|
+
Example:
|
219
|
+
|
220
|
+
```ruby
|
221
|
+
payload = IOSConfig::Payload::Custom.new(payload_type: 'com.apple.app.lock', payload: { 'App' => { 'Identifier' => 'com.spotify.client' } } ).build
|
222
|
+
```
|
223
|
+
|
224
|
+
Available parameters:
|
225
|
+
|
226
|
+
```ruby
|
227
|
+
payload_type # string
|
228
|
+
payload_version # integer, defaults to 1
|
229
|
+
payload # hash of payload structure
|
230
|
+
```
|
212
231
|
|
213
232
|
## Contributing
|
214
233
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module IOSConfig
|
2
|
+
module Payload
|
3
|
+
class Custom < Base
|
4
|
+
|
5
|
+
attr_accessor :payload_type, :payload_version, :payload
|
6
|
+
|
7
|
+
def initialize(attributes = {})
|
8
|
+
attributes ||= {}
|
9
|
+
[:payload_type, :payload].each do |attribute|
|
10
|
+
raise ArgumentError, "#{attribute} must be specified" unless attributes[attribute]
|
11
|
+
end
|
12
|
+
|
13
|
+
super(attributes)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def payload_version
|
19
|
+
@payload_version || super
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/ios_config/version.rb
CHANGED
data/lib/ios_config.rb
CHANGED
@@ -4,6 +4,7 @@ require 'ios_config/profile'
|
|
4
4
|
require 'ios_config/payload/base'
|
5
5
|
require 'ios_config/payload/air_play'
|
6
6
|
require 'ios_config/payload/air_print'
|
7
|
+
require 'ios_config/payload/custom'
|
7
8
|
require 'ios_config/payload/single_sign_on_account'
|
8
9
|
require 'ios_config/payload/vpn'
|
9
10
|
require 'ios_config/payload/wi_fi'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ios_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: CFPropertyList
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- lib/ios_config/payload/air_play.rb
|
78
78
|
- lib/ios_config/payload/air_print.rb
|
79
79
|
- lib/ios_config/payload/base.rb
|
80
|
+
- lib/ios_config/payload/custom.rb
|
80
81
|
- lib/ios_config/payload/single_sign_on_account.rb
|
81
82
|
- lib/ios_config/payload/vpn.rb
|
82
83
|
- lib/ios_config/payload/wi_fi.rb
|
@@ -97,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
98
|
version: '0'
|
98
99
|
segments:
|
99
100
|
- 0
|
100
|
-
hash:
|
101
|
+
hash: 4043779232017033479
|
101
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
103
|
none: false
|
103
104
|
requirements:
|
@@ -106,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
107
|
version: '0'
|
107
108
|
segments:
|
108
109
|
- 0
|
109
|
-
hash:
|
110
|
+
hash: 4043779232017033479
|
110
111
|
requirements: []
|
111
112
|
rubyforge_project:
|
112
113
|
rubygems_version: 1.8.24
|