xcoder 0.1.12 → 0.1.13

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.
@@ -0,0 +1,85 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ version = "1.3">
4
+ <BuildAction
5
+ parallelizeBuildables = "YES"
6
+ buildImplicitDependencies = "YES">
7
+ <BuildActionEntries>
8
+ <BuildActionEntry
9
+ buildForTesting = "YES"
10
+ buildForRunning = "YES"
11
+ buildForProfiling = "YES"
12
+ buildForArchiving = "YES"
13
+ buildForAnalyzing = "YES">
14
+ <BuildableReference
15
+ BuildableIdentifier = "primary"
16
+ BlueprintIdentifier = "7165D44F146B4EA100DE2F0E"
17
+ BuildableName = "TestProject.app"
18
+ BlueprintName = "TestProject"
19
+ ReferencedContainer = "container:TestProject/TestProject.xcodeproj">
20
+ </BuildableReference>
21
+ </BuildActionEntry>
22
+ </BuildActionEntries>
23
+ </BuildAction>
24
+ <TestAction
25
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
26
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
27
+ shouldUseLaunchSchemeArgsEnv = "YES"
28
+ buildConfiguration = "Debug">
29
+ <Testables>
30
+ </Testables>
31
+ <MacroExpansion>
32
+ <BuildableReference
33
+ BuildableIdentifier = "primary"
34
+ BlueprintIdentifier = "7165D44F146B4EA100DE2F0E"
35
+ BuildableName = "TestProject.app"
36
+ BlueprintName = "TestProject"
37
+ ReferencedContainer = "container:TestProject/TestProject.xcodeproj">
38
+ </BuildableReference>
39
+ </MacroExpansion>
40
+ </TestAction>
41
+ <LaunchAction
42
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
43
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
44
+ launchStyle = "0"
45
+ useCustomWorkingDirectory = "NO"
46
+ buildConfiguration = "Debug"
47
+ ignoresPersistentStateOnLaunch = "NO"
48
+ debugDocumentVersioning = "YES"
49
+ allowLocationSimulation = "YES">
50
+ <BuildableProductRunnable>
51
+ <BuildableReference
52
+ BuildableIdentifier = "primary"
53
+ BlueprintIdentifier = "7165D44F146B4EA100DE2F0E"
54
+ BuildableName = "TestProject.app"
55
+ BlueprintName = "TestProject"
56
+ ReferencedContainer = "container:TestProject/TestProject.xcodeproj">
57
+ </BuildableReference>
58
+ </BuildableProductRunnable>
59
+ <AdditionalOptions>
60
+ </AdditionalOptions>
61
+ </LaunchAction>
62
+ <ProfileAction
63
+ shouldUseLaunchSchemeArgsEnv = "YES"
64
+ savedToolIdentifier = ""
65
+ useCustomWorkingDirectory = "NO"
66
+ buildConfiguration = "Release"
67
+ debugDocumentVersioning = "YES">
68
+ <BuildableProductRunnable>
69
+ <BuildableReference
70
+ BuildableIdentifier = "primary"
71
+ BlueprintIdentifier = "7165D44F146B4EA100DE2F0E"
72
+ BuildableName = "TestProject.app"
73
+ BlueprintName = "TestProject"
74
+ ReferencedContainer = "container:TestProject/TestProject.xcodeproj">
75
+ </BuildableReference>
76
+ </BuildableProductRunnable>
77
+ </ProfileAction>
78
+ <AnalyzeAction
79
+ buildConfiguration = "Debug">
80
+ </AnalyzeAction>
81
+ <ArchiveAction
82
+ buildConfiguration = "Release"
83
+ revealArchiveInOrganizer = "YES">
84
+ </ArchiveAction>
85
+ </Scheme>
data/spec/builder_spec.rb CHANGED
@@ -156,10 +156,10 @@ describe Xcode::Builder do
156
156
  let(:default_build_parameters) do
157
157
  [ "xcodebuild",
158
158
  "-sdk iphoneos",
159
- "-project \"#{scheme.project.path}\"",
159
+ "-project \"#{scheme.launch.target.project.path}\"",
160
160
  "-scheme \"#{scheme.name}\"",
161
- "OBJROOT=\"#{File.dirname(scheme.project.path)}/build/\"",
162
- "SYMROOT=\"#{File.dirname(scheme.project.path)}/build/\"" ]
161
+ "OBJROOT=\"#{File.dirname(scheme.launch.target.project.path)}/build/\"",
162
+ "SYMROOT=\"#{File.dirname(scheme.launch.target.project.path)}/build/\"" ]
163
163
  end
