fixbraces 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/.gitignore +18 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +56 -0
  6. data/Rakefile +14 -0
  7. data/bin/fixbraces +36 -0
  8. data/features/cli.feature +13 -0
  9. data/features/fixbraces.feature +22 -0
  10. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/AppDelegate.h +13 -0
  11. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/AppDelegate.m +44 -0
  12. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/Default-568h@2x.png +0 -0
  13. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/Default.png +0 -0
  14. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/Default@2x.png +0 -0
  15. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/DetailViewController.h +18 -0
  16. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/DetailViewController.m +49 -0
  17. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/FixbracesTestProject-Info.plist +50 -0
  18. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/FixbracesTestProject-Prefix.pch +14 -0
  19. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/MasterViewController.h +12 -0
  20. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/MasterViewController.m +111 -0
  21. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/en.lproj/InfoPlist.strings +2 -0
  22. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/en.lproj/MainStoryboard.storyboard +103 -0
  23. data/features/fixtures/FixbracesTestProject/FixbracesTestProject/main.m +16 -0
  24. data/features/fixtures/FixbracesTestProject/FixbracesTestProject.xcodeproj/project.pbxproj +468 -0
  25. data/features/fixtures/FixbracesTestProject/FixbracesTestProjectTests/FixbracesTestProjectTests-Info.plist +22 -0
  26. data/features/fixtures/FixbracesTestProject/FixbracesTestProjectTests/FixbracesTestProjectTests.h +11 -0
  27. data/features/fixtures/FixbracesTestProject/FixbracesTestProjectTests/FixbracesTestProjectTests.m +30 -0
  28. data/features/fixtures/FixbracesTestProject/FixbracesTestProjectTests/en.lproj/InfoPlist.strings +2 -0
  29. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/AppDelegate.h +13 -0
  30. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/AppDelegate.m +38 -0
  31. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/Default-568h@2x.png +0 -0
  32. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/Default.png +0 -0
  33. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/Default@2x.png +0 -0
  34. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/DetailViewController.h +17 -0
  35. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/DetailViewController.m +45 -0
  36. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/FixbracesTestProject-Info.plist +50 -0
  37. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/FixbracesTestProject-Prefix.pch +14 -0
  38. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/MasterViewController.h +10 -0
  39. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/MasterViewController.m +99 -0
  40. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/en.lproj/InfoPlist.strings +2 -0
  41. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/en.lproj/MainStoryboard.storyboard +103 -0
  42. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject/main.m +15 -0
  43. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProject.xcodeproj/project.pbxproj +468 -0
  44. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProjectTests/FixbracesTestProjectTests-Info.plist +22 -0
  45. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProjectTests/FixbracesTestProjectTests.h +11 -0
  46. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProjectTests/FixbracesTestProjectTests.m +27 -0
  47. data/features/fixtures/FixbracesTestProjectExpected/FixbracesTestProjectTests/en.lproj/InfoPlist.strings +2 -0
  48. data/features/step_definitions/cli_steps.rb +7 -0
  49. data/features/step_definitions/fixbraces_steps.rb +55 -0
  50. data/features/step_definitions/touch +0 -0
  51. data/features/support/env.rb +16 -0
  52. data/fixbraces.gemspec +28 -0
  53. data/lib/fixbraces/version.rb +3 -0
  54. data/lib/fixbraces.rb +25 -0
  55. data/spec/fixbraces_spec.rb +67 -0
  56. data/spec/fixtures/expected/AppDelegate.h +13 -0
  57. data/spec/fixtures/expected/AppDelegate.m +38 -0
  58. data/spec/fixtures/expected/MasterViewController.h +10 -0
  59. data/spec/fixtures/expected/MasterViewController.m +99 -0
  60. data/spec/fixtures/input/AppDelegate.h +13 -0
  61. data/spec/fixtures/input/AppDelegate.m +44 -0
  62. data/spec/fixtures/input/MasterViewController.h +12 -0
  63. data/spec/fixtures/input/MasterViewController.m +111 -0
  64. data/spec/fixtures/sample_text.rb +112 -0
  65. metadata +234 -0
