simctl 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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/simctl.rb +0 -11
- data/lib/simctl/device_settings.rb +9 -3
- data/lib/simctl/version.rb +1 -1
- metadata +1 -2
- data/lib/simctl/helper.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bdc998a600a6d6fd3061c51c856e1ae06b14ca8
|
4
|
+
data.tar.gz: 8547d49764806e85eaabd8fb005d1006967a0b52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ae1446d24e47f8e76ff7bc0d7cbf333649c78353ca87a5413331246226f18adf4d569611f3478e8bd1481d8748f3db7ec5a38a0e009da27e03e357aa73725e8
|
7
|
+
data.tar.gz: 3f3a2c148cf03e84d00642745346b8a23239fc1c60a07af6087f42c87244b2ecdab93e902b3885ec98f6932b87dea8069da8d28fc96485cc247738dfcc351c64
|
data/Gemfile.lock
CHANGED
data/lib/simctl.rb
CHANGED
@@ -1,27 +1,16 @@
|
|
1
1
|
require 'simctl/command'
|
2
2
|
require 'simctl/device'
|
3
3
|
require 'simctl/device_type'
|
4
|
-
require 'simctl/helper'
|
5
4
|
require 'simctl/list'
|
6
5
|
require 'simctl/runtime'
|
7
6
|
|
8
7
|
module SimCtl
|
9
8
|
class << self
|
10
|
-
include Helper
|
11
|
-
|
12
9
|
def command
|
13
10
|
return @command if defined?(@command)
|
14
11
|
@command = SimCtl::Command.new
|
15
12
|
end
|
16
13
|
|
17
|
-
# Edit `Library/Preferences/com.apple.iphonesimulator.plist`
|
18
|
-
#
|
19
|
-
# @return [void]
|
20
|
-
# @yield [Hash] The hash of the preferences plist. Modifications will be written to the file.
|
21
|
-
def edit_iphonesimulator_plist(&block)
|
22
|
-
edit_plist(File.join(ENV['HOME'], 'Library/Preferences/com.apple.iphonesimulator.plist'), &block)
|
23
|
-
end
|
24
|
-
|
25
14
|
private
|
26
15
|
|
27
16
|
def respond_to_missing?(method_name, include_private=false)
|
@@ -1,9 +1,7 @@
|
|
1
|
-
require '
|
1
|
+
require 'cfpropertylist'
|
2
2
|
|
3
3
|
module SimCtl
|
4
4
|
class DeviceSettings
|
5
|
-
include SimCtl::Helper
|
6
|
-
|
7
5
|
attr_reader :path
|
8
6
|
|
9
7
|
def initialize(path)
|
@@ -31,6 +29,14 @@ module SimCtl
|
|
31
29
|
end
|
32
30
|
end
|
33
31
|
|
32
|
+
def edit_plist(path, &block)
|
33
|
+
plist = File.exists?(path) ? CFPropertyList::List.new(file: path) : CFPropertyList::List.new
|
34
|
+
content = CFPropertyList.native_types(plist.value) || {}
|
35
|
+
yield content
|
36
|
+
plist.value = CFPropertyList.guess(content)
|
37
|
+
plist.save(path, CFPropertyList::List::FORMAT_BINARY)
|
38
|
+
end
|
39
|
+
|
34
40
|
# Sets the device language
|
35
41
|
#
|
36
42
|
# @return [void]
|
data/lib/simctl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simctl
|
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
|
- Johannes Plunien
|
@@ -112,7 +112,6 @@ files:
|
|
112
112
|
- lib/simctl/device_settings.rb
|
113
113
|
- lib/simctl/device_type.rb
|
114
114
|
- lib/simctl/executor.rb
|
115
|
-
- lib/simctl/helper.rb
|
116
115
|
- lib/simctl/list.rb
|
117
116
|
- lib/simctl/object.rb
|
118
117
|
- lib/simctl/runtime.rb
|
data/lib/simctl/helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'cfpropertylist'
|
2
|
-
|
3
|
-
module SimCtl
|
4
|
-
module Helper
|
5
|
-
# Edit some plist
|
6
|
-
#
|
7
|
-
# @param [String] Path to the plist
|
8
|
-
# @return [void]
|
9
|
-
# @yield [Hash] The hash of the plist. Modifications will be written to the file.
|
10
|
-
def edit_plist(path, &block)
|
11
|
-
plist = File.exists?(path) ? CFPropertyList::List.new(file: path) : CFPropertyList::List.new
|
12
|
-
content = CFPropertyList.native_types(plist.value) || {}
|
13
|
-
yield content
|
14
|
-
plist.value = CFPropertyList.guess(content)
|
15
|
-
plist.save(path, CFPropertyList::List::FORMAT_BINARY)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|