ios_dev_tools 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ios_dev_tools/commands/tool.rb +13 -4
- data/lib/ios_dev_tools/version.rb +1 -1
- data/test/test_info_plist.rb +1 -1
- data/test/test_tool.rb +55 -0
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ec708e204a721542a3a07e0ee09d61a04d57ce0
|
4
|
+
data.tar.gz: 06a131b769c876384ef856e4d166075afb14d74e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f80eec350351adab1ac3e65c3b2d78e22d2500415fffa2714be8f8b9c0399d75bbd65121427fb35e2c4bd65c3b8b1ced9aa683500fb4658aac399e4e6b98b06
|
7
|
+
data.tar.gz: 0478ae39e36761749a4ab00bd68e9987a00556ada459c24e1f009fefb7ce69a3f1ee8af95c2b765c0e669f058d02788b2ae37e02e353362a1fdbed1c2a526974
|
@@ -41,17 +41,26 @@ module IOSDevTools
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def self.command_name_to_class command_name
|
44
|
-
|
45
|
-
|
44
|
+
|
45
|
+
class_name=command_name_to_class_name command_name
|
46
|
+
|
46
47
|
# create class definition
|
47
48
|
command_class=nil
|
48
49
|
begin
|
49
|
-
command_class=
|
50
|
-
rescue NameError
|
50
|
+
command_class=IOSDevTools.const_get(class_name)
|
51
|
+
rescue NameError
|
52
|
+
#puts "Can't access class #{class_name}"
|
51
53
|
end
|
52
54
|
return command_class
|
53
55
|
end
|
54
56
|
|
57
|
+
def self.command_name_to_class_name command_name
|
58
|
+
|
59
|
+
result=command_name.split("_").map{|e| e[0]=e[0].chr.upcase; e;}.join
|
60
|
+
result
|
61
|
+
|
62
|
+
end
|
63
|
+
|
55
64
|
def self.parse_options(args)
|
56
65
|
|
57
66
|
options = Hash.new
|
data/test/test_info_plist.rb
CHANGED
data/test/test_tool.rb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'ios_dev_tools'
|
3
|
+
|
4
|
+
class ToolTest < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def test_simple_command_name_to_class_name
|
7
|
+
|
8
|
+
result=IOSDevTools::Tool.command_name_to_class_name "command"
|
9
|
+
assert_equal "Command", result
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_snake_command_name_to_class_name
|
14
|
+
|
15
|
+
result=IOSDevTools::Tool.command_name_to_class_name "snake_command"
|
16
|
+
assert_equal "SnakeCommand", result
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_command_name_to_class
|
21
|
+
|
22
|
+
result=IOSDevTools::Tool.command_name_to_class "sign"
|
23
|
+
assert_not_nil result
|
24
|
+
assert_equal IOSDevTools::Sign.class, result.class
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_invalid_command_name_to_class
|
29
|
+
|
30
|
+
result=IOSDevTools::Tool.command_name_to_class "invalid"
|
31
|
+
assert_nil result
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_create_with_app_folder
|
36
|
+
|
37
|
+
app_bundle=IOSDevTools::ApplicationBundle.new "test_resources/DummyApp.app"
|
38
|
+
|
39
|
+
assert_not_nil app_bundle
|
40
|
+
info_plist=app_bundle.info_plist
|
41
|
+
assert_not_nil info_plist
|
42
|
+
assert_equal "Dummy Bundle", app_bundle.info_plist.display_name
|
43
|
+
assert_equal "com.csquirrel.dummy.bundle", app_bundle.info_plist.bundle_id
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_create_with_not_existing_folder
|
48
|
+
|
49
|
+
assert_raise RuntimeError do
|
50
|
+
IOSDevTools::ApplicationBundle.new "dummy_folder"
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ios_dev_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Maciukiewicz
|
@@ -17,6 +17,7 @@ executables:
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- bin/ios_tool
|
20
21
|
- lib/ios_dev_tools.rb
|
21
22
|
- lib/ios_dev_tools/commands/help.rb
|
22
23
|
- lib/ios_dev_tools/commands/pack.rb
|
@@ -30,7 +31,7 @@ files:
|
|
30
31
|
- test/test_application_bundle.rb
|
31
32
|
- test/test_info_plist.rb
|
32
33
|
- test/test_provisioning_profile.rb
|
33
|
-
-
|
34
|
+
- test/test_tool.rb
|
34
35
|
homepage: https://github.com/cSquirrel/ios-dev-tools
|
35
36
|
licenses:
|
36
37
|
- MIT
|
@@ -41,17 +42,17 @@ require_paths:
|
|
41
42
|
- lib
|
42
43
|
required_ruby_version: !ruby/object:Gem::Requirement
|
43
44
|
requirements:
|
44
|
-
- -
|
45
|
+
- - ">="
|
45
46
|
- !ruby/object:Gem::Version
|
46
47
|
version: '0'
|
47
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
49
|
requirements:
|
49
|
-
- -
|
50
|
+
- - ">="
|
50
51
|
- !ruby/object:Gem::Version
|
51
52
|
version: '0'
|
52
53
|
requirements: []
|
53
54
|
rubyforge_project: nowarning
|
54
|
-
rubygems_version: 2.0
|
55
|
+
rubygems_version: 2.2.0
|
55
56
|
signing_key:
|
56
57
|
specification_version: 4
|
57
58
|
summary: iOS Dev Tools
|
@@ -59,3 +60,4 @@ test_files:
|
|
59
60
|
- test/test_application_bundle.rb
|
60
61
|
- test/test_info_plist.rb
|
61
62
|
- test/test_provisioning_profile.rb
|
63
|
+
- test/test_tool.rb
|