helper.putProperties(RakeProjectHelper.PROJECT_PROPERTIES_PATH, ep); Util.logUsage(RubyProjectGenerator.class, "USG_PROJECT_CREATE_RUBY", // NOI18N platform.getInfo().getKind(), platform.getInfo().getPlatformVersion(), 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()); }
: platform.getGemManager().getLatestVersion("rails"); // NOI18N Util.logUsage(RailsProjectGenerator.class, "USG_PROJECT_CREATE_RAILS", // NOI18N platform.getInfo().getKind(), platform.getInfo().getPlatformVersion(), platform.getInfo().getGemVersion(),
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? }