Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'experimental'

  • Loading branch information...
commit 34280eeea9fd7666e5364fdc3ff77ee78a339401 2 parents 6d32aca + 2b006dd
Manfred Stienstra Manfred authored
Showing with 8,326 additions and 14,755 deletions.
  1. +6 −1 .gitignore
  2. +35 −0 .kick
  3. BIN  English.lproj/InfoPlist.strings
  4. +563 −1,044 English.lproj/PassengerPref.xib
  5. +14 −14 Info.plist
  6. +53 −2 LICENSE
  7. +397 −90 Passenger.xcodeproj/project.pbxproj
  8. +7 −0 Passenger.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  9. +32 −0 PassengerTest-Info.plist
  10. +7 −0 PassengerTest-Prefix.pch
  11. +4 −4 Passenger_Prefix.pch
  12. +50 −48 Rakefile
  13. +0 −9 app/config/passenger_pane_config.rb
  14. +0 −9 app/config/passenger_pane_config.rb.ports
  15. +53 −0 app/controllers/PassengerPref.h
  16. +288 −8 app/controllers/PassengerPref.m
  17. +0 −332 app/controllers/passenger_pref.rb
  18. +37 −0 app/models/Application.h
  19. +137 −0 app/models/Application.m
  20. +0 −286 app/models/passenger_application.rb
  21. +0 −96 app/scripts/config_installer.rb
  22. +0 −55 app/scripts/config_uninstaller.rb
  23. +0 −30 app/scripts/hosts_installer.rb
  24. +39 −0 app/utils/CLI.h
  25. +190 −0 app/utils/CLI.m
  26. +9 −0 app/utils/Common.h
  27. +0 −10 app/utils/HelpHelper.h
  28. +0 −21 app/utils/HelpHelper.m
  29. +0 −14 app/utils/SecurityHelper.h
  30. +0 −81 app/utils/SecurityHelper.m
  31. +0 −28 app/utils/shared_passenger_behaviour.rb
  32. +10 −0 bin/ppane
  33. +30 −0 doc/DEVELOPMENT
  34. +2 −6 doc/TODO
  35. +2 −0  en.lproj/InfoPlist.strings
  36. +62 −0 lib/crock.rb
  37. +28 −0 lib/option_parser.rb
  38. +9 −0 lib/passenger_pane.rb
  39. +219 −0 lib/passenger_pane/application.rb
  40. +54 −0 lib/passenger_pane/configuration.rb
  41. +19 −0 lib/passenger_pane/directory_services.rb
  42. +66 −0 lib/passenger_pane/httpd_conf.rb
  43. +176 −0 lib/passenger_pane/runner.rb
  44. +7 −0 lib/passenger_pane/trust.rb
  45. +25 −0 ppane.gemspec
  46. +0 −5,680 resources/Security.bridgesupport
  47. 0  test/{ → attic}/config_installer_test.rb
  48. 0  test/{ → attic}/config_uninstaller_test.rb
  49. 0  test/{ → attic}/fixtures/blog.vhost.conf
  50. 0  test/{ → attic}/fixtures/franky.vhost.conf
  51. 0  test/{ → attic}/fixtures/staging.vhost.conf
  52. 0  test/{ → attic}/fixtures/wiki.vhost.conf
  53. 0  test/{ → attic}/hosts_installer_test.rb
  54. 0  test/{ → attic}/passenger_application_test.rb
  55. 0  test/{ → attic}/passenger_pref_test.rb
  56. 0  test/{ → attic}/shared_passenger_behaviour_test.rb
  57. 0  test/{ → attic}/test_helper.rb
  58. +19 −0 test/passenger_pane/NuBacon/LICENSE
  59. +305 −0 test/passenger_pane/NuBacon/README.md
  60. +7 −0 test/passenger_pane/NuBacon/TODO
  61. +94 −0 test/passenger_pane/NuBacon/bacon.nu
  62. +108 −0 test/passenger_pane/NuBacon/bacon_context.nu
  63. +103 −0 test/passenger_pane/NuBacon/bacon_macros.nu
  64. +227 −0 test/passenger_pane/NuBacon/bacon_should.nu
  65. +437 −0 test/passenger_pane/NuBacon/bacon_spec.nu
  66. +111 −0 test/passenger_pane/NuBacon/bacon_specification.nu
  67. +61 −0 test/passenger_pane/NuBacon/bacon_summary.nu
  68. +56 −0 test/passenger_pane/NuBacon/readme_spec.nu
  69. +169 −0 test/passenger_pane/application_test.nu
  70. +62 −0 test/passenger_pane/cli_test.nu
  71. +19 −0 test/passenger_pane/fake_ppane/ppane
  72. +10 −0 test/passenger_pane/test_helper.nu
  73. +255 −0 test/ppane/application_test.rb
  74. +35 −0 test/ppane/configuration_test.rb
  75. +25 −0 test/ppane/directory_services_test.rb
  76. +509 −0 test/ppane/fake/etc/apache2/httpd.conf
  77. +10 −0 test/ppane/fake/etc/apache2/passenger_pane_vhosts/blog.vhost.conf
  78. +9 −0 test/ppane/fake/etc/apache2/passenger_pane_vhosts/franky.vhost.conf
  79. +9 −0 test/ppane/fake/etc/apache2/passenger_pane_vhosts/noenv.vhost.conf
  80. +9 −0 test/ppane/fake/etc/apache2/passenger_pane_vhosts/staging.vhost.conf
  81. +12 −0 test/ppane/fake/etc/apache2/passenger_pane_vhosts/wiki.vhost.conf
  82. +143 −0 test/ppane/httpd_conf_test.rb
  83. +141 −0 test/ppane/runner_test.rb
  84. +28 −0 test/ppane/test_helper.rb
  85. +63 −0 test/ppane/test_helper/add_allow_switch.rb
  86. +151 −0 test/ppane/test_helper/add_allow_switch_test.rb
  87. +27 −0 test/ppane/test_helper/capture_output.rb
  88. +15 −0 test/ppane/test_helper/collector.rb
  89. +15 −0 test/ppane/test_helper/fake_apache_directory.rb
  90. +23 −0 test/ppane/test_helper/temporary_directory.rb
  91. +0 −1  vendor/RubyCocoa.framework/Headers
  92. +0 −1  vendor/RubyCocoa.framework/Resources
  93. +0 −1  vendor/RubyCocoa.framework/RubyCocoa
  94. +0 −38 vendor/RubyCocoa.framework/Versions/A/Headers/RBObject.h
  95. +0 −58 vendor/RubyCocoa.framework/Versions/A/Headers/RBRuntime.h
  96. +0 −31 vendor/RubyCocoa.framework/Versions/A/Headers/RubyCocoa.h
  97. +0 −507 vendor/RubyCocoa.framework/Versions/A/Headers/osx_intern.h
  98. +0 −772 vendor/RubyCocoa.framework/Versions/A/Headers/osx_ruby.h
  99. +0 −28 vendor/RubyCocoa.framework/Versions/A/Resources/Info.plist
  100. +0 −9 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/active_record.rb
  101. +0 −11 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/addressbook.rb
  102. +0 −9 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/appkit.rb
  103. +0 −8 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/cocoa.rb
  104. +0 −11 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/coredata.rb
  105. +0 −458 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/active_record.rb
  106. +0 −37 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/application.rb
  107. +0 −14 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/cocoa.rb
  108. +0 −124 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/cocoa_macros.rb
  109. +0 −42 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/cocoa_macros_appkit.rb
  110. +0 −18 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/foundation.rb
  111. +0 −14 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/oc_all.rb
  112. +0 −2,385 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/oc_attachments.rb
  113. +0 −21 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/oc_attachments_appkit.rb
  114. +0 −53 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/oc_bundle_support.rb
  115. +0 −35 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/oc_exception.rb
  116. +0 −792 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/oc_import.rb
  117. +0 −91 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/oc_types.rb
  118. +0 −66 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/oc_types_appkit.rb
  119. +0 −150 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/oc_wrapper.rb
  120. +0 −113 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/objc/ruby_addition.rb
  121. +0 −11 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/qtkit.rb
  122. +0 −11 vendor/RubyCocoa.framework/Versions/A/Resources/ruby/osx/webkit.rb
  123. BIN  vendor/RubyCocoa.framework/Versions/A/RubyCocoa
  124. +0 −122 vendor/RubyCocoa.framework/Versions/A/Tools/gen_bridge_doc.rb
  125. +0 −443 vendor/RubyCocoa.framework/Versions/A/Tools/rb_nibtool.rb
  126. +0 −401 vendor/RubyCocoa.framework/Versions/A/Tools/standaloneify.rb
  127. +0 −1  vendor/RubyCocoa.framework/Versions/Current
  128. +71 −0 vendor/TouchJSON/CDataScanner.h
  129. +340 −0 vendor/TouchJSON/CDataScanner.m
  130. +25 −0 vendor/TouchJSON/Experimental/CFilteringJSONSerializer.h
  131. +87 −0 vendor/TouchJSON/Experimental/CFilteringJSONSerializer.m
  132. +16 −0 vendor/TouchJSON/Experimental/CJSONDeserializer_BlocksExtensions.h
  133. +63 −0 vendor/TouchJSON/Experimental/CJSONDeserializer_BlocksExtensions.m
  134. +34 −0 vendor/TouchJSON/Experimental/CJSONSerialization.h
  135. +59 −0 vendor/TouchJSON/Experimental/CJSONSerialization.m
  136. +25 −0 vendor/TouchJSON/Experimental/CJSONSerializedData.h
  137. +42 −0 vendor/TouchJSON/Experimental/CJSONSerializedData.m
  138. +40 −0 vendor/TouchJSON/Extensions/CDataScanner_Extensions.h
  139. +135 −0 vendor/TouchJSON/Extensions/CDataScanner_Extensions.m
  140. +37 −0 vendor/TouchJSON/Extensions/NSDictionary_JSONExtensions.h
  141. +47 −0 vendor/TouchJSON/Extensions/NSDictionary_JSONExtensions.m
  142. +63 −0 vendor/TouchJSON/JSON/CJSONDeserializer.h
  143. +161 −0 vendor/TouchJSON/JSON/CJSONDeserializer.m
  144. +95 −0 vendor/TouchJSON/JSON/CJSONScanner.h
  145. +676 −0 vendor/TouchJSON/JSON/CJSONScanner.m
  146. +53 −0 vendor/TouchJSON/JSON/CJSONSerializer.h
  147. +342 −0 vendor/TouchJSON/JSON/CJSONSerializer.m
  148. +18 −0 vendor/TouchJSON/JSON/JSONRepresentation.h
