From 5e41e428a60f36c12ec4fe6884312f79f93dc82e Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 6 Mar 2015 13:16:46 -0500 Subject: [PATCH 1/5] fixing search using repo info instead --- src/NewContainer.react.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/NewContainer.react.js b/src/NewContainer.react.js index 3cc15637c1..8798980c47 100644 --- a/src/NewContainer.react.js +++ b/src/NewContainer.react.js @@ -67,12 +67,19 @@ var NewContainer = React.createClass({ cache: false, dataType: 'json', })).then(res => res.repos).map(repo => { - return $.get('https://registry.hub.docker.com/v1/search?q=' + repo.repo).then(data => { - var results = data.results; - var result = _.find(results, function (r) { - return r.name === repo.repo; - }); - return _.extend(result, repo); + var query = repo.repo; + var vals = query.split('/'); + var official = false; + if (vals.length === 1) { + official = true; + query = 'library/' + vals[0]; + } + return $.get('https://registry.hub.docker.com/v1/repositories_info/' + query).then(data => { + var res = _.extend(data, repo); + res.description = data.short_description; + res.is_official = data.is_official || official; + res.name = data.repo; + return res; }); }).then(results => { _recommended = results.filter(r => !!r); From 58af2f4e9ba8b6a3a4991199b7069cddd568688d Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 6 Mar 2015 13:19:05 -0500 Subject: [PATCH 2/5] Bumping version, atom-shell --- package.json | 5 +++-- util/Info.plist | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 util/Info.plist diff --git a/package.json b/package.json index 1425cf2c53..0fabf7e944 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Kitematic", - "version": "0.5.9", + "version": "0.5.10", "author": "Kitematic", "description": "Simple Docker Container management for Mac OS X.", "homepage": "https://kitematic.com/", @@ -16,6 +16,7 @@ "release": "gulp release", "release:beta": "gulp release --beta", "preinstall": "./util/deps", + "postinstall": "gulp download && cp util/Info.plist cache/Atom.app/Contents/Info.plist && cp util/kitematic.icns cache/Atom.app/Contents/Resources/atom.icns", "lint": "jsxhint src && jsxhint browser" }, "licenses": [ @@ -41,7 +42,7 @@ }, "docker-version": "1.5.0", "docker-machine-version": "0.1.0-kitematic-0.5.9", - "atom-shell-version": "0.21.2", + "atom-shell-version": "0.21.3", "virtualbox-version": "4.3.24", "virtualbox-filename": "VirtualBox-4.3.24.pkg", "virtualbox-checksum": "4a7dff25bdeef0d112e16ac11bee6d52e856d36bb412aa75576036ba560082eb", diff --git a/util/Info.plist b/util/Info.plist new file mode 100644 index 0000000000..50bb762e7a --- /dev/null +++ b/util/Info.plist @@ -0,0 +1,41 @@ + + + + + CFBundleDisplayName + Kitematic (Development) + CFBundleExecutable + Atom + CFBundleIconFile + atom.icns + CFBundleIdentifier + com.kitematic.development + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Kitematic (Development) + CFBundlePackageType + APPL + CFBundleVersion + 0.0 + LSMinimumSystemVersion + 10.8.0 + NSMainNibFile + MainMenu + NSPrincipalClass + AtomApplication + NSSupportsAutomaticGraphicsSwitching + + CFBundleURLTypes + + + CFBundleURLSchemes + + kitematic + + CFBundleURLName + Kitematic Shared Session Protocol + + + + From 99bca9f29f23ed75512347fb0d2089f347d03d2b Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 6 Mar 2015 13:22:47 -0500 Subject: [PATCH 3/5] Updating plist --- util/Info.plist | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/util/Info.plist b/util/Info.plist index 50bb762e7a..396be69183 100644 --- a/util/Info.plist +++ b/util/Info.plist @@ -26,16 +26,5 @@ AtomApplication NSSupportsAutomaticGraphicsSwitching - CFBundleURLTypes - - - CFBundleURLSchemes - - kitematic - - CFBundleURLName - Kitematic Shared Session Protocol - - From 6b712530acf3135650ee3ffac5637ee389f18abb Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 6 Mar 2015 13:24:46 -0500 Subject: [PATCH 4/5] Properly detect official --- src/NewContainer.react.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/NewContainer.react.js b/src/NewContainer.react.js index 8798980c47..22c725499f 100644 --- a/src/NewContainer.react.js +++ b/src/NewContainer.react.js @@ -69,15 +69,13 @@ var NewContainer = React.createClass({ })).then(res => res.repos).map(repo => { var query = repo.repo; var vals = query.split('/'); - var official = false; if (vals.length === 1) { - official = true; query = 'library/' + vals[0]; } return $.get('https://registry.hub.docker.com/v1/repositories_info/' + query).then(data => { var res = _.extend(data, repo); res.description = data.short_description; - res.is_official = data.is_official || official; + res.is_official = data.namespace === 'library'; res.name = data.repo; return res; }); From 394bf5cc3fc58745e439421a2e7cb7e81f8c58b6 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 6 Mar 2015 13:27:26 -0500 Subject: [PATCH 5/5] Fix build --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0fabf7e944..0dc9ffd9d1 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "release": "gulp release", "release:beta": "gulp release --beta", "preinstall": "./util/deps", - "postinstall": "gulp download && cp util/Info.plist cache/Atom.app/Contents/Info.plist && cp util/kitematic.icns cache/Atom.app/Contents/Resources/atom.icns", + "postinstall": "gulp download && if [ `uname` == 'Darwin' ]; then cp util/Info.plist cache/Atom.app/Contents/Info.plist && cp util/kitematic.icns cache/Atom.app/Contents/Resources/atom.icns; fi", "lint": "jsxhint src && jsxhint browser" }, "licenses": [