iut 0.1.3 → 0.2.0

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.
Files changed (36) hide show
  1. data/Gemfile +5 -0
  2. data/Rakefile +3 -0
  3. data/iut.gemspec +1 -1
  4. data/lib/iut/arc.rb +125 -0
  5. data/lib/iut/generator.rb +1 -1
  6. data/lib/iut/template_version.rb +1 -1
  7. data/lib/iut/version.rb +2 -2
  8. data/lib/iut.rb +32 -7
  9. data/test/files/IUTTest/IUTTest/AppDelegate.h +15 -0
  10. data/test/files/IUTTest/IUTTest/AppDelegate.m +69 -0
  11. data/test/files/IUTTest/IUTTest/Arc.h +13 -0
  12. data/test/files/IUTTest/IUTTest/Arc.m +13 -0
  13. data/test/files/IUTTest/IUTTest/ArcWithRetainInComment.h +17 -0
  14. data/test/files/IUTTest/IUTTest/ArcWithRetainInComment.m +28 -0
  15. data/test/files/IUTTest/IUTTest/IUTTest-Info.plist +40 -0
  16. data/test/files/IUTTest/IUTTest/IUTTest-Prefix.pch +14 -0
  17. data/test/files/IUTTest/IUTTest/LooksArcButSuperDoesNotUse.h +14 -0
  18. data/test/files/IUTTest/IUTTest/LooksArcButSuperDoesNotUse.m +13 -0
  19. data/test/files/IUTTest/IUTTest/NonArcCaseDealloc.h +13 -0
  20. data/test/files/IUTTest/IUTTest/NonArcCaseDealloc.m +18 -0
  21. data/test/files/IUTTest/IUTTest/NonArcWithAutoreleaseInMethod.h +13 -0
  22. data/test/files/IUTTest/IUTTest/NonArcWithAutoreleaseInMethod.m +18 -0
  23. data/test/files/IUTTest/IUTTest/NonArcWithPropertyCopy.h +15 -0
  24. data/test/files/IUTTest/IUTTest/NonArcWithPropertyCopy.m +15 -0
  25. data/test/files/IUTTest/IUTTest/NonArcWithPropertyRetain.h +15 -0
  26. data/test/files/IUTTest/IUTTest/NonArcWithPropertyRetain.m +15 -0
  27. data/test/files/IUTTest/IUTTest/NonArcWithReleaseInMethod.h +13 -0
  28. data/test/files/IUTTest/IUTTest/NonArcWithReleaseInMethod.m +19 -0
  29. data/test/files/IUTTest/IUTTest/en.lproj/InfoPlist.strings +2 -0
  30. data/test/files/IUTTest/IUTTest/main.m +18 -0
  31. data/test/files/IUTTest/IUTTest.xcodeproj/project.pbxproj +311 -0
  32. data/test/files/IUTTest/IUTTest.xcodeproj/project.pbxproj.expected +313 -0
  33. data/test/files/IUTTest/IUTTest.xcodeproj/project.pbxproj.org +311 -0
  34. data/test/test_arc.rb +54 -0
  35. data/test/test_arc_change_settings.rb +84 -0
  36. metadata +58 -3
