vendor 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/LICENSE +1 -1
- data/Readme.markdown +2 -1
- data/VERSION +1 -1
- data/lib/vendor/cli/app.rb +13 -17
- data/lib/vendor/spec.rb +244 -55
- data/lib/vendor/vendor_file/library/base.rb +43 -63
- data/lib/vendor/vendor_file/loader.rb +8 -0
- data/lib/vendor/vendor_spec/builder.rb +19 -8
- data/lib/vendor/xcode.rb +0 -1
- data/lib/vendor/xcode/project.rb +198 -469
- data/spec/lib/vendor/spec_spec.rb +34 -10
- data/spec/lib/vendor/vendor_file/library/base_spec.rb +41 -49
- data/spec/lib/vendor/vendor_spec/builder_spec.rb +26 -0
- data/spec/support/resources/cache/base/DKBenchmark-0.1-Manifest/vendor.json +1 -1
- data/spec/support/resources/cache/base/DKBenchmark-0.1-Vendorspec/DKBenchmark.vendorspec +2 -0
- data/spec/support/resources/vendors/DKBenchmark/DKBenchmark.vendorspec +2 -0
- data/spec/support/resources/vendors/DKBenchmarkFramework/DKBenchmark.framework/DKBenchmark +0 -0
- data/spec/support/resources/vendors/DKBenchmarkFramework/DKBenchmark.framework/Versions/A/DKBenchmark +0 -0
- data/spec/support/resources/vendors/DKBenchmarkFramework/DKBenchmark.framework/Versions/A/Headers/DKBenchmark.h +18 -0
- data/spec/support/resources/vendors/DKBenchmarkFramework/DKBenchmark.vendorspec +23 -0
- data/vendor.gemspec +1 -0
- metadata +111 -63
- data/lib/vendor/xcode/proxy.rb +0 -31
- data/lib/vendor/xcode/proxy/base.rb +0 -129
- data/lib/vendor/xcode/proxy/pbx_aggregate_target.rb +0 -11
- data/lib/vendor/xcode/proxy/pbx_build_file.rb +0 -9
- data/lib/vendor/xcode/proxy/pbx_container_item_proxy.rb +0 -8
- data/lib/vendor/xcode/proxy/pbx_file_reference.rb +0 -41
- data/lib/vendor/xcode/proxy/pbx_frameworks_build_phase.rb +0 -15
- data/lib/vendor/xcode/proxy/pbx_group.rb +0 -35
- data/lib/vendor/xcode/proxy/pbx_native_target.rb +0 -11
- data/lib/vendor/xcode/proxy/pbx_project.rb +0 -12
- data/lib/vendor/xcode/proxy/pbx_reference_proxy.rb +0 -7
- data/lib/vendor/xcode/proxy/pbx_resources_build_phase.rb +0 -15
- data/lib/vendor/xcode/proxy/pbx_shell_script_build_phase.rb +0 -15
- data/lib/vendor/xcode/proxy/pbx_sources_build_phase.rb +0 -15
- data/lib/vendor/xcode/proxy/pbx_target_dependency.rb +0 -7
- data/lib/vendor/xcode/proxy/pbx_variant_group.rb +0 -7
- data/lib/vendor/xcode/proxy/unknown.rb +0 -8
- data/lib/vendor/xcode/proxy/xc_build_configuration.rb +0 -7
- data/lib/vendor/xcode/proxy/xc_configuration_list.rb +0 -9
- data/lib/vendor/xcode/proxy/xc_version_group.rb +0 -7
- data/spec/lib/vendor/xcode/project_spec.rb +0 -635
- data/spec/lib/vendor/xcode/proxy/base_spec.rb +0 -88
- data/spec/lib/vendor/xcode/proxy/pbx_file_reference_spec.rb +0 -26
- data/spec/lib/vendor/xcode/proxy/pbx_group_spec.rb +0 -27
- data/spec/lib/vendor/xcode/proxy/pbx_project_spec.rb +0 -29
@@ -1,88 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Vendor::XCode::Proxy::Base do
|
4
|
-
|
5
|
-
before :all do
|
6
|
-
@project = Vendor::XCode::Project.new(File.join(PROJECT_RESOURCE_PATH, "ProjectWithSpecs/ProjectWithSpecs.xcodeproj"))
|
7
|
-
@pbx_project = @project.root_object
|
8
|
-
end
|
9
|
-
|
10
|
-
context "#inspect" do
|
11
|
-
|
12
|
-
it "should give you the attributes in the object" do
|
13
|
-
@pbx_project.build_configuration_list.inspect.should include("Vendor::XCode::Proxy::XCConfigurationList")
|
14
|
-
@pbx_project.build_configuration_list.inspect.should include("id: \"53787482140109AE00D9B746\"")
|
15
|
-
@pbx_project.build_configuration_list.inspect.should include("build_configurations: [\"53787484140109AE00D9B746\", \"53787485140109AE00D9B746\"]")
|
16
|
-
@pbx_project.build_configuration_list.inspect.should include("default_configuration_is_visible: \"0\"")
|
17
|
-
@pbx_project.build_configuration_list.inspect.should include("default_configuration_name: \"Release\"")
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
context "#attribute_name"do
|
23
|
-
|
24
|
-
it "should convert the attribute to the correct format used in the project file (camel case)" do
|
25
|
-
Vendor::XCode::Proxy::Base.attribute_name('build_config_list').should == "buildConfigList"
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
context "#respond_to?" do
|
31
|
-
|
32
|
-
it "should return true if it has the attribute" do
|
33
|
-
@pbx_project.respond_to?(:compatibility_version).should be_true
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should return false if the method isn't really there" do
|
37
|
-
@pbx_project.respond_to?(:blah).should be_false
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
41
|
-
|
42
|
-
context "#method_missing" do
|
43
|
-
|
44
|
-
it "should allow you to access attributes using an underscore case" do
|
45
|
-
@pbx_project.known_regions.should == [ "en" ]
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should allow you to set attributes using an underscore case" do
|
49
|
-
@pbx_project.known_regions = [ "fn" ]
|
50
|
-
|
51
|
-
@pbx_project.known_regions.should == [ "fn" ]
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
55
|
-
|
56
|
-
context "#write_attribute" do
|
57
|
-
|
58
|
-
it "should allow you to set existing attributes" do
|
59
|
-
@pbx_project.write_attribute('knownRegions', [ "en" ])
|
60
|
-
end
|
61
|
-
|
62
|
-
it "should allow symbols to be passed" do
|
63
|
-
@pbx_project.write_attribute(:knownRegions, [ "en" ])
|
64
|
-
end
|
65
|
-
|
66
|
-
after :each do
|
67
|
-
@pbx_project.known_regions.should == [ "en" ]
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
71
|
-
|
72
|
-
context "#read_attribute" do
|
73
|
-
|
74
|
-
before :each do
|
75
|
-
@pbx_project.known_regions = [ 'uk' ]
|
76
|
-
end
|
77
|
-
|
78
|
-
it "should allow you to read an attribute" do
|
79
|
-
@pbx_project.read_attribute('knownRegions').should == [ 'uk' ]
|
80
|
-
end
|
81
|
-
|
82
|
-
it 'should allow symbols to be used' do
|
83
|
-
@pbx_project.read_attribute(:knownRegions).should == [ 'uk' ]
|
84
|
-
end
|
85
|
-
|
86
|
-
end
|
87
|
-
|
88
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Vendor::XCode::Proxy::PBXFileReference do
|
4
|
-
|
5
|
-
describe "#file_type_from_extension" do
|
6
|
-
|
7
|
-
{ ".h" => "sourcecode.c.h",
|
8
|
-
".m" => "sourcecode.c.objc",
|
9
|
-
".c" => "sourcecode.c.c",
|
10
|
-
".bundle" => "wrapper.plug-in",
|
11
|
-
".framework" => "wrapper.framework",
|
12
|
-
".a" => "archive.ar",
|
13
|
-
".strings" => "text.plist.strings",
|
14
|
-
".plist" => "text.plist.xml",
|
15
|
-
".png" => "image.png",
|
16
|
-
".jpg" => "image.jpg" }.each do |key, value|
|
17
|
-
|
18
|
-
it "when passing #{key} should return #{value}" do
|
19
|
-
Vendor::XCode::Proxy::PBXFileReference.file_type_from_extension(key).should == value
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Vendor::XCode::Proxy::PBXGroup do
|
4
|
-
|
5
|
-
before :all do
|
6
|
-
@project = Vendor::XCode::Project.new(File.join(PROJECT_RESOURCE_PATH, "UtilityApplication/UtilityApplication.xcodeproj"))
|
7
|
-
|
8
|
-
@pbx_group = @project.find_group("UtilityApplication/Supporting Files")
|
9
|
-
end
|
10
|
-
|
11
|
-
describe "#parent" do
|
12
|
-
|
13
|
-
it "should return the parent of the group" do
|
14
|
-
@pbx_group.parent.should == @project.find_group("UtilityApplication")
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
describe "#full_path" do
|
20
|
-
|
21
|
-
it "should return the path of the group" do
|
22
|
-
@pbx_group.full_path.should == "UtilityApplication/Supporting Files"
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Vendor::XCode::Proxy::PBXProject do
|
4
|
-
|
5
|
-
before :all do
|
6
|
-
@project = Vendor::XCode::Project.new(File.join(PROJECT_RESOURCE_PATH, "ProjectWithSpecs/ProjectWithSpecs.xcodeproj"))
|
7
|
-
@pbx_project = @project.root_object
|
8
|
-
end
|
9
|
-
|
10
|
-
it "should reference the build configuration list" do
|
11
|
-
@pbx_project.build_configuration_list.should == @project.find_object('53787482140109AE00D9B746')
|
12
|
-
end
|
13
|
-
|
14
|
-
it "should reference the product reference group" do
|
15
|
-
@pbx_project.product_ref_group.should == @project.find_object('537874A014010A0A00D9B746')
|
16
|
-
end
|
17
|
-
|
18
|
-
it "should reference the main group" do
|
19
|
-
@pbx_project.main_group.should == @project.find_object('5378747D140109AE00D9B746')
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should reference the targets" do
|
23
|
-
@pbx_project.targets.should == [
|
24
|
-
@project.find_object("5378749E14010A0A00D9B746"),
|
25
|
-
@project.find_object("53BD73C714D0AF9A00E30313")
|
26
|
-
]
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|