Skip to content

Commit 0e71ebc

Browse files
committed
Tokaido 2.1.5 release
1 parent 3099ffe commit 0e71ebc

21 files changed

+93
-129
lines changed

Tokaido.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@
868868
GCC_PRECOMPILE_PREFIX_HEADER = YES;
869869
GCC_PREFIX_HEADER = "Tokaido/Tokaido-Prefix.pch";
870870
INFOPLIST_FILE = "Tokaido/Tokaido-Info.plist";
871+
MACOSX_DEPLOYMENT_TARGET = 10.8;
871872
PRODUCT_NAME = "$(TARGET_NAME)";
872873
WRAPPER_EXTENSION = app;
873874
};
@@ -882,6 +883,7 @@
882883
GCC_PRECOMPILE_PREFIX_HEADER = YES;
883884
GCC_PREFIX_HEADER = "Tokaido/Tokaido-Prefix.pch";
884885
INFOPLIST_FILE = "Tokaido/Tokaido-Info.plist";
886+
MACOSX_DEPLOYMENT_TARGET = 10.8;
885887
PRODUCT_NAME = "$(TARGET_NAME)";
886888
WRAPPER_EXTENSION = app;
887889
};
Binary file not shown.

Tokaido/SetupTokaido.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ clear
1010

1111
BIN="$HOME/.tokaido/bin"
1212

13-
export TOKAIDO_GEM_HOME=$HOME/.tokaido/Gems
13+
export TOKAIDO_GEM_HOME=$HOME/.tokaido/Gems/2.1.0
1414
export GEM_HOME=$TOKAIDO_GEM_HOME
1515
export GEM_PATH=$TOKAIDO_GEM_HOME
1616
export PATH=$BIN:$TOKAIDO_PATH:$GEM_HOME/bin:$PATH