@@ -0,0 +1,468 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ EE04170A168C7420009C43A4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE041709168C7420009C43A4 /* UIKit.framework */; };
11
+ EE04170C168C7420009C43A4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE04170B168C7420009C43A4 /* Foundation.framework */; };
12
+ EE04170E168C7420009C43A4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE04170D168C7420009C43A4 /* CoreGraphics.framework */; };
13
+ EE041714168C7420009C43A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EE041712168C7420009C43A4 /* InfoPlist.strings */; };
14
+ EE041716168C7420009C43A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EE041715168C7420009C43A4 /* main.m */; };
15
+ EE04171A168C7420009C43A4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EE041719168C7420009C43A4 /* AppDelegate.m */; };
16
+ EE04171C168C7420009C43A4 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = EE04171B168C7420009C43A4 /* Default.png */; };
17
+ EE04171E168C7420009C43A4 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = EE04171D168C7420009C43A4 /* Default@2x.png */; };
18
+ EE041720168C7420009C43A4 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = EE04171F168C7420009C43A4 /* Default-568h@2x.png */; };
19
+ EE041723168C7420009C43A4 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EE041721168C7420009C43A4 /* MainStoryboard.storyboard */; };
20
+ EE041726168C7420009C43A4 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE041725168C7420009C43A4 /* MasterViewController.m */; };
21
+ EE041729168C7420009C43A4 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE041728168C7420009C43A4 /* DetailViewController.m */; };
22
+ EE041731168C7420009C43A4 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE041730168C7420009C43A4 /* SenTestingKit.framework */; };
23
+ EE041732168C7420009C43A4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE041709168C7420009C43A4 /* UIKit.framework */; };
24
+ EE041733168C7420009C43A4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE04170B168C7420009C43A4 /* Foundation.framework */; };
25
+ EE04173B168C7420009C43A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EE041739168C7420009C43A4 /* InfoPlist.strings */; };
26
+ EE04173E168C7420009C43A4 /* FixbracesTestProjectTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EE04173D168C7420009C43A4 /* FixbracesTestProjectTests.m */; };
27
+ /* End PBXBuildFile section */
28
+
29
+ /* Begin PBXContainerItemProxy section */
30
+ EE041734168C7420009C43A4 /* PBXContainerItemProxy */ = {
31
+ isa = PBXContainerItemProxy;
32
+ containerPortal = EE0416FC168C7420009C43A4 /* Project object */;
33
+ proxyType = 1;
34
+ remoteGlobalIDString = EE041704168C7420009C43A4;
35
+ remoteInfo = FixbracesTestProject;
36
+ };
37
+ /* End PBXContainerItemProxy section */
38
+
39
+ /* Begin PBXFileReference section */
40
+ EE041705168C7420009C43A4 /* FixbracesTestProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FixbracesTestProject.app; sourceTree = BUILT_PRODUCTS_DIR; };
41
+ EE041709168C7420009C43A4 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
42
+ EE04170B168C7420009C43A4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
43
+ EE04170D168C7420009C43A4 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
44
+ EE041711168C7420009C43A4 /* FixbracesTestProject-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FixbracesTestProject-Info.plist"; sourceTree = "<group>"; };
45
+ EE041713168C7420009C43A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
46
+ EE041715168C7420009C43A4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
47
+ EE041717168C7420009C43A4 /* FixbracesTestProject-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FixbracesTestProject-Prefix.pch"; sourceTree = "<group>"; };
48
+ EE041718168C7420009C43A4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
49
+ EE041719168C7420009C43A4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
50
+ EE04171B168C7420009C43A4 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
51
+ EE04171D168C7420009C43A4 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
52
+ EE04171F168C7420009C43A4 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
53
+ EE041722168C7420009C43A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = "<group>"; };
54
+ EE041724168C7420009C43A4 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = "<group>"; };
55
+ EE041725168C7420009C43A4 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = "<group>"; };
56
+ EE041727168C7420009C43A4 /* DetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = "<group>"; };
57
+ EE041728168C7420009C43A4 /* DetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = "<group>"; };
58
+ EE04172F168C7420009C43A4 /* FixbracesTestProjectTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FixbracesTestProjectTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
59
+ EE041730168C7420009C43A4 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
60
+ EE041738168C7420009C43A4 /* FixbracesTestProjectTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FixbracesTestProjectTests-Info.plist"; sourceTree = "<group>"; };
61
+ EE04173A168C7420009C43A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
62
+ EE04173C168C7420009C43A4 /* FixbracesTestProjectTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FixbracesTestProjectTests.h; sourceTree = "<group>"; };
63
+ EE04173D168C7420009C43A4 /* FixbracesTestProjectTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FixbracesTestProjectTests.m; sourceTree = "<group>"; };
64
+ /* End PBXFileReference section */
65
+
66
+ /* Begin PBXFrameworksBuildPhase section */
67
+ EE041702168C7420009C43A4 /* Frameworks */ = {
68
+ isa = PBXFrameworksBuildPhase;
69
+ buildActionMask = 2147483647;
70
+ files = (
71
+ EE04170A168C7420009C43A4 /* UIKit.framework in Frameworks */,
72
+ EE04170C168C7420009C43A4 /* Foundation.framework in Frameworks */,
73
+ EE04170E168C7420009C43A4 /* CoreGraphics.framework in Frameworks */,
74
+ );
75
+ runOnlyForDeploymentPostprocessing = 0;
76
+ };
77
+ EE04172B168C7420009C43A4 /* Frameworks */ = {
78
+ isa = PBXFrameworksBuildPhase;
79
+ buildActionMask = 2147483647;
80
+ files = (
81
+ EE041731168C7420009C43A4 /* SenTestingKit.framework in Frameworks */,
82
+ EE041732168C7420009C43A4 /* UIKit.framework in Frameworks */,
83
+ EE041733168C7420009C43A4 /* Foundation.framework in Frameworks */,
84
+ );
85
+ runOnlyForDeploymentPostprocessing = 0;
86
+ };
87
+ /* End PBXFrameworksBuildPhase section */
88
+
89
+ /* Begin PBXGroup section */
90
+ EE0416FA168C7420009C43A4 = {
91
+ isa = PBXGroup;
92
+ children = (
93
+ EE04170F168C7420009C43A4 /* FixbracesTestProject */,
94
+ EE041736168C7420009C43A4 /* FixbracesTestProjectTests */,
95
+ EE041708168C7420009C43A4 /* Frameworks */,
96
+ EE041706168C7420009C43A4 /* Products */,
97
+ );
98
+ sourceTree = "<group>";
99
+ };
100
+ EE041706168C7420009C43A4 /* Products */ = {
101
+ isa = PBXGroup;
102
+ children = (
103
+ EE041705168C7420009C43A4 /* FixbracesTestProject.app */,
104
+ EE04172F168C7420009C43A4 /* FixbracesTestProjectTests.octest */,
105
+ );
106
+ name = Products;
107
+ sourceTree = "<group>";
108
+ };
109
+ EE041708168C7420009C43A4 /* Frameworks */ = {
110
+ isa = PBXGroup;
111
+ children = (
112
+ EE041709168C7420009C43A4 /* UIKit.framework */,
113
+ EE04170B168C7420009C43A4 /* Foundation.framework */,
114
+ EE04170D168C7420009C43A4 /* CoreGraphics.framework */,
115
+ EE041730168C7420009C43A4 /* SenTestingKit.framework */,
116
+ );
117
+ name = Frameworks;
118
+ sourceTree = "<group>";
119
+ };
120
+ EE04170F168C7420009C43A4 /* FixbracesTestProject */ = {
121
+ isa = PBXGroup;
122
+ children = (
123
+ EE041718168C7420009C43A4 /* AppDelegate.h */,
124
+ EE041719168C7420009C43A4 /* AppDelegate.m */,
125
+ EE041721168C7420009C43A4 /* MainStoryboard.storyboard */,
126
+ EE041724168C7420009C43A4 /* MasterViewController.h */,
127
+ EE041725168C7420009C43A4 /* MasterViewController.m */,
128
+ EE041727168C7420009C43A4 /* DetailViewController.h */,
129
+ EE041728168C7420009C43A4 /* DetailViewController.m */,
130
+ EE041710168C7420009C43A4 /* Supporting Files */,
131
+ );
132
+ path = FixbracesTestProject;
133
+ sourceTree = "<group>";
134
+ };
135
+ EE041710168C7420009C43A4 /* Supporting Files */ = {
136
+ isa = PBXGroup;
137
+ children = (
138
+ EE041711168C7420009C43A4 /* FixbracesTestProject-Info.plist */,
139
+ EE041712168C7420009C43A4 /* InfoPlist.strings */,
140
+ EE041715168C7420009C43A4 /* main.m */,
141
+ EE041717168C7420009C43A4 /* FixbracesTestProject-Prefix.pch */,
142
+ EE04171B168C7420009C43A4 /* Default.png */,
143
+ EE04171D168C7420009C43A4 /* Default@2x.png */,
144
+ EE04171F168C7420009C43A4 /* Default-568h@2x.png */,
145
+ );
146
+ name = "Supporting Files";
147
+ sourceTree = "<group>";
148
+ };
149
+ EE041736168C7420009C43A4 /* FixbracesTestProjectTests */ = {
150
+ isa = PBXGroup;
151
+ children = (
152
+ EE04173C168C7420009C43A4 /* FixbracesTestProjectTests.h */,
153
+ EE04173D168C7420009C43A4 /* FixbracesTestProjectTests.m */,
154
+ EE041737168C7420009C43A4 /* Supporting Files */,
155
+ );
156
+ path = FixbracesTestProjectTests;
157
+ sourceTree = "<group>";
158
+ };
159
+ EE041737168C7420009C43A4 /* Supporting Files */ = {
160
+ isa = PBXGroup;
161
+ children = (
162
+ EE041738168C7420009C43A4 /* FixbracesTestProjectTests-Info.plist */,
163
+ EE041739168C7420009C43A4 /* InfoPlist.strings */,
164
+ );
165
+ name = "Supporting Files";
166
+ sourceTree = "<group>";
167
+ };
168
+ /* End PBXGroup section */
169
+
170
+ /* Begin PBXNativeTarget section */
171
+ EE041704168C7420009C43A4 /* FixbracesTestProject */ = {
172
+ isa = PBXNativeTarget;
173
+ buildConfigurationList = EE041741168C7420009C43A4 /* Build configuration list for PBXNativeTarget "FixbracesTestProject" */;
174
+ buildPhases = (
175
+ EE041701168C7420009C43A4 /* Sources */,
176
+ EE041702168C7420009C43A4 /* Frameworks */,
177
+ EE041703168C7420009C43A4 /* Resources */,
178
+ );
179
+ buildRules = (
180
+ );
181
+ dependencies = (
182
+ );
183
+ name = FixbracesTestProject;
184
+ productName = FixbracesTestProject;
185
+ productReference = EE041705168C7420009C43A4 /* FixbracesTestProject.app */;
186
+ productType = "com.apple.product-type.application";
187
+ };
188
+ EE04172E168C7420009C43A4 /* FixbracesTestProjectTests */ = {
189
+ isa = PBXNativeTarget;
190
+ buildConfigurationList = EE041744168C7420009C43A4 /* Build configuration list for PBXNativeTarget "FixbracesTestProjectTests" */;
191
+ buildPhases = (
192
+ EE04172A168C7420009C43A4 /* Sources */,
193
+ EE04172B168C7420009C43A4 /* Frameworks */,
194
+ EE04172C168C7420009C43A4 /* Resources */,
195
+ EE04172D168C7420009C43A4 /* ShellScript */,
196
+ );
197
+ buildRules = (
198
+ );
199
+ dependencies = (
200
+ EE041735168C7420009C43A4 /* PBXTargetDependency */,
201
+ );
202
+ name = FixbracesTestProjectTests;
203
+ productName = FixbracesTestProjectTests;
204
+ productReference = EE04172F168C7420009C43A4 /* FixbracesTestProjectTests.octest */;
205
+ productType = "com.apple.product-type.bundle";
206
+ };
207
+ /* End PBXNativeTarget section */
208
+
209
+ /* Begin PBXProject section */
210
+ EE0416FC168C7420009C43A4 /* Project object */ = {
211
+ isa = PBXProject;
212
+ attributes = {
213
+ LastUpgradeCheck = 0450;
214
+ ORGANIZATIONNAME = "Jungle Candy";
215
+ };
216
+ buildConfigurationList = EE0416FF168C7420009C43A4 /* Build configuration list for PBXProject "FixbracesTestProject" */;
217
+ compatibilityVersion = "Xcode 3.2";
218
+ developmentRegion = English;
219
+ hasScannedForEncodings = 0;
220
+ knownRegions = (
221
+ en,
222
+ );
223
+ mainGroup = EE0416FA168C7420009C43A4;
224
+ productRefGroup = EE041706168C7420009C43A4 /* Products */;
225
+ projectDirPath = "";
226
+ projectRoot = "";
227
+ targets = (
228
+ EE041704168C7420009C43A4 /* FixbracesTestProject */,
229
+ EE04172E168C7420009C43A4 /* FixbracesTestProjectTests */,
230
+ );
231
+ };
232
+ /* End PBXProject section */
233
+
234
+ /* Begin PBXResourcesBuildPhase section */
235
+ EE041703168C7420009C43A4 /* Resources */ = {
236
+ isa = PBXResourcesBuildPhase;
237
+ buildActionMask = 2147483647;
238
+ files = (
239
+ EE041714168C7420009C43A4 /* InfoPlist.strings in Resources */,
240
+ EE04171C168C7420009C43A4 /* Default.png in Resources */,
241
+ EE04171E168C7420009C43A4 /* Default@2x.png in Resources */,
242
+ EE041720168C7420009C43A4 /* Default-568h@2x.png in Resources */,
243
+ EE041723168C7420009C43A4 /* MainStoryboard.storyboard in Resources */,
244
+ );
245
+ runOnlyForDeploymentPostprocessing = 0;
246
+ };
247
+ EE04172C168C7420009C43A4 /* Resources */ = {
248
+ isa = PBXResourcesBuildPhase;
249
+ buildActionMask = 2147483647;
250
+ files = (
251
+ EE04173B168C7420009C43A4 /* InfoPlist.strings in Resources */,
252
+ );
253
+ runOnlyForDeploymentPostprocessing = 0;
254
+ };
255
+ /* End PBXResourcesBuildPhase section */
256
+
257
+ /* Begin PBXShellScriptBuildPhase section */
258
+ EE04172D168C7420009C43A4 /* ShellScript */ = {
259
+ isa = PBXShellScriptBuildPhase;
260
+ buildActionMask = 2147483647;
261
+ files = (
262
+ );
263
+ inputPaths = (
264
+ );
265
+ outputPaths = (
266
+ );
267
+ runOnlyForDeploymentPostprocessing = 0;
268
+ shellPath = /bin/sh;
269
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
270
+ };
271
+ /* End PBXShellScriptBuildPhase section */
272
+
273
+ /* Begin PBXSourcesBuildPhase section */
274
+ EE041701168C7420009C43A4 /* Sources */ = {
275
+ isa = PBXSourcesBuildPhase;
276
+ buildActionMask = 2147483647;
277
+ files = (
278
+ EE041716168C7420009C43A4 /* main.m in Sources */,
279
+ EE04171A168C7420009C43A4 /* AppDelegate.m in Sources */,
280
+ EE041726168C7420009C43A4 /* MasterViewController.m in Sources */,
281
+ EE041729168C7420009C43A4 /* DetailViewController.m in Sources */,
282
+ );
283
+ runOnlyForDeploymentPostprocessing = 0;
284
+ };
285
+ EE04172A168C7420009C43A4 /* Sources */ = {
286
+ isa = PBXSourcesBuildPhase;
287
+ buildActionMask = 2147483647;
288
+ files = (
289
+ EE04173E168C7420009C43A4 /* FixbracesTestProjectTests.m in Sources */,
290
+ );
291
+ runOnlyForDeploymentPostprocessing = 0;
292
+ };
293
+ /* End PBXSourcesBuildPhase section */
294
+
295
+ /* Begin PBXTargetDependency section */
296
+ EE041735168C7420009C43A4 /* PBXTargetDependency */ = {
297
+ isa = PBXTargetDependency;
298
+ target = EE041704168C7420009C43A4 /* FixbracesTestProject */;
299
+ targetProxy = EE041734168C7420009C43A4 /* PBXContainerItemProxy */;
300
+ };
301
+ /* End PBXTargetDependency section */
302
+
303
+ /* Begin PBXVariantGroup section */
304
+ EE041712168C7420009C43A4 /* InfoPlist.strings */ = {
305
+ isa = PBXVariantGroup;
306
+ children = (
307
+ EE041713168C7420009C43A4 /* en */,
308
+ );
309
+ name = InfoPlist.strings;
310
+ sourceTree = "<group>";
311
+ };
312
+ EE041721168C7420009C43A4 /* MainStoryboard.storyboard */ = {
313
+ isa = PBXVariantGroup;
314
+ children = (
315
+ EE041722168C7420009C43A4 /* en */,
316
+ );
317
+ name = MainStoryboard.storyboard;
318
+ sourceTree = "<group>";
319
+ };
320
+ EE041739168C7420009C43A4 /* InfoPlist.strings */ = {
321
+ isa = PBXVariantGroup;
322
+ children = (
323
+ EE04173A168C7420009C43A4 /* en */,
324
+ );
325
+ name = InfoPlist.strings;
326
+ sourceTree = "<group>";
327
+ };
328
+ /* End PBXVariantGroup section */
329
+
330
+ /* Begin XCBuildConfiguration section */
331
+ EE04173F168C7420009C43A4 /* Debug */ = {
332
+ isa = XCBuildConfiguration;
333
+ buildSettings = {
334
+ ALWAYS_SEARCH_USER_PATHS = NO;
335
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
336
+ CLANG_CXX_LIBRARY = "libc++";
337
+ CLANG_ENABLE_OBJC_ARC = YES;
338
+ CLANG_WARN_EMPTY_BODY = YES;
339
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
340
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
341
+ COPY_PHASE_STRIP = NO;
342
+ GCC_C_LANGUAGE_STANDARD = gnu99;
343
+ GCC_DYNAMIC_NO_PIC = NO;
344
+ GCC_OPTIMIZATION_LEVEL = 0;
345
+ GCC_PREPROCESSOR_DEFINITIONS = (
346
+ "DEBUG=1",
347
+ "$(inherited)",
348
+ );
349
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
350
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
351
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
352
+ GCC_WARN_UNUSED_VARIABLE = YES;
353
+ IPHONEOS_DEPLOYMENT_TARGET = 6.0;
354
+ ONLY_ACTIVE_ARCH = YES;
355
+ SDKROOT = iphoneos;
356
+ };
357
+ name = Debug;
358
+ };
359
+ EE041740168C7420009C43A4 /* Release */ = {
360
+ isa = XCBuildConfiguration;
361
+ buildSettings = {
362
+ ALWAYS_SEARCH_USER_PATHS = NO;
363
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
364
+ CLANG_CXX_LIBRARY = "libc++";
365
+ CLANG_ENABLE_OBJC_ARC = YES;
366
+ CLANG_WARN_EMPTY_BODY = YES;
367
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
368
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
369
+ COPY_PHASE_STRIP = YES;
370
+ GCC_C_LANGUAGE_STANDARD = gnu99;
371
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
372
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
373
+ GCC_WARN_UNUSED_VARIABLE = YES;
374
+ IPHONEOS_DEPLOYMENT_TARGET = 6.0;
375
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
376
+ SDKROOT = iphoneos;
377
+ VALIDATE_PRODUCT = YES;
378
+ };
379
+ name = Release;
380
+ };
381
+ EE041742168C7420009C43A4 /* Debug */ = {
382
+ isa = XCBuildConfiguration;
383
+ buildSettings = {
384
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
385
+ GCC_PREFIX_HEADER = "FixbracesTestProject/FixbracesTestProject-Prefix.pch";
386
+ INFOPLIST_FILE = "FixbracesTestProject/FixbracesTestProject-Info.plist";
387
+ PRODUCT_NAME = "$(TARGET_NAME)";
388
+ WRAPPER_EXTENSION = app;
389
+ };
390
+ name = Debug;
391
+ };
392
+ EE041743168C7420009C43A4 /* Release */ = {
393
+ isa = XCBuildConfiguration;
394
+ buildSettings = {
395
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
396
+ GCC_PREFIX_HEADER = "FixbracesTestProject/FixbracesTestProject-Prefix.pch";
397
+ INFOPLIST_FILE = "FixbracesTestProject/FixbracesTestProject-Info.plist";
398
+ PRODUCT_NAME = "$(TARGET_NAME)";
399
+ WRAPPER_EXTENSION = app;
400
+ };
401
+ name = Release;
402
+ };
403
+ EE041745168C7420009C43A4 /* Debug */ = {
404
+ isa = XCBuildConfiguration;
405
+ buildSettings = {
406
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FixbracesTestProject.app/FixbracesTestProject";
407
+ FRAMEWORK_SEARCH_PATHS = (
408
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
409
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
410
+ );
411
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
412
+ GCC_PREFIX_HEADER = "FixbracesTestProject/FixbracesTestProject-Prefix.pch";
413
+ INFOPLIST_FILE = "FixbracesTestProjectTests/FixbracesTestProjectTests-Info.plist";
414
+ PRODUCT_NAME = "$(TARGET_NAME)";
415
+ TEST_HOST = "$(BUNDLE_LOADER)";
416
+ WRAPPER_EXTENSION = octest;
417
+ };
418
+ name = Debug;
419
+ };
420
+ EE041746168C7420009C43A4 /* Release */ = {
421
+ isa = XCBuildConfiguration;
422
+ buildSettings = {
423
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FixbracesTestProject.app/FixbracesTestProject";
424
+ FRAMEWORK_SEARCH_PATHS = (
425
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
426
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
427
+ );
428
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
429
+ GCC_PREFIX_HEADER = "FixbracesTestProject/FixbracesTestProject-Prefix.pch";
430
+ INFOPLIST_FILE = "FixbracesTestProjectTests/FixbracesTestProjectTests-Info.plist";
431
+ PRODUCT_NAME = "$(TARGET_NAME)";
432
+ TEST_HOST = "$(BUNDLE_LOADER)";
433
+ WRAPPER_EXTENSION = octest;
434
+ };
435
+ name = Release;
436
+ };
437
+ /* End XCBuildConfiguration section */
438
+
439
+ /* Begin XCConfigurationList section */
440
+ EE0416FF168C7420009C43A4 /* Build configuration list for PBXProject "FixbracesTestProject" */ = {
441
+ isa = XCConfigurationList;
442
+ buildConfigurations = (
443
+ EE04173F168C7420009C43A4 /* Debug */,
444
+ EE041740168C7420009C43A4 /* Release */,
445
+ );
446
+ defaultConfigurationIsVisible = 0;
447
+ defaultConfigurationName = Release;
448
+ };
449
+ EE041741168C7420009C43A4 /* Build configuration list for PBXNativeTarget "FixbracesTestProject" */ = {
450
+ isa = XCConfigurationList;
451
+ buildConfigurations = (
452
+ EE041742168C7420009C43A4 /* Debug */,
453
+ EE041743168C7420009C43A4 /* Release */,
454
+ );
455
+ defaultConfigurationIsVisible = 0;
456
+ };
457
+ EE041744168C7420009C43A4 /* Build configuration list for PBXNativeTarget "FixbracesTestProjectTests" */ = {
458
+ isa = XCConfigurationList;
459
+ buildConfigurations = (
460
+ EE041745168C7420009C43A4 /* Debug */,
461
+ EE041746168C7420009C43A4 /* Release */,
462
+ );
463
+ defaultConfigurationIsVisible = 0;
464
+ };
465
+ /* End XCConfigurationList section */
466
+ };
467
+ rootObject = EE0416FC168C7420009C43A4 /* Project object */;
468
+ }
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>en</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>${EXECUTABLE_NAME}</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>com.junglecandy.${PRODUCT_NAME:rfc1034identifier}</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundlePackageType</key>
14
+ <string>BNDL</string>
15
+ <key>CFBundleShortVersionString</key>
16
+ <string>1.0</string>
17
+ <key>CFBundleSignature</key>
18
+ <string>????</string>
19
+ <key>CFBundleVersion</key>
20
+ <string>1</string>
21
+ </dict>
22
+ </plist>
@@ -0,0 +1,11 @@
1
+ //
2
+ // FixbracesTestProjectTests.h
3
+ // FixbracesTestProjectTests
4
+ //
5
+ //
6
+
7
+ #import <SenTestingKit/SenTestingKit.h>
8
+
9
+ @interface FixbracesTestProjectTests : SenTestCase
10
+
11
+ @end
@@ -0,0 +1,27 @@
1
+ //
2
+ // FixbracesTestProjectTests.m
3
+ // FixbracesTestProjectTests
4
+ //
5
+ //
6
+
7
+ #import "FixbracesTestProjectTests.h"
8
+
9
+ @implementation FixbracesTestProjectTests
10
+
11
+ - (void)setUp {
12
+ [super setUp];
13
+
14
+ // Set-up code here.
15
+ }
16
+
17
+ - (void)tearDown {
18
+ // Tear-down code here.
19
+
20
+ [super tearDown];
21
+ }
22
+
23
+ - (void)testExample {
24
+ STFail(@"Unit tests are not implemented yet in FixbracesTestProjectTests");
25
+ }
26
+
27
+ @end
@@ -0,0 +1,2 @@
1
+ /* Localized versions of Info.plist keys */
2
+
@@ -0,0 +1,7 @@
1
+ Then /^version information should be displayed$/ do
2
+ step %(the output should match /v\\d+\\.\\d+\\.\\d+/)
3
+ end
4
+
5
+ Then /^usage information should be displayed$/ do
6
+ step %(the output should contain "Usage:")
7
+ end
@@ -0,0 +1,55 @@
1
+ Given /^a single source file called MasterViewController\.m$/ do
2
+ @test_file = @fixtures_input_dir + "FixbracesTestProject/MasterViewController.m"
3
+ FileUtils.mkdir_p @working_dir
4
+ FileUtils.cp @test_file, @working_dir
5
+ end
6
+
7
+ Then /^MasterViewController\.m should be formatted correctly$/ do
8
+ @expected_file = @fixtures_expected_dir + "FixbracesTestProject/MasterViewController.m"
9
+ @result_file = @working_dir + "MasterViewController.m"
10
+ expect(FileUtils.compare_file @result_file, @expected_file).to eq true
11
+ end
12
+
13
+ Given /^an Xcode project$/ do
14
+ FileUtils.mkdir_p @working_dir
15
+ FileUtils.cp_r @fixtures_input_dir + "FixbracesTestProject", @working_dir
16
+ FileUtils.cp_r @fixtures_input_dir + "FixbracesTestProject.xcodeproj", @working_dir
17
+ FileUtils.cp_r @fixtures_input_dir + "FixbracesTestProjectTests", @working_dir
18
+ end
19
+
20
+ Then /^the files in the directory should be formatted correctly$/ do
21
+ result = `diff -r --brief --exclude=.DS_Store #{@working_dir} #{@fixtures_expected_dir}`
22
+ expect(result).to eq ""
23
+ end
24
+
25
+ Then /^the \.m files in that directory are changed$/ do
26
+ # Under testing we have complete control over the files. so use a hard coded list.
27
+ base_dir = File.join @working_dir, "FixbracesTestProject"
28
+ base_expected_dir = File.join @fixtures_expected_dir, "FixbracesTestProject"
29
+ files = ["AppDelegate.m", "DetailViewController.m", "MasterViewController.m", "main.m"]
30
+
31
+ result = ""
32
+ files.each do |f|
33
+ input = File.join base_dir, f
34
+ expected = File.join base_expected_dir, f
35
+ result += `diff --brief #{input} #{expected}`
36
+ end
37
+
38
+ expect(result).to eq ""
39
+ end
40
+
41
+ Then /^the \.h files in that directory are unchanged$/ do
42
+ base_dir = File.join @working_dir, "FixbracesTestProject"
43
+ # We're looking fore unchanged files, so comparing them against the input not expected
44
+ base_expected_dir = File.join @fixtures_input_dir, "FixbracesTestProject"
45
+ files = ["AppDelegate.h", "DetailViewController.h", "MasterViewController.h"]
46
+
47
+ result = ""
48
+ files.each do |f|
49
+ input = File.join base_dir, f
50
+ expected = File.join base_expected_dir, f
51
+ result += `diff --brief #{input} #{expected}`
52
+ end
53
+
54
+ expect(result).to eq ""
55
+ end
File without changes
@@ -0,0 +1,16 @@
1
+ require "aruba/cucumber"
2
+
3
+ ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
4
+ LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
5
+
6
+ Before do
7
+ @original_rubylib = ENV['RUBYLIB']
8
+ ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
9
+ @fixtures_input_dir = Dir.pwd + "/features/fixtures/FixbracesTestProject/"
10
+ @fixtures_expected_dir = Dir.pwd + "/features/fixtures/FixbracesTestProjectExpected/"
11
+ @working_dir = Dir.pwd + "/tmp/aruba/"
12
+ end
13
+
14
+ After do
15
+ ENV['RUBYLIB'] = @original_rubylib
16
+ end
data/fixbraces.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'fixbraces/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "fixbraces"
8
+ gem.version = Fixbraces::VERSION
9
+ gem.authors = ["Abizer Nasir"]
10
+ gem.email = ["abizern@junglecandy.com"]
11
+ gem.description = <<DESC
12
+ I prefer my opening braces to be on the same line as the opening clause.
13
+ Xcode, and people I collaborate with are inconsistent about the placement
14
+ of the opening brace. This corrects it for a file or a directory.
15
+ DESC
16
+ gem.summary = "Puts the opening brace on the same line"
17
+ gem.homepage = "https://github.com/abizern/fixbraces"
18
+
19
+ gem.files = `git ls-files`.split($/)
20
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
21
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
22
+ gem.require_paths = ["lib"]
23
+
24
+ gem.add_dependency "trollop"
25
+ gem.add_development_dependency "rspec"
26
+ gem.add_development_dependency "cucumber"
27
+ gem.add_development_dependency "aruba"
28
+ end
@@ -0,0 +1,3 @@
1
+ module Fixbraces
2
+ VERSION = "0.9.0"
3
+ end