<commit_before>Meteor.startup(function () {

	if (Meteor.settings.testdata) {
		createGroupsIfNone();          // Groups     from server/data/testing.groups.js
		createTestRegionsIfNone();     // Regions    from server/data/testing.regions.js
		createCoursesIfNone(Meteor.settings.testdata);
		createLocationsIfNone();       // Locations  from server/data/testing.locations.js
		createEventsIfNone();          // Events     in   server/testing.createnload.data.js (generic)
		loadTestEvents();              // Events     from server/data/testing.events.js
	}

	var serviceConf = Meteor.settings.service;
	if (serviceConf) {
		if (serviceConf.facebook) {
			ServiceConfiguration.configurations.remove({
				service: 'facebook'
			});
			ServiceConfiguration.configurations.insert({
				service: 'facebook',
				loginStyle: "popup",
				appId: serviceConf.facebook.appId,
				secret: serviceConf.facebook.secret
			});
		}
		if (serviceConf.github) {
			ServiceConfiguration.configurations.remove({
				service: "github"
			});
			ServiceConfiguration.configurations.insert({
				service: "github",
				loginStyle: "popup",
				clientId: serviceConf.github.clientId,
				secret: serviceConf.github.secret
			});
		}
	}
	
	if (Meteor.settings.admins) {
		for (name in Meteor.settings.admins) {
			var user = Meteor.users.findOne({ username: Meteor.settings.admins[name]});
			if (user) {
				Meteor.users.update({_id: user._id}, { $addToSet: { privileges: 'admin' }});
			}
		}
	}
});
<commit_msg>adding mailgun-settings-parser<commit_after>Meteor.startup(function () {

	if (Meteor.settings.testdata) {
		createGroupsIfNone();          // Groups     from server/data/testing.groups.js
		createTestRegionsIfNone();     // Regions    from server/data/testing.regions.js
		createCoursesIfNone(Meteor.settings.testdata);
		createLocationsIfNone();       // Locations  from server/data/testing.locations.js
		createEventsIfNone();          // Events     in   server/testing.createnload.data.js (generic)
		loadTestEvents();              // Events     from server/data/testing.events.js
	}

	var serviceConf = Meteor.settings.service;
	if (serviceConf) {
		if (serviceConf.facebook) {
			ServiceConfiguration.configurations.remove({
				service: 'facebook'
			});
			ServiceConfiguration.configurations.insert({
				service: 'facebook',
				loginStyle: "popup",
				appId: serviceConf.facebook.appId,
				secret: serviceConf.facebook.secret
			});
		}
		if (serviceConf.github) {
			ServiceConfiguration.configurations.remove({
				service: "github"
			});
			ServiceConfiguration.configurations.insert({
				service: "github",
				loginStyle: "popup",
				clientId: serviceConf.github.clientId,
				secret: serviceConf.github.secret
			});
		}
	}
	
	if (Meteor.settings.admins) {
		for (name in Meteor.settings.admins) {
			var user = Meteor.users.findOne({ username: Meteor.settings.admins[name]});
			if (user) {
				Meteor.users.update({_id: user._id}, { $addToSet: { privileges: 'admin' }});
			}
		}
	}
	var emailConf = Meteor.settings.email;
	if (emailConf) {
		if (emailConf.mailgun) {
			process.env.MAIL_URL = emailConf.mailgun
			console.info('email configured to: '+emailConf.mailgun+' …done')
		}
	}
});

{'fraction_non_alphanumeric': 0.1336865066999065, 'fraction_numerical': 0.0, 'mean_word_length': 3.379263301500682, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7171728', 'n_tokens_mistral': 1180, 'n_tokens_neox': 999, 'n_words': 167}