7 .gitignore
View
@@ -2,4 +2,9 @@ build
.DS_Store
Passenger.xcodeproj/*.mode1v3
Passenger.xcodeproj/*.pbxuser
-pkg
+pkg
+tmp
+Passenger.xcodeproj/project.xcworkspace/xcuserdata/*
+Passenger.xcodeproj/xcuserdata/*
+*.gem
+test/passenger_pane/PassengerTest.framework
35 .kick
View
@@ -0,0 +1,35 @@
+recipe :ignore
+ignore(/^(tmp|Passenger.xcodeproj)/)
+
+recipe :ruby
+
+module Nu
+ def self.run_tests(files)
+ test_directory = File.expand_path('../test/passenger_pane', __FILE__)
+ files.each do |file|
+ if File.exist?(File.join(test_directory, file))
+ execute "cd #{test_directory}; /usr/local/bin/nush #{file}"
+ end
+ end
+ end
+end
+
+process do |files|
+ Ruby.run_tests(files.take_and_map do |file|
+ case file
+ when %r{^test/ppane/test_helper/add_allow_switch.rb$}
+ 'test/ppane/test_helper/add_allow_switch_test.rb'
+ end
+ end)
+
+ Nu.run_tests(files.take_and_map do |file|
+ case file
+ when %r{^app/.*\.[mh]$}
+ filename = File.basename(file.downcase)
+ parts = filename.split('.')
+ "#{parts[0..-2]}_test.nu"
+ when %r{^test/passenger_pane/.*_test\.nu$}
+ File.basename(file)
+ end
+ end)
+end
BIN  English.lproj/InfoPlist.strings
View
Binary file not shown
1,607 English.lproj/PassengerPref.xib
View
563 additions, 1,044 deletions not shown
28 Info.plist
View
@@ -6,6 +6,10 @@
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleHelpBookFolder</key>
+ <string>PassengerPaneHelp</string>
+ <key>CFBundleHelpBookName</key>
+ <string>PassengerPaneHelp</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
@@ -24,24 +28,20 @@
<string>1.5</string>
<key>NSMainNibFile</key>
<string>PassengerPref</string>
+ <key>NSPrefPaneHelpAnchors</key>
+ <array>
+ <dict>
+ <key>anchor</key>
+ <string>main_passenger_help</string>
+ <key>title</key>
+ <string>Passenger Preferences Help</string>
+ </dict>
+ </array>
<key>NSPrefPaneIconFile</key>
<string>PassengerPref.icns</string>
<key>NSPrefPaneIconLabel</key>
<string>Passenger</string>
<key>NSPrincipalClass</key>
- <string>PrefPanePassenger</string>
- <key>CFBundleHelpBookFolder</key>
- <string>PassengerPaneHelp</string>
- <key>CFBundleHelpBookName</key>
- <string>PassengerPaneHelp</string>
- <key>NSPrefPaneHelpAnchors</key>
- <array>
- <dict>
- <key>title</key>
- <string>Passenger Preferences Help</string>
- <key>anchor</key>
- <string>main_passenger_help</string>
- </dict>
- </array>
+ <string>PassengerPref</string>
</dict>
</plist>
55 LICENSE
View
@@ -1,6 +1,57 @@
-Copyright © 2008-2009, Fingertips, http://www.fngtps.com,
+Copyright © 2008-2010, Fingertips, http://www.fngtps.com,
Eloy Duran <eloy@fngtps.com>,
- Thijs van der Vossen <thijs@fngtps.com>
+ Thijs van der Vossen <thijs@fngtps.com>,
+ Manfred Stienstra <manfred@fngtps.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+The Passenger Preference Pane ships with external libraries some require us
+to copy their license:
+
+TouchJSON
+
+Copyright (c) 2008 Jonathan Wight
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+NuBacon
+
+Copyright (C) 2010 Eloy Durán <eloy.de.enige@gmail.com>, Fingertips BV <fngtps.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
487 Passenger.xcodeproj/project.pbxproj
View
@@ -7,33 +7,57 @@
objects = {
/* Begin PBXBuildFile section */
- 511960C3104D5741009D4368 /* hosts_installer.rb in Resources */ = {isa = PBXBuildFile; fileRef = 511960C2104D5741009D4368 /* hosts_installer.rb */; };
- 516B1B6E0DD3D344009ADB8E /* config_installer.rb in Resources */ = {isa = PBXBuildFile; fileRef = 516B1B6D0DD3D344009ADB8E /* config_installer.rb */; };
5186C31F0E090C9C008D8E1F /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5186C31E0E090C9C008D8E1F /* Carbon.framework */; };
5189C6E70E111C3300B83EA5 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 5189C6E60E111C3300B83EA5 /* LICENSE */; };
518C7F560E06745E003A3ED0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 518C7F550E06745E003A3ED0 /* Security.framework */; };
- 518C7F730E06A668003A3ED0 /* Security.bridgesupport in Resources */ = {isa = PBXBuildFile; fileRef = 518C7F720E06A668003A3ED0 /* Security.bridgesupport */; };
- 518C7F760E06B665003A3ED0 /* SecurityHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 518C7F740E06B665003A3ED0 /* SecurityHelper.h */; };
- 518C7F770E06B665003A3ED0 /* SecurityHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 518C7F750E06B665003A3ED0 /* SecurityHelper.m */; };
- 519DFB9F0DFDD825008A42FE /* passenger_application.rb in Resources */ = {isa = PBXBuildFile; fileRef = 519DFB9E0DFDD825008A42FE /* passenger_application.rb */; };
- 519DFBA90DFE8EAF008A42FE /* shared_passenger_behaviour.rb in Resources */ = {isa = PBXBuildFile; fileRef = 519DFBA70DFE8EAF008A42FE /* shared_passenger_behaviour.rb */; };
- 51A703B10E648641006A1E26 /* passenger_pane_config.rb in Resources */ = {isa = PBXBuildFile; fileRef = 51A703B00E648641006A1E26 /* passenger_pane_config.rb */; };
51B9190D0E01523900F45803 /* Alerts.icns in Resources */ = {isa = PBXBuildFile; fileRef = 51B9190C0E01523900F45803 /* Alerts.icns */; };
- 51B919140E0172C200F45803 /* config_uninstaller.rb in Resources */ = {isa = PBXBuildFile; fileRef = 51B919130E0172C200F45803 /* config_uninstaller.rb */; };
51D45407109843A6003978A9 /* label.png in Resources */ = {isa = PBXBuildFile; fileRef = 51D45405109843A6003978A9 /* label.png */; };
51D45408109843A6003978A9 /* PassengerPref.icns in Resources */ = {isa = PBXBuildFile; fileRef = 51D45406109843A6003978A9 /* PassengerPref.icns */; };
- 51DA08CB104C025000C8C106 /* RubyCocoa.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 9648B5E70D195BC700DC73E2 /* RubyCocoa.framework */; };
- 51EED8C2104E561800AC7D3E /* PassengerPaneHelp in Resources */ = {isa = PBXBuildFile; fileRef = 51EED8B3104E561800AC7D3E /* PassengerPaneHelp */; };
- 51EED909104E9F0200AC7D3E /* HelpHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EED907104E9F0200AC7D3E /* HelpHelper.h */; };
- 51EED90A104E9F0200AC7D3E /* HelpHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 51EED908104E9F0200AC7D3E /* HelpHelper.m */; };
+ 6333C0D912C216AA00080A38 /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = 6333C0D812C216AA00080A38 /* Common.h */; };
+ 6361753812B794C400E3412D /* PassengerPref.h in Headers */ = {isa = PBXBuildFile; fileRef = 6361753712B794C400E3412D /* PassengerPref.h */; };
+ 6361755312B7C18F00E3412D /* bin in Resources */ = {isa = PBXBuildFile; fileRef = 6361755112B7C18F00E3412D /* bin */; };
+ 6361755412B7C18F00E3412D /* lib in Resources */ = {isa = PBXBuildFile; fileRef = 6361755212B7C18F00E3412D /* lib */; };
+ 6361755712B7C4B500E3412D /* CLI.h in Headers */ = {isa = PBXBuildFile; fileRef = 6361755512B7C4B500E3412D /* CLI.h */; };
+ 6361755812B7C4B500E3412D /* CLI.m in Sources */ = {isa = PBXBuildFile; fileRef = 6361755612B7C4B500E3412D /* CLI.m */; };
+ 63CE7E691324E58500EB042C /* CDataScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E511324E58500EB042C /* CDataScanner.h */; };
+ 63CE7E6A1324E58500EB042C /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E521324E58500EB042C /* CDataScanner.m */; };
+ 63CE7E6B1324E58500EB042C /* CFilteringJSONSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E541324E58500EB042C /* CFilteringJSONSerializer.h */; };
+ 63CE7E6D1324E58500EB042C /* CJSONDeserializer_BlocksExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E561324E58500EB042C /* CJSONDeserializer_BlocksExtensions.h */; };
+ 63CE7E6F1324E58500EB042C /* CJSONSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E581324E58500EB042C /* CJSONSerialization.h */; };
+ 63CE7E711324E58500EB042C /* CJSONSerializedData.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E5A1324E58500EB042C /* CJSONSerializedData.h */; };
+ 63CE7E731324E58500EB042C /* CDataScanner_Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E5D1324E58500EB042C /* CDataScanner_Extensions.h */; };
+ 63CE7E751324E58500EB042C /* NSDictionary_JSONExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E5F1324E58500EB042C /* NSDictionary_JSONExtensions.h */; };
+ 63CE7E771324E58500EB042C /* CJSONDeserializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E621324E58500EB042C /* CJSONDeserializer.h */; };
+ 63CE7E781324E58500EB042C /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E631324E58500EB042C /* CJSONDeserializer.m */; };
+ 63CE7E791324E58500EB042C /* CJSONScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E641324E58500EB042C /* CJSONScanner.h */; };
+ 63CE7E7A1324E58500EB042C /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E651324E58500EB042C /* CJSONScanner.m */; };
+ 63CE7E7B1324E58500EB042C /* CJSONSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E661324E58500EB042C /* CJSONSerializer.h */; };
+ 63CE7E7C1324E58500EB042C /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E671324E58500EB042C /* CJSONSerializer.m */; };
+ 63CE7E7D1324E58500EB042C /* JSONRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 63CE7E681324E58500EB042C /* JSONRepresentation.h */; };
+ 63CE7E821324EC8200EB042C /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E521324E58500EB042C /* CDataScanner.m */; };
+ 63CE7E831324EC8200EB042C /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E631324E58500EB042C /* CJSONDeserializer.m */; };
+ 63CE7E841324EC8200EB042C /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E651324E58500EB042C /* CJSONScanner.m */; };
+ 63CE7E851324EC8200EB042C /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E671324E58500EB042C /* CJSONSerializer.m */; };
+ 63CE7E8A13251AB200EB042C /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E5E1324E58500EB042C /* CDataScanner_Extensions.m */; };
+ 63CE7E8B13251AB200EB042C /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E601324E58500EB042C /* NSDictionary_JSONExtensions.m */; };
+ 63CE7E8C13251AC000EB042C /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E5E1324E58500EB042C /* CDataScanner_Extensions.m */; };
+ 63CE7E8D13251AC000EB042C /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 63CE7E601324E58500EB042C /* NSDictionary_JSONExtensions.m */; };
+ 63EF8CFF12DC8FC00063C6CD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63EF8CFE12DC8FC00063C6CD /* Cocoa.framework */; };
+ 63EF8D0412DC8FC10063C6CD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 63EF8D0212DC8FC10063C6CD /* InfoPlist.strings */; };
+ 63EF8D0C12DC8FE10063C6CD /* CLI.m in Sources */ = {isa = PBXBuildFile; fileRef = 6361755612B7C4B500E3412D /* CLI.m */; };
+ 63EF8D0D12DC8FE30063C6CD /* PassengerPref.m in Sources */ = {isa = PBXBuildFile; fileRef = F506C03D013D9D7901CA16C8 /* PassengerPref.m */; };
+ 63EF8D0E12DC8FE40063C6CD /* Application.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F589EA12BA6B5200D959E3 /* Application.m */; };
+ 63EF8D1212DC91070063C6CD /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63EF8D1112DC91070063C6CD /* PreferencePanes.framework */; };
+ 63EF8D1412DC910F0063C6CD /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63EF8D1312DC910F0063C6CD /* Security.framework */; };
+ 63EF8D1612DC91140063C6CD /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63EF8D1512DC91140063C6CD /* Carbon.framework */; };
+ 63F589EB12BA6B5300D959E3 /* Application.h in Headers */ = {isa = PBXBuildFile; fileRef = 63F589E912BA6B5200D959E3 /* Application.h */; };
+ 63F589EC12BA6B5300D959E3 /* Application.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F589EA12BA6B5200D959E3 /* Application.m */; };
76890D45109F7E9700097BC5 /* OpenInBrowserTemplate.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 76890D44109F7E9700097BC5 /* OpenInBrowserTemplate.tiff */; };
8D202CEA0486D31800D8A456 /* Passenger_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCFA20370C41700C91783 /* Passenger_Prefix.pch */; };
8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
8D202CF10486D31800D8A456 /* PassengerPref.m in Sources */ = {isa = PBXBuildFile; fileRef = F506C03D013D9D7901CA16C8 /* PassengerPref.m */; };
8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F506C035013D953901CA16C8 /* PreferencePanes.framework */; };
- 9648B5E80D195BC700DC73E2 /* RubyCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9648B5E70D195BC700DC73E2 /* RubyCocoa.framework */; };
- 9648B5EC0D195BF200DC73E2 /* passenger_pref.rb in Resources */ = {isa = PBXBuildFile; fileRef = 9648B5EB0D195BF200DC73E2 /* passenger_pref.rb */; };
9648B5F00D195C2F00DC73E2 /* Pref.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9648B5EE0D195C2F00DC73E2 /* Pref.xib */; };
/* End PBXBuildFile section */
@@ -44,7 +68,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
- 51DA08CB104C025000C8C106 /* RubyCocoa.framework in Copy Frameworks */,
);
name = "Copy Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -57,42 +80,75 @@
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
32DBCFA20370C41700C91783 /* Passenger_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Passenger_Prefix.pch; sourceTree = "<group>"; };
- 511960C2104D5741009D4368 /* hosts_installer.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; name = hosts_installer.rb; path = app/scripts/hosts_installer.rb; sourceTree = "<group>"; };
- 516B1B6D0DD3D344009ADB8E /* config_installer.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; name = config_installer.rb; path = app/scripts/config_installer.rb; sourceTree = "<group>"; };
5186C31E0E090C9C008D8E1F /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
5189C6E60E111C3300B83EA5 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
518C7F550E06745E003A3ED0 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
- 518C7F720E06A668003A3ED0 /* Security.bridgesupport */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = Security.bridgesupport; path = resources/Security.bridgesupport; sourceTree = "<group>"; };
- 518C7F740E06B665003A3ED0 /* SecurityHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SecurityHelper.h; path = app/utils/SecurityHelper.h; sourceTree = "<group>"; };
- 518C7F750E06B665003A3ED0 /* SecurityHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SecurityHelper.m; path = app/utils/SecurityHelper.m; sourceTree = "<group>"; };
- 519DFB9E0DFDD825008A42FE /* passenger_application.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; name = passenger_application.rb; path = app/models/passenger_application.rb; sourceTree = "<group>"; };
- 519DFBA70DFE8EAF008A42FE /* shared_passenger_behaviour.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; name = shared_passenger_behaviour.rb; path = app/utils/shared_passenger_behaviour.rb; sourceTree = "<group>"; };
- 51A703B00E648641006A1E26 /* passenger_pane_config.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; name = passenger_pane_config.rb; path = app/config/passenger_pane_config.rb; sourceTree = "<group>"; };
51B9190C0E01523900F45803 /* Alerts.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Alerts.icns; path = resources/Alerts.icns; sourceTree = "<group>"; };
- 51B919130E0172C200F45803 /* config_uninstaller.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; name = config_uninstaller.rb; path = app/scripts/config_uninstaller.rb; sourceTree = "<group>"; };
51D45405109843A6003978A9 /* label.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = label.png; path = resources/label.png; sourceTree = "<group>"; };
51D45406109843A6003978A9 /* PassengerPref.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = PassengerPref.icns; path = resources/PassengerPref.icns; sourceTree = "<group>"; };
- 51EED8B4104E561800AC7D3E /* English */ = {isa = PBXFileReference; lastKnownFileType = folder; name = English; path = English.lproj/PassengerPaneHelp; sourceTree = "<group>"; };
- 51EED907104E9F0200AC7D3E /* HelpHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HelpHelper.h; path = ../../app/utils/HelpHelper.h; sourceTree = BUILT_PRODUCTS_DIR; };
- 51EED908104E9F0200AC7D3E /* HelpHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HelpHelper.m; path = ../../app/utils/HelpHelper.m; sourceTree = BUILT_PRODUCTS_DIR; };
+ 6333C0D812C216AA00080A38 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Common.h; path = app/utils/Common.h; sourceTree = "<group>"; };
+ 6361753712B794C400E3412D /* PassengerPref.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PassengerPref.h; path = app/controllers/PassengerPref.h; sourceTree = "<group>"; };
+ 6361755112B7C18F00E3412D /* bin */ = {isa = PBXFileReference; lastKnownFileType = folder; path = bin; sourceTree = "<group>"; };
+ 6361755212B7C18F00E3412D /* lib */ = {isa = PBXFileReference; lastKnownFileType = folder; path = lib; sourceTree = "<group>"; };
+ 6361755512B7C4B500E3412D /* CLI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLI.h; path = app/utils/CLI.h; sourceTree = "<group>"; };
+ 6361755612B7C4B500E3412D /* CLI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLI.m; path = app/utils/CLI.m; sourceTree = "<group>"; };
+ 63CE7E511324E58500EB042C /* CDataScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner.h; sourceTree = "<group>"; };
+ 63CE7E521324E58500EB042C /* CDataScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner.m; sourceTree = "<group>"; };
+ 63CE7E541324E58500EB042C /* CFilteringJSONSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFilteringJSONSerializer.h; sourceTree = "<group>"; };
+ 63CE7E551324E58500EB042C /* CFilteringJSONSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CFilteringJSONSerializer.m; sourceTree = "<group>"; };
+ 63CE7E561324E58500EB042C /* CJSONDeserializer_BlocksExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDeserializer_BlocksExtensions.h; sourceTree = "<group>"; };
+ 63CE7E571324E58500EB042C /* CJSONDeserializer_BlocksExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDeserializer_BlocksExtensions.m; sourceTree = "<group>"; };
+ 63CE7E581324E58500EB042C /* CJSONSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerialization.h; sourceTree = "<group>"; };
+ 63CE7E591324E58500EB042C /* CJSONSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerialization.m; sourceTree = "<group>"; };
+ 63CE7E5A1324E58500EB042C /* CJSONSerializedData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerializedData.h; sourceTree = "<group>"; };
+ 63CE7E5B1324E58500EB042C /* CJSONSerializedData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerializedData.m; sourceTree = "<group>"; };
+ 63CE7E5D1324E58500EB042C /* CDataScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner_Extensions.h; sourceTree = "<group>"; };
+ 63CE7E5E1324E58500EB042C /* CDataScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner_Extensions.m; sourceTree = "<group>"; };
+ 63CE7E5F1324E58500EB042C /* NSDictionary_JSONExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDictionary_JSONExtensions.h; sourceTree = "<group>"; };
+ 63CE7E601324E58500EB042C /* NSDictionary_JSONExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDictionary_JSONExtensions.m; sourceTree = "<group>"; };
+ 63CE7E621324E58500EB042C /* CJSONDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDeserializer.h; sourceTree = "<group>"; };
+ 63CE7E631324E58500EB042C /* CJSONDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDeserializer.m; sourceTree = "<group>"; };
+ 63CE7E641324E58500EB042C /* CJSONScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONScanner.h; sourceTree = "<group>"; };
+ 63CE7E651324E58500EB042C /* CJSONScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONScanner.m; sourceTree = "<group>"; };
+ 63CE7E661324E58500EB042C /* CJSONSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerializer.h; sourceTree = "<group>"; };
+ 63CE7E671324E58500EB042C /* CJSONSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerializer.m; sourceTree = "<group>"; };
+ 63CE7E681324E58500EB042C /* JSONRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONRepresentation.h; sourceTree = "<group>"; };
+ 63EF8CFD12DC8FC00063C6CD /* PassengerTest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PassengerTest.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 63EF8CFE12DC8FC00063C6CD /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ 63EF8D0012DC8FC10063C6CD /* PassengerTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PassengerTest-Info.plist"; sourceTree = "<group>"; };
+ 63EF8D0112DC8FC10063C6CD /* PassengerTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PassengerTest-Prefix.pch"; sourceTree = "<group>"; };
+ 63EF8D0312DC8FC10063C6CD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 63EF8D1112DC91070063C6CD /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = System/Library/Frameworks/PreferencePanes.framework; sourceTree = SDKROOT; };
+ 63EF8D1312DC910F0063C6CD /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
+ 63EF8D1512DC91140063C6CD /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
+ 63F589E912BA6B5200D959E3 /* Application.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Application.h; path = app/models/Application.h; sourceTree = "<group>"; };
+ 63F589EA12BA6B5200D959E3 /* Application.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Application.m; path = app/models/Application.m; sourceTree = "<group>"; };
76890D44109F7E9700097BC5 /* OpenInBrowserTemplate.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = OpenInBrowserTemplate.tiff; path = resources/OpenInBrowserTemplate.tiff; sourceTree = "<group>"; };
8D202CF70486D31800D8A456 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D202CF80486D31800D8A456 /* Passenger.prefPane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Passenger.prefPane; sourceTree = BUILT_PRODUCTS_DIR; };
- 9648B5E70D195BC700DC73E2 /* RubyCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RubyCocoa.framework; path = vendor/RubyCocoa.framework; sourceTree = "<group>"; };
- 9648B5EB0D195BF200DC73E2 /* passenger_pref.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; name = passenger_pref.rb; path = app/controllers/passenger_pref.rb; sourceTree = "<group>"; };
9648B5EF0D195C2F00DC73E2 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PassengerPref.xib; sourceTree = "<group>"; };
F506C035013D953901CA16C8 /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = /System/Library/Frameworks/PreferencePanes.framework; sourceTree = "<absolute>"; };
F506C03D013D9D7901CA16C8 /* PassengerPref.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PassengerPref.m; path = app/controllers/PassengerPref.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ 63EF8CF912DC8FC00063C6CD /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63EF8D1612DC91140063C6CD /* Carbon.framework in Frameworks */,
+ 63EF8D1412DC910F0063C6CD /* Security.framework in Frameworks */,
+ 63EF8D1212DC91070063C6CD /* PreferencePanes.framework in Frameworks */,
+ 63EF8CFF12DC8FC00063C6CD /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8D202CF20486D31800D8A456 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */,
8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */,
- 9648B5E80D195BC700DC73E2 /* RubyCocoa.framework in Frameworks */,
518C7F560E06745E003A3ED0 /* Security.framework in Frameworks */,
5186C31F0E090C9C008D8E1F /* Carbon.framework in Frameworks */,
);
@@ -104,11 +160,15 @@
089C166AFE841209C02AAC07 /* Passenger */ = {
isa = PBXGroup;
children = (
+ 5189C6E60E111C3300B83EA5 /* LICENSE */,
+ 6333C0D812C216AA00080A38 /* Common.h */,
+ 63CE7E501324E58500EB042C /* TouchJSON */,
08FB77AFFE84173DC02AAC07 /* Classes */,
32DBCFA10370C40200C91783 /* Other Sources */,
089C167CFE841241C02AAC07 /* Resources */,
089C1671FE841209C02AAC07 /* Frameworks and Libraries */,
19C28FB8FE9D52D311CA2CBB /* Products */,
+ 63EF8CF712DC8FC00063C6CD /* Frameworks */,
);
name = Passenger;
sourceTree = "<group>";
@@ -126,24 +186,18 @@
isa = PBXGroup;
children = (
51D45405109843A6003978A9 /* label.png */,
+ 6361755112B7C18F00E3412D /* bin */,
+ 6361755212B7C18F00E3412D /* lib */,
51D45406109843A6003978A9 /* PassengerPref.icns */,
- 511960C2104D5741009D4368 /* hosts_installer.rb */,
- 519DFB9E0DFDD825008A42FE /* passenger_application.rb */,
- 518C7F720E06A668003A3ED0 /* Security.bridgesupport */,
- 51A703B00E648641006A1E26 /* passenger_pane_config.rb */,
- 51B919130E0172C200F45803 /* config_uninstaller.rb */,
51B9190C0E01523900F45803 /* Alerts.icns */,
9648B5EE0D195C2F00DC73E2 /* Pref.xib */,
8D202CF70486D31800D8A456 /* Info.plist */,
- 51EED8B3104E561800AC7D3E /* PassengerPaneHelp */,
- 51EED907104E9F0200AC7D3E /* HelpHelper.h */,
- 51EED908104E9F0200AC7D3E /* HelpHelper.m */,
- 51EED833104D7B8F00AC7D3E /* Passenger.help */,
5186C31E0E090C9C008D8E1F /* Carbon.framework */,
518C7F550E06745E003A3ED0 /* Security.framework */,
- 519DFBA70DFE8EAF008A42FE /* shared_passenger_behaviour.rb */,
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
76890D44109F7E9700097BC5 /* OpenInBrowserTemplate.tiff */,
+ 63EF8D0012DC8FC10063C6CD /* PassengerTest-Info.plist */,
+ 63EF8D0212DC8FC10063C6CD /* InfoPlist.strings */,
);
name = Resources;
sourceTree = "<group>";
@@ -151,10 +205,12 @@
08FB77AFFE84173DC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
- 9648B5EB0D195BF200DC73E2 /* passenger_pref.rb */,
+ 6361755512B7C4B500E3412D /* CLI.h */,
+ 6361755612B7C4B500E3412D /* CLI.m */,
+ 6361753712B794C400E3412D /* PassengerPref.h */,
F506C03D013D9D7901CA16C8 /* PassengerPref.m */,
- 5189C6E60E111C3300B83EA5 /* LICENSE */,
- 516B1B6D0DD3D344009ADB8E /* config_installer.rb */,
+ 63F589E912BA6B5200D959E3 /* Application.h */,
+ 63F589EA12BA6B5200D959E3 /* Application.m */,
);
name = Classes;
sourceTree = "<group>";
@@ -162,7 +218,6 @@
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
- 9648B5E70D195BC700DC73E2 /* RubyCocoa.framework */,
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */,
F506C035013D953901CA16C8 /* PreferencePanes.framework */,
);
@@ -173,8 +228,6 @@
isa = PBXGroup;
children = (
089C1672FE841209C02AAC07 /* Foundation.framework */,
- 518C7F740E06B665003A3ED0 /* SecurityHelper.h */,
- 518C7F750E06B665003A3ED0 /* SecurityHelper.m */,
089C167FFE841241C02AAC07 /* AppKit.framework */,
);
name = "Other Frameworks";
@@ -184,6 +237,7 @@
isa = PBXGroup;
children = (
8D202CF80486D31800D8A456 /* Passenger.prefPane */,
+ 63EF8CFD12DC8FC00063C6CD /* PassengerTest.framework */,
);
name = Products;
sourceTree = "<group>";
@@ -192,35 +246,74 @@
isa = PBXGroup;
children = (
32DBCFA20370C41700C91783 /* Passenger_Prefix.pch */,
+ 63EF8D0112DC8FC10063C6CD /* PassengerTest-Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
- 51EED833104D7B8F00AC7D3E /* Passenger.help */ = {
+ 63CE7E501324E58500EB042C /* TouchJSON */ = {
isa = PBXGroup;
children = (
- 51EED834104D7B8F00AC7D3E /* Contents */,
+ 63CE7E511324E58500EB042C /* CDataScanner.h */,
+ 63CE7E521324E58500EB042C /* CDataScanner.m */,
+ 63CE7E531324E58500EB042C /* Experimental */,
+ 63CE7E5C1324E58500EB042C /* Extensions */,
+ 63CE7E611324E58500EB042C /* JSON */,
);
- name = Passenger.help;
- path = ../../resources/Passenger.help;
- sourceTree = BUILT_PRODUCTS_DIR;
+ name = TouchJSON;
+ path = vendor/TouchJSON;
+ sourceTree = "<group>";
};
- 51EED834104D7B8F00AC7D3E /* Contents */ = {
+ 63CE7E531324E58500EB042C /* Experimental */ = {
isa = PBXGroup;
children = (
- 51EED836104D7B8F00AC7D3E /* Resources */,
+ 63CE7E541324E58500EB042C /* CFilteringJSONSerializer.h */,
+ 63CE7E551324E58500EB042C /* CFilteringJSONSerializer.m */,
+ 63CE7E561324E58500EB042C /* CJSONDeserializer_BlocksExtensions.h */,
+ 63CE7E571324E58500EB042C /* CJSONDeserializer_BlocksExtensions.m */,
+ 63CE7E581324E58500EB042C /* CJSONSerialization.h */,
+ 63CE7E591324E58500EB042C /* CJSONSerialization.m */,
+ 63CE7E5A1324E58500EB042C /* CJSONSerializedData.h */,
+ 63CE7E5B1324E58500EB042C /* CJSONSerializedData.m */,
);
- name = Contents;
- path = ../../resources/Passenger.help/Contents;
- sourceTree = BUILT_PRODUCTS_DIR;
+ path = Experimental;
+ sourceTree = "<group>";
};
- 51EED836104D7B8F00AC7D3E /* Resources */ = {
+ 63CE7E5C1324E58500EB042C /* Extensions */ = {
isa = PBXGroup;
children = (
+ 63CE7E5D1324E58500EB042C /* CDataScanner_Extensions.h */,
+ 63CE7E5E1324E58500EB042C /* CDataScanner_Extensions.m */,
+ 63CE7E5F1324E58500EB042C /* NSDictionary_JSONExtensions.h */,
+ 63CE7E601324E58500EB042C /* NSDictionary_JSONExtensions.m */,
);
- name = Resources;
- path = ../../resources/Passenger.help/Contents/Resources;
- sourceTree = BUILT_PRODUCTS_DIR;
+ path = Extensions;
+ sourceTree = "<group>";
+ };
+ 63CE7E611324E58500EB042C /* JSON */ = {
+ isa = PBXGroup;
+ children = (
+ 63CE7E621324E58500EB042C /* CJSONDeserializer.h */,
+ 63CE7E631324E58500EB042C /* CJSONDeserializer.m */,
+ 63CE7E641324E58500EB042C /* CJSONScanner.h */,
+ 63CE7E651324E58500EB042C /* CJSONScanner.m */,
+ 63CE7E661324E58500EB042C /* CJSONSerializer.h */,
+ 63CE7E671324E58500EB042C /* CJSONSerializer.m */,
+ 63CE7E681324E58500EB042C /* JSONRepresentation.h */,
+ );
+ path = JSON;
+ sourceTree = "<group>";
+ };
+ 63EF8CF712DC8FC00063C6CD /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 63EF8D1512DC91140063C6CD /* Carbon.framework */,
+ 63EF8D1312DC910F0063C6CD /* Security.framework */,
+ 63EF8D1112DC91070063C6CD /* PreferencePanes.framework */,
+ 63EF8CFE12DC8FC00063C6CD /* Cocoa.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
};
/* End PBXGroup section */
@@ -230,14 +323,45 @@
buildActionMask = 2147483647;
files = (
8D202CEA0486D31800D8A456 /* Passenger_Prefix.pch in Headers */,
- 518C7F760E06B665003A3ED0 /* SecurityHelper.h in Headers */,
- 51EED909104E9F0200AC7D3E /* HelpHelper.h in Headers */,
+ 6361753812B794C400E3412D /* PassengerPref.h in Headers */,
+ 6361755712B7C4B500E3412D /* CLI.h in Headers */,
+ 63F589EB12BA6B5300D959E3 /* Application.h in Headers */,
+ 6333C0D912C216AA00080A38 /* Common.h in Headers */,
+ 63CE7E691324E58500EB042C /* CDataScanner.h in Headers */,
+ 63CE7E6B1324E58500EB042C /* CFilteringJSONSerializer.h in Headers */,
+ 63CE7E6D1324E58500EB042C /* CJSONDeserializer_BlocksExtensions.h in Headers */,
+ 63CE7E6F1324E58500EB042C /* CJSONSerialization.h in Headers */,
+ 63CE7E711324E58500EB042C /* CJSONSerializedData.h in Headers */,
+ 63CE7E731324E58500EB042C /* CDataScanner_Extensions.h in Headers */,
+ 63CE7E751324E58500EB042C /* NSDictionary_JSONExtensions.h in Headers */,
+ 63CE7E771324E58500EB042C /* CJSONDeserializer.h in Headers */,
+ 63CE7E791324E58500EB042C /* CJSONScanner.h in Headers */,
+ 63CE7E7B1324E58500EB042C /* CJSONSerializer.h in Headers */,
+ 63CE7E7D1324E58500EB042C /* JSONRepresentation.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
+ 63EF8CFC12DC8FC00063C6CD /* PassengerTest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 63EF8D0712DC8FC10063C6CD /* Build configuration list for PBXNativeTarget "PassengerTest" */;
+ buildPhases = (
+ 63EF8CF812DC8FC00063C6CD /* Sources */,
+ 63EF8CF912DC8FC00063C6CD /* Frameworks */,
+ 63EF8CFB12DC8FC00063C6CD /* Resources */,
+ 63EF8D1712DC915C0063C6CD /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = PassengerTest;
+ productName = PassengerTest;
+ productReference = 63EF8CFD12DC8FC00063C6CD /* PassengerTest.framework */;
+ productType = "com.apple.product-type.framework";
+ };
8D202CE80486D31800D8A456 /* Passenger */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DBD214808BA80EA00186707 /* Build configuration list for PBXNativeTarget "Passenger" */;
@@ -245,10 +369,9 @@
8D202CE90486D31800D8A456 /* Headers */,
8D202CEC0486D31800D8A456 /* Resources */,
8D202CF00486D31800D8A456 /* Sources */,
+ 51DA08CA104BFFFE00C8C106 /* Copy Frameworks */,
8D202CF20486D31800D8A456 /* Frameworks */,
8D202CF50486D31800D8A456 /* Rez */,
- 51DA08CA104BFFFE00C8C106 /* Copy Frameworks */,
- 51195FED104C1D80009D4368 /* Update install_name */,
);
buildRules = (
);
@@ -267,37 +390,43 @@
isa = PBXProject;
buildConfigurationList = 1DBD214C08BA80EA00186707 /* Build configuration list for PBXProject "Passenger" */;
compatibilityVersion = "Xcode 3.0";
+ developmentRegion = English;
hasScannedForEncodings = 1;
+ knownRegions = (
+ en,
+ );
mainGroup = 089C166AFE841209C02AAC07 /* Passenger */;
projectDirPath = "";
projectRoot = "";
targets = (
8D202CE80486D31800D8A456 /* Passenger */,
+ 63EF8CFC12DC8FC00063C6CD /* PassengerTest */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
+ 63EF8CFB12DC8FC00063C6CD /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63EF8D0412DC8FC10063C6CD /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8D202CEC0486D31800D8A456 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */,
- 9648B5EC0D195BF200DC73E2 /* passenger_pref.rb in Resources */,
9648B5F00D195C2F00DC73E2 /* Pref.xib in Resources */,
- 516B1B6E0DD3D344009ADB8E /* config_installer.rb in Resources */,
- 519DFB9F0DFDD825008A42FE /* passenger_application.rb in Resources */,
- 519DFBA90DFE8EAF008A42FE /* shared_passenger_behaviour.rb in Resources */,
51B9190D0E01523900F45803 /* Alerts.icns in Resources */,
- 51B919140E0172C200F45803 /* config_uninstaller.rb in Resources */,
- 518C7F730E06A668003A3ED0 /* Security.bridgesupport in Resources */,
5189C6E70E111C3300B83EA5 /* LICENSE in Resources */,
- 51A703B10E648641006A1E26 /* passenger_pane_config.rb in Resources */,
- 511960C3104D5741009D4368 /* hosts_installer.rb in Resources */,
- 51EED8C2104E561800AC7D3E /* PassengerPaneHelp in Resources */,
51D45407109843A6003978A9 /* label.png in Resources */,
51D45408109843A6003978A9 /* PassengerPref.icns in Resources */,
76890D45109F7E9700097BC5 /* OpenInBrowserTemplate.tiff in Resources */,
+ 6361755312B7C18F00E3412D /* bin in Resources */,
+ 6361755412B7C18F00E3412D /* lib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -314,30 +443,51 @@
/* End PBXRezBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 51195FED104C1D80009D4368 /* Update install_name */ = {
+ 63EF8D1712DC915C0063C6CD /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
- name = "Update install_name";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "rake prefpane:change_ruycocoa_framework_location";
+ shellScript = "rake xcode:setup_test_framework";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 63EF8CF812DC8FC00063C6CD /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63CE7E8C13251AC000EB042C /* CDataScanner_Extensions.m in Sources */,
+ 63CE7E8D13251AC000EB042C /* NSDictionary_JSONExtensions.m in Sources */,
+ 63CE7E821324EC8200EB042C /* CDataScanner.m in Sources */,
+ 63CE7E831324EC8200EB042C /* CJSONDeserializer.m in Sources */,
+ 63CE7E841324EC8200EB042C /* CJSONScanner.m in Sources */,
+ 63CE7E851324EC8200EB042C /* CJSONSerializer.m in Sources */,
+ 63EF8D0C12DC8FE10063C6CD /* CLI.m in Sources */,
+ 63EF8D0D12DC8FE30063C6CD /* PassengerPref.m in Sources */,
+ 63EF8D0E12DC8FE40063C6CD /* Application.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8D202CF00486D31800D8A456 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 63CE7E8A13251AB200EB042C /* CDataScanner_Extensions.m in Sources */,
+ 63CE7E8B13251AB200EB042C /* NSDictionary_JSONExtensions.m in Sources */,
8D202CF10486D31800D8A456 /* PassengerPref.m in Sources */,
- 518C7F770E06B665003A3ED0 /* SecurityHelper.m in Sources */,
- 51EED90A104E9F0200AC7D3E /* HelpHelper.m in Sources */,
+ 6361755812B7C4B500E3412D /* CLI.m in Sources */,
+ 63F589EC12BA6B5300D959E3 /* Application.m in Sources */,
+ 63CE7E6A1324E58500EB042C /* CDataScanner.m in Sources */,
+ 63CE7E781324E58500EB042C /* CJSONDeserializer.m in Sources */,
+ 63CE7E7A1324E58500EB042C /* CJSONScanner.m in Sources */,
+ 63CE7E7C1324E58500EB042C /* CJSONSerializer.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -352,14 +502,13 @@
name = InfoPlist.strings;
sourceTree = "<group>";
};
- 51EED8B3104E561800AC7D3E /* PassengerPaneHelp */ = {
+ 63EF8D0212DC8FC10063C6CD /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
- 51EED8B4104E561800AC7D3E /* English */,
+ 63EF8D0312DC8FC10063C6CD /* en */,
);
- name = PassengerPaneHelp;
- path = ../..;
- sourceTree = BUILT_PRODUCTS_DIR;
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
};
9648B5EE0D195C2F00DC73E2 /* Pref.xib */ = {
isa = PBXVariantGroup;
@@ -375,7 +524,14 @@
1DBD214908BA80EA00186707 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor\"",
+ );
+ GCC_C_LANGUAGE_STANDARD = c99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
@@ -385,6 +541,8 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
PRODUCT_NAME = Passenger;
+ SDKROOT = macosx10.6;
+ VALID_ARCHS = x86_64;
WRAPPER_EXTENSION = prefPane;
ZERO_LINK = YES;
};
@@ -393,13 +551,22 @@
1DBD214A08BA80EA00186707 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor\"",
+ );
+ GCC_C_LANGUAGE_STANDARD = c99;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Passenger_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
PRODUCT_NAME = Passenger;
+ SDKROOT = macosx10.6;
+ VALID_ARCHS = x86_64;
WRAPPER_EXTENSION = prefPane;
};
name = Release;
@@ -407,24 +574,151 @@
1DBD214D08BA80EA00186707 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_GC = required;
+ GCC_MODEL_PPC64 = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ SDKROOT = macosx;
+ VALID_ARCHS = x86_64;
};
name = Debug;
};
1DBD214E08BA80EA00186707 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = (
- ppc,
- i386,
- );
+ ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_GC = required;
+ GCC_MODEL_PPC64 = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ SDKROOT = macosx;
+ VALID_ARCHS = x86_64;
+ };
+ name = Release;
+ };
+ 63EF8D0512DC8FC10063C6CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ 63EF8D0612DC8FC10063C6CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Release;
+ };
+ 63EF8D0812DC8FC10063C6CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
+ COPY_PHASE_STRIP = NO;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor\"",
+ );
+ FRAMEWORK_VERSION = A;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_ENABLE_OBJC_GC = required;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "PassengerTest-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
+ GCC_VERSION = "";
+ INFOPLIST_FILE = "PassengerTest-Info.plist";
+ INSTALL_PATH = "$(HOME)/Library/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor/YAML.framework/Versions/A\"",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ ONLY_ACTIVE_ARCH = NO;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Debug;
+ };
+ 63EF8D0912DC8FC10063C6CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor\"",
+ );
+ FRAMEWORK_VERSION = A;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_ENABLE_OBJC_GC = required;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "PassengerTest-Prefix.pch";
+ GCC_VERSION = "";
+ INFOPLIST_FILE = "PassengerTest-Info.plist";
+ INSTALL_PATH = "$(HOME)/Library/Frameworks";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor/YAML.framework/Versions/A\"",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ ONLY_ACTIVE_ARCH = NO;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Release;
+ };
+ 63EF8D0A12DC8FC10063C6CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor\"",
+ );
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor/YAML.framework/Versions/A\"",
+ );
+ PRODUCT_NAME = PassengerTest;
+ };
+ name = Debug;
+ };
+ 63EF8D0B12DC8FC10063C6CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor\"",
+ );
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/vendor/YAML.framework/Versions/A\"",
+ );
+ PRODUCT_NAME = PassengerTest;
};
name = Release;
};
@@ -445,6 +739,19 @@
buildConfigurations = (
1DBD214D08BA80EA00186707 /* Debug */,
1DBD214E08BA80EA00186707 /* Release */,
+ 63EF8D0512DC8FC10063C6CD /* Debug */,
+ 63EF8D0612DC8FC10063C6CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 63EF8D0712DC8FC10063C6CD /* Build configuration list for PBXNativeTarget "PassengerTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 63EF8D0812DC8FC10063C6CD /* Debug */,
+ 63EF8D0912DC8FC10063C6CD /* Release */,
+ 63EF8D0A12DC8FC10063C6CD /* Debug */,
+ 63EF8D0B12DC8FC10063C6CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
7 Passenger.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:Passenger.xcodeproj">
+ </FileRef>
+</Workspace>
32 PassengerTest-Info.plist
View
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+
+ <key>CFBundleIdentifier</key>
+ <string>com.fngtps.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2011 Fingertips. All rights reserved.</string>
+</dict>
+</plist>
+
7 PassengerTest-Prefix.pch
View
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'PassengerTest' target in the 'PassengerTest' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
8 Passenger_Prefix.pch
View
@@ -3,8 +3,8 @@
//
#ifdef __OBJC__
- #import <Foundation/Foundation.h>
- #import <AppKit/AppKit.h>
- #import <RubyCocoa/RubyCocoa.h>
- #import <PreferencePanes/PreferencePanes.h>
+ #import <Foundation/Foundation.h>
+ #import <AppKit/AppKit.h>
+ #import <RubyCocoa/RubyCocoa.h>
+ #import <PreferencePanes/PreferencePanes.h>
#endif
98 Rakefile
View
@@ -1,60 +1,62 @@
-task :default => "prefpane:run"
+task :default => "test"
-namespace :prefpane do
- BUILD = "build/Release/Passenger.prefPane"
- BIN = File.join(BUILD, 'Contents/MacOS/Passenger')
-
- desc 'Build the prefpane'
- task :build do
- sh "xcodebuild -configuration Release"
- end
-
- # Make sure that the prefpane searches inside the bundle for the RubyCocoa framework.
- #
- # This task is invoked from the xcode project post build script.
- desc 'Adjusts the install name of the bundled RubyCocoa to point to the right place'
- task :change_ruycocoa_framework_location do
- current = `/usr/bin/otool -L #{BIN}`.match(/^\t(.+RubyCocoa).+$/)[1]
- sh "/usr/bin/install_name_tool -change '#{current}' '@loader_path/../Frameworks/RubyCocoa.framework/Versions/A/RubyCocoa' '#{BIN}'"
- end
-
- desc 'Builds and opens the prefpane'
- task :run => :build do
- sh "open #{BUILD}"
- end
-end
+desc "Run all tests"
+task :test => %w(test:ppane test:passenger_pane)
-desc 'Cleans the build and release pkg'
-task :clean do
- sh 'rm -rf build/'
- sh 'rm -rf pkg'
+namespace :ppane do
+ desc "Install the Passenger Preference Pane"
+ task :install => :build do
+ prefpane = File.join(ENV['BUILT_PRODUCTS_DIR'], 'Passenger.prefPane')
+ sh "open #{prefpane}"
+ end
end
-desc 'Creates a release build and pkg'
-task :release => [:clean, 'prefpane:build'] do
- require 'osx/cocoa'
- version = OSX::NSDictionary.dictionaryWithContentsOfFile('Info.plist')['CFBundleVersion'].to_s
- name = "PassengerPane-#{version}"
- pkg_dir = "pkg/#{name}"
+namespace :gem do
+ desc "Build the gem"
+ task :build do
+ sh "gem build ppane.gemspec"
+ end
- sh "mkdir -p #{pkg_dir}"
- sh "cp -R build/Release/Passenger.prefPane #{pkg_dir}"
- %w{ LICENSE README.rdoc app/config/passenger_pane_config.rb.ports }.each do |file|
- sh "cp #{file} #{pkg_dir}"
+ desc "Install the gem"
+ task :install => :build do
+ if filename = FileList['*.gem'].sort_by { |name| name }.last
+ sh "gem install #{filename}"
+ end
end
- sh "cd pkg/ && tar -czvf #{name}.tgz #{name}/"
end
require 'rake/testtask'
-Rake::TestTask.new do |t|
- t.libs << "test"
- t.test_files = FileList['test/*_test.rb']
- t.verbose = nil
- t.options = '-rs'
+namespace :test do
+ Rake::TestTask.new('ppane') do |t|
+ t.test_files = FileList['test/ppane/*_test.rb']
+ t.verbose = true
+ end
+
+ desc "Build framework for testing"
+ task :build do
+ result = `/Xcode4/usr/bin/xcodebuild -project Passenger.xcodeproj -target PassengerTest`
+ puts result unless result.include?('** BUILD SUCCEEDED **')
+ end
+
+ desc "Run all functional tests for the Passenger Preference Pane"
+ task :passenger_pane => :build do
+ if File.exist?('/usr/local/bin/nush')
+ sh "cd test/passenger_pane; for test in *_test.nu; do /usr/local/bin/nush $test; done"
+ else
+ puts "[!] Please install Nu to run the functional tests (see doc/DEVELOPMENT)"
+ end
+ end
end
-desc "Generate Security.framework BridgeSupport file"
-task :bridgesupport do
- #sh "gen_bridge_metadata -f Security -e Security.BridgeSupport-exceptions.xml -o Security.bridgesupport"
- sh "gen_bridge_metadata -f Security -o Security.bridgesupport"
+namespace :xcode do
+ desc "Prepares the compiled framework for loading from Nu"
+ task :setup_test_framework do
+ test_directory = File.expand_path('../test/passenger_pane', __FILE__)
+ framework_name = ENV['FULL_PRODUCT_NAME']
+ framework = File.join(ENV['BUILT_PRODUCTS_DIR'], framework_name)
+ binary = File.join(ENV['BUILT_PRODUCTS_DIR'], ENV['EXECUTABLE_PATH'])
+
+ sh "rm -Rf #{File.join(test_directory, framework_name)}"
+ sh "cp -r #{framework} #{test_directory}"
+ end
end
9 app/config/passenger_pane_config.rb
View
@@ -1,9 +0,0 @@
-module PassengerPaneConfig
- RUBY = "/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby"
- HTTPD_BIN = "/usr/sbin/httpd"
- APACHE_RESTART_COMMAND = "/sbin/service org.apache.httpd stop; /sbin/service org.apache.httpd start"
- APACHE_DIR = "/private/etc/apache2"
- HTTPD_CONF = File.join(APACHE_DIR, 'httpd.conf')
- PASSENGER_APPS_DIR = File.join(APACHE_DIR, 'passenger_pane_vhosts')
- PASSENGER_APPS_EXTENSION = "vhost.conf"
-end
9 app/config/passenger_pane_config.rb.ports
View
@@ -1,9 +0,0 @@
-module PassengerPaneConfig
- RUBY = "/opt/local/bin/ruby"
- APACHE_DIR = "/opt/local/apache2"
- HTTPD_BIN = File.join(APACHE_DIR, "bin", "httpd")
- HTTPD_CONF = File.join(APACHE_DIR, 'conf', 'httpd.conf')
- APACHE_RESTART_COMMAND = "#{File.join(APACHE_DIR, "bin", "apachectl")} restart"
- PASSENGER_APPS_DIR = File.join(APACHE_DIR, 'conf', 'passenger_pane_vhosts')
- PASSENGER_APPS_EXTENSION = "vhost.conf"
-end
53 app/controllers/PassengerPref.h
View
@@ -0,0 +1,53 @@
+#import <PreferencePanes/PreferencePanes.h>
+#import <SecurityInterface/SFAuthorizationView.h>
+#import "CLI.h"
+
+@interface PassengerPref : NSPreferencePane
+{
+ BOOL authorized, dirty;
+ NSMutableArray *applications;
+
+ IBOutlet NSColor *textStateColor;
+
+ IBOutlet NSView *mainView;
+ IBOutlet NSArrayController *applicationsController;
+ IBOutlet NSImageView *passengerIconView;
+ IBOutlet NSButton *openInBrowserButton;
+ IBOutlet SFAuthorizationView *authorizationView;
+ IBOutlet NSTableView *applicationsTableView;
+}
+
+@property (assign, getter=isAuthorized) BOOL authorized;
+@property (assign, getter=isDirty) BOOL dirty;
+
+@property (assign) NSMutableArray *applications;
+@property (assign) NSColor *textStateColor;
+
+- (void) setupUI;
+- (void) setupAuthorizationView;
+- (void) setupApplicationView;
+
+- (IBAction) add:(id)sender;
+- (IBAction) remove:(id)sender;
+- (IBAction) browse:(id)sender;
+
+- (IBAction) apply:(id)sender;
+- (IBAction) revert:(id)sender;
+- (IBAction) restart:(id)sender;
+
+- (IBAction) openAddressInBrowser:(id)sender;
+- (IBAction) showPassengerHelp:(id)sender;
+
+- (void) paneWillBecomeActive:(id)sender;
+
+- (void) loadApplications;
+- (void) reloadApplications;
+
+- (Application *) selectedApplication;
+- (NSString *) pathForDirectoryBrowser;
+
+- (BOOL) requestAuthorization;
+
+- (void) checkForDirtyApplications;
+
+@end
296 app/controllers/PassengerPref.m
View
@@ -1,10 +1,290 @@
-@interface PassengerLoader : NSObject
-{}
-@end
-@implementation PassengerLoader
-@end
+#import "PassengerPref.h"
-static void __attribute__((constructor)) loadRubyPrefPane(void)
-{
- RBBundleInit("passenger_pref.rb", [PassengerLoader class], nil);
+@implementation PassengerPref
+
+@synthesize authorized, dirty;
+
+@synthesize applications;
+@synthesize textStateColor;
+
+- (void) mainViewDidLoad {
+ CLI *cli = [CLI sharedInstance];
+ [cli setPathToCLI:[[self bundle] pathForResource:@"ppane" ofType:nil inDirectory:@"bin"]];
+ [cli setAppDelegate:self];
+
+ [self setupUI];
+ [self setupAuthorizationView];
+ [self setupApplicationView];
+
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(paneWillBecomeActive:)
+ name:NSApplicationWillBecomeActiveNotification
+ object:NULL];
+}
+
+- (void) setupUI {
+ NSImage *browserButtonImage;
+
+ [passengerIconView setImage:[[NSImage alloc] initByReferencingFile:[[self bundle] pathForImageResource:@"label"]]];
+ browserButtonImage = [[NSImage alloc] initByReferencingFile:[[self bundle] pathForImageResource:@"OpenInBrowserTemplate"]];
+ [browserButtonImage setTemplate:YES];
+ [openInBrowserButton setImage:browserButtonImage];
+
+ [self setTextStateColor:NSColor.disabledControlTextColor];
+}
+
+- (void) setupAuthorizationView {
+ self.authorized = NO;
+ [authorizationView setString:kAuthorizationRightExecute];
+ [authorizationView setDelegate:self];
+ [authorizationView setAutoupdate:YES];
+ [authorizationView updateStatus:self];
+}
+
+- (void) setupApplicationView {
+ [self loadApplications];
+ if ([applications count] > 0) {
+ [applicationsController setSelectedObjects:[NSArray arrayWithObjects:[applications objectAtIndex:0], nil]];
+ }
+ [applicationsTableView registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
+ [applicationsTableView setDraggingSourceOperationMask:NSDragOperationGeneric forLocal:NO];
+}
+
+#pragma SFAuthorizationView delegate methods
+
+- (void) authorizationViewDidAuthorize:(SFAuthorizationView *)view {
+ [self setTextStateColor:NSColor.blackColor];
+ [[CLI sharedInstance] setAuthorizationRef:[[view authorization] authorizationRef]];
+ self.authorized = YES;
+ NSLog(@"Pane is now authorized");
+}
+
+- (void) authorizationViewDidDeauthorize:(SFAuthorizationView *)authorizationView {
+ [self setTextStateColor:NSColor.disabledControlTextColor];
+ [[CLI sharedInstance] deauthorize];
+ self.authorized = NO;
+ NSLog(@"Pane is now deauthorized");
+}
+
+#pragma NSTableViewDataSource protocol methods
+
+- (NSDragOperation) tableView:(NSTableView *)aTableView validateDrop:(id)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)operation {
+ id items, path;
+ NSFileManager *fileManager = [[NSFileManager alloc] init];
+ BOOL isDir;
+
+ if (!authorized) {
+ return NSDragOperationNone;
+ }
+
+ items = [[info draggingPasteboard] propertyListForType:NSFilenamesPboardType];
+ for (path in items) {
+ if (![fileManager fileExistsAtPath:path isDirectory:&isDir] || !isDir) {
+ NSLog(@"%@ %d", path, isDir);
+ return NSDragOperationNone;
+ }
+ }
+
+ return NSDragOperationGeneric;
+}
+
+- (BOOL) tableView:(NSTableView *)aTableView acceptDrop:(id)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)operation {
+ id items, path;
+ NSMutableArray *droppedApplications;
+ Application *application;
+
+ items = [[info draggingPasteboard] propertyListForType:NSFilenamesPboardType];
+ droppedApplications = [NSMutableArray arrayWithCapacity:[items count]];
+ for (path in items) {
+ application = [[Application alloc] initWithDirectory:path];
+ [application setDelegate:self];
+ [droppedApplications addObject:application];
+ }
+ [applicationsController addObjects:droppedApplications];
+ [applicationsController setSelectedObjects:[NSArray arrayWithObjects:[droppedApplications lastObject], nil]];
+ [self apply:self];
+
+ return YES;
+}
+
+- (BOOL) tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard {
+ Application *application;
+ NSMutableArray *paths = [NSMutableArray arrayWithCapacity:[rowIndexes count]];
+
+ for (application in [applications objectsAtIndexes:rowIndexes]) {
+ [paths addObject:[application configFilename]];
+ }
+ [pboard declareTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, nil] owner:self];
+ [pboard setPropertyList:paths forType:NSFilenamesPboardType];
+
+ return YES;
+}
+
+#pragma KeyValueObserving protocol methods
+
+- (void)didChangeValueForKey:(NSString *)key {
+ [super didChangeValueForKey:key];
+ if (key == @"dirty") {
+ [self checkForDirtyApplications];
+ }
+}
+
+#pragma Notifications
+
+- (void) paneWillBecomeActive:(id)sender {
+ [self reloadApplications];
+}
+
+#pragma Actions
+
+- (IBAction) add:(id)sender {
+ Application *application = [[Application alloc] init];
+ [application setDelegate:self];
+ [applicationsController addObject:application];
+}
+
+- (IBAction) remove:(id)sender {
+ Application *application = [self selectedApplication];
+ if (![application isFresh]) {
+ [[CLI sharedInstance] delete:application];
+ }
+ [applicationsController removeObject:application];
+ [self checkForDirtyApplications];
+}
+
+- (IBAction) browse:(id)sender {
+ NSOpenPanel *panel = [NSOpenPanel openPanel];
+ [panel setCanChooseDirectories:YES];
+ [panel setCanChooseFiles:NO];
+ [panel setDirectory:[self pathForDirectoryBrowser]];
+ [panel beginSheetModalForWindow:[mainView window] completionHandler:^(NSInteger button) {
+ Application *application = [self selectedApplication];
+ if (button == NSFileHandlingPanelOKButton) {
+ [application setValue:[panel filename] forKey:@"path"];
+ } else if (button == NSFileHandlingPanelCancelButton) {
+ if ([application isFresh] && ![application isDirty]) {
+ [self remove:sender];
+ }
+ }
+ }];
+}
+
+- (IBAction) apply:(id)sender {
+ Application *application;
+ BOOL isChanged = NO;
+
+ if ([self requestAuthorization]) {
+ for (application in applications) {
+ if ([application isDirty]) {
+ if ([application isFresh]) {
+ NSLog(@"Found new application: %@", application.host);
+ [[CLI sharedInstance] add:application];
+ } else {
+ NSLog(@"Found dirty application: %@", application.host);
+ [[CLI sharedInstance] update:application];
+ }
+ isChanged = YES;
+ }
+ }
+ if (isChanged) {
+ [[CLI sharedInstance] restart];
+ }
+ } else {
+ NSLog(@"Unable to apply because authorization failed.");
+ }
+ [self checkForDirtyApplications];
}
+
+- (IBAction) revert:(id)sender {
+ Application *application;
+ for (application in applications) {
+ [application revert];
+ }
+}
+
+- (IBAction) restart:(id)sender {
+ Application *application = [self selectedApplication];
+ [[CLI sharedInstance] restart:application];
+}
+
+- (IBAction) openAddressInBrowser:(id)sender {
+ Application *application = [self selectedApplication];
+ NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", application.host]];
+ [[NSWorkspace sharedWorkspace] openURL:url];
+}
+
+- (IBAction) showPassengerHelp:(id)sender {}
+
+#pragma Properties
+
+- (void) loadApplications {
+ [self setApplications:[[CLI sharedInstance] listApplications]];
+}
+
+- (void) reloadApplications {
+ NSUInteger index;
+ Application *existingApplication, *loadedApplication;
+ NSArray *loadedApplications = [[CLI sharedInstance] listApplications];
+ for (loadedApplication in loadedApplications) {
+ index = [applications indexOfObjectPassingTest:^ BOOL (id object, NSUInteger index, BOOL *stop) {
+ return [[object host] isEqualToString:[loadedApplication host]];
+ }];
+ // Application is already in the list
+ if (index != -1) {
+ existingApplication = [applications objectAtIndex:index];
+ if (![existingApplication isDirty]) {
+ [existingApplication updateAttributes:[loadedApplication toDictionary]];
+ [existingApplication didApplyChanges];
+ }
+ // Someone added a new applications we didn't know about
+ } else {
+ [applicationsController addObject:loadedApplication];
+ }
+ }
+}
+
+- (Application *) selectedApplication {
+ if (applications && ([applications count] > 0)) {
+ return [[applicationsController selectedObjects] objectAtIndex:0];
+ } else {
+ return nil;
+ }
+}
+
+- (NSString *) pathForDirectoryBrowser {
+ Application *application = [self selectedApplication];
+ if (application) {
+ return application.path;
+ } else {
+ return NSHomeDirectory();
+ }
+}
+
+- (BOOL) requestAuthorization {
+ NSError *error;
+ if ([[authorizationView authorization] obtainWithRight:kAuthorizationRightExecute
+ flags:(kAuthorizationFlagPreAuthorize ||
+ kAuthorizationFlagExtendRights ||
+ kAuthorizationFlagInteractionAllowed)
+ error:&error]
+ ) {
+ [self authorizationViewDidAuthorize:authorizationView];
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
+- (void)checkForDirtyApplications {
+ Application *application;
+ for (application in applications) {
+ if ([application isDirty]) {
+ [self setDirty:YES];
+ return;
+ }
+ }
+ [self setDirty:NO];
+}
+
+@end
332 app/controllers/passenger_pref.rb
View
@@ -1,332 +0,0 @@
-require 'osx/cocoa'
-include OSX
-
-OSX.require_framework 'PreferencePanes'
-
-if ENV['TESTING_PASSENGER_PREF']
- OSX.load_bridge_support_file File.expand_path('../../../resources/Security.bridgesupport', __FILE__)
- Dir.glob(File.expand_path('../../**/*.rb', __FILE__)).each { |source| require source }
-else
- OSX.load_bridge_support_file File.expand_path('../Security.bridgesupport', __FILE__)
- require File.expand_path('../passenger_pane_config', __FILE__)
- require File.expand_path('../shared_passenger_behaviour', __FILE__)
- require File.expand_path('../passenger_application', __FILE__)
-end
-
-if RUBY_VERSION == "1.8.7" && OSX::RUBYCOCOA_VERSION == "0.13.2"
- class OSX::NSArray
- def count
- oc_count
- end
- end
-end
-
-class PrefPanePassenger < NSPreferencePane
- class << self
- attr_accessor :sharedInstance
- end
-
- include SharedPassengerBehaviour
-
- ib_outlet :labelImage
- ib_outlet :installPassengerWarning
- ib_outlet :authorizationView
- ib_outlet :applicationsTableView
- ib_outlet :applicationsController
- ib_outlet :openAddressInBrowserButton
-
- kvc_accessor :applications, :authorized, :dirty_apps, :revertable_apps, :textFieldColor
-
- def mainViewDidLoad
- self.class.sharedInstance = self
-
- setup_ui_details!
- setup_authorization_view!
- setup_applications_table_view!
-
- OSX::HelpHelper.registerBooksInBundle(bundle)
-
- OSX::NSNotificationCenter.defaultCenter.objc_send(
- :addObserver, self,
- :selector, 'paneWillBecomeActive:',
- :name, OSX::NSApplicationWillBecomeActiveNotification,
- :object, nil
- )
- end
-
- def paneWillBecomeActive(notification = nil)
- willSelect
- end
-
- def willSelect
- @dropping_directories = @dirty_apps = @revertable_apps = false
- setup_passenger_warning!
- @applicationsController.content.empty? ? load_appications! : reload_appications!
- end
-
- def didSelect
- verify_application_hosts!
- end
-
- def applicationMarkedDirty(app)
- self.revertable_apps = @applicationsController.content.any? { |app| app.revertable? }
- self.dirty_apps = true
- end
-
- def apply(sender = nil)
- if authorize!
- @applicationsController.content.each { |app| app.apply if app.dirty? }
- self.dirty_apps = self.revertable_apps = false
- else
- log "Unable to #{action} because authorization failed."
- end
- end
-
- def revert(sender = nil)
- @applicationsController.content.each { |app| app.revert if app.revertable? }
- self.dirty_apps = self.revertable_apps = false
- end
-
- def restart(sender = nil)
- @applicationsController.selectedObjects.first.restart
- end
-
- def remove(sender = nil)
- apps = @applicationsController.selectedObjects
- existing_apps = apps.reject { |app| app.new_app? }
- PassengerApplication.removeApplications(existing_apps) unless existing_apps.empty?
- @applicationsController.removeObjects apps
- end
-
- def rbSetValue_forKey(value, key)
- super
- browse if !@dropping_directories and key == 'applications' and !value.empty? and value.last.new_app?
- end
-
- def showPassengerHelp(sender)
- OSX::NSHelpManager.sharedHelpManager.openHelpAnchor_inBook('main_passenger_help', 'PassengerPaneHelp')
- end
-
- def openAddressInBrowser(sender = nil)
- url = OSX::NSURL.URLWithString("http://#{@applicationsController.selectedObjects.first.host}")
- OSX::NSWorkspace.sharedWorkspace.openURL(url)
- end
-
- # Select application directory panel
-
- def browse(sender = nil)
- panel = NSOpenPanel.openPanel
- panel.canChooseDirectories = true
- panel.canChooseFiles = false
- panel.objc_send(
- :beginSheetForDirectory, path_for_browser,
- :file, nil,
- :types, nil,
- :modalForWindow, mainView.window,
- :modalDelegate, self,
- :didEndSelector, 'openPanelDidEnd:returnCode:contextInfo:',
- :contextInfo, nil
- )
- end
-
- def openPanelDidEnd_returnCode_contextInfo(panel, button, contextInfo)
- app = @applicationsController.selectedObjects.first
- if button == OSX::NSOKButton
- app.setValue_forKey(panel.filename, 'path')
- else
- remove if app.new_app? and !app.dirty?
- end
- end
-
- # Applications NSTableView dataSource drag and drop methods
-
- def tableView_validateDrop_proposedRow_proposedDropOperation(tableView, info, row, operation)
- return OSX::NSDragOperationNone unless @authorized
-
- files = info.draggingPasteboard.propertyListForType(OSX::NSFilenamesPboardType)
- if files.all? { |f| File.directory? f }
- @applicationsTableView.setDropRow_dropOperation(-1, OSX::NSTableViewDropOn)
- OSX::NSDragOperationGeneric
- else
- OSX::NSDragOperationNone
- end
- end
-
- def tableView_acceptDrop_row_dropOperation(tableView, info, row, operation)
- apps = info.draggingPasteboard.propertyListForType(OSX::NSFilenamesPboardType).map { |path| PassengerApplication.alloc.initWithPath(path) }
- @dropping_directories = true
- @applicationsController.addObjects apps
- @dropping_directories = false
- end
-
- def tableView_writeRowsWithIndexes_toPasteboard(tableView, rows, pboard)
- config_paths = @applicationsController.content.objectsAtIndexes(rows).map { |app| app.config_path }
- pboard.declareTypes_owner([OSX::NSFilenamesPboardType], self)
- pboard.setPropertyList_forType(config_paths, OSX::NSFilenamesPboardType)
- true
- end
-
- # SFAuthorizationView: TODO this should actualy move to the SecurityHelper, but for some reason in prototyping it didn't work, try again when everything is cleaned up.
-
- def authorizationViewDidAuthorize(authorizationView = nil)
- self.textFieldColor = OSX::NSColor.blackColor
- OSX::SecurityHelper.sharedInstance.authorizationRef = @authorizationView.authorization.authorizationRef
- self.authorized = true
- end
-
- def authorizationViewDidDeauthorize(authorizationView = nil)
- self.textFieldColor = OSX::NSColor.disabledControlTextColor
- OSX::SecurityHelper.sharedInstance.deauthorize
- self.authorized = false
- end
-
- # When the pane wants to be unselected
-
- def shouldUnselect
- if @dirty_apps and !@applicationsController.content.empty?
- alert = OSX::NSAlert.alloc.init
- alert.messageText = 'This service has unsaved changes'
- alert.informativeText = 'Would you like to apply your changes before closing the Passenger preference pane?'
- alert.addButtonWithTitle 'Apply'
- alert.addButtonWithTitle 'Cancel'
- alert.addButtonWithTitle 'Don’t Apply'
- alert.objc_send(
- :beginSheetModalForWindow, mainView.window,
- :modalDelegate, self,
- :didEndSelector, 'unsavedChangesAlertDidEnd:returnCode:contextInfo:',
- :contextInfo, nil
- )
- return OSX::NSUnselectLater
- end
- OSX::NSUnselectNow
- end
-
- # Alert panel handlers
-
- APPLY = OSX::NSAlertFirstButtonReturn
- CANCEL = OSX::NSAlertSecondButtonReturn
- DONT_APPLY = OSX::NSAlertThirdButtonReturn
-
- def unsavedChangesAlertDidEnd_returnCode_contextInfo(alert, returnCode, contextInfo)
- alert.window.orderOut(self)
- case returnCode
- when CANCEL
- replyToShouldUnselect false
- return
- when APPLY
- apply
- when DONT_APPLY
- @applicationsController.removeObjects @applicationsController.content.select { |app| app.new_app? }
- revert
- end
- replyToShouldUnselect true
- end
-
- def unregisteredHostsAlertDidEnd_returnCode_contextInfo(alert, returnCode, contextInfo)
- alert.window.orderOut(self)
- authorize!
- PassengerApplication.registerAllHosts
- end
-
- private
-
- def authorize!
- result = @authorizationView.authorization.objc_send(
- :permitWithRight, OSX::KAuthorizationRightExecute,
- :flags, (OSX::KAuthorizationFlagPreAuthorize | OSX::KAuthorizationFlagExtendRights | OSX::KAuthorizationFlagInteractionAllowed)
- ) == 0
- authorizationViewDidAuthorize if result
- result
- end
-
- def setup_ui_details!
- @labelImage.image = OSX::NSImage.alloc.initByReferencingFile(bundle.pathForImageResource('label'))
-
- button_image = OSX::NSImage.alloc.initByReferencingFile(bundle.pathForImageResource('OpenInBrowserTemplate'))
- button_image.template = true
- @openAddressInBrowserButton.image = button_image
-
- self.textFieldColor = OSX::NSColor.disabledControlTextColor
- end
-
- def setup_authorization_view!
- @authorized = false
- @authorizationView.string = OSX::KAuthorizationRightExecute
- @authorizationView.delegate = self
- @authorizationView.updateStatus self
- @authorizationView.autoupdate = true
- end
-
- def setup_applications_table_view!
- @applications = [].to_ns
- @applicationsTableView.dataSource = self
- @applicationsTableView.registerForDraggedTypes [OSX::NSFilenamesPboardType]
- @applicationsTableView.setDraggingSourceOperationMask_forLocal(OSX::NSDragOperationGeneric, false)
- end
-
- def load_appications!
- unless (existing_apps = PassengerApplication.existingApplications).empty?
- @applicationsController.addObjects existing_apps
- @applicationsController.selectedObjects = [existing_apps.last]
- end
- end
-
- def verify_application_hosts!
- unless PassengerApplication.allApplicationHostsExist?
- alert = OSX::NSAlert.alloc.init
- alert.messageText = 'Passenger Preference Pane needs to update the hosts database.'
- alert.informativeText = 'Not all application addresses are currently registered in the hosts database. Passenger Preference Pane needs to add these addresses before you can continue.'
- alert.addButtonWithTitle('Update hosts')
- alert.objc_send(
- :beginSheetModalForWindow, mainView.window,
- :modalDelegate, self,
- :didEndSelector, 'unregisteredHostsAlertDidEnd:returnCode:contextInfo:',
- :contextInfo, nil
- )
- end
- end
-
- def reload_appications!
- @applicationsController.content.each { |app| app.reload! }
- end
-
- def passenger_installed?
- `#{PassengerPaneConfig::HTTPD_BIN} -t -D DUMP_MODULES 2>&1`.include? 'passenger_module'
- end
-
- def path_for_browser
- app = @applicationsController.selectedObjects.first
- app.nil? ? OSX.NSHomeDirectory : app.path
- end
-
- MODRAILS_URL = 'http://www.modrails.com'
- def setup_passenger_warning!
- if passenger_installed?
- @installPassengerWarning.hidden = true
- else
- unless @setup_passenger_warning
- text_field = @installPassengerWarning.subviews.find { |v| v.is_a?(OSX::NSTextField) }
- image_view = @installPassengerWarning.subviews.find { |v| v.is_a?(OSX::NSImageView) }
- image_view.image = OSX::NSImage.alloc.initByReferencingFile('/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns')
-
- link_str = OSX::NSMutableAttributedString.alloc.initWithString(MODRAILS_URL)
- range = OSX::NSMakeRange(0, MODRAILS_URL.length)
- link_str.addAttribute_value_range OSX::NSLinkAttributeName, MODRAILS_URL, range
- link_str.addAttribute_value_range OSX::NSForegroundColorAttributeName, OSX::NSColor.blueColor, range
- link_str.addAttribute_value_range OSX::NSUnderlineStyleAttributeName, OSX::NSSingleUnderlineStyle, range
-
- text_parts = text_field.stringValue.to_s.split(MODRAILS_URL)
-
- str = OSX::NSMutableAttributedString.alloc.initWithString(text_parts.first)
- str.appendAttributedString link_str
- str.appendAttributedString OSX::NSAttributedString.alloc.initWithString(text_parts.last)
- str.addAttribute_value_range OSX::NSFontAttributeName, OSX::NSFont.systemFontOfSize(11), OSX::NSMakeRange(0, str.length)
-
- text_field.attributedStringValue = str
- @setup_passenger_warning = true
- end
-
- @installPassengerWarning.hidden = false
- end
- end
-end
37 app/models/Application.h
View
@@ -0,0 +1,37 @@
+#import <Foundation/Foundation.h>
+#import "Common.h"
+
+enum {
+ PPANE_DEVELOPMENT = 0,
+ PPANE_PRODUCTION = 1
+};
+
+@interface Application : NSObject {
+ id delegate;
+
+ NSString *host, *aliases, *path, *configFilename;
+ NSUInteger environment;
+ BOOL dirty, valid, fresh;
+
+ NSDictionary *beforeChanges;
+}
+
+@property (assign) id delegate;
+@property (assign) NSString *host, *aliases, *path, *configFilename;
+@property (assign) NSUInteger environment;
+@property (assign, getter=isDirty) BOOL dirty;
+@property (assign, getter=isValid) BOOL valid;
+@property (assign, getter=isFresh) BOOL fresh;
+@property (readonly) NSDictionary *beforeChanges;
+
+- (id) initWithAttributes:(NSDictionary *)attributes;
+- (id) initWithDirectory:(NSString *)aPath;
+- (void) updateAttributes:(NSDictionary *)attributes;
+- (NSMutableDictionary*) toDictionary;
+- (NSArray*) toArgumentArray;
+- (void) validate;
+- (void) checkChanges;
+- (void) didApplyChanges;
+- (void) revert;
+
+@end
137 app/models/Application.m
View
@@ -0,0 +1,137 @@
+#import "Application.h"
+
+static NSArray *environments;
+
+@implementation Application
+
+@synthesize delegate;
+@synthesize host, aliases, path, configFilename;
+@synthesize environment;
+@synthesize dirty, valid, fresh;
+@synthesize beforeChanges;
+
++(void) initialize {
+ if (!environments)
+ environments = [NSArray arrayWithObjects:@"development", @"production", nil];
+}
+
+- (id) init {
+ if (self = [super init]) {
+ self.host = @"";
+ self.aliases = @"";
+ self.path = @"";
+ self.environment = PPANE_DEVELOPMENT;
+ self.dirty = NO;
+ self.fresh = YES;
+ [self validate];
+ beforeChanges = [self toDictionary];
+ }
+ return self;
+}
+
+- (id) initWithAttributes:(NSDictionary *)attributes {
+ if (self = [self init]) {
+ [self updateAttributes:attributes];
+ self.dirty = NO;
+ self.fresh = NO;
+ [self validate];
+ beforeChanges = [self toDictionary];
+ }
+ return self;
+}
+
+- (id) initWithDirectory:(NSString *)aPath {
+ if (self = [self init]) {
+ beforeChanges = [self toDictionary];
+ self.path = aPath;
+ self.dirty = YES;
+ self.fresh = YES;
+ [self validate];
+ }
+ return self;
+}
+
+- (void) updateAttributes:(NSDictionary *)attributes {
+ NSString *environmentAsString = [attributes objectForKey:@"environment"];
+ self.host = [attributes objectForKey:@"host"];
+ self.aliases = [attributes objectForKey:@"aliases"];
+ self.path = [attributes objectForKey:@"path"];
+ if (environmentAsString) {
+ self.environment = [environments indexOfObject:environmentAsString];
+ } else {
+ self.environment = 0;
+ }
+ self.configFilename = [attributes objectForKey:@"config_filename"];
+}
+
+- (NSMutableDictionary*) toDictionary {
+ NSMutableDictionary *data = [NSMutableDictionary dictionary];
+ [data setValue:self.host forKey:@"host"];
+ [data setValue:self.aliases forKey:@"aliases"];
+ [data setValue:self.path forKey:@"path"];
+ if (environment && environment < [environments count]) {
+ [data setValue:[environments objectAtIndex:environment] forKey:@"environment"];
+ } else {
+ [data setValue:[environments objectAtIndex:0] forKey:@"environment"];
+ }
+ [data setValue:self.configFilename forKey:@"config_filename"];
+
+ return data;
+}
+
+- (NSArray*) toArgumentArray {
+ NSMutableArray *arguments = [NSMutableArray array];
+ [[self toDictionary] enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
+ [arguments addObject:[NSString stringWithFormat:@"-%@", key]];
+ [arguments addObject:obj];
+ }];
+ return arguments;
+}
+
+- (void) validate {
+ BOOL result = !(IsEmpty(host) || IsEmpty(path));
+ if (result != valid) {
+ [delegate willChangeValueForKey:@"valid"];
+ [self setValid:result];
+ [delegate didChangeValueForKey:@"valid"];
+ }
+}
+
+- (void) checkChanges {
+ BOOL result = ![beforeChanges isEqualToDictionary:[self toDictionary]];
+ if (result != dirty) {
+ if ([delegate respondsToSelector:@selector(willChangeValueForKey:)])
+ [delegate willChangeValueForKey:@"dirty"];
+ [self setDirty:result];
+ if ([delegate respondsToSelector:@selector(didChangeValueForKey:)])
+ [delegate didChangeValueForKey:@"dirty"];
+ }
+}
+
+- (void) didApplyChanges {
+ beforeChanges = [self toDictionary];
+ self.fresh = NO;
+ [self checkChanges];
+ [self validate];
+}
+
+- (void) revert {
+ [self updateAttributes:beforeChanges];
+ [self validate];
+ [self checkChanges];
+}
+
+- (void) setPath:(NSString *)newPath {
+ if (IsEmpty(host) && !IsEmpty(newPath)) {
+ [self setHost:[NSString stringWithFormat:@"%@.local", [[[NSURL URLWithString:newPath] lastPathComponent] lowercaseString]]];
+ }
+ path = newPath;
+}
+
+- (void) setValue:(id)value forKey:(NSString*)key {
+ [super setValue:value forKey:key];
+ [self validate];
+ [self checkChanges];
+}
+
+@end
286 app/models/passenger_application.rb
View
@@ -1,286 +0,0 @@
-require 'osx/cocoa'
-include OSX
-
-require 'fileutils'
-require 'yaml'
-
-class PassengerApplication < NSObject
- include SharedPassengerBehaviour
-
- CONFIG_UNINSTALLER = File.expand_path('../config_uninstaller.rb', __FILE__)
- CONFIG_INSTALLER = File.expand_path('../config_installer.rb', __FILE__)
- HOSTS_INSTALLER = File.expand_path('../hosts_installer.rb', __FILE__)
-
- RAILS = 'rails'
- RACK = 'rack'
-
- DEVELOPMENT = 0
- PRODUCTION = 1
-
- class << self
- include SharedPassengerBehaviour
-
- VHOSTS_GLOB = File.join(PassengerPaneConfig::PASSENGER_APPS_DIR, "*.#{PassengerPaneConfig::PASSENGER_APPS_EXTENSION}")
-
- def existingApplications
- Dir.glob(VHOSTS_GLOB).map do |app|
- PassengerApplication.alloc.initWithFile(app)
- end
- end
-
- def allHosts
- @allHosts ||= existingApplications.map { |app| app.hosts }.flatten
- end
-
- def allApplicationHostsExist?
- return true if allHosts.empty?
- hosts = `/usr/bin/dscl localhost -list /Local/Default/Hosts`.split("\n")
- (hosts & allHosts).sort == allHosts.sort
- end
-
- def registerAllHosts
- execute PassengerPaneConfig::RUBY, HOSTS_INSTALLER, *allHosts.map { |host| "'#{host}'" }
- end
-
- def startApplications(apps)
- data = serializedApplicationsData(apps)
- log "Starting Rails applications:\n#{data}"
- execute PassengerPaneConfig::RUBY, CONFIG_INSTALLER, data
- apps.each { |app| app.apply(false) }
- end
-
- def removeApplications(apps)
- data = serializedApplicationsData(apps)
- log "Removing applications: #{data}"
- execute PassengerPaneConfig::RUBY, CONFIG_UNINSTALLER, data
- end
-
- def serializedApplicationsData(apps)
- apps.to_ruby.map { |app| app.to_hash }.to_yaml
- end
- end
-
- kvc_accessor :host, :path, :aliases, :dirty, :valid, :revertable, :environment
- attr_accessor :user_defined_data, :vhostname
-
- def init
- if super_init
- @environment = DEVELOPMENT
-
- @new_app = true
- @dirty = @valid = @revertable = false
- @host, @path, @aliases, @user_defined_data = '', '', '', ''
- @vhostname = '*:80'
-
- set_original_values!
- self
- end
- end
-
- def initWithFile(file)
- if init
- @new_app = false
- @valid = false
- load_data_from_vhost_file(file)
- set_original_values!
- self
- end
- end
-
- def initWithPath(path)
- if init
- mark_dirty!
-
- @path = path
- set_default_host_from_path(path)
-
- @valid = true
- set_original_values!
- self
- end
- end
-
- def application_type
- @application_type ||= check_application_type
- end
-
- def new_app?; @new_app; end
- def dirty?; @dirty; end
- def valid?; @valid; end
- def revertable?; @revertable; end
-
- def hosts
- [host] + aliases.split(" ")
- end
-
- def apply(save_config = nil)
- unless @valid
- log "Not applying changes to invalid Rails application: #{@path}"
- return false
- end
-
- log "Applying changes to Rails application: #{@path}"
- (@new_app ? start : restart) unless save_config == false
- # todo: check if it went ok before assuming so.
- @new_app = self.dirty = self.valid = false
-
- true
- end
-
- def start
- log "Starting Rails application: #{@path}"
- save_config!
- end
-
- def restart(sender = nil)
- log "Restarting Rails application: #{@path}"
- if @host != @original_values['host'] || @aliases != @original_values['aliases']
- execute(PassengerPaneConfig::RUBY, CONFIG_UNINSTALLER, [@original_values].to_yaml)
- end
- save_config! if @dirty
-
- tmp_dir = File.join(@path, 'tmp')
- FileUtils.mkdir(tmp_dir) unless File.exist?(tmp_dir)
- Kernel.system("/usr/bin/touch '#{File.join(tmp_dir, 'restart.txt')}'")
- end
-
- def revert(sender = nil)
- @original_values.each do |key, value|
- send "#{key}=", value
- end
- self.valid = self.dirty = self.revertable = false
- end
-
- def reload!
- return if new_app?
- load_data_from_vhost_file
- mark_dirty! if values_changed_after_load?
- set_original_values!
- self.valid = true
- end
-
- def save_config!
- log "Saving configuration: #{config_path}"
- execute PassengerPaneConfig::RUBY, CONFIG_INSTALLER, [to_hash].to_yaml
- set_original_values!
- end
-
- def config_path
- File.join(PassengerPaneConfig::PASSENGER_APPS_DIR, "#{@host}.#{PassengerPaneConfig::PASSENGER_APPS_EXTENSION}")
- end
-
- def rbSetValue_forKey(value, key)
- super
- self.revertable = true
- mark_dirty!
-
- case key
- when 'path'
- path_was_updated!
- when 'environment'
- @custom_environment = nil
- end
-
- self.valid = (!@host.nil? && !@host.empty? && !@path.nil? && !@path.empty?)
- end
-
- def mark_dirty!
- self.dirty = true
- PrefPanePassenger.sharedInstance.applicationMarkedDirty self
- end
-
- def to_hash
- if @new_app
- @user_defined_data = " <Directory \"#{File.join(@path.to_s, 'public')}\">\n Order allow,deny\n Allow from all\n </Directory>"
- else
- update_path_in_user_defined_data!
- end
-
- {
- 'app_type' => application_type,
- 'config_path' => config_path,
- 'host' => @host.to_s,
- 'aliases' => @aliases.to_s,
- 'path' => @path.to_s,
- 'environment' => (@environment.nil? ? @custom_environment : (@environment == DEVELOPMENT ? 'development' : 'production')),
- 'vhostname' => @vhostname,
- 'user_defined_data' => @user_defined_data
- }
- end
-
- private
-
- def blank?(value)
- value.nil? || value.empty?
- end
-
- RAILS_APP_REGEXP = /::Initializer\.run|Application\.initialize!/
-
- def check_application_type
- env_file = File.join(@path, 'config', 'environment.rb')
- (File.exist?(env_file) and File.read(env_file) =~ RAILS_APP_REGEXP) ? RAILS : RACK
- end
-
- def load_data_from_vhost_file(file = config_path)
- data = File.read(file).strip
-
- data.gsub!(/\n\s*ServerName\s+(.+)/, '')
- self.host = $1
-
- data.gsub!(/\n\s*ServerAlias\s+(.+)/, '')
- self.aliases = $1 || ''
-
- data.gsub!(/\n\s*DocumentRoot\s+"(.+)\/public"/, '')
- self.path = $1
-
- data.gsub!(/\n\s*(Rails|Rack)Env\s+(\w+)/, '')
- if %w{ development production }.include?($2)
- self.environment = ($2 == 'development' ? DEVELOPMENT : PRODUCTION)
- else
- self.environment = nil
- @custom_environment = $2
- end
-
- data.gsub!(/<VirtualHost\s(.+?)>/, '')
- self.vhostname = $1
-
- data.gsub!(/\s*<\/VirtualHost>\n*/, '').gsub!(/^\n*/, ''