164
164
 
165
165
  it "should build the project with the default parameters" do
@@ -173,11 +173,11 @@ describe Xcode::Builder do
173
173
 
174
174
  let(:default_clean_parameters) do
175
175
  [ "xcodebuild",
176
- "-project \"#{scheme.project.path}\"",
176
+ "-project \"#{scheme.launch.target.project.path}\"",
177
177
  "-sdk iphoneos",
178
178
  "-scheme \"#{scheme.name}\"",
179
- "OBJROOT=\"#{File.dirname(scheme.project.path)}/build/\"",
180
- "SYMROOT=\"#{File.dirname(scheme.project.path)}/build/\"",
179
+ "OBJROOT=\"#{File.dirname(scheme.launch.target.project.path)}/build/\"",
180
+ "SYMROOT=\"#{File.dirname(scheme.launch.target.project.path)}/build/\"",
181
181
  "clean" ]
182
182
  end
183
183
 
@@ -0,0 +1,47 @@
1
+ require_relative 'spec_helper'
2
+
3
+ describe Xcode::PLUTILProjectParser do
4
+
5
+ let(:subject) { Xcode::PLUTILProjectParser }
6
+
7
+ describe "#parse" do
8
+
9
+ context "when the file exists" do
10
+
11
+ let(:project_filet_that_exists) { "A Project File That Exists" }
12
+
13
+ it "should return the parsed content" do
14
+
15
+ subject.should_receive(:open_project_file).with(project_filet_that_exists).and_return(:raw_content)
16
+
17
+ Plist.should_receive(:parse_xml).with(:raw_content).and_return(:valid_content)
18
+
19
+ subject.parse(project_filet_that_exists).should eq(:valid_content)
20
+
21
+
22
+ end
23
+ end
24
+
25
+ context "when the file does not exist" do
26
+
27
+ let(:project_file_does_not_exist) { "A Project File Does Not Exists" }
28
+
29
+ it "should raise an exception" do
30
+
31
+ subject.should_receive(:open_project_file).with(project_file_does_not_exist)
32
+
33
+ Plist.should_receive(:parse_xml).and_return(nil)
34
+
35
+ expect {
36
+
37
+ subject.parse(project_file_does_not_exist)
38
+
39
+ }.to raise_error
40
+
41
+
42
+ end
43
+ end
44
+
45
+ end
46
+
47
+ end
@@ -0,0 +1 @@
1
+ require_relative '../spec_helper'
data/spec/scheme_spec.rb CHANGED
@@ -1,12 +1,50 @@
1
1
  require_relative 'spec_helper'
2
2
 
3
3
  describe Xcode::Scheme do
4
- before do
5
- @scheme = Xcode.project('TestProject').scheme('TestProject')
4
+ let :project do
5
+ Xcode.project 'TestProject'
6
6
  end
7
7
 
8
- it "should parse the name" do
9
- @scheme.name.should=="TestProject"
8
+ let :workspace do
9
+ Xcode.workspace 'TestWorkspace'
10
+ end
11
+
12
+ context "Project schemes" do
13
+ it "should parse project schemes" do
14
+ scheme = project.scheme('TestProject')
15
+ scheme.name.should=="TestProject"
16
+ scheme.launch.target.name.should == 'TestProject'
17
+ scheme.launch.target.project.name.should == 'TestProject'
18
+ end
19
+
20
+ it "should return an array of schemes" do
21
+ project.schemes.size.should == 6
22
+ end
23
+
24
+ it "should complain that no such scheme exists" do
25
+ lambda do
26
+ project.scheme('BadScheme')
27
+ end.should raise_error
28
+ end
29
+ end
30
+
31
+ context "Workspace schemes" do
32
+ it "should complain that no such scheme exists" do
33
+ lambda do
34
+ workspace.scheme('BadScheme')
35
+ end.should raise_error
36
+ end
37
+
38
+ it "should return an array of schemes" do
39
+ workspace.schemes.size.should == 1
40
+ end
41
+
42
+ it "should parse workspace schemes" do
43
+ scheme = workspace.scheme('WorkspaceScheme')
44
+ scheme.name.should=="WorkspaceScheme"
45
+ scheme.launch.target.name.should == 'TestProject'
46
+ scheme.launch.target.project.name.should == 'TestProject'
47
+ end
10
48
  end
11
49
 
