This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require_relative 'sharepoint_downloader' | |
# variables | |
client_id = ENV['CLIENT_ID'] | |
client_secret = ENV['CLIENT_SECRET'] | |
refresh_token = ENV['REFRESH_TOKEN'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'jdbc/dss' | |
require 'sequel' | |
require 'csv' | |
Jdbc::DSS.load_driver | |
FILENAME = '' | |
USERNAME = '' | |
PASSWORD = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GitHub | |
class << self | |
def download_file_to_string(github_token, setup={}, raw=true, link=nil) | |
if link | |
url = link | |
else | |
sql_repo_name = setup['repo_name'] | |
sql_repo_owner = setup['repo_owner'] | |
# URI join won't make it: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'json' | |
# change require 'library' to require_relative 'path' | |
# path will be dynamic depending on the current file path | |
# I don't deal with libraries I don't know | |
LIBS_DIR = 'libs' | |
def generate_require_relative(file_path, require_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dss_jdbc_url": "jdbc:dss://secure.gooddata.com/gdc/dss/instances/something", | |
"GDC_USERNAME": "[email protected]", | |
"GDC_PASSWORD": "yourpassword", | |
"dss_GDC_USERNAME": "[email protected]", | |
"dss_GDC_PASSWORD": "yourotherpassword", | |
"dss_name_prefix": "sfdc", | |
"gooddata_model_url": "https://gist.githubusercontent.com/cvengros/a85874dd8f8da034c70d/raw/2441035702459d210b9013b6d1bfe21be3d90de7/salesapp_model.json", | |
"dataset_mapping": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"salesforce_username": "[email protected]", | |
"salesforce_password": "theirpassword", | |
"salesforce_token": "theirtoken", | |
"salesforce_client_id": "sfdc oauth app id", | |
"salesforce_client_secret": "sfdc oauth app secret", | |
"dss_jdbc_url": "jdbc:dss://secure.gooddata.com/gdc/dss/instances/something", | |
"dss_GDC_USERNAME": "[email protected]", | |
"dss_GDC_PASSWORD": "yourpassword", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "salesapp", | |
"datasets": [ | |
{ | |
"name":"account", | |
"columns":[ | |
{ | |
"name":"id", | |
"type":"anchor" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
LICENSE_TEXT = "%s Copyright (C) 2007-2014 My Cool license text %s" | |
SKIP_PATTERN = /.*Copyright\(C\)*/ | |
# rb, js, hbs, css | |
FILE_TYPES = { | |
:rb => { | |
:pattern => '**/*.rb', |