examples/user_test.rb in ncmb-ruby-client-0.1.3 vs examples/user_test.rb in ncmb-ruby-client-0.1.4

- old
+ new

@@ -1,12 +1,18 @@ -$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -$:.unshift(File.dirname(__FILE__)) +# 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'] +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 @@ -18,11 +24,11 @@ @user = NCMB::User.new @user.set('userName', 'testUser2') @user.set('password', 'testPassword2') if @user.signUp - puts "User create successful." - @user.set("Hello", "World") + puts 'User create successful.' + @user.set('Hello', 'World') @user.update else puts "User create failed. #{@user.error.message}" end