12
50
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcoder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-04-22 00:00:00.000000000Z
13
+ date: 2012-10-17 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
17
- requirement: &70102805249640 !ruby/object:Gem::Requirement
17
+ requirement: &70132747482960 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70102805249640
25
+ version_requirements: *70132747482960
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: plist
28
- requirement: &70102805249220 !ruby/object:Gem::Requirement
28
+ requirement: &70132747482540 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70102805249220
36
+ version_requirements: *70132747482540
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: nokogiri
39
- requirement: &70102805248800 !ruby/object:Gem::Requirement
39
+ requirement: &70132747482120 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70102805248800
47
+ version_requirements: *70132747482120
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: builder
50
- requirement: &70102805248380 !ruby/object:Gem::Requirement
50
+ requirement: &70132747481700 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *70102805248380
58
+ version_requirements: *70132747481700
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: rest-client
61
- requirement: &70102805247960 !ruby/object:Gem::Requirement
61
+ requirement: &70132747481280 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,14 +66,13 @@ dependencies:
66
66
  version: '0'
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *70102805247960
69
+ version_requirements: *70132747481280
70
70
  description: Provides a ruby based object-model for parsing project structures and
71
71
  invoking builds
72
72
  email:
73
73
  - ray@wirestorm.net
74
74
  - franklin.webber@gmail.com
75
- executables:
76
- - xcoder-build
75
+ executables: []
77
76
  extensions: []
78
77
  extra_rdoc_files: []
79
78
  files:
@@ -83,7 +82,6 @@ files:
83
82
  - Guardfile
84
83
  - README.md
85
84
  - Rakefile
86
- - bin/xcoder-build
87
85
  - lib/xcode/build_file.rb
88
86
  - lib/xcode/build_phase.rb
89
87
  - lib/xcode/builder.rb
@@ -157,9 +155,8 @@ files:
157
155
  - spec/TestProject/TestProject/en.lproj/InfoPlist.strings
158
156
  - spec/TestProject/TestProject/main.m
159
157
  - spec/TestWorkspace.xcworkspace/contents.xcworkspacedata
160
- - spec/TestWorkspace.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
158
+ - spec/TestWorkspace.xcworkspace/xcshareddata/xcschemes/WorkspaceScheme.xcscheme
161
159
  - spec/TestWorkspace2.xcworkspace/contents.xcworkspacedata
162
- - spec/TestWorkspace2.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
163
160
  - spec/build_phase_spec.rb
164
161
  - spec/builder_spec.rb
165
162
  - spec/configuration_list_spec.rb
@@ -172,6 +169,8 @@ files:
172
169
  - spec/integration/universal_framework_spec.rb
173
170
  - spec/keychain_spec.rb
174
171
  - spec/ocunit_parser_spec.rb
172
+ - spec/parsers/plutil_project_parser.rb
173
+ - spec/parsers/spec_helper.rb
175
174
  - spec/project_spec.rb
176
175
  - spec/provisioning_profile_spec.rb
177
176
  - spec/scheme_spec.rb
@@ -229,9 +228,8 @@ test_files:
229
228
  - spec/TestProject/TestProject/en.lproj/InfoPlist.strings
230
229
  - spec/TestProject/TestProject/main.m
231
230
  - spec/TestWorkspace.xcworkspace/contents.xcworkspacedata
232
- - spec/TestWorkspace.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
231
+ - spec/TestWorkspace.xcworkspace/xcshareddata/xcschemes/WorkspaceScheme.xcscheme
233
232
  - spec/TestWorkspace2.xcworkspace/contents.xcworkspacedata
234
- - spec/TestWorkspace2.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
235
233
  - spec/build_phase_spec.rb
236
234
  - spec/builder_spec.rb
237
235
  - spec/configuration_list_spec.rb
@@ -244,6 +242,8 @@ test_files:
244
242
  - spec/integration/universal_framework_spec.rb
245
243
  - spec/keychain_spec.rb
246
244
  - spec/ocunit_parser_spec.rb
245
+ - spec/parsers/plutil_project_parser.rb
246
+ - spec/parsers/spec_helper.rb
247
247
  - spec/project_spec.rb
248
248
  - spec/provisioning_profile_spec.rb
249
249
  - spec/scheme_spec.rb
data/bin/xcoder-build DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'xcoder'
4
-
5
- dir = ARGV[0]||'.'
6
-
7
- bc = Xcode::Buildfile.load("#{dir}/Buildfile")
8
- bc.build