Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Add a auto-beautifier for Podfiles #304

Open
orta opened this issue May 1, 2016 · 1 comment
Open

Add a auto-beautifier for Podfiles #304

orta opened this issue May 1, 2016 · 1 comment

Comments

@orta
Copy link
Member

orta commented May 1, 2016

Idea: CocoaPods.app could handle your indentation, etc

This is useful in general, cause its less to think about. However, this is extra useful when using auto-complete which currently doesn't take tab indentation into account.

Implementation:

  • We could install ruby-beautify into our hosted environment via the Rakefile, this is probably preferable to using rubocop (due to less dependencies, but open to discussion there )
  • We could then run this before every save
  • It should be on by default, then provide a menu item under "Editor" in order to toggle it off/on
  • indent via 2 spaces

Example

When running it on Artsy's Eigen:

~/d/i/a/eigen (master) ⏛  ruby-beautify Podfile -s -c 2
diff --git a/Podfile b/Podfile
index 1223224..29a5663 100644
--- a/Podfile
+++ b/Podfile
@@ -9,21 +9,21 @@ inhibit_all_warnings!
 #       the continuous build server.

 plugin 'cocoapods-keys', {
-    :project => "Artsy",
-    :target => "Artsy",
-    :keys => [
-        "ArtsyAPIClientSecret",
-        "ArtsyAPIClientKey",
-        "ArtsyFacebookAppID",
-        "ArtsyTwitterKey",
-        "ArtsyTwitterSecret",
-        "ArtsyTwitterStagingKey",
-        "ArtsyTwitterStagingSecret",
-        "SegmentProductionWriteKey",
-        "SegmentDevWriteKey",
-        "AdjustProductionAppToken",
-        "ArtsyEchoProductionToken",
-    ]
+  :project => "Artsy",
+  :target => "Artsy",
+  :keys => [
+    "ArtsyAPIClientSecret",
+    "ArtsyAPIClientKey",
+    "ArtsyFacebookAppID",
+    "ArtsyTwitterKey",
+    "ArtsyTwitterSecret",
+    "ArtsyTwitterStagingKey",
+    "ArtsyTwitterStagingSecret",
+    "SegmentProductionWriteKey",
+    "SegmentDevWriteKey",
+    "AdjustProductionAppToken",
+    "ArtsyEchoProductionToken",
+  ]
 }

 target 'Artsy' do
@@ -109,23 +109,23 @@ target 'Artsy' do
   pod 'Socket.IO-Client-Swift'

   target 'Artsy Tests' do
-      inherit! :search_paths
-
-      # Temporary, should be removed post CP 1.0
-      # https://github.com/facebook/ios-snapshot-test-case/pull/141
-      pod 'FBSnapshotTestCase', git: 'https://github.com/orta/ios-snapshot-test-case.git'
-      pod 'Expecta+Snapshots'
-      pod 'OHHTTPStubs'
-      pod 'XCTest+OHHTTPStubSuiteCleanUp'
-      pod 'Specta'
-      pod 'Expecta'
-      pod 'OCMock'
-      pod 'Forgeries/Mocks', :git => "https://github.com/ashfurrow/Forgeries.git", :branch => "application"
-
-      # Swift pods 🎉
-      pod 'Quick'
-      pod 'Nimble'
-      pod 'Nimble-Snapshots'
+    inherit! :search_paths
+
+    # Temporary, should be removed post CP 1.0
+    # https://github.com/facebook/ios-snapshot-test-case/pull/141
+    pod 'FBSnapshotTestCase', git: 'https://github.com/orta/ios-snapshot-test-case.git'
+    pod 'Expecta+Snapshots'
+    pod 'OHHTTPStubs'
+    pod 'XCTest+OHHTTPStubSuiteCleanUp'
+    pod 'Specta'
+    pod 'Expecta'
+    pod 'OCMock'
+    pod 'Forgeries/Mocks', :git => "https://github.com/ashfurrow/Forgeries.git", :branch => "application"
+
+    # Swift pods 🎉
+    pod 'Quick'
+    pod 'Nimble'
+    pod 'Nimble-Snapshots'
   end
 end
@segiddins
Copy link
Member

If possible I'd prefer to use rubocop since that's what we use across all the different CocoaPods projects

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants