Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Created new universal binary for OSX and fixed bug that allowed visio…

…n to only be started once
  • Loading branch information...
commit 5f5471a8c359edefeb4f8715df81a1f1eecf8e0c 1 parent 988de0f
@tobi tobi authored
View
2  .gitignore
@@ -8,6 +8,8 @@ rails_monitor.*
vendor/*/.svn
test/*/.svn
+pkg/*
+
# ignore generated docs
doc/api*
View
17 Vision.app/Contents/Info.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>Vision</string>
<key>CFBundleGetInfoString</key>
- <string>Vision 1.0 Copyright 2006 Tobias Luetke</string>
+ <string>Vision 2.0 Copyright 2009 Tobias Lütke</string>
<key>CFBundleIconFile</key>
<string>appIcon.icns</string>
<key>CFBundleIdentifier</key>
@@ -21,24 +21,21 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.0</string>
+ <string>2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
<key>LSEnvironment</key>
- <dict>
- <key>APP_BUNDLER</key>
- <string>Platypus-3.2</string>
- </dict>
+ <dict/>
<key>LSHasLocalizedDisplayName</key>
<false/>
+ <key>LSMinimumSystemVersion</key>
+ <string>10.4</string>
<key>LSUIElement</key>
<false/>
<key>NSAppleScriptEnabled</key>
<false/>
<key>NSHumanReadableCopyright</key>
- <string>Vision 1.0 Copyright 2006 Tobias Luetke</string>
+ <string>Vision 2.0 Copyright 2009 Tobias Lütke</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
View
BIN  Vision.app/Contents/MacOS/Vision
Binary file not shown
View
1  Vision.app/Contents/PkgInfo
@@ -1 +0,0 @@
-APPL????
View
0  Vision.app/Contents/Resources/.script
No changes.
View
24 Vision.app/Contents/Resources/AppSettings.plist
@@ -1,20 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>Creator</key>
- <string>Platypus-3.2</string>
- <key>EncryptAndChecksum</key>
+ <key>AppPathAsFirstArg</key>
<false/>
+ <key>Creator</key>
+ <string>Platypus-4.2</string>
+ <key>InterpreterParams</key>
+ <array/>
<key>IsDroppable</key>
<false/>
<key>OutputType</key>
- <string>TextWindow</string>
+ <string>Text Window</string>
<key>RemainRunningAfterCompletion</key>
<true/>
<key>RequiresAdminPrivileges</key>
<false/>
<key>ScriptInterpreter</key>
<string>/bin/bash</string>
+ <key>Secure</key>
+ <false/>
+ <key>TextBackground</key>
+ <string>#000000</string>
+ <key>TextEncoding</key>
+ <integer>4</integer>
+ <key>TextFont</key>
+ <string>Monaco</string>
+ <key>TextForeground</key>
+ <string>#f5f5f5</string>
+ <key>TextSize</key>
+ <real>10</real>
</dict>
</plist>
View
4 Vision.app/Contents/Resources/English.lproj/InfoPlist.strings
@@ -0,0 +1,4 @@
+CFBundleName = "Vision";
+CFBundleShortVersionString = "2.0";
+CFBundleGetInfoString = "Vision version 2.0 Copyright 2009 Tobias L�tke";
+NSHumanReadableCopyright = "Copyright 2009 Tobias L�tke.";
View
BIN  Vision.app/Contents/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown
View
BIN  Vision.app/Contents/Resources/appIcon.icns
Binary file not shown
View
4 Vision.app/Contents/Resources/en.lproj/InfoPlist.strings
@@ -1,4 +0,0 @@
-CFBundleName = "Vision";
-CFBundleShortVersionString = "1.0";
-CFBundleGetInfoString = "Vision version 1.0 Copyright 2006 Tobias Luetke";
-NSHumanReadableCopyright = "Copyright 2006 Tobias Luetke.";
View
26 Vision.app/Contents/Resources/en.lproj/MainMenu.nib/classes.nib
@@ -1,26 +0,0 @@
-{
- IBClasses = (
- {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
- {
- ACTIONS = {cancel = id; };
- CLASS = ScriptExecController;
- LANGUAGE = ObjC;
- OUTLETS = {
- aboutMenuItem = id;
- applicationMenu = id;
- cancelButton = id;
- hideMenuItem = id;
- messageTextField = id;
- progressBar = id;
- progressWindow = id;
- quitMenuItem = id;
- textOutputCancelButton = id;
- textOutputProgressIndicator = id;
- textOutputTextField = id;
- textOutputWindow = id;
- };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-}
View
21 Vision.app/Contents/Resources/en.lproj/MainMenu.nib/info.nib
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBDocumentLocation</key>
- <string>477 26 356 240 0 0 1280 832 </string>
- <key>IBEditorPositions</key>
- <dict>
- <key>29</key>
- <string>281 550 273 44 0 0 1280 832 </string>
- </dict>
- <key>IBFramework Version</key>
- <string>364.0</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>29</integer>
- </array>
- <key>IBSystem Version</key>
- <string>7M34</string>
-</dict>
-</plist>
View
BIN  Vision.app/Contents/Resources/en.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown
View
7 Vision.app/Contents/Resources/script
@@ -20,10 +20,5 @@ else
exit 1
fi
-exec $RUBY vision.rb
-if [ 0 -ne $? ]; then
- echo "*** Please visit http://help.shopify.com/design/show/VisionTroubleshooting for further assistence"
-fi
-
-exit 0
+exec $RUBY vision.rb
View
24 misc/vision-platipus.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+DIR="`dirname "$0"`"
+cd "$DIR/../../../"
+
+source ~/.profile &> /dev/null
+source ~/.bashrc &> /dev/null
+
+export PATH="/usr/local/bin:/opt/local/bin:/sw/local/bin:$PATH"
+RUBY="`which ruby`"
+
+if [[ -f "vision.rb" ]]; then
+ echo "Vision coming up..."
+ echo "=> `uname -sr` on `machine`"
+ echo "=> using $RUBY"
+ echo "=> `$RUBY -v`"
+else
+ echo "=> Could not find vision.rb in same directory as Vision.app"
+ echo "=> Please only use Vision.app when its in the original directory"
+ exit 1
+fi
+
+
+exec $RUBY vision.rb
View
6 public/update.html
@@ -20,9 +20,13 @@
<div id="highlight" class="round clear" style="margin: 50px;">
<div id="hleft" class="clearfix">
<h2 class="tagline">You need to update.</h2>
+ <h3 class="stdout">3.4.0:</h3>
+ <ul class="changes">
+ <li>Fixes to moderno theme</li>
+ </ul>
<h3 class="stdout">3.3.0:</h3>
<ul class="changes">
- <li>Fixed a problem with exporting themes when vision is installed in a path with spaces.li>
+ <li>Fixed a problem with exporting themes when vision is installed in a path with spaces.</li>
</ul>
<h3 class="stdout">3.1.0:</h3>
<ul class="changes">
View
2  server/config/version.rb
@@ -26,7 +26,7 @@ def verify_latest_version
-Vision.version = '3.3.0'
+Vision.version = '3.4.0'
Vision.latest_version = '0'
Vision.update_url = 'http://vision.shopify.com/update.html'
Vision.verify_latest_version
View
42 vision.rb
@@ -15,16 +15,36 @@
# Setup webrick
puts "=> Vision starting at http://localhost:#{PORT}/"
-webrick = mount(WEBrick::HTTPServer.new(:Port => PORT ))
-
trap("INT") { $webrick.shutdown }
-
-
-case RUBY_PLATFORM
-when /darwin/
- system("open http://localhost:#{PORT}/dashboard/")
-when /win/
- system("start http://localhost:#{PORT}/dashboard/")
+trap("TERM") { $webrick.shutdown }
+
+puts 'starting...'
+
+begin
+ mount(WEBrick::HTTPServer.new(:Port => PORT ))
+
+ case RUBY_PLATFORM
+ when /darwin/
+ system("open http://localhost:#{PORT}/dashboard/")
+ when /win/
+ system("start http://localhost:#{PORT}/dashboard/")
+ end
+
+ $webrick.start
+rescue => e
+
+ if RUBY_PLATFORM && !$tried_to_kill
+ $tried_to_kill ||= 3
+ $tried_to_kill -= 1
+
+ if $tried_to_kill > 0
+ puts "Trying to stop existing vision process..."
+ pid = `ps x | grep vision.rb`.to_a[0].split[0]
+ Process.kill(:SIGTERM, pid.to_i)
+ sleep(1)
+ end
+ retry
+ end
+
+ puts "Could not start vision, port #{PORT} already used."
end
-
-webrick.start
Please sign in to comment.
Something went wrong with that request. Please try again.