@@ -0,0 +1,311 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ 46D7787514FD9C28000FC2D2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46D7787414FD9C28000FC2D2 /* UIKit.framework */; };
11
+ 46D7787714FD9C28000FC2D2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46D7787614FD9C28000FC2D2 /* Foundation.framework */; };
12
+ 46D7787914FD9C28000FC2D2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46D7787814FD9C28000FC2D2 /* CoreGraphics.framework */; };
13
+ 46D7787F14FD9C28000FC2D2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 46D7787D14FD9C28000FC2D2 /* InfoPlist.strings */; };
14
+ 46D7788114FD9C28000FC2D2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D7788014FD9C28000FC2D2 /* main.m */; };
15
+ 46D7788514FD9C28000FC2D2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D7788414FD9C28000FC2D2 /* AppDelegate.m */; };
16
+ 46D7789114FD9DC9000FC2D2 /* Arc.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D7789014FD9DC9000FC2D2 /* Arc.m */; };
17
+ 46D7789514FD9E00000FC2D2 /* NonArcCaseDealloc.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D7789414FD9E00000FC2D2 /* NonArcCaseDealloc.m */; };
18
+ 46D7789814FD9F51000FC2D2 /* NonArcWithPropertyCopy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D7789714FD9F51000FC2D2 /* NonArcWithPropertyCopy.m */; };
19
+ 46D7789B14FD9F96000FC2D2 /* NonArcWithPropertyRetain.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D7789A14FD9F96000FC2D2 /* NonArcWithPropertyRetain.m */; };
20
+ 46D7789E14FD9FBC000FC2D2 /* NonArcWithAutoreleaseInMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D7789D14FD9FBC000FC2D2 /* NonArcWithAutoreleaseInMethod.m */; };
21
+ 46D778A114FD9FE2000FC2D2 /* ArcWithRetainInComment.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D778A014FD9FE2000FC2D2 /* ArcWithRetainInComment.m */; };
22
+ 46D778A414FDA0B5000FC2D2 /* NonArcWithReleaseInMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D778A314FDA0B5000FC2D2 /* NonArcWithReleaseInMethod.m */; };
23
+ 46D778A714FE8166000FC2D2 /* LooksArcButSuperDoesNotUse.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D778A614FE8166000FC2D2 /* LooksArcButSuperDoesNotUse.m */; };
24
+ /* End PBXBuildFile section */
25
+
26
+ /* Begin PBXFileReference section */
27
+ 46D7787014FD9C28000FC2D2 /* IUTTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IUTTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
28
+ 46D7787414FD9C28000FC2D2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
29
+ 46D7787614FD9C28000FC2D2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
30
+ 46D7787814FD9C28000FC2D2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
31
+ 46D7787C14FD9C28000FC2D2 /* IUTTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "IUTTest-Info.plist"; sourceTree = "<group>"; };
32
+ 46D7787E14FD9C28000FC2D2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
33
+ 46D7788014FD9C28000FC2D2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
34
+ 46D7788214FD9C28000FC2D2 /* IUTTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "IUTTest-Prefix.pch"; sourceTree = "<group>"; };
35
+ 46D7788314FD9C28000FC2D2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
36
+ 46D7788414FD9C28000FC2D2 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
37
+ 46D7788F14FD9DC9000FC2D2 /* Arc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Arc.h; sourceTree = "<group>"; };
38
+ 46D7789014FD9DC9000FC2D2 /* Arc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Arc.m; sourceTree = "<group>"; };
39
+ 46D7789314FD9E00000FC2D2 /* NonArcCaseDealloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonArcCaseDealloc.h; sourceTree = "<group>"; };
40
+ 46D7789414FD9E00000FC2D2 /* NonArcCaseDealloc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NonArcCaseDealloc.m; sourceTree = "<group>"; };
41
+ 46D7789614FD9F51000FC2D2 /* NonArcWithPropertyCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonArcWithPropertyCopy.h; sourceTree = "<group>"; };
42
+ 46D7789714FD9F51000FC2D2 /* NonArcWithPropertyCopy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NonArcWithPropertyCopy.m; sourceTree = "<group>"; };
43
+ 46D7789914FD9F96000FC2D2 /* NonArcWithPropertyRetain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonArcWithPropertyRetain.h; sourceTree = "<group>"; };
44
+ 46D7789A14FD9F96000FC2D2 /* NonArcWithPropertyRetain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NonArcWithPropertyRetain.m; sourceTree = "<group>"; };
45
+ 46D7789C14FD9FBC000FC2D2 /* NonArcWithAutoreleaseInMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonArcWithAutoreleaseInMethod.h; sourceTree = "<group>"; };
46
+ 46D7789D14FD9FBC000FC2D2 /* NonArcWithAutoreleaseInMethod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NonArcWithAutoreleaseInMethod.m; sourceTree = "<group>"; };
47
+ 46D7789F14FD9FE1000FC2D2 /* ArcWithRetainInComment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArcWithRetainInComment.h; sourceTree = "<group>"; };
48
+ 46D778A014FD9FE2000FC2D2 /* ArcWithRetainInComment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArcWithRetainInComment.m; sourceTree = "<group>"; };
49
+ 46D778A214FDA0B5000FC2D2 /* NonArcWithReleaseInMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonArcWithReleaseInMethod.h; sourceTree = "<group>"; };
50
+ 46D778A314FDA0B5000FC2D2 /* NonArcWithReleaseInMethod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NonArcWithReleaseInMethod.m; sourceTree = "<group>"; };
51
+ 46D778A514FE8166000FC2D2 /* LooksArcButSuperDoesNotUse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LooksArcButSuperDoesNotUse.h; sourceTree = "<group>"; };
52
+ 46D778A614FE8166000FC2D2 /* LooksArcButSuperDoesNotUse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LooksArcButSuperDoesNotUse.m; sourceTree = "<group>"; };
53
+ /* End PBXFileReference section */
54
+
55
+ /* Begin PBXFrameworksBuildPhase section */
56
+ 46D7786D14FD9C28000FC2D2 /* Frameworks */ = {
57
+ isa = PBXFrameworksBuildPhase;
58
+ buildActionMask = 2147483647;
59
+ files = (
60
+ 46D7787514FD9C28000FC2D2 /* UIKit.framework in Frameworks */,
61
+ 46D7787714FD9C28000FC2D2 /* Foundation.framework in Frameworks */,
62
+ 46D7787914FD9C28000FC2D2 /* CoreGraphics.framework in Frameworks */,
63
+ );
64
+ runOnlyForDeploymentPostprocessing = 0;
65
+ };
66
+ /* End PBXFrameworksBuildPhase section */
67
+
68
+ /* Begin PBXGroup section */
69
+ 46D7786514FD9C28000FC2D2 = {
70
+ isa = PBXGroup;
71
+ children = (
72
+ 46D7787A14FD9C28000FC2D2 /* IUTTest */,
73
+ 46D7787314FD9C28000FC2D2 /* Frameworks */,
74
+ 46D7787114FD9C28000FC2D2 /* Products */,
75
+ );
76
+ sourceTree = "<group>";
77
+ };
78
+ 46D7787114FD9C28000FC2D2 /* Products */ = {
79
+ isa = PBXGroup;
80
+ children = (
81
+ 46D7787014FD9C28000FC2D2 /* IUTTest.app */,
82
+ );
83
+ name = Products;
84
+ sourceTree = "<group>";
85
+ };
86
+ 46D7787314FD9C28000FC2D2 /* Frameworks */ = {
87
+ isa = PBXGroup;
88
+ children = (
89
+ 46D7787414FD9C28000FC2D2 /* UIKit.framework */,
90
+ 46D7787614FD9C28000FC2D2 /* Foundation.framework */,
91
+ 46D7787814FD9C28000FC2D2 /* CoreGraphics.framework */,
92
+ );
93
+ name = Frameworks;
94
+ sourceTree = "<group>";
95
+ };
96
+ 46D7787A14FD9C28000FC2D2 /* IUTTest */ = {
97
+ isa = PBXGroup;
98
+ children = (
99
+ 46D7788314FD9C28000FC2D2 /* AppDelegate.h */,
100
+ 46D7788414FD9C28000FC2D2 /* AppDelegate.m */,
101
+ 46D7787B14FD9C28000FC2D2 /* Supporting Files */,
102
+ 46D7788F14FD9DC9000FC2D2 /* Arc.h */,
103
+ 46D7789014FD9DC9000FC2D2 /* Arc.m */,
104
+ 46D7789314FD9E00000FC2D2 /* NonArcCaseDealloc.h */,
105
+ 46D7789414FD9E00000FC2D2 /* NonArcCaseDealloc.m */,
106
+ 46D7789614FD9F51000FC2D2 /* NonArcWithPropertyCopy.h */,
107
+ 46D7789714FD9F51000FC2D2 /* NonArcWithPropertyCopy.m */,
108
+ 46D7789914FD9F96000FC2D2 /* NonArcWithPropertyRetain.h */,
109
+ 46D7789A14FD9F96000FC2D2 /* NonArcWithPropertyRetain.m */,
110
+ 46D7789C14FD9FBC000FC2D2 /* NonArcWithAutoreleaseInMethod.h */,
111
+ 46D7789D14FD9FBC000FC2D2 /* NonArcWithAutoreleaseInMethod.m */,
112
+ 46D778A214FDA0B5000FC2D2 /* NonArcWithReleaseInMethod.h */,
113
+ 46D778A314FDA0B5000FC2D2 /* NonArcWithReleaseInMethod.m */,
114
+ 46D7789F14FD9FE1000FC2D2 /* ArcWithRetainInComment.h */,
115
+ 46D778A014FD9FE2000FC2D2 /* ArcWithRetainInComment.m */,
116
+ 46D778A514FE8166000FC2D2 /* LooksArcButSuperDoesNotUse.h */,
117
+ 46D778A614FE8166000FC2D2 /* LooksArcButSuperDoesNotUse.m */,
118
+ );
119
+ path = IUTTest;
120
+ sourceTree = "<group>";
121
+ };
122
+ 46D7787B14FD9C28000FC2D2 /* Supporting Files */ = {
123
+ isa = PBXGroup;
124
+ children = (
125
+ 46D7787C14FD9C28000FC2D2 /* IUTTest-Info.plist */,
126
+ 46D7787D14FD9C28000FC2D2 /* InfoPlist.strings */,
127
+ 46D7788014FD9C28000FC2D2 /* main.m */,
128
+ 46D7788214FD9C28000FC2D2 /* IUTTest-Prefix.pch */,
129
+ );
130
+ name = "Supporting Files";
131
+ sourceTree = "<group>";
132
+ };
133
+ /* End PBXGroup section */
134
+
135
+ /* Begin PBXNativeTarget section */
136
+ 46D7786F14FD9C28000FC2D2 /* IUTTest */ = {
137
+ isa = PBXNativeTarget;
138
+ buildConfigurationList = 46D7788814FD9C28000FC2D2 /* Build configuration list for PBXNativeTarget "IUTTest" */;
139
+ buildPhases = (
140
+ 46D7786C14FD9C28000FC2D2 /* Sources */,
141
+ 46D7786D14FD9C28000FC2D2 /* Frameworks */,
142
+ 46D7786E14FD9C28000FC2D2 /* Resources */,
143
+ );
144
+ buildRules = (
145
+ );
146
+ dependencies = (
147
+ );
148
+ name = IUTTest;
149
+ productName = IUTTest;
150
+ productReference = 46D7787014FD9C28000FC2D2 /* IUTTest.app */;
151
+ productType = "com.apple.product-type.application";
152
+ };
153
+ /* End PBXNativeTarget section */
154
+
155
+ /* Begin PBXProject section */
156
+ 46D7786714FD9C28000FC2D2 /* Project object */ = {
157
+ isa = PBXProject;
158
+ attributes = {
159
+ LastUpgradeCheck = 0420;
160
+ ORGANIZATIONNAME = "ITO SOFT DESIGN Inc.";
161
+ };
162
+ buildConfigurationList = 46D7786A14FD9C28000FC2D2 /* Build configuration list for PBXProject "IUTTest" */;
163
+ compatibilityVersion = "Xcode 3.2";
164
+ developmentRegion = English;
165
+ hasScannedForEncodings = 0;
166
+ knownRegions = (
167
+ en,
168
+ );
169
+ mainGroup = 46D7786514FD9C28000FC2D2;
170
+ productRefGroup = 46D7787114FD9C28000FC2D2 /* Products */;
171
+ projectDirPath = "";
172
+ projectRoot = "";
173
+ targets = (
174
+ 46D7786F14FD9C28000FC2D2 /* IUTTest */,
175
+ );
176
+ };
177
+ /* End PBXProject section */
178
+
179
+ /* Begin PBXResourcesBuildPhase section */
180
+ 46D7786E14FD9C28000FC2D2 /* Resources */ = {
181
+ isa = PBXResourcesBuildPhase;
182
+ buildActionMask = 2147483647;
183
+ files = (
184
+ 46D7787F14FD9C28000FC2D2 /* InfoPlist.strings in Resources */,
185
+ );
186
+ runOnlyForDeploymentPostprocessing = 0;
187
+ };
188
+ /* End PBXResourcesBuildPhase section */
189
+
190
+ /* Begin PBXSourcesBuildPhase section */
191
+ 46D7786C14FD9C28000FC2D2 /* Sources */ = {
192
+ isa = PBXSourcesBuildPhase;
193
+ buildActionMask = 2147483647;
194
+ files = (
195
+ 46D7788114FD9C28000FC2D2 /* main.m in Sources */,
196
+ 46D7788514FD9C28000FC2D2 /* AppDelegate.m in Sources */,
197
+ 46D7789114FD9DC9000FC2D2 /* Arc.m in Sources */,
198
+ 46D7789514FD9E00000FC2D2 /* NonArcCaseDealloc.m in Sources */,
199
+ 46D7789814FD9F51000FC2D2 /* NonArcWithPropertyCopy.m in Sources */,
200
+ 46D7789B14FD9F96000FC2D2 /* NonArcWithPropertyRetain.m in Sources */,
201
+ 46D7789E14FD9FBC000FC2D2 /* NonArcWithAutoreleaseInMethod.m in Sources */,
202
+ 46D778A114FD9FE2000FC2D2 /* ArcWithRetainInComment.m in Sources */,
203
+ 46D778A414FDA0B5000FC2D2 /* NonArcWithReleaseInMethod.m in Sources */,
204
+ 46D778A714FE8166000FC2D2 /* LooksArcButSuperDoesNotUse.m in Sources */,
205
+ );
206
+ runOnlyForDeploymentPostprocessing = 0;
207
+ };
208
+ /* End PBXSourcesBuildPhase section */
209
+
210
+ /* Begin PBXVariantGroup section */
211
+ 46D7787D14FD9C28000FC2D2 /* InfoPlist.strings */ = {
212
+ isa = PBXVariantGroup;
213
+ children = (
214
+ 46D7787E14FD9C28000FC2D2 /* en */,
215
+ );
216
+ name = InfoPlist.strings;
217
+ sourceTree = "<group>";
218
+ };
219
+ /* End PBXVariantGroup section */
220
+
221
+ /* Begin XCBuildConfiguration section */
222
+ 46D7788614FD9C28000FC2D2 /* Debug */ = {
223
+ isa = XCBuildConfiguration;
224
+ buildSettings = {
225
+ ALWAYS_SEARCH_USER_PATHS = NO;
226
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
227
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
228
+ COPY_PHASE_STRIP = NO;
229
+ GCC_C_LANGUAGE_STANDARD = gnu99;
230
+ GCC_DYNAMIC_NO_PIC = NO;
231
+ GCC_OPTIMIZATION_LEVEL = 0;
232
+ GCC_PREPROCESSOR_DEFINITIONS = (
233
+ "DEBUG=1",
234
+ "$(inherited)",
235
+ );
236
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
237
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
238
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
239
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
240
+ GCC_WARN_UNUSED_VARIABLE = YES;
241
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
242
+ SDKROOT = iphoneos;
243
+ };
244
+ name = Debug;
245
+ };
246
+ 46D7788714FD9C28000FC2D2 /* Release */ = {
247
+ isa = XCBuildConfiguration;
248
+ buildSettings = {
249
+ ALWAYS_SEARCH_USER_PATHS = NO;
250
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
251
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
252
+ COPY_PHASE_STRIP = YES;
253
+ GCC_C_LANGUAGE_STANDARD = gnu99;
254
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
255
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
256
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
257
+ GCC_WARN_UNUSED_VARIABLE = YES;
258
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
259
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
260
+ SDKROOT = iphoneos;
261
+ VALIDATE_PRODUCT = YES;
262
+ };
263
+ name = Release;
264
+ };
265
+ 46D7788914FD9C28000FC2D2 /* Debug */ = {
266
+ isa = XCBuildConfiguration;
267
+ buildSettings = {
268
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
269
+ GCC_PREFIX_HEADER = "IUTTest/IUTTest-Prefix.pch";
270
+ INFOPLIST_FILE = "IUTTest/IUTTest-Info.plist";
271
+ PRODUCT_NAME = "$(TARGET_NAME)";
272
+ WRAPPER_EXTENSION = app;
273
+ };
274
+ name = Debug;
275
+ };
276
+ 46D7788A14FD9C28000FC2D2 /* Release */ = {
277
+ isa = XCBuildConfiguration;
278
+ buildSettings = {
279
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
280
+ GCC_PREFIX_HEADER = "IUTTest/IUTTest-Prefix.pch";
281
+ INFOPLIST_FILE = "IUTTest/IUTTest-Info.plist";
282
+ PRODUCT_NAME = "$(TARGET_NAME)";
283
+ WRAPPER_EXTENSION = app;
284
+ };
285
+ name = Release;
286
+ };
287
+ /* End XCBuildConfiguration section */
288
+
289
+ /* Begin XCConfigurationList section */
290
+ 46D7786A14FD9C28000FC2D2 /* Build configuration list for PBXProject "IUTTest" */ = {
291
+ isa = XCConfigurationList;
292
+ buildConfigurations = (
293
+ 46D7788614FD9C28000FC2D2 /* Debug */,
294
+ 46D7788714FD9C28000FC2D2 /* Release */,
295
+ );
296
+ defaultConfigurationIsVisible = 0;
297
+ defaultConfigurationName = Release;
298
+ };
299
+ 46D7788814FD9C28000FC2D2 /* Build configuration list for PBXNativeTarget "IUTTest" */ = {
300
+ isa = XCConfigurationList;
301
+ buildConfigurations = (
302
+ 46D7788914FD9C28000FC2D2 /* Debug */,
303
+ 46D7788A14FD9C28000FC2D2 /* Release */,
304
+ );
305
+ defaultConfigurationIsVisible = 0;
306
+ defaultConfigurationName = Release;
307
+ };
308
+ /* End XCConfigurationList section */
309
+ };
310
+ rootObject = 46D7786714FD9C28000FC2D2 /* Project object */;
311
+ }
data/test/test_arc.rb ADDED
@@ -0,0 +1,54 @@
1
+ # -*- coding:UTF-8 -*-
2
+ require "test-unit"
3
+ require "kagemusha"
4
+
5
+ iut_path = File.join(File.expand_path(File.dirname(__FILE__)), "../", "lib", "iut")
6
+ $:.unshift(iut_path) unless
7
+ $:.include?(iut_path) || $:.include?(File.expand_path(iut_path))
8
+
9
+ require "arc"
10
+
11
+ class TestArc < Test::Unit::TestCase
12
+
13
+ def setup
14
+ project_path = File.join(File.expand_path(File.dirname(__FILE__)), "files", "IUTTest")
15
+ @arc = Iut::Arc.new
16
+ @arc.project_path = project_path
17
+ end
18
+
19
+
20
+ def test_non_arc_case_dealloc_should_not_be_arc
21
+ assert(@arc.nonarc?("NonArcCaseDealloc"))
22
+ end
23
+
24
+ def test_non_arc_case_property_copy_should_not_be_arc
25
+ assert(@arc.nonarc?("NonArcWithPropertyCopy"))
26
+ end
27
+
28
+ def test_non_arc_case_property_retain_should_not_be_arc
29
+ assert(@arc.nonarc?("NonArcWithPropertyRetain"))
30
+ end
31
+
32
+ def test_non_arc_with_autorelease_in_methods_should_not_be_arc
33
+ assert(@arc.nonarc?("NonArcWithAutoreleaseInMethod"))
34
+ end
35
+
36
+ def test_non_arc_with_release_in_methods_should_not_be_arc
37
+ assert(@arc.nonarc?("NonArcWithReleaseInMethod"))
38
+ end
39
+
40
+ def test_arc_should_be_arc
41
+ assert(@arc.arc?("Arc"))
42
+ end
43
+
44
+ def test_arc_with_retain_in_comment_should_be_arc
45
+ assert(@arc.arc?("ArcWithRetainInComment"))
46
+ end
47
+
48
+ def test_arc_should_not_be_arc
49
+ assert(@arc.nonarc?("LooksArcButSuperDoesNotUse"))
50
+ end
51
+
52
+ end
53
+
54
+
@@ -0,0 +1,84 @@
1
+ require "test-unit"
2
+ require "kagemusha"
3
+
4
+ iut_path = File.join(File.expand_path(File.dirname(__FILE__)), "../", "lib", "iut")
5
+ $:.unshift(iut_path) unless
6
+ $:.include?(iut_path) || $:.include?(File.expand_path(iut_path))
7
+
8
+ require "arc"
9
+
10
+
11
+ class TestArc < Test::Unit::TestCase
12
+
13
+ def setup
14
+ project_path = File.join(File.expand_path(File.dirname(__FILE__)), "files", "IUTTest")
15
+ @arc = Iut::Arc.new
16
+ @arc.project_path = project_path
17
+ #p project_path
18
+ end
19
+
20
+ def teardown
21
+ Dir.chdir @arc.project_path do
22
+ FileUtils.cp "IUTTest.xcodeproj/project.pbxproj.org", "IUTTest.xcodeproj/project.pbxproj"
23
+ Dir.glob("IUTTest.xcodeproj/project.pbxproj.2*") do |f|
24
+ FileUtils.rm f
25
+ end
26
+ end
27
+ end
28
+
29
+ def test_change_project_settings
30
+ @arc.change_project_settings
31
+ Dir.chdir @arc.project_path do
32
+ actual = File.read("IUTTest.xcodeproj/project.pbxproj").split("\n")
33
+ expected = File.read("IUTTest.xcodeproj/project.pbxproj.expected").split("\n")
34
+ expected.each_with_index do |l, i|
35
+ assert_equal expected[i], actual[i]
36
+ end
37
+ # assert_equal File.read("IUTTest.xcodeproj/project.pbxproj.expected"), File.read("IUTTest.xcodeproj/project.pbxproj")
38
+ end
39
+ end
40
+
41
+ def test_change_project_settings_twice
42
+ @arc.change_project_settings
43
+ @arc.change_project_settings
44
+ Dir.chdir @arc.project_path do
45
+ assert_equal File.read("IUTTest.xcodeproj/project.pbxproj.expected"), File.read("IUTTest.xcodeproj/project.pbxproj")
46
+ end
47
+ end
48
+
49
+ def test_arc_parse_change_project_settings
50
+ ARGV.replace ['arc', '-p', @arc.project_path]
51
+ Iut::Arc.parse
52
+ Dir.chdir @arc.project_path do
53
+ assert_equal File.read("IUTTest.xcodeproj/project.pbxproj.expected"), File.read("IUTTest.xcodeproj/project.pbxproj")
54
+ end
55
+ end
56
+
57
+ def test_arc_make_backup
58
+ @arc.change_project_settings
59
+ Dir.chdir @arc.project_path do
60
+ files = Dir.glob("**/project.pbxproj.2*")
61
+ assert_equal 1, files.size
62
+ end
63
+ end
64
+
65
+ def test_revert
66
+ @arc.change_project_settings
67
+ @arc.revert
68
+ Dir.chdir @arc.project_path do
69
+ assert_equal File.read("IUTTest.xcodeproj/project.pbxproj.org"), File.read("IUTTest.xcodeproj/project.pbxproj")
70
+ end
71
+ end
72
+
73
+ def test_arc_parse_revert
74
+ @arc.change_project_settings
75
+ ARGV.replace ['arc', 'revert', '-p', @arc.project_path]
76
+ Iut::Arc.parse
77
+ Dir.chdir @arc.project_path do
78
+ assert_equal File.read("IUTTest.xcodeproj/project.pbxproj.org"), File.read("IUTTest.xcodeproj/project.pbxproj")
79
+ end
80
+ end
81
+
82
+
83
+ end
84
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-19 00:00:00.000000000Z
12
+ date: 2012-03-01 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: ! 'After Xcode 4 released, the format of template project was changed.
15
15
  The aim of this command is to make a iUnitTest test project easily. '
