Sha256: 9fa933a8b237e699fb50480b9c9670beac078ca5563a7e8a442ea743c65c2071
Contents?: true
Size: 750 Bytes
Versions: 4
Compression:
Stored size: 750 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ncmb-ruby-client-0.1.3 | examples/user_test.rb |
ncmb-ruby-client-0.1.2 | examples/user_test.rb |
ncmb-ruby-client-0.1.1 | examples/user_test.rb |
ncmb-ruby-client-0.1.0 | examples/user_test.rb |