platform.getInfo().getKind(), platform.getInfo().getPlatformVersion(), platform.getInfo().getGemVersion());
gemPathList.setModel(createGemPathsModel(plaf)); refreshGemToolVersion(); gemToolValue.setText(plaf.getGemTool() + " (" + plaf.getInfo().getGemVersion() + ')'); // NOI18N color = UIManager.getColor("Label.foreground"); } else {
private void includeDeps(List<String> argList) { // -y and --include-dependencies is deprecated since 0.9.5 (and automatic) if (Util.compareVersions(platform.getInfo().getGemVersion(), "0.9.5") < 0) { // NOI18N argList.add("--include-dependencies"); // NOI18N } }
platform.getInfo().getKind(), platform.getInfo().getPlatformVersion(), platform.getInfo().getGemVersion(), getServerIdForLogging(data.getServerInstanceId(), platform), data.getDatabase().getDisplayName(),
private static void putPlatformProperties(final String id, final File interpreter, final Info info, final EditableProperties props) throws FileNotFoundException { String interpreterKey = PLATFORM_PREFIX + id + PLATFORM_INTEPRETER; props.setProperty(interpreterKey, interpreter.getAbsolutePath()); if (!interpreter.isFile()) { throw new FileNotFoundException(interpreter.getAbsolutePath()); } String idDot = id + '.'; props.setProperty(PLATFORM_PREFIX + idDot + Info.RUBY_KIND, info.getKind()); props.setProperty(PLATFORM_PREFIX + idDot + Info.RUBY_VERSION, info.getVersion()); if (info.getJVersion() != null) { props.setProperty(PLATFORM_PREFIX + idDot + Info.JRUBY_VERSION, info.getJVersion()); } if (info.getPatchlevel() != null) { props.setProperty(PLATFORM_PREFIX + idDot + Info.RUBY_PATCHLEVEL, info.getPatchlevel()); } props.setProperty(PLATFORM_PREFIX + idDot + Info.RUBY_RELEASE_DATE, info.getReleaseDate()); // props.setProperty(PLATFORM_PREFIX + idDot + Info.RUBY_EXECUTABLE, info.getExecutable()); props.setProperty(PLATFORM_PREFIX + idDot + Info.RUBY_PLATFORM, info.getPlatform()); if (!info.isRubinius()) { props.setProperty(PLATFORM_PREFIX + idDot + Info.RUBY_LIB_DIR, info.getLibDir()); } if (info.getGemHome() != null) { props.setProperty(PLATFORM_PREFIX + idDot + Info.GEM_HOME, info.getGemHome()); props.setProperty(PLATFORM_PREFIX + idDot + Info.GEM_PATH, info.getGemPath()); props.setProperty(PLATFORM_PREFIX + idDot + Info.GEM_VERSION, info.getGemVersion()); } }
@Override protected void storeProperties(EditableProperties projectProperties, EditableProperties privateProperties) throws IOException { if (server != null) { privateProperties.remove(RAILS_SERVERTYPE); projectProperties.setProperty(RAILS_SERVERTYPE, server.getServerUri()); } if (getRailsEnvironment() != null) { privateProperties.setProperty(RAILS_ENV, getRailsEnvironment()); } RubyPlatform platform = getPlatform(); if (platform == null) { LOGGER.fine("Project has invalid platform (null)."); return; } Info info = platform.getInfo(); Util.logUsage(RailsProjectProperties.class, "USG_PROJECT_CONFIG_RAILS", // NOI18N info.getKind(), info.getPlatformVersion(), info.getGemVersion(), getServerIdForLogging(), "", // XXX database seems to not be configurable, so this attribute does not make sense here? ""); // XXX rails version - the same as above 'database' attribute? }
String getRubyGemsVersion() { return platform.getInfo().getGemVersion(); }
@Override protected void storeProperties(EditableProperties projectProperties, EditableProperties privateProperties) throws IOException { RubyPlatform platform = getPlatform(); if (platform == null) { LOGGER.fine("Project has invalid platform (null)."); return; } Info info = platform.getInfo(); Util.logUsage(RubyProjectProperties.class, "USG_PROJECT_CONFIG_RUBY", // NOI18N info.getKind(), info.getPlatformVersion(), info.getGemVersion()); }
private boolean refreshGemToolVersion(){ boolean wasUpdated = false; RubyPlatform plaf = getSelectedPlatform(); String old = plaf.getInfo().getGemVersion(); //original one plaf.getGemManager().resetLocal(); String updated = plaf.getGemManager().getLatestVersion(UPDATE_GEM_NAME); //NOI18N if(updated != null && !updated.equals(old)){ plaf.getInfo().setGemVersion(updated); wasUpdated = true; } return wasUpdated; }
public @Override String toString() { return "RubyPlatform$Info[GEM_HOME:" + getGemHome() + ", GEM_PATH: " + getGemPath() // NOI18N + ", gemVersion: " + getGemVersion() + ", lib: " + getLibDir() + "]"; // NOI18N }