xcoder 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/Gemfile +2 -1
  2. data/README.md +46 -5
  3. data/lib/xcode/builder.rb +21 -11
  4. data/lib/xcode/info_plist.rb +3 -3
  5. data/lib/xcode/project.rb +9 -2
  6. data/lib/xcode/scheme.rb +3 -0
  7. data/lib/xcode/version.rb +1 -1
  8. data/lib/xcode/workspace.rb +7 -0
  9. data/spec/TestProject/TestProject.xcodeproj/project.pbxproj +426 -0
  10. data/spec/TestProject/TestProject.xcodeproj/xcuserdata/ray.xcuserdatad/xcschemes/TestProject.xcscheme +94 -0
  11. data/spec/TestProject/TestProject.xcodeproj/xcuserdata/ray.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
  12. data/spec/TestProject/TestProject/AppDelegate.h +15 -0
  13. data/spec/TestProject/TestProject/AppDelegate.m +69 -0
  14. data/spec/TestProject/TestProject/TestProject-Info.plist +47 -0
  15. data/spec/TestProject/TestProject/TestProject-Prefix.pch +14 -0
  16. data/spec/TestProject/TestProject/en.lproj/InfoPlist.strings +2 -0
  17. data/spec/TestProject/TestProject/main.m +18 -0
  18. data/spec/TestProject/TestProjectTests/TestProjectTests-Info.plist +22 -0
  19. data/spec/TestProject/TestProjectTests/TestProjectTests.h +13 -0
  20. data/spec/TestProject/TestProjectTests/TestProjectTests.m +32 -0
  21. data/spec/TestProject/TestProjectTests/en.lproj/InfoPlist.strings +2 -0
  22. data/spec/TestProject/build/Debug-iphoneos/TestProject-Debug-1.0.dSYM.zip +0 -0
  23. data/spec/TestProject/build/Debug-iphoneos/TestProject-Debug-1.0.ipa +0 -0
  24. data/spec/TestProject/build/Debug-iphoneos/TestProject.app.dSYM/Contents/Info.plist +20 -0
  25. data/spec/TestProject/build/Debug-iphoneos/TestProject.app.dSYM/Contents/Resources/DWARF/TestProject +0 -0
  26. data/spec/TestProject/build/Debug-iphoneos/TestProject.app/Info.plist +0 -0
  27. data/spec/TestProject/build/Debug-iphoneos/TestProject.app/PkgInfo +1 -0
  28. data/spec/TestProject/build/Debug-iphoneos/TestProject.app/ResourceRules.plist +25 -0
  29. data/spec/TestProject/build/Debug-iphoneos/TestProject.app/TestProject +0 -0
  30. data/spec/TestProject/build/Debug-iphoneos/TestProject.app/_CodeSignature/CodeResources +40 -0
  31. data/spec/TestProject/build/Debug-iphoneos/TestProject.app/embedded.mobileprovision +0 -0
  32. data/spec/TestProject/build/Debug-iphoneos/TestProject.app/en.lproj/InfoPlist.strings +0 -0
  33. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/AppDelegate.d +3 -0
  34. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/AppDelegate.o +0 -0
  35. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/TestProject.LinkFileList +2 -0
  36. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/main.d +3 -0
  37. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/main.o +0 -0
  38. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-all-target-headers.hmap +0 -0
  39. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-generated-files.hmap +0 -0
  40. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-own-target-headers.hmap +0 -0
  41. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-project-headers.hmap +0 -0
  42. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject.dep +12 -0
  43. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject.hmap +0 -0
  44. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject.xcent +20 -0
  45. data/spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/build-state.dat +254 -0
  46. data/spec/TestWorkspace.xcworkspace/contents.xcworkspacedata +7 -0
  47. data/spec/TestWorkspace.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  48. data/spec/configuration_spec.rb +29 -0
  49. data/spec/project_spec.rb +43 -0
  50. data/spec/scheme_spec.rb +29 -0
  51. data/spec/target_spec.rb +25 -0
  52. data/spec/workspace_spec.rb +33 -0
  53. data/xcoder.gemspec +1 -0
  54. metadata +96 -8
