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
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
#import "AppDelegate.h" |
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 Storage { | |
constructor(dbName, remoteDbUrl) { | |
this.dbName = dbName | |
this.remoteDbUrl = remoteDbUrl; | |
} | |
init() { | |
this.database = new manager(`http://127.0.0.1:5984/`, this.dbName); | |
return this.database.createDatabase().then(res => { |
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
'use strict'; | |
import {manager, ReactCBLite} from 'react-native-couchbase-lite'; | |
import EventEmitter from 'EventEmitter'; | |
export const CHANGE_EVENT_TYPE = 'change'; | |
const ERROR_EVENT_TYPE = 'error'; | |
const DB_NAME = 'db'; //'user_123'; | |
const DB_LOCAL_USER_NAME = 'admin'; | |
const DB_LOCAL_PASSWORD = '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
export default class MerchCoReports extends React.Component { | |
constructor(serverProps, context) { | |
super(serverProps, context); | |
this.state = {loggedIn: true, name: 'Bill'} | |
} | |
onLoggOutClicked = (e) => { | |
this.setState({loggedIn:false}) | |
} | |
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
/* | |
* Copyright (C) 2014 sebnapi | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
def migrate_db(remote) | |
# sh %{heroku maintenance:on --remote #{remote}} || fail | |
sh %{heroku run --remote #{remote} bundle exec rake db:migrate} || fail | |
# sh %{heroku maintenance:off --remote #{remote}} || fail | |
end | |
def zero_deploy(environment, remote, branch) | |
original_path = pwd | |
deploy_name = "#{environment}_#{Time.now.strftime("%Y-%m-%d-%H-%M")}" | |
puts "-> bundle exec rake deploy:monitor[#{deploy_name}]" |
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
if Rails.env[/production|staging/] | |
config.logger = Logger.new(STDOUT) | |
config.logger.level = Logger.const_get(ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'INFO') | |
end |