@@ -28,6 +28,7 @@ files:
28
28
  - bin/iut
29
29
  - iut.gemspec
30
30
  - lib/iut.rb
31
+ - lib/iut/arc.rb
31
32
  - lib/iut/generator.rb
32
33
  - lib/iut/template_version.rb
33
34
  - lib/iut/version.rb
@@ -95,6 +96,33 @@ files:
95
96
  - template/project/iUnitTest/iUnitTest/iunittest/iunittest_icon.png
96
97
  - template/project/iUnitTest/iUnitTest/main.m
97
98
  - template/project/iUnitTest/script/sync_source.rb
99
+ - test/files/IUTTest/IUTTest.xcodeproj/project.pbxproj
100
+ - test/files/IUTTest/IUTTest.xcodeproj/project.pbxproj.expected
101
+ - test/files/IUTTest/IUTTest.xcodeproj/project.pbxproj.org
102
+ - test/files/IUTTest/IUTTest/AppDelegate.h
103
+ - test/files/IUTTest/IUTTest/AppDelegate.m
104
+ - test/files/IUTTest/IUTTest/Arc.h
105
+ - test/files/IUTTest/IUTTest/Arc.m
106
+ - test/files/IUTTest/IUTTest/ArcWithRetainInComment.h
107
+ - test/files/IUTTest/IUTTest/ArcWithRetainInComment.m
108
+ - test/files/IUTTest/IUTTest/IUTTest-Info.plist
109
+ - test/files/IUTTest/IUTTest/IUTTest-Prefix.pch
110
+ - test/files/IUTTest/IUTTest/LooksArcButSuperDoesNotUse.h
111
+ - test/files/IUTTest/IUTTest/LooksArcButSuperDoesNotUse.m
112
+ - test/files/IUTTest/IUTTest/NonArcCaseDealloc.h
113
+ - test/files/IUTTest/IUTTest/NonArcCaseDealloc.m
114
+ - test/files/IUTTest/IUTTest/NonArcWithAutoreleaseInMethod.h
115
+ - test/files/IUTTest/IUTTest/NonArcWithAutoreleaseInMethod.m
116
+ - test/files/IUTTest/IUTTest/NonArcWithPropertyCopy.h
117
+ - test/files/IUTTest/IUTTest/NonArcWithPropertyCopy.m
118
+ - test/files/IUTTest/IUTTest/NonArcWithPropertyRetain.h
119
+ - test/files/IUTTest/IUTTest/NonArcWithPropertyRetain.m
120
+ - test/files/IUTTest/IUTTest/NonArcWithReleaseInMethod.h
121
+ - test/files/IUTTest/IUTTest/NonArcWithReleaseInMethod.m
122
+ - test/files/IUTTest/IUTTest/en.lproj/InfoPlist.strings
123
+ - test/files/IUTTest/IUTTest/main.m
124
+ - test/test_arc.rb
125
+ - test/test_arc_change_settings.rb
98
126
  homepage: https://github.com/katsuyoshi/iunittest
