- The Phoenix Project
- The DevOps Handbook
- Release It!: Design and Deploy Production-Ready Software
Java::JavaLang::IllegalArgumentException (the salt parameter must not be empty): | |
javax.crypto.spec.PBEKeySpec.<init>(PBEKeySpec.java:118) | |
org.jruby.ext.openssl.PKCS5.generatePBEKey(PKCS5.java:112) | |
org.jruby.ext.openssl.PKCS5.pbkdf2_hmac_sha1(PKCS5.java:62) | |
org.jruby.ext.openssl.PKCS5$INVOKER$s$1$0$pbkdf2_hmac_sha1.call(PKCS5$INVOKER$s$1$0$pbkdf2_hmac_sha1.gen) | |
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:296) | |
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:72) | |
org.jruby.ast.CallManyArgsNode.interpret(CallManyArgsNode.java:59) | |
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) | |
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) |
package com.starqle.hcm; | |
import com.sun.jersey.spi.container.servlet.ServletContainer; | |
import org.eclipse.jetty.server.Server; | |
import org.eclipse.jetty.servlet.ServletContextHandler; | |
import org.eclipse.jetty.servlet.ServletHolder; | |
public class Application { | |
public static void main (String[] args) throws Exception { | |
ServletHolder sh = new ServletHolder(ServletContainer.class); |
app.factory "User", ($resource, apiPrefix, AuthTokenHandler) -> | |
resource = $resource( apiPrefix + "/users/:id", | |
id: "@id" | |
, | |
update: | |
method: "PUT" | |
) | |
resource = AuthTokenHandler.wrapActions(resource, [ | |
"query", "get", "save", "update", "delete"] |
app.factory "AuthTokenHandler", () -> | |
authTokenHandler = {} | |
authToken = "none" | |
# Getter / setter | |
authTokenHandler.get = () -> | |
return authToken | |
authTokenHandler.set = (newAuthToken) -> | |
authToken = newAuthToken |
app.run ($rootScope, Session, AuthTokenHandler, $location) -> | |
# Watch Session signedIn variable and reasign rootScope session variables | |
# accordingly. | |
$rootScope.$watch (-> | |
Session.signedIn | |
), () -> | |
$rootScope.currentUser = Session.currentUser | |
$rootScope.signedIn = Session.signedIn | |
$rootScope.signedOut = Session.signedOut |
app.service "Session", (sessionStore, UserSession) -> | |
# Initialize variables (happens every page load) | |
@signedIn = !!window.sessionStorage.getItem(sessionStore) | |
@signedOut = not @signedIn | |
if @signedIn | |
@currentUser = JSON.parse(window.sessionStorage.getItem(sessionStore)).user | |
@userSession = new UserSession( | |
login: "" |
# ====================================================================== | |
# admin/file_managers.js.coffee | |
# | |
# Description: | |
# contains snippets & functions for handling file-manager-related operation. | |
# ====================================================================== | |
root = exports ? this | |
$ -> |
app = node[:rails][:app] | |
rails_base app[:name] do | |
ruby_ver app[:ruby_ver] | |
gemset app[:gemset] | |
end | |
%w{config log pids cached-copy bundle system}.each do |dir| | |
directory "#{app[:app_root]}/shared/#{dir}" do | |
owner app[:deploy_user] |
require 'bundler/capistrano' | |
# use rvm | |
set :rvm_ruby_string, 'ruby-1.9.3-p194@unm' | |
# set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") | |
set :rvm_type, :system | |
require 'rvm/capistrano' | |
load "config/recipes/base" | |
load "config/recipes/mysql" |