@@ -0,0 +1,29 @@
1
+ require 'rspec'
2
+ require 'xcoder'
3
+
4
+ describe Xcode::Scheme do
5
+ before do
6
+ @scheme = Xcode.project('TestProject').scheme('TestProject')
7
+ end
8
+
9
+ it "should parse the name" do
10
+ @scheme.name.should=="TestProject"
11
+ end
12
+
13
+ it "should be able to build" do
14
+ builder = @scheme.builder
15
+ builder.clean
16
+ builder.build
17
+ File.exists?(builder.app_path).should==true
18
+ File.exists?(builder.dsym_path).should==true
19
+ end
20
+
21
+ it "should be able to package" do
22
+ builder = @scheme.builder
23
+ builder.clean
24
+ builder.build
25
+ builder.package
26
+ File.exists?(builder.dsym_zip_path).should==true
27
+ File.exists?(builder.ipa_path).should==true
28
+ end
29
+ end
@@ -0,0 +1,25 @@
1
+ require 'rspec'
2
+ require 'xcoder'
3
+
4
+ describe Xcode::Target do
5
+ before do
6
+ @target = Xcode.project('TestProject').target('TestProject')
7
+ end
8
+
9
+ it "should parse the name" do
10
+ @target.name.should=="TestProject"
11
+ @target.productName.should=="TestProject"
12
+ end
13
+
14
+ it "should return a list of configs" do
15
+ @target.configs.size.should==2
16
+ @target.configs[0].name.should=="Debug"
17
+ @target.configs[1].name.should=="Release"
18
+ end
19
+
20
+ it "should return the config by name" do
21
+ config = @target.config('Debug')
22
+ config.should_not be_nil
23
+ config.name.should=='Debug'
24
+ end
25
+ end
@@ -0,0 +1,33 @@
1
+ require 'rspec'
2
+ require 'xcoder'
3
+
4
+ describe Xcode::Workspace do
5
+ it "should enumerate all workspaces in current directory" do
6
+ workspaces = Xcode.workspaces
7
+ workspaces.size.should==1
8
+ workspaces.first.name.should=="TestWorkspace"
9
+ workspaces.first.projects.size.should==1
10
+ end
11
+
12
+ it "should fetch workspace by name" do
13
+ w = Xcode.workspace 'TestWorkspace'
14
+ w.should_not be_nil
15
+ end
16
+
17
+ it "should fetch workspace by name with extension and path" do
18
+ w = Xcode.workspace "#{File.dirname(__FILE__)}/TestWorkspace.xcworkspace"
19
+ w.should_not be_nil
20
+ end
21
+
22
+ it "should have many projects" do
23
+ w = Xcode.workspace "TestWorkspace"
24
+ w.projects.size.should==1
25
+ w.projects.first.name.should=="TestProject"
26
+ end
27
+
28
+ it "should get project by name" do
29
+ w = Xcode.workspace "TestWorkspace"
30
+ p = w.project 'TestProject'
31
+ p.name.should=="TestProject"
32
+ end
33
+ end
data/xcoder.gemspec CHANGED
@@ -21,4 +21,5 @@ Gem::Specification.new do |s|
21
21
  s.add_runtime_dependency "json"
22
22
  s.add_runtime_dependency "plist"
23
23
  s.add_runtime_dependency "nokogiri"
24
+
24
25
  end
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.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70260671242760 !ruby/object:Gem::Requirement
16
+ requirement: &70114428289880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70260671242760
24
+ version_requirements: *70114428289880
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: plist
27
- requirement: &70260671242340 !ruby/object:Gem::Requirement
27
+ requirement: &70114428289460 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70260671242340
35
+ version_requirements: *70114428289460
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: nokogiri
38
- requirement: &70260671241920 !ruby/object:Gem::Requirement
38
+ requirement: &70114428289040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70260671241920
46
+ version_requirements: *70114428289040
47
47
  description: Provides a ruby based object-model for parsing project structures and
48
48
  invoking builds
49
49
  email:
@@ -69,6 +69,50 @@ files:
69
69
  - lib/xcode/version.rb
70
70
  - lib/xcode/workspace.rb
71
71
  - lib/xcoder.rb