99
127
  licenses: []
100
128
  post_install_message:
@@ -119,4 +147,31 @@ rubygems_version: 1.8.10
119
147
  signing_key:
120
148
  specification_version: 3
121
149
  summary: It generates a iUnitTest test project for Xcode 4.x.
122
- test_files: []
150
+ test_files:
151
+ - test/files/IUTTest/IUTTest.xcodeproj/project.pbxproj
152
+ - test/files/IUTTest/IUTTest.xcodeproj/project.pbxproj.expected
153
+ - test/files/IUTTest/IUTTest.xcodeproj/project.pbxproj.org
154
+ - test/files/IUTTest/IUTTest/AppDelegate.h
155
+ - test/files/IUTTest/IUTTest/AppDelegate.m
156
+ - test/files/IUTTest/IUTTest/Arc.h
157
+ - test/files/IUTTest/IUTTest/Arc.m
158
+ - test/files/IUTTest/IUTTest/ArcWithRetainInComment.h
159
+ - test/files/IUTTest/IUTTest/ArcWithRetainInComment.m
160
+ - test/files/IUTTest/IUTTest/IUTTest-Info.plist
161
+ - test/files/IUTTest/IUTTest/IUTTest-Prefix.pch
162
+ - test/files/IUTTest/IUTTest/LooksArcButSuperDoesNotUse.h
163
+ - test/files/IUTTest/IUTTest/LooksArcButSuperDoesNotUse.m
164
+ - test/files/IUTTest/IUTTest/NonArcCaseDealloc.h
165
+ - test/files/IUTTest/IUTTest/NonArcCaseDealloc.m
166
+ - test/files/IUTTest/IUTTest/NonArcWithAutoreleaseInMethod.h
167
+ - test/files/IUTTest/IUTTest/NonArcWithAutoreleaseInMethod.m
168
+ - test/files/IUTTest/IUTTest/NonArcWithPropertyCopy.h
169
+ - test/files/IUTTest/IUTTest/NonArcWithPropertyCopy.m
170
+ - test/files/IUTTest/IUTTest/NonArcWithPropertyRetain.h
171
+ - test/files/IUTTest/IUTTest/NonArcWithPropertyRetain.m
172
+ - test/files/IUTTest/IUTTest/NonArcWithReleaseInMethod.h
173
+ - test/files/IUTTest/IUTTest/NonArcWithReleaseInMethod.m
174
+ - test/files/IUTTest/IUTTest/en.lproj/InfoPlist.strings
175
+ - test/files/IUTTest/IUTTest/main.m
176
+ - test/test_arc.rb
177
+ - test/test_arc_change_settings.rb