Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds API_Gitlab_URL setting and overwrites Gitlab.Server #563

Merged
merged 1 commit into from
Aug 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ jalik:ufs
jalik:ufs-gridfs
monbro:mongodb-mapreduce-aggregation
accounts-gitlab
gitlab
rocketchat:gitlab
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
Expand Down
4 changes: 4 additions & 0 deletions packages/rocketchat-gitlab/common.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Meteor.startup ->
Tracker.autorun ->
if RocketChat.settings.get 'API_Gitlab_URL'
Gitlab.ServerURL = RocketChat.settings.get 'API_Gitlab_URL'
3 changes: 3 additions & 0 deletions packages/rocketchat-gitlab/i18n/en.i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"API_Gitlab_URL": "GitLab URL"
}
Empty file.
32 changes: 32 additions & 0 deletions packages/rocketchat-gitlab/package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Package.describe({
name: 'rocketchat:gitlab',
version: '0.0.1',
summary: 'RocketChat settings for GitLab Oauth Flow'
});

// Loads all i18n.json files into tapi18nFiles
var _ = Npm.require('underscore');
var fs = Npm.require('fs');
tapi18nFiles = _.map(fs.readdirSync('packages/rocketchat-gitlab/i18n'), function(filename) { return 'i18n/' + filename });

Package.onUse(function(api) {
api.versionsFrom('1.0');
api.use(["tap:[email protected]"], ["client", "server"]);
api.add_files("package-tap.i18n", ["client", "server"]);
api.use(['templating'], 'client');

api.use([
'coffeescript',
'rocketchat:[email protected]',
'[email protected]'
]);

api.addFiles('startup.coffee', 'server');
api.addFiles('common.coffee', [ 'client', 'server' ]);

api.add_files(tapi18nFiles, ["client", "server"]);
});

Package.onTest(function(api) {

});
1 change: 1 addition & 0 deletions packages/rocketchat-gitlab/startup.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RocketChat.settings.add 'API_Gitlab_URL', '', { type: 'string', group: 'API', public: true, i18nLabel: 'rocketchat-gitlab:API_Gitlab_URL' }