Tokaido/TKDApp.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ - (void)runBundleInstall {
231231
NSString *setupScriptPath = [TKDConfiguration setupScriptGemsInstalledFile];
232232
NSString *bundlerPath = [TKDConfiguration gemsBundlerInstalledDirectoryPath];
233233
check.arguments = @[ @"-r", setupScriptPath, bundlerPath, @"check" ];
234-
235234
[check launch];
236235

237236
if ([check terminationStatus] == 0) {

Tokaido/TKDAppDelegate.m

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ - (void) home:(id) sender {
2727
}
2828

2929
- (void)applicationDidBecomeActive:(NSNotification *)aNotification {
30-
[self.window makeKeyAndOrderFront:self];
31-
[NSApp activateIgnoringOtherApps:YES];
30+
if (!_tokaidoController.window.visible) {
31+
[self.window makeKeyAndOrderFront:self];
32+
[NSApp activateIgnoringOtherApps:YES];
33+
}
3234
}
3335

3436
-(void) openTerminal:(id) sender {
@@ -229,13 +231,8 @@ - (void)saveAppSettings {
229231

230232
BOOL success = [NSKeyedArchiver archiveRootObject:self.apps toFile:appSettingsPath];
231233

232-
for(TKDApp *a in self.apps)
233-
NSLog(@"%p={%@}", a, a.appDirectoryPath);
234-
235234
if (!success)
236235
NSLog(@"ERROR: Couldn't save app settings.");
237-
else
238-
NSLog(@"GRABADO");
239236

240237
}
241238

Tokaido/TKDAppLogViewerController.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#import "TKDApp.h"
33

44
@interface TKDAppLogViewerController ()
5-
65
@end
76

87
@implementation TKDAppLogViewerController
@@ -18,7 +17,7 @@ - (id)initWithWindow:(NSWindow *)window
1817

1918
- (void)windowDidLoad {
2019
[super windowDidLoad];
21-
[[self.viewer mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://cubalog.tokaido/logs/%@?path=%@", self.app.appName, self.app.appDirectoryPath]]]];
20+
[[self.viewer mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://cubalog.tokaido/logs/%@/raw?path=%@", self.app.appName, self.app.appDirectoryPath]]]];
2221
}
2322

2423
-(NSArray *)webView:(WebView *)sender

Tokaido/TKDConfiguration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
@interface TKDConfiguration : NSObject
44

55
+(NSString *) rubyVersion;
6+
+(NSString *) rubyNamespace;
67
+(NSString *) applicationName;
78
+(NSString *) bundlePath;
89
+(NSString *) applicationSupportDirectoryPath;
@@ -54,6 +55,7 @@
5455
+(NSString *) compilerExecutableInstalledFile;
5556

5657
+(NSString *) rubiesInstalledDirectoryPath;
58+
+(NSString *) gemsGlobalInstalledDirectoryPath;
5759
+(NSString *) gemsInstalledDirectoryPath;
5860
+(NSString *) gemsBinaryInstalledDirectoryPath;
5961
+(NSString *) magickInstalledDirectoryPath;

Tokaido/TKDConfiguration.m

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@
55
@implementation TKDConfiguration
66

77
+(NSString *) rubyVersion {
8-
return @"2.2.0-p0";
8+
return @"2.1.5-p273";
9+
}
10+
11+
+(NSString *) rubyNamespace {
12+
return @"2.1.0";
913
}
1014

1115
+(NSArray *) rubiesBundled {
12-
return @[[[TKDRubyBinary alloc] initWithName:@"2.2.0-p0"]];
16+
return @[[[TKDRubyBinary alloc] initWithName:@"2.1.5-p273"]];
1317
}
1418

1519
+(NSArray *) rubiesInstalled {
@@ -28,7 +32,7 @@ +(NSArray *) rubiesInstalled {
2832
}
2933

3034
+(NSString *) rubyConfigInstalledFile {
31-
return [[self rubiesInstalledDirectoryPath] stringByAppendingPathComponent:@"/2.2.0-p0/lib/ruby/2.2.0/x86_64-darwin12.0/rbconfig.rb"];
35+
return [[self rubiesInstalledDirectoryPath] stringByAppendingPathComponent:@"/2.1.5-p273/lib/ruby/2.1.0/x86_64-darwin12.0/rbconfig.rb"];
3236
}
3337

3438
+(NSString *) applicationName {
@@ -51,10 +55,14 @@ +(NSString *) rubiesInstalledDirectoryPath {
5155
return [[self tokaidoLocalHomeDirectoryPath] stringByAppendingPathComponent:@"Rubies"];
5256
}
5357

54-
+(NSString *) gemsInstalledDirectoryPath {
58+
+(NSString *) gemsGlobalInstalledDirectoryPath {
5559
return [[self tokaidoLocalHomeDirectoryPath] stringByAppendingPathComponent:@"Gems"];
5660
}
5761

62+
+(NSString *) gemsInstalledDirectoryPath {
63+
return [[self tokaidoLocalHomeDirectoryPath] stringByAppendingPathComponent:[NSString stringWithFormat:@"Gems/%@", [self rubyNamespace]]];
64+
}
65+
5866
+(NSString *) temporalWorkingSpace {
5967
return [[self tokaidoLocalHomeDirectoryPath] stringByAppendingPathComponent:@"Tmp"];
6068
}

Tokaido/TKDEnsureAppSupportUpdated.m

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ -(void) installRubiesBundled;
1010
-(void) installGemsBundled;
1111
-(void) installBinariesBundled;
1212
-(void) applyRubyConfigPatches;
13+
-(void) guaranteeRubySymlinkToCurrent;
1314
@end
1415

1516
@implementation TKDEnsureAppSupportUpdated
@@ -39,6 +40,8 @@ -(void) execute {
3940
[self installBinariesBundled];
4041
[self applyRubyConfigPatches];
4142

43+
[self guaranteeRubySymlinkToCurrent];
44+
4245
[_view finished_ensuring_app_support_is_updated];
4346
}
4447

@@ -65,12 +68,19 @@ -(void) installRubiesBundled {
6568
[_view finished_ruby_installations];
6669
}
6770

71+
-(void) guaranteeRubySymlinkToCurrent {
72+
TKDRubyBinary *binary = [[TKDRubyBinary alloc] initWithName:[[self configuration] rubyVersion]];
73+
TKDInstallRuby *current = [[TKDInstallRuby alloc] initWithRubyBinary:binary withView:_view];
74+
75+
[current symlink];
76+
}
77+
6878
-(void) installGemsBundled {
69-
NSString *gemsInstalledDirectoryPath = [[self configuration] gemsInstalledDirectoryPath];
79+
NSString *gemsGlobalInstalledDirectoryPath = [[self configuration] gemsGlobalInstalledDirectoryPath];
7080
NSString *bundledGemsZipfile = [[self configuration] bundledGemsFile];
7181

7282
[_view checking_gems_installation];
73-
[self.fileManager createDirectoryAtPathIfNonExistant:gemsInstalledDirectoryPath];
83+
[self.fileManager createDirectoryAtPathIfNonExistant:gemsGlobalInstalledDirectoryPath];
7484
[_view unzipping_gems_bundled];
7585
[self.fileManager unzipFileAtPath:bundledGemsZipfile
7686
inDirectoryPath:[[self configuration] tokaidoLocalHomeDirectoryPath]];

Tokaido/TKDInstallRuby.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
-(TKDInstallRuby *) initWithRubyBinary:(TKDRubyBinary *)bin withView:(id <TKDAppSupportEnsure>)view;
1313

1414
-(void) install;
15+
-(void) symlink;
1516

1617
@end

0 commit comments

Comments
 (0)