Sha256: 7e0590ef79531338e67947ec0342be4e3b7bea769437f85a3bb9c269a7a9db29
Contents?: true
Size: 804 Bytes
Versions: 4
Compression:
Stored size: 804 Bytes
Contents
# frozen_string_literal: true $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rubygems' require 'ncmb' require 'yaml' yaml = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'setting.yml')) NCMB.initialize( application_key: yaml['application_key'], client_key: yaml['client_key'] ) if @user = NCMB::User.login('testUser2', 'testPassword2') puts NCMB.CurrentUser.userName NCMB.CurrentUser.delete begin @user.delete rescue => e puts e.message end end @user = NCMB::User.new @user.set('userName', 'testUser2') @user.set('password', 'testPassword2') if @user.signUp puts 'User create successful.' @user.set('Hello', 'World') @user.update else puts "User create failed. #{@user.error.message}" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ncmb-ruby-client-0.1.7 | examples/user_test.rb |
ncmb-ruby-client-0.1.6 | examples/user_test.rb |
ncmb-ruby-client-0.1.5 | examples/user_test.rb |
ncmb-ruby-client-0.1.4 | examples/user_test.rb |