Skip to content

Instantly share code, notes, and snippets.

View PrashantBhatasana's full-sized avatar
🎯
Focusing

Bhatasana Prashant PrashantBhatasana

🎯
Focusing
View GitHub Profile
@PrashantBhatasana
PrashantBhatasana / Jenkinsfile
Last active October 3, 2019 06:02
This is the Demo jenkinsfile script for my medium blog. https://medium.com/appgambit/build-pipeline-with-jenkins-c13bf788a3f0
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building..'
}
}
stage('Test') {
---
- name: Demo for SampleApp-Server
hosts:
- SampleApp-Server
gather_facts: true
become: yes
become_method: sudo
tags: [jenkins]
tasks:
@PrashantBhatasana
PrashantBhatasana / protractor.conf.js
Created April 22, 2019 16:26
this is Demo protractor configuration file for my article.
// An example configuration file.
exports.config = {
directConnect: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome' //firefox,chrome
},
// Framework to use. Jasmine is recommended.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/* global browser, By, element, expect */
describe('Spec | Test Login', function () {
browser.driver.get('https://my.prodappcms.test.com/');
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/* global browser, By, element, expect, By, ptor, protractor, driver */
describe('Service Hub CMS', function () {
it('should find correct title', function () {
@PrashantBhatasana
PrashantBhatasana / protractor.conf.js
Last active June 6, 2019 08:33
Demo protractor configuration file with `protractor-beautiful-reporter` intergation.
var HtmlReporter = require('protractor-beautiful-reporter');
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'firefox'
@PrashantBhatasana
PrashantBhatasana / protractor.conf.js
Created June 6, 2019 08:34
Demo protractor configuration file with `protractor-jasmine2-html-reporter` intergation.
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'firefox'
},
@PrashantBhatasana
PrashantBhatasana / protractor.conf.js
Last active June 6, 2019 08:38
Demo protractor configuration file with `jasmine-reporters` intergation.
var jasmineReporters = require('jasmine-reporters');
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'firefox'
},
@PrashantBhatasana
PrashantBhatasana / protractor.conf.js
Created June 6, 2019 08:39
Demo protractor configuration file with `jasmine-spec-reporter` intergation.
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'firefox'
},
package utility;
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp;
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow;
import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets;
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;
import com.google.api.client.http.javanet.NetHttpTransport;
import com.google.api.client.json.JsonFactory;