Sha256: 26cd4cc373ce883edb72096145438c4e1cf8ba48dfcf63bf4667d752bac805ea
Contents?: true
Size: 754 Bytes
Versions: 1
Compression:
Stored size: 754 Bytes
Contents
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $:.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ncmb-ruby-client-0.0.9 | examples/user_test.rb |