72
+ - spec/TestProject/TestProject.xcodeproj/project.pbxproj
73
+ - spec/TestProject/TestProject.xcodeproj/xcuserdata/ray.xcuserdatad/xcschemes/TestProject.xcscheme
74
+ - spec/TestProject/TestProject.xcodeproj/xcuserdata/ray.xcuserdatad/xcschemes/xcschememanagement.plist
75
+ - spec/TestProject/TestProject/AppDelegate.h
76
+ - spec/TestProject/TestProject/AppDelegate.m
77
+ - spec/TestProject/TestProject/TestProject-Info.plist
78
+ - spec/TestProject/TestProject/TestProject-Prefix.pch
79
+ - spec/TestProject/TestProject/en.lproj/InfoPlist.strings
80
+ - spec/TestProject/TestProject/main.m
81
+ - spec/TestProject/TestProjectTests/TestProjectTests-Info.plist
82
+ - spec/TestProject/TestProjectTests/TestProjectTests.h
83
+ - spec/TestProject/TestProjectTests/TestProjectTests.m
84
+ - spec/TestProject/TestProjectTests/en.lproj/InfoPlist.strings
85
+ - spec/TestProject/build/Debug-iphoneos/TestProject-Debug-1.0.dSYM.zip
86
+ - spec/TestProject/build/Debug-iphoneos/TestProject-Debug-1.0.ipa
87
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app.dSYM/Contents/Info.plist
88
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app.dSYM/Contents/Resources/DWARF/TestProject
89
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/Info.plist
90
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/PkgInfo
91
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/ResourceRules.plist
92
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/TestProject
93
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/_CodeSignature/CodeResources
94
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/embedded.mobileprovision
95
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/en.lproj/InfoPlist.strings
96
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/AppDelegate.d
97
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/AppDelegate.o
98
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/TestProject.LinkFileList
99
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/main.d
100
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/main.o
101
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-all-target-headers.hmap
102
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-generated-files.hmap
103
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-own-target-headers.hmap
104
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-project-headers.hmap
105
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject.dep
106
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject.hmap
107
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject.xcent
108
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/build-state.dat
109
+ - spec/TestWorkspace.xcworkspace/contents.xcworkspacedata
110
+ - spec/TestWorkspace.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
111
+ - spec/configuration_spec.rb
112
+ - spec/project_spec.rb
113
+ - spec/scheme_spec.rb
114
+ - spec/target_spec.rb
115
+ - spec/workspace_spec.rb
72
116
  - xcoder.gemspec
73
117
  homepage: https://github.com/rayh/xcoder
74
118
  licenses: []
@@ -94,4 +138,48 @@ rubygems_version: 1.8.6
94
138
  signing_key:
95
139
  specification_version: 3
96
140
  summary: Ruby wrapper around xcodebuild, xcrun, agvtool and pbxproj files
97
- test_files: []
141
+ test_files:
142
+ - spec/TestProject/TestProject.xcodeproj/project.pbxproj
143
+ - spec/TestProject/TestProject.xcodeproj/xcuserdata/ray.xcuserdatad/xcschemes/TestProject.xcscheme
144
+ - spec/TestProject/TestProject.xcodeproj/xcuserdata/ray.xcuserdatad/xcschemes/xcschememanagement.plist
145
+ - spec/TestProject/TestProject/AppDelegate.h
146
+ - spec/TestProject/TestProject/AppDelegate.m
147
+ - spec/TestProject/TestProject/TestProject-Info.plist
148
+ - spec/TestProject/TestProject/TestProject-Prefix.pch
149
+ - spec/TestProject/TestProject/en.lproj/InfoPlist.strings
150
+ - spec/TestProject/TestProject/main.m
151
+ - spec/TestProject/TestProjectTests/TestProjectTests-Info.plist
152
+ - spec/TestProject/TestProjectTests/TestProjectTests.h
153
+ - spec/TestProject/TestProjectTests/TestProjectTests.m
154
+ - spec/TestProject/TestProjectTests/en.lproj/InfoPlist.strings
155
+ - spec/TestProject/build/Debug-iphoneos/TestProject-Debug-1.0.dSYM.zip
156
+ - spec/TestProject/build/Debug-iphoneos/TestProject-Debug-1.0.ipa
157
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app.dSYM/Contents/Info.plist
158
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app.dSYM/Contents/Resources/DWARF/TestProject
159
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/Info.plist
160
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/PkgInfo
161
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/ResourceRules.plist
162
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/TestProject
163
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/_CodeSignature/CodeResources
164
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/embedded.mobileprovision
165
+ - spec/TestProject/build/Debug-iphoneos/TestProject.app/en.lproj/InfoPlist.strings
166
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/AppDelegate.d
167
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/AppDelegate.o
168
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/TestProject.LinkFileList
169
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/main.d
170
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/Objects-normal/armv7/main.o
171
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-all-target-headers.hmap
172
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-generated-files.hmap
173
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-own-target-headers.hmap
174
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject-project-headers.hmap
175
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject.dep
176
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject.hmap
177
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/TestProject.xcent
178
+ - spec/TestProject/build/TestProject.build/Debug-iphoneos/TestProject.build/build-state.dat
179
+ - spec/TestWorkspace.xcworkspace/contents.xcworkspacedata
180
+ - spec/TestWorkspace.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate
181
+ - spec/configuration_spec.rb
182
+ - spec/project_spec.rb
183
+ - spec/scheme_spec.rb
184
+ - spec/target_spec.rb
185
+ - spec/workspace_spec.rb