# 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'] ) @push = NCMB::Push.new @push.immediateDeliveryFlag = true @push.target = ['ios'] @push.message = 'This is test message' @push.deliveryExpirationTime = '3 day' if @push.save puts 'Push save successful.' else puts 'Push save faild.' end