query
stringlengths 7
9.55k
| document
stringlengths 10
363k
| metadata
dict | negatives
sequencelengths 0
101
| negative_scores
sequencelengths 0
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
All pending donations to the artist. | def pending
donations.where("donations.status = 'pending' AND created_at < ?", Donation.revoke_time)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reminder\n send_reminders self.charges.where(:completed => false)\n end",
"def donated\n\t\tdonations.where(\"status != 'returned' AND status != 'failed' AND status != 'revoked'\")\n\tend",
"def donated\n\t\tdonations.where(\"status != 'returned' AND status != 'failed' AND status != 'revoked'\")\n\tend",
"def user_donations\n @donations = @user.my_donations.decorate\n end",
"def index\n @donations = EventDonation.all\n end",
"def man_req_donations\n prepareBaseContext\n @donations = Donation.where('donation_date IS NULL').order('donation_date')\n render 'petshelter/management/requests/donations'\n end",
"def find_pending\n notifications.where sent: false\n end",
"def donated\n \tdonations.sum(&:amount)\n end",
"def related_assigned_donations\n scope = Donation.where(\"id != ?\", @donation.id).where(:donor_id => @donation.donor_id)\n if [email protected]_reference.blank?\n scope.where(:bank_reference => @donation.bank_reference)\n elsif [email protected]?\n scope.where(:email => @donation.email)\n else\n []\n end\n end",
"def confirm_all_pending_purchases\r\n self.pending_purchases.each{|purchase| purchase.confirm}\r\n end",
"def index\n @donations = Donation.all\n end",
"def index\n @donations = Donation.all\n end",
"def index\n @donations = Donation.all\n end",
"def index\n @donations = Donation.all\n end",
"def index\n @donations = Donation.all\n end",
"def pending_requests_to_join\n ContributorRequest.includes(\n :user\n ).where(\n organization: self\n ).select(&:pending?)\n end",
"def notify_of_request\n # UserNotifier.async_deliver_donations_requested(user)\n end",
"def pending_assignments(assessor,certification_id = nil)\n if certification_id.nil?\n joins(:owned).where(:issued=>false,:owned=>{:id=>assessor.students})\n else\n joins(:owned).by_certification(certification_id).where(:issued=>false,:owned=>{:id=>assessor.students})\n end\n end",
"def index\n @donations = Donation.by_person(current_user.id) || []\n end",
"def donations(page=1, per_page=50, auth = false)\n get(\"v1/fundraising/pages/#{@short_name}/donations?pageNum=#{page}&pagesize=#{per_page}\",\n :basic_auth => auth)\n end",
"def donor_wishes\n conns = connections_as_friend - [base_connection]\n dls = DonorLink.where(connection_id: conns.collect(&:id))\n Wish::FromDonor.where(id: dls.collect(&:wish_id).uniq).order('updated_at DESC')\n end",
"def pending_request\n sent_requests.where(confirmed: nil)\n end",
"def artist_approval(artist, recipients)\n @artist = artist\n mail(to: recipients,\n subject: \"Artist relations approval\")\n end",
"def number_donations\n if user_signed_in?\n @notifications = current_user.get_notifications_number\n end\n end",
"def all_pending_followables(options={})\n all_pending_follows(options).collect{ |f| f.followable }\n end",
"def index\n @donators = Donator.all\n end",
"def donated_sum\n\t\tdonated.sum(\"amount * (artist_percentage / 100)\").to_f.round(2)\n\tend",
"def pending_quests\n quests = UsersQuest.where(:assignee_id => @current_user.id,:is_accepted => false,:is_rejected =>false).pluck(:quest_id)\n @quests = Quest.where(:id => quests).order('due_date')\n by_me_quests = UsersQuest.where(:assignor_id => @current_user.id,:is_accepted => false,:is_rejected =>false).pluck(:quest_id)\n @by_me_quests = Quest.where(:id => by_me_quests).order('due_date')\n end",
"def void_pending_purchase_orders\n self.purchase_orders.select(&:pending?).each {|o| o.void}\n end",
"def show\n @donation = @need.donations.build\n end",
"def all_pending_follows(options={})\n self.follows.unblocked.pending.includes(:followable).apply_finder_options(options, true)\n end",
"def notify_final_delivery\n @reports = Reports.get_all_reports\n @delivery = Packages.get_all_packages\n if( @delivery != nil ) && ( @reports != nil )\n @reports.each do|t|\n @delivery.each do|s|\n if( ( t.reported_id == s.senders_id ) && ( s.finalDelivery == false ) && ( t.packages_id == s.id ) )\n @notification = Notifications.create(s.senders_id, \"You should confirm the final delivery\")\n end\n end\n end\n end\n return;\n end",
"def donor_wishes\n conns=connections_as_friend-[base_connection]\n dls=DonorLink.where(connection_id: (conns.collect{|c| c.id}) )\n Wish::FromDonor.where(id: (dls.collect {|dl| dl.wish_id}).uniq ).order(\"updated_at DESC\")\n end",
"def get_pending\n Rutodo::Database::Todo.where(done: false).map(&:as_entity)\n end",
"def donations_requested(user)\n setup_email_admin(user)\n @recipients = \"[email protected]\"\n @from = head_encode('\"Kroogi Contributions Request (system)\"'.t) + \" <[email protected]>\"\n @subject += head_encode(\"Contributions requested by %s\" / user.login)\n @content_type = \"text/html\" \n @body[:url] = \"http://#{APP_CONFIG[:hostname]}/admin/donation_requests\"\n @body[:user] = user\n end",
"def total_donations\n donations.successful.sum(:amount)\n end",
"def perform\n commented_idea_ids = Comment.approved.not_notified.not_recent.group(:idea_id).count.map { |idea_id, _| idea_id }\n voted_idea_ids = Vote.not_notified.not_recent.group(:voteable_id).count.map { |idea_id, _| idea_id }\n idea_ids = (commented_idea_ids + voted_idea_ids).uniq\n\n idea_ids.each do |id|\n idea = Idea.find_by_id(id)\n next unless idea\n comments_pending = idea.comments_pending_notification\n votes_pending = idea.votes_pending_notification\n next unless comments_pending.present? || votes_pending.present?\n\n # Lower-level plans don't allow notifications.\n unless idea.user.can_notify?\n Rails.logger.debug \"Notifications disabled for idea #{idea.id} - skipping.\"\n mark_notified(comments_pending, votes_pending)\n next\n end\n\n # Send the email now.\n UserMailer.idea_notification_email(idea).deliver_now\n\n mark_notified(comments_pending, votes_pending)\n end\n end",
"def related_unassigned_donations\n scope = Donation.where(\"id != ?\", @donation.id).where(:donor_id => nil)\n if [email protected]_reference.blank? && [email protected]_reference.to_s.mb_chars.downcase.to_s.strip.in?(BANK_REFERENCE_BLACKLIST)\n scope.where(:bank_reference => @donation.bank_reference)\n elsif [email protected]?\n scope.where(:email => @donation.email)\n else\n []\n end\n end",
"def notify_all\n if @size > 0\n @report << \"#{@size} abonnement(s) à notifier\"\n do_notify_all\n @report << Registry.report_missed_notifications\n else\n @report << 'Pas de notification à faire'\n end\n @report\n end",
"def organ_donors\n \nend",
"def notify_final_delivery\n @reports = Reports.find( :all )\n @delivery = Packages.find( :all )\n if( @delivery != nil ) && ( @reports != nil )\n @reports.each do|t|\n @delivery.each do|s|\n if( ( t.reported_id == s.senders_id ) && ( s.finalDelivery == false ) && ( t.packages_id == s.id ) )\n @notification = Notifications.new\n @notification.users_id = s.senders_id\n @notification.description = \"You should confirm the delivery of the package\"\n @notification.save\n end\n end\n end\n end\n return;\n end",
"def donors_setup\n end",
"def company_payment_reminders\n check_company_usage_cycle\n company_monthly_payment_reminders\n end",
"def pending_friend_requests_to\n self.friendships.where(state: \"pending\")\n end",
"def notify_finalpayment\n @pack = Packages.get_packages_final_payment\n @pay = Payment.get_all_payments\n if( @pack != nil ) && ( @pay != nil )\n @pack.each do |t|\n @pay.each do |s|\n if( t.id == s.packages_id ) && ( t.carriers_id = s.users_id )\n @notification = Notifications.create(t.carriers_id, \"as a carrier an amount has been added to your account and another amount has been deducted\")\n end\n end\n end\n end\n return;\n end",
"def donations_approved(user, project=nil)\n setup_email(user)\n @subject += head_encode(project ? (\"Contributions for %s have been activated\" / project.login) : 'Your contributions request has been approved'.t)\n @body[:project] = project\n @body[:url] = \"http://#{APP_CONFIG[:hostname]}/money\"\n end",
"def pending_accept\n received_requests.where(confirmed: nil)\n end",
"def confirm!\n self.pending = false\n self.save\n self.createDebts\n end",
"def pending(params = {})\n @api.get(\"#{@api.path}/List/#{@id}/Recipients/Pending\", params: params)\n end",
"def index\n authorize :donation\n @donations = Donation.ordered.decorate\n end",
"def notify_finalpayment\n @pack = Packages.find( :all, :conditions => {:finalDelivery => true} )\n @pay = Payment.find( :all )\n if( @pack != nil ) && ( @pay != nil )\n @pack.each do |t|\n @pay.each do |s|\n if( t.id == s.packages_id ) && ( t.carriers_id = s.users_id )\n @notification = Notifications.new\n @notification.users_id = t.carriers_id\n @notification.description = \"an amout has been added to your account and another amount has been deducted\"\n @notification.save\n end\n end\n end\n end\n return;\n end",
"def pending\n tutor_requests = PendingTutorRequest\n .select('users.id AS user_id, users.first_name,\n users.last_name, users.agg_user_rating, users.num_user_rating,\n tutor_subjects.rate, users.phone_number, courses.course_prefix,\n courses.course_code, pending_tutor_requests.id')\n .joins(:student, tutor_subject: :course).where(tutor_id: params[:tutor_id])\n json_response(tutor_requests.all)\n end",
"def points(artist = nil)\n\t\tw = artist ? \" AND artist_id = #{artist.id}\" : \"\"\n\t\tw = \"status != 'returned' AND status != 'failed' AND status != 'revoked'#{w}\"\n\t\tif artist\n\t\t\tl = artist.listens.where(\"user_id = ?\", id).count\n\t\telse\n\t\t\tl = listens.count\n\t\tend\n\t\td = donations.where(w).sum(:amount)\n\t\t\n\t\treturn (l + (d * 1000)).to_i\n\tend",
"def sell_pending\n end",
"def findings_briefs\n user = User.includes(:findings).references(:findings).merge(Finding.with_pending_status).take\n findings = user.findings.with_pending_status.finals(false)\n\n NotifierMailer.findings_brief user, findings.to_a\n end",
"def notify_carriers\n @requests = Requests.get_requests_delete_package(cookies[:user_id])\n @packages = Packages.get_packages_rating(cookies[:user_id])\n if( @requests != nil && @packages != nil )\n @requests.each do |t|\n @packages.each do |s|\n if( t.packages_id == s.id && t.senders_id == s.senders_id && t.accept == nil && s.carriers_id ==nil )\n @notification = Notifications.create( t.carriers_id,\" You have received a request to carry a package\" )\n end\n end\n end\n end\n return;\n end",
"def pending_promotions\n @pending_promotions ||= []\n end",
"def notify_payment\n @pack = Packages.get_packages_payment\n @pay = Payment.get_all_payments\n if( @pack != nil ) && ( @pay != nil )\n @pack.each do |t|\n @pay.each do |s|\n if( t.id == s.packages_id )\n if( t.senders_id == s.users_id )\n @notification = Notifications.create(t.senders_id, \"as a sender an amount has been deducted from your account\")\n elsif( t.carriers_id == s.users_id )\n @notification = Notifications.create(t.carriers_id, \"as a carrier an amount has been deducted from your account\")\n end\n end\n end\n end\n end\n return;\n end",
"def index\n #Show all donations\n #Admin only\n @donations = Donation.all\n end",
"def loan_request_accepted_notification(transaction)\n @owner = transaction.owner\n @requester = transaction.requester\n @user_lacquer = transaction.user_lacquer\n\n mail(to: @requester.email, subject: \"#{@owner.name} has agreed to loan you #{@user_lacquer.lacquer.name}!\")\n\n headers['X-MC-Track'] = \"opens, clicks_all\"\n end",
"def listeners\n users_to_notify = Set.new\n users_to_notify += self.proposal.currently_awaiting_approvers\n users_to_notify += self.proposal.individual_steps.approved.map(&:user)\n users_to_notify += self.proposal.observers\n users_to_notify << self.proposal.requester\n # Creator of comment doesn't need to be notified\n users_to_notify.delete(self.user)\n users_to_notify\n end",
"def claim!\n interested.unrequested.each do |membership|\n self << membership\n end\n end",
"def pending\n\t\tpending_friends | requested_friendships\n\tend",
"def pay_all_bills\n #self.appointments.update_all(cost: 0)\n self.appointments.each {|a| a.paid}\n end",
"def pending\n pending_friends | requested_friendships\n end",
"def pending\n pending_friends | requested_friendships\n end",
"def set_donation\n @donation = Donation.find(params[:id])\n @payment_purposes = PaymentPurpose.all_active\n @events = Event.all_active\n @currencies = Currency.all_active\n @payment_modes = PaymentMode.all_active\n end",
"def donate_to(other_user)\n self.create_active_donorship(donated_to_id: other_user.id)\n end",
"def map_activities_n_donors()\n @donors = Donor.all.map { |donor| [donor.full_name_id, donor.id]}\n @activities = Activity.all.map { |activity| [ activity.name, activity.id ] }\n end",
"def pending_friend_requests_to\n \tself.friendships.where(state: \"pending\")\n end",
"def get_pending_requests\n r = Request.where(:assigned => self , :done => false).to_a\n return r\n end",
"def pending_sum\n\t\tpending.sum(\"amount * (artist_percentage / 100)\").to_f.round(2)\n\tend",
"def pending\n @user = current_user\n @friendship_requests = current_user.requested_friendships\n end",
"def polled_delivery( recipient_email , pending_deliveries )\n @recipient_email = recipient_email \n @user = User.find_by_email @recipient_email \n @pending_deliveries = pending_deliveries\n time = Time.now\n \n mail( :to => recipient_email, \n :subject => \"pilipoto | Updates (#{pending_deliveries.count}): #{time}\", \n :bcc => [\"[email protected]\"] )\n \n end",
"def all_not_done\n self.select { |todo| !todo.done? }\n end",
"def add_donor_with_no_gifts(donor)\n donor['title'] = ''\n donor['nickname'] = ''\n @reportDonorsArray.push(donor)\n end",
"def funded_email_to_pledges\n Pledge.where(\"gift_id\" => self.id).each do |pledge|\n user = User.find_by_id(pledge.user_id)\n Pony.mail(:to => user.email, :from => '[email protected]', :subject => 'gift got bought!', :body => 'yay. you did it! now you owe money.')\n end\n end",
"def find_all_pending_publication\n find(:all, :conditions => [\"responses.status = ? AND responses.published_at < ?\", \n 'created', Time.now.utc - 30.days])\n end",
"def asks_pending\n\t\t@objects = Loan.where(borrower_id: current_user.id, is_accepted: nil)\n\t\t@view = \"asks/asks_pending\"\n\t\t@tag = \"Mes demandes en attente\"\n\t\tputs @objects.inspect\n\t\trender \"loans\", objects: @objects\n\tend",
"def starred_notes\n fetch_notes_for nil, true\n end",
"def pending\n result = {\n approvals: [],\n unapprovals: [],\n flagged: [],\n unflagged: [],\n comments: [],\n ready: []\n }\n\n Agenda.index.each do |item|\n if Pending.comments[item.attach]\n result.comments << item\n end\n\n action = false\n\n if Pending.approved.include? item.attach\n result.approvals << item\n action = true\n end\n\n if Pending.unapproved.include? item.attach\n result.unapprovals << item\n action = true\n end\n\n if Pending.flagged.include? item.attach\n result.flagged << item\n action = true\n end\n\n if Pending.unflagged.include? item.attach\n result.unflagged << item\n action = true\n end\n\n if not action and item.ready_for_review(User.initials)\n result.ready << item\n end\n end\n\n return result\n end",
"def contributions_with_outstanding_cois\n self.contributions.reject {|c| c.latest_committed_manuscript_coi_form }\n end",
"def notify_administrators!\n AdminMailer.new_pending_interest_point(self).deliver!\n end",
"def mark_all_done\n self.each { |todo| todo.done! }\n end",
"def pending\n @emails = Email.where(:state => \"Pending\")\n respond_with @emails\n end",
"def notify_payment\n @pack = Packages.find( :all,:conditions =>{:receivedByCarrier => true} )\n @pay = Payment.find( :all )\n if( @pack != nil ) && ( @pay != nil )\n @pack.each do |t|\n @pay.each do |s|\n if( t.id == s.packages_id )\n if( t.senders_id == s.users_id )\n @notification = Notifications.new\n @notification.users_id = t.senders_id\n @notification.description = \"an amount has been deducted from your account\"\n @notification.save\n elsif( t.carriers_id == s.users_id )\n @notifications = Notifications.new\n @notifications.users_id = t.carriers_id\n @notifications.description = \"an amount of has been deducted from your account\"\n @notifications.save\n end\n end\n end\n end\n end\n return;\n end",
"def find_all_pending_publication\n find(:all, :conditions => [\"comments.status = ? AND comments.published_at < ?\", \n 'created', Time.now.utc - 30.days])\n end",
"def pending_friend_requests_from\n self.inverse_friendships.where(state: \"pending\")\n end",
"def announce\n crowd.each do |contact|\n media.each do |medium|\n if contact.reachable_by?(medium)\n message = TownCrier::Message.create!(proclamation: self, contact: contact, medium: medium)\n message.deliver\n end\n end\n end\n end",
"def donate(d)\n\t\treturn unless donate?\n\t\t\n\t\tbegin\n\t\t\tcase provider\n\t\t\twhen \"facebook\"\n\t\t\t\tshow_donation_on_facebook(d)\n\t\t\t\t\n\t\t\twhen \"twitter\"\n\t\t\t\tshow_donation_on_twitter(d)\n\t\t\tend\n\t\trescue Exception => e\n\t\t\tlogger.debug \"error sharing donation on service: #{provider}\"\n\t\t\tcatch_error(d, e)\n\t\tend\n\tend",
"def send_all_invitations\n uu = User.all.reject{|u| u.bounced_at || u.test || u.email =~ /musicalretreat.org/ || u.has_current_registration}\n Rails.logger.info(\"Going to send #{uu.size} invitations\")\n uu.each do |u|\n begin\n RegistrationMailer.invitation(u)\n Rails.logger.info(\"Successfully sent to #{u.email}\")\n rescue StandardError => e\n Rails.logger.error(\"Failed to send to #{u.email} due to #{e}\")\n end\n end\n end",
"def confirmed?\n self.contributions.each do |contribution|\n return false if contribution.isPending?\n end\n return true\n end",
"def friendships_pending\n friendships_pending = []\n friendships.where(confirmed: false).each { |fs| friendships_pending << User.find(fs.friend_id) }\n friendships_pending\n end",
"def set_donation\n @donation = Donation.includes(:donation_categories, :attachments, :address, :package_cost, :charity, :user).find(params[:id])\n end",
"def index\n @donation_campaigns = DonationCampaign.all\n end",
"def pending_friends\n Relationship.find_all_by_friend_id_and_approved(self,false)\n end",
"def pending\n pending_friends | pending_friend_requests\n end",
"def send_notifications!\n # The person who wrote the note, anybody who's left a comment on this note minus \"current\" comment creator\n notification_emails.each do |email|\n Notifier.comment(self, email).deliver\n end\n end",
"def notify_couriers\n @current_time = Time.zone.now\n\n @packages = find_packages(application_params[:city_db_id])\n\n @emails = find_emails(application_params[:city_db_id])\n\n ## Create list of recipients as array of strings\n @recipients = []\n @emails.each do |email|\n @recipients << email.email_value\n end\n\n # Tell the Emailer to send a notification email to all couriers\n Emailer.packages_notification(@current_time,@packages,@recipients).deliver\n end",
"def do_notify_all\n number = tiers_list.size\n @report << \"#{number} mail(s) à envoyer\"\n tiers_list.each do |tiers_id|\n subs = to_be_notified_for(tiers_id)\n done = Notifier.new(tiers_id, subs, @mode).notify\n next if done\n number -= 1\n @report << \"notification impossible pour le tiers #{tiers_id}\"\n end\n @report << \"#{number} mails(s) de notification envoyé(s)\"\n end"
] | [
"0.60566956",
"0.6032234",
"0.6032234",
"0.5849296",
"0.5748424",
"0.5733049",
"0.5640135",
"0.5596199",
"0.5583756",
"0.55705535",
"0.556558",
"0.556558",
"0.556558",
"0.556558",
"0.556558",
"0.5499329",
"0.5477442",
"0.5472697",
"0.5469624",
"0.54487514",
"0.5412253",
"0.53965527",
"0.5381077",
"0.53234106",
"0.5318779",
"0.53183246",
"0.5307",
"0.5289628",
"0.5282762",
"0.52762246",
"0.52741116",
"0.52737874",
"0.5269268",
"0.5253222",
"0.5244994",
"0.52190685",
"0.5182796",
"0.51780784",
"0.51678324",
"0.5160351",
"0.5156893",
"0.51528615",
"0.5151054",
"0.5149462",
"0.51490307",
"0.5144619",
"0.51441413",
"0.514078",
"0.5135814",
"0.51131606",
"0.5101116",
"0.50996083",
"0.5099398",
"0.509689",
"0.5071985",
"0.5044748",
"0.5040347",
"0.5034177",
"0.5033851",
"0.5031344",
"0.50252",
"0.5025133",
"0.5024771",
"0.5024141",
"0.50233084",
"0.50233084",
"0.50213766",
"0.5015638",
"0.50116426",
"0.5008165",
"0.50005674",
"0.499968",
"0.499923",
"0.4986149",
"0.49829105",
"0.4968161",
"0.495055",
"0.49479267",
"0.49432167",
"0.49418795",
"0.49371436",
"0.4915888",
"0.4914529",
"0.49028283",
"0.49024895",
"0.48993254",
"0.48978847",
"0.48926538",
"0.48740017",
"0.48730937",
"0.4871695",
"0.486761",
"0.48601314",
"0.48558635",
"0.48535466",
"0.4852096",
"0.48466766",
"0.48464105",
"0.4842068",
"0.48373964"
] | 0.65946424 | 0 |
The amount that has been donated to the artist but not yet processed. | def pending_sum
pending.sum("amount * (artist_percentage / 100)").to_f.round(2)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def donated_sum\n\t\tdonated.sum(\"amount * (artist_percentage / 100)\").to_f.round(2)\n\tend",
"def donated_amount\n self.fees.purchased.sum(:amount).to_f\n end",
"def total_debt\n self.amount\n end",
"def disbursed_amount\n amount = 0\n loans.each do |project|\n amount += project.disbursed_amount.to_i\n end\n amount\n end",
"def final_amount\n amount_paid - discount_value - discount_percent\n end",
"def amount_remaining\n @desired_amount - @bought_amount\n end",
"def amount_owed\n total_price - amount_paid\n end",
"def donated\n \tdonations.sum(&:amount)\n end",
"def get_discounted_amount\n\t\tif self.discount.nil?\n\t\t\t0\n\t\telse\n\t\t\tself.amount * self.discount\n\t\tend\n\n end",
"def investment\n if buy_price\n num_of_shares * buy_price\n end\n end",
"def amount; end",
"def _spent_on\n return payment\n end",
"def donated_sum\n\t\tdonated.sum(:amount).to_f.round(2)\n\tend",
"def sum_charges\n return (self.sum_produits_used)\n end",
"def progress\n\t@donations = Donation.find_all_by_fundraiser_id(id)\n\t@progress = 0\n\tif @donations.nil?\n\t return @progress\n\telse\n\t @donations.each do |d|\n\t\tif !d.amount.nil?\n\t\t @progress += d.amount\n\t\tend\n\t end\n\tend\n\treturn @progress\n end",
"def amount_charged\n\t\t@amount = 6000\n\tend",
"def amount\n\t\t\t\t@amount\n\t\t\tend",
"def amount_owed\n invoice_total - total_amount_paid\n end",
"def promo_total\n 0.0\n end",
"def amount_after_tax\n if waitlist_deduct_amount.present?\n amount_after_discounted + amount_of_tax - waitlist_deduct_amount\n else\n amount_after_discounted + amount_of_tax\n end\n end",
"def amount\n @amount\n end",
"def amount\n user.company.point_values[:received_approval_value]\n end",
"def unpaid_amount\n gross_amount - paid_amount\n end",
"def pending_amount\n @calculator.pending_amount\n end",
"def amount_payment_outstanding\n capital_required - amount_payment_collected\n end",
"def total_donations\n donations.successful.sum(:amount)\n end",
"def total_amount\n self.tickets.inject(0) do |amount, ticket|\n amount += ticket.price_minus_discount\n end\n end",
"def get_amount\n\t\t@amount\n\tend",
"def unpaid_amount\n draft ? nil : gross_amount - paid_amount\n end",
"def amount\n @percent\n end",
"def amount\n @percent\n end",
"def total_amount\n @total_amount ||= data_analyzer.total_amount\n end",
"def last_gift_amount(donor)\n last_gift = find_last_gift(donor)\n if last_gift.nil?\n return 0\n else\n return last_gift.amount\n end\n end",
"def discount_amount\n has_discount? ? (line_item.total_in_cents * discount.percentage/100.0).to_i : 0\n end",
"def amount_to_set\n # if (report && Response.payment_node(report) && Response.payment_node(report)[:authorization] && Response.payment_node(report)[:authorization][:amount].present?)\n if (report && Response.payment_node(report) && Response.payment_node(report)[:authorization] && Response.payment_node(report)[:authorization][:amount].present?)\n if canceled\n return Response.payment_node(report)[:authorization][:amount].to_i\n else\n return total_acquirer_pending + total_acquirer_approved\n end\n else\n return false\n end\n end",
"def deposit_quantity\n money.to_d.divmod(market.settle_price(currency)).first\n end",
"def infer_amount!\n self.amount = nil\n\n full_description = \"#{quantity} #{notes}\".downcase\n\n inferred = full_description.gsub(/[a-z|\\s]/, '').to_f\n self.amount = inferred if inferred > 0\n\n if self.amount == nil\n Rails.logger.warn \"Couldn't infer amount from [#{full_description}]\"\n end\n end",
"def amount\n difference\n end",
"def amount\n available_amount - blocked_amount\n end",
"def total_amount_before_modifier\n sale_amount + discount_amount + tax_amount + shipping_amount\n end",
"def points(artist = nil)\n\t\tw = artist ? \" AND artist_id = #{artist.id}\" : \"\"\n\t\tw = \"status != 'returned' AND status != 'failed' AND status != 'revoked'#{w}\"\n\t\tif artist\n\t\t\tl = artist.listens.where(\"user_id = ?\", id).count\n\t\telse\n\t\t\tl = listens.count\n\t\tend\n\t\td = donations.where(w).sum(:amount)\n\t\t\n\t\treturn (l + (d * 1000)).to_i\n\tend",
"def get_cart_paid_amount\n\t\tself.cart_paid_amount \n\tend",
"def original\n original_amount\n end",
"def remaining_total\n total\n end",
"def still_needed\r\n\t@target_fund - @fund\r\nend",
"def total_owned\n self.shares.map{ |share| share.value }.inject(:+)\n end",
"def supp_quantity \n\n supp_quantity = 0.0\n \n self.receptions.each do |mr|\n supp_quantity += mr.quantity ? mr.quantity : 0.0 # en caso de que no se haya definido el quantity\n end\n\n return supp_quantity\n\n end",
"def artist_share\n\t\tamount * (artist_percentage.to_f / 100)\n\tend",
"def current_subtotal\n debt_claim_items.reject(&:marked_for_destruction?).sum(&:current_debt)\n end",
"def amount\n return self.fee['amount'].to_f\n end",
"def amount_raised\n self.pledges.sum(:amount)\n end",
"def amount_i\n @amount\n end",
"def amount\n data['amount'].to_f / 100\n end",
"def cost\n\t\treturn @extra_cost + @real_donation.cost\n\tend",
"def discounted_total\n line_item.total_in_cents - discount_amount\n end",
"def amount_earned\n completed? ? potential_incentive : 0\n end",
"def amount\n recognition.badge.points\n end",
"def total_drinking\n breast_feedings.sum(:quantity)\n end",
"def amount\n v = state[:amount] and BigDecimal(v.to_s)\n end",
"def return amount\n @quantity += amount\n #true\n end",
"def sugar_amount\n @sugar_amount\n end",
"def amount_refunded\n amt = Money.new(0)\n transactions.each do |t|\n if t.transaction_type == \"refund\" && t.status != \"voided\"\n amt += t.money_amount\n end\n end\n return amt\n end",
"def ot_voucher_amount\n end",
"def present_value\n # Payoff amount = 0, we’re assuming a fully amortizing loan\n payoff_amount = 0\n end",
"def amount_current\n if reset_at && !reset_amount.nil?\n amount = reset_amount\n purchases_after_reset.each { |i| amount += i.amount }\n amount -= consumed_after_reset\n clean_number amount\n else\n # Sum purchases amount (integer)\n purchases.sum(:amount)\n end\n end",
"def purchase_amount\n if order.present?\n order.total - credits_amount\n else\n credits_amount\n end\n end",
"def total_price\n self.price + self.donation_amount\n end",
"def outstanding_amount\n if payment_item.is_a? GeneralPaymentItem\n [0.0, payment_item.amount - payment_installments.map(&:amount).sum].max\n else\n nil\n end\n end",
"def money_made\n total_crowd * self.ticket_price\n end",
"def total_requested_award_amount\n total = 0.0\n awards.valid.each do |a|\n total += a.amount_awarded.blank? ? a.amount_requested : a.amount_awarded\n end\n total\n end",
"def final_price\n (self.price*(1 - self.discount.to_f / 100)).to_i\n end",
"def amount\n @attributes[:amount]\n end",
"def amount\n bid.amount\n end",
"def amount\n @amount ||= begin\n amount = Txaction.calculate_amount(params[:amount]).to_d.abs\n amount = -amount if params[:amount_type] == 'spent'\n amount\n end\n end",
"def item_total\n @promotion_attributed_line_items.map(&:amount).sum\n end",
"def amount(include_discount = true)\r\n include_discount && @discount && @discount.apply_to_recurring? ? self[:amount] - @discount.calculate(self[:amount]) : self[:amount]\r\n end",
"def total_amount\n unit_amount * quantity\n end",
"def amt\n amount.gsub(/,|\\)'/, '')\n end",
"def total_amount_passed_to_field_worker\n # it is assumed that the setup fee is deducted from loan disbursement \n total_amount_passed = BigDecimal(\"0\")\n self.membership_to_receive_loan_disbursement.each do |glm|\n glp = glm.group_loan_product \n total_amount_passed += glp.loan_amount - glp.setup_payment_amount\n end\n \n return total_amount_passed\n end",
"def has_paid (driver, person, amount)\n # debt - amount\n end",
"def total_discount(items)\n 0\n end",
"def payment_amount\n convert_email_to_user && save\n return override_cost if override_cost.present?\n\n event&.get_cost(member: user&.present?)\n end",
"def balance_owed\n discounted_price - amount_paid\n end",
"def gift_total_amount_per_donor(donor)\n selected_gifts = Gift.where(:donor_id => donor)\n sum = 0\n selected_gifts.each do |g|\n sum+=g.amount\n end\n return sum\n end",
"def total_value\n @quantity * @price_per_share\n end",
"def total_value_of_shares\n total_number_of_shares * @current_value\n end",
"def money\n\t\tif @wallet.neg?\n\t\t\t@in_debt = true\n\t\tend\n\t\treturn @wallet.amount\n\tend",
"def spent\n self.deliverables.collect(&:spent).delete_if { |d| d.blank?}.inject { |sum, n| sum + n } || 0.0\n end",
"def total_on_hand\n if @variant.should_track_inventory?\n stock_items.sum(:count_on_hand)\n else\n Float::INFINITY\n end\n end",
"def gettransactionamount\r\n @transactionamount\r\n end",
"def fetch_purchase_amount\n result = fetch_purchase_details\n @purchase_quantity = result[0].purchase_quantity.blank? ? 0 : result[0].purchase_quantity\n @purchase_amount = result[0].purchase_amount.blank? ? 0:result[0].purchase_amount\n end",
"def total_bill_movement\n total ? total : 'N/a'\n end",
"def remaining_amount\n if accumulated >= amount\n 0\n else\n (amount - accumulated)\n end\n end",
"def acquired_value\n @object.most_recent_acquired_by_amount || 0\n end",
"def amount_out(date = nil)\n n = 0\n @transactions.each do |t|\n n += t.amount if t.adjusted_amount < 0\n end\n\n n\n end",
"def worth\n\t\t\n\t\t@mess = \"This stock is currently trading at: $#{@final_quote}\"\n\t\tspace = \"\\n\"\n\t\treturn space + @mess \n\t\t\n\tend",
"def gift_total_amount_per_donor(donor)\n selected_gifts = Gift.where(:donor_id => donor)\n sum = 0\n selected_gifts.each do |g|\n sum+=g.amount\n end\n return sum\n end",
"def coupon_amount\n return 0.0 unless subscription.has_coupon? and subscription.coupon.still_valid?\n\n subscription.coupon.amount\n end",
"def unpaid_donations_sum_in_cents\n donations.unpaid.empty? ? 0 : donations.unpaid.map(&:amount_in_cents).sum\n end",
"def total_amount_due_to_retailer\n shipping = self.retailer.reimburse_shipping_cost ? self.ship_total : 0.0\n product_cost = (self.line_items.collect {|line_item| line_item.product_cost_for_retailer }).sum\n self.tax_total + shipping + product_cost\n end"
] | [
"0.74675727",
"0.700145",
"0.68047774",
"0.6804058",
"0.67716324",
"0.6767502",
"0.67665434",
"0.674774",
"0.66337967",
"0.6512867",
"0.6506822",
"0.6503481",
"0.64576125",
"0.6452579",
"0.6440765",
"0.6439412",
"0.6413347",
"0.6403028",
"0.63944554",
"0.63895154",
"0.6380536",
"0.6367682",
"0.63627994",
"0.6355143",
"0.6351041",
"0.63508135",
"0.63299185",
"0.63166136",
"0.62814283",
"0.62812245",
"0.62812245",
"0.6274956",
"0.62733376",
"0.6271134",
"0.62522477",
"0.62417555",
"0.6237192",
"0.6222946",
"0.62125766",
"0.61937714",
"0.61806935",
"0.6179643",
"0.6157996",
"0.6155581",
"0.6153127",
"0.6150715",
"0.6143152",
"0.6136866",
"0.61311424",
"0.61205703",
"0.6116223",
"0.6114867",
"0.61044323",
"0.6104381",
"0.60967404",
"0.60953575",
"0.6088191",
"0.6074291",
"0.6073643",
"0.6072535",
"0.606757",
"0.6067193",
"0.60657173",
"0.60646826",
"0.60570896",
"0.60505366",
"0.6046831",
"0.60445184",
"0.6044333",
"0.60419804",
"0.60416067",
"0.60404354",
"0.60332614",
"0.60189456",
"0.60144776",
"0.60097474",
"0.60081536",
"0.5998972",
"0.59960586",
"0.59874105",
"0.59777284",
"0.5975442",
"0.5974509",
"0.5969362",
"0.5959536",
"0.5957205",
"0.595571",
"0.59549636",
"0.5954451",
"0.5952382",
"0.5926172",
"0.5921984",
"0.59062886",
"0.5902251",
"0.59000707",
"0.58949596",
"0.58910084",
"0.5886978",
"0.58819747",
"0.5878432"
] | 0.66058135 | 9 |
Whether or not it's not possible to send any donations to the artist. | def undonatable
unknown? || donatable_status.to_s == ""
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def do_not_send?\n !self.do_not_send.blank?\n end",
"def donor_can_cancel?\n !received?\n end",
"def can_send?\n !sent?\n end",
"def representative_email_sent_flag\n should_send_email = updates_requiring_email? ||\n representative_email.present? ||\n representative_timezone.present?\n\n # Note: Don't set flag if hearing disposition is cancelled, postponed, or scheduled in error\n !should_send_email || hearing.postponed_or_cancelled_or_scheduled_in_error?\n end",
"def unredeemable?\n payment_owed? && !(ProductStrategy === self.order.promotion.strategy) \n end",
"def has_editorial_or_stock_for_sale\n return false if self.requests.length == 0\n self.requests.each do |r|\n return false if r.state == \"denied\"\n end\n true\n end",
"def unappliable_order?\n order.bought? == false\n end",
"def coupled?\n false\n end",
"def needs_sending?\n !sent? && !flagged?\n end",
"def awaiting_disbursement?\n financial_aid_approved? && !disbursed?\n end",
"def donatable?\n show_donation_basket? && has_an_approved_account_set? && money_approved?\n end",
"def no_delivery?\n self.distance == NO_DISTANCE\n end",
"def claim_amount_required?\n @full_repayment_of_ads != 'Y'\n end",
"def not_sent_to_me\n return @not_sent_to_me\n end",
"def mandate_given?\n !self.given_mandates.empty?\n end",
"def suppress_reminders?\n [\n SUBJECT_CSP_TEACHER_CON,\n SUBJECT_CSP_FIT,\n SUBJECT_CSD_TEACHER_CON,\n SUBJECT_CSD_FIT\n ].include? subject\n end",
"def uses_conversion?\n self[:original_amount] != self[:amount] || donation_type == 'USDMANUAL'\n end",
"def consigned?\n false\n end",
"def appellant_email_sent_flag\n should_send_email = updates_requiring_email? ||\n appellant_email.present? ||\n appellant_timezone.present?\n\n # Note: Don't set flag if hearing disposition is cancelled, postponed, or scheduled in error\n !should_send_email || hearing.postponed_or_cancelled_or_scheduled_in_error?\n end",
"def charge?\n false\n end",
"def should_send_email_collect?\n !contact_has_email? && inbox.web_widget? && !email_collect_was_sent?\n end",
"def allow_easy_notifiaction?\n this_and_closer_members_count <= self.user.max_easy_notification_count\n end",
"def charge_donor\n return true unless (self.amount and (self.amount > 0))\n\n begin\n Stripe::Charge.create({\n # amount is in dollars, stripe takes cents\n :amount => self.amount * 100,\n :currency => \"usd\",\n :card => self.stripe_token,\n :description => \"Donation to #{participation.volunteer.name} for #{participation.event.name}\"\n }, self.participation.event.organization.stripe_token)\n return true\n rescue Stripe::StripeError => e\n # Something went wrong. Report that billing failed.\n errors.add(:billing, \"Failed: #{e.message}\")\n return false\n end\n end",
"def should_send_email?\n self.published? && !self.email_sent?\n end",
"def send_confirmation_notification?\n false\n end",
"def deliverable?\n recipient.status != \"address_not_exist\"\n end",
"def accepted_agreement?\n return license != DEFAULT_LICENSE\n end",
"def user_must_pay?\n !journal_will_pay? &&\n !institution_will_pay? &&\n (!submitter_affiliation.present? || !submitter_affiliation.fee_waivered?)\n end",
"def owner_only_offers_reward?\n self.rewards_count == 1 && self.rewards.visible[0].sender == self.person\n end",
"def deliver_store_owner_order_notification_email?\n store.new_order_notifications_email.present? && !store_owner_notification_delivered?\n end",
"def replyable?\n false\n end",
"def admited?\n return true unless admited_on.nil?\n end",
"def may_purchase?(_company)\n false\n end",
"def needs_handling_charge?\n true\n end",
"def distracted?\n false\n end",
"def paid_in_full?\n !payment_outstanding?\n end",
"def ignored?\n self.friendship_status == IGNORED\n end",
"def applicable?\n mandatory || amount != 0\n end",
"def has_no_accepted_response?\n !self.has_accepted_response?\n end",
"def no_price_when_unidentified_is_true\n\t\tif unidentified && ( price.present? || sitga )\n\t\t\terrors.add(:unidentified, \"no price when unidentified\")\n\t\tend\n\tend",
"def send_urgent?; preference == EmailSetting::OPTIONS[:'All Urgent Requests'] || preference.nil?; end",
"def undeliverable?\n !deliverable?\n end",
"def donating_to?(other_user)\n return true if self.donating_to == (other_user)\n end",
"def unappliable?\n !order_item.order.user || !referrer\n end",
"def waiver?\n free_agent? && !waiver_bid\n end",
"def should_send_email?\n self.delivery_email_status.nil?\n end",
"def can_supply?\n payment_received? || payment_on_account?\n end",
"def renewal_or_review_mandatory?\n existing_agreement? && waste_producer_water_discount?\n end",
"def do_not_email?\n false\n end",
"def donors?(other_user)\n\t\tdonors.include?(other_user)\n\tend",
"def reject?(sender)\r\n false\r\n end",
"def donate?\n\t\t!Rails.env.development? and do_donate && can_donate?\n\tend",
"def donated\n\t\tdonations.where(\"status != 'returned' AND status != 'failed' AND status != 'revoked'\")\n\tend",
"def donated\n\t\tdonations.where(\"status != 'returned' AND status != 'failed' AND status != 'revoked'\")\n\tend",
"def collectible?\n !collected? && (unanimously_accepted? || !in_dispute_period?) && !contested?\n end",
"def person_award?\n !store_award?\n end",
"def before_send_notifications\n\t\treturn true unless self.resend_recipient_ids.blank?\n\t\treturn true unless self.force_send_notifications.blank?\n\t\treturn false\n\tend",
"def before_send_notifications\n\t\treturn true unless self.resend_recipient_ids.blank?\n\t\treturn true unless self.force_send_notifications.blank?\n\t\treturn false\n\tend",
"def can_request_purchase?\n true # TODO: Should this be !virginia_borrower? ?\n end",
"def reason_for_no_treatment_required?\n (treatment.blank? || reason_for_no_treatment.present?) && waste_producer_water_discount?\n end",
"def is_non_delivery_report\n return @is_non_delivery_report\n end",
"def unsent?\n !sent?\n end",
"def not_paid_at_all\n\t\tget_cart_pending_balance == get_cart_price\n\tend",
"def require_receipt?\n !!(self.registered_download.require_receipt?)\n end",
"def can_be_replied_to?\n !locked?\n end",
"def can_reject?\n !accepted? && !rejected? && !withdrawn?\n end",
"def fulfilled?\n user.donations.active.count >= quantity\n end",
"def fixed_price?\n !auction?\n end",
"def require_description_presence?\n self.can_send_email\n end",
"def notify_not_delivered\n @not_delivered = not_delivered\n\n emails = Settings.first.notify_scans_not_delivered_to\n\n if !@not_delivered.empty? && emails.any?\n ScanMailer.notify_not_delivered(emails, @not_delivered).deliver_later\n else\n false\n end\n end",
"def pending_promotions?\n !pending_promotions.empty?\n end",
"def disputed?\n !bounty_claim_responses.where(value: false).empty?\n end",
"def to_be_performed?\n self.research_billing_qty > 0\n end",
"def promotional_sale?\n !promotional_sale.nil?\n end",
"def sent_only_to_me\n return @sent_only_to_me\n end",
"def user_must_pay?\n !journal&.will_pay? && !institution_will_pay? && !funder_will_pay?\n end",
"def awaiting_financial_aid_approval?\n dean_approved? && !financial_aid_approved?\n end",
"def unsent?\n !@_sended\n end",
"def remove_donation_button_if_no_accounts\n unless has_an_approved_account_set?\n self.show_donation_basket = false\n end\n true\n end",
"def track_shipments?\n !store.disable_shipment_transfers?\n end",
"def requested?\n !invited?\n end",
"def send_confirmation_notification?\n false\n end",
"def send_confirmation_notification?\n false\n end",
"def prepaid?\n not postpaid?\n end",
"def claimed?\n !claimant.nil?\n end",
"def has_discounts?\n rpg_shop.permit_sales\n end",
"def send?\n # TODO: rename to better name\n !Holiday.today?\n end",
"def set_eligibility\n update_attribute_without_callbacks(:eligible,\n mandatory ||\n (amount != 0 && eligible_for_originator?))\n end",
"def free?\n\t\t\t\tnot(fee?)\n\t\t\tend",
"def peer_auditor_checked?\n !(self.auditor_result == 'None' || self.auditor_result == 'Comment')\n end",
"def awaiting_dean_approval?\n awarded? && !dean_approved?\n end",
"def recipient_required?\n transfer_type?\n end",
"def can_make_decision?\n self.awaiting_decisions? || self.awaiting_replies? || self.all_rejected?\n end",
"def fully_paid?\n amount_owed <= 0\n end",
"def related_promotions?\n !related_promotions.empty?\n end",
"def reject?(sender)\n false\n end",
"def reject?(sender)\n false\n end",
"def notifies_commenter? # ...of direct responses to this comment\n wants_notifications?\n end",
"def existing_donor?\n if user && last_donation\n (\n (current_site.payment_gateway == 'stripe' && user.stripe_customer_id.present?) ||\n (current_site.payment_gateway == 'blue_pay' && last_donation.transaction_id.present?)\n )\n else\n false\n end\n end",
"def is_nondisposable?\n domain.to_s.in?(NONDISPOSABLE_DOMAINS)\n end"
] | [
"0.7064202",
"0.6982768",
"0.6574784",
"0.65276194",
"0.64454305",
"0.64385825",
"0.6411323",
"0.637151",
"0.6357253",
"0.63540083",
"0.63539726",
"0.6349277",
"0.6309697",
"0.6285375",
"0.6272284",
"0.62600815",
"0.6224263",
"0.61965203",
"0.6186969",
"0.61859107",
"0.61615086",
"0.6148336",
"0.61418813",
"0.61391073",
"0.61284214",
"0.6117735",
"0.61136264",
"0.61048406",
"0.60765284",
"0.60703814",
"0.60597956",
"0.6059688",
"0.6056604",
"0.60477805",
"0.60458994",
"0.6038926",
"0.6036823",
"0.60345227",
"0.60276765",
"0.6023794",
"0.6016066",
"0.60154474",
"0.6007824",
"0.6003859",
"0.6000562",
"0.5993283",
"0.59889704",
"0.59856325",
"0.5980945",
"0.5977733",
"0.5976281",
"0.597193",
"0.59627247",
"0.59627247",
"0.5962618",
"0.5952747",
"0.59296864",
"0.59296864",
"0.5925578",
"0.5925251",
"0.59238577",
"0.59204113",
"0.5916718",
"0.59154934",
"0.59056944",
"0.5903424",
"0.5895923",
"0.5893189",
"0.58930826",
"0.5891891",
"0.58894247",
"0.588188",
"0.5880938",
"0.5880408",
"0.58784723",
"0.5874924",
"0.58730435",
"0.5866589",
"0.586285",
"0.58574474",
"0.5844329",
"0.5834517",
"0.5834517",
"0.5821172",
"0.5816385",
"0.58094513",
"0.5806891",
"0.58060706",
"0.5805538",
"0.5793335",
"0.57903945",
"0.5790208",
"0.57899725",
"0.57867134",
"0.57848054",
"0.57823336",
"0.57823336",
"0.57791144",
"0.5774448",
"0.5774139"
] | 0.5776761 | 98 |
Paginates the songs of the artist. Should be called before paginated_songs is called. artist.paginate_songs(10, 30) songs = artist.paginated_songs songs will now hold the songs 3039 (starting from 0) | def paginate_songs(limit, offset)
@paginated_songs = Array.new
songs.limit(limit).offset(offset).each do |song|
@paginated_songs << song
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def paginated_songs\n\t\treturn @paginated_songs\n\tend",
"def index\r\n @songs = Song.search(params[:search]).paginate(page: params[:page], per_page: 20, order: \"title ASC, artist ASC\")\r\n end",
"def index\n @search = Song.search(params[:q]) #Using the Ransack Gem\n @page = params[:page] || 1\n @songs = @search.result.includes(:artist).paginate(:page => @page, :per_page => 50)\n end",
"def index\n @artists = Artist.paginate(page: params[:page], per_page:6)\n end",
"def index\n @albums = @artist.albums.all.page(params[:page] || 1).per(18)\n end",
"def index\n paginate json: @playlist.tracks.all\n end",
"def index\n @songs = Song.page(params[:page]).per(15)\n @page = params[:page]\n @page_count = @songs.total_pages\n\n respond_to do |format|\n format.html\n format.json\n end\n end",
"def index\n @songs = Song.search((params[:search] || {})[:query]).page(params[:page]).per(30)\n end",
"def index\r\n @song_arrangements = SongArrangement.search(params[:search]).paginate(page: params[:page], per_page: 20, joins: :song, order: \"song_arrangements.title ASC, songs.title ASC, song_arrangements.original_key ASC, song_arrangements.bpm ASC, song_arrangements.id ASC\")\r\n end",
"def index\n @songs = Song.page(page).per(per_page)\n render jsonapi: @songs,\n include: include_params,\n meta: {\n **total_count_meta_for(@songs)\n },\n links:{\n **pagination_links_for(@songs,request.url)\n },\n fields: fields_params\n end",
"def list_songs\n temp = Song.all.sort{|songA, songB| songA.name <=> songB.name} #sorting lab, refactor with .with_index(offset=1)?\n counter = 1\n temp.each do |song|\n puts \"#{counter}. #{song.artist.name} - #{song.name} - #{song.genre.name}\"\n counter += 1\n end\n end",
"def index\n @page = (params[:page] || 1).to_i\n @offset = (@page - 1) * 8\n @playlists = Playlist.\n order(created_at: :desc).\n limit(8).\n offset(@offset).\n all\n end",
"def more_songs\n get_songs\n return @page_size && @songs.count == @page_size\n end",
"def list_songs\n puts \"Here are the songs in your music library:\"\n Song.all.each.with_index(1){|song, index|\n puts \"#{index}. #{song.artist.name} - #{song.name} - #{song.genre.name}\"\n }\n end",
"def show\r\n @song = Song.find(params[:id])\r\n @song_arrangements = SongArrangement.paginate(page: params[:page], per_page: 5, joins: \"LEFT JOIN song_arrangement_files ON song_arrangement_files.song_id = song_arrangements.song_id\", conditions: [\"song_arrangements.song_id = ?\", params[:id]], group: \"song_arrangements.id\", order: \"song_arrangements.title ASC, song_arrangements.original_key ASC, song_arrangements.bpm ASC, song_arrangements.id ASC\")\r\n end",
"def songs\n \t@songs = Album.find(params[:id])\n songs = RSpotify::Track.search(@songs.name)\n \t@songs = songs.map do |s_songs|\n \tSong.new_from_spotify_song(s_songs)\n end\n render json: {data:@songs}\n end",
"def show\n @user = current_user\n @playlist = Playlist.find(params[:id])\n @playlists = Playlist.where(:user_id=>@user.id).order(\"created_at DESC\").paginate(:page => params[:page], :per_page => 5)\n @songs = @playlist.songs\n end",
"def list_songs\n self.sorted_list_songs.each_with_index do |song, idx|\n puts \"#{(idx + 1).to_s}. #{song.artist.name} - #{song.name} - #{song.genre.name}\"\n end\n end",
"def index\n @album = Album.find(params[:album_id])\n @photos = @album.photos.paginate(:page => params[:page], :per_page => 5)\n\n respond_to do |format|\n format.html # index.html.erb\n end\n end",
"def index\n @songs = @album.songs.all\n end",
"def index\n @albums = current_user.albums.page(params[:page]).per(10)\n end",
"def index\n @artists = Artist.limit(4)\n @albums = Album.limit(4)\n end",
"def songs\n @songs ||= Song.where(:artist => info(:name))\n end",
"def index\n @user = current_user\n @songs = Song.where(:user_id=>@user.id).order(\"created_at DESC\").paginate(:page => params[:page], :per_page => 5)\n\t\t@song = @user.songs.new\n @playlists = Playlist.where(:user_id=>@user.id).order(\"created_at DESC\").paginate(:page => params[:page], :per_page => 5)\n @playlist = @user.playlists.new\n end",
"def tracks(query)\n s = \"\\nsearching for #{query}\\nwith maximum 200 items per pagination\\n\"\n pre = \"\"\n s.split(\"\\n\")[2].length.times{|i| pre << \"**\"}\n puts \"#{pre}#{s}#{pre}\"\n #Soundcloud API gets a limit\n # we need add some param to get next_href\n # so we will get all tracks\n #@total = 0 \n get_tracks(query) do |collection, track| \n filter_and_add_to collection, track\n end\n\n end",
"def sort_by_artist\n Album.search(params[:search]).joins(:artists).merge(Artist.reorder(sort_column(sort_table) + \" \" + sort_direction))\n .paginate( page: params[:page] )\n end",
"def index\n set_song_list\n end",
"def index\n authorize! :read, Album\n \n @albums = Album.order(\"created_at DESC\").paginate(:page => params[:page], :per_page => 10)\n end",
"def index\n @search_url = artists_path\n @search = params[:search].to_s.html_safe\n\n @artists = Artist.page(params[:page])\n\n if @search.present?\n @artists = @artists.search(:name,@search.mb_chars)\n end\n\n if params[:per_page].present?\n @artists = @artists.per(params[:per_page])\n end\n end",
"def songs\n Song.all_by_artist(self)\n end",
"def paginate!(*args) # @private :nodoc:\n options = args.extract_options!\n self.items_per_page = options[:per_page] || 50\n self.current_page = args.first || 1\n self.limit_value = items_per_page\n self.offset_value = items_per_page * (current_page - 1)\n end",
"def songs\n MusicImporter.new(path).print_songs\n end",
"def all_songs\n end",
"def getSongs(oStatsProxy, iMechanizeAgent)\n # Get the songs page\n lSongsPage = iMechanizeAgent.get('http://www.myspace.com/my/songs')\n # Screen scrap it\n # List of objects that can be tried again for the song plays category\n lLstRecoverableObjectsForSongPlays = []\n # List of songs read (used for display)\n lLstSongsPlayRead = []\n lSongsPage.root.css('div.UploadedSong').each do |iSongNode|\n lSongTitle = nil\n lNbrPlays = nil\n iSongNode.css('div#songTitle').each do |iSongTitleNode|\n lSongTitle = iSongTitleNode.content\n end\n lPlaysNode = iSongNode.children[11]\n if (lPlaysNode == nil)\n log_err \"Unable to find plays node: #{iSongNode}\"\n else\n begin\n lNbrPlays = Integer(lPlaysNode.content)\n rescue Exception\n log_err \"Invalid number of plays content: #{lPlaysNode}\"\n end\n end\n if (lSongTitle == nil)\n log_err \"Unable to get the song title: #{iSongNode}\"\n end\n if (lNbrPlays == nil)\n log_err \"Unable to get the song number of plays: #{iSongNode}\"\n if (lSongTitle != nil)\n # We can try this one again\n lLstRecoverableObjectsForSongPlays << lSongTitle\n end\n end\n if ((lSongTitle != nil) and\n (lNbrPlays != nil))\n oStatsProxy.add_stat(lSongTitle, 'Song plays', lNbrPlays)\n end\n lLstSongsPlayRead << lSongTitle\n end\n log_debug \"#{lLstSongsPlayRead.size} songs read for songs plays: #{lLstSongsPlayRead.join(', ')}\"\n if (!lLstRecoverableObjectsForSongPlays.empty?)\n oStatsProxy.add_recoverable_order(lLstRecoverableObjectsForSongPlays, ['Song plays'])\n end\n end",
"def index\n @songs = Song.where(:user => current_user).order(artist: :asc)\n end",
"def load_album_photos\n # @pictures = Picture.paginate(:page => params[:page], :per_page => 5)\n @curr_album = Album.find(params[:id])\n @pictures = @curr_album.shared_pictures(@login_user.id,params[:page].to_i)\n end",
"def index\n params[:q]||={:s => \"name asc\"}\n unless current_user.admin.present?\n @albums = current_user.albums\n end\n @q = @albums.search(params[:q])\n @albums = @q.result.page(params[:page]).limit(params[:per_page]||10)\n end",
"def index\n @albums = Album.search(params[:search]).order(sort_column + ' ' + sort_direction).paginate(:per_page => 5, :page => params[:page])\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @albums }\n end\n end",
"def index\n @products = Product.joins(:artist).order(session[:order_by])\n .paginate(:page => params[:page])\n\n @sort_order_selected = session[:order_by]\n #@products = Product.resent(5)\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @products }\n end\n end",
"def paginate(*args)\n @list.paginate(*args)\n end",
"def songs\n Song.find_by_album(@id)\n end",
"def songs\n Song.all\n end",
"def playlist_tracks(playlist_id, next_url: nil, all: false, page: nil)\n uri = next_url.nil? ? \"https://api.deezer.com/playlist/#{playlist_id}/tracks\" : next_url\n headers = {params: {access_token: @access_token}}\n headers.fetch(:params).merge!(index: (page - 1) * DEEZER_PAGE_SIZE) unless page.nil?\n if all\n iterator_wrapper(__method__, playlist_id, next_url: uri)\n else\n response = RestWrapper.perform_request(uri, :get, headers)\n next_url.nil? ? response['data'] : response\n end\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def index\n @artist = Artist.find(params[:artist_id]) #why is this here?\n @arts = Art.paginate(page: params[:page], per_page: 15)\n end",
"def index\n @playlists = Playlist.accessible_by(current_ability)\n .includes(:tracks)\n .scoped(search_params)\n .page(params[:page])\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def index\n if @album.present? \n @songs = @album.songs\n elsif @artist.present?\n @songs = @artist.songs\n else\n @songs = Song.all\n end\n end",
"def index\n @playlist_songs = PlaylistSong.all\n end",
"def index\n prepare_meta_tags\n @songs = Song.all\n set_welcome\n end",
"def songs\n Song.all\n end",
"def paginate(extra_parameters = {})\n klass.paginate(params(extra_parameters))\n end",
"def songs\n\t\t@musician = User.find_by_id(current_user.id)\n\tend",
"def top_albums(artist)\n get(:standard, {:method => \"artist.getTopAlbums\", :artist => artist})\n end",
"def index\n #@songs = Song.all\n authorize Song\n @q = Song.search(params[:q])\n @songs = @q.result(distinct: true)\n @songs = @songs.order(\"#{sort_column} #{sort_direction}\")\n end",
"def index\n @albums = Album.all\n #@albums['Все альбомы'] = 0\n #@albums = @albums.sort_by {|_key, value| value}.to_h\n\n if params[:album_id]\n if params[:album_id].to_f == 0\n @photos = Photo.paginate(:page => params[:page], :per_page => 5)\n else\n @photos = Photo.where(album_id: params[:album_id].to_i).paginate(:page => params[:page], :per_page => 5)\n end\n else\n @photos = Photo.paginate(:page => params[:page], :per_page => 5)\n end\n end",
"def songs \n @songs\n end",
"def index\n @artwork_symbols = ArtworkSymbol.all.paginate(page: params[:page], per_page: 50).order('name ASC')\n end",
"def songs\n @songs\nend",
"def paginate(num)\n l = sorted_articles\n npages = (l.length - 1) / num\n\n for i in 1..(npages)\n create_old_page \"/page/\", i, npages, num\n end\n end",
"def index\n @songs = Song.all\n end",
"def index\n @title ='Music Search'\n @leading_text = 'Please feel free to browse for ideas. No sign-in is needed. You can search the entire catalog for: melodic moods, lyrical themes, title, genre, etc.'\n @subtitle = ''\n\n # NOTE: Set the value of songs to \"All\" by default\n # @songs = Song.all\n\n if params[:q].present?\n @songs_searched = []\n @search_string = params[:q].split\n\n @search_string.each do |s|\n\n # # NOTE: Get possible artists.\n # artist_id = Artist.search_by_name(params[:q])\n # if artist_id.present?\n # artist_songs = Artist.search_by_id(artist_id)\n # else\n artist_songs = []\n # end\n\n # # NOTE: Get possible albums.\n # album_id = Album.search_by_name(params[:q])\n # # album_songs = Song.search_album(album_id)\n\n # if album_id.present?\n # album_songs = Album.search_by_id(album_id)\n # else\n album_songs = []\n # end\n\n # NOTE: Get possible genres.\n # genre_id = Genre.search_by_name(params[:q])\n genre_id = Genre.search_by_name(s)\n genre_songs = Song.search_genre(genre_id)\n\n # NOTE: Get possible moods.\n mood_id = Mood.search_by_name(s)\n mood_songs = Song.search_mood(mood_id)\n\n # NOTE: Get possible themes.\n theme_id = Theme.search_by_name(s)\n theme_songs = Song.search_theme(theme_id)\n\n #NOTE: Get possible songs\n songs_list = Song.search(s)\n\n @songs_searched = (@songs_searched + songs_list + mood_songs + theme_songs + genre_songs + album_songs + artist_songs).uniq\n\n end\n\n # Check to see if the array is empty\n if @songs_searched.blank?\n flash[:alert] = (' There are no songs containing the term(s): <em><strong>' + params[:q].to_s + '</strong></em>.').html_safe\n else\n @songs = Kaminari.paginate_array(@songs_searched).page(params[:page])\n end\n\n # Discard the flash notice\n flash.discard\n end\n\n # NOTE: If nothing came back from the search, show ALL songs\n if [email protected]?\n @moods = Mood.sorted\n @themes = Theme.all\n @songs = Song.all.order(:title).page params[:page]\n end\n\n end",
"def initialize\n @songs = []\n end",
"def index\n @songs = Song.all\n end",
"def index\n @songs = Song.all\n end",
"def index\n @songs = Song.all\n end",
"def index\n @songs = Song.all\n end",
"def index\n @songs = Song.all\n end",
"def index\n @songs = Song.all\n end",
"def index\n @songs = Song.all\n end",
"def index\n @most_played_artist = Song.most_played_artist\n @most_played_by_artist = Song.find_most_played_by_artist :limit => 3\n\n @most_played_players = User.find_players_of_artist(@most_played_artist, :limit => 4)\n\n @most_played_tags = Tag.find_top(:limit => 3, :conditions => {\n :taggable_type => 'song', :taggable_id => @most_played_by_artist.map(&:id)})\n\n @coolest_users = User.find_coolest :limit => 4\n @max_votes = @coolest_users.map(&:rating_count).max\n end",
"def print_songs\n songs.each {|song| puts song.name}\n end",
"def index\n @albums = Album.page(params[:page]).per(10).order(created_at: :desc)\n\n respond_to do |format|\n format.html\n format.json { render json: @albums.to_json }\n format.xml { render xml: @albums.to_xml }\n end\n end",
"def index\n @songs = Song.order(:name)\n end",
"def list_songs\n # print songs out in alphabetical order with index\n # 'each.with_index' allows for index to start at 1\n Song.all.uniq.sort { |title1, title2| title1.name <=> title2.name }.each.with_index(1) do |song, i|\n puts \"#{i}. #{song.artist.name} - #{song.name} - #{song.genre.name}\"\n end\n end",
"def playlists(limit: 20, offset: 0)\n url = \"users/#{@id}/playlists?limit=#{limit}&offset=#{offset}\"\n response = RSpotify.resolve_auth_request(@id, url)\n return response if RSpotify.raw_response\n response['items'].map { |i| Playlist.new i }\n end",
"def index\n @user_songs = UserSong.all\n end",
"def initialize #initializes songs belonging to artist\r\n @song = artist\r\n end",
"def view_album_songs(album)\n album_title = album\n album_id = Album.find_by(title: album_title).id\n songs = Song.where(album_id: album_id).map{|song| song.name}\n puts \"**************************\"\n puts \"**************************\"\n prompt(\"#{album_title}'s songs\", songs)\n end",
"def paginate_questions\n paginate(@questions)\n end",
"def index\n if (params.has_key?(:artist))\n searched_name = artist_params[:artist_name]\n found = Artist.all.select{|n| n.artist_name.downcase == searched_name.downcase}\n if found[0] != nil\n @artists = found\n else\n @artists = Artist.all.reverse_order\n require 'musicbrainz'\n @foundArtists = MusicBrainz::Artist.search(artist_params[:artist_name])\n # GEM GITHUB => https://github.com/localhots/musicbrainz\n end\n else\n @artists = Artist.all.reverse_order\n end\n @artist = Artist.new\n gon.next_artist_id = Artist.with_deleted.last.id + 1\n end",
"def index\n # @songs = Song.find_by_artist_id params[:artist_id]\n @songs = Song.find_all_by_artist_id params[:artist_id]\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @songs }\n end\n end",
"def index\n if params[:q].present?\n @songs = Song.search(params[:q])\n else\n @songs = Song.all\n end\n end",
"def search_tracks(q, page=1)\n \t response_body = get_body(http_get(\"http://ws.spotify.com/search/1/track.json?q=#{CGI.escape(q)}&page=#{page}\"))\n \t json = ActiveSupport::JSON.decode(response_body)\n to_tracks(json[\"tracks\"])\n \tend",
"def index\n paginate json: @user.playlists.all\n end",
"def index\n @wide_layout = true\n @page_title = \"アルバム一覧\"\n @sort = params[:sort].blank? ? 1 : params[:sort].to_i\n\n @albums = Album.without_owner.includes_general\n @albums = case @sort\n when 1\n @albums.id_desc\n when 2\n @albums.sort_by_uploaded\n else\n @albums.id_desc\n end\n\n @albums = Album.set_thumb(@albums)\n @albums = Kaminari.paginate_array(@albums).page(params[:page]).per(Rails.env.production? ? 20 : 5)\n\n @album_users = []\n Album.with_owner.includes_general.each do |album|\n @album_users << {name: album.owner&.dispname, item_count: album.media_count, album_id: album.id}\n end\n end",
"def index\n\t\t@songs = Song.all.order(:name)\n\tend",
"def index\n @photos = Photo.all.paginate(page:params[:page], :per_page => 5)\n end",
"def search_songs(query)\n search('Songs', query)\n end",
"def songs_found\n get_songs\n return @songs\n end"
] | [
"0.7523771",
"0.71344954",
"0.69117993",
"0.66738325",
"0.6567279",
"0.64193904",
"0.6417193",
"0.62071335",
"0.62038845",
"0.61834294",
"0.61295205",
"0.6107224",
"0.5990588",
"0.595643",
"0.59389704",
"0.59128076",
"0.5899116",
"0.58912677",
"0.58567446",
"0.57646734",
"0.5762282",
"0.5733233",
"0.5687623",
"0.5664643",
"0.5662324",
"0.56512815",
"0.56399465",
"0.56093466",
"0.560125",
"0.55838627",
"0.55731714",
"0.5548113",
"0.5539742",
"0.550875",
"0.54978526",
"0.5492838",
"0.5474777",
"0.5461891",
"0.5448566",
"0.54445416",
"0.54424745",
"0.5441323",
"0.54316103",
"0.5425442",
"0.5425442",
"0.54068595",
"0.5405244",
"0.54031885",
"0.54031885",
"0.54031885",
"0.54031885",
"0.54031885",
"0.54031885",
"0.54031885",
"0.54031885",
"0.54031885",
"0.54031885",
"0.5395674",
"0.53840697",
"0.5372243",
"0.53716296",
"0.5368928",
"0.53612465",
"0.5356317",
"0.5350156",
"0.5326461",
"0.53229845",
"0.5321865",
"0.5321124",
"0.5318703",
"0.5318255",
"0.53141093",
"0.53077936",
"0.5307236",
"0.5307236",
"0.5307236",
"0.5307236",
"0.5307236",
"0.5307236",
"0.5307236",
"0.53051156",
"0.53005993",
"0.5300264",
"0.52969027",
"0.5288546",
"0.527989",
"0.5279733",
"0.5278023",
"0.5271418",
"0.5265771",
"0.5263467",
"0.52595794",
"0.52580106",
"0.5240928",
"0.5234757",
"0.52318305",
"0.52315956",
"0.52311856",
"0.52305317",
"0.5228077"
] | 0.7937105 | 0 |
Returns a slice of the artist's songs which was created by paginated_songs. artist.paginate_songs(10, 30) songs = artist.paginated_songs songs will now hold the songs 3039 (starting from 0) | def paginated_songs
return @paginated_songs
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def paginate_songs(limit, offset)\n\t\t@paginated_songs = Array.new\n\t\tsongs.limit(limit).offset(offset).each do |song|\n\t\t\t@paginated_songs << song\n\t\tend\n\tend",
"def index\n @search = Song.search(params[:q]) #Using the Ransack Gem\n @page = params[:page] || 1\n @songs = @search.result.includes(:artist).paginate(:page => @page, :per_page => 50)\n end",
"def index\r\n @songs = Song.search(params[:search]).paginate(page: params[:page], per_page: 20, order: \"title ASC, artist ASC\")\r\n end",
"def index\n @albums = @artist.albums.all.page(params[:page] || 1).per(18)\n end",
"def index\n @artists = Artist.paginate(page: params[:page], per_page:6)\n end",
"def index\n @page = (params[:page] || 1).to_i\n @offset = (@page - 1) * 8\n @playlists = Playlist.\n order(created_at: :desc).\n limit(8).\n offset(@offset).\n all\n end",
"def index\n @artists = Artist.limit(4)\n @albums = Album.limit(4)\n end",
"def songs\n Song.all_by_artist(self)\n end",
"def index\n paginate json: @playlist.tracks.all\n end",
"def songs\n @songs ||= Song.where(:artist => info(:name))\n end",
"def index\n @songs = Song.page(params[:page]).per(15)\n @page = params[:page]\n @page_count = @songs.total_pages\n\n respond_to do |format|\n format.html\n format.json\n end\n end",
"def index\n @songs = Song.search((params[:search] || {})[:query]).page(params[:page]).per(30)\n end",
"def list_songs\n temp = Song.all.sort{|songA, songB| songA.name <=> songB.name} #sorting lab, refactor with .with_index(offset=1)?\n counter = 1\n temp.each do |song|\n puts \"#{counter}. #{song.artist.name} - #{song.name} - #{song.genre.name}\"\n counter += 1\n end\n end",
"def songs\n Song.find_by_album(@id)\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def songs\n @songs\n end",
"def get_tracks!\n tracks = RSpotify::Track.search(self.keyword, limit: 50, offset: 0).sort_by(&:popularity)\n\n tracks.delete_if { |t| t.popularity < 45 }\n tracks = tracks.uniq { |t| t.artists.first.name } \n\n raise 'The playlist could not be generated' if tracks.size < 4\n return tracks.reverse\n end",
"def more_songs\n get_songs\n return @page_size && @songs.count == @page_size\n end",
"def albums_with_one_song(n = 10)\n single_songs = []\n @albums.each do |a|\n b = @tracks.find_all {|s| s.album == a}\n single_songs << b.first unless b.length > 1\n end\n return single_songs[0..n-1]\n end",
"def songs\n Song.all\n end",
"def index\n @albums = current_user.albums.page(params[:page]).per(10)\n end",
"def list_songs\n puts \"Here are the songs in your music library:\"\n Song.all.each.with_index(1){|song, index|\n puts \"#{index}. #{song.artist.name} - #{song.name} - #{song.genre.name}\"\n }\n end",
"def songs \n @songs\n end",
"def songs_found\n get_songs\n return @songs\n end",
"def songs\n Song.all\n end",
"def songs\n \t@songs = Album.find(params[:id])\n songs = RSpotify::Track.search(@songs.name)\n \t@songs = songs.map do |s_songs|\n \tSong.new_from_spotify_song(s_songs)\n end\n render json: {data:@songs}\n end",
"def top_albums(artist)\n get(:standard, {:method => \"artist.getTopAlbums\", :artist => artist})\n end",
"def show\n @user = current_user\n @playlist = Playlist.find(params[:id])\n @playlists = Playlist.where(:user_id=>@user.id).order(\"created_at DESC\").paginate(:page => params[:page], :per_page => 5)\n @songs = @playlist.songs\n end",
"def index\n @songs = @album.songs.all\n end",
"def index\n @songs = Song.page(page).per(per_page)\n render jsonapi: @songs,\n include: include_params,\n meta: {\n **total_count_meta_for(@songs)\n },\n links:{\n **pagination_links_for(@songs,request.url)\n },\n fields: fields_params\n end",
"def top_songs(n = 3)\n top_list = @tracks.sort_by {|s| s.play_count}.reverse\n return top_list[0..n-1].compact\n end",
"def index\n @songs = Song.all\n @songs_with_names = Song.all.map{|s| [s, s.artist ? s.artist.name : \"\"]}\n end",
"def list_songs\n self.sorted_list_songs.each_with_index do |song, idx|\n puts \"#{(idx + 1).to_s}. #{song.artist.name} - #{song.name} - #{song.genre.name}\"\n end\n end",
"def songs\n @songs\nend",
"def songs\n # @@songs.select { |song| song.name == @name }\n @songs\n end",
"def playlists(limit: 20, offset: 0)\n url = \"users/#{@id}/playlists?limit=#{limit}&offset=#{offset}\"\n response = RSpotify.resolve_auth_request(@id, url)\n return response if RSpotify.raw_response\n response['items'].map { |i| Playlist.new i }\n end",
"def photos(offset=0, limit=nil)\n result=Photo.find_photos_for_place(@id).skip(offset)\n result=result.limit(limit) if !limit.nil?\n result=result.map {|photo| Photo.new(photo)}\n end",
"def all_top_songs\n songs = Hash.new\n Artist.all.each do |artist|\n begin\n song = artist.top_song_names[0]\n songs[artist.name] = song\n rescue URI::InvalidURIError\n puts \"Unable to retrive song for #{artist.name}\"\n rescue NoMethodError\n puts \"'NoMethodError' for #{artist.name}\"\n end\n end\n return songs\n end",
"def artists\n songs.map do |song|\n song.artist\n end\n end",
"def artists\n songs.map do |song|\n song.artist\n end\n end",
"def artists\n songs.collect do |song|\n song.artist\n\n end\nend",
"def index\n @search_url = artists_path\n @search = params[:search].to_s.html_safe\n\n @artists = Artist.page(params[:page])\n\n if @search.present?\n @artists = @artists.search(:name,@search.mb_chars)\n end\n\n if params[:per_page].present?\n @artists = @artists.per(params[:per_page])\n end\n end",
"def related_songs\n unless self.spotify_track_id.nil?\n related_artists = self.spotify_track.artists.first.related_artists\n\n related_artists.shuffle[0..4].map do |artist|\n artist.top_tracks('IE').shuffle.first\n end.flatten\n else\n Array.new\n end\n\n\n end",
"def topAlbums(artist)\n\tartistinfo = HTTParty.get(\"http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=#{artist}&api_key=#{API_KEY}&format=json\")\n\treturn artistinfo\nend",
"def all_songs\n end",
"def artists\n @songs.collect do |song|\n song.artist\n end\n end",
"def artists\n @songs.collect do |song|\n song.artist\n end\n end",
"def pagy_get_items(collection, pagy)\n # this should work with ActiveRecord, Sequel, Mongoid...\n collection.offset(pagy.offset).limit(pagy.items)\n end",
"def artists\n @songs.collect do |song| #<Song:0x007f874c4eeed8 @artist=#<Artist:0x007f874c4ef0b8 @name=\"Jay-Z\", @songs=[#<Song:0x007f874c4eeed8 ...>]>, @genre=#<Genre:0x007f874c4ef018 @name=\"rap\", @songs=[#<Song:0x007f874c4eeed8 ...>]>, @name=\"99 Problems\">\n song.artist ##<Artist:0x007f874c4ef0b8 @name=\"Jay-Z\", @songs=[#<Song:0x007f874c4eeed8 @artist=#<Artist:0x007f874c4ef0b8 ...>, @genre=#<Genre:0x007f874c4ef018 @name=\"rap\", @songs=[#<Song:0x007f874c4eeed8 ...>]>, @name=\"99 Problems\">]>\n end\n end",
"def tracks(query)\n s = \"\\nsearching for #{query}\\nwith maximum 200 items per pagination\\n\"\n pre = \"\"\n s.split(\"\\n\")[2].length.times{|i| pre << \"**\"}\n puts \"#{pre}#{s}#{pre}\"\n #Soundcloud API gets a limit\n # we need add some param to get next_href\n # so we will get all tracks\n #@total = 0 \n get_tracks(query) do |collection, track| \n filter_and_add_to collection, track\n end\n\n end",
"def photos(offset=0, limit=nil)\n\tif limit\n\t\tq=Photo.find_photos_for_place(@id).skip(offset).limit(limit)\n\t\tq.map {|doc| Photo.new(doc)}\n\telse\n\t\tq=Photo.find_photos_for_place(@id).skip(offset)\n\t\tq.map {|doc| Photo.new(doc)}\n\tend\nend",
"def index\n @playlists = Playlist.accessible_by(current_ability)\n .includes(:tracks)\n .scoped(search_params)\n .page(params[:page])\n end",
"def artists\n songs.map {|song| song.artist}\n end",
"def index\n @songs = Song.where(:user => current_user).order(artist: :asc)\n end",
"def songs_by_album\n return @count_by_album if @count_by_album\n\n return get_base_relation(true, false)\n .group('albums.id')\n .order('albums.name')\n .pluck('albums.id' , 'albums.name' , 'count(*)')\n\n end",
"def index\n @most_played_artist = Song.most_played_artist\n @most_played_by_artist = Song.find_most_played_by_artist :limit => 3\n\n @most_played_players = User.find_players_of_artist(@most_played_artist, :limit => 4)\n\n @most_played_tags = Tag.find_top(:limit => 3, :conditions => {\n :taggable_type => 'song', :taggable_id => @most_played_by_artist.map(&:id)})\n\n @coolest_users = User.find_coolest :limit => 4\n @max_votes = @coolest_users.map(&:rating_count).max\n end",
"def topartists(country, limit = nil, page = nil, force = false)\n get_instance(\"geo.getTopArtists\", :topartists, :artist, {country: country, limit: limit, page: page}, force)\n end",
"def songs\n #use select to iterate thru songs\n Song.all.select{|song| song.artist == self}\n end",
"def index\n @album = Album.find(params[:album_id])\n @photos = @album.photos.paginate(:page => params[:page], :per_page => 5)\n\n respond_to do |format|\n format.html # index.html.erb\n end\n end",
"def photos(offset = 0, limit = nil)\n result = []\n photos = Photo.find_photos_for_place(@id).skip(offset)\n photos = photos.limit(limit) unless limit.nil?\n\n photos.each do |e|\n result << Photo.new(e)\n end\n return result\n end",
"def artists\nSong.all.collect{|x| x.artist}\nend",
"def slice_records!\n @number_of_records ||= @records.length\n\n @records = @records.slice(0, per_page) if @number_of_records > per_page\n end",
"def songs # to entre the Song class then within the song class take the class variable all to use to select and go thought the songs listed in that array\n Song.all.select { |song| song.artist == self } # use the .select to gather the information we want from the all array in songs - go thought and assign each song artist to this current instance\n end",
"def songs\n Song.all.select {|song| song.artist == self}\n end",
"def songs\n Song.all.select do |song_instance|\n song_instance.artist == self\n end\n end",
"def index\n authorize! :read, Album\n \n @albums = Album.order(\"created_at DESC\").paginate(:page => params[:page], :per_page => 10)\n end",
"def index\r\n @song_arrangements = SongArrangement.search(params[:search]).paginate(page: params[:page], per_page: 20, joins: :song, order: \"song_arrangements.title ASC, songs.title ASC, song_arrangements.original_key ASC, song_arrangements.bpm ASC, song_arrangements.id ASC\")\r\n end",
"def songs_from_query\n logger.info \"Grooveshark :: Query request initiated.\"\n if params[:query]\n query = URI.escape(params[:query])\n url = URI.parse(\"#{TINY_SONG_API}/s/#{query}?format=json&limit=#{NUM_SEARCH_RESULTS}&key=#{TINY_SONG_API_KEY}\")\n response = Net::HTTP.get_response(url).body\n response_json = ActiveSupport::JSON.decode(response)\n @song_results = response_json.map do |song_json|\n Song.find_or_create(song_json[\"SongID\"], song_json[\"SongName\"],\n song_json[\"AlbumID\"], song_json[\"AlbumName\"],\n song_json[\"ArtistID\"], song_json[\"ArtistName\"])\n end\n logger.info \"Grooveshark :: query results #{@song_results}.\"\n if @song_results.empty?\n render :text => \"No results were found.\"\n else\n render :partial => 'songs/song_list', :locals => {:songs => @song_results},\n :layout => false\n end\n else\n render :text => \"No query.\"\n end\n end",
"def artists\n self.songs.map {|song| song.artist}\n end",
"def index\n if @album.present? \n @songs = @album.songs\n elsif @artist.present?\n @songs = @artist.songs\n else\n @songs = Song.all\n end\n end",
"def songs\n MusicImporter.new(path).print_songs\n end",
"def top_tracks(artist)\n get(:standard, {:method => \"artist.getTopTracks\", :artist => artist})\n end",
"def photos(offset = 0, limit = nil)\n result = []\n photos = Photo.find_photos_for_place(@id).skip(offset)\n photos = photos.limit(limit) if !limit.nil?\n\n if photos.count\n photos.map do |photo|\n result << Photo.new(photo)\n end\n end\n\n return result\n end",
"def get_songs_ids\n if @song_ids\n return @song_ids\n else\n return get_songs.map { |x| x[IDX_SONG_ID] }\n end\n end",
"def top_tracks_for_random_artist\n unless @artist\n @artist = Lineup.select_random_artist\n end\n\n options = { :query => { :api_key => LASTFM_API_KEY, :limit => \"10\", :format => \"json\" } }\n top_tracks_response = self.class.get(\"/2.0/?method=artist.gettoptracks&artist=#{ERB::Util.url_encode(@artist)}\",options)\n\n top_tracks_response = top_tracks_response.try(:[],\"toptracks\").try(:[],\"track\")\n if top_tracks_response\n top_tracks_response\n else\n @artist = nil\n top_tracks_for_random_artist\n end\n end",
"def index\n @playlist_songs = PlaylistSong.all\n end",
"def show\n @albums = Album.where(artist_id: @album.artist_id )\n @related_songs = Song.where(genre_id: @album.songs.first.genre_id).and(Song.where.not(id: [@album.songs.ids])).order('RAND()').limit(10)\n @songs = @album.songs.all\n @song_data = @songs.left_outer_joins(:artist).distinct.select('songs.*, artists.artist_stageName')\n render layout: 'page'\n end",
"def songs\n Song.all.select do |song| \n song.artist == self\n end \n end",
"def index\n @user_songs = UserSong.all\n end",
"def songs\n\t\t@musician = User.find_by_id(current_user.id)\n\tend",
"def photos(offset=nil, limit=nil)\n phs = Photo.find_photos_for_place(@id)\n phs = phs.skip(offset) if !offset.nil?\n phs = phs.limit(limit) if !limit.nil?\n phs.map { |ph| Photo.new(ph) }\n end",
"def artists\n self.songs.collect{|song| song.artist}\n end",
"def songs\n Song.all.select do |song|\n song.artist == self.name\n end\n end",
"def find_recent_songs\n songs_with_date_modified_pair = self.lib.songs.reject do |song|\n (!song.metadata.has_key?('date_modified')) or (song.metadata['date_modified'] == nil)\n end\n\n songs_by_date_modified = songs_with_date_modified_pair.sort do |a, b| \n b.metadata['date_modified'] <=> a.metadata['date_modified']\n end\n\n songs_first = songs_by_date_modified.first(3)\n song_names = songs_first.collect {|song| song.metadata['name']} \n end",
"def list\n for song in self.songs\n puts song.name\n end\n end",
"def songs\n Song.all.select {|song| song.artist = self}\n end",
"def index\n @songs = Song.select('id, title').order('songs.created_at DESC').includes(:performers).limit(10)\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @songs }\n end\n end",
"def show\r\n @song = Song.find(params[:id])\r\n @song_arrangements = SongArrangement.paginate(page: params[:page], per_page: 5, joins: \"LEFT JOIN song_arrangement_files ON song_arrangement_files.song_id = song_arrangements.song_id\", conditions: [\"song_arrangements.song_id = ?\", params[:id]], group: \"song_arrangements.id\", order: \"song_arrangements.title ASC, song_arrangements.original_key ASC, song_arrangements.bpm ASC, song_arrangements.id ASC\")\r\n end",
"def artists\n songs.map do |song|\n song.artist\n # binding.pry\n end\n end",
"def getSongs(oStatsProxy, iMechanizeAgent)\n # Get the songs page\n lSongsPage = iMechanizeAgent.get('http://www.myspace.com/my/songs')\n # Screen scrap it\n # List of objects that can be tried again for the song plays category\n lLstRecoverableObjectsForSongPlays = []\n # List of songs read (used for display)\n lLstSongsPlayRead = []\n lSongsPage.root.css('div.UploadedSong').each do |iSongNode|\n lSongTitle = nil\n lNbrPlays = nil\n iSongNode.css('div#songTitle').each do |iSongTitleNode|\n lSongTitle = iSongTitleNode.content\n end\n lPlaysNode = iSongNode.children[11]\n if (lPlaysNode == nil)\n log_err \"Unable to find plays node: #{iSongNode}\"\n else\n begin\n lNbrPlays = Integer(lPlaysNode.content)\n rescue Exception\n log_err \"Invalid number of plays content: #{lPlaysNode}\"\n end\n end\n if (lSongTitle == nil)\n log_err \"Unable to get the song title: #{iSongNode}\"\n end\n if (lNbrPlays == nil)\n log_err \"Unable to get the song number of plays: #{iSongNode}\"\n if (lSongTitle != nil)\n # We can try this one again\n lLstRecoverableObjectsForSongPlays << lSongTitle\n end\n end\n if ((lSongTitle != nil) and\n (lNbrPlays != nil))\n oStatsProxy.add_stat(lSongTitle, 'Song plays', lNbrPlays)\n end\n lLstSongsPlayRead << lSongTitle\n end\n log_debug \"#{lLstSongsPlayRead.size} songs read for songs plays: #{lLstSongsPlayRead.join(', ')}\"\n if (!lLstRecoverableObjectsForSongPlays.empty?)\n oStatsProxy.add_recoverable_order(lLstRecoverableObjectsForSongPlays, ['Song plays'])\n end\n end"
] | [
"0.78058696",
"0.68225414",
"0.67934537",
"0.67784345",
"0.6635563",
"0.6587103",
"0.6470681",
"0.6464106",
"0.6374284",
"0.63725084",
"0.6348747",
"0.6346243",
"0.6217916",
"0.6212014",
"0.61899",
"0.61899",
"0.6181969",
"0.6181969",
"0.6181969",
"0.6181969",
"0.6181969",
"0.6181969",
"0.6181969",
"0.6181969",
"0.6181969",
"0.6181969",
"0.6165604",
"0.61414045",
"0.6130178",
"0.6115557",
"0.6070749",
"0.6068814",
"0.60678893",
"0.6036763",
"0.600714",
"0.599505",
"0.5987819",
"0.59750324",
"0.5970468",
"0.59237856",
"0.59138095",
"0.59080553",
"0.590203",
"0.5898804",
"0.58934397",
"0.58876044",
"0.5841481",
"0.5822493",
"0.5802905",
"0.5802905",
"0.5794418",
"0.5787837",
"0.5773327",
"0.5765834",
"0.5762832",
"0.5758387",
"0.5758387",
"0.5729001",
"0.5716202",
"0.57007986",
"0.56993574",
"0.5689759",
"0.5688254",
"0.5687888",
"0.56847763",
"0.568387",
"0.5678236",
"0.5676582",
"0.5669307",
"0.56691206",
"0.5668774",
"0.5661458",
"0.56611717",
"0.56587625",
"0.5656773",
"0.5648296",
"0.56427306",
"0.5638436",
"0.56365985",
"0.5634811",
"0.5605822",
"0.5604573",
"0.56013745",
"0.55937135",
"0.55825335",
"0.5581539",
"0.5575789",
"0.5572098",
"0.55677015",
"0.5561285",
"0.5560962",
"0.556004",
"0.55516267",
"0.55512893",
"0.5549193",
"0.5545477",
"0.55423295",
"0.55420524",
"0.5541837",
"0.5536276"
] | 0.78583246 | 0 |
The options to use when the artist is serialized. | def serialize_options
{
:methods => [ :kind, :display, :url, :info, :photo ],
:except => [ :picture ]
}
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def serialize_options\n\t\t{\n\t\t\tinclude: [ object == \"song\" ? :song : :playlist ],\n\t\t\tmethods: [ :kind, :display, :url ]\n\t\t}\n\tend",
"def serialize_options\n\t\t{\n\t\t\t:include => [ :current_track ],\n\t\t\t:methods => [ :kind, :display, :url ]\n\t\t}\n\tend",
"def serialize_options\n\t\t{\n\t\t\t:methods => [ :kind, :display, :url, :picture ]\n\t\t}\n\tend",
"def serialize_options\n\t\t{\n\t\t\texcept:\n\t\t\t[\n\t\t\t\t:access_token_secret, :access_token, :uid, :created_at,\n\t\t\t\t:refresh_token, :token_expires_at, :user_id, :updated_at\n\t\t\t],\n\t\t\tmethods:\n\t\t\t[\n\t\t\t\t:kind, :display, :url, :connectURL,\n\t\t\t\t:can_button, :can_share, :can_listen, :can_donate, :can_create_playlist,\n\t\t\t\t:name, :error\n\t\t\t]\n\t\t}\n\tend",
"def serialize_options\n\t\t{\n\t\t\texcept: [\n\t\t\t\t:has_password, :created_at, :unique_token, :updated_at, :custom_name,\n\t\t\t\t:admin, :show_ads, :name_source, :image, :email\n\t\t\t\t\n\t\t\t],\n\t\t\tmethods: [ :kind, :display, :url ]\n\t\t}\n\tend",
"def serialize_options\n\t\t{\n\t\t\texcept: :last_ip,\n\t\t\tmethods: [ :kind, :display, :url ]\n\t\t}\n\tend",
"def options\n attributes.fetch(:options)\n end",
"def options\n @options ||= {}\n @options\n end",
"def options\n {}\n end",
"def options\n {}\n end",
"def options\n @options ||= {}\n end",
"def options\n @options ||= {}\n end",
"def options\n @options ||= {}\n end",
"def options\n @options ||= {}\n end",
"def options\n @options ||= {}\n end",
"def object_serialization_options\n {:except => [:variant_id, :type, :position], :methods => [:classification, :options]}\n end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options; end",
"def options\n @options\n end",
"def options\n @options ||= {}\n end",
"def options\n @options ||= {}\n end",
"def options\n @options ||= {}\n end",
"def options\n @options\n end",
"def options\n @options\n end",
"def options\n @_options ||= {}\n end",
"def options; @opts end",
"def options\n abstract!\n end",
"def options() end",
"def initialize(options={})\n @artist_name = options[:artist_name]\n @albums =options[:albums]\n end",
"def options\n @@options\n end",
"def options\n @@options\n end",
"def options\n @@options\n end",
"def options\n data[:options]\n end",
"def options\n self[:options] || {}\n end",
"def options\n {\n version: @version,\n delim: @delim,\n randomized: @flags[0],\n ordered: @flags[1],\n rotated: @flags[2],\n comments: @flags[3]\n }\n end",
"def options\n @options ||= OpenStruct.new\n end",
"def options\n opts = super\n opts[:overwrite_original] = true if @overwrite_original\n opts\n end",
"def options\n opts = super\n opts[:overwrite_original] = true if @overwrite_original\n opts\n end",
"def options()\n {}\n end",
"def options\n @options ||= self.class.options\n end",
"def uploader_options\n end"
] | [
"0.74082303",
"0.737354",
"0.6854332",
"0.67934823",
"0.67239165",
"0.6715332",
"0.66421545",
"0.65970266",
"0.6572158",
"0.6572158",
"0.6549139",
"0.6549139",
"0.65440017",
"0.65440017",
"0.65440017",
"0.6511037",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.65082324",
"0.6478398",
"0.6456831",
"0.6456831",
"0.6456831",
"0.6455459",
"0.6455459",
"0.64489627",
"0.6401702",
"0.6395156",
"0.638558",
"0.63716114",
"0.6369532",
"0.6369532",
"0.6369532",
"0.63604635",
"0.63596606",
"0.63393205",
"0.6328278",
"0.6328226",
"0.6328226",
"0.632527",
"0.63175064",
"0.63150346"
] | 0.68844223 | 2 |
Returns a translated wikipedia page for the artist. defaults to english if none found. | def localized_page
return @page if @page
l = langtag(I18n.locale)
Wikipedia.Configure do
domain "#{l}.wikipedia.org"
path "w/api.php"
end
p = page
if p == nil || p.content == nil
logger.debug "defaulting to english"
Wikipedia.Configure do
domain "en.wikipedia.org"
path "w/api.php"
end
p = page
else
logger.debug "sending translated"
end
@page = p
@page
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wikipedia_link\n\t\tp = localized_page\n\t\tbase = \"https://#{langtag(I18n.locale)}.wikipedia.org\"\n\t\treturn base unless p && p.title\n\t\t\"#{base}/wiki/#{p.title}\"\n\tend",
"def search_wikipedia\n respond_to do |format|\n format.html do\n @wikipedia_search_text = params[:artist_name]\n meta = MetaGeneration.new(Setting.get_settings)\n @wikipedia_search = meta.search_text(@wikipedia_search_text, 10)\n render 'search_wikipedia.html', layout: false\n end\n end\n end",
"def wikipedia\n uri = nil\n @artist_data[\"relations\"].each do |rel|\n if rel[\"type\"] == \"wikipedia\"\n uri = rel[\"url\"][\"resource\"]\n end\n end\n return uri\n end",
"def wikipedia_url\n \"http://en.wikipedia.org/wiki/ISO_639:#{iso_639}\"\n end",
"def url\n\t\t\"#{base}/wiki/#{page}\"\n\tend",
"def wikipage(page, subreddit = nil)\n name = extract_attribute(subreddit, :display_name)\n\n path = \"/wiki/#{page}.json\"\n path.prepend(\"/r/#{name}\") if subreddit\n object_from_response :get, path\n end",
"def wikipedia_link\n to_nil _response_entity.fetch(\"wikiLink\", nil)\n end",
"def get_wiki(search)\n return Wikipedia::article(search).first\n search = search.split(/\\s+/).map {|w| w.capitalize }.join(' ')\n page = Wikipedia.find(search)\n g = JSON.parse(page.json)\n content = g[\"query\"][\"pages\"].first.last[\"revisions\"].first\n\n\n content = content[\"*\"]\n\n\n wiki = WikiCloth::Parser.new({ data: content })\n\n html = wiki.to_html\n\n doc = Nokogiri::HTML(html)\n doc = doc.xpath(\"//p\").to_s\n doc = Nokogiri::HTML(doc)\n doc = doc.xpath(\"//text()\").to_s\n\n doc = doc.split(\"\\n\")\n\n plaintext = []\n\n doc.each do |d|\n unless d.empty?\n plaintext << d\n end\n end\n\n\n return plaintext\n end",
"def info\n\t\treturn \"\"\n\t\tp = localized_page\n\t\treturn \"\" unless p && p.content\n\t\tlogger.debug \"parsing page #{p.title}\"\n\t\t\t\n\t\t# extract the top-most section (the one before any ToC)\n\t\tc = WikiCloth::Parser.new({ :data => WikiParser::sanitize(p.content) })\n\t\tc = c.sections.first\n\t\t\n\t\tl = I18n.locale\n\t\tret = WikiParser.new({ :data => c }).to_html\n\t\t#I18n.locale = l\n\t\treturn ret\n\tend",
"def htlal_wiki_url\n \"http://learnanylanguage.wikia.com/wiki/#{name.gsub(' ', '_')}\"\n end",
"def ask_wikipedia(search)\n # what is passed in when following a link will be encoded\n search = CGI::unescape(search)\n \n # looks like the encoding we are receiving is not the same as what wikipedia will take in some cases \n # so we decode and then re-encode this so it goes to wikipedia correctly\n search = CGI::escape(search) unless search == \"::Home\"\n\n path = \"/wiki/#{search}\"\n puts \"path = #{path}\"\n \n # temporarily we hardcode these headers which are required by m.wikipedia.org\n headers = {\n # 'User-Agent' => 'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28'\n 'User-Agent' => 'Rhosync'\n }\n \n response, data = fetch(path, headers)\n data = rewrite_urls(data)\n \n [data].pack(\"m\").gsub(\"\\n\", \"\")\n end",
"def get_page\n @html_doc = Nokogiri::HTML(open(\"https://en.wikipedia.org/wiki/2020_NBA_playoffs\"))\n return @html_doc\n end",
"def url\n return if article.nil?\n title = article.escaped_full_title\n \"#{wiki.base_url}/w/index.php?title=#{title}&diff=prev&oldid=#{mw_rev_id}\"\n end",
"def show\n @wiki = Wiki.find(params[:id])\n end",
"def view(title=nil, id=nil)\n if title\n encoded = title.split.join(\"_\")\n endpoint = \"https://en.wikipedia.org/w/api.php?action=parse&format=json&prop=wikitext&page=#{encoded}&redirects\"\n elsif id\n encoded = title.split.join(\"_\")\n endpoint = \"https://en.wikipedia.org/w/api.php?action=parse&format=json&prop=wikitext&pageid=#{encoded}\"\n end\n hash = get(endpoint)\n page = hash[\"parse\"][\"wikitext\"].to_s.gsub( '\\n', \"\\n\" )\n tmp = Tempfile.new(\"wik-#{encoded}-\")\n tmp.puts page\n system \"less #{tmp.path}\"\n tmp.close\n tmp.unlink\n return hash\n end",
"def get_wikipedia_articles\n Geonames::WebService.find_nearby_wikipedia :lat => @latitude, :long => @longitude\n end",
"def show\n @wiki_pages = @wiki.wiki_pages.paginate(:page => params[:page]).order(\"title\") #.select(\"id, title, url_title, updated_at\")\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @wiki }\n end\n end",
"def get_filmName_en\n \t\tresponse = JSON.parse HTTParty.get(self.url).to_json\n \t\tfilmName_en = response[\"filmName_en\"]\n \t\treturn filmName_en\n \tend",
"def show\n\t\t@language = Language.find(params[:id])\n\t\t@translatees = Admin::Translatee.all\n\t\t@title = t(\"translate.show_title\", language: t(\"languages.#{@language.english_name.downcase}\"))\n\t\t\n\t\trespond_with @language\n\tend",
"def generic_page_for_language(name, language)\n find(:first, \n :conditions => [ 'page_name=? AND language_id=? AND related_object_id is null', \n name, language.id ])\n end",
"def info(titles=nil, ids=nil, display=true)\n if titles\n if titles.is_a?(Array)\n encoded = titles.join(\"|\").split.join(\"_\")\n elsif titles.is_a?(String)\n encoded = titles\n else\n puts \"Titles should be a string or array\"\n return false\n end\n endpoint = \"https://en.wikipedia.org/w/api.php?action=query&format=json&prop=info&inprop=url&titles=#{encoded}&redirects\"\n elsif ids\n if ids.is_a?(Array)\n encoded = ids.join(\"|\").split.join(\"_\")\n elsif ids.is_a?(String)\n encoded = ids\n else\n puts \"ID's should be a string or array\"\n return false\n end\n endpoint = \"https://en.wikipedia.org/w/api.php?action=query&format=json&prop=info&inprop=url&pageids=#{encoded}&redirects\"\n end\n hash = get(endpoint)\n pages = hash[\"query\"][\"pages\"]\n redirects = hash[\"query\"][\"redirects\"]\n if display\n if redirects\n redirects.each do |redirect|\n puts \"Redirected from '#{redirect[\"from\"]}' to '#{redirect[\"to\"]}'\"\n end\n end\n pages.keys.each do |id|\n page = pages[id]\n if page[\"missing\"]\n puts \"The page '#{page[\"title\"]}' is missing\"\n else\n puts \"The page '#{page[\"title\"]}' has the ID: #{page[\"pageid\"]}, and is written in #{page[\"pagelanguage\"]}\"\n end\n end\n end\n return hash\n end",
"def top_article_wikipedia(query)\n parsed_query = query.split.map { |word| URI.escape(word) }.join('+')\n url = \"https://en.wikipedia.org/w/api.php?action=opensearch&search=#{parsed_query}\"\n response = RestClient.get(url)\n if response.code != 200 # wikipedia's responses are almost always 200 (expect FATAL) but may contain errors or warnings\n nil\n else\n response_content = JSON.parse(response)\n if response_content[1] == [] # search didn't yield any result\n nil\n # search was successful\n else\n articles = response_content[1]\n urls = response_content[3]\n { title: articles.first, url: urls.first, source: \"wikipedia.com\" }\n end\n end\n end",
"def text( title, lang: Wikiscript.lang )\n ## todo/fix: convert spaces to _ if not present for wikipedia page title - why ?? why not ???\n\n ## note: replace lang w/ lang config if present e.g.\n ## http://{lang}.wikipedia.org/w/index.php\n # becomes\n # http://en.wikipedia.org/w/index.php or\n # http://de.wikipedia.org/w/index.php etc\n base_url = SITE_BASE.gsub( \"{lang}\", lang )\n params = { action: 'raw',\n title: title }\n\n get( base_url, params )\n end",
"def show\n @wiki_page = MiniWikiPage.find_by_name(params[:wiki_page])\n\n if !@wiki_page.nil?\n # get revision\n if params[:revision]\n @wiki_revision = @wiki_page.mini_wiki_revisions.first(:conditions => [\"revision=?\",params[:revision]])\n end\n \n # if retreive of revision failed or if no revision requested, get the last revision\n if (params[:revision] && @wiki_revision==nil) || !params[:revision]\n @wiki_revision = @wiki_page.mini_wiki_revision\n end\n \n render :template => 'show'\n else\n redirect_to :action => 'new', :name => params[:wiki_page]\n end\n \n end",
"def show\n @news = News.find(params[:id]).translation\n @title = @news.title\n @canonical = @news.parent_id ? News.find(@news.parent_id) : @news\n @canonical_url = news_item_url(:id => @canonical.id, :lang => @canonical.locale || 'en')\n @canonical_path = news_item_path(:id => @canonical.id, :lang => @canonical.locale || 'en')\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @news }\n end\n end",
"def find_page(pname, verify = true)\n\t\tlogger.debug \"looking up page: #{pname}\"\n\t\tlogger.debug \"verify find: #{verify}\"\n\t\tr = Wikipedia.find(pname)\n\t\t\n\t\t# parse disambiguation meta data\n\t\tunless is_artist_page? r\n\t\t\tlogger.debug \"check for disambiguation meta data\"\n\t\t\n\t\t\t# check for {about|A|B|1|C|2...|Z|N} patterns\n\t\t\t# where we are intrested in B|1 - Z|N\n\t\t\tm = r.content.scan(/\\{about\\|[\\w\\s]*((\\|[^\\}\\{\\|]*\\|[^\\}\\{\\|]*)*)\\}/) if r.content\n\t\t\tunless m == nil || m.empty? || m.first.empty?\n\t\t\t\t# l = [\"B\", \"1\", \"C\", \"2\", ... , \"Z\", \"N\"]\n\t\t\t\tl = m.first.first[1..-1].split(\"|\")\n\t\t\t\t1.step(l.size-1,2).each do |i|\n\t\t\t\t\t# check pages \"1\", \"2\" .. \"N\"\n\t\t\t\t\tp = find_page(l[i])\n\t\t\t\t\tr = p if p\n\t\t\t\t\tbreak\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\t\n\t\t# parse links\n\t\tlogger.debug \"follow links (desperate!)\" if !is_artist_page?(r) && is_disambiguation_page?(r)\n\t\tr = follow_links(r) if !is_artist_page?(r) && is_disambiguation_page?(r)\n\t\t\n\t\t# verify category\n\t\t(!verify || is_artist_page?(r)) ? r : nil\n\tend",
"def wiki(project, slug)\n get(\"/projects/#{url_encode project}/wikis/#{slug}\")\n end",
"def index\n\t\t@languages = Language.all\n\t\t@title = t(\"translate.title\")\n\t\trespond_with @languages\n\tend",
"def getPage\n # get specific page from last argument\n page = @arguments[@arguments.length - 1] \n # get url for specific page\n url = \"http://oldschoolrunescape.wikia.com/wiki/#{page}\"\n\n # prints url for debugging\n# puts(url)\n\n # request page\n @page = HTTParty.get(url)\n\n # check to see if this was a valid request\n if @page.include? \"This page does not exist. Mayhaps it should?\"\n # if not valid request, abort \n abort(\"Incorrect input. Make sure you spelling is correct. The syntax is:\\n\\n\\tOSQuery -m This_monster\\n\\nThe first letter of the item must be capitalized with the rest of the letters lowercase, and there must be an underscore between each word with no spaces.\")\n end # -- end check for valid request\n end",
"def show\n if params[:page_url].blank? && params[:locale].blank?\n redirect_to get_railsgun_url(railsgun_home)\n elsif params[:page_url].blank? && !params[:locale].blank?\n redirect_to get_railsgun_url(railsgun_home, {:lang => params[:locale]})\n else\n page_url = params[:page_url]\n splitted_page_url = page_url.split('/')\n @page = Page.find(:first, :conditions => [\"pretty_url = ?\", splitted_page_url.last]) unless page_url.last.nil?\n if @page\n respond_with(@page, @pages = Page.all, @lang=params[:locale]) \n end \n end\n end",
"def show\n return render :status => 404, :text => \"Not found\" unless @article\n @title = @article.title\n to = {:lang => I18n.default_locale}\n if @article.category =~ /(conference|contacts|sponsors|reports)/\n to.merge!(:category => @article.category, :name => @article.name)\n @canonical_url = article_by_name_url(to)\n @canonical_path = article_by_name_path(to)\n else\n to.merge!(:id => @article.id)\n @canonical_url = article_url(to)\n @canonical_path = article_path(to)\n end\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @article }\n end\n end",
"def show\n @wiki = @project.wikis.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @wiki }\n end\n end",
"def show\n @page_title = t('page_title', name: 'Micropost')\n end",
"def show\n @translate\n @uploaded_text = ''\n translation_map = []\n end",
"def title_en\n search_by_itemprop 'alternativeHeadline'\n end",
"def i18n_nav(thing)\n pages = @context.registers[:site].pages_by_language\n lang = @context.registers[:page]['language']\n return thing if @context.registers[:page]['is_default_language']\n # puts \"#{lang}: before '#{thing}'\"\n filtered = thing.find_all do |t|\n t['url'] == '/' || # always pass through \"Start\"\n exists_in_language(t['url'], lang)\n #pages[lang][t['url']].name.end_with?(\"#{lang}.md\")\n end\n # puts \"#{lang}: after '#{filtered}'\"\n filtered\n end",
"def index\n @title = t('label.news.last_news')\n if(current_user && current_user.editor?)\n @news = News.translated\n else\n @news = News.published.translated\n end\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @news }\n end\n end",
"def title\n @basename.wikify\n end",
"def show(name)\n\t\tif [email protected]?\n\t\t\tstatus 500\n\t\t\t@name = \"Wiki directory not found\"\n\t\t\t@error = \"We couldn't find the wiki directory your configuration is pointing to.<br/>Fix that, then come back - we'll be happier then.\"\n\t\t\terb :error500\n\t\telse\n\t\t\tif @page = @wiki.page(name)\n\t\t\t\t# may success come to those who enter here.\n\t\t\t\t@name = @page.name\n\t\t\t\t@content = @page.content\n\t\t\t\terb :show\n\t\t\telse\n\t\t\t\tstatus 404\n\t\t\t\t@newpage = name\n\t\t\t\t@name = \"404: Page not found\"\n\t\t\t\terb :error404\n\t\t\tend\n\t\tend\n\tend",
"def load_page\n page_not_found! unless Language.current\n\n @page ||= Language.current.pages.contentpages.find_by(\n urlname: params[:urlname],\n language_code: params[:locale] || Language.current.code\n )\n end",
"def article_title_lang_display(text)\n\t\tarticle_lang_display(text)\n\tend",
"def wiki\n strong_memoize(:wiki) do\n create_wiki_repository\n Gitlab::Git::Wiki.new(repository.raw)\n end\n end",
"def lookup_by_woeid(woeid)\n raw = get request_url(woeid)\n Response.new(raw, options[:lang])\n end",
"def calc_page_and_title_from_wikiword(wiki_word)\n wiki_page_title = wiki_word # as is for now\n page_name = wiki_word.gsub( /\\s*:\\s*/, '/').downcase\n if self.subwiki && !page_name.starts_with?('/') # unless page starts with /, remain in subwiki, so prefix with dir\n page_name = File.join(self.subwiki, page_name)\n end\n page_name = page_name[1..-1] if page_name.starts_with?('/')\n page_name = page_name + HOMEPAGE if page_name.ends_with?('/')\n page_name = page_name.wiki_filename\n page = Page.new(page_name)\n return page, wiki_page_title\n end",
"def wiki_url\n \"https://hq.songbirdnest.com/wiki/index.php?title=Release:#{name}_Iteration_Notes#Iteration_#{@number}\"\n end",
"def italy\n end",
"def wiki\n @wiki ||= Smeagol::Wiki.new(wiki_dir)\n end",
"def get_page_content(page_title)\n response = mediawiki('get_wikitext', page_title)\n case response&.status\n when 200\n response.body.force_encoding('UTF-8')\n when 404\n ''\n end\n end",
"def show\n respond_to do |format|\n \n format.html # show.html.erb\n format.json { render json: @wiki }\n \n end\n end",
"def sp_doc_url(file)\n case @conf.lang\n when \"ja\"\n \"http://hikiwiki.org/ja/#{escape(file)}.html\"\n else\n \"http://hikiwiki.org/en/#{escape(file)}.html\"\n end\nend",
"def sp_doc_url( file )\n case @conf.lang\n when 'ja'\n \"http://hikiwiki.org/ja/#{escape(file)}.html\"\n else\n \"http://hikiwiki.org/en/#{escape(file)}.html\"\n end\nend",
"def search(phrase, limit=5, description=true, display=true)\n search = phrase.split.join(\"_\")\n endpoint = \"https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=#{search}&limit=#{limit}\"\n hash = get(endpoint)\n results = hash[1]\n descriptions = hash[2]\n if display\n puts \"Displaying #{results.length} results:\"\n for i in 0...results.length\n if description\n if ! descriptions[i].empty?\n puts \"\\n'#{results[i]}' : #{descriptions[i]}\"\n else\n puts \"\\n'#{results[i]}' : No Immediate Description Available. Try `wik -d #{results[i]}`\"\n end\n else\n puts \"\\n'#{results[i]}'\"\n end\n end\n end\n return hash\n end",
"def get_wiki_url(query)\n search_keywords = query.strip.gsub(/\\s+/,'+')\n url = \"http://www.google.com/search?q=#{search_keywords}+site%3Aen.wikipedia.org&safe=active\"\n begin\n doc = Hpricot(open(url, \"UserAgent\" => \"reader\"+rand(10000).to_s).read)\n result = doc.search(\"//div[@id='ires']\").search(\"//li[@class='g']\").first.search(\"//a\").first\n rescue\n return ''\n end\n if result\n return result.attributes[\"href\"]\n else\n return ''\n end\n end",
"def find(phrase, limit=15, snippet=false, display=true)\n search = phrase.split.join(\"_\")\n if snippet\n endpoint = \"https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=#{search}&srlimit=#{limit}\"\n else\n endpoint = \"https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=#{search}&srlimit=#{limit}&srprop\"\n end\n hash = get(endpoint)\n info = hash[\"query\"][\"searchinfo\"]\n results = hash[\"query\"][\"search\"]\n if display\n puts \"Total hits : #{ info[\"totalhits\"] }\"\n if info[\"suggestion\"]\n puts \"Suggestion : #{ info[\"suggestion\"] }\"\n end\n puts \"Displaying #{results.length} results:\"\n results.each do |result|\n # https://stackoverflow.com/a/1732454\n if snippet\n snip = result[\"snippet\"].gsub( /<.*?>/, \"\" ).gsub( /&\\w+;/, \"\" ).split.join(\" \")\n puts \"\\n'#{result[\"title\"]}' : #{snip}...\"\n else\n puts \"\\n'#{result[\"title\"]}'\"\n end\n end\n end\n return hash\n end",
"def index\n @articles = Article.translated\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @articles }\n end\n end",
"def show\n @book = Book.find(params[:id])\n @chapters = @book.chapters\n wl = WhatLanguage.new(:all)\n @lang = \"\"\n @book.chapters.each do\n @lang = wl.language(@book.chapters[0].content).to_s.capitalize\n end\n\n do_response @book.to_json(:include => :chapters)\n end",
"def page_title\n \t\"PatTalk\"\n end",
"def index\n puts \n if MiniWikiPage.first(:conditions => [\"name = ?\", \"HomePage\"]) == nil\n redirect_to :action => 'new', :name => \"HomePage\"\n else\n redirect_to :action => 'show', :wiki_page => \"HomePage\"\n end\n end",
"def hecho_en\n 'china'\n end",
"def index\n @abouts = About.all.reverse_order.send \"with_rich_text_#{I18n.locale}\"\n @current = About.current\n end",
"def wikimedia_url(metadata)\n links = metadata.split(\"\\n\")\n @url = ''\n links.each do |meta|\n if meta.include?('archive_url:') and !meta.include?('old_archive_url:')\n @url = meta.split('archive_url:').last\n end\n end \n return @url\n end",
"def get_tracks_url(album)\n tracks_url = ''\n if album.first == 'Twist and Shout' || album.first == 'A Hard Day\\'s Night' || album.first == 'Yellow Submarine'\n tracks_url = \"https://en.wikipedia.org/wiki/#{album.first} (album)\"\n elsif album.first == 'Something New' || album.first == 'Revolver' || album.first == 'Let It Be'\n tracks_url = \"https://en.wikipedia.org/wiki/#{album.first} (Beatles album)\"\n elsif album.first == 'The Beatles (\"The White Album\")'\n tracks_url = \"https://en.wikipedia.org/wiki/The_Beatles_(album)\"\n else\n tracks_url = \"https://en.wikipedia.org/wiki/#{album.first}\"\n end\n return tracks_url\nend",
"def wiki_title\n settings.title\n end",
"def title\n current_localization.name\n end",
"def get_japanese_emoticon(yaml_file, eng_emoticon)\n translation = \"\"\n new_hash = load_library(yaml_file)\n new_hash.each do |name, languages|\n if languages[:english] == eng_emoticon \n translation = languages[:japanese]\n end\n end\n if translation == \"\"\n return \"Sorry, that emoticon was not found\"\n else\n return translation\n end\nend",
"def find_or_new_page(title)\n title = start_page if title.blank?\n find_page(title) || WikiPage.new(:wiki => self, :title => Wiki.titleize(title))\n end",
"def download_wiki_image(artist)\n\n # Check if the artist image already exists\n return if artist.image_path(:medium)\n\n image_url = get_wikipedia_image_url(artist.wikilink)\n MetaGeneration::download_artist_image(artist, image_url)\n end",
"def getFirst\n first = \"\" \n if (@currentPage.to_i > 2)\n first = \"<a href=\\\"/pubmed/searchPubmed?method=get&term=#{@keywords}&page=1&resultsPerPage=#{@resultsPerPage}\\\" class=\\\"prev_page\\\">| « First</a>\"\n end \n first\n end",
"def show\n @translation = Translation.find_by_permalink(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @translation }\n end\n end",
"def display_page name\n store_name, page_name = name.split ':', 2\n\n store = @stores.find { |s| s.source == store_name }\n\n return display_page_list store if page_name.empty?\n\n pages = store.cache[:pages]\n\n unless pages.include? page_name then\n found_names = pages.select do |n|\n n =~ /#{Regexp.escape page_name}\\.[^.]+$/\n end\n\n if found_names.length.zero? then\n return display_page_list store, pages\n elsif found_names.length > 1 then\n return display_page_list store, found_names, page_name\n end\n\n page_name = found_names.first\n end\n\n page = store.load_page page_name\n\n display page.comment\n end",
"def wikisource_url(metadata)\n links = metadata.split(\"\\n\")\n @url = ''\n links.each do |meta|\n if meta.include?('wikisource_url:')\n @url = meta.split('wikisource_url:').last\n end\n end \n return @url\n end",
"def article_lang_display(text)\n\n\t\ttext.split(\"$$\").each_cons(2) do |lang, content|\n\n\t\t\tif lang.eql?('en') and I18n.locale == :en\n\t\t\t\ten_text = content\n\t\t\t\treturn creole(en_text)\n\t\t\telsif lang.eql?('es') and I18n.locale == :es\n\t\t\t\tes_text = content\n\t\t\t\treturn creole(es_text)\n\t\t\tend\n\t\tend\n\tend",
"def format_url_with_language(the_url)\n\n if translation_locale = locale_to_translate_into\n \"/#{translation_locale}#{the_url}\"\n else\n the_url\n end\n end",
"def map_words_on_page\n fetcher = FetchUrl.new\n page_content = fetcher.fetch(self[:url]).body\n\n processor = PageProcessor.new\n processor.process_page page_content\n end",
"def get_weather_page(location)\n\tclient = Weatherman::Client.new\n\tweather_page = client.lookup_by_location(location)\nend",
"def show\n @kind=params[:k] || 'news'\n @locale=params[:locale] || 'zh_CN'\n @article = Article.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @article }\n end\n end",
"def build_html\n # the first one should not use a locale, for the default:\n generate_all_html_pages\n\n # now translate, if necessary:\n if translation.should_translate?\n translation.prepare\n translation.available_locales.each do |locale|\n translation.current_locale = locale\n generate_all_html_pages\n end\n end\n end",
"def get_next_article(url)\n uri = URI(URI::Parser.new.escape(url))\n response = Net::HTTP.get(uri)\n\n doc = Nokogiri::HTML.parse(response)\n\n #article = doc.at('a:contains(\"Article suivant\")')\n article = doc.at('a:contains(\"Nächster Artikel\")')\n article['href']\nend",
"def get_other_langs_of_page(title, limit = @query_limit_default)\n params = {\n prop: 'langlinks',\n titles: title,\n lllimit: get_limited(limit),\n llprop: 'url|langname|autonym'\n }\n\n query(params) do |return_val, query|\n pageid = query['pages'].keys.find { |id| id != '-1' }\n return unless pageid\n langlinks = query['pages'][pageid].fetch('langlinks', [])\n langlinks.each do |l|\n return_val[l['lang'].to_sym] = {\n url: l['url'],\n langname: l['langname'],\n autonym: l['autonym'],\n title: l['*']\n }\n end\n end\n end",
"def list_wiki_pages\n results = WikiPage.joins(wiki: :project)\n .where(\"CONCAT_WS(':', `projects`.`name`, `wiki_pages`.`title`) LIKE ? \", \"%#{params[:term]}%\")\n .select('projects.name, wiki_pages.title')\n .limit(10)\n\n render :json => results.map { |x| \"#{x.name}:#{x.title}\" }\n end",
"def index\n @title = Carmen.country_name(cookies[:country])\n @pages = @pages.where(:country => cookies[:country]).order('lft ASC', 'title ASC')\n end",
"def mozart_italian; end",
"def update_artist(artist)\n begin\n # Handle unknown artist\n if artist.name == Artist::UNKNOWN_ARTIST_NAME\n artist.wikilink = ''\n artist.save\n return\n end\n\n # Result is like this:\n search = search_text(artist.name, 1)\n\n if search.length == 0\n artist.wikilink = ''\n else\n artist.wikilink = search[0][1]\n end\n\n download_wiki_image(artist)\n rescue\n Log.log_last_exception(\"Error updating #{artist.to_s}\")\n artist.wikilink = ''\n end\n artist.save\n end",
"def save_page( title )\n base_url='https://en.wikipedia.org/w/index.php?title={title}&action=raw'\n\n ## todo/check: use %20 for encoding space (or +) - why? why not?\n ## https://en.wikipedia.org/w/index.php?title=South%20Georgia%20and%20the%20South%20Sandwich%20Islands&action=raw\n ## https://en.wikipedia.org/w/index.php?title=South+Georgia+and+the+South+Sandwich+Islands&action=raw\n\n ##\n ## URI.encode_www_form_component(string, enc=nil)\n ## This method will percent-encode every reserved character,\n ## leaving only *, -, ., 0-9, A-Z, _, a-z intact.\n ## Note: It also substitues space with +.\n title_encoded = URI.encode_www_form_component( title )\n url = base_url.gsub( '{title}', title_encoded )\n\n path = \"#{title.gsub( ' ', '_' )}.txt\"\n puts \" >#{title}<, >#{title_encoded}< path=>#{path}<, try url=>#{url}<\"\n\n ## note: change path (used for disk cache)!!\n response = Webget.text( url, path: path )\n ## note: exit on get / fetch error - do NOT continue for now - why? why not?\n exit 1 if response.status.nok? ## e.g. HTTP status code != 200\nend",
"def find_article(title)\n path_to_article \"/wiki/Special:Search?search=#{title}\"\n end",
"def human\n I18n.t(language, scope: :languages)\n end",
"def display_resource(episode)\n \"#{episode.english_title}\"\n end",
"def page( lang, path )\n root_page( lang ).descendant( path )\n end",
"def wiki_key\n # This assumes the project is Wikipedia, which is true for all wikis with the articlequality\n # or the language is nil, which is the case for Wikidata.\n @wiki_key ||= \"#{@wiki.language || @wiki.project}wiki\"\n end",
"def show\n @page = @site.pages.find(params[:id]).in(params[:page_locale])\n respond_with(:site, @page)\n end",
"def main_translation\n translations.where(language: main_language).one\n end",
"def current_page_url( opts = {} )\n if current_page.present?\n if !opts.key?(:locale) || opts[:locale] == current_page.lang\n current_page.url\n else\n # find this page in other lang\n other_page = Aerogel::Pages::Traversal.find_closest_in_other_lang( current_page, opts[:locale] )\n return nil unless other_page.present?\n url_to( other_page.url, opts )\n end\n else\n current_url opts\n end\nend",
"def find_page(title, options = {})\n @page_found_with_redirect = false\n title = start_page if title.blank?\n title = Wiki.titleize(title)\n page = pages.find_by(\"LOWER(title) = LOWER(?)\", title)\n if page.nil? && options[:with_redirect] != false\n # search for a redirect\n redirect = redirects.where(\"LOWER(title) = LOWER(?)\", title).first\n if redirect\n page = redirect.target_page\n @page_found_with_redirect = true\n end\n end\n page\n end",
"def get_default_page(collection=nil, wikiname=nil, page_dir=nil)\n collection ||= @default_coll_name\n wikiname ||= @default_wiki_name\n page_dir = page_dir.to_s\n log_debug(\"get_default_page: default_coll=#{@default_coll_name}, default_wiki=#{@default_wiki_name}\")\n index_page = wiki(collection, wikiname).index_page\n clean_url [collection, wikiname, page_dir, index_page].join \"/\"\n end",
"def index\n @wikis = Wiki.order('created_at DESC').paginate(:page => params[:page])\n end",
"def translations(language = nil)\n Birdman::Requester.get(\"movies/#{id}/translations/#{language}\")\n end",
"def llmap_url\n \"http://llmap.org/languages/#{iso_639_3}.html\"\n end",
"def main(args)\n file, url = args\n if not url\n puts \"Missing URL\"\n return\n end\n\n\tlang, title = url =~ m{^https?://(\\w+)\\.wikipedia\\.org/wiki/(.*)$};\n\nend",
"def get_by_slug(slug)\n record = @dao.search({ 'slug' => slug }, { limit: 1 })\n translate(record)\n end",
"def translation\n if self.spellings.first\n self.spellings.first.name\n else\n \"\"\n end\n end"
] | [
"0.68502563",
"0.62793946",
"0.6214198",
"0.6195336",
"0.602621",
"0.5917104",
"0.58485556",
"0.58085454",
"0.57523215",
"0.56729937",
"0.5639796",
"0.5637494",
"0.56165564",
"0.55695915",
"0.55629915",
"0.55363077",
"0.5529039",
"0.5517396",
"0.54907733",
"0.5458736",
"0.5449819",
"0.5429046",
"0.5424783",
"0.5417495",
"0.5379085",
"0.5363737",
"0.5359573",
"0.5357026",
"0.5354594",
"0.5309716",
"0.5293482",
"0.5292981",
"0.5264059",
"0.52539736",
"0.52195865",
"0.5191038",
"0.5187009",
"0.5183248",
"0.5177294",
"0.51703525",
"0.51548684",
"0.5127779",
"0.51245624",
"0.5124347",
"0.5097551",
"0.5083235",
"0.5083115",
"0.5079668",
"0.5078922",
"0.5073676",
"0.50624484",
"0.50557524",
"0.50446784",
"0.50436777",
"0.50305796",
"0.50269234",
"0.5025165",
"0.5019426",
"0.50114965",
"0.5010216",
"0.50080323",
"0.500336",
"0.49959114",
"0.4985276",
"0.4968126",
"0.4965096",
"0.496246",
"0.49621883",
"0.49581638",
"0.49561852",
"0.49557805",
"0.4953021",
"0.49458715",
"0.4944283",
"0.49299607",
"0.4929723",
"0.4925176",
"0.49066615",
"0.49047175",
"0.4904133",
"0.49011365",
"0.49008423",
"0.49008173",
"0.4897196",
"0.48969063",
"0.48795888",
"0.4877954",
"0.48770705",
"0.48727417",
"0.48717377",
"0.4870455",
"0.48656207",
"0.48623076",
"0.4861485",
"0.4853153",
"0.48489165",
"0.48474213",
"0.4844578",
"0.48438013",
"0.4834487"
] | 0.7470177 | 0 |
Returns the wikipedia page for the artist | def page
@visited_pages = []
logger.debug "retreiving page for #{name}"
find_page(name, false)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wikipedia\n uri = nil\n @artist_data[\"relations\"].each do |rel|\n if rel[\"type\"] == \"wikipedia\"\n uri = rel[\"url\"][\"resource\"]\n end\n end\n return uri\n end",
"def search_wikipedia\n respond_to do |format|\n format.html do\n @wikipedia_search_text = params[:artist_name]\n meta = MetaGeneration.new(Setting.get_settings)\n @wikipedia_search = meta.search_text(@wikipedia_search_text, 10)\n render 'search_wikipedia.html', layout: false\n end\n end\n end",
"def url\n\t\t\"#{base}/wiki/#{page}\"\n\tend",
"def wikipage(page, subreddit = nil)\n name = extract_attribute(subreddit, :display_name)\n\n path = \"/wiki/#{page}.json\"\n path.prepend(\"/r/#{name}\") if subreddit\n object_from_response :get, path\n end",
"def wikipedia_link\n\t\tp = localized_page\n\t\tbase = \"https://#{langtag(I18n.locale)}.wikipedia.org\"\n\t\treturn base unless p && p.title\n\t\t\"#{base}/wiki/#{p.title}\"\n\tend",
"def get_page\n @html_doc = Nokogiri::HTML(open(\"https://en.wikipedia.org/wiki/2020_NBA_playoffs\"))\n return @html_doc\n end",
"def ask_wikipedia(search)\n # what is passed in when following a link will be encoded\n search = CGI::unescape(search)\n \n # looks like the encoding we are receiving is not the same as what wikipedia will take in some cases \n # so we decode and then re-encode this so it goes to wikipedia correctly\n search = CGI::escape(search) unless search == \"::Home\"\n\n path = \"/wiki/#{search}\"\n puts \"path = #{path}\"\n \n # temporarily we hardcode these headers which are required by m.wikipedia.org\n headers = {\n # 'User-Agent' => 'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28'\n 'User-Agent' => 'Rhosync'\n }\n \n response, data = fetch(path, headers)\n data = rewrite_urls(data)\n \n [data].pack(\"m\").gsub(\"\\n\", \"\")\n end",
"def get_wikipedia_articles\n Geonames::WebService.find_nearby_wikipedia :lat => @latitude, :long => @longitude\n end",
"def get_wiki(search)\n return Wikipedia::article(search).first\n search = search.split(/\\s+/).map {|w| w.capitalize }.join(' ')\n page = Wikipedia.find(search)\n g = JSON.parse(page.json)\n content = g[\"query\"][\"pages\"].first.last[\"revisions\"].first\n\n\n content = content[\"*\"]\n\n\n wiki = WikiCloth::Parser.new({ data: content })\n\n html = wiki.to_html\n\n doc = Nokogiri::HTML(html)\n doc = doc.xpath(\"//p\").to_s\n doc = Nokogiri::HTML(doc)\n doc = doc.xpath(\"//text()\").to_s\n\n doc = doc.split(\"\\n\")\n\n plaintext = []\n\n doc.each do |d|\n unless d.empty?\n plaintext << d\n end\n end\n\n\n return plaintext\n end",
"def download_wiki_image(artist)\n\n # Check if the artist image already exists\n return if artist.image_path(:medium)\n\n image_url = get_wikipedia_image_url(artist.wikilink)\n MetaGeneration::download_artist_image(artist, image_url)\n end",
"def wikipedia_link\n to_nil _response_entity.fetch(\"wikiLink\", nil)\n end",
"def wikimedia_url(metadata)\n links = metadata.split(\"\\n\")\n @url = ''\n links.each do |meta|\n if meta.include?('archive_url:') and !meta.include?('old_archive_url:')\n @url = meta.split('archive_url:').last\n end\n end \n return @url\n end",
"def url\n return if article.nil?\n title = article.escaped_full_title\n \"#{wiki.base_url}/w/index.php?title=#{title}&diff=prev&oldid=#{mw_rev_id}\"\n end",
"def find_page(pname, verify = true)\n\t\tlogger.debug \"looking up page: #{pname}\"\n\t\tlogger.debug \"verify find: #{verify}\"\n\t\tr = Wikipedia.find(pname)\n\t\t\n\t\t# parse disambiguation meta data\n\t\tunless is_artist_page? r\n\t\t\tlogger.debug \"check for disambiguation meta data\"\n\t\t\n\t\t\t# check for {about|A|B|1|C|2...|Z|N} patterns\n\t\t\t# where we are intrested in B|1 - Z|N\n\t\t\tm = r.content.scan(/\\{about\\|[\\w\\s]*((\\|[^\\}\\{\\|]*\\|[^\\}\\{\\|]*)*)\\}/) if r.content\n\t\t\tunless m == nil || m.empty? || m.first.empty?\n\t\t\t\t# l = [\"B\", \"1\", \"C\", \"2\", ... , \"Z\", \"N\"]\n\t\t\t\tl = m.first.first[1..-1].split(\"|\")\n\t\t\t\t1.step(l.size-1,2).each do |i|\n\t\t\t\t\t# check pages \"1\", \"2\" .. \"N\"\n\t\t\t\t\tp = find_page(l[i])\n\t\t\t\t\tr = p if p\n\t\t\t\t\tbreak\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\t\n\t\t# parse links\n\t\tlogger.debug \"follow links (desperate!)\" if !is_artist_page?(r) && is_disambiguation_page?(r)\n\t\tr = follow_links(r) if !is_artist_page?(r) && is_disambiguation_page?(r)\n\t\t\n\t\t# verify category\n\t\t(!verify || is_artist_page?(r)) ? r : nil\n\tend",
"def get_wiki_url(query)\n search_keywords = query.strip.gsub(/\\s+/,'+')\n url = \"http://www.google.com/search?q=#{search_keywords}+site%3Aen.wikipedia.org&safe=active\"\n begin\n doc = Hpricot(open(url, \"UserAgent\" => \"reader\"+rand(10000).to_s).read)\n result = doc.search(\"//div[@id='ires']\").search(\"//li[@class='g']\").first.search(\"//a\").first\n rescue\n return ''\n end\n if result\n return result.attributes[\"href\"]\n else\n return ''\n end\n end",
"def getPage\n # get specific page from last argument\n page = @arguments[@arguments.length - 1] \n # get url for specific page\n url = \"http://oldschoolrunescape.wikia.com/wiki/#{page}\"\n\n # prints url for debugging\n# puts(url)\n\n # request page\n @page = HTTParty.get(url)\n\n # check to see if this was a valid request\n if @page.include? \"This page does not exist. Mayhaps it should?\"\n # if not valid request, abort \n abort(\"Incorrect input. Make sure you spelling is correct. The syntax is:\\n\\n\\tOSQuery -m This_monster\\n\\nThe first letter of the item must be capitalized with the rest of the letters lowercase, and there must be an underscore between each word with no spaces.\")\n end # -- end check for valid request\n end",
"def show\n @wiki_pages = @wiki.wiki_pages.paginate(:page => params[:page]).order(\"title\") #.select(\"id, title, url_title, updated_at\")\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @wiki }\n end\n end",
"def top_article_wikipedia(query)\n parsed_query = query.split.map { |word| URI.escape(word) }.join('+')\n url = \"https://en.wikipedia.org/w/api.php?action=opensearch&search=#{parsed_query}\"\n response = RestClient.get(url)\n if response.code != 200 # wikipedia's responses are almost always 200 (expect FATAL) but may contain errors or warnings\n nil\n else\n response_content = JSON.parse(response)\n if response_content[1] == [] # search didn't yield any result\n nil\n # search was successful\n else\n articles = response_content[1]\n urls = response_content[3]\n { title: articles.first, url: urls.first, source: \"wikipedia.com\" }\n end\n end\n end",
"def info(titles=nil, ids=nil, display=true)\n if titles\n if titles.is_a?(Array)\n encoded = titles.join(\"|\").split.join(\"_\")\n elsif titles.is_a?(String)\n encoded = titles\n else\n puts \"Titles should be a string or array\"\n return false\n end\n endpoint = \"https://en.wikipedia.org/w/api.php?action=query&format=json&prop=info&inprop=url&titles=#{encoded}&redirects\"\n elsif ids\n if ids.is_a?(Array)\n encoded = ids.join(\"|\").split.join(\"_\")\n elsif ids.is_a?(String)\n encoded = ids\n else\n puts \"ID's should be a string or array\"\n return false\n end\n endpoint = \"https://en.wikipedia.org/w/api.php?action=query&format=json&prop=info&inprop=url&pageids=#{encoded}&redirects\"\n end\n hash = get(endpoint)\n pages = hash[\"query\"][\"pages\"]\n redirects = hash[\"query\"][\"redirects\"]\n if display\n if redirects\n redirects.each do |redirect|\n puts \"Redirected from '#{redirect[\"from\"]}' to '#{redirect[\"to\"]}'\"\n end\n end\n pages.keys.each do |id|\n page = pages[id]\n if page[\"missing\"]\n puts \"The page '#{page[\"title\"]}' is missing\"\n else\n puts \"The page '#{page[\"title\"]}' has the ID: #{page[\"pageid\"]}, and is written in #{page[\"pagelanguage\"]}\"\n end\n end\n end\n return hash\n end",
"def view(title=nil, id=nil)\n if title\n encoded = title.split.join(\"_\")\n endpoint = \"https://en.wikipedia.org/w/api.php?action=parse&format=json&prop=wikitext&page=#{encoded}&redirects\"\n elsif id\n encoded = title.split.join(\"_\")\n endpoint = \"https://en.wikipedia.org/w/api.php?action=parse&format=json&prop=wikitext&pageid=#{encoded}\"\n end\n hash = get(endpoint)\n page = hash[\"parse\"][\"wikitext\"].to_s.gsub( '\\n', \"\\n\" )\n tmp = Tempfile.new(\"wik-#{encoded}-\")\n tmp.puts page\n system \"less #{tmp.path}\"\n tmp.close\n tmp.unlink\n return hash\n end",
"def wiki_url\n \"https://hq.songbirdnest.com/wiki/index.php?title=Release:#{name}_Iteration_Notes#Iteration_#{@number}\"\n end",
"def update_artist(artist)\n begin\n # Handle unknown artist\n if artist.name == Artist::UNKNOWN_ARTIST_NAME\n artist.wikilink = ''\n artist.save\n return\n end\n\n # Result is like this:\n search = search_text(artist.name, 1)\n\n if search.length == 0\n artist.wikilink = ''\n else\n artist.wikilink = search[0][1]\n end\n\n download_wiki_image(artist)\n rescue\n Log.log_last_exception(\"Error updating #{artist.to_s}\")\n artist.wikilink = ''\n end\n artist.save\n end",
"def wikipedia_url\n \"http://en.wikipedia.org/wiki/ISO_639:#{iso_639}\"\n end",
"def show\n @wiki = Wiki.find(params[:id])\n end",
"def biography artist\n url = \"http://developer.echonest.com/api/v4/artist/biographies?api_key=#{ECHONEST_API_KEY}&name=#{artist}&format=json\"\nend",
"def show\n @murals = @artist.murals.page(params[:page])\n end",
"def wikisource_url(metadata)\n links = metadata.split(\"\\n\")\n @url = ''\n links.each do |meta|\n if meta.include?('wikisource_url:')\n @url = meta.split('wikisource_url:').last\n end\n end \n return @url\n end",
"def find(phrase, limit=15, snippet=false, display=true)\n search = phrase.split.join(\"_\")\n if snippet\n endpoint = \"https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=#{search}&srlimit=#{limit}\"\n else\n endpoint = \"https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=#{search}&srlimit=#{limit}&srprop\"\n end\n hash = get(endpoint)\n info = hash[\"query\"][\"searchinfo\"]\n results = hash[\"query\"][\"search\"]\n if display\n puts \"Total hits : #{ info[\"totalhits\"] }\"\n if info[\"suggestion\"]\n puts \"Suggestion : #{ info[\"suggestion\"] }\"\n end\n puts \"Displaying #{results.length} results:\"\n results.each do |result|\n # https://stackoverflow.com/a/1732454\n if snippet\n snip = result[\"snippet\"].gsub( /<.*?>/, \"\" ).gsub( /&\\w+;/, \"\" ).split.join(\" \")\n puts \"\\n'#{result[\"title\"]}' : #{snip}...\"\n else\n puts \"\\n'#{result[\"title\"]}'\"\n end\n end\n end\n return hash\n end",
"def get_wikipedia_image_url(wikipedia_url)\n begin\n\n return nil if !wikipedia_url || wikipedia_url.empty?\n\n # Download the wikipedia page\n page = Nokogiri::HTML(open(wikipedia_url))\n\n # Get the image href:\n link = page.css( @settings.image_selector ).first\n return if !link\n image_href = link.attr('href')\n image_href = URI.unescape(image_href)\n # image_href => '/wiki/Archivo:Metallica_at_The_O2_Arena_London_2008.jpg'\n\n # Get the image \"id\":\n slash_idx = image_href.rindex('/')\n return if !slash_idx\n image_id = image_href[ slash_idx + 1 .. -1 ]\n # image_id => 'Archivo:Metallica_at_The_O2_Arena_London_2008.jpg'\n\n # Get the full URL:\n # /w/api.php?action=query&prop=imageinfo&format=json&iiprop=url&titles=Archivo%3AMetallica_at_The_O2_Arena_London_2008.jpg\n image_info = Wikipedia.client.request( {\n action: 'query',\n prop: 'imageinfo',\n iiprop: 'url',\n titles: image_id,\n format: 'json'\n } )\n # result => {\n # \"batchcomplete\": \"\",\n # \"query\": {\n # \"normalized\": [\n # {\n # \"from\": \"Archivo:Metallica_at_The_O2_Arena_London_2008.jpg\",\n # \"to\": \"Archivo:Metallica at The O2 Arena London 2008.jpg\"\n # }\n # ],\n # \"pages\": {\n # \"-1\": {\n # \"ns\": 6,\n # \"title\": \"Archivo:Metallica at The O2 Arena London 2008.jpg\",\n # \"missing\": \"\",\n # \"imagerepository\": \"shared\",\n # \"imageinfo\": [\n # {\n # \"url\": \"https://upload.wikimedia.org/wikipedia/commons/0/07/Metallica_at_The_O2_Arena_London_2008.jpg\",\n # \"descriptionurl\": \"https://commons.wikimedia.org/wiki/File:Metallica_at_The_O2_Arena_London_2008.jpg\"\n # }\n # ]\n # }\n # }\n # }\n # }\n image_info = search = JSON.parse(image_info)\n\n image_url = image_info['query']['pages']['-1']['imageinfo'][0]['url']\n return image_url\n rescue\n Log.log_last_exception\n return nil\n end\n end",
"def search(phrase, limit=5, description=true, display=true)\n search = phrase.split.join(\"_\")\n endpoint = \"https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=#{search}&limit=#{limit}\"\n hash = get(endpoint)\n results = hash[1]\n descriptions = hash[2]\n if display\n puts \"Displaying #{results.length} results:\"\n for i in 0...results.length\n if description\n if ! descriptions[i].empty?\n puts \"\\n'#{results[i]}' : #{descriptions[i]}\"\n else\n puts \"\\n'#{results[i]}' : No Immediate Description Available. Try `wik -d #{results[i]}`\"\n end\n else\n puts \"\\n'#{results[i]}'\"\n end\n end\n end\n return hash\n end",
"def movie_page\r\n\t TopOneHundredMovies::Scraper.new.movie_page(self)\r\n\tend",
"def getLastfmArtistPopularity altnet_name\n url = getLastfmArtistPopularityUrl(altnet_name)\n puts url \n begin\n html = open(url, \"User-Agent\" => getUseragent(), :proxy=>getProxy()) \n document = Hpricot(html)\n #ar = document.search(\"//div[@id='catalogueHead']\");\n ar = document.search(\"//div[@id='catalogueHead']\").search(\"//p[@class='stats']\"); \n return ar\n rescue Exception => e\n puts \"html grab error\"\n return \"\"\n end \n end",
"def artist_show_song\r\n\r\n\t\t#@artist = Artist.find(params[:id])\r\n\t\tsearchString = params[:url_slug]\r\n\t\t@artist = Artist.find_by_url_slug(searchString)\r\n\t\t@song = @artist.song.find.by_url_slug(params[:song_name])\r\n\r\n\t\trespond_to do |format|\r\n\t\t\tformat.html # show.html.erb\r\n\t\t\tformat.xml { render :xml => @artist }\r\n\t\tend\r\n\tend",
"def show\n @wiki_page = MiniWikiPage.find_by_name(params[:wiki_page])\n\n if !@wiki_page.nil?\n # get revision\n if params[:revision]\n @wiki_revision = @wiki_page.mini_wiki_revisions.first(:conditions => [\"revision=?\",params[:revision]])\n end\n \n # if retreive of revision failed or if no revision requested, get the last revision\n if (params[:revision] && @wiki_revision==nil) || !params[:revision]\n @wiki_revision = @wiki_page.mini_wiki_revision\n end\n \n render :template => 'show'\n else\n redirect_to :action => 'new', :name => params[:wiki_page]\n end\n \n end",
"def show\n @wiki = @project.wikis.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @wiki }\n end\n end",
"def get_next_article(url)\n uri = URI(URI::Parser.new.escape(url))\n response = Net::HTTP.get(uri)\n\n doc = Nokogiri::HTML.parse(response)\n\n #article = doc.at('a:contains(\"Article suivant\")')\n article = doc.at('a:contains(\"Nächster Artikel\")')\n article['href']\nend",
"def wiki(project, slug)\n get(\"/projects/#{url_encode project}/wikis/#{slug}\")\n end",
"def show\n respond_to do |format|\n \n format.html # show.html.erb\n format.json { render json: @wiki }\n \n end\n end",
"def getFirst\n first = \"\" \n if (@currentPage.to_i > 2)\n first = \"<a href=\\\"/pubmed/searchPubmed?method=get&term=#{@keywords}&page=1&resultsPerPage=#{@resultsPerPage}\\\" class=\\\"prev_page\\\">| « First</a>\"\n end \n first\n end",
"def get_tracks_url(album)\n tracks_url = ''\n if album.first == 'Twist and Shout' || album.first == 'A Hard Day\\'s Night' || album.first == 'Yellow Submarine'\n tracks_url = \"https://en.wikipedia.org/wiki/#{album.first} (album)\"\n elsif album.first == 'Something New' || album.first == 'Revolver' || album.first == 'Let It Be'\n tracks_url = \"https://en.wikipedia.org/wiki/#{album.first} (Beatles album)\"\n elsif album.first == 'The Beatles (\"The White Album\")'\n tracks_url = \"https://en.wikipedia.org/wiki/The_Beatles_(album)\"\n else\n tracks_url = \"https://en.wikipedia.org/wiki/#{album.first}\"\n end\n return tracks_url\nend",
"def get_info(w)\n\trequire 'open-uri'\n\tparagraph = []\n\tcontents = open('http://en.wikipedia.org/wiki/' + w) {|f| \n\t\tf.readlines.each {|x| \n\t\t\tif x =~ /<p>(.*)<\\/p>/\n\t\t\tparagraph.push($1)\n\t\t\tend\n\t}}\n\n\t# If a file name was passed in to be stored somewhere\n\t# Otherwise, Temp.doc will be created and modified\n\tif(ARGV[0] != nil)\n\t\tfile = File.open(ARGV[0], 'a')\n\telse\n\t\tfile = File.open(\"Temp.doc\", 'a')\n\tend\n\n\t# Writes to file what is being searched for\n\tfile.write(w.upcase + \":\\n\")\n\n\t# Uses regular expression to grab first two paragraph\n\tparagraph.each {|p| paragraph(p,file)}\n\t\n\tfile.write(\"\\n\")\n\tfile.close\nend",
"def artists\n if RESPONSE.code == 200\n # Return data to page\n JSON.parse(RESPONSE.to_s)['topartists']['artist']\n else\n # print error message\n \"Error Code #{RESPONSE.code}\"\n end\n end",
"def artist_details(artist)\n Scraper.scrape_individual_artist(artist) \n\n puts \"\"\n puts \"Here are more details about #{artist.name.bold}.\".black.on_light_white\n puts \"\"\n puts \"Representing Gallery: #{artist.gallery.name} \"\n puts \"\"\n puts \"Artist Bio: #{artist.bio}\"\n puts \"\"\n puts \"About the Artist : #{artist.about_art}\"\n puts \"\"\n\n end",
"def localized_page\n\t\treturn @page if @page\n\t\tl = langtag(I18n.locale)\n\t\t\n\t\tWikipedia.Configure do\n\t\t\tdomain \"#{l}.wikipedia.org\"\n\t\t\tpath \"w/api.php\"\n\t\tend\n\t\tp = page\n\t\tif p == nil || p.content == nil\n\t\t\tlogger.debug \"defaulting to english\"\n\t\t\tWikipedia.Configure do\n\t\t\t\tdomain \"en.wikipedia.org\"\n\t\t\t\tpath \"w/api.php\"\n\t\t\tend\n\t\t\tp = page\n\t\telse\n\t\t\tlogger.debug \"sending translated\"\n\t\tend\n\t\t@page = p\n\t\t@page\n\tend",
"def wikis\n set_attributes_for(Wiki)\n Wiki.find(:all)\n end",
"def htlal_wiki_url\n \"http://learnanylanguage.wikia.com/wiki/#{name.gsub(' ', '_')}\"\n end",
"def searchSpotify(inArtist)\n tArtist = CGI.escape(inArtist)\n \n outstring = open('http://ws.spotify.com/search/1/artist?q='+tArtist, 'User-Agent' => 'Ruby-Wget').read\n\n outdata = outstring.split(\"<opensearch:totalResults>\")\n\n outdata.delete_at(0);\n\n if outdata[0].split(\"</opensearch:totalResults>\")[0].to_i > 0\n outinfo = outstring.split(\"<artist href=\");\n return outinfo[1].split(\">\")[0];\n else\n return 0\n end\n end",
"def artist_social(artist)\n\t #-----------For Artist Meta Tags----------------\n\n\t #Page Title, Facebook Title and Twitter Title\n\t @social_title = artist.name+\" on Three Repeater\"\n\t #Meta description (google), Facebook Description, and Twitter Card Description\n\t @social_descrip = artist.bio\n\n\t #logic around figuring out which facebook url is used\n\t facebook_url(artist)\n\n\t #Twitter ID\n\t @social_twitter_name = artist.twitter_name\n\n\t #Image for twitter and FB\n\t @social_image = artist.logo.to_s\n\n\t #------------------------------------------------\n\n end",
"def title\n @basename.wikify\n end",
"def list_wiki_pages\n results = WikiPage.joins(wiki: :project)\n .where(\"CONCAT_WS(':', `projects`.`name`, `wiki_pages`.`title`) LIKE ? \", \"%#{params[:term]}%\")\n .select('projects.name, wiki_pages.title')\n .limit(10)\n\n render :json => results.map { |x| \"#{x.name}:#{x.title}\" }\n end",
"def terms artist\n url = URI.parse(\"http://developer.echonest.com/api/v4/artist/terms?api_key=#{ECHONEST_API_KEY}&name=#{artist}&format=json\")\nend",
"def index\n @wikis = Wiki.order('created_at DESC').paginate(:page => params[:page])\n end",
"def image\n\t\treturn @wiki_img if @wiki_img\n\t\tlogger.info \"finding picture for #{name}\"\n\t\tWikipedia.Configure do\n\t\t\tdomain \"en.wikipedia.org\"\n\t\t\tpath \"w/api.php\"\n\t\tend\n\t\tp = page\n\t\tif p && p.image_urls && p.image_urls.count > 0\n\t\t\t@wiki_img = p.image_urls.last # last one is the one on the right\n\t\t\tself.picture = @wiki_img\n\t\t\tself.save\n\t\t\t@wiki_img\n\t\telse\n\t\t\tnil\n\t\tend\n\tend",
"def show\n @talk = Talk.find(params[:id])\n @chapters = @talk.chapters.all\n @page_title = \"#{@talk.name}\"\n @meta_data = {:page_title => \"#{@talk.name}\", :og_image => \"#{@talk.banner_src}\", :og_title => \"#{@talk.name} | Chicago Ideas Week\", :og_type => \"article\", :og_desc => (@talk.description) ? \"#{@talk.description[0..200]}\" : \"\"}\n end",
"def get_all_infos page, category\n list_items = page.search('.post')\n\n link = page.uri.to_s\n list_items.each_with_index{|item,index|\n # get all items in page -------------------\n content = item.at('.entry-content a').text\n author = item.at('.entry-author a').text\n record = {\n :category => category,\n :author => author,\n :conent => content\n }\n ScraperWiki.save_sqlite([], record)\n }\nend",
"def get_all_infos page, category\n list_items = page.search('.post')\n\n link = page.uri.to_s\n list_items.each_with_index{|item,index|\n # get all items in page -------------------\n content = item.at('.entry-content a').text\n author = item.at('.entry-author a').text\n record = {\n :category => category,\n :author => author,\n :conent => content\n }\n ScraperWiki.save_sqlite([], record)\n }\nend",
"def get_all_infos page, category\n list_items = page.search('.post')\n\n link = page.uri.to_s\n list_items.each_with_index{|item,index|\n # get all items in page -------------------\n content = item.at('.entry-content a').text\n author = item.at('.entry-author a').text\n record = {\n :category => category,\n :author => author,\n :conent => content\n }\n ScraperWiki.save_sqlite([], record)\n }\nend",
"def get_all_infos page, category\n list_items = page.search('.post')\n\n link = page.uri.to_s\n list_items.each_with_index{|item,index|\n # get all items in page -------------------\n content = item.at('.entry-content a').text\n author = item.at('.entry-author a').text\n record = {\n :category => category,\n :author => author,\n :conent => content\n }\n ScraperWiki.save_sqlite([], record)\n }\nend",
"def show\n @artist = Artist.find(params[:id])\n unless @artist.belongs_to_this_brand?(website)\n redirect_to artists_path and return\n end\n if @artist.featured || @artist.artist_tier.show_on_artist_page?\n respond_to do |format|\n format.html { render_template } # show.html.erb\n # format.xml { render xml: @artist }\n end\n else\n redirect_to all_artists_path(letter: @artist.name.match(/\\w/).to_s.downcase) and return false\n end\n end",
"def index\n search = params[:search].present? ? params[:search] : nil\n\n @artists = if search\n\n # Render search results\n\n Artist.search(params[:search], page: params[:page], per_page: 20)\n\n else\n\n # Render blog articles\n\n Artist.all.order(created_at: :desc).page(params[:page])\n\n end\n end",
"def show\n @sleuths = HTTParty.get('https://webservice.wikipathways.org/findPathwaysByText?query=' + @sleuth.ext_gene + '&species=homo+sapiens&format=json',\n :headers =>{'Content-Type' => 'application/json'} )\n @pubs = HTTParty.get('https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&retmode=json&term='+ @sleuth.ext_gene,\n :headers =>{'Content-Type' => 'application/json'} )\n end",
"def get_art_for_page( rb, tagged, page )\n\n # Get the body of the page of art.\n if tagged then\n verbose( \"Getting page #{page} of your #{$params[ :product ]} tagged with \\\"#{tagged}\\\"\" )\n else\n verbose( \"Getting page #{page} of your #{$params[ :product ]}\" )\n end\n art = grab_art_page( rb, tagged, page )\n\n # Get the works from the body.\n works = art.elements.to_a( \"//span[@class='work-info']\" )\n\n # For each work found...\n works.each do |work|\n # ...emit the basic details for it.\n puts extract_work_id( work.elements.to_a( \"span[@class='title']/a\" ).first.attributes[ \"href\" ] ) +\n \"\\t\" +\n work.elements.to_a( \"span[@class='title']/a\" ).first.attributes[ \"title\" ] +\n \"\\t\" +\n work.elements.to_a( \"a/img\" ).first.attributes[ \"src\" ]\n end\n\n verbose( \"Done.\" )\n \nend",
"def get_wikipedia_image\n respond_to do |format|\n format.js do\n meta = MetaGeneration.new(Setting.get_settings)\n wiki_url = URI.escape(params[:wikipedia_url])\n @wikipedia_image_url = meta.get_wikipedia_image_url(wiki_url)\n end\n end\n end",
"def link_wikipedia(term, desc)\n # query = Rack::Utils.escape(\"site:wikipedia.org #{term}\")\n # href = \"http://google.com/?q=#{query}\"\n term = Rack::Utils.escape(term)\n tag(:a, desc, :href => \"http://en.wikipedia.org/w/#{term}\", :class => 'wiki-link-external')\n end",
"def wiki\n strong_memoize(:wiki) do\n create_wiki_repository\n Gitlab::Git::Wiki.new(repository.raw)\n end\n end",
"def get_weather_page(location)\n\tclient = Weatherman::Client.new\n\tweather_page = client.lookup_by_location(location)\nend",
"def page(photo=nil)\n \"/#{self.username_from_id(self.user_id)}/place/#{self.id}/#{self.title_urlsafe}\" + (photo.nil? ? \"\" : \"?show=#{photo.id}\")\n end",
"def wikipedia_summary(url)\n doc = Nokogiri::HTML(URI.parse(url).open)\n first_para_html = doc.search('//p').first.to_s # .gsub(/<\\/?[^>]*>/, \"\")\n Sanitize.clean(first_para_html)\n rescue Exception\n nil\n end",
"def artists\n link :top_artists, :Artist, country\n end",
"def lastfm_url; \"https://last.fm/music/#{lastfm}\" end",
"def find_article(title)\n path_to_article \"/wiki/Special:Search?search=#{title}\"\n end",
"def show\n @ensembl = HTTParty.get('http://rest.ensembl.org' + '/lookup/id/' + @transplice.gene,\n :headers =>{'Content-Type' => 'application/json'} )\n if @ensembl[\"display_name\"].nil? \n @name = \"1\"\n else\n @name = @ensembl[\"display_name\"]\n\n @wikis = HTTParty.get('https://webservice.wikipathways.org/findPathwaysByText?query=' + @name + '&species=homo+sapiens&format=json',\n :headers =>{'Content-Type' => 'application/json'} )\n\n @pubs = HTTParty.get('https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&retmode=json&term='+ @name,\n :headers =>{'Content-Type' => 'application/json'} )\n \n @omim = HTTParty.get('https://api.omim.org/api/entry/search?search='+ @name+ '&start=0&limit=1&include=text:description&apiKey=6-p06gbQTZiAWNOpPn-CSw&format=xml',:headers =>{'Content-Type' => 'application/xml'} )\n \n \n\n end\nend",
"def index\n @wikis = Wiki.all\n end",
"def wiki\n @wiki ||= Smeagol::Wiki.new(wiki_dir)\n end",
"def wikipedia_summary(url)\n doc = Nokogiri::HTML(open(url))\n first_para_html = doc.search('//p').first.to_s # .gsub(/<\\/?[^>]*>/, \"\")\n return Sanitize.clean(first_para_html)\n rescue Exception\n return nil\n end",
"def show\n @query = params[:id].gsub('+', ' ')\n @autoplay = params[:autoplay]\n \n begin\n @artist = LastfmArtist.new(@query, @lastfm, true)\n rescue\n @artist = nil\n end\n \n unless @artist\n not_found\n end\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @artist }\n end\n end",
"def main_page\n Nokogiri::HTML(open(\"http://mars.jpl.nasa.gov/msl/multimedia/raw/\"))\n end",
"def info\n\t\treturn \"\"\n\t\tp = localized_page\n\t\treturn \"\" unless p && p.content\n\t\tlogger.debug \"parsing page #{p.title}\"\n\t\t\t\n\t\t# extract the top-most section (the one before any ToC)\n\t\tc = WikiCloth::Parser.new({ :data => WikiParser::sanitize(p.content) })\n\t\tc = c.sections.first\n\t\t\n\t\tl = I18n.locale\n\t\tret = WikiParser.new({ :data => c }).to_html\n\t\t#I18n.locale = l\n\t\treturn ret\n\tend",
"def get_info_page_links(page)\n info_links = page.links_with(href: %r{info.html})\n if not info_links\n info_links = page.links_with(href: %r{aboutus.html})\n end\n if not info_links\n info_links = page.links_with(text: '会社概要')\n end\n return info_links\nend",
"def save_page( title )\n base_url='https://en.wikipedia.org/w/index.php?title={title}&action=raw'\n\n ## todo/check: use %20 for encoding space (or +) - why? why not?\n ## https://en.wikipedia.org/w/index.php?title=South%20Georgia%20and%20the%20South%20Sandwich%20Islands&action=raw\n ## https://en.wikipedia.org/w/index.php?title=South+Georgia+and+the+South+Sandwich+Islands&action=raw\n\n ##\n ## URI.encode_www_form_component(string, enc=nil)\n ## This method will percent-encode every reserved character,\n ## leaving only *, -, ., 0-9, A-Z, _, a-z intact.\n ## Note: It also substitues space with +.\n title_encoded = URI.encode_www_form_component( title )\n url = base_url.gsub( '{title}', title_encoded )\n\n path = \"#{title.gsub( ' ', '_' )}.txt\"\n puts \" >#{title}<, >#{title_encoded}< path=>#{path}<, try url=>#{url}<\"\n\n ## note: change path (used for disk cache)!!\n response = Webget.text( url, path: path )\n ## note: exit on get / fetch error - do NOT continue for now - why? why not?\n exit 1 if response.status.nok? ## e.g. HTTP status code != 200\nend",
"def index\n puts \n if MiniWikiPage.first(:conditions => [\"name = ?\", \"HomePage\"]) == nil\n redirect_to :action => 'new', :name => \"HomePage\"\n else\n redirect_to :action => 'show', :wiki_page => \"HomePage\"\n end\n end",
"def trivia_page(selected_movie) \r\n trivia_html = trivia_url(selected_movie)\r\n Nokogiri::HTML(open(trivia_html))\r\n end",
"def index\n @search_url = artists_path\n @search = params[:search].to_s.html_safe\n\n @artists = Artist.page(params[:page])\n\n if @search.present?\n @artists = @artists.search(:name,@search.mb_chars)\n end\n\n if params[:per_page].present?\n @artists = @artists.per(params[:per_page])\n end\n end",
"def search_artist(artist)\n PeopleSearch.search_artist(artist, @api_key, @https)\n end",
"def show\n @artist = @album.artist\n end",
"def director\n document.search(\"h5[text()^='Director'] ~ a\").map { |link| link.innerHTML.strip.imdb_unescape_html } rescue []\n end",
"def initialize(artist, song)\n @provider = URI(\"http://lyrics.wikia.com/api.php?artist=#{sanitize_param artist}&song=#{sanitize_param song}&fmt=realjson\")\n end",
"def get_artist(artist_id)\n query_and_build \"artists/#{artist_id}\"\n end",
"def index\n # @wikis = Wiki.all\n @wikis = Wiki.find_all_by_title('Home')\n @allwikis = Wiki.recent.limit(10) \n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @wikis }\n end\n end",
"def show(name)\n\t\tif [email protected]?\n\t\t\tstatus 500\n\t\t\t@name = \"Wiki directory not found\"\n\t\t\t@error = \"We couldn't find the wiki directory your configuration is pointing to.<br/>Fix that, then come back - we'll be happier then.\"\n\t\t\terb :error500\n\t\telse\n\t\t\tif @page = @wiki.page(name)\n\t\t\t\t# may success come to those who enter here.\n\t\t\t\t@name = @page.name\n\t\t\t\t@content = @page.content\n\t\t\t\terb :show\n\t\t\telse\n\t\t\t\tstatus 404\n\t\t\t\t@newpage = name\n\t\t\t\t@name = \"404: Page not found\"\n\t\t\t\terb :error404\n\t\t\tend\n\t\tend\n\tend",
"def index\n @wikis = Wiki.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @wikis }\n end\n end",
"def wikilink(a)\n return if a.attr('class') == 'new'\n a['title']\nend",
"def show\n @page_title = @tutorial.title\n @seo_keywords = @tutorial.body\n end",
"def getLastFmWebData altnet_name\n #altnet_name = \"Beyoncé\" \n url = getLastFmWebDataUrl(altnet_name)\n #url = \"http://www.google.com\"\n puts url\n #document = Hpricot(open (\"http://www.last.fm/music/\" + url_encoded_string +\"/+similar\", \"User-Agent\" => \"great\", :proxy=>\"http://208.43.250.128:3128/\"))\n document = Hpricot(open(url, \"User-Agent\" => getUseragent(), :proxy=>getProxy()))\n #document = Hpricot(open (url))\n ar = document.search(\"//ul[@class='artistsWithInfo']\");\n #print ar\n if (ar.empty?)\n #puts \"empty\"\n return ar\n end\n \n #puts \"ar:\" + ar.length.to_s\n url = url + \"?page=2\"\n #puts url\n #document = Hpricot(open (url))\n document = Hpricot(open(url, \"User-Agent\" => getUseragent(), :proxy=>getProxy()))\n ar1 = document.search(\"//ul[@class='artistsWithInfo']\");\n #puts \"ar1:\" + ar1.length.to_s\n ar = ar + ar1\n #puts \"ar\" + ar.length.to_s\n \n \n #if ar.empty\n #print ar\n return ar\n end",
"def artistInfo(artist)\n\tartistinfo = HTTParty.get(\"http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=#{artist}&api_key=#{API_KEY}&format=json\")\n\treturn artistinfo\nend",
"def news artist\n url = \"http://developer.echonest.com/api/v4/artist/news?api_key=#{ECHONEST_API_KEY}&format=json&name=#{artist}&results=#{RESULTS}\"\n result = parseURL url\n result[\"response\"][\"total\"]\nend",
"def artists\n link :top_artists, :Artist, name\n end",
"def show\n @story = Story.find_by_permalink(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @story }\n end\n end",
"def page_title\n \t\"PatTalk\"\n end",
"def show\n @musician = Musician.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @musician }\n end\n end",
"def set_wiki\n @wiki = Wiki.find_by_title(params[:id])\n end"
] | [
"0.70357686",
"0.6975741",
"0.6544368",
"0.65220964",
"0.6515432",
"0.6454258",
"0.6341122",
"0.63303185",
"0.6259911",
"0.61806476",
"0.6139568",
"0.60766083",
"0.60484475",
"0.6045439",
"0.60361916",
"0.6025521",
"0.6003011",
"0.59895444",
"0.5968132",
"0.5956807",
"0.59145856",
"0.5905431",
"0.5880213",
"0.5859304",
"0.5854649",
"0.58135384",
"0.57957697",
"0.5726659",
"0.56752187",
"0.56472707",
"0.56356996",
"0.56313354",
"0.5620853",
"0.5613138",
"0.5610421",
"0.55925083",
"0.55878824",
"0.5581973",
"0.5572914",
"0.55446327",
"0.5542775",
"0.5541233",
"0.5533856",
"0.55107063",
"0.5499367",
"0.54861224",
"0.5471133",
"0.5464969",
"0.5452557",
"0.5442222",
"0.54248685",
"0.5420337",
"0.54158074",
"0.5409319",
"0.54065335",
"0.54065335",
"0.54065335",
"0.54065335",
"0.5393415",
"0.5388497",
"0.53809315",
"0.53562075",
"0.5354248",
"0.5350264",
"0.5350084",
"0.5349598",
"0.5345682",
"0.5343768",
"0.53364223",
"0.5335064",
"0.53343517",
"0.5325419",
"0.5316917",
"0.53115916",
"0.5308795",
"0.5307859",
"0.530366",
"0.5302829",
"0.53015155",
"0.52884614",
"0.52767456",
"0.5257895",
"0.52569294",
"0.52444136",
"0.52417547",
"0.5240532",
"0.52334327",
"0.5233333",
"0.5220087",
"0.52197313",
"0.52156717",
"0.52147496",
"0.52146643",
"0.5212827",
"0.5212211",
"0.52026206",
"0.5199104",
"0.51977754",
"0.51957345",
"0.5190334",
"0.51856315"
] | 0.0 | -1 |
Analyses a page and follows it. | def find_page(pname, verify = true)
logger.debug "looking up page: #{pname}"
logger.debug "verify find: #{verify}"
r = Wikipedia.find(pname)
# parse disambiguation meta data
unless is_artist_page? r
logger.debug "check for disambiguation meta data"
# check for {about|A|B|1|C|2...|Z|N} patterns
# where we are intrested in B|1 - Z|N
m = r.content.scan(/\{about\|[\w\s]*((\|[^\}\{\|]*\|[^\}\{\|]*)*)\}/) if r.content
unless m == nil || m.empty? || m.first.empty?
# l = ["B", "1", "C", "2", ... , "Z", "N"]
l = m.first.first[1..-1].split("|")
1.step(l.size-1,2).each do |i|
# check pages "1", "2" .. "N"
p = find_page(l[i])
r = p if p
break
end
end
end
# parse links
logger.debug "follow links (desperate!)" if !is_artist_page?(r) && is_disambiguation_page?(r)
r = follow_links(r) if !is_artist_page?(r) && is_disambiguation_page?(r)
# verify category
(!verify || is_artist_page?(r)) ? r : nil
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def process_page page_url\n page = SuperCrawler::Scrap.new(page_url) # Scrap the current page\n\n current_page_links = page.get_links # Get current page internal links\n new_links = current_page_links - @links # Select new links\n\n new_links.each { |link| @links_queue.push(link) } # Add new links to the queue\n @links += new_links # Add new links to the links list\n @crawl_results << { # Provide current page crawl result as a hash\n url: page.url, # The crawled page\n links: current_page_links, # Its internal links\n assets: page.get_assets # Its assets\n }\n\n SuperCrawler::Render.log_status( page_url, @crawl_results.length, @links.length ) if @option_debug # Display site crawling status\n end",
"def page; end",
"def page; end",
"def page; end",
"def page; end",
"def page; end",
"def page; end",
"def page; end",
"def page; end",
"def page; end",
"def page; end",
"def page; end",
"def page; end",
"def next_page; end",
"def scrapePage\n # expects to be passed in a Watir:Browser object\n # gets the header from the current browser page and records it, the page url and the next page's url to the array\n pageDoc = getPage\n nextPageUrl = getFirstLinkUrl(pageDoc)\n pageEntry = getPageRecord(pageDoc, nextPageUrl)\n recordEntry(pageEntry)\n\n LOGGER.debug(\"Information scraped from: #{pageEntry[:url]}\")\n end",
"def map_words_on_page\n fetcher = FetchUrl.new\n page_content = fetcher.fetch(self[:url]).body\n\n processor = PageProcessor.new\n processor.process_page page_content\n end",
"def post_process(pages)\n end",
"def single_scrape\n next_page()\n save_page()\nend",
"def parse\n super\n if next_page_url\n @doc = get_document(URI(next_page_url))\n self.parse\n end\n self\n end",
"def process(pages)\n robot = Robots.new USER_AGENT\n until pages.nil? or pages.empty?\n newfound_pages = []\n pages.each { |page|\n begin\n if add_to_index?(page) then\n uri = URI.parse(page)\n host = "#{uri.scheme}://#{uri.host}"\n open(page, "User-Agent" => USER_AGENT) { |s|\n (Hpricot(s)/"a").each { |a|\n url = scrub(a.attributes['href'], host)\n newfound_pages << url unless url.nil? or !robot.allowed? url or newfound_pages.include? url\n }\n }\n end\n rescue => e\n print "\\n** Error encountered crawling - #{page} - #{e.to_s}"\n rescue Timeout::Error => e\n print "\\n** Timeout encountered - #{page} - #{e.to_s}"\n end\n }\n pages = newfound_pages\n File.open(LAST_CRAWLED_PAGES, 'w') { |out| YAML.dump(newfound_pages, out) }\n end",
"def run\n reset!\n\n pages.each do |page|\n log.puts\n\n if page.respond_to?(:read)\n html = page.read\n elsif page.respond_to?(:call)\n result = instance_eval(&page)\n\n html = case result\n when String\n result\n else\n @agent.page.body\n end\n else\n begin\n html = fetch(page)\n rescue FetchError => e\n log.puts(e.message.red)\n next\n end\n end\n\n process!(html)\n end\n\n report\n\n selectors_to_review\n end",
"def load(agent, type_id)\n page = ScraperWiki.get_var(PAGE, 0)\n url = SEARCH_BASE + \"?SEARCH=1&run=#{page}&corp_type_id=#{type_id}\"\n puts url\n\n # Finish loading and processing current results\n results_page = agent.get(url)\n reset_error_count()\n load_results(results_page)\n process_results(agent)\n\n # Move on to the next page\n while results_page.link_with(:href => /^search_corps\\.php\\?SEARCH/, :text => /^Next/)\n puts \"Next\"\n page = page + 1\n ScraperWiki.save_var(PAGE, page)\n\n # Load and process results\n results_page = results_page.link_with(:href => /^search_corps\\.php\\?SEARCH/, :text => /^Next/).click\n load_results(results_page)\n process_results(agent)\n end\n\n page = 0 # Reset page to 0\n ScraperWiki.save_var(PAGE, page)\nend",
"def load(agent, type_id)\n page = ScraperWiki.get_var(PAGE, 0)\n url = SEARCH_BASE + \"?SEARCH=1&run=#{page}&corp_type_id=#{type_id}\"\n puts url\n\n # Finish loading and processing current results\n results_page = agent.get(url)\n reset_error_count()\n load_results(results_page)\n process_results(agent)\n\n # Move on to the next page\n while results_page.link_with(:href => /^search_corps\\.php\\?SEARCH/, :text => /^Next/)\n puts \"Next\"\n page = page + 1\n ScraperWiki.save_var(PAGE, page)\n\n # Load and process results\n results_page = results_page.link_with(:href => /^search_corps\\.php\\?SEARCH/, :text => /^Next/).click\n load_results(results_page)\n process_results(agent)\n end\n\n page = 0 # Reset page to 0\n ScraperWiki.save_var(PAGE, page)\nend",
"def links_to_follow(page)\n @page = page # need below, sorry\n links = @focus_crawl_block ? instance_eval(@focus_crawl_block).call(page) : page.links\n links.select { |link| visit_link?(link, page) }.map { |link| link.dup }\n end",
"def links_to_follow(page)\n @page = page # need below, sorry\n links = @focus_crawl_block ? instance_eval(@focus_crawl_block).call(page) : page.links\n links.select { |link| visit_link?(link, page) }.map { |link| link.dup }\n end",
"def process(pages)\n robot = Robots.new USER_AGENT\n until pages.nil? or pages.empty? \n newfound_pages = []\n pages.each { |page|\n begin\n if add_to_index?(page) then \n uri = URI.parse(page)\n host = \"#{uri.scheme}://#{uri.host}\"\n open(page, \"User-Agent\" => USER_AGENT) { |s|\n (Hpricot(s)/\"a\").each { |a| \n url = scrub(a.attributes['href'], host)\n newfound_pages << url unless url.nil? or !robot.allowed? url or newfound_pages.include? url\n }\n } \n end\n rescue => e \n print \"\\n** Error encountered crawling - #{page} - #{e.to_s}\"\n rescue Timeout::Error => e\n print \"\\n** Timeout encountered - #{page} - #{e.to_s}\"\n end\n }\n pages = newfound_pages\n File.open(LAST_CRAWLED_PAGES, 'w') { |out| YAML.dump(newfound_pages, out) }\n end \n end",
"def walk_pages (page)\n\n # extract page content\n if page[:Type] == :Pages\n callback(:begin_page_container, [page])\n res = @xref.object(page[:Resources])\n resources.push res if res\n @xref.object(page[:Kids]).each {|child| walk_pages(@xref.object(child))}\n resources.pop if res\n callback(:end_page_container)\n elsif page[:Type] == :Page\n callback(:begin_page, [page])\n res = @xref.object(page[:Resources])\n resources.push res if res\n walk_resources(current_resources)\n\n if @xref.object(page[:Contents]).kind_of?(Array)\n contents = @xref.object(page[:Contents])\n else\n contents = [page[:Contents]]\n end\n\n fonts = font_hash_from_resources(current_resources)\n\n if page.has_key?(:Contents) and page[:Contents]\n contents.each do |content|\n obj = @xref.object(content)\n content_stream(obj, fonts)\n end \n end\n\n resources.pop if res\n callback(:end_page)\n end\n end",
"def associate_page(page); end",
"def next_page\n end",
"def page\n GitFlow.pager\n yield\n end",
"def next; pager.page(page + 1); end",
"def scrape_and_look_for_next_link(page)\n scrape_table(page.body)\n link = page.link_with(:text => '2')\n if link\n page.form_with(:name => 'aspnetForm') do |f|\n f['__EVENTTARGET'] = 'ctl00$ContentPlaceHolder1$tab21$GVProcesos'\n f['__EVENTARGUMENT'] = 'Page$2'\n page = f.submit()\n p page.body\n end\n scrape_and_look_for_next_link(page)\n end\nend",
"def scrape_and_look_for_next_link(page)\n scrape_table(page.body)\n link = page.link_with(:text => '2')\n if link\n page.form_with(:name => 'aspnetForm') do |f|\n f['__EVENTTARGET'] = 'ctl00$ContentPlaceHolder1$tab21$GVProcesos'\n f['__EVENTARGUMENT'] = 'Page$2'\n page = f.submit()\n p page.body\n end\n scrape_and_look_for_next_link(page)\n end\nend",
"def scrape_and_look_for_next_link(page)\n scrape_table(page.body)\n link = page.link_with(:text => '2')\n if link\n page.form_with(:name => 'aspnetForm') do |f|\n f['__EVENTTARGET'] = 'ctl00$ContentPlaceHolder1$tab21$GVProcesos'\n f['__EVENTARGUMENT'] = 'Page$2'\n page = f.submit()\n p page.body\n end\n scrape_and_look_for_next_link(page)\n end\nend",
"def scrape_and_look_for_next_link(page)\n scrape_table(page.body)\n link = page.link_with(:text => '2')\n if link\n page.form_with(:name => 'aspnetForm') do |f|\n f['__EVENTTARGET'] = 'ctl00$ContentPlaceHolder1$tab21$GVProcesos'\n f['__EVENTARGUMENT'] = 'Page$2'\n page = f.submit()\n p page.body\n end\n scrape_and_look_for_next_link(page)\n end\nend",
"def next_page\n\t\t\tFeed.parse_url(next_page_url,@browser)\n\t\tend",
"def next_page\n @page = info(@page[:next_page])\n end",
"def analyze( res )\n print_debug \"Started for response with request ID: ##{res.request.id}\"\n\n page_data = @page.to_hash\n page_data[:cookies] = find_new( :cookies )\n\n # if the response body is the same as the page body and\n # no new cookies have appeared there's no reason to analyze the page\n if res.body == @page.body && !@updated && @page.url == @parser.url\n print_debug 'Page hasn\\'t changed.'\n return\n end\n\n [ :forms, :links ].each { |type| page_data[type] = find_new( type ) }\n\n if @updated\n page_data[:url] = @parser.url\n page_data[:query_vars] = @parser.link_vars( @parser.url )\n page_data[:code] = res.code\n page_data[:method] = res.request.method.to_s.upcase\n page_data[:body] = res.body\n page_data[:document] = @parser.doc\n page_data[:response_headers] = res.headers_hash\n\n @trainings_per_url[@parser.url] += 1\n\n page = Page.new( page_data )\n Platform::Manager.fingerprint( page ) if Options.fingerprint?\n\n @on_new_page_blocks.each { |block| block.call page }\n\n # feed the page back to the framework\n @framework.push_to_page_queue( page )\n\n @updated = false\n end\n\n print_debug 'Training complete.'\n end",
"def page\n\n end",
"def perform\n if url_needed?\n # We need to follow any redirects from the current url.\n # The final (non-redirected) location will become our URL, and any\n # URLs that redirected along the way (including the first) become our aliases\n # NB Only the original URL is guaranteed not to be redundant, either in another page_ref\n # or an alias. If it's the latter, we capture the alias. If we can't adopt the URL without\n # clashing with another page_ref, we assign it to MercuryResult and Gleaning and give up.\n # Check the header for the url from the server.\n # If it's a string, the header returned a redirect\n # otherwise, it's an HTTP code\n puts \"Checking direct access of PageRef ##{id} at '#{url}'\"\n subject_url = url\n # Loop over the redirects from the link, adding each to the record.\n # Stop when we get to the final page or an error occurs\n while (hr = header_result(subject_url)).is_a?(String) # ...because redirect\n # header_result returns a string for a redirect\n next_url = hr.match(/^http/) ? hr : safe_uri_join(subject_url, hr).to_s # The redirect URL may only be a path\n if !Alias.urleq(subject_url, next_url) && alias_for?(next_url) # Time to give up when the url has been tried (it already appears among the aliases)\n # Report the error arising from direct access\n hr = header_result next_url\n break\n end\n puts \"Redirecting from #{subject_url} to #{next_url}\"\n alias_for subject_url, true\n subject_url = next_url\n end\n accept_attribute :url, subject_url\n hr # Return the last error code\n end\n\n # Now that we have a url, move on to the mercury_result and the gleaning\n mercury_result.ensure_attributes # Block until mercury_result has completed and accepted its attributes\n if mercury_result.good? # All is well\n accept_url mercury_result.url if mercury_result.url_ready?\n if mercury_result.new_aliases_ready? && mercury_result.new_aliases.present?\n new_aliases = mercury_result.new_aliases.collect { |url| Alias.indexing_url url }\n # Create a new alias on this page_ref for every derived alias that isn't already in use\n (new_aliases - aliases.pluck(:url)).each { |new_alias| alias_for new_alias, true }\n end\n elsif mercury_result.bad?\n errors.add :url, \"can\\'t be accessed by Mercury: #{mercury_result.errors[:base]}\"\n end\n self.http_status = mercury_result.http_status\n\n gleaning.ensure_attributes # Block until gleaning has completed and accepted its attributes\n if gleaning.good?\n accept_url gleaning.url if gleaning.url_ready?\n elsif gleaning.bad?\n errors.add :url, \"can\\'t be gleaned: #{gleaning.errors[:base]}\"\n end\n\n if errors[:url].present?\n url_errors = errors[:url].join \"\\n\"\n if relaunch?\n raise url_errors # ...to include the errors and relaunch\n else\n errors.add :base, url_errors # ...to simply include the errors in the record\n end\n end\n\n end",
"def begin; pager.offset page; end",
"def process_page(t, response, count)\n msg = \"[#{\"%.3d\" % count}/#{\"%.3d\" % datastore['MAX_PAGES']}] #{response.code || \"ERR\"} - #{t[:host]} - #{response.request.url}\"\n case response.code\n when 301,302\n if response.headers and response.headers[\"location\"]\n print_status(msg + \" -> \" + response.headers[\"location\"].to_s)\n else\n print_status(msg)\n end\n when 500...599\n print_good(msg)\n when 401\n print_good(msg)\n print_good((\" \" * 24) + \"WWW-Authenticate: #{response.headers['WWW-Authenticate']}\")\n when 200\n print_status(msg)\n when 404\n print_error(msg)\n else\n print_error(msg)\n end\n\n #\n # Process the web page\n #\n uri = URI(response.request.url)\n info = {\n :web_site => t[:site],\n :path => uri.path,\n :query => uri.query,\n :code => response.code,\n :body => response.body,\n :headers => response.headers\n }\n\n if response.headers['content-type']\n info[:ctype] = response.headers['content-type']\n end\n\n # TODO\n #if !page.cookies.empty?\n # info[:cookie] = page.cookies\n #end\n\n if response.headers['authorization']\n info[:auth] = response.headers['authorization']\n end\n\n if response.headers['location']\n info[:location] = response.headers['location']\n end\n\n if response.headers['last-modified']\n info[:mtime] = response.headers['last-modified']\n end\n\n # Report the web page to the database\n report_web_page(info)\n\n # Only process interesting response codes\n return unless [302, 301, 200, 500, 401, 403, 404].include?(response.code)\n\n # Skip certain types of forms right off the bat\n\n # Apache multiview directories\n return if uri.query =~ /^C=[A-Z];O=/ # Apache\n\n forms = []\n form_template = { :web_site => t[:site] }\n\n if form = form_from_url(t[:site], response.request.url)\n forms << form\n end\n\n doc = Nokogiri::HTML(response.body) if response.body rescue nil\n if doc\n doc.css(\"form\").each do |f|\n target = uri\n\n if f['action'] and not f['action'].strip.empty?\n action = f['action']\n\n # Prepend relative URLs with the current directory\n if action[0,1] != \"/\" and action !~ /\\:\\/\\//\n # Extract the base href first\n base = uri.path.gsub(/(.*\\/)[^\\/]+$/, \"\\\\1\")\n doc.css(\"base\").each do |bref|\n if bref['href']\n base = bref['href']\n end\n end\n action = (base + \"/\").sub(/\\/\\/$/, '/') + action\n end\n\n target = to_absolute(URI(action), uri) rescue next\n\n target = URI(target)\n unless target.host == uri.host\n # Replace 127.0.0.1 and non-qualified hostnames with our response.host\n # ex: http://localhost/url OR http://www01/url\n if (target.host.index(\".\").nil? or target.host == \"127.0.0.1\")\n target.host = uri.host\n else\n next\n end\n end\n end\n\n # skip this form if it matches exclusion criteria\n unless target.to_s =~ get_link_filter # TODO will need to filter more than this\n form = {}.merge!(form_template)\n form[:method] = (f['method'] || 'GET').upcase\n form[:query] = target.query.to_s if form[:method] != \"GET\"\n form[:path] = target.path\n form[:params] = []\n f.css('input', 'textarea').each do |inp|\n form[:params] << [inp['name'].to_s, inp['value'] || inp.content || '', { :type => inp['type'].to_s }]\n end\n\n f.css( 'select' ).each do |s|\n value = nil\n\n # iterate over each option to find the default value (if there is a selected one)\n s.children.each do |opt|\n ov = opt['value'] || opt.content\n value = ov if opt['selected']\n end\n\n # set the first one as the default value if we don't already have one\n value ||= s.children.first['value'] || s.children.first.content rescue ''\n\n form[:params] << [ s['name'].to_s, value.to_s, [ :type => 'select'] ]\n end\n\n forms << form\n end\n end\n end\n\n # Report each of the discovered forms\n forms.each do |form|\n next unless form[:method]\n print_status((\" \" * 24) + \"FORM: #{form[:method]} #{form[:path]}\")\n report_web_form(form)\n end\n end",
"def pages; end",
"def goto_page(page)\r\n goto_url full_url(page);\r\n end",
"def visiting(page, url, &block)\n body = fetch(url)\n doc = Nokogiri.parse(body)\n docs.push doc\n node = doc.at_xpath(page.content_xpath) or raise Error, \"Couldn't find content at <#{page.content_xpath}>!\"\n content_html = node.to_html\n content_md5 = Url.md5(content_html)\n if u = Url.where(:url => url).first\n # We've scraped this URL before.\n if u.content_md5 == content_md5\n # The content of this page hasn't changed since we last scraped it,\n # so no need to scrape it again\n logger.info \"(Already scraped <#{url}>, and it hasn't changed since last scrape)\"\n else\n # The content of the page *has* changed since we last scraped it,\n # so just update the signature of the content\n logger.info \"Already scraped <#{url}>, but it's changed since last scrape, so updating md5\"\n yield\n u.content_md5 = content_md5\n u.save!\n end\n else\n logger.info \"Haven't scraped <#{url}> yet, content md5 is #{content_md5}\"\n yield\n # We haven't scraped this URL yet, so add it to the database.\n Url.create!(:url => url, :body => body, :content_md5 => content_md5)\n end\n docs.pop\n rescue Error => e\n logger.error e\n end",
"def next_page\n return nil if @query_str_next_page.empty?\n @url_str = next_url_str\n @page = InWebPage.new(@url_str)\n @page_count += 1\n\n # Prepare for getting the page which follows.\n @doc = REXML::Document.new(@page.to_s)\n @query_str_next_page = ''\n @doc.root.elements.each(XPATH_NEXT_PAGE){|e| @query_str_next_page = \"resumptionToken=#{e.text}\"}\n true\n end",
"def get_next_page page\n link = page.search('.nextpostslink').first\n\n begin\n unless link[:href].nil? \n return @agent.get(link[:href])\n end\n rescue\n end\n\n return nil\nend",
"def get_next_page page\n link = page.search('.nextpostslink').first\n\n begin\n unless link[:href].nil? \n return @agent.get(link[:href])\n end\n rescue\n end\n\n return nil\nend",
"def get_next_page page\n link = page.search('.nextpostslink').first\n\n begin\n unless link[:href].nil? \n return @agent.get(link[:href])\n end\n rescue\n end\n\n return nil\nend",
"def get_next_page page\n link = page.search('.nextpostslink').first\n\n begin\n unless link[:href].nil? \n return @agent.get(link[:href])\n end\n rescue\n end\n\n return nil\nend",
"def process(page, depth)\n return if page.nil? || depth >= @params.fetch(:crawling_depth, CONFIG[:crawling_depth])\n get_sub_pages(page, :agent => @agent).each do |sub_page|\n begin\n process(sub_page, depth + 1)\n sleep(1)\n rescue Mechanize::UnsupportedSchemeError => _\n $stderr.puts 'Error: Found link with unsupported scheme, trying another'\n rescue Mechanize::ResponseCodeError => err\n $stderr.puts \"Error: #{err.message}\"\n end\n\n end\n log(page)\n end",
"def perform\n if perform_crawl?\n if get_page\n store_page\n normalize_links\n filter_links\n continue_crawl\n end\n else\n # puts \"Depth limit reached for #{@url}\"\n end\n end",
"def continue_crawl\n # puts \"I am on #{@url} (#{@links.size} links)-> I want to navigate to #{@links.map{|l| l['href']}}\" #links - Array\n\n @links.each_with_index do |link, i|\n href = link[\"href\"]\n next if href.blank? or (href.split('/').last && href.split('/').last.starts_with?(\"#\"))\n if not href.starts_with?(\"htt\")\n href = href[1..-1] if href.starts_with?('/')\n href = @stored_page.domain + '/' + href\n end\n if page_found = Page.find_by_address_and_crawler_id(href, @crwlr.id)\n #puts \"Loop for #{href}\"\n if @stored_page #Page\n @stored_page.pages << page_found\n end\n else\n #puts \"Adding job for CID: #{@crwlr.id} HREF: #{href} SPID: #{@stored_page.id} #{} #{} #{}\"\n @stack.enqueue Crawl.new(@crwlr.id, href, @depth+1, @stack, @stored_page.id, @options)\n end\n end\n end",
"def links_to_follow(page)\n links = @focus_crawl_block ? @focus_crawl_block.call(page) : page.links\n links.select { |link| visit_link?(link, page) }\n end",
"def get_next_page(page)\n\n # Todo: Put your code here to get the next page to be scraped\n\n next_page_condition = page.search('input[id$=nextPageHyperLink]')\n\n if !next_page_condition.empty? \n\n link = get_next_url()\n\n page = @agent.get(link)\n\n return page\n\n else\n\n return nil\n\n end\n\nend",
"def get_next_page(page)\n\n # Todo: Put your code here to get the next page to be scraped\n\n next_page_condition = page.search('input[id$=nextPageHyperLink]')\n\n if !next_page_condition.empty? \n\n link = get_next_url()\n\n page = @agent.get(link)\n\n return page\n\n else\n\n return nil\n\n end\n\nend",
"def on(page, &block)\n yield page\n end",
"def crawl\n # TODO flush the page cache. We cache the crawled pages.\n begin\n account_detail_page #This will get us as far as we want to go, through several pages\n rescue *ERRORS_TO_RESCUE_FROM => e\n errors[:message] = e.message\n errors[:page_url] = e.page.uri\n errors[:page_body] = e.page.body\n return nil\n end\n end",
"def next_page!\n return unless next_page?\n @page += 1\n clear!\n end",
"def get_next_page\n nextlink = @doc.search(\"//p[@class='nextprev']/a[@rel='nofollow next']\")\n nextlink.map! { |link| \"#{link['href']}\" }\n stringlink = nextlink[0]\n @doc = open(stringlink) { |f| Hpricot(f) }\n get_links\n end",
"def get_next_page(page)\n # Todo: Put your code here to get the next page to be scraped\n if has_next_page(page)\n next_page_condition = page.at('input[id$=nextPageHyperLink]')\n link = get_next_url()\n \n page = @agent.get(link)\n return page\n else\n return nil\n end\nend",
"def get_next_page(page)\n # Todo: Put your code here to get the next page to be scraped\n if has_next_page(page)\n next_page_condition = page.at('input[id$=nextPageHyperLink]')\n link = get_next_url()\n \n page = @agent.get(link)\n return page\n else\n return nil\n end\nend",
"def perform\n self.err_msg = ''\n self.http_status = 200\n begin\n self.results = FinderServices.glean page_ref.url, page_ref.site\n rescue Exception => msg\n breakdown = FinderServices.err_breakdown page_ref.url, msg\n self.err_msg = breakdown[:msg] + msg.backtrace.join(\"\\n\")\n self.http_status = breakdown[:status]\n errors.add :url, breakdown[:msg]\n exc = Exception.new breakdown[:msg]\n exc.set_backtrace msg.backtrace\n raise exc # msg, breakdown[:msg] if dj\n end\n end",
"def after_fetch response, page\n end",
"def next_page\n if next_page?\n @query[:startPage] += 1\n fetch\n end\n end",
"def next_page\n string = QJ.next_string()\n url = BSU + string\n BR.goto(url)\nend",
"def execute(msg, page)\n page.spacify!\n is_redir = wiki.page_redirect?(page)\n link = ISGD.shorten(\"http://ftb.gamepedia.com/#{page.underscorify}\")\n if is_redir.nil?\n msg.reply(\"#{page} does not exist on FTB Gamepedia.\")\n elsif is_redir\n msg.reply(\"#{page} exists on the wiki as a redirect: #{link}\")\n elsif !is_redir\n msg.reply(\"#{page} exists: #{link}\")\n end\n end",
"def find_page_end\n \n end",
"def visit_page(page_class, params={:using_params => {}}, &block)\n on_page page_class, params, true, &block\n end",
"def on(page, & block)\n yield page\n end",
"def each_page(&block); end",
"def next_page; link 'next' end",
"def visited_page(url); end",
"def visited_page(url); end",
"def crawler_process_page(t, page, cnt)\n msg = \"[#{\"%.5d\" % cnt}/#{\"%.5d\" % max_page_count}] #{page.code || \"ERR\"} - #{t[:vhost]} - #{page.url}\"\n case page.code\n when 301,302\n if page.headers and page.headers[\"location\"]\n print_status(msg + \" -> \" + page.headers[\"location\"].to_s)\n else\n print_status(msg)\n end\n when 500...599\n # XXX: Log the fact that we hit an error page\n print_good(msg)\n when 401,403\n print_good(msg)\n when 200\n print_status(msg)\n when 404\n print_error(msg)\n else\n print_error(msg)\n end\n\n #\n # Process the web page\n #\n\n info = {\n :web_site => t[:site],\n :path => page.url.path,\n :query => page.url.query,\n :code => page.code,\n :body => page.body,\n :headers => page.headers\n }\n\n if page.headers['content-type']\n info[:ctype] = page.headers['content-type']\n end\n\n if !page.cookies.empty?\n info[:cookie] = page.cookies\n end\n\n if page.headers['authorization']\n info[:auth] = page.headers['authorization']\n end\n\n if page.headers['location']\n info[:location] = page.headers['location']\n end\n\n if page.headers['last-modified']\n info[:mtime] = page.headers['last-modified']\n end\n\n # Report the web page to the database\n report_web_page(info)\n\n # Only process interesting response codes\n return if not [302, 301, 200, 500, 401, 403, 404].include?(page.code)\n\n #\n # Skip certain types of forms right off the bat\n #\n\n # Apache multiview directories\n return if page.url.query =~ /^C=[A-Z];O=/ # Apache\n\n forms = []\n form_template = { :web_site => t[:site] }\n\n if form = form_from_url( t[:site], page.url )\n forms << form\n end\n\n if page.doc\n page.doc.css(\"form\").each do |f|\n\n target = page.url\n\n if f['action'] and not f['action'].strip.empty?\n action = f['action']\n\n # Prepend relative URLs with the current directory\n if action[0,1] != \"/\" and action !~ /\\:\\/\\//\n # Extract the base href first\n base = target.path.gsub(/(.*\\/)[^\\/]+$/, \"\\\\1\")\n page.doc.css(\"base\").each do |bref|\n if bref['href']\n base = bref['href']\n end\n end\n action = (base + \"/\").sub(/\\/\\/$/, '/') + action\n end\n\n target = page.to_absolute(URI( action )) rescue next\n\n if not page.in_domain?(target)\n # Replace 127.0.0.1 and non-qualified hostnames with our page.host\n # ex: http://localhost/url OR http://www01/url\n target_uri = URI(target.to_s)\n if (target_uri.host.index(\".\").nil? or target_uri.host == \"127.0.0.1\")\n target_uri.host = page.url.host\n target = target_uri\n else\n next\n end\n end\n end\n\n # skip this form if it matches exclusion criteria\n if !(target.to_s =~ get_link_filter)\n form = {}.merge!(form_template)\n form[:method] = (f['method'] || 'GET').upcase\n form[:query] = target.query.to_s if form[:method] != \"GET\"\n form[:path] = target.path\n form[:params] = []\n f.css('input', 'textarea').each do |inp|\n form[:params] << [inp['name'].to_s, inp['value'] || inp.content || '', { :type => inp['type'].to_s }]\n end\n\n f.css( 'select' ).each do |s|\n value = nil\n\n # iterate over each option to find the default value (if there is a selected one)\n s.children.each do |opt|\n ov = opt['value'] || opt.content\n value = ov if opt['selected']\n end\n\n # set the first one as the default value if we don't already have one\n value ||= s.children.first['value'] || s.children.first.content rescue ''\n\n form[:params] << [ s['name'].to_s, value.to_s, [ :type => 'select'] ]\n end\n\n forms << form\n end\n end\n end\n\n # Report each of the discovered forms\n forms.each do |form|\n next if not form[:method]\n print_status((\" \" * 24) + \"FORM: #{form[:method]} #{form[:path]}\")\n report_web_form(form)\n self.form_count += 1\n end\n\n @for_each_page_blocks.each { |p| p.call( page ) }\n end",
"def update_page\n if Input.trigger?(Key_nextpage)\n next_page\n elsif Input.trigger?(Key_lastpage) && @page_index > 0\n last_page\n end\n end",
"def pages\n end",
"def page (page_class, link, post={}, &block)\n return if link.nil?\n link = [link] unless link.respond_to?(:to_ary)\n block ||= lambda {|data| data}\n result = nil\n\n link.each do |u|\n fetch(u, post) do |res|\n result = page_class.extract(res.body, u, self, &block)\n end\n end\n\n result\n end",
"def next_page\n @page.link_with(:text => /Next/)\n end",
"def add_page(page, links)\n links[page].each do |page_data|\n next if page_data[0] != :inputs\n @text_file.puts \"\\\"#{page}\\\" -> \\\"#{page_data[1] + calc_input_amount(links, page)}\"\n end\n end",
"def follow_links(p)\n\t\tif p.links\n\t\t\tp.links.each do |l|\n\t\t\t\tnext if @visited_pages.include? l\n\t\t\t\t\n\t\t\t\tlp = Wikipedia.find(l)\n\t\t\t\tif lp.is_a? Array\n\t\t\t\t\tlp.each do |lp_i|\n\t\t\t\t\t\tlogger.debug \"following to: #{lp_i.title}\"\n\t\t\t\t\t\tif is_artist_page? lp_i\n\t\t\t\t\t\t\tp = lp_i\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tend\n\t\t\t\t\tend\n\t\t\t\telsif not is_artist_page? p\n\t\t\t\t\tif is_artist_page? lp\n\t\t\t\t\t\tp = lp\n\t\t\t\t\t\tbreak\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\tp\n\tend",
"def page_counter\n @counter+=1\n puts \"Page #{@counter} done\"\n get_next_page until @counter >= @pages\n end",
"def next\n goto(@current_page + 1)\n end",
"def next_page\n set RGhost::Cursor.next_page\n end",
"def link_to_next_page(page)\n a = page.search(PAGER_NEXT_SELECTOR).first\n return unless a\n path = a.attribute('href').value.strip\n URI.join(WEBSITE_URL, path).to_s\n end",
"def page; self end",
"def count_link_of_one_page(page)\n perform_search_for_single_page('//a', [], page)\n end",
"def next_page!\n next_page.tap { |page| update_self(page) }\n end",
"def process_url(url)\n begin\n\n # the following scans\n url_kind_normalized = is_valid_url(url, nil)\n url_kind = url_kind_normalized[0]\n url = url_kind_normalized[1] ## normalized i.e. canonical format\n\n unless [:ref_static_content, :not_valid_url].include?(url_kind)\n if ::Crawl::Db::SiteMap.internal_links[url] || ::Crawl::Db::SiteMap.non_internal_links[url] || should_skip(url)\n # already scanned, we could bump the count if needed\n # if skip just skip!\n else\n # scan it and all its nested pages\n navigate_to_url_and_validate_that_url_was_found( url )\n page_content = browser.html\n @@page_scanner.scan_content(page_content, url)\n end\n end\n\n rescue StandardError => err\n puts \"Err: on url #{url} received: #{err}\"\n end\n\n end",
"def c_page(n)\n BestiaryConfig::PAGEFX.play\n self.index += n\n end",
"def process_link(link, dir, spamCalc, index)\n page = retrieve_page(link)\n if page\n fileName = index.to_s + '.html'\n path = File.join(dir, fileName)\n page.save(path.to_s)\n scoreAndFilename = []\n score = spamCalc.evaluate_document(page.body)\n scoreAndFilename.push(score)\n scoreAndFilename.push(fileName)\n $index[link] = scoreAndFilename\n return [page, score]\n else\n return nil\n end\nend",
"def page(agent, page)\n url = \"https://www.planningportal.nsw.gov.au/planning-panel?field_status_value=2&page=#{page}\"\n\n page = agent.get(url)\n block = page.at(\".page__content .grid__row\")\n return 0 if block.nil?\n urls = block.element_children.map do |application|\n (page.uri + application.at('a')[\"href\"]).to_s\n end\n\n urls.each do |url|\n page = agent.get(url)\n v = page.at(\".project__details\").search(\".row\").map do |row|\n label = row.at(\"b\").inner_text.squish\n value = row.at(\"div\").inner_text.squish\n [label, value]\n end\n fields = Hash[v]\n\n yield(\n \"council_reference\" => fields[\"Planning panel reference number\"],\n \"address\" => fields[\"Project Address\"] + \", NSW\",\n \"description\" => page.at(\".field-field-project-description\").inner_text.squish,\n \"info_url\" => url,\n \"date_scraped\" => Date.today.to_s,\n \"date_received\" => convert_date(fields[\"Referral date\"])\n )\n end\n\n # Return number of applications found\n urls.count\nend",
"def scrape_and_look_for_next_link(url)\n page = Nokogiri::HTML(open(url))\n scrape_table(page)\n if page.css(\"p.stdPager a\").last.content.include? \"Succ\"\n next_link = page.css(\"p.stdPager a\").last[\"href\"]\n end\n if next_link \n puts \"next link= \" + next_link\n next_url = DOMAIN + next_link\n puts next_url\n scrape_and_look_for_next_link(next_url)\n end\nend",
"def scrape_and_look_for_next_link(url)\n page = Nokogiri::HTML(open(url))\n scrape_table(page)\n if page.css(\"p.stdPager a\").last.content.include? \"Succ\"\n next_link = page.css(\"p.stdPager a\").last[\"href\"]\n end\n if next_link \n puts \"next link= \" + next_link\n next_url = DOMAIN + next_link\n puts next_url\n scrape_and_look_for_next_link(next_url)\n end\nend",
"def scrape_and_look_for_next_link(url)\n page = Nokogiri::HTML(open(url))\n scrape_table(page)\n if page.css(\"p.stdPager a\").last.content.include? \"Succ\"\n next_link = page.css(\"p.stdPager a\").last[\"href\"]\n end\n if next_link \n puts \"next link= \" + next_link\n next_url = DOMAIN + next_link\n puts next_url\n scrape_and_look_for_next_link(next_url)\n end\nend",
"def scrape_and_look_for_next_link(url)\n page = Nokogiri::HTML(open(url))\n scrape_table(page)\n if page.css(\"p.stdPager a\").last.content.include? \"Succ\"\n next_link = page.css(\"p.stdPager a\").last[\"href\"]\n end\n if next_link \n puts \"next link= \" + next_link\n next_url = DOMAIN + next_link\n puts next_url\n scrape_and_look_for_next_link(next_url)\n end\nend",
"def scrape_page(page)\n page.parser.css('tr').each do |tr|\n a = tr.at_css('a')\n find_or_create_by_number(a.text, detail_url: BASE_URL + a[:href]) if a\n end\n\n if page.parser.at_css('#ctl00_btnNext')\n form = page.forms.first\n form['__EVENTTARGET'] = 'ctl00$btnNext'\n scrape_page form.submit\n end\n end",
"def go_to_page(k)\n @page_number = k\n state.page = state.pages[k - 1]\n generate_margin_box\n @y = @bounding_box.absolute_top\n end",
"def page_load; end",
"def record_page(page)\n\t\t\t\turl = page.uri.to_s\n\t\t\t\trecord(url, content: page.content)\n\t\t\tend",
"def pa_request(*args)\n bp_request\n @page_number = convert_expression(@page_number, args, \"page number\") - 1 # Becaue it will be incremented\n end"
] | [
"0.6628545",
"0.64224017",
"0.64224017",
"0.64224017",
"0.64224017",
"0.64224017",
"0.64224017",
"0.64224017",
"0.64224017",
"0.64224017",
"0.64224017",
"0.64224017",
"0.64224017",
"0.640375",
"0.6391581",
"0.6372903",
"0.6322593",
"0.6268057",
"0.626681",
"0.6244792",
"0.62360674",
"0.6186995",
"0.6186995",
"0.61702454",
"0.61702454",
"0.6164662",
"0.61306447",
"0.613056",
"0.6125788",
"0.61137617",
"0.6099808",
"0.6098835",
"0.6098835",
"0.6097675",
"0.6097675",
"0.60943484",
"0.6063818",
"0.60481906",
"0.60474586",
"0.6027426",
"0.60236716",
"0.6004307",
"0.59954995",
"0.59447503",
"0.5941269",
"0.5935521",
"0.5930417",
"0.5930417",
"0.5930417",
"0.5930417",
"0.59250957",
"0.5923832",
"0.59208065",
"0.5913043",
"0.590397",
"0.590397",
"0.5903214",
"0.58979857",
"0.58951586",
"0.5892736",
"0.58863443",
"0.58863443",
"0.5885648",
"0.5868429",
"0.58569854",
"0.58502483",
"0.5833316",
"0.5824182",
"0.58170235",
"0.580385",
"0.57888746",
"0.57689434",
"0.5758449",
"0.5758449",
"0.57514256",
"0.57501197",
"0.57409203",
"0.57375103",
"0.5726984",
"0.57269835",
"0.5721339",
"0.57183605",
"0.5700668",
"0.5696892",
"0.5696492",
"0.5691015",
"0.56868523",
"0.56841683",
"0.5683566",
"0.56806284",
"0.56780237",
"0.56771535",
"0.5676252",
"0.5675696",
"0.5675696",
"0.5675696",
"0.5669912",
"0.56693316",
"0.5640175",
"0.5638245",
"0.5625195"
] | 0.0 | -1 |
Follows a page's links in the hunt for an artist page. | def follow_links(p)
if p.links
p.links.each do |l|
next if @visited_pages.include? l
lp = Wikipedia.find(l)
if lp.is_a? Array
lp.each do |lp_i|
logger.debug "following to: #{lp_i.title}"
if is_artist_page? lp_i
p = lp_i
break
end
end
elsif not is_artist_page? p
if is_artist_page? lp
p = lp
break
end
end
end
end
p
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def links_to_follow(page)\n @page = page # need below, sorry\n links = @focus_crawl_block ? instance_eval(@focus_crawl_block).call(page) : page.links\n links.select { |link| visit_link?(link, page) }.map { |link| link.dup }\n end",
"def links_to_follow(page)\n @page = page # need below, sorry\n links = @focus_crawl_block ? instance_eval(@focus_crawl_block).call(page) : page.links\n links.select { |link| visit_link?(link, page) }.map { |link| link.dup }\n end",
"def links_to_follow(page)\n links = @focus_crawl_block ? @focus_crawl_block.call(page) : page.links\n links.select { |link| visit_link?(link, page) }\n end",
"def links_to_follow(page)\n links = @focus_crawl_block ? @focus_crawl_block.call(page) : page.links\n links.select { |link| visit_link?(link, page) }.map { |link| link.dup }\n end",
"def links_to_follow(page)\n links = @focus_crawl_block ? @focus_crawl_block.call(page) : page.links\n links.select { |link| visit_link?(link, page) }.map { |link| link.dup }\n end",
"def follow\n\n end",
"def follow_redirect=(follow); end",
"def i_follow(link)\n link = case link\n when String\n link\n when Tag\n link[:href]\n when ::Waw::ActionController::Action\n link.href\n else\n raise ArgumentError, \"Unable to apply i_follow to #{link.inspect}\"\n end\n i_reach(link)\n end",
"def follow_redirection(&block); end",
"def next_follow\n end",
"def follow_redirect!(**args); end",
"def follow(link_text)\n Praline::browser.find_element(:link, link_text).click\n end",
"def autofollow\n find_current_blog\n @browser.goto $root+'/blog/'+ @blogname +'/followers'\n if @browser.button(:class => \"chrome blue big follow_button\").exists?\n follow_links = @browser.buttons(:class => \"follow_button\")\n end\n follow_links.each { |follow_button| follow_button.click } if follow_links\n sleep 2\n end",
"def follow(user)\n client.search(\"#bonjour_monde\", result_type: \"recent\").take(20).collect.each {|name| client.follow(name.user.screen_name)}\nend",
"def follow_links(url_arr)\n url_arr.each do |link|\n search = Settings::ProgramSettings.new.parse(link, 'html', 0)\n data = URI.extract(search, %w(http https))\n data.each do |url|\n FORMAT.info(\"Found redirect: #{url}\")\n File.open(\"#{PATH}/tmp/blackwidow_log.txt\", \"a+\") { |to_search| to_search.write(url + \"\\n\") }\n sleep(0.2)\n end\n end\n end",
"def follow_button\n view_renderer.follow_tag_link(@target)\n end",
"def artists\n link :top_artists, :Artist, name\n end",
"def follow\n\t\t@most_active_users.each do |user|\n\t\t\tpath = \"https://github.com/%s/followers\" % [user]\n\t\t\tnavigate(path)\n\n\t\t\tDEFAULT_NUMBER_PAGES.times do |page|\n\t\t\t\tfollow_button = find_many_elements_by_xpath(@follow_xpath)\n\t\t\t\tfollow_button.each { |follow_element| follow_element.submit; sleep 1 }\n\n\t\t\t\tnext_button = find_by_link_text('Next')\n\t\t\t\tnext_button.nil? ? break : next_button.click\n\t\t\tend\n\t\tend\n\tend",
"def follow(listing)\n followed_listings << listing\n end",
"def followed(artist)\n follows.where(artist_id: artist.id).first\n end",
"def follow_symlinks; end",
"def follow_get_redirection(&block); end",
"def follow_steve\n return if username == \"steve\"\n steve = Hacker.first(:username => 'steve')\n return if steve.nil?\n\n follow! steve\n steve.follow! self\n end",
"def follow_redirect?; end",
"def follow_redirections\n self.url = self.add_scheme(decoded_uri(self.url.strip))\n attempts = 0\n code = '301'\n path = []\n\n while attempts < 5 && %w(301 302).include?(code) && !path.include?(self.url)\n attempts += 1\n path << self.url\n response = self.request_media_url\n code = response.code\n self.set_url_from_location(response, path)\n end\n end",
"def follow_many(targets, scrollback: 30)\n targets.map { |target| follow(target, scrollback: scrollback) }\n end",
"def artists\n link :top_artists, :Artist, country\n end",
"def follow_symlinks=(_arg0); end",
"def artist_social(artist)\n\t #-----------For Artist Meta Tags----------------\n\n\t #Page Title, Facebook Title and Twitter Title\n\t @social_title = artist.name+\" on Three Repeater\"\n\t #Meta description (google), Facebook Description, and Twitter Card Description\n\t @social_descrip = artist.bio\n\n\t #logic around figuring out which facebook url is used\n\t facebook_url(artist)\n\n\t #Twitter ID\n\t @social_twitter_name = artist.twitter_name\n\n\t #Image for twitter and FB\n\t @social_image = artist.logo.to_s\n\n\t #------------------------------------------------\n\n end",
"def follow_redirect\n get extract_redirection_url\n end",
"def click(link); end",
"def goto_weblog(page)\n #generally speaking, we want to goto \"http://[username].xanga.com/\n\n page = @agent.click page.links.href(\"http://#{@user}.xanga.com/\").first\n end",
"def follow_by_uri(uri)\n perform_request_with_object(:post,\n '/api/v1/follows', { uri: uri },\n Mastodon::Account)\n end",
"def get_next_article(url)\n uri = URI(URI::Parser.new.escape(url))\n response = Net::HTTP.get(uri)\n\n doc = Nokogiri::HTML.parse(response)\n\n #article = doc.at('a:contains(\"Article suivant\")')\n article = doc.at('a:contains(\"Nächster Artikel\")')\n article['href']\nend",
"def link_scrap(page)\n webpage = Nokogiri::HTML(open(page_params))\n webpage.css('a').each do |link| \n @link_obj = Link.new(text: link.text.strip, href: link['href'])\n page.links << @link_obj\n end\n end",
"def get_next_target(page)\n start_link = page.index('<a href=')#found position 10\n\n if start_link == nil\n return nil, -1\n else\n start_link\n\n start_quote = page.index('\"', start_link)#found position 18\n end_quote = page.index('\"', start_quote + 1)#found position 37\n url = page[start_quote +1...end_quote]\n return url, end_quote\n end\nend",
"def artists(options={})\n call_pageable('library.getartists', :artists, Artist, {:user => @user.name}.merge(options))\n end",
"def follows\n @follows ||= refresh_follows\n end",
"def next__clicked(*argv)\t\t\t\t\n\t\tif (@@page == @@json_titles.length && @@load_favs == 1) # if nothing on next or previous page, do nothing\n\t\telse\t\t\n\t\t\t@@page = @@page + 8\n\t\t\trefresh_links()\n\t\t\tif @@load_favs != 0\t\n\t\t\t\tshow_favs()\n\t\t\tend\n\t\tend\n\tend",
"def follow_meta_refresh=(follow); end",
"def follow(other)\n following << other\n other.followers << self\n end",
"def follow_steve\n return if username == \"steve\"\n steve = User.first(:username => 'steve')\n return if steve.nil?\n\n follow! steve\n steve.follow! self\n end",
"def get_info_page_links(page)\n info_links = page.links_with(href: %r{info.html})\n if not info_links\n info_links = page.links_with(href: %r{aboutus.html})\n end\n if not info_links\n info_links = page.links_with(text: '会社概要')\n end\n return info_links\nend",
"def follow(*followees)\n perform_followable_action(:follow, followees)\n end",
"def convert_track_page_to_mp3_links(url)\n doc = Nokogiri.parse( open(url, \"rb\", 'User-Agent' => @user_agent).read )\n li_mirrors = doc.css(\"#panel-download > div:nth-child(1) > ul:nth-child(4) > li\")\n download_links = li_mirrors.collect {|li| li.css(\"a\").first[\"href\"] }\n end",
"def get_urls(target)\n trail_urls = []\n i = 24\n while i < 162\n search_page_hike_url = target[i].to_s\n search_page_hike_url = search_page_hike_url.gsub(\"&\", \"&\")\n search_page_hike_url = search_page_hike_url.gsub(/\\<a href=\"/, \"\")\n search_page_hike_url = search_page_hike_url.gsub(/\" .*/, \"\")\n trail_urls << search_page_hike_url\n i+=1\n end\n trail_urls\nend",
"def followers\n @title = 'Followers'\n @users = @user.followers.page(params[:page])\n render 'show_follow'\n end",
"def get_next_page\n nextlink = @doc.search(\"//p[@class='nextprev']/a[@rel='nofollow next']\")\n nextlink.map! { |link| \"#{link['href']}\" }\n stringlink = nextlink[0]\n @doc = open(stringlink) { |f| Hpricot(f) }\n get_links\n end",
"def followers\n scrape_for(:followers, :get_followers)\n end",
"def follow_redirections\n self.url = RequestHelper.add_scheme(RequestHelper.decode_uri(self.url.strip))\n attempts = 0\n code = '301'\n path = []\n\n while attempts < 5 && RequestHelper::REDIRECT_HTTP_CODES.include?(code) && !path.include?(self.url)\n attempts += 1\n path << self.url\n response = self.request_media_url(self.url)\n code = response.code\n\n if RequestHelper::REDIRECT_HTTP_CODES.include?(code)\n redirect_url = self.url_from_location(response, path)\n self.url = redirect_url if redirect_url\n end\n end\n end",
"def follow(target)\n link = self.user_follows.where(\"following_id = ?\",target.id).first\n if link == nil\n imperative_follow(target)\n end\n true\n end",
"def follow_meta_refresh_self=(follow); end",
"def follow!( follow_nick, follow_address, password )\n follow follow_nick, follow_address\n push password\n end",
"def execute(msg, page)\n page.spacify!\n is_redir = wiki.page_redirect?(page)\n link = ISGD.shorten(\"http://ftb.gamepedia.com/#{page.underscorify}\")\n if is_redir.nil?\n msg.reply(\"#{page} does not exist on FTB Gamepedia.\")\n elsif is_redir\n msg.reply(\"#{page} exists on the wiki as a redirect: #{link}\")\n elsif !is_redir\n msg.reply(\"#{page} exists: #{link}\")\n end\n end",
"def method_missing(method, *args, &block)\n if method.to_s =~ /^(.*)\\?$/\n return !self.send($1.to_s).nil?\n elsif link = self.link_for_rel(method.to_s)\n self.follow(link, args.first)\n else\n super\n end\n end",
"def followers(action=nil)\n my.followers(action)\n end",
"def artist_details(artist)\n Scraper.scrape_individual_artist(artist) \n\n puts \"\"\n puts \"Here are more details about #{artist.name.bold}.\".black.on_light_white\n puts \"\"\n puts \"Representing Gallery: #{artist.gallery.name} \"\n puts \"\"\n puts \"Artist Bio: #{artist.bio}\"\n puts \"\"\n puts \"About the Artist : #{artist.about_art}\"\n puts \"\"\n\n end",
"def next_page; link 'next' end",
"def count_link_of_one_page(page)\n perform_search_for_single_page('//a', [], page)\n end",
"def follow(user)\n user.followers << self\n self\n end",
"def links_feed\n end",
"def scrape_page_for_links(page)\n page_dom = Nokogiri::HTML(fetch_html(WIKIPEDIA_URL + page))\n page_dom.css('a').map { |link| link['href'] }\n end",
"def follow!(user)\n\t\tfollowed << user\n\tend",
"def follow(user)\n user.followers << self\n end",
"def follow!(user)\n\t\tfollowed << user \n\tend",
"def links; end",
"def links; end",
"def update_artist(artist)\n begin\n # Handle unknown artist\n if artist.name == Artist::UNKNOWN_ARTIST_NAME\n artist.wikilink = ''\n artist.save\n return\n end\n\n # Result is like this:\n search = search_text(artist.name, 1)\n\n if search.length == 0\n artist.wikilink = ''\n else\n artist.wikilink = search[0][1]\n end\n\n download_wiki_image(artist)\n rescue\n Log.log_last_exception(\"Error updating #{artist.to_s}\")\n artist.wikilink = ''\n end\n artist.save\n end",
"def continue_crawl\n # puts \"I am on #{@url} (#{@links.size} links)-> I want to navigate to #{@links.map{|l| l['href']}}\" #links - Array\n\n @links.each_with_index do |link, i|\n href = link[\"href\"]\n next if href.blank? or (href.split('/').last && href.split('/').last.starts_with?(\"#\"))\n if not href.starts_with?(\"htt\")\n href = href[1..-1] if href.starts_with?('/')\n href = @stored_page.domain + '/' + href\n end\n if page_found = Page.find_by_address_and_crawler_id(href, @crwlr.id)\n #puts \"Loop for #{href}\"\n if @stored_page #Page\n @stored_page.pages << page_found\n end\n else\n #puts \"Adding job for CID: #{@crwlr.id} HREF: #{href} SPID: #{@stored_page.id} #{} #{} #{}\"\n @stack.enqueue Crawl.new(@crwlr.id, href, @depth+1, @stack, @stored_page.id, @options)\n end\n end\n end",
"def get_position_links\n # Get all links that have the text: \"View Details\"\n links = @page.links_with(:text => /View Details/)\n href_links = []\n # convert all links into an appropriate html link\n links.each { |link| href_links << 'https://www.jobsatosu.com' + link.href }\n href_links\n end",
"def process_page page_url\n page = SuperCrawler::Scrap.new(page_url) # Scrap the current page\n\n current_page_links = page.get_links # Get current page internal links\n new_links = current_page_links - @links # Select new links\n\n new_links.each { |link| @links_queue.push(link) } # Add new links to the queue\n @links += new_links # Add new links to the links list\n @crawl_results << { # Provide current page crawl result as a hash\n url: page.url, # The crawled page\n links: current_page_links, # Its internal links\n assets: page.get_assets # Its assets\n }\n\n SuperCrawler::Render.log_status( page_url, @crawl_results.length, @links.length ) if @option_debug # Display site crawling status\n end",
"def perform\n if url_needed?\n # We need to follow any redirects from the current url.\n # The final (non-redirected) location will become our URL, and any\n # URLs that redirected along the way (including the first) become our aliases\n # NB Only the original URL is guaranteed not to be redundant, either in another page_ref\n # or an alias. If it's the latter, we capture the alias. If we can't adopt the URL without\n # clashing with another page_ref, we assign it to MercuryResult and Gleaning and give up.\n # Check the header for the url from the server.\n # If it's a string, the header returned a redirect\n # otherwise, it's an HTTP code\n puts \"Checking direct access of PageRef ##{id} at '#{url}'\"\n subject_url = url\n # Loop over the redirects from the link, adding each to the record.\n # Stop when we get to the final page or an error occurs\n while (hr = header_result(subject_url)).is_a?(String) # ...because redirect\n # header_result returns a string for a redirect\n next_url = hr.match(/^http/) ? hr : safe_uri_join(subject_url, hr).to_s # The redirect URL may only be a path\n if !Alias.urleq(subject_url, next_url) && alias_for?(next_url) # Time to give up when the url has been tried (it already appears among the aliases)\n # Report the error arising from direct access\n hr = header_result next_url\n break\n end\n puts \"Redirecting from #{subject_url} to #{next_url}\"\n alias_for subject_url, true\n subject_url = next_url\n end\n accept_attribute :url, subject_url\n hr # Return the last error code\n end\n\n # Now that we have a url, move on to the mercury_result and the gleaning\n mercury_result.ensure_attributes # Block until mercury_result has completed and accepted its attributes\n if mercury_result.good? # All is well\n accept_url mercury_result.url if mercury_result.url_ready?\n if mercury_result.new_aliases_ready? && mercury_result.new_aliases.present?\n new_aliases = mercury_result.new_aliases.collect { |url| Alias.indexing_url url }\n # Create a new alias on this page_ref for every derived alias that isn't already in use\n (new_aliases - aliases.pluck(:url)).each { |new_alias| alias_for new_alias, true }\n end\n elsif mercury_result.bad?\n errors.add :url, \"can\\'t be accessed by Mercury: #{mercury_result.errors[:base]}\"\n end\n self.http_status = mercury_result.http_status\n\n gleaning.ensure_attributes # Block until gleaning has completed and accepted its attributes\n if gleaning.good?\n accept_url gleaning.url if gleaning.url_ready?\n elsif gleaning.bad?\n errors.add :url, \"can\\'t be gleaned: #{gleaning.errors[:base]}\"\n end\n\n if errors[:url].present?\n url_errors = errors[:url].join \"\\n\"\n if relaunch?\n raise url_errors # ...to include the errors and relaunch\n else\n errors.add :base, url_errors # ...to simply include the errors in the record\n end\n end\n\n end",
"def follow(user)\n user.add_follower(self)\n self\n end",
"def follow(log)\r\n execute \"le follow #{log}\" do\r\n not_if \"le followed #{log}\"\r\n end\r\n end",
"def follows; [] end",
"def follow(target, scrollback: 100)\n target = target.write_target if target.respond_to?(:write_target)\n StreamLog.follow(read_target, target)\n read_feed.follow(*target, scrollback)\n end",
"def follow(options = T.unsafe(nil)); end",
"def list_follow(response)\n user_name = response.user.andand.name\n response.reply \"#{response.user.name}, list for '#{user_name}': #{list_spam(nil, user_name)}\"\n rescue Error => e\n log.error e.inspect\n log.error response.inspect\n response.reply \"#{response.user.name}, #{e}\"\n end",
"def get_hrefs\n # this will grab all the html from the url that\n # the user created the scraper with\n url_to_scrape = HTTParty.get(self.url)\n # nokogiri turns everything from HTTParty into nodes.\n nodes = Nokogiri::HTML(url_to_scrape)\n nodes.css('a').each do |a|\n self.hrefs << a['href']\n end\n self.hrefs\n end",
"def linkPages\n @all_pages.each_value do |one_page|\n one_page.addPageLinks\n end\n @all_pages.each_value do |one_page|\n one_page.addMissingLinkNames\n end\n end",
"def link_to_next_page(page)\n a = page.search(PAGER_NEXT_SELECTOR).first\n return unless a\n path = a.attribute('href').value.strip\n URI.join(WEBSITE_URL, path).to_s\n end",
"def follow(user)\n self.following << user\n ActionLog.log_other(self.id, \"follow\", user) \n end",
"def search_page_use_hpricot(url)\n sync_puts \"searching the link in #{url}\"\n # do something and put the new urls into the queue\n doc = Hpricot(open(url,{\n 'User-Agent' => 'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.0)'\n }))\n converter = Iconv.new('utf-8', 'GBK')\n doc.search('a').each do |a|\n # a.inner_html.force_encoding('utf-8') is useless\n begin\n #sync_puts \"#{converter.iconv(a.inner_html)} => #{a.attributes['href']}\"\n @queue.push(a.attributes['href'])\n rescue ArgumentError\n sync_puts \"ArgumentError!!!\"\n end\n end\n end",
"def get_info_url(page, tds)\n (page.uri + tds[0].at('a')['href']).to_s\nend",
"def get_info_url(page, tds)\n (page.uri + tds[0].at('a')['href']).to_s\nend",
"def facebook_url(artist)\n\t if artist.fb_page_url.blank?\n\t\t @social_fb_url = artist_link_url(artist.url_slug)\n\t else\n\t\t @social_fb_url = artist.fb_page_url\n\t end\n end",
"def next_page\n\t\t\tFeed.parse_url(next_page_url,@browser)\n\t\tend",
"def follow_redirects\n return nil unless self.exist?\n absolutepath.linkpath\n end",
"def my_links\n end",
"def follow\n if request.post?\n fo_ids = params[:follow] \n #fo_str = \"\"\n #fo_cnt = fo_ids.length - 1\n #for i in 0..fo_cnt\n # fo_str +=fo_ids[i].to_s\n # fo_str += \",\" unless fo_cnt == i\n #end\n \n fo_ids.each do |fid|\n hydra = Typhoeus::Hydra.new\n uri = \"http://api.twitter.com/1/friendships/create.json\"\n req = Typhoeus::Request.new(uri,\n :method =>\"post\",\n :params =>{:user_id=>fid, :include_entities=>\"true\"})\n \n sign_request(req,uri)\n hydra.queue(req)\n hydra.run\n #puts req.response.inspect\n end\n end\n redirect_to :action=>\"index\", :page=>\"1\" \n end",
"def search_page_use_hpricot(url)\n # do something and put the new urls into the queue\n doc = Hpricot(open(url,{\n 'User-Agent' => 'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.0)'\n }))\n converter = Iconv.new('utf-8', 'GBK')\n doc.search('a').each do |a|\n # a.inner_html.force_encoding('utf-8') is useless\n begin\n if a.attributes['href'] != nil && !filtered?(a.attributes['href'])\n #sync_puts \"#{converter.iconv(a.inner_html)} => #{a.attributes['href']}\"\n @queue.push(a.attributes['href'])\n end\n rescue ArgumentError\n sync_puts \"ArgumentError!!!\"\n end\n end\n end",
"def followees\n @user = User.find params[:id]\n @users = @user.followees.page params[:page]\n @title = 'Following'\n render 'followship'\n end",
"def follow(followee_handle)\n HTTParty.post(\"#{@api_path}/users/follow/#{@handle}/#{@password}/#{followee_handle}\")\n end",
"def follow_list(options)\n session.options = adapt_to_dev_env(options)\n session.get('/follows')\n end",
"def doFollow _obj, _args\n \"_obj doFollow _args;\" \n end",
"def parse!\n init_url\n response = HTTParty.get(@url)\n pattern = /<a (href\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^'\">\\s]+)))*>(.*?)<\\/a>/i\n body = response.body\n while pattern =~ body\n @uri=$1\n @obj=$+\n clean!\n @items[\"#{@uri}\"] = @obj\n body = $~.post_match\n end\n end",
"def followUser(userToFollow)\n @followers << userToFollow\n end",
"def get_mag_index_pages(mag_url)\n links = []\n doc = Nokogiri::HTML(open(mag_url, :allow_redirections => :safe)) \n doc.css(\"a[href]\").each do |p|\n if p.attribute('href').to_s.include? \"#issues\"\n links.push(p.attribute('href').to_s)\n end\n end\n # the link of the actual url is not in the array. it needs to be,\n # since this is the first page that index issues.\n links.push(mag_url)\n return links.uniq\nend",
"def follow(other_user)\n following << other_user\n end",
"def follow(other_user)\n following << other_user\n end"
] | [
"0.7293421",
"0.7293421",
"0.7121017",
"0.6964771",
"0.6964771",
"0.647943",
"0.6266747",
"0.61958796",
"0.616101",
"0.59801286",
"0.59708875",
"0.59655154",
"0.5930222",
"0.5885557",
"0.5836091",
"0.57873046",
"0.5783145",
"0.5710148",
"0.57061523",
"0.5686273",
"0.56635565",
"0.56584305",
"0.5640265",
"0.5634397",
"0.55916935",
"0.5580335",
"0.5516693",
"0.55025744",
"0.54754287",
"0.54696834",
"0.54687124",
"0.5457305",
"0.5447895",
"0.54396635",
"0.54385287",
"0.5420959",
"0.5416139",
"0.54146504",
"0.54066044",
"0.53715163",
"0.5369817",
"0.5356347",
"0.5347551",
"0.5303184",
"0.5286593",
"0.52831274",
"0.52825636",
"0.52801365",
"0.52701426",
"0.5265159",
"0.52630574",
"0.52597725",
"0.5259364",
"0.5253767",
"0.5251211",
"0.5246264",
"0.5245614",
"0.5242795",
"0.52396125",
"0.5238787",
"0.52277243",
"0.522349",
"0.5220464",
"0.52156836",
"0.5211564",
"0.5208738",
"0.5208738",
"0.5201673",
"0.5200617",
"0.51979226",
"0.5195811",
"0.5190814",
"0.518532",
"0.51750004",
"0.51714975",
"0.5171305",
"0.5171007",
"0.51699907",
"0.51678467",
"0.5162085",
"0.514939",
"0.5146765",
"0.5144132",
"0.5137981",
"0.5137981",
"0.51354533",
"0.51331073",
"0.51152927",
"0.51147014",
"0.5108907",
"0.5105505",
"0.50968075",
"0.5095759",
"0.5094407",
"0.5093216",
"0.50851643",
"0.5081072",
"0.5076797",
"0.50745785",
"0.50745785"
] | 0.7501723 | 0 |
Checks if a wikipedia page is classified as an artist page. | def is_artist_page?(p)
return false unless p && p.content && p.categories && p.title
belongs_to_categories? p, [
"musicians",
"artists",
"duos",
"groups",
"singers",
"guitarists",
"gitarrister",
"sångare",
"grupper",
"musiker"
], true
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def artist?\n end",
"def include?(p_artist)\n\n\t\t\t# Check parameter\n\t\t\treturn unless p_artist.is_a? Artist\n\t\t\t\n\t\t\t# Return result\n\t\t\[email protected]?(p_artist)\n end",
"def is_it_marine?\n if @page.has_checked_marine?\n @page.is_marine?\n else\n env_terms = gather_terms([Eol::Uris.environment])\n marine =\n has_data_for_pred_terms(\n env_terms,\n values: [Eol::Uris.marine]\n ) &&\n !has_data_for_pred_terms(\n env_terms,\n values: [Eol::Uris.terrestrial]\n )\n\n @page.update_attribute(:has_checked_marine, true)\n # NOTE: this DOES NOT WORK without the true / false thing. :|\n @page.update_attribute(:is_marine, marine ? true : false)\n marine\n end\n end",
"def valid_artist_name?\n\t\t\tif params[:artist].empty?\n\t\t\t\tflash[:danger] = \"Please enter an artist name\"\n\t\t\t\tredirect_to search_artist_path\n\t\t\tend\n\t\tend",
"def isArticle?(url)\n\t\n\t# possible parameters:\n\t# page contains a date\n\nend",
"def is_disambiguation_page?(p)\n\t\tlogger.debug \"is disambiguation page?\"\n\t\tbelongs_to_categories? p, [\n\t\t\t\"Category:All article disambiguation pages\",\n\t\t\t\"Category:All disambiguation pages\",\n\t\t\t\"Category:Disambiguation pages\",\n\t\t\t\"Kategori:Förgreningssidor\"\n\t\t]\n\tend",
"def test_song_has_artist\n assert_equal(\"Queen\", @song2.artist)\n end",
"def show\n @artist = Artist.find(params[:id])\n unless @artist.belongs_to_this_brand?(website)\n redirect_to artists_path and return\n end\n if @artist.featured || @artist.artist_tier.show_on_artist_page?\n respond_to do |format|\n format.html { render_template } # show.html.erb\n # format.xml { render xml: @artist }\n end\n else\n redirect_to all_artists_path(letter: @artist.name.match(/\\w/).to_s.downcase) and return false\n end\n end",
"def on_page?\n raise NotImplementedError, \"implement me, e.g. using #has_title?\"\n end",
"def looks_valid?\n # The application name is present\n tiddlywiki_title == 'TiddlyWiki' &&\n # Has one or other store divs but not both\n (store.present? ^ encrypted_store.present?) &&\n # We're able to extract a tiddlywiki version\n tiddlywiki_version.present?\n end",
"def all_same_artist?(tags)\n all_same_tag?(tags, :artist)\n end",
"def logged_in? # obj - nil\n\t\tcurrent_artist\n\tend",
"def show_links?\n edata = extra_data\n bitvalue = edata[\"m_search_engines\"].to_i\n is_a_search_link_set = [1,2,4,8,16].map do |a| \n (bitvalue & a) > 0 ? 1 : nil \n end.compact.size > 0\n is_a_search_link_set || (edata[\"artist\"] &&\n !edata[\"artist\"][\"name\"].blank? &&\n !edata[\"artist\"][\"url\"].blank?)\n end",
"def require_artist\n unless logged_in? && (current_user.artist? || current_user.administrator?)\n flash[:warning] = \"Only artists can access the #{controller_name} controller\"\n redirect_to controller: \"home\", action: \"index\"\n end\n end",
"def whitelisted_page?(page)\n return false unless page\n return false if /:/.match page\n page[0..5] == '/wiki/' ? true : false\n end",
"def has_wiki?\n !!wiki_pages\n end",
"def isa?\n\t\tinstance_of?(Album)\n\tend",
"def test_can_get_song_artist\n assert_equal(\"Whitney Houston\", @song1.artist())\n end",
"def webpage_site?\n marc_leader_06_match = record.leader.byteslice(6) == 'a'\n marc_leader_07_match = %w[b i s].include?(record.leader.byteslice(7))\n marc_008_21_match = record.fields('008').find do |field|\n field.value.byteslice(21) == 'w'\n end\n\n marc_006_match = record.fields('006').find do |field|\n field.value.byteslice(0) == 's' &&\n field.value.byteslice(4) == 'w'\n end\n\n return true if (marc_leader_06_match &&\n marc_leader_07_match &&\n marc_008_21_match) ||\n marc_006_match\n end",
"def is_article\n infopageable_type == 'Article'\n end",
"def is_article?\n self.class == Article\n end",
"def gallery_type_museum?\n self.gallery_type == VENUE_TYPES['museum'] rescue false\n end",
"def noun_articles_present? set\n ((set & NOUNS).count >= 1) || ((set & ARTICLES).count >= 2)\n end",
"def guessing?\n ! page.has_content?(\"Your Results\")\n end",
"def about_knowhow?\n category == \"knowhow\"\n end",
"def noun_articles_correct? set\n ((set & NOUNS).count >= 1) || ((set & ARTICLES).count >= 2)\n end",
"def is_it_extinct?\n if @page.has_checked_extinct?\n @page.is_extinct?\n else\n # NOTE: this relies on #displayed_extinction_data ONLY returning an \"extinct\" record. ...which, as of this writing,\n # it is designed to do.\n @page.update_attribute(:has_checked_extinct, true)\n if @page.displayed_extinction_data # TODO: this method doesn't check descendants yet.\n @page.update_attribute(:is_extinct, true)\n return true\n else\n @page.update_attribute(:is_extinct, false)\n return false\n end\n end\n end",
"def page?\n PAGE_EXTS.include? extname\n end",
"def isTwitter?\n self.category =~ /(tweet|twitter|suggested)/i\n end",
"def update_artist(artist)\n begin\n # Handle unknown artist\n if artist.name == Artist::UNKNOWN_ARTIST_NAME\n artist.wikilink = ''\n artist.save\n return\n end\n\n # Result is like this:\n search = search_text(artist.name, 1)\n\n if search.length == 0\n artist.wikilink = ''\n else\n artist.wikilink = search[0][1]\n end\n\n download_wiki_image(artist)\n rescue\n Log.log_last_exception(\"Error updating #{artist.to_s}\")\n artist.wikilink = ''\n end\n artist.save\n end",
"def hometown_setting?\n # here the only tricky part is figuring out that the Film class calls this\n # \"setting\" and the Festival class calls this \"location\"\n self.film.setting == self.festival.location\n end",
"def lastfm?; lastfm.to_s != \"\" end",
"def isa?\n instance_of?(Album)\n end",
"def set_artist\n\n\tartist = Artist.find_by_artist_name(self.artist_name)\n\t if artist != nil \n\t\t self.artist_name = artist\n\t\t return true\n\t else\n\t\terrors.add_to_base(\"combination of: 'artist_name' is invalid- it must be unique\")\n\t\t return false\n\tend\nend",
"def inferred_title?(document); end",
"def on_the_page?\n dom_reader.has_attrs?(self.values)\n end",
"def is_displayed_on_site?\n feed.feed_type.name == \"Article\"\n end",
"def artists(artist)\n if song.artist = nil || !Artist.find_by_name(name)\n song.artist = artist \n Artist.all << artist \n end \n end",
"def artists\n if RESPONSE.code == 200\n # Return data to page\n JSON.parse(RESPONSE.to_s)['topartists']['artist']\n else\n # print error message\n \"Error Code #{RESPONSE.code}\"\n end\n end",
"def checkUnspeakableArtist(artist)\n artist.strip!.downcase!\n case artist\n when \"full beat\"\n log \"Changed '#{artist}' into Volbeat\"\n return \"volbeat\"\n when \"a full beat\"\n log \"Changed '#{artist}' into Volbeat\"\n return \"volbeat\"\n when \"the full beats\"\n log \"Changed '#{artist}' into Volbeat\"\n return \"volbeat\"\n when \"soul fly\"\n log \"Changed '#{artist}' into Soulfly\"\n return \"soulfly\"\n when \"so fly\"\n log \"Changed '#{artist}' into Soulfly\"\n return \"soulfly\"\n else\n log \"Changed nothing for '#{artist}'\"\n return artist\n end\n end",
"def episode?\n content_type == \"Episode\"\n end",
"def is_movie?\n self.type_of_show.downcase == \"movie\" ? true : false \n end",
"def find_page(pname, verify = true)\n\t\tlogger.debug \"looking up page: #{pname}\"\n\t\tlogger.debug \"verify find: #{verify}\"\n\t\tr = Wikipedia.find(pname)\n\t\t\n\t\t# parse disambiguation meta data\n\t\tunless is_artist_page? r\n\t\t\tlogger.debug \"check for disambiguation meta data\"\n\t\t\n\t\t\t# check for {about|A|B|1|C|2...|Z|N} patterns\n\t\t\t# where we are intrested in B|1 - Z|N\n\t\t\tm = r.content.scan(/\\{about\\|[\\w\\s]*((\\|[^\\}\\{\\|]*\\|[^\\}\\{\\|]*)*)\\}/) if r.content\n\t\t\tunless m == nil || m.empty? || m.first.empty?\n\t\t\t\t# l = [\"B\", \"1\", \"C\", \"2\", ... , \"Z\", \"N\"]\n\t\t\t\tl = m.first.first[1..-1].split(\"|\")\n\t\t\t\t1.step(l.size-1,2).each do |i|\n\t\t\t\t\t# check pages \"1\", \"2\" .. \"N\"\n\t\t\t\t\tp = find_page(l[i])\n\t\t\t\t\tr = p if p\n\t\t\t\t\tbreak\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\t\n\t\t# parse links\n\t\tlogger.debug \"follow links (desperate!)\" if !is_artist_page?(r) && is_disambiguation_page?(r)\n\t\tr = follow_links(r) if !is_artist_page?(r) && is_disambiguation_page?(r)\n\t\t\n\t\t# verify category\n\t\t(!verify || is_artist_page?(r)) ? r : nil\n\tend",
"def alien?() is_type?( 'Alien'); end",
"def classification?(c)\n not [\"malicious\", \"non-malicious\", \"suspicious\", \"unknown\"].index(c).nil?\n end",
"def artist_details(artist)\n Scraper.scrape_individual_artist(artist) \n\n puts \"\"\n puts \"Here are more details about #{artist.name.bold}.\".black.on_light_white\n puts \"\"\n puts \"Representing Gallery: #{artist.gallery.name} \"\n puts \"\"\n puts \"Artist Bio: #{artist.bio}\"\n puts \"\"\n puts \"About the Artist : #{artist.about_art}\"\n puts \"\"\n\n end",
"def movie?\n content_type == \"Movie\"\n end",
"def clean?\n return @hygiene > 7\n end",
"def artist\n art = super\n if art.nil?\n art = Artist.new\n art.title = \"Unknown Artist\"\n end\n art\n end",
"def cover_art?(files)\n case files.first.extname\n when '.flac'\n raise Aur::Exception::LintDirCoverArtMissing unless cover_in(files)\n when '.mp3'\n raise Aur::Exception::LintDirCoverArtUnwanted if cover_in(files)\n end\n\n true\n end",
"def artist_name\n if self.artist #if song has an artist aka TRUE\n self.artist.name #return the artist name\n else\n nil #if no artist name return nil\n end\n end",
"def entertained?\n return (gladiators.map { |g| g.name }).include? \"Maximus\"\n end",
"def empty?\n @artists.empty?\n end",
"def valid_selection?\n\t\t\tif !params[:selected_artist] \n\t\t\t\tflash[:danger] = \"Please select an artist\"\n\t\t\t\tredirect_to search_path(params)\n\t\t\tend\n\t\tend",
"def favoring?(article)\n favorites.include?(article)\n end",
"def valid_page page\n # ignore case\n if page\n page.downcase!\n else\n return false\n end\n # verify page name\n exists = false\n if page == 'about'\n exists = true\n end\n if page == 'contact'\n exists = true\n end\n if page == 'welcome'\n exists = true\n end\n if page == 'info'\n exists = true\n end\n return exists\n end",
"def not_home?\n page.title != \"Home\"\n end",
"def artist\n # What is the .artists method being called on here?\n # The default behaviour in Ruby is to see if the method\n # exists for the current object, i.e. the instance\n # In JS, you would have to write: 'this.artists'\n self.artists.first\n # ^ 'self.' is the default, so it can be left out\n end",
"def any_places?\n\t\ttwitter? or facebook? or googleplus? or myspace? or\n\t\tyoutube? or soundcloud? or spotify? or lastfm? or website?\n\tend",
"def search_artist(artist)\n PeopleSearch.search_artist(artist, @api_key, @https)\n end",
"def valid_article(subheading, body_text, thumbnail, category_size)\n if !subheading['<'] && !body_text.strip.empty? && !thumbnail.strip.empty? && category_size < 15\n true\n else\n false\n end\n end",
"def test_truth\n assert_kind_of Author, @author\n end",
"def test_song_artist\n assert_equal(\"Spice Girls\", @song1.song_artist)\n end",
"def searchSpotify(inArtist)\n tArtist = CGI.escape(inArtist)\n \n outstring = open('http://ws.spotify.com/search/1/artist?q='+tArtist, 'User-Agent' => 'Ruby-Wget').read\n\n outdata = outstring.split(\"<opensearch:totalResults>\")\n\n outdata.delete_at(0);\n\n if outdata[0].split(\"</opensearch:totalResults>\")[0].to_i > 0\n outinfo = outstring.split(\"<artist href=\");\n return outinfo[1].split(\">\")[0];\n else\n return 0\n end\n end",
"def artist_social(artist)\n\t #-----------For Artist Meta Tags----------------\n\n\t #Page Title, Facebook Title and Twitter Title\n\t @social_title = artist.name+\" on Three Repeater\"\n\t #Meta description (google), Facebook Description, and Twitter Card Description\n\t @social_descrip = artist.bio\n\n\t #logic around figuring out which facebook url is used\n\t facebook_url(artist)\n\n\t #Twitter ID\n\t @social_twitter_name = artist.twitter_name\n\n\t #Image for twitter and FB\n\t @social_image = artist.logo.to_s\n\n\t #------------------------------------------------\n\n end",
"def has_page?\n if url.nil? or page.nil? or page.document.nil?\n errors.add(:page, \"can not be nil\")\n return false\n end\n true\n end",
"def is_page?\n is_entry? && params[:_entry_type_] == 'page'\n end",
"def artist\n\t\tartists == nil ? nil : artists.first\n\tend",
"def is_indexed(url)\n u = Url.find_by_url(url)\n u and not u.words.empty?\n end",
"def is_treasure?(link)\r\n domain = get_domain(link)\r\n return false if domain.nil?\r\n # if we have a domain\r\n @treasures.each do |site, urls|\r\n urls.each do |uri|\r\n if domain == uri\r\n if (!$db.sismember(db_treasures_found_path, link))\r\n puts \"[Treasure]\".cyan + \" Found from #{site.yellow}: #{link.green}\"\r\n save_treasure(link)\r\n return true\r\n else\r\n puts \"#{\"[Skipping Treasure]\".yellow} from #{site}: #{link}\".light_black\r\n end\r\n end\r\n end\r\n end\r\n return false\r\n end",
"def title_check\n \n\n if self.title\n \n if !self.title.include? \"Believe\" || \"Won't\" || \"Secret\"\n true\n else\n false\n end\n else\n false\n end\n end",
"def author_identity_different?(attribs)\n !(\n # not the identical identity where Author is assumed to be Stanford University\n # checks in order of likelihood of changes\n # note that this code works for nil/empty string comparisons by calling `to_s`\n first_name.to_s.casecmp(attribs[:first_name].to_s) == 0 &&\n middle_name.to_s.casecmp(attribs[:middle_name].to_s) == 0 &&\n last_name.to_s.casecmp(attribs[:last_name].to_s) == 0 &&\n institution.to_s.casecmp(attribs[:institution].to_s) == 0\n )\n end",
"def clean?\n @hygiene > 7\n end",
"def intestate?\n return false if self.matter_type.blank?\n self.matter_type.intestate?\n end",
"def enough_text_detected?\n text_length = @pages.inject(0) {|sum, page| sum + page[:text].length }\n text_length > (@pages.length * 100)\n end",
"def accepts?(page)\n !@accepts || page.mime.to_s =~ @accepts\n end",
"def check_for_url(url)\n array = read_articles\n\n if array.any? {|article| article[\"url\"] == url}\n false\n else\n true\n end\nend",
"def include_page?(page)\n if !page.listed? || page.templatized? || !page.published?\n false\n elsif @_options[:exclude]\n (page.fullpath =~ @_options[:exclude]).nil?\n else\n true\n end\n end",
"def artist_name\n artist.name if artist\n end",
"def artist\n artist = Spotify.album_artist!(pointer)\n Artist.new(artist) unless artist.null?\n end",
"def sierra_856_perfect?\n @url == self.proper.proper_856_content\n end",
"def include_page?(page)\n if !page.listed? || page.templatized? || !page.published?\n false\n elsif @options[:exclude]\n (page.fullpath =~ @options[:exclude]).nil?\n else\n true\n end\n end",
"def sanitize?\n begin\n self.original_url.strip!\n page = MetaInspector.new(self.original_url)\n true\n rescue\n false\n end\n end",
"def clean?\n if @hygiene > 7\n true\n else\n false\n end\n end",
"def has_movie(title)\n page.has_css?(@movie_list_css, text: title)\n end",
"def artist_name\n if artist\n self.artist.name\n else\n nil\n end\n end",
"def artist_name\n if artist_name_from_url.present?\n artist_name_from_url\n elsif api_metadata.present?\n api_metadata.dig(:author, :username)\n else\n nil\n end\n end",
"def on_page?(page_arg)\n if @browser.is_a? Watir::Browser\n url = @browser.url\n elsif @browser.is_a? Selenium::WebDriver::Driver\n url = @browser.current_url\n else\n raise SiteObject::BrowserLibraryNotSupportedError, \"Unsupported browser library: #{@browser.class}\"\n end\n\n if page_arg.url_matcher && page_arg.url_matcher =~ url\n return true\n elsif page_arg.url_template.match url\n return true\n else\n return false\n end\n end",
"def artist=(artist)\n @artist = artist\n if artist.class == Artist\n artist.add_song(self)\n end\n end",
"def artist\n @ole.Artist\n end",
"def artist_name\n self.artist ? self.artist.name : nil\n end",
"def artist_name\n artist ? artist.name : ''\n end",
"def artist_name\n if self.artist == nil #findining artist of song\n nil\n else\n artist.name\n end\n end",
"def obscene?(text)\n text.include?(\"obscenities\")\nend",
"def on_page?\n false\n end",
"def artist\n @artist #tells song its artist name\n end",
"def artist\n artists = tracks.map{|t| t.artist}.compact\n if artists.uniq.size == 1\n artists.first\n else\n \"Compilation\"\n end\n end",
"def show\n @murals = @artist.murals.page(params[:page])\n end",
"def liking?(song)\n likes.include?(song)\n end",
"def third_screen_visible?\n @third_screen_title.visible?\n end"
] | [
"0.6480193",
"0.5693729",
"0.56392723",
"0.5617377",
"0.5570762",
"0.55502033",
"0.55250317",
"0.5523604",
"0.5491006",
"0.54808533",
"0.5479086",
"0.54477686",
"0.53524405",
"0.531163",
"0.53101426",
"0.53046244",
"0.5279935",
"0.5273811",
"0.5269698",
"0.52515036",
"0.5249873",
"0.5241262",
"0.52374184",
"0.52193755",
"0.5206415",
"0.5187159",
"0.51627326",
"0.5158477",
"0.5156923",
"0.51440364",
"0.5137749",
"0.5131535",
"0.5128246",
"0.51119417",
"0.51078594",
"0.5088507",
"0.5069991",
"0.50440913",
"0.5042359",
"0.50193924",
"0.50114596",
"0.50052315",
"0.49933234",
"0.4985093",
"0.49850386",
"0.49723494",
"0.49580464",
"0.49485707",
"0.49394065",
"0.49330017",
"0.4931521",
"0.49311283",
"0.4928358",
"0.4924809",
"0.49089378",
"0.49021482",
"0.48973212",
"0.48962563",
"0.48924166",
"0.4891519",
"0.4884825",
"0.48627213",
"0.48553014",
"0.48531607",
"0.4852815",
"0.48519886",
"0.4847038",
"0.4841902",
"0.4841386",
"0.48295277",
"0.48274276",
"0.482731",
"0.48270747",
"0.48270166",
"0.48265752",
"0.48249617",
"0.48215985",
"0.48181212",
"0.48160714",
"0.4805035",
"0.48036602",
"0.47974697",
"0.4797364",
"0.479691",
"0.47930276",
"0.47889984",
"0.47836563",
"0.47809473",
"0.47750723",
"0.4774814",
"0.47727817",
"0.47726193",
"0.476765",
"0.476473",
"0.4760515",
"0.47604778",
"0.47585246",
"0.4755546",
"0.47543296",
"0.4750303"
] | 0.7776254 | 0 |
Checks if a wikipedia page is classified as an disambiguation page. | def is_disambiguation_page?(p)
logger.debug "is disambiguation page?"
belongs_to_categories? p, [
"Category:All article disambiguation pages",
"Category:All disambiguation pages",
"Category:Disambiguation pages",
"Kategori:Förgreningssidor"
]
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def whitelisted_page?(page)\n return false unless page\n return false if /:/.match page\n page[0..5] == '/wiki/' ? true : false\n end",
"def classification?(c)\n not [\"malicious\", \"non-malicious\", \"suspicious\", \"unknown\"].index(c).nil?\n end",
"def guessing?\n ! page.has_content?(\"Your Results\")\n end",
"def unc_thesis_dissertation?\n rec_type_match = manuscript_lang_rec_type? || lang_rec_type?\n nature_contents_match = record.fields('008').find do |field|\n (field.value.byteslice(24..27) || '').split('').include?('m')\n end\n\n marc_006_match_results = record.fields('006').collect do |field|\n %w[a].include?(field.value.byteslice(0)) &&\n (field.value.byteslice(7..10) || '').split('').include?('m')\n end\n\n return true if (rec_type_match && nature_contents_match) ||\n marc_006_match_results.include?(true) ||\n rec_type_match && has_502?\n end",
"def has_wiki?\n !!wiki_pages\n end",
"def properPhrase? (phrase)\n\tif !in_arr?(NotPhrase, phrase.type.to_s, false)\n\t\treturn phrase.words.any?{|word| word.tag != \"CD\"}\n\telse\n\t\treturn false\n\tend\nend",
"def redundant?( url )\n redundant = @opts.redundant?( url ) do |count, regexp, path|\n print_info \"Matched redundancy rule: #{regexp} for #{path}\"\n print_info \"Count-down: #{count}\"\n end\n\n print_verbose \"Discarding redundant page: #{url}\" if redundant\n redundant\n end",
"def is_on_page? page_text, negation = ''\n should_not_have_exception = false\n should_have_exception = false\n begin\n wait_for(timeout: 5) { has_text? page_text }\n # If negation is not nil, we should raise an error if this message was found on the view\n should_not_have_exception = true unless negation == ''\n rescue\n # only raise exception if negation is nil, otherwise this is the expected behaviour\n should_have_exception = true if negation == ''\n end\n raise \"Unexpected Page. The page should not have: '#{page_text}'\" if should_not_have_exception\n raise \"Unexpected Page. Expected was: '#{page_text}'\" if should_have_exception\n end",
"def valid_page page\n # ignore case\n if page\n page.downcase!\n else\n return false\n end\n # verify page name\n exists = false\n if page == 'about'\n exists = true\n end\n if page == 'contact'\n exists = true\n end\n if page == 'welcome'\n exists = true\n end\n if page == 'info'\n exists = true\n end\n return exists\n end",
"def uncountable?(word)\n Noun[word].uncountable?\n end",
"def webpage_site?\n marc_leader_06_match = record.leader.byteslice(6) == 'a'\n marc_leader_07_match = %w[b i s].include?(record.leader.byteslice(7))\n marc_008_21_match = record.fields('008').find do |field|\n field.value.byteslice(21) == 'w'\n end\n\n marc_006_match = record.fields('006').find do |field|\n field.value.byteslice(0) == 's' &&\n field.value.byteslice(4) == 'w'\n end\n\n return true if (marc_leader_06_match &&\n marc_leader_07_match &&\n marc_008_21_match) ||\n marc_006_match\n end",
"def sierra_856_perfect?\n @url == self.proper.proper_856_content\n end",
"def is_unambiguous?\n RANKS.each do |r|\n if !send(r).nil?\n return false unless !send(r).nil? && !unambiguous_at?(r).nil?\n end\n end\n true\n end",
"def is_on_page?(page_text, negation = '')\n fail 'Página inesperada. Entre com uma mensagem válida' if\n page_text.to_s == ''\n\n should_not_have_exception = false\n should_have_exception = false\n begin\n wait_for(timeout: 10) { has_text? page_text }\n # If negation is not nil, we should raise an error\n # if this message was found on the view\n should_not_have_exception = true unless negation == ''\n rescue\n # only raise exception if negation is nil,\n # otherwise this is the expected behaviour\n should_have_exception = true if negation == ''\n end\n\n fail \"Página inesperada. A página não contém: '#{page_text}'\" if\n should_not_have_exception\n\n fail \"Página inesperada. Era esperado: '#{page_text}'\" if\n should_have_exception\n\n true\n end",
"def depricated_page?\n b = false\n DEPRICATED_PAGES_WITHOUT_CHECK_ACCOUNT.each do |page|\n b = true if controller_name == page[0] && action_name == page[1]\n end\n b\n end",
"def page_title_is_correct\n ( text =~ self.class.page_title_validation_value ) !=nil\n end",
"def is_on_page?(page_text, negation = '')\n fail 'Página inesperada. Entre com uma mensagem válida' if\n page_text.to_s == ''\n\n should_not_have_exception = false\n should_have_exception = false\n begin\n wait_for(timeout: 5) { has_text? page_text }\n # If negation is not nil, we should raise an error\n # if this message was found on the view\n should_not_have_exception = true unless negation == ''\n rescue\n # only raise exception if negation is nil,\n # otherwise this is the expected behaviour\n should_have_exception = true if negation == ''\n end\n\n fail \"Página inesperada. A página não contém: '#{page_text}'\" if\n should_not_have_exception\n\n fail \"Página inesperada. Era esperado: '#{page_text}'\" if\n should_have_exception\n\n true\n end",
"def page?\n !!self.page_id\n end",
"def not_home?\n page.title != \"Home\"\n end",
"def skip?\n return true if length && length <= 2\n return true if IGNORE_CHAPTERS.any? { |ig| ig === title }\n false\n end",
"def unpublishable?\n return false if is_a?(StaticPage) || is_a?(SubtleSystemNode)\n return false if is_a?(Meditation) && self_realization?\n\n true\n end",
"def wiki_redirect?\n !!(self.redirect? && self.redirect =~ LINK_REGEX)\n end",
"def is_indexed(url)\n u = Url.find_by_url(url)\n u and not u.words.empty?\n end",
"def wikilink_available?\n wikilink && !wikilink.empty?\n end",
"def regular_o_declension?\n @inflection_class == 1 && @nom.to_s =~ /us$/ # to_s because it might be nil\n end",
"def is_disqualified?\n if @result_dao\n @result_dao.is_disqualified || @result_dao.is_retired\n else\n ! ( @result_token =~ /Ritir|Squal/i ).nil?\n end\n end",
"def undescribable?\n (sort == 'Kaviar' && teachable.class.to_s == 'Lesson') ||\n sort == 'Script'\n end",
"def page_redirect?(title)\n page_info_contains_key(title, 'redirect')\n end",
"def include_page?(page)\n if do_not_show?(page)\n false\n elsif @options[:exclude]\n (page.fullpath =~ @options[:exclude]).nil?\n else\n true\n end\n end",
"def is_workplace_page? \n return true if controller_name == \"workplaces\" || controller_name ==\"workplace_posts\" || controller_name == \"workplace_map_posts\"\n end",
"def is_unknown_url? url\n @urls.count_documents(url:url) == 0\n end",
"def have_double_wild_battle?\r\n return false if $PokemonTemp.forceSingleBattle\r\n return false if pbInSafari?\r\n return true if $PokemonGlobal.partner\r\n return false if $Trainer.able_pokemon_count <= 1\r\n return true if $game_player.pbTerrainTag.double_wild_encounters && rand(100) < 30\r\n return false\r\n end",
"def examine_url_name\n if self.id.nil?\n if RESERVED_PATH.include? self.url_name\n self.errors.add(:url_name,\"#{url_name} 是個保留字,請使用別的字\")\n end\n if self.type.constantize.pluck(\"url_name\").include? self.url_name\n self.errors.add(:url_name,\"#{url_name} 已經被其他頁面使用過了\")\n end\n else\n possible_dup_page = self.type.constantize.find_by_url_name(self.url_name)\n unless possible_dup_page.nil?\n unless self.type.constantize.find_by_url_name(self.url_name).id == self.id\n self.errors.add(:url_name,\"#{url_name} 已經被其他頁面使用過了\")\n end\n end\n end\n end",
"def page_url_is_correct\n ( current_url =~ self.class.page_url_validation_value ) !=nil\n end",
"def undistinguish\n distinguish(:no)\n end",
"def is_artist_page?(p)\n\t\treturn false unless p && p.content && p.categories && p.title\n\t\tbelongs_to_categories? p, [\n\t\t\t\"musicians\",\n\t\t\t\"artists\",\n\t\t\t\"duos\",\n\t\t\t\"groups\",\n\t\t\t\"singers\",\n\t\t\t\"guitarists\",\n\t\t\t\"gitarrister\",\n\t\t\t\"sångare\",\n\t\t\t\"grupper\",\n\t\t\t\"musiker\"\n\t\t], true\n\tend",
"def looks_valid?\n # The application name is present\n tiddlywiki_title == 'TiddlyWiki' &&\n # Has one or other store divs but not both\n (store.present? ^ encrypted_store.present?) &&\n # We're able to extract a tiddlywiki version\n tiddlywiki_version.present?\n end",
"def on_page?\n false\n end",
"def on_page?\n raise NotImplementedError, \"implement me, e.g. using #has_title?\"\n end",
"def has_page?\n if url.nil? or page.nil? or page.document.nil?\n errors.add(:page, \"can not be nil\")\n return false\n end\n true\n end",
"def page?\n PAGE_EXTS.include? extname\n end",
"def disambiguate_discovered_check(possibilities)\n DIRECTIONS.each do |attacking_piece, directions|\n attacking_piece = attacking_piece.upcase if move.black?\n\n directions.each do |dir|\n piece, square = first_piece(king_position, dir)\n next unless piece == move.piece && possibilities.include?(square)\n\n piece, = first_piece(square, dir)\n possibilities.reject! { |p| p == square } if piece == attacking_piece\n end\n end\n\n possibilities\n end",
"def off_site?(url)\n url !~ /^\\// # urls not starting with a /\n end",
"def include_page?(page)\n if !page.listed? || page.templatized? || !page.published?\n false\n elsif @options[:exclude]\n (page.fullpath =~ @options[:exclude]).nil?\n else\n true\n end\n end",
"def include_page?(page)\n if !page.listed? || page.templatized? || !page.published?\n false\n elsif @_options[:exclude]\n (page.fullpath =~ @_options[:exclude]).nil?\n else\n true\n end\n end",
"def ambiguous?\n found = chart.sets.find { |set| !set.ambiguities.empty? }\n !found.nil?\n end",
"def verify_page?(key, exit = true)\n base_title = wait_for_title(exit)\n puts \"Verify Title - Desired Prefix: #{site.get_title(key)} => Full Title: #{page_title}\" if exit\n if site.get_title(key) != base_title\n fail(\"Page title does not match expected result. EXPECTED: #{site.get_title(key)} FOUND: #{page_title}\") if exit\n return false\n end\n return true\n end",
"def title_check\n \n\n if self.title\n \n if !self.title.include? \"Believe\" || \"Won't\" || \"Secret\"\n true\n else\n false\n end\n else\n false\n end\n end",
"def secondary_url?\n case url\n when %r!pixiv\\.net/stacc!i\n true\n when %r!pixiv\\.net/fanbox!i\n true\n when %r!twitter\\.com/intent!i\n true\n when %r!lohas\\.nicoseiga\\.jp!i\n true\n when %r!(?:www|com|dic)\\.nicovideo\\.jp!i\n true\n when %r!pawoo\\.net/web/accounts!i\n true\n when %r!www\\.artstation\\.com!i\n true\n when %r!blogimg\\.jp!i, %r!image\\.blog\\.livedoor\\.jp!i\n true\n else\n false\n end\n end",
"def ambiguous?\n @is_ambiguous\n end",
"def should_be_skipped?(word)\n reject?(word) || hashtag?(word) || uri?(word) || mention?(word)\n end",
"def is_noise?( name, url )\n name_key = @url_filter[url.downcase]\n if ( name_key != nil )\n if name.downcase.include? name_key\n return false\n else\n return true\n end\n else\n return false\n end\n end",
"def isArticle?(url)\n\t\n\t# possible parameters:\n\t# page contains a date\n\nend",
"def sanitize?\n begin\n self.original_url.strip!\n page = MetaInspector.new(self.original_url)\n true\n rescue\n false\n end\n end",
"def inferred_title?(document)\n return false unless document.is_a?(Jekyll::Document)\n\n meta = read_yaml(File.dirname(document.path), File.basename(document.path))\n !meta.key?(\"title\")\n end",
"def checking_dictionary_for_word_match\n valid_word?(@prefix)\n end",
"def film_with_discount?(table)\n table.css('strong').each do |node|\n return true if node.content.include?('MERCOLEDI INGRESSO')\n end\n false\n end",
"def page_link?(uri)\n uri = URI.parse(uri) unless uri.is_a? URI\n uri.path =~ PAGE_REGEX || uri.path !~ /\\..*$/\n end",
"def unknow\r\n return false unless unknow?\r\n @unknow.shift\r\n end",
"def skip_url(url)\n # domains to skip\n # www.britannica.com - sometimes has ad window that overlays. \n # www.montereybayaquarium.org - redirects to itself, which requires back twice to return to search results\n # www.livescience.com - causes intermittent timeouts.\n urls = [\n 'www.britannica.com', 'www.montereybayaquarium.org', 'www.livescience.com'\n ]\n for u in urls\n return true if url.include? u\n end\n return false\n end",
"def page_ok?(config, url)\n uri = URI.parse(url) rescue nil\n (uri.respond_to?(:host) && uri.host =~ config[\"host_re\"] &&\n uri.respond_to?(:path) && uri.path !~ %r{^/b/}).tap do |result|\n if !result\n puts \"Rejecting page #{url} for key #{config[\"key\"]}\"\n end\n end\n end",
"def spell_variant?(html)\n spell_variant(html) == @word\n end",
"def belongs_to_known_abbreviations? (word)\n abbreviations = [\n 'a.d.', 'a.i.', 'a.m.', 'ca.', 'cap.',\n 'cf.', 'cp.', 'c.v.', 'cwt.', 'd.v.',\n 'd.g.', 'ead.', 'etc.', 'e.g.', 'i.e.',\n 'i.a.', 'lib.', 'j.d.', 'lb.', 'll.b.',\n 'm.a.', 'm.o.', 'n.b.', 'p.a.', 'ph.d.',\n 'p.m.', 'p.m.a', 'p.p', 'p.s.', 'q.d.', \n 'q.e.d', 'q.v.', 'r.', 'r.i.p', 's.o.s', \n 'sic.', 'stat.', 'viz.' ]\n return abbreviations.include? word\n end",
"def enough_text_detected?\n text_length = @pages.inject(0) {|sum, page| sum + page[:text].length }\n text_length > (@pages.length * 100)\n end",
"def make_sure_location_isnt_dubious!(name)\n return if name.blank? || Location.where(name: name).any?\n citations =\n Location.check_for_empty_name(name) +\n Location.check_for_dubious_commas(name) +\n Location.check_for_bad_country_or_state(name) +\n Location.check_for_bad_terms(name) +\n Location.check_for_bad_chars(name)\n return if citations.none?\n raise DubiousLocationName.new(citations)\n end",
"def unpublished?\n /\\b(nom prov|comb prov|sensu lato|ined)\\b/i =~ author&.delete(\".\")\n end",
"def correction_existent_check\n # Check first if there is a correction\n page_content = PageContent.where(:page_id => self.id).where(:content_type => 'correction').order(id: :asc).last\n\n # If there isn't a correction,\n # Go to the ocr or text extraction\n if !page_content \n page_content = PageContent.where(:page_id => self.id).first\n end\n\n return page_content\n end",
"def is_existential_type\n @phrases.size == 1 and\n @phrases[0].is_a?(NounPhrase) and\n !@phrases[0].literal\n end",
"def does_not_include_badwords\n\n badwords = %w(\n aloha!\n href=\n -online\n 1freewebspace.com\n 4u\n 5gighost.com\n accutane\n adipex\n adultsex\n advicer\n alprazolam\n amoxil\n arcadepages\n arimidex\n associations.missouristate.edu\n ativan\n augmentin\n baccarrat\n baclofen\n beaver\n blackjack\n bllogspot\n blogs.blackmarble.co.uk\n blowjob\n booker\n buspar\n byob\n car-rental-e-site\n car-rentals-e-site\n carisoprodol\n casino\n casinos\n chatroom\n cialis\n cipro\n citalopram\n clomid\n clonazepam\n comment1\n comment2\n comment3\n comment4\n comment5\n comment6\n coolcoolhu\n coolhu\n credit-card-debt\n credit-report-4u\n creditonlinepersonalloans\n cwas\n cyclen\n cyclobenzaprine\n dating-e-site\n day-trading\n debt-consolidation\n debt-consolidation-consultant\n diazepam\n diovan\n discreetordering\n dostinex\n duty-free\n dutyfree\n dvxuser.com\n equityloans\n fanreach.com\n fioricet\n flagyl\n flowers-leading-site\n fosamax\n freenet\n freenet-shopping\n gambling-\n hair-loss\n health-insurancedeals-4u\n hi5.com\n holdem\n holdempoker\n holdemsoftware\n holdemtexasturbowilson\n homeequityloans\n homefinance\n hotel-dealse-site\n hotele-site\n hotelse-site\n hydrocodone\n hyves.mn\n incest\n insurance-quotesdeals-4u\n insurancedeals-4u\n isuzuforums.com\n jestmaster\n jizz\n jrcreations\n kaboodle.com\n kamagra\n klonopin\n lamictal\n lesbian\n levaquin\n levitra\n lezbian\n loans\n lorazepam\n lycos\n macinstruct\n metformin\n metronidazole\n mortgage-4-u\n mortgagequotes\n musicstation\n nojazzfest\n nolvadex\n online-gambling\n onlinegambling-4u\n ottawavalleyag\n ownsthis\n palm-texas-holdem-game\n paxil\n paydal\n penguinforum\n penis\n personalloansbad\n pharmacy\n phenergan\n phentermine\n poker-chip\n porn\n poze\n profiles.friendster.com\n propecia\n proscar\n pussy\n remeron\n rental-car-e-site\n ringtone\n ringtones\n roulette\n shemale\n shoes\n slot-machine\n Staphcillin\n tamiflu\n tegretol\n texas-holdem\n thorcarlson\n top-e-site\n top-site\n toprol\n toradol\n tramadol\n tramodal\n tramodol\n trim-spa\n ultram\n valeofglamorganconservatives\n valium\n viagra\n vibramycin\n vicodin\n vioxx\n voltaren\n vytorin\n xanax\n zantac\n zithromax\n zofran\n zolpidem\n zolus\n )\n badwords.each do |bw|\n if !comment.nil? && comment.downcase.include?(bw) \n errors.add_to_base(\"Comment Rejected\") \n break\n end\n end\n end",
"def has_bad_word(str)\n #Turn string (url or body) into UTF-8 and lower case\n new_str = str.force_encoding(\"UTF-8\").downcase\n bad_words = [\"spongebob\",\n \"britney spears\",\n \"paris hilton\",\n \"norrköping\"]\n return bad_words.any? { |word| new_str.include?(word) }\nend",
"def manuscript_chapter_contradicts?(chapter)\n chapter_in_mampf(chapter)&.title != chapter['description']\n end",
"def ambiguous_reciprocal_type?\n false\n end",
"def valid?\n return page_identifier?\n end",
"def exists_in_language(page, lang)\n pages = @context.registers[:site].pages_by_language\n bool = @context.registers[:site].config['language_default'] == lang || pages[lang][page].name.end_with?(\"#{lang}.md\")\n # puts \"exists_in_lang(#{page}, #{lang}) = #{bool}\"\n bool\n end",
"def find_page(pname, verify = true)\n\t\tlogger.debug \"looking up page: #{pname}\"\n\t\tlogger.debug \"verify find: #{verify}\"\n\t\tr = Wikipedia.find(pname)\n\t\t\n\t\t# parse disambiguation meta data\n\t\tunless is_artist_page? r\n\t\t\tlogger.debug \"check for disambiguation meta data\"\n\t\t\n\t\t\t# check for {about|A|B|1|C|2...|Z|N} patterns\n\t\t\t# where we are intrested in B|1 - Z|N\n\t\t\tm = r.content.scan(/\\{about\\|[\\w\\s]*((\\|[^\\}\\{\\|]*\\|[^\\}\\{\\|]*)*)\\}/) if r.content\n\t\t\tunless m == nil || m.empty? || m.first.empty?\n\t\t\t\t# l = [\"B\", \"1\", \"C\", \"2\", ... , \"Z\", \"N\"]\n\t\t\t\tl = m.first.first[1..-1].split(\"|\")\n\t\t\t\t1.step(l.size-1,2).each do |i|\n\t\t\t\t\t# check pages \"1\", \"2\" .. \"N\"\n\t\t\t\t\tp = find_page(l[i])\n\t\t\t\t\tr = p if p\n\t\t\t\t\tbreak\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\t\t\n\t\t# parse links\n\t\tlogger.debug \"follow links (desperate!)\" if !is_artist_page?(r) && is_disambiguation_page?(r)\n\t\tr = follow_links(r) if !is_artist_page?(r) && is_disambiguation_page?(r)\n\t\t\n\t\t# verify category\n\t\t(!verify || is_artist_page?(r)) ? r : nil\n\tend",
"def is_page?(page = '')\n return false unless @is_page\n\n return true if page.blank?\n\n page_obj = get_queried_object()\n\n page = [page] unless page.is_a?(Array)\n page.map!(&:to_s)\n\n if page_obj.is_a?(Railspress::Page) && page.include?(page_obj.id.to_s)\n return true\n elsif page_obj.is_a?(Railspress::Page) && page.include?(page_obj.post_title)\n return true\n elsif page_obj.is_a?(Railspress::Page) && page.include?(page_obj.post_name)\n return true\n else\n page.each do |pagepath|\n next unless pagepath.include?('/')\n pagepath_obj = get_page_by_path(pagepath)\n if !pagepath_obj.blank? && pagepath_obj.id == page_obj.id\n return true\n end\n end\n end\n false\n end",
"def is_negated_sentence?\n index = 1\n if @classified[index] && LogicalOperator::REGEX_UNARY.match(@classified[index].value)\n return true\n end\n false\n end",
"def is_it_extinct?\n if @page.has_checked_extinct?\n @page.is_extinct?\n else\n # NOTE: this relies on #displayed_extinction_data ONLY returning an \"extinct\" record. ...which, as of this writing,\n # it is designed to do.\n @page.update_attribute(:has_checked_extinct, true)\n if @page.displayed_extinction_data # TODO: this method doesn't check descendants yet.\n @page.update_attribute(:is_extinct, true)\n return true\n else\n @page.update_attribute(:is_extinct, false)\n return false\n end\n end\n end",
"def inferred_title?(document); end",
"def noun_articles_correct? set\n ((set & NOUNS).count >= 1) || ((set & ARTICLES).count >= 2)\n end",
"def excluded?(url)\n url = safe_unescape(url)\n @skip_list.each do |entry|\n return entry.last if url.include? entry.first\n return entry.last if entry.first == NULL_MATCH\n end\n\n false\n end",
"def page_title?\n @_page_title.present?\n end",
"def perfect_match\n query = @query.downcase.as_wiki_link\n page = all_pages.detect { |name| name.downcase == query }\n SearchResult.new(page, 1) if page\n end",
"def partial?\n\t\t\tlinks.by(:rel)['alternate'].any? do |l|\n\t\t\t\tl[3]=='application/atom+xml'||l[3]=='application/atom+xml;type=entry'\n\t\t\tend\n\t\tend",
"def validate_page_existence\n if page.blank?\n errors.add(:page_id, :invalid)\n return false\n end\n self.name = page['name']\n true\n end",
"def redirect?(page_title)\n form_data = {'action' => 'query', 'prop' => 'info', 'titles' => page_title}\n page = make_api_request(form_data).first.elements[\"query/pages/page\"]\n !!(valid_page?(page) and page.attributes[\"redirect\"])\n end",
"def word_overlap?(item)\n first_array = self.clean_description.split.declutter\n second_array = item.clean_description.split.declutter\n\n first_array.percentage_similarity_to(second_array) > 85 ? \"Too much word overlap\" : false\n end",
"def is_cesia?\n CESIA_UPN.include?(self.upn)\n end",
"def on_page?\n begin\n rcd_trait\n @trait = rcd_trait\n #consider adding a URL check here\n Watir::Wait.until { @trait.exists? && @trait.present? }\n return true\n rescue\n return false\n end\n end",
"def notranslate?\n @sequence.select { |item| item[/notranslate/] }.last == :notranslate\n end",
"def ios_element_exists?(query)\n second_query = nil\n\n if query.include? 'CONTAINS[c]'\n if query.include? 'marked'\n second_query = query.gsub('marked', 'accessibilityLabel')\n end\n if query.include? 'accessibilityLabel'\n second_query = query.gsub('accessibilityLabel', 'marked')\n end\n end\n\n if second_query.nil?\n return element_exists(query)\n else\n element_exists(query) || element_exists(second_query)\n end\n end",
"def error_page?\n popup_msg = get_el(doc.css('div#outsidecontainer'))\n return false if popup_msg.nil?\n return false if popup_msg.css('@style').to_s.match('display: none')\n return true if popup_msg.to_s.match(/error/i)\n return false\n end",
"def ambiguous_name?\n !!@ambiguous_name\n end",
"def is_privacy_policy?\n if !get_option( 'wp_page_for_privacy_policy' ).blank? && is_page?( get_option( 'wp_page_for_privacy_policy' ) )\n true\n else\n false\n end\n end",
"def columbia?\n # Columbia bib ids are numeric, or numeric with 'b' prefix for Law,\n # ReCAP partner data is \"SCSB-xxxx\"\n !id.start_with?('SCSB')\n end",
"def valid?(doi)\n !!(strip(doi) =~ Regexp.new('^' + DOI_PATTERN + '$'))\n end",
"def execute(msg, page)\n page.spacify!\n is_redir = wiki.page_redirect?(page)\n link = ISGD.shorten(\"http://ftb.gamepedia.com/#{page.underscorify}\")\n if is_redir.nil?\n msg.reply(\"#{page} does not exist on FTB Gamepedia.\")\n elsif is_redir\n msg.reply(\"#{page} exists on the wiki as a redirect: #{link}\")\n elsif !is_redir\n msg.reply(\"#{page} exists: #{link}\")\n end\n end",
"def is_xme(desc, description)\n\t\tterms = @search_terms[desc]\n\n\t\tmatch = true\n\t\tterms.each do |term|\n\t\t\tword_match = false\n\t\t\tterm.each do |word|\n\t\t\t\tif description.include?(word)\n\t\t\t\t\tword_match = true\n\t\t\t\t\tbreak\n\t\t\t\tend\n\t\t\tend\n\n\t\t\tif not word_match\n\t\t\t\tmatch = false\n\t\t\t\tbreak\n\t\t\tend\n\t\tend\n\n\t\treturn match\n\tend",
"def Lazyable?(doc)\n (doc.is_a?(Jekyll::Page) || doc.write?) &&\n doc.output_ext == \".html\" || (doc.permalink && doc.permalink.end_with?(\"/\"))\n end",
"def is_ambiguously_invalid?\n !is_valid? && (id == cached_valid_taxon_name_id)\n end"
] | [
"0.58703315",
"0.54242885",
"0.54069895",
"0.539946",
"0.5358175",
"0.5306936",
"0.52359647",
"0.52009255",
"0.5165459",
"0.5159461",
"0.5151909",
"0.51425034",
"0.50340337",
"0.50299156",
"0.50297064",
"0.5022898",
"0.5010143",
"0.49854195",
"0.49839526",
"0.49769145",
"0.49760756",
"0.49567747",
"0.4944832",
"0.49354884",
"0.49201536",
"0.49163437",
"0.49083582",
"0.49036103",
"0.48994866",
"0.48777306",
"0.48748866",
"0.48603633",
"0.4857761",
"0.484381",
"0.484201",
"0.484132",
"0.48408183",
"0.48154816",
"0.48113644",
"0.47958103",
"0.4761463",
"0.47590277",
"0.4745597",
"0.47370175",
"0.4731924",
"0.47290617",
"0.47188035",
"0.47160053",
"0.47093335",
"0.4707053",
"0.47028047",
"0.47026846",
"0.46991596",
"0.4695881",
"0.46941465",
"0.46929562",
"0.4687418",
"0.46852624",
"0.4674363",
"0.46664903",
"0.46577418",
"0.464887",
"0.46430653",
"0.46419075",
"0.46361715",
"0.46334174",
"0.46296465",
"0.46232706",
"0.46230376",
"0.46183664",
"0.46170652",
"0.46066844",
"0.46062836",
"0.4605329",
"0.460424",
"0.4600421",
"0.45956698",
"0.45835224",
"0.45804453",
"0.4578826",
"0.45734268",
"0.4572611",
"0.4570113",
"0.456991",
"0.4567142",
"0.45609716",
"0.45585352",
"0.4558044",
"0.4555613",
"0.45517638",
"0.45444298",
"0.45440224",
"0.4538631",
"0.45356",
"0.4531543",
"0.45312765",
"0.45298994",
"0.45291534",
"0.45278007",
"0.4526113"
] | 0.7768463 | 0 |
Checks if a wikipedia page belongs to any of a set of category. | def belongs_to_categories?(p, categories, only_last = false)
return false unless p && p.content && p.categories && p.title
@visited_pages << p.title
p.categories.each do |c|
c = c.split.last if only_last
if categories.include? c
logger.debug "found category!"
return true
else
logger.debug "missed category: #{c}"
end
end
logger.debug "not in any category"
return false
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def has_category?(category, article)\n if article[:categories].nil?\n false\n else\n article[:categories].include?(category)\n end\n end",
"def is_categories?\n is_entries? && params[:_taxonomies_].present? && params[:_slug_].present? && is_not_page?\n end",
"def is_category?( category = '' )\n return false unless @is_category\n\n return true if category.blank?\n\n cat_obj = get_queried_object\n\n category = [category] unless category.is_a?(Array)\n category.map!(&:to_s)\n\n if category.include?(cat_obj.term_id.to_s)\n return true\n elsif category.include?(cat_obj.name)\n return true\n elsif category.include?(cat_obj.slug)\n return true\n end\n false\n end",
"def has_categories?(company, *category_ids)\n return false if category_ids.empty?\n customer_category_ids = get_customer_categories(customer_id: company.id)\n customer_category_ids = as_array(customer_category_ids)\n (customer_category_ids & category_ids) == category_ids\n end",
"def only_categories?\n only? :categories\n end",
"def noun_articles_present? set\n ((set & NOUNS).count >= 1) || ((set & ARTICLES).count >= 2)\n end",
"def category_matches? cat_name\n return cat_name.include?(category) || category == cat_name\n end",
"def noun_articles_correct? set\n ((set & NOUNS).count >= 1) || ((set & ARTICLES).count >= 2)\n end",
"def has_categories?(target_categories)\n target_categories = [ target_categories ] if target_categories.class == Category\n target_categories.each do |target_category|\n placement = MovableType::AR::Placement.find(:first, :conditions => { :placement_blog_id => self.entry_blog_id, :placement_entry_id => self.entry_id, :placement_category_id => target_category.category_id })\n return false if placement.blank?\n end\n true\n end",
"def categorizable?\n self.content_type.presence && self.site.has_plugin?(:categories) && self.accept_categories\n end",
"def has_category?(item, category)\n return false if item[:categories].nil?\n item[:categories].collect{|c| c.downcase}.include? category.downcase\n end",
"def is_disambiguation_page?(p)\n\t\tlogger.debug \"is disambiguation page?\"\n\t\tbelongs_to_categories? p, [\n\t\t\t\"Category:All article disambiguation pages\",\n\t\t\t\"Category:All disambiguation pages\",\n\t\t\t\"Category:Disambiguation pages\",\n\t\t\t\"Kategori:Förgreningssidor\"\n\t\t]\n\tend",
"def searched_not_for_all?(sub_categories_ids)\n searched_for?(sub_categories_ids) && (sub_categories.ids - sub_categories_ids.map(&:to_i)).count > 0\n end",
"def searched_not_for_all?(sub_categories_ids)\n searched_for?(sub_categories_ids) && (sub_categories.ids - sub_categories_ids.map(&:to_i)).count > 0\n end",
"def has_category_by_type?(type)\n categories.where(:main_type => type).any?\n end",
"def has_category?(target_categories)\n target_categories = [ target_categories ] if target_categories.class == Category\n target_categories.each do |target_category|\n placement = MovableType::AR::Placement.find(:first, :conditions => { :placement_blog_id => self.entry_blog_id, :placement_entry_id => self.entry_id, :placement_category_id => target_category.category_id })\n return true unless placement.blank?\n end\n false\n end",
"def about_knowhow?\n category == \"knowhow\"\n end",
"def articles_with_category(category, posts=articles)\n posts.select { |article| has_category?(category, article) }\n end",
"def valid_categories?(community, category_attributes)\n is_community_category = category_attributes.map do |category|\n community.categories.any? { |community_category| community_category.id == category[:category_id].to_i }\n end\n\n is_community_category.all?\n end",
"def has_sidebar_content?\n publications.any? || external_resources.any? || authors.corresponding.any?\n end",
"def categories?\n false\n end",
"def categorical?\n value_type_code.in? %i[category multi_category]\nend",
"def has_home?(venue)\n catIds = venue.categories.map {|e| e.id}\n return catIds.length > 0 && catIds.include?(HOME_CAT_ID) && catIds.first != HOME_CAT_ID\n end",
"def all_words_valid? set\n (set & DICTIONARY) == set\n end",
"def isLinkedin?\n self.category =~ /(linkedin|linked-in)/i\n end",
"def has_categories\n @categories.empty? ? false : true\n end",
"def inside?(category)\n category == self || is_descendant_of?(category)\n end",
"def has_category?(name)\n categories.exists?(name: name)\n end",
"def has_categories? \n true\n end",
"def category_has_posts?\n\n current_status = false\n\n self.sub_categories.each do |sub_cat|\n current_status = sub_cat.posts.any?\n break if current_status == true\n end\n\n return current_status\n\n end",
"def valid_category_name?(category)\n category = category.to_sym\n\n return true if CATEGORIES.keys.include?(category)\n\n CATEGORIES.each do |k, v|\n if v[:children] && v[:children].keys.include?(category)\n return true\n end\n end\n\n false\n end",
"def filter_nav_categories?\n fetch(:nav_categories, nil).nil? ? NavConfig.categories_whitelist? : true\n end",
"def is_artist_page?(p)\n\t\treturn false unless p && p.content && p.categories && p.title\n\t\tbelongs_to_categories? p, [\n\t\t\t\"musicians\",\n\t\t\t\"artists\",\n\t\t\t\"duos\",\n\t\t\t\"groups\",\n\t\t\t\"singers\",\n\t\t\t\"guitarists\",\n\t\t\t\"gitarrister\",\n\t\t\t\"sångare\",\n\t\t\t\"grupper\",\n\t\t\t\"musiker\"\n\t\t], true\n\tend",
"def isCompany?\n self.category =~ /(company|index|currency)/i\n end",
"def sections_classes_all_there?\n sections_classes_to_check.flatten.all?(&:all_there?)\n end",
"def categories\n stories.map(&:category).delete_if {|c| c.nil? or c.global}.uniq\n end",
"def any_places?\n\t\ttwitter? or facebook? or googleplus? or myspace? or\n\t\tyoutube? or soundcloud? or spotify? or lastfm? or website?\n\tend",
"def check_availability_of_cargo_wagons\n @trains.each do |train|\n train.each do |element|\n if element.class != Symbol\n return false if element.wagons.any? && element.type == 'cargo'\n end\n end\n end\n end",
"def contains?(*pattns)\n pattns.any? do |pattn|\n words.any? { |wor| wor =~ pattn }\n end\n end",
"def has_category?(category_)\n @mutex.synchronize do\n @categories.has_key?(category_)\n end\n end",
"def valid_category_path?(category_path)\n CATEGORIES.each do |k, v|\n if v[:path] && v[:path] == category_path\n return true\n end\n\n if v[:children] && v[:children].values.include?(category_path)\n return true\n end\n end\n\n false\n end",
"def all_categories\n stories.map(&:category).delete_if {|c| c.nil?}.uniq\n end",
"def categories\n taxonomies.all :conditions => { :classification => :category }\n end",
"def term_multiple?( term )\n #puts \"=====> GenericWork.term_multiple? #{term}\"\n return true if [:keyword, :title, :contributor, :subject, :related_url, :sponsoring_agency, :admin_notes].include? term\n false\n end",
"def category_conditions\n [\"words.category LIKE ?\", \"%#{category}\"]\n end",
"def classification?(c)\n not [\"malicious\", \"non-malicious\", \"suspicious\", \"unknown\"].index(c).nil?\n end",
"def has_category?(user)\n has = HasCategory.where(users_id: user.id, categories_id: self[:id]).take\n return (has != nil)\n end",
"def is_channel_page?\n (channel && !category && !article)\n end",
"def restricted?\n pages.any? && pages.not_restricted.blank?\n end",
"def restricted?\n pages.any? && pages.not_restricted.blank?\n end",
"def restricted?\n pages.any? && pages.not_restricted.blank?\n end",
"def is_any?(*queried_roles)\n (queried_roles & roles).present?\n end",
"def has_categories?\n errors.add(:categories, \"An operation must have some categories.\") if self.categories.empty?\n end",
"def is_category_type? val\r\n val.include? category.category_type_code rescue false\r\n end",
"def create_categories_page?\n categories_shortcut != inventory_shortcut\n end",
"def one_match?(candidate_categories, result_age = nil)\n return false unless candidate_categories.one?\n\n candidate_category = candidate_categories.first\n match = candidate_category.include? self, result_age\n debug \"one_match? #{match}\"\n match\n end",
"def pm_is_in_ancestry?(vc, screen_names)\n screen_names.any? do |screen_name|\n vc.class.to_s.include?(screen_name) ||\n vc.class.ancestors.any? do |ancestor|\n screen_name.include?(ancestor.to_s)\n end\n end\n end",
"def show_collection_profile_navigation(collection, section)\n [\"intro\", \"faq\", \"rules\"].each do |s|\n if show_collection_section(collection, s) && s != section\n return true # if at least one other section than the current one is not blank, we need the navigation; break out of the each...do\n end\n end\n return false # if it passed through all tests above and not found a match, then we don't need the navigation\n end",
"def section_classes_all_there?\n section_classes_to_check.all?(&:all_there?)\n end",
"def has_category_as_preference(category)\n self.categories.include?(category)\n end",
"def categories_validate(categories)\r\n categories = categories.split(',')\r\n user_message = \"\"\r\n cats_seen = []\r\n categories.each do |cat|\r\n cat.strip!\r\n next if cats_seen.include?(cat)\r\n cats_seen << cat\r\n user_message << \" Category '#{cat}' was too long.\" if cat.length > 25\r\n good_chars = [*'0'..'9', *'a'..'z', *'A'..'Z', '/', '-', '(', ')', '&',\r\n '#', '@', '+', '.', '?', '!'].join ' '\r\n word_chars = [*'0'..'9', *'a'..'z', *'A'..'Z'].join\r\n unless cat.split(//).all? {|char| good_chars.include?(char) }\r\n user_message << \" Category '#{cat}' had weird characters.\"\r\n end\r\n unless cat.split(//).any? {|char| word_chars.include?(char)}\r\n user_message << \" Category '#{cat}' lacks a letter or digit.\"\r\n end\r\n end\r\n return user_message unless user_message == \"\"\r\n return true\r\n end",
"def whitelisted_page?(page)\n return false unless page\n return false if /:/.match page\n page[0..5] == '/wiki/' ? true : false\n end",
"def has_wiki?\n !!wiki_pages\n end",
"def check_categories!\n\n self.categories.map! do |category|\n if (not category.saved?) and loaded_category = Term.get(category.id)\n loaded_category\n else\n category\n end\n end\n\n end",
"def proper_pages\n Page.where(:_type.in => proper_types)\n end",
"def matches?(candidates)\n candidates.any? && candidates.all? { |l| @languages.include?(l.name) }\n end",
"def manage_categories?\n post_type.manage_categories?\n end",
"def has_related_clinics?\n if under_supervision_clinics.count > 0 || clinics.count > 0\n return true\n end\n return false\n end",
"def all_occurrances_of(klass, array)\n array.each do |instance|\n if !instance.instance_of?(klass)\n return false\n end\n end\n return true\n end",
"def feature_with_category?\n if @feature_with_category.nil?\n @feature_with_category = %w(category both).include?(featured)\n end\n @feature_with_category\n end",
"def is_home?(venue)\n catIds = venue.categories.map {|e| e.id}\n return catIds.length > 0 && catIds.first == HOME_CAT_ID\n end",
"def has_condition? listing\n !listing.is_category_type? %w(employment service event housing item)\n end",
"def is_in_current_goal_category?(category)\n if self.category == category \n true\n else\n false\n end\n end",
"def dictionary_words? set\n (set & DICTIONARY) == set\n end",
"def check_subcategorias\n if subcategorias.size > 0\n errors.add(:base, I18n.t(\"categoria.tiene_subcategorias_error\"))\n false\n end\n end",
"def linked_category?\n return true if choices.any? do |choice|\n choice.category.present? && choice.category.not_deleted?\n end\n\n false\n end",
"def category_produits?()\n return (self.category.code.eql?('produits_phyto')) \n end",
"def descendant_of?(category, options = {})\n category.descendants.exists?(id)\n end",
"def can?(action, page)\n permissions.count(:conditions => ['page_id = ? AND action = ?', page.id, action.to_s]) > 0\n end",
"def test_toplevel\n assert(categories(:category1).toplevel?)\n assert(!categories(:category2).toplevel?)\n assert(!categories(:category3).toplevel?)\n end",
"def include?(item, *args, &block)\n if @category == :all\n return true\n elsif ![:item, :weapon, :armor, :none].include?(@category) && item.is_a?(RPG::BaseItem)\n return item.masai_special_categories.include?(@category)\n else\n super(item, *args, &block)\n end\n end",
"def check_category(text)\n if @browser.link(:title=>text).exists? == false\n puts \"\\nCategory...\\n#{text}\\n...not found in list!\\n\\nPlease check for typos in your test data.\\n\"\n end\n if @browser.link(:title=>text).visible? == false\n @browser.link(:title=>text).parent.parent.parent.ins.click\n end\n if @browser.link(:title=>text).parent.class_name =~ /jstree-unchecked/\n @browser.link(:title=>text).click\n end\n sleep 0.3\n end",
"def belongs?(category)\n @itype_id == 3 && @subtype_id == category\n end",
"def prerequisite_check(category)\n incomplete[category].values.flatten.flat_map do |course|\n course.can_take?(user, transcripts, taken_courses.map(&:id))\n end.compact\n end",
"def is_found_exactly_in?(array_of_courses)\n # Define the list of attributes to match. This list must be updated regularly.\n key_attributes = [\n \"crn\",\n \"gwid\",\n \"section\",\n \"course_name\",\n \"hours\",\n \"days\",\n \"day1_start\",\n \"day1_end\",\n \"day2_start\",\n \"day2_end\",\n \"day3_start\",\n \"day3_end\",\n \"day4_start\",\n \"day4_end\",\n \"day5_start\",\n \"day5_end\",\n \"day6_start\",\n \"day6_end\",\n \"day7_start\",\n \"day7_end\",\n \"llm_only\",\n \"jd_only\",\n \"course_name_2\",\n \"alt_schedule\",\n \"additional_info\",\n \"professor\",\n \"prof_id\",\n \"final_time\",\n \"final_date\",\n \"school\"\n ]\n return Scraper.deep_match_course_attributes(key_attributes, self, array_of_courses)\n end",
"def all_there?(recursion: :one)\n if recursion == :one || SitePrism.recursion_setting == :one\n current_class_all_there? &&\n section_classes_all_there? &&\n sections_classes_all_there?\n else\n current_class_all_there?\n end\n end",
"def has_subject? subject, &block\n found = categories.any? {|cat| cat.include? subject }\n yield if found && block\n found\n end",
"def potential_categories\n if categories.length > 0\n Category.all(:conditions => \"id NOT IN (#{category_ids})\")\n else\n Category.all\n end\n end",
"def is_tags?\n is_categories? && params[:_taxonomies_] == 'post_tag'\n end",
"def check_pages\n if pages.length > 0\n return false\n end\n return true\n end",
"def valid_page page\n # ignore case\n if page\n page.downcase!\n else\n return false\n end\n # verify page name\n exists = false\n if page == 'about'\n exists = true\n end\n if page == 'contact'\n exists = true\n end\n if page == 'welcome'\n exists = true\n end\n if page == 'info'\n exists = true\n end\n return exists\n end",
"def include?(quest_id, list_type = :all)\n return false if !revealed?(quest_id)\n case list_type\n when :all then true\n when :complete, :failed, :active then @data[quest_id].status?(list_type)\n else\n @data[quest_id].custom_categories.include?(list_type)\n end\n end",
"def is_one_of?(*classes)\n !!classes.find{|c| is_a?(c)}\n end",
"def isKeyword?\n self.category =~ /(keyword)/i\n end",
"def any?\n !total_pages.zero?\n end",
"def valid_context?(selected_page_layout, taxon)\n # 当前设计是,只有具有上下文的page_layout,需要stylish,同时页面可以共享头部和尾部\n # 如 文章列表/产品列表页有多种显示方式。 有的是文件下载,有的是新闻\n #\n #stylish only apply page_layout with context other than either.\n if !selected_page_layout.context_either? #selected_page_layout.stylish >0 #\n # Rails.logger.debug \"--------selected_page_layout=#{ selected_page_layout.title} --------\"\n # page_layout.stylish_with_inherited is required, child should get stylish from accestor\n return false unless ( selected_page_layout.stylish_with_inherited == taxon.stylish_with_inherited )\n end\n\n specific_taxons = assigned_resources( Spree::SpecificTaxon, selected_page_layout).compact\n specific_taxon_ids = specific_taxons.collect(&:id)\n is_valid = (selected_page_layout.valid_context?(taxon.current_context))\n\n if is_valid && specific_taxon_ids.present?\n is_valid = specific_taxon_ids.include?(taxon.id)\n unless is_valid\n is_valid = specific_taxons.map{|specific_taxon| taxon.is_descendant_of?(specific_taxon) }.include?( true )\n end\n end\n\n is_valid\n end",
"def any_tags?\n graph.exist?(\"og\")\n end",
"def filterable?\n !linked_category?\n end",
"def able_to_any?(*required_permissions)\n perms = required_permissions.map(&:to_sym)\n permissions.any? do |p| \n perms.include?(p.name.to_sym) \n end\n end",
"def items_with_category(category, items=nil)\n items = @items if items.nil?\n items.select { |item| has_category?( item, category ) }\n end"
] | [
"0.61809206",
"0.6176498",
"0.61694133",
"0.59047145",
"0.58895195",
"0.58895147",
"0.5861115",
"0.5765175",
"0.5750978",
"0.5708998",
"0.57068056",
"0.56875134",
"0.5580927",
"0.5580927",
"0.55788463",
"0.5572558",
"0.5499731",
"0.5487446",
"0.5482448",
"0.5478568",
"0.54333615",
"0.5413237",
"0.5393916",
"0.53922147",
"0.5350074",
"0.53167576",
"0.5304861",
"0.5297925",
"0.52929527",
"0.5288327",
"0.52862346",
"0.52634686",
"0.52597874",
"0.5211792",
"0.52096605",
"0.5206259",
"0.51853895",
"0.5179124",
"0.5175039",
"0.51574665",
"0.5147338",
"0.51469153",
"0.51468825",
"0.514074",
"0.5101254",
"0.51000017",
"0.5091536",
"0.5073259",
"0.50671256",
"0.50671256",
"0.50671256",
"0.5065516",
"0.5051689",
"0.5048033",
"0.50465876",
"0.5042669",
"0.5033044",
"0.50236046",
"0.5015187",
"0.50125635",
"0.49997526",
"0.49910462",
"0.49903846",
"0.4987997",
"0.49607703",
"0.49586254",
"0.49540928",
"0.4951436",
"0.49509412",
"0.49508348",
"0.49470758",
"0.4911147",
"0.49082375",
"0.4903049",
"0.48994163",
"0.4892632",
"0.4888723",
"0.48863378",
"0.48812753",
"0.48785287",
"0.4870022",
"0.48697594",
"0.48624232",
"0.4856522",
"0.4842293",
"0.48412958",
"0.48379678",
"0.48330984",
"0.48262373",
"0.48233446",
"0.4810449",
"0.48094532",
"0.47978905",
"0.4795043",
"0.47903022",
"0.47896755",
"0.4788683",
"0.4786489",
"0.4783437",
"0.47793725"
] | 0.6776344 | 0 |
The language subdomain on Wikipedia for a given locale. | def langtag(locale)
case locale.to_s
when 'se' then 'se'
when 'us' then 'en'
when 'uk' then 'en'
when 'cn' then 'zh'
else locale
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_locale_from_subdomain\n locale = @rh.match( /(.+)\\.demowatch\\.[a-z]{2,3}$/i)[1]\n return locale if ( I18N_ALL_LANGUAGES.include?( locale))\n return nil\n end",
"def extract_locale_from_subdomain\n parsed_locale = request.subdomains.first\n \n end",
"def extract_locale_from_subdomain\n parsed_locale = request.subdomains.first\n I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\nend",
"def extract_locale_from_subdomain\n parsed_locale = request.subdomains.first\n I18n.available_locales.include?(parsed_locale.try(:to_sym)) ? parsed_locale : nil\n end",
"def extract_locale_from_subdomain\n @parsed_locale = request.subdomains.first\n if @parsed_locale.blank?\n @parsed_locale = 'en'\n end\n I18n.available_locales.include?(@parsed_locale.to_sym) ? @parsed_locale : 'en'\n end",
"def extract_locale_from_subdomain\n parsed_locale = request.subdomains.first\n if parsed_locale != nil\n I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\n else\n return nil\n end\n end",
"def extract_locale_from_tld\n parsed_locale = request.host.split('.').last\n \n end",
"def extract_locale_from_subdomain\n\t\t parsed_locale = request.subdomains.first || I18n.default_locale\n\t\t I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\n\t\tend",
"def extract_locale_from_tld\n parsed_locale = request.host.split('.').last\n (I18n.available_locales.include? parsed_locale) ? parsed_locale : nil\n end",
"def extract_locale_from_tld\n parsed_locale = request.host.split('.').last\n (I18n.available_locales.include? parsed_locale) ? parsed_locale : nil\n end",
"def extract_locale_from_subdomain\n unless request.subdomains.empty?\n parsed_locale = request.subdomains.first\n else # Assume no tld if no subdomains (assume something like \"es.localhost\")\n parsed_locale = request.domain.split('.')[0]\n end\n if parsed_locale\n if I18n.available_locales.include?(parsed_locale.intern)\n parsed_locale.intern\n else\n nil\n end\n end\n end",
"def extract_locale_from_tld\n parsed_locale = request.host.split('.').last\n I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\nend",
"def locale_switch_subdomain_url(locale)\n route_localize_switch(locale, subdomain: locale)\n end",
"def extract_locale_from_tld\n parsed_locale = request.host.split('.').last\n I18n.available_locales.map(&:to_s).include?(parsed_locale) ? parsed_locale : nil\n end",
"def extract_locale_from_tld\n parsed_locale = request.host.split('.').last\n I18n.available_locales.map(&:to_s).include?(parsed_locale) ? parsed_locale : nil\n end",
"def extract_locale_from_tld\n parsed_locale = request.host.split('.').last\n I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\n end",
"def extract_locale_from_tld\n # parsed_locale = request.host.split('.').last\n # I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\n parsed_locale = request.url.split('/')\n if !parsed_locale[3].blank?\n I18n.available_locales.include?(parsed_locale[3].to_sym) ? parsed_locale[3] : nil\n end\n end",
"def extract_locale_from_tld\n \n parsed_locale = request.host.split('.').last\n I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\n end",
"def wikipedia_url\n \"http://en.wikipedia.org/wiki/ISO_639:#{iso_639}\"\n end",
"def extract_locale_from_tld\n parsed_locale = request.host.split('.').last\n I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\n end",
"def subdomain\n ([self.short_name] + self.class.dalianshops.domain.split('.')[1..-1]).join('.')\n end",
"def extract_locale_from_tld\n parsed_locale = request.domain.split('.').first\n I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\n end",
"def wikipedia_link\n\t\tp = localized_page\n\t\tbase = \"https://#{langtag(I18n.locale)}.wikipedia.org\"\n\t\treturn base unless p && p.title\n\t\t\"#{base}/wiki/#{p.title}\"\n\tend",
"def lang2host(lang)\n\t\thost = request.host.split('.')\n\t\tunless host[-1].in? ['dev','io'] # don't touch development TLDs\n\t\t\tcase lang\n\t\t\twhen 'cn' then host[-1] = 'cn'\n\t\t\telse host[-1] = 'com'\n\t\t\tend\n\t\tend\n\t\thost.join('.')\n\tend",
"def subdomain\n ([self.short_name] + self.class.admin_site.domain.split('.')[1..-1]).join('.')\n end",
"def subdomain\n host.split(\".\").first\n end",
"def public_url(locale=nil)\n locale ||= ::Globalize.locale\n p = self.permalink(locale)\n return nil unless p.presence\n u = [section.permalink, \"categories\", p]\n u.unshift(locale.to_s) if (locale.to_sym != site.default_locale)\n u = u.join('/')\n u = '/' + u\n u\n end",
"def subdomain\n self.name.gsub('_', '.')\n end",
"def host\n HOSTS[locale]\n end",
"def subdomain\n ENV['DESK_SUBDOMAIN']\n end",
"def to_sub_domain\n return nil unless to_host\n\n dot_domain = \".#{to_domain}\"\n return nil unless include?(dot_domain)\n\n sub_domain = to_host.sub(dot_domain, '')\n Wgit::Url.new(sub_domain)\n end",
"def locale_name\n YAML.load(translation || \"{}\").with_indifferent_access[locale] || survey.default_locale_name\n end",
"def public_url(locale=nil)\n #Rails.cache.fetch(\"public_url-#{Globalize.locale}-#{self.cache_key}\") do\n locale ||= ::Globalize.locale\n p = self.permalink(locale)\n return nil unless p.presence\n u = [p]\n u.unshift(locale.to_s) if (locale.to_sym != site.default_locale.to_sym)\n u = u.join('/')\n u = '/' + u\n u\n #end\n end",
"def subdomain\n get()[\"app\"][\"subdomain\"]\n end",
"def subdomain(host)\n subdomains(host).first\n end",
"def extract_locale_from_tld\n I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil\n end",
"def extract_locale_from_subdomain(only_available_locales = false)\n parsed_locale = filter_locale(self.subdomain, only_available_locales)\n LocalE.log_result 'subdomains', request.subdomains, parsed_locale, 'no valid sub domain', 'locale'\n parsed_locale\n end",
"def subdomain\n #for debug at localhost\n return self.class.system_top_domain if self.class.system_top_domain == 'localhost'\n short_name + '.' + self.class.system_top_domain\n end",
"def localized_page\n\t\treturn @page if @page\n\t\tl = langtag(I18n.locale)\n\t\t\n\t\tWikipedia.Configure do\n\t\t\tdomain \"#{l}.wikipedia.org\"\n\t\t\tpath \"w/api.php\"\n\t\tend\n\t\tp = page\n\t\tif p == nil || p.content == nil\n\t\t\tlogger.debug \"defaulting to english\"\n\t\t\tWikipedia.Configure do\n\t\t\t\tdomain \"en.wikipedia.org\"\n\t\t\t\tpath \"w/api.php\"\n\t\t\tend\n\t\t\tp = page\n\t\telse\n\t\t\tlogger.debug \"sending translated\"\n\t\tend\n\t\t@page = p\n\t\t@page\n\tend",
"def htlal_wiki_url\n \"http://learnanylanguage.wikia.com/wiki/#{name.gsub(' ', '_')}\"\n end",
"def set_locale\n if request.subdomain == 'en'\n I18n.locale = request.subdomain\n else\n I18n.locale = params[:locale] || I18n.default_locale\n end\n end",
"def subdomain(tld_length = T.unsafe(nil)); end",
"def project_name\n locales_CEW.websiteName\n end",
"def exctract_locale_from_url(url)\n url[/^([^\\/]*\\/\\/)?[^\\/]+\\/(\\w{2})(\\/.*)?/,2]\n end",
"def locale_to_translate_into\n multilanguage_site = settings.multilanguage_site\n default_language = settings.default_language\n if multilanguage_site and session[:locale] != default_language\n session[:locale]\n else\n nil\n end\n end",
"def get_locale(host)\r\n host.gsub(I18n.config.host_locale_regex, '\\1') || I18n.default_locale\r\n end",
"def locale_defaults\n if by_subdomain?\n defaults.merge(subdomain: locale.to_s)\n else\n defaults.merge(locale: locale.to_s)\n end\n end",
"def publanguage_label\n if publanguage_object\n return publanguage_object[:label]\n else\n return publanguage\n end\n end",
"def canonical_tld?; end",
"def subdomain(target, page: 1)\n params = { page: page }\n _get(\"/query/domains/subdomain/#{target}\", params) { |json| json }\n end",
"def extract_locale_from_request\r\n # locale defined in parameters\r\n return params[:locale] if params[:locale]\r\n # get locale from subdomains\r\n parsed_locale = request.subdomains.first\r\n return parsed_locale if I18n.available_locales.map(&:to_s).include?(parsed_locale)\r\n # get locale from http header\r\n return request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first if request.env['HTTP_ACCEPT_LANGUAGE']\r\n # get default locale\r\n return I18n.default_locale\r\n end",
"def extract_locale_from_tld(only_available_locales = false)\n parsed_locale = filter_locale(self.top_level_domain, only_available_locales)\n LocalE.log_result 'host', request.host, parsed_locale, 'no valid top level domain', 'locale'\n parsed_locale\n end",
"def test_self_domain_to_labels\n assert_equal %w( com live spaces someone ),\n PublicSuffix::Domain.domain_to_labels(\"someone.spaces.live.com\")\n assert_equal %w( com zoho wiki leontina23samiko ),\n PublicSuffix::Domain.domain_to_labels(\"leontina23samiko.wiki.zoho.com\")\n end",
"def domain\n return @domain if defined? @domain\n\n @domain = begin\n PublicSuffix.parse(normalized_domain, default_rule: nil)\n rescue PublicSuffix::DomainInvalid, PublicSuffix::DomainNotAllowed\n nil\n end\n end",
"def extlang\n return nil unless @language\n decompose_language unless @primary\n @extlang\n end",
"def for_language(locale)\n translations.select { |word| word.locale == locale }\n end",
"def request_subdomain\n request.host.split(/\\./).first\n end",
"def domain\n URI(base_url).host.downcase\n end",
"def current_website\n subdomain ||= request.subdomain\n end",
"def other_locales_with_translations(website)\n all_locales_with_translations(website) - [I18n.locale.to_s]\n end",
"def locale_path(locale)\n locale_regexp = %r{/(en|de)/?}\n if request.env['PATH_INFO'] =~ locale_regexp\n \"#{request.env['PATH_INFO']}\".gsub(locale_regexp, \"/#{locale}/\")\n else\n \"/#{locale}#{request.env['PATH_INFO']}\"\n end\n end",
"def website_domain\n 'www.' + base_domain\n end",
"def name(locale = :pl)\n @name[locale.to_s]\n end",
"def subdomains(tld_length = 1) \n parts = host.split('.')\n parts[0..-(tld_length+2)]\n end",
"def extract_locale_from_request\r\n # locale defined in parameters\r\n return params[:locale] if params[:locale]\r\n # get locale from subdomains\r\n parsed_locale = request.subdomains.first\r\n return parsed_locale if I18n.available_locales.map(&:to_s).include?(parsed_locale)\r\n # get locale from http header\r\n return request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first if request.env['HTTP_ACCEPT_LANGUAGE']\r\n # get default locale\r\n return I18n.default_locale\r\n end",
"def translation\r\n translation_for(Mongoid::Globalize.locale)\r\n end",
"def subdomain_for(params)\n \n organization = params[:organization]\n email = params[:email]\n \n organization = Organization.find_by_email(email) if email\n \n if organization && organization.association then\n organization.association.subdomain \n else\n ''\n end\n end",
"def lang locale\n if translations.find_by(locale: locale).try(:automated?)\n \"#{locale}-x-mtfrom-de\"\n else\n locale.to_s\n end\n end",
"def polyglot_language_name\n language.name.split[0].downcase\n end",
"def locale\n (self.country.blank? or self.country.indonesia?) ? :id : :en\n end",
"def to_domain\n domain = @uri.domain\n domain ? Wgit::Url.new(domain) : nil\n end",
"def to_domain\n domain = @uri.domain\n domain ? Wgit::Url.new(domain) : nil\n end",
"def set_locale\n locale = request.subdomains.first\n locale = (logged_in? ?\n current_user.profile.language :\n browser_language) if locale.blank? || !I18n.available_locales.include?(locale.to_sym)\n I18n.locale = locale\n end",
"def to_deepl_compatible_locale(locale)\n locale.to_s.split('-', 2).first.upcase\n end",
"def ruta_externa\n @base = \"http://www.gis3.com\"\n\n if I18n.locale == :es\n return @base + '/espanol'\n\n elsif I18n.locale == :en\n return @base + '/english'\n\n end\n\n end",
"def wikipedia\n uri = nil\n @artist_data[\"relations\"].each do |rel|\n if rel[\"type\"] == \"wikipedia\"\n uri = rel[\"url\"][\"resource\"]\n end\n end\n return uri\n end",
"def extract_subdomain(host, tld_length); end",
"def domain\n unless @domain\n if defined? ActiveSupport::CoreExtensions::String::Inflections\n @domain = name.tableize\n else\n @domain = name.downcase\n end\n end\n @domain\n end",
"def domain\n @domain ||= PublicSuffix.parse(@fqdn).domain\n end",
"def default_short_domain\n Fanforce::Base::DomainEnvironments.method(environment).call[:default_short_domain]\n end",
"def primary_sub_domain_base\n @attributes[:primary_sub_domain_base]\n end",
"def website_location_name(key)\n I18n.t(\"websites.location.#{key}\")\n end",
"def get_lang_from_headers\n\t\t\t@env['HTTP_ACCEPT_LANGUAGE'].to_s[0, 2]\n\t\tend",
"def locale\n if !language.nil?\n language.abbreviation\n elsif !org.nil?\n org.locale\n end\n end",
"def get_locale\n if !self.language.nil?\n return self.language.abbreviation\n elsif !self.org.nil?\n return self.org.get_locale\n else\n return nil\n end\n end",
"def extract_locale_from_accept_language_header\n lang = request.env['HTTP_ACCEPT_LANGUAGE']\n lang.split(\",\")[0].to_sym if lang\n end",
"def default_account_subdomain\n\t\t'www'\n\tend",
"def extract_locale_from_accept_language_header\n request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first\n end",
"def extract_locale_from_accept_language_header\n request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first\n end",
"def extract_locale_from_accept_language_header\n request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first\n end",
"def get_locale\n if !self.language.nil?\n return self.language.abbreviation\n else\n return nil\n end\n end",
"def localization_info_for_language(lang, connection)\n\t# Starting iOS9, the localization format is <language>-<country_code>\n\t# For example he-IL : he (hebrew language preffered) and IL (Israel)\n\t# We only care here about the preffered language.\n\tif lang =~ /-/i\n\t\tlang = lang.split(\"-\")[0]\n\tend\n\n\t# Some android devices send \"iw\" when hebrew is the preffered language\n\tif lang == \"iw\" then lang = \"he\" end\n\t\n\t# Search for the exact language\n\tinfo = connection.db().collection(\"translations\").find({\"_id\"=>lang}).to_a\t\n\t\n\t# If not found, search for the more general one.\n\tls_lang = less_specific_language(lang)\n\tinfo = connection.db().collection(\"translations\").find({\"_id\"=>ls_lang}).to_a if ls_lang != nil && info.count != 1\t\n\n # If still not found, just get english as fallback\n\tinfo = connection.db().collection(\"translations\").find({\"_id\"=>\"en\"}).to_a if info.count != 1\n\n\t# return the localisation info\n\tif info.count == 1\n\t\treturn info[0]\n\tend\n\t\n\treturn nil\nend",
"def subdomains(tld_length = T.unsafe(nil)); end",
"def language\n fetch('nation.language')\n end",
"def domain_name(subdomain: T.unsafe(nil), domain: T.unsafe(nil)); end",
"def set_website_locale\n app_locales = %w(es ca)\n I18n.locale = params[:lang] if app_locales.include?(params[:lang])\n end",
"def extract_locale_from_accept_language_header\n request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z] {2} /).first\n end",
"def locale_language(locale = nil)\n (locale || I18n.locale).to_s.match(/^(\\w{2})/) ? $1.to_sym : nil\n end",
"def domain\n URI.parse(@config.split('<')[0].split('->')[0])\n end",
"def _sub_domain\n\n _save = self.pos\n while true # choice\n _tmp = apply(:_domain_ref)\n break if _tmp\n self.pos = _save\n _tmp = apply(:_domain_literal)\n break if _tmp\n self.pos = _save\n break\n end # end choice\n\n set_failed_rule :_sub_domain unless _tmp\n return _tmp\n end",
"def translation_domain?\n @tenant.try(:subdomain) == Rails.configuration.translations_subdomain\n end"
] | [
"0.7314222",
"0.71147114",
"0.6974773",
"0.6935492",
"0.6918029",
"0.6894525",
"0.6878252",
"0.67344934",
"0.6674478",
"0.6671673",
"0.6667469",
"0.65882504",
"0.6587749",
"0.65506876",
"0.65506876",
"0.6528819",
"0.6513491",
"0.6497776",
"0.64835715",
"0.6436007",
"0.6333164",
"0.6317224",
"0.6227605",
"0.62216246",
"0.6212207",
"0.61484724",
"0.60653317",
"0.6031616",
"0.59879625",
"0.5926207",
"0.5902675",
"0.58820736",
"0.58414555",
"0.5809014",
"0.57529867",
"0.57410556",
"0.57311267",
"0.571539",
"0.571064",
"0.5703254",
"0.5690622",
"0.5658273",
"0.564492",
"0.5598887",
"0.5568883",
"0.5542643",
"0.5540433",
"0.5532743",
"0.55277145",
"0.5526218",
"0.55084044",
"0.5508072",
"0.55038977",
"0.550266",
"0.5475265",
"0.5469831",
"0.54624134",
"0.54588395",
"0.5447448",
"0.54458183",
"0.54446703",
"0.54443187",
"0.5443024",
"0.5433912",
"0.54250234",
"0.54250085",
"0.54201376",
"0.5418991",
"0.5409531",
"0.5404327",
"0.540307",
"0.540307",
"0.53960365",
"0.53945214",
"0.5389745",
"0.53873503",
"0.5385705",
"0.53856957",
"0.53836155",
"0.5375811",
"0.5375197",
"0.53695416",
"0.53634995",
"0.53627384",
"0.5356091",
"0.5352549",
"0.5342554",
"0.53421885",
"0.53421885",
"0.53421885",
"0.5341118",
"0.5339153",
"0.53371805",
"0.5336357",
"0.5330179",
"0.5329593",
"0.53280395",
"0.5327664",
"0.5322365",
"0.5310852",
"0.5293844"
] | 0.0 | -1 |
If some of the pagination fields are present all of the required ones should be present | def all_pagination_is_present
return unless pagination && count.nil?
errors.add(:count, ErrorMessage["should be present if pagination is being used", "6.4"])
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def all_pagination_is_present\n if current.nil?\n errors.add(\n :current,\n ErrorMessage[\"should be present if pagination is being used\", \"6.4\"]\n )\n end\n if per_page.nil?\n errors.add(\n :per_page,\n ErrorMessage[\"should be present if pagination is being used\", \"6.4\"]\n )\n end\n if count.nil?\n errors.add(\n :count,\n ErrorMessage[\"should be present if pagination is being used\", \"6.4\"]\n )\n end\n return unless pages.nil?\n\n errors.add(\n :pages,\n ErrorMessage[\"should be present if pagination is being used\", \"6.4\"]\n )\n end",
"def all_pagination_is_present\n errors.add(:current, ErrorMessage[\"should be present if pagination is being used\", \"6.4\"]) if current.nil?\n errors.add(:per_page, ErrorMessage[\"should be present if pagination is being used\", \"6.4\"]) if per_page.nil?\n errors.add(:count, ErrorMessage[\"should be present if pagination is being used\", \"6.4\"]) if count.nil?\n errors.add(:pages, ErrorMessage[\"should be present if pagination is being used\", \"6.4\"]) if pages.nil?\n end",
"def page_params \n params.has_key?(:pagination) ? get_page_params( params.require(:pagination) ) : {}\n end",
"def pagination_candidate?(config, page); end",
"def page_parameters_defined?\n if params[:document_counter].nil? || current_per_page==0\n @query_params[:page]=1\n logger.warn \"document_counter or current_per_page parameters are not defined, return to the first search page\"\n false\n else\n true\n end\n end",
"def paginatable?; paginatable; end",
"def paginate; false; end",
"def pagination_needed?\n # Using #to_a stops active record trying to be clever\n # by converting queries to select count(*)s which then need to be repeated.\n @pagination_needed ||= primary_records.to_a.size > API_PAGE_SIZE\n end",
"def read_fields_and_setup response = false\n \n @continue = false\n setup = {}\n fields = {}\n \n # list of blocks that, combined, represent the setup of the next request\n setup_blocks = {\n \n # page_no, move to next?\n :page_no => lambda do |response|\n if response && response.scalar_query(items_on_page_path).to_i > 0\n fields[page_no] = (self.current_page += 1)\n @continue = true\n logger.info \"Paging to page no #{self.current_page}\"\n elsif response && response.scalar_query(items_on_page_path).to_i == 0\n logger.info \"That's all folks, no more items\" if response\n end\n end,\n \n # endpoint: must come last, as replaces all request fields\n :next_page_complete_endpoint => lambda do |response|\n if response && endpoint = response.scalar_query(next_page_complete_endpoint)\n # no other fields required\n setup = {:endpoint => endpoint, :fields => {}}\n @continue = true\n logger.info \"Paging to complete endpoint, #{endpoint}\"\n end\n end\n }\n \n setup_blocks.each do |setup_related_key, setup_block|\n setup_block.call(response) if self[setup_related_key]\n end\n \n [setup, fields]\n end",
"def apply_pagination?(options)\n JSONAPI.configuration.default_paginator != :none &&\n (options[:paginate].nil? || options[:paginate])\n end",
"def paginated?\n @pages and @pages.length > 1\n end",
"def pagination_info\n @response ? super : {}\n end",
"def pagination_enabled?(site); end",
"def load_pagination\n @page = (params[:page].blank? ? 1 : params[:page].to_i)\n @per_page = 15\n if @page.negative?\n response = {\n errors: [I18n.t('errors.negative_page')]\n }\n render status: :bad_request, json: response\n return false\n end\n end",
"def paginate!\n paginated?? nil : page!(1)\n end",
"def paginate?\n @paginator || @condition_blocks.any?(&:paginate?)\n end",
"def azzert_invariants(pagination)\n assert_response :success\n\n assert_empty css_select(\".translation_missing\"),\n \"missing translations\"\n\n refute_empty css_select(\".foliate-pagination\"),\n \"missing wrapper div in\\n#{css_select(\"body\")}\"\n\n query_param_pairs = parse_query_to_pairs(pagination.query_params.to_query)\n\n # all links...\n css_select(\".foliate-pagination a\").each do |link|\n link_param_pairs = parse_query_to_pairs(URI(link.attr(\"href\")).query)\n link_page = link_param_pairs.to_h[Foliate.config.page_param.to_s].try(&:to_i)\n\n assert_empty (query_param_pairs - link_param_pairs),\n \"link does not preserve query_params:\\n#{link}\"\n\n refute_equal 1, link_page,\n \"link does not ellide :page param for first page:\\n#{link}\"\n\n assert_includes (1..pagination.total_pages), (link_page || 1),\n \"link points to invalid page:\\n#{link}\"\n\n refute_equal pagination.current_page, (link_page || 1),\n \"link points to current page (use placeholder text instead):\\n#{link}\"\n end\n\n # all forms...\n css_select(\".foliate-pagination form\").each do |form|\n # must preserve query_params (e.g. via hidden inputs)\n form_param_pairs = css_select(form, 'input').map do |input|\n [input.attr(\"name\"), input.attr(\"value\")]\n end\n\n assert_empty (query_param_pairs - form_param_pairs),\n \"form does not preserve query_params:\\n#{form}\"\n end\n end",
"def pagination?(doc)\n !page_count(doc).nil?\n end",
"def paginated_products\n p = self.products.where(:admin_validation => true)\n unless self.page.blank?\n p.page(self.page)\n end\n end",
"def ordered_fill(page, *fields)\n f_o_i false, nil, page, *fields\n end",
"def paginated?\n\t\t\t!next_page_url.nil?||!prev_page_url.nil?\n\t\tend",
"def show_pagination? response = nil\n response ||= @response\n response.limit_value > 0 && response.total_pages > 1\n end",
"def show_pagination? response = nil\n response ||= @response\n response.limit_value > 0 && response.total_pages > 1\n end",
"def get_page_params( required_params )\n required_params.permit( :page, :page_size )\n end",
"def page_params\n []\n end",
"def pagination_setup(paginator: ManifestItem::Paginator, **opt)\n # noinspection RubyMismatchedReturnType\n super\n end",
"def paginated?\n false\n end",
"def pagination_setup(paginator: User::Paginator, **opt)\n # noinspection RubyMismatchedReturnType\n super\n end",
"def page_num_checker \n\t\t@page_num < @total_page || @total_page == 0\n\tend",
"def ensure_paginated(objs)\n if !objs.respond_to?(:total_entries) && objs.respond_to?(:paginate)\n objs.paginate(:page => 1, :per_page => 1000000)\n else\n objs\n end\n end",
"def required_fields\n required_fields = []\n ignore_fields = [:id, :date_entered, :date_modified]\n self.fields.each_value do |field|\n next if ignore_fields.include? field[\"name\"].to_sym\n required_fields << field[\"name\"].to_sym if field[\"required\"] == 1\n end \n required_fields\n end",
"def required_fields\n required_fields = []\n ignore_fields = [:id, :date_entered, :date_modified]\n self.fields.each_value do |field|\n next if ignore_fields.include? field[\"name\"].to_sym\n required_fields << field[\"name\"].to_sym if field[\"required\"] == 1\n end \n required_fields\n end",
"def pagination_setup(paginator: SearchPaginator, **opt)\n # noinspection RubyMismatchedReturnType\n super\n end",
"def allowed_query_params\n %w[include fields filter sort page]\n end",
"def paginatable?\n raise NotImplemented\n end",
"def pagination_params()\n normalize_param_value(:_pg).permit(:_s, :_p, :_c)\n end",
"def document_has_required_fields?\n [value_field, reverse_shelfkey_field, shelfkey_field, combined_key_field].each do |field|\n return false if @original_document[field].blank?\n end\n true\n end",
"def customers__potential_values(options = {})\r\nif options.has_key?(:page)\r\n Customer.paginate(options)\r\nelse\r\n Customer.all(options)\r\nend\r\nend",
"def page_params\n end",
"def index\n @properties = Property.all.paginate(page: params[:page], per_page: 5, order: 'date_available', conditions: {is_available: true}) \n end",
"def check_will_paginate\n if NilClass === self.will_paginate.enabled\n self.will_paginate.enabled= (defined?(::WillPaginate) != nil)\n end\n \n if self.will_paginate.enabled\n defaults = {\n :prev_label => AutoRest::Labels.defaults[:pagination_prev], \n :next_label => AutoRest::Labels.defaults[:pagination_next],\n :inner_window => 2, # how many links are shown around the current page, defaults to 4\n :outer_window => 1, # how many links are around the first and the last page, defaults to 1\n :param_name => :page\n }\n ajax_defaults= {\n :remote_options => {\n :method => :get,\n :update => \"auto_rest_index_table\",\n :before => \"Element.show('spinner')\",\n :success => \"Element.hide('spinner')\" \n } \n }\n (self.will_paginate.options||={}).reverse_merge!(defaults)\n self.will_paginate.options.reverse_merge!(ajax_defaults) if self.use_ajax\n end\n end",
"def validate_required_fields\n user = new_record? ? author : current_journal.try(:user)\n\n required_attribute_names(user).each do |attribute|\n if /^\\d+$/.match?(attribute)\n attribute = attribute.to_i\n v = custom_field_values.detect {|v| v.custom_field_id == attribute}\n if v && Array(v.value).detect(&:present?).nil?\n errors.add(v.custom_field.name, l('activerecord.errors.messages.blank'))\n end\n else\n if respond_to?(attribute) && send(attribute).blank? && !disabled_core_fields.include?(attribute)\n next if attribute == 'category_id' && project.try(:issue_categories).blank?\n next if attribute == 'fixed_version_id' && assignable_versions.blank?\n\n #####\n # START PATCH\n next if attribute == 'typology_id' && !project.module_enabled?('typologies')\n next if attribute == 'typology_id' && project.typologies.blank?\n # END PATCH\n #####\n\n errors.add attribute, :blank\n end\n end\n end\n end",
"def paging?\n @paging\n end",
"def mandatory(total = nil)\n where(:optional=> true).limit(total)\n end",
"def pagination_meta(resources)\n return {} if filter_params[:page].blank?\n\n ::Pagination::Meta.call(request, resources, filter_params)\n end",
"def all_required(data, fields)\t\t\n\t\tif fields.nil? == true\n\t\t\treturn true\n\t\tend\n\t\t@api_errmsg = Array.new\n\t\tfields = fields.split(',')\n\t\tflag = true\n\t\tfields.each do |name|\n\t\t\tif data[name].nil?\n\t\t\t @api_errmsg.push(name)\n\t\t\t flag = false\n\t\t\tend\n\t\tend\n\t\tif flag == true\n\t\t return true\n\t\tend\n\t\treturn false\n\tend",
"def home_page_profiles__potential_values(options = {})\r\nif options.has_key?(:page)\r\n Profile.paginate(options)\r\nelse\r\n Profile.all(options)\r\nend\r\nend",
"def profiles__potential_values(options = {})\r\nif options.has_key?(:page)\r\n Profile.paginate(options)\r\nelse\r\n Profile.all(options)\r\nend\r\nend",
"def profiles__potential_values(options = {})\r\nif options.has_key?(:page)\r\n Profile.paginate(options)\r\nelse\r\n Profile.all(options)\r\nend\r\nend",
"def no_search_requested?\n @params.length < 4\n end",
"def default_page_statuses\n @address_read_only = ActiveModel::Type::Boolean.new.cast(params[:address_read_only])\n @show_manual_address = ActiveModel::Type::Boolean.new.cast(params[:show_manual_address])\n end",
"def user__potential_values(options = {})\r\nif options.has_key?(:page)\r\n User.paginate(options)\r\nelse\r\n User.all(options)\r\nend\r\nend",
"def opts_for_paginate\n paginate_opts = combined_options.reject { |k,v| !OPTIONS_FOR_PAGINATE.include?(k) }\n paginate_opts[:finder] = :find_all_by_id unless paginate_opts.include?(:finder)\n paginate_opts[:per_page] = klass.per_page if klass && !paginate_opts.include?(:per_page)\n paginate_opts\n end",
"def test_will_paginate_params\n stub_request(:get, \"http://localhost:3000/api/1/custom_paginations.json\")\n .to_return(headers: {content_type: \"application/json\"}, body: {\n custom_paginations: [\n {id: 1, name: \"Jeff Ching\", email_address: \"[email protected]\"},\n {id: 2, name: \"Barry Bonds\", email_address: \"[email protected]\"},\n {id: 3, name: \"Hank Aaron\", email_address: \"[email protected]\"}\n ],\n meta: {\n per: 3,\n page: 2,\n total: 10\n }\n }.to_json)\n\n users = CustomPagination.all\n assert_equal 4, users.total_pages\n assert_equal 3, users.offset\n assert_equal 1, users.previous_page\n assert_equal 3, users.next_page\n assert_equal false, users.out_of_bounds?\n assert_equal 2, users.current_page\n assert_equal 10, users.total_entries\n assert_equal 3, users.per_page\n end",
"def prepare_attributes\n @current_page = params[:page] ? params[:page].to_i : 1\n @rows_per_page = params[:rows] ? params[:rows].to_i : 10\n end",
"def mybb_signups\n @user_pages, @users = paginate :users, :per_page => 40, :conditions => \"q_hear is not null\", :order => \"id desc\"\n end",
"def required_fields\n []\n end",
"def include_pagination_links?\n JSONAPI.configuration.default_paginator != :none &&\n JSONAPI.configuration.top_level_links_include_pagination\n end",
"def accesses__potential_values(options = {})\r\nif options.has_key?(:page)\r\n Access.paginate(options)\r\nelse\r\n Access.all(options)\r\nend\r\nend",
"def pagination!\n parameter :page, :integer, :required => false, :default => 1, :paramType => \"query\"\n parameter :per_page, :integer, :required => false, :default => 30, :paramType => \"query\", \n :allowed => 1..1000\n end",
"def required_fields\n if self.controller_name == \"registrations\"\n param_name = \"user\"\n elsif self.controller_name == \"merchants\"\n param_name = \"merchant\"\n else\n return\n end\n empty_fields = Array.new\n empty = false\n params[param_name].each_pair do |k, v|\n if v == \"\"\n empty_fields << k.gsub(\"_\", \" \")\n empty = true\n end\n end\n if empty == true\n (0..empty_fields.length - 3).each do |i|\n empty_fields[i] << \",\"\n end\n empty_fields.insert(-2, \"and\") unless empty_fields.length < 2\n field_list = empty_fields.join(\" \")\n message = \"You cannot leave empty fields. The field\" \n if empty_fields.length > 1\n message << \"s \"\n else\n message << \" \"\n end\n message << field_list \n if empty_fields.length > 1\n message << \" were left blank.\"\n else\n message << \" was left blank.\"\n end\n flash[:notice] = message\n redirect_to request.referrer\n else\n return\n end\n end",
"def withPages\n object.with_pages.nil? ? true : object.with_pages #For users prior to 1.1.5 with_pages used to be nil\n end",
"def after_pagination\n end",
"def extjs_paging?\n params[:limit] && params[:start]\n end",
"def users__potential_values(options = {})\r\nif options.has_key?(:page)\r\n User.paginate(options)\r\nelse\r\n User.all(options)\r\nend\r\nend",
"def paginated?\n @choices.size > page_size\n end",
"def searchable?\n return @paginable_params[:search].present?\n end",
"def first_page?\n params[:page].nil?\n end",
"def load_page\n @page = params[:page] || '1'\n @per_page = (params[:limit] || '30').to_i\n @per_page = 30 if @per_page > 30\n true\n end",
"def all_params_present?\n unless params[:account] && params[:period] && params[:how_many]\n flash[:error] = 'Please enter all the details to automatically generate transactions.'\n redirect_to admin_accounts_url\n end\n end",
"def blacklisted_params\n params.keys.each_with_object({}) do |param, hash|\n param = param.to_sym\n hash[param] = nil unless WHITELIST_PAGINATION_PARAMS.include?(param)\n end\n end",
"def test_next_not_truncated_when_fewer_than_three_next_pages\n pg = Ruhoh::Parsers::Posts::Paginator.new(1, @five_posts)\n pages = pg.paginate()\n page = pages['index_pages'][1]\n assert_equal([3, 4, 5], page['next'].map {|p| p['page_number']})\n assert_equal(['/index/3/', '/index/4/', '/index/5/'], page['next'].map { |p| p['url'] })\n assert_equal(nil, page['next_truncated'])\n end",
"def page_params\n params.permit(:page, :per_page)\n end",
"def passes_validations?\n return true if skip_validations\n result = true\n pages.each do |page|\n result = false unless page.passes_validations?\n end\n result\n end",
"def extra_pages_params\n params.require(:extra_page).permit(:user_id, :is_complete, :extra_page, :extra_page1, :extra_page2, :extra_page3, :extra_page4, :extra_page5, :extra_page6, logo_images: [], team_images: [], workspace_images: [], other_images: [] )\n end",
"def check_fields\n columns= resource.model.column_names - AutoRest::AR_MAGIC_COLUMNS\n\n default_columns= columns.select { |attr| attr !~ /.*_count$/ }.map do |elem|\n [elem.intern, elem.titleize]\n end\n\n # For storing columns, I use an array and not a hash --i.e.: (:column => 'Title') -- \n # to ensure the order of the columns. I convert the params from linear array to \n # grouped array to alivianate user's data entry:\n # [[:col0, \"name0\"], [:col1, \"name1\"]] becomes [:col0, \"name0\", :col1, \"name1\"]\n \n # *TODO* This should be cleaned a little, because right now is a bit difficult\n # to remember the way the attributes for each view work.\n\n [:for_index, :for_new, :for_edit, :for_show].each do |key|\n arr= fields.send(key)\n exc= exclude_fields.send(key)\n\n if !arr # User has not supplied columns.\n arr= default_columns\n else\n # enum_for creates an enum from array, therefore protecting the original array contents.\n # each slice returns an array of specified elements: [1,2,3,4] => 1..4 => [[1,2],[3,4]]\n arr= arr.enum_for(:each_slice, 2).to_a\n end\n \n # Remove excluded fields.\n arr= arr.reject { |e| exc.map{|elem|elem.to_s}.include?(e[0].to_s) } if exc\n fields.send(\"#{key}=\", arr)\n end\n end",
"def validations\n valid_page_number? if page_number\n valid_period_name? if period_param\n valid_date? if date_param\n end",
"def adjust_for_parameters(params)\n params = params[\"filter\"] if params[\"filter\"]\n \n #self.paginate = false\n if params && params[\"paginate\"]\n self.paginate = true\n self.paginate = false if params[\"do_viewall\"]\n elsif params && params[\"viewall\"]\n self.paginate = false\n self.paginate = true if params[\"do_paginate\"]\n end\n \n #--- set up perpage\n if params && params[\"perpage\"]\n self.set_items_per_page(params[:perpage])\n end\n\n params[\"dropdowns\"].each_pair do |name,value|\n dropdowns[name][\"value\"] = value if dropdowns[name]\n end if params && params[\"dropdowns\"] # do params\n \n params[\"custom_fields\"].each_pair do |name,value|\n custom_fields[name][\"value\"] = CUSTOM_DEFAULT_VALUE \n custom_fields[name][\"value\"] = value if custom_fields[name] && value!=CUSTOM_VALUE_FOR_ALL \n end if params && params[\"custom_fields\"] # do params\n \n params[\"boolean_fields\"].each_pair do |name,value|\n boolean_fields[name][\"value\"] = BOOLEAN_VALUE_FOR_ALL \n boolean_fields[name][\"value\"] = value if boolean_fields[name] && value!=BOOLEAN_VALUE_FOR_ALL \n end if params && params[\"boolean_fields\"] # do params\n \n if params[:sort_by] #&& params[:old_sort_by] && params[:old_sort_by_order]\n \n self.sort_by = params[:sort_by]\n self.sort_by_order = params[:old_sort_by_order] == 'ASC' ? 'ASC' : 'DESC'\n if params[:old_sort_by] == params[:sort_by] && params[:sort_by_order_flip] == 'yes'\n self.sort_by_order = params[:old_sort_by_order] == 'DESC' ? 'ASC' : 'DESC' \n end\n \n self.sql_sortorder = \"#{self.sort_by} #{self.sort_by_order}\"\n self.sql_sortorder += \", #{self.secondary_sort}\" unless self.secondary_sort.blank?\n \n end # if sort_order \n \n params[\"dates\"].each_pair do |name,value|\n if dates[name]\n dates[name][\"value\"] = Date.new(\n value[\"date(1i)\"].to_i,\n value[\"date(2i)\"].to_i,\n value[\"date(3i)\"].to_i\n )\n end\n end if params && params[\"dates\"] # do params\n \n self.search_string = RFilter.sanitize_sql(params[\"search_for\"]) if params && params[\"search_for\"]\n\n generate_sql_conditions\n end",
"def paginated?\n current_page && current_page > 0\n end",
"def get_paging_order_info\n {\n :page => params[:page],\n :limit => params[:limit].nil? ? 20 : params[:limit]\n }\n end",
"def pagination\n [ :next_page ]\n end",
"def index\n @career_fields = CareerField.paginate(:page => params[:page])\n end",
"def do_pagination\n @page_number = 1\n if params[:page] && params[:page].to_i > 0\n @page_number = params[:page].to_i\n end\n @pagination = true\n @pagination_options = { :limit => items_per_page, :offset => (@page_number - 1) * items_per_page }\n @pagination_options = {} if params[:all]\n end",
"def fill_out(page, *fields)\n f_o_i true, nil, page, *fields\n end",
"def has_fields_for_ride?\n user.present? &&\n from_address.present? &&\n from_city.present? &&\n from_latitude.present? &&\n from_longitude.present? &&\n pickup_at.present?\n end",
"def paginated?\n page_count > 1\n end",
"def new_page_params\n return {} if params[:filter].blank?\n\n params[:filter].permit(:page_num, :length)\n end",
"def optionals\r\n %w[\r\n prev_page\r\n next_page\r\n prev_page_token\r\n next_page_token\r\n ]\r\n end",
"def paginator; end",
"def validate_required_params required_params\n @find_by_ext_id = false\n missing_params = []\n \n required_params.each { |k| \n if k.to_s == \"id\" and !params[:external_id].blank?\n @find_by_ext_id = true\n params[:id] = params[:external_id]\n next\n end\n\n unless params[:criteria].has_key?(k)\n missing_params << k\n end\n }\n \n missing_params\n end",
"def crear_paginacion\n @page = params[:page].nil? ? 1 : params[:page].to_i\n @per_page = 3\n end",
"def required_for_step?(step)\n # All fields are required if no form step is present\n return true if form_step.nil?\n \n # All fields from previous steps are required\n ordered_keys = self.class.form_steps.keys.map(&:to_sym)\n !!(ordered_keys.index(step) <= ordered_keys.index(form_step))\n end",
"def only_pagination(obj, perpage, divclass, path, options = {})\n reset_link = %(<div class=\"fl ml10 mt2\">#{link_to \"<span class='icon_reset fl'></span>\", path}</div>)\n\n return %Q{\n <div class=\"pagination_div\">\n #{reset_link}\n <div class=\"pagination fr w48\">\n #{create_per_page_limit_links(perpage, options) if(obj.total_entries > 25)}\n <div class=\"fr\">\n <div class=\"fl\">#{raw custom_page_entries_info obj}</div>\n <div class=\"fl ml3 mr3 #{divclass}\">#{will_paginate obj, :previous_label => '<span class=\"previousBtn\"></span>', :next_label => '<span class=\"nextBtn\"></span>', :class => 'pagination', :inner_window => 4, :outer_window => 1, :separator => '', :params => {:action => options[:action]}}</div>\n <br class=\"clear\" />\n </div>\n <br class=\"clear\" />\n </div>\n <br class=\"clear\" />\n </div>\n }\n end",
"def paginate\n raise NoMethodError.new('paginate')\n end",
"def will_paginate_extended(collection, options = {})\n all_options = { style: 'display: inline-block;' }\n all_options = options.merge(all_options)\n\n (will_paginate(collection, all_options) || ''.html_safe) +\n ' Per page: '.html_safe +\n select_tag(:per_page, options_for_select([5, 10, 20], params[:per_page] || 10),\n onchange: \"if(this.value){window.location='?per_page='+this.value;}\")\n end",
"def set_activities_for_pagination\n \n end",
"def records_per_page\n params[:per_page] || 30\n end",
"def page_params\n field_list = [:id, :meta_keywords, :meta_description, :title, :body, :slug, :parent_id, :page_icon, :template_name,\n :is_published, :approved, :publish_date, :created_by_id, :changed_by_id, :to_be_moderated]\n if can? :approve, @page\n field_list << :approved\n end\n params.require(:page).permit(field_list)\n end",
"def validate\n validates_not_null :query\n validates_type String, :query\n validates_length_range 0..20, :query\n validates_not_null :page\n validates_type Integer, :page\n end",
"def should_paginate(page,query, sort_by)\n [(link_to(\"←←\", :action => :show, :id => query, :sort_by=>sort_by) if page.number>2),\n (link_to(\"←\", :action => :show, :id => query, :page => page.prev.number, :sort_by=>sort_by) if page.prev?),\n (link_to(\"→\", :action => :show, :id => query, :page => page.next.number, :sort_by=>sort_by) if page.next?)].compact.join(\" | \")\n end"
] | [
"0.7680296",
"0.737551",
"0.6330928",
"0.62576425",
"0.6133295",
"0.6087282",
"0.60783076",
"0.6010496",
"0.5984411",
"0.59277725",
"0.59265846",
"0.5923338",
"0.5906319",
"0.589252",
"0.5852344",
"0.583852",
"0.58337116",
"0.5828805",
"0.58100224",
"0.58093613",
"0.5806842",
"0.579968",
"0.579968",
"0.5780194",
"0.5772226",
"0.5752874",
"0.57181364",
"0.57086486",
"0.5687652",
"0.56672776",
"0.56634164",
"0.56634164",
"0.56549716",
"0.5645119",
"0.562554",
"0.5583768",
"0.5564416",
"0.5555052",
"0.55439335",
"0.5535606",
"0.55355287",
"0.5475391",
"0.54716414",
"0.54573035",
"0.5445229",
"0.5422191",
"0.5420558",
"0.54081374",
"0.54081374",
"0.5407393",
"0.5400711",
"0.5396949",
"0.53945404",
"0.53915584",
"0.5380722",
"0.53706276",
"0.5365293",
"0.53637207",
"0.53621066",
"0.5352517",
"0.5350673",
"0.53455627",
"0.53414637",
"0.5341195",
"0.53349674",
"0.53229964",
"0.53022206",
"0.5294087",
"0.529313",
"0.5288005",
"0.52835476",
"0.5269861",
"0.52580845",
"0.5245911",
"0.524155",
"0.52394396",
"0.52350897",
"0.52337515",
"0.5219077",
"0.52147907",
"0.52131784",
"0.5195561",
"0.51924384",
"0.5189671",
"0.51893085",
"0.51860803",
"0.5181565",
"0.51800823",
"0.517447",
"0.517228",
"0.517115",
"0.5168986",
"0.5164801",
"0.5162761",
"0.51624084",
"0.51614165",
"0.5151354",
"0.51505613",
"0.51457",
"0.5141572"
] | 0.75490224 | 1 |
Renders a select tag with all the Objectives Context: :form => Edit form :project => Current project | def view_issues_form_details_bottom(context = { })
if context[:project].module_enabled?('dashboards') and Dashboard.find_by_project_id(context[:project])
select = context[:form].select :objective_id,
Dashboard.find_by_project_id(context[:project]).objectives.all(
:order => 'name').sort {|x, y| x.ancestors_path <=> y.ancestors_path}.collect { |d| ["#{d.ancestors_path} #{d.name}", d.id] },
:include_blank => true
return "<p>#{select}</p>"
else
return ''
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_form_select(projects)\n projects.collect do |p|\n [[p.shortname, p.description].join(\" - \"), p.id]\n end\n end",
"def render_project_jump_box\n projects = Project.all(:is_private => false)\n if logged_in?\n projects = projects | current_user.projects\n end\n if projects.count > 0 \n s = '<select onchange=\"if (this.value != \\'\\') { window.location = this.value; }\">' +\n \"<option value=''>Jump to Project...</option>\" +\n '<option value=\"\" disabled=\"disabled\">---</option>'\n \n options = projects.collect{|p| [p.name, \"/projects/#{p.id}\"]}\n s << options_for_select(options, @project.nil? ? '' : \"/projects/#{@project.id}\")\n \n s << '</select>'\n s.html_safe\n end\n end",
"def render_project_jump_box\n # Retrieve them now to avoid a COUNT query\n testprojects = Testproject.find(:all, :conditions => \"id > 0\")\n if testprojects.any?\n s = '<select onchange=\"if (this.value != \\'\\') { window.location = this.value; }\">' +\n \"<option value='' selected='selected'>#{ l(:label_jump_to_a_project) }</option>\" +\n '<option value=\"\" disabled=\"disabled\">---</option>'\n testprojects.each do |testproject|\n tag_options = {:value => url_for(:controller => 'testprojects', :action => 'show', :id => testproject.id)}\n s << content_tag('option', h(testproject.name), tag_options)\n end\n s << '</select>'\n s\n end\n end",
"def render\n return ro_standard if @readonly\n\n set_initial_value('html','selected')\n # separate options and html part\n options_part = {}\n @yaml['html'].symbolize_keys!\n %i(selected include_blank).each { |sym| options_part[sym] = @yaml['html'].delete(sym) if @yaml['html'][sym] }\n @yaml['html'][:multiple] = true if @yaml['multiple']\n\n record = record_text_for(@yaml['name'])\n if @yaml['html'][:multiple]\n @html << @parent.select(record, @yaml['name'], get_choices, options_part, @yaml['html'])\n @js << \"$('##{record}_#{@yaml['name']}').selectMultiple();\"\n else\n @html << @parent.select(record, @yaml['name'], get_choices, options_part, @yaml['html'])\n # add code for view more data\n @html << add_view_code() if @yaml['view']\n end\n self\nend",
"def render\n return ro_standard if @readonly\n set_initial_value('html','selected')\n#\n @yaml['html'].symbolize_keys!\n record = record_text_for(@yaml['name'])\n if @yaml['multiple'] \n @html << @parent.select(record, @yaml['name'], get_choices, @yaml['html'], {multiple: true})\n @js << \"$('##{record}_#{@yaml['name']}').selectMultiple();\"\n else\n @html << @parent.select(record, @yaml['name'], get_choices, @yaml['html'])\n end\n self\nend",
"def to_form_select(projects)\n projects.collect do |p|\n [project_identifier(p), p.id]\n end\n end",
"def set_form_variables\n @articles = CriminalCode.all.includes(:articles).with_translations\n @tags = Tag.includes(:translations).order(:name)\n @prisons = Prison.includes(:translations).order(:name)\n\n gon.select_charges = t('shared.actions.with_obj.select',\n obj: t('activerecord.models.charge', count: 999))\n gon.select_tags = t('shared.actions.with_obj.select',\n obj: t('activerecord.models.tag', count: 999)) \n end",
"def si_update_selects_from_company\n company = params[:org]\n if company != '0'\n @company = Company.find(company)\n @projects = @company.blank? ? projects_dropdown : @company.projects.order(:project_code)\n else\n @projects = projects_dropdown\n end\n # Setup JSON\n @json_data = { \"project\" => @projects }\n render json: @json_data\n end",
"def select(resource_name, field_name, options_list, selected_value)\n html = ''\n options_list.each do |nv_pair|\n option_value = nv_pair.keys.first\n option_name = nv_pair.values.first\n html << \"<option value=\\\"#{option_value}\\\"\"\n html << \" selected=\\\"selected\\\"\" if option_value == selected_value\n html << '>'\n html << option_name\n html << \"</option>\"\n end\n \"<select id=\\\"#{resource_name}_#{field_name}\\\" name=\\\"#{resource_name}_#{field_name}\\\" class=\\\"required\\\">#{html}</select>\"\n end",
"def get_field_edit_rtpl\n ([email protected]? && @multiple != '') ? multiple = @multiple : multiple = ''\n\n select_str = '<select id=\"' + @id + '\" name=\"' + @name + '\" ' + multiple + '>'\n select_str << @option_str\n select_str << '</select>'\n\n select_str\n end",
"def view_issues_bulk_edit_details_bottom(context = { })\n if context[:project].module_enabled?('dashboards') and Dashboard.find_by_project_id(context[:project].id)\n select = select_tag('objective_id',\n content_tag('option', l(:label_no_change_option), :value => '') +\n content_tag('option', l(:label_none), :value => 'none') +\n options_for_select(\n Dashboard.find_by_project_id(context[:project].id).objectives.all(\n :order => 'name').sort {|x, y| x.ancestors_path <=> y.ancestors_path}.collect {|v| [\"#{v.ancestors_path} #{v.name}\", v.id]}))\n\n return content_tag(:p, \"<label>#{l(:field_objective)}: \" + select + \"</label>\")\n else\n return ''\n end\n end",
"def build_select(type, select_options_as_html); end",
"def select_project_to_manage_production\n @projects = current_user.assigned_projects_for( PROJECT_ROLE[:account_executive] ) \n \n add_breadcrumb \"Select Project\", 'select_project_to_manage_production_url'\n render :file => \"projects/project_management/select_project_to_manage_production\"\n end",
"def locales_menu \n result = \"<form action=\\\"\" + url_for(:action => 'set', :controller => 'locales') + \"\\\">\\n\" \n result << \"<div><select id='accessible_menu' name='locale_id' >\\n\"\n result << options_from_collection_for_select(@loaded_locales, :iso, :name, @current_locale.iso)\n result << \"</select></div>\"\n result << \"<noscript><p><input type=\\\"submit\\\" name=\\\"commit\\\" value=\\\"Go\\\" /></p></noscript>\"\n result << \"</form>\"\n return result\n end",
"def assignee_menu( mt_req, building, tag_name = \"mtreq_assignee\" )\n # build the array from which we will build the select\n arr = [];\n if building!=nil && building.has_mt_company?\n \n if building.has_mt_manager?\n arr << [ \"#{building.mt_manager.hr_name} (#{ loc.term(Localization::BUILDING_MANAGER)})\",\n unique_obj_id(building.mt_manager) ];\n else\n #arr << [ \"mt_building_manager == nil\", \"xxx\"];\n end\n \n building.mt_company.workers.each do | wkr | \n if ( wkr.role.professional? )\n arr << [ \"#{wkr.role.name} (#{wkr.hr_name})\", unique_obj_id(wkr) ];\n end\n end\n \n arr << [ \"#{building.mt_company.name} (#{loc.term(Localization::MT_COMPANY)})\", \n unique_obj_id(building.mt_company) ];\n else\n if mt_req.has_mt_company?\n mt_req.mt_company.workers.each do | wkr | \n if ( wkr.role.professional? )\n arr << [ \"#{wkr.role.name} (#{wkr.hr_name})\", unique_obj_id(wkr) ];\n end\n end \n end \n end\n \n if building.respond_to?(:has_owner) && building.has_owner?\n arr << [ \"#{building.building_owner} (#{loc.term(Localization::BUILDING_OWNER)})\",\n unique_obj_id(building.building_owner) ];\n end\n \n # TODO add vaad.\n \n selected_id = \"\";\n selected_id = unique_obj_id(mt_req.assignee) unless mt_req.nil?\n \n return \"<select id='#{tag_name.gsub(\"[\",\"_\").gsub(\"]\",\"\")}' name='#{tag_name}'>\n #{options_for_select(arr, selected_id)}\n </select>\"; \n end",
"def locales_menu \n result = \"<form action=\\\"\" + url_for(:action => 'set', :controller => 'locales') + \"\\\">\\n\" \n result << \"<div><select id=\\\"accessible_menu\\\" name=\\\"locale_id\\\" >\\n\"\n result << options_from_collection_for_select(@loaded_locales, :iso, :name, @current_locale.iso)\n result << \"</select></div>\"\n result << \"<noscript><p><input type=\\\"submit\\\" name=\\\"commit\\\" value=\\\"Go\\\" /></p></noscript>\"\n result << \"</form>\"\n return result\n end",
"def so_update_selects_from_project\n project = params[:project]\n projects = projects_dropdown\n if project != '0'\n @project = Project.find(project)\n @contracting_requests = @project.blank? ? projects_contracting_requests(projects) : projects_contracting_requests(@project)\n @work_order = @project.blank? ? work_orders_dropdown : @project.work_orders.order(:order_no)\n @charge_account = @project.blank? ? projects_charge_accounts(projects) : charge_accounts_dropdown_edit(@project)\n @store = project_stores(@project)\n else\n @contracting_requests = projects_contracting_requests(projects)\n @work_order = work_orders_dropdown\n @charge_account = projects_charge_accounts(projects)\n @store = stores_dropdown\n end\n # Work orders array\n @orders_dropdown = orders_array(@work_order)\n # Contracting requests array\n @constracting_requests_dropdown = contracting_requests_array(@contracting_requests)\n # Setup JSON\n @json_data = { \"contracting_request\" => @constracting_requests_dropdown, \"work_order\" => @orders_dropdown,\n \"charge_account\" => @charge_account, \"store\" => @store }\n render json: @json_data\n end",
"def licence_options_for_select\n LicenceDictionary.instance.options_for_select\n end",
"def display_select(name, default_selected)\n options = [\n [_(\"Tasks\"), \"1\"],\n [_(\"Tags\"), \"2\"],\n [_(\"Users\"), \"3\"],\n [_(\"Clients\"), \"4\"],\n [_(\"Projects\"), \"5\"],\n [_(\"Milestones\"), \"6\"],\n [_(\"Date\"), \"7\"],\n [_(\"Task Status\"), \"8\"],\n [_(\"Requested By\"), \"20\"]\n ]\n current_user.company.properties.each do |p|\n options << [ p.name, p.filter_name ]\n end\n \n if params[:report] and params[:report][name.to_sym]\n selected = params[:report][name.to_sym]\n end\n\n return select(\"report\", name, options, :selected => (selected || default_selected))\n end",
"def general_info_for_select\n\t\t\n\tend",
"def options_for_select\n choices.map do |choice|\n data = {}\n data[\"choice-category\"] = choice.category_id if choice.category_id\n\n content_tag(\n :option,\n choice.short_name,\n :value => choice.id,\n :selected => selected_choice?(item, choice),\n :data => data\n )\n end.join.html_safe\n end",
"def form_escolher\n lst_from.select 'London'\n lst_on.select 'December'\n lst_month.select '20'\n lst_arriving.select 'Acapulco'\n lst_returning.select 'October'\n lst_month_returning.select '21'\n check_port.click\n lst_airline.select 'Blue Skies Airlines'\n end",
"def project_form_selector(info, html_options = {})\n path = info.project.try(:id) ? edit_project_path(info.project, ':lang') : new_project_path(':lang')\n html_options = html_options.merge({'data-selector' => path})\n options = options_for_select(ProjectInfo.language_values, info.language)\n select_tag(:lang, options, html_options)\n end",
"def options_html(type, is_person, super_entity, cid=\"00\", return_type=\"html\")\n sel_flag = true\n sel_str = \"\"\n\n poa_str = \" (Principal Entity) \"\n poa_str = \" (Principal Individual) \" if is_person == \"true\"\n\n array_result = []\n select_one_html = \"<option value=''>Select One...</option>\"\n result = \"\"\n\n if is_person == \"true\"\n groups = {}\n\n case type\n when \"stockholder\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).order(type_: :asc)\n when \"principal\"\n person_true_entities = current_user.entities_list(super_entity).where(type_: [1, 2, 4]).order(type_: :asc)\n when \"agent\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2]).where('id != ?', super_entity.principal.entity_id).order(type_: :asc)\n when \"settlor\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).order(type_: :asc)\n when \"trustee\"\n if super_entity.beneficiaries.select(:entity_id).map(&:entity_id).blank?\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 3, 4]).order(type_: :asc)\n else\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 3, 4]).where('id not in (?)', super_entity.beneficiaries.select(:entity_id).map(&:entity_id)).order(type_: :asc)\n end\n when \"beneficiary\"\n if super_entity.trustees.select(:entity_id).map(&:entity_id).blank?\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).order(type_: :asc)\n else\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).where('id not in (?)', super_entity.trustees.select(:entity_id).map(&:entity_id)).order(type_: :asc)\n end\n when \"member\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).order(type_: :asc)\n when \"manager\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).order(type_: :asc)\n when \"general-partner\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).order(type_: :asc)\n when \"limited-partner\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).order(type_: :asc)\n when \"partner\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 3, 4]).order(type_: :asc)\n when \"limited-liability-partner\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 3, 4]).order(type_: :asc)\n when \"director\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 3]).order(type_: :asc)\n when \"officer\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 3]).order(type_: :asc)\n when \"tenant-in-common\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).order(type_: :asc)\n when \"spouse\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 3, 4]).order(type_: :asc)\n when \"joint-tenant\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1, 2, 3, 4]).order(type_: :asc)\n when \"guardian\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1]).order(type_: :asc)\n when \"ward\"\n person_true_entities = current_user.entities_list(super_entity.id).where(type_: [1]).order(type_: :asc)\n else\n person_true_entities = []\n end\n\n person_true_entities.each do |entity|\n key = \"#{MemberType.member_types[entity.type_]}\"\n key = key + poa_str if !key.match(\"ttorney\").nil?\n if groups[key].nil?\n groups[key] = [entity]\n else\n groups[key] << entity\n end\n end\n\n case type\n when \"stockholder\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Corporate Stockholder', user_id: current_user.id)\n when \"principal\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Principal', user_id: current_user.id)\n when \"agent\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Agent', user_id: current_user.id)\n when \"settlor\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Settlor', user_id: current_user.id)\n when \"trustee\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Trustee', user_id: current_user.id)\n when \"beneficiary\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Beneficiary', user_id: current_user.id)\n when \"member\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'LLC Member', user_id: current_user.id)\n when \"manager\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'LLC Outside Manager', user_id: current_user.id)\n when \"general-partner\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'LP General Partner', user_id: current_user.id)\n when \"limited-partner\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'LP Limited Partner', user_id: current_user.id)\n when \"partner\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Partner', user_id: current_user.id)\n when \"limited-liability-partner\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Limited Liability Partner', user_id: current_user.id)\n when \"director\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Corporate Director', user_id: current_user.id)\n when \"officer\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Corporate Officer', user_id: current_user.id)\n when \"tenant-in-common\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Tenant in Common', user_id: current_user.id)\n when \"spouse\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Tenant by Entirety', user_id: current_user.id)\n when \"joint-tenant\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Joint Tenant', user_id: current_user.id)\n when \"judge\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Judge', user_id: current_user.id)\n when \"guardian\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Guardian', user_id: current_user.id)\n when \"ward\"\n person_true_contacts = Contact.all.where(is_company: false, contact_type: 'Client Participant', role: 'Ward', user_id: current_user.id)\n else\n person_true_contacts = []\n end\n\n groups.each do |k,v|\n result += \"<optgroup label='#{k}'>\"\n v.each do |entity|\n if (sel_flag && \"e#{entity.id}\" == cid) || (person_true_entities.count + person_true_contacts.count == 1)\n sel_flag = false\n sel_str = \" selected='selected' \"\n else\n sel_str = \"\"\n end\n result += \"<option value='e#{entity.id}' data-type='entity' #{sel_str}>#{entity.name} </option>\"\n array_result << [entity.id, entity.name]\n end\n result += \"</optgroup>\"\n end\n\n result += \"<optgroup label='Contacts'>\"\n\n person_true_contacts.each do |contact|\n if (sel_flag && \"c#{contact.id}\" == cid) || (person_true_entities.count + person_true_contacts.count == 1)\n sel_flag = false\n sel_str = \" selected='selected' \"\n else\n sel_str = \"\"\n end\n result += \"<option value='c#{contact.id}' data-type='contact' #{sel_str}>#{contact.name}</option>\"\n array_result << [contact.id, contact.name]\n end\n\n result += \"</optgroup>\"\n if return_type == 'html'\n if array_result.length > 1\n return (select_one_html + result).html_safe\n else\n return result.html_safe\n end\n else\n return array_result\n end\n\n else\n groups = {}\n\n case type\n when \"stockholder\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [6, 10, 11, 12, 13, 14]).order(type_: :asc)\n when \"principal\"\n person_false_entities = current_user.entities_list(super_entity).where(type_: [6, 10, 11, 12, 13, 14]).order(type_: :asc)\n when \"agent\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [10, 11, 12, 13, 14]).where('id != ?', super_entity.principal.entity_id).order(type_: :asc)\n when \"trustee\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [10, 11, 12, 13, 14]).order(type_: :asc)\n when \"beneficiary\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [6]).order(type_: :asc)\n when \"member\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [6, 10, 11, 12, 13, 14]).order(type_: :asc)\n when \"manager\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [10, 11, 12, 13, 14]).order(type_: :asc)\n when \"general-partner\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [10, 11, 12, 13, 14]).order(type_: :asc)\n when \"limited-partner\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [10, 11, 12, 13, 14]).order(type_: :asc)\n when \"tenant-in-common\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [6, 10, 11, 12, 13, 14]).order(type_: :asc)\n when \"guardian\"\n person_false_entities = current_user.entities_list(super_entity.id).where(type_: [14]).order(type_: :asc)\n else\n person_false_entities = []\n end\n\n person_false_entities.each do |entity|\n key = \"#{MemberType.member_types[entity.type_]}\"\n key = key + poa_str if !key.match(\"ttorney\").nil?\n if groups[key].nil?\n groups[key] = [entity]\n else\n groups[key] << entity\n end\n end\n\n case type\n when \"stockholder\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'Corporate Stockholder', user_id: current_user.id)\n when \"principal\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'Principal', user_id: current_user.id)\n when \"agent\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'Agent', user_id: current_user.id)\n when \"trustee\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'Trustee', user_id: current_user.id)\n when \"member\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'LLC Member', user_id: current_user.id)\n when \"manager\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'LLC Outside Manager', user_id: current_user.id)\n when \"general-partner\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'LP General Partner', user_id: current_user.id)\n when \"limited-partner\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'LP Limited Partner', user_id: current_user.id)\n when \"tenant-in-common\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'Tenant in Common', user_id: current_user.id)\n when \"judge\"\n person_false_contacts = Contact.all.where(is_company: true, contact_type: 'Client Participant', role: 'Judge', user_id: current_user.id)\n else\n person_false_contacts = []\n end\n\n groups.each do |k,v|\n result += \"<optgroup label='#{k}'>\"\n v.each do |entity|\n if (sel_flag && \"e#{entity.id}\" == cid) || (person_false_entities.count + person_false_contacts.count == 1)\n sel_flag = false\n sel_str = \" selected='selected' \"\n else\n sel_str = \"\"\n end\n result += \"<option value='e#{entity.id}' data-type='entity' #{sel_str}>#{entity.name} </option>\"\n array_result << [entity.id, entity.name]\n end\n result += \"</optgroup>\"\n end\n\n result += \"</optgroup><optgroup label='Contacts '>\"\n\n person_false_contacts.each do |contact|\n if (sel_flag && \"c#{contact.id}\" == cid) || (person_false_entities.count + person_false_contacts.count == 1)\n sel_flag = false\n sel_str = \" selected='selected' \"\n else\n sel_str = \"\"\n end\n result += \"<option value='c#{contact.id}' data-type='contact' #{sel_str}>#{contact.name}</option>\"\n array_result << [contact.id, contact.name]\n end\n\n result += \"</optgroup>\"\n if return_type == 'html'\n if array_result.length > 1\n return (select_one_html + result).html_safe\n else\n return result.html_safe\n end\n else\n return array_result\n end\n\n end\n end",
"def select(attribute, choices, options = {})\n object_value = @object ? @object.send(attribute) : nil # grab the object's value\n options.reverse_merge!(:label => attribute.to_s.titleize, :id => \"#{object_name(:id)}_#{attribute}\")\n @renderer.select_tag(\"#{object_name}[#{attribute}]\", @template.options_for_select(choices, object_value), options)\n end",
"def render(field_id, value = nil, product = nil)\r\n\t\t\tselected_value = !value.nil? ? value : self.default_value || nil\r\n\t\t\tr = \"<select name=\\\"#{field_id}\\\">\"\r\n\t\t\tavailable_values(product).each do |v|\r\n\t\t\t\tr += \"<option value=\\\"#{v.id}\\\"\"\r\n\t\t\t\tif v.id.to_s == selected_value.to_s then\r\n\t\t\t\t\tr += \" selected=\\\"selected\\\"\"\r\n\t\t\t\tend\r\n\t\t\t\tr += \">#{v.value}</option>\"\r\n\t\t\tend\r\n\t\t\tr += \"</select>\"\r\n\t\tend",
"def make_select\n text = \"<select name='event'>\"\n @@events.each do |key, val|\n text+= \"<option value='#{key}'>#{val}</option>\"\n end\n text += \"</select>\"\n text\n end",
"def render_record_select(options = {}) #:nodoc:\n controller.send(:render_record_select, options) do |options|\n render options\n end\n end",
"def selected_options; end",
"def selected_options; end",
"def type_select object, method, label_text, options\n content_tag :div, :class => :\"type-select\" do\n attr_id = \"#{object.class.to_s.downcase}[#{method}]\".to_sym\n output = String.new\n output << content_tag(:label, label_text, :for => attr_id) unless label_text.blank?\n output << select_tag(attr_id, options)\n end\n end",
"def assay_sop_selection(element_name, current_sop)\n sops = authorised_sops(User.current_user.person.projects)\n options = options_from_collection_for_select(sops, :id, :title, current_sop.try(:id))\n select_tag(element_name, options,\n class: 'form-control', include_blank: true).html_safe\n end",
"def project_dropdown\n @workspace = params[:workspace_id]\n @projects = Project.where(:workspace_id => params[:workspace_id])\n\n respond_to do |format|\n format.js\n end\n\n end",
"def competitor_select_box(form, competition, options = {})\n options[:autofocus] = true\n options[:class] = \"chosen-select #{options[:class]}\"\n disabled_ids = options[:disabled_ids]\n form.select :competitor_id, competition.competitors.active.ordered.map { |comp| [\"##{comp.bib_number}-#{comp}\", comp.id] }, { include_blank: true, disabled: disabled_ids }, options\n end",
"def name_for_select_for_facture\n @name_for_select = self.factcat.name + \" - \" + self.name\n end",
"def build_select(type, select_options_as_html)\n select_options = {\n id: input_id_from_type(type),\n name: input_name_from_type(type)\n }.merge!(@html_options)\n select_options[:disabled] = \"disabled\" if @options[:disabled]\n select_options[:class] = css_class_attribute(type, select_options[:class], @options[:with_css_classes]) if @options[:with_css_classes]\n\n select_html = +\"\\n\"\n select_html << content_tag(\"option\", \"\", value: \"\", label: \" \") + \"\\n\" if @options[:include_blank]\n select_html << prompt_option_tag(type, @options[:prompt]) + \"\\n\" if @options[:prompt]\n select_html << select_options_as_html\n\n (content_tag(\"select\", select_html.html_safe, select_options) + \"\\n\").html_safe\n end",
"def association_ajax_select_tag(id, record, reflection)\n if reflection.klass.scaffold_use_auto_complete\n scaffold_text_field_tag_with_auto_complete(id, reflection.klass)\n else\n singular_class = record.class\n foreign_key = reflection.options[:foreign_key] || singular_class.table_name.classify.foreign_key\n association_foreign_key = reflection.options[:association_foreign_key] || reflection.klass.table_name.classify.foreign_key\n join_table = reflection.options[:join_table] || ( singular_class.table_name < reflection.klass.table_name ? '#{singular_class.table_name}_#{reflection.klass.table_name}' : '#{reflection.klass.table_name}_#{singular_class.table_name}')\n items = reflection.klass.find(:all, :order => reflection.klass.scaffold_select_order, :conditions =>[\"#{reflection.klass.table_name}.#{reflection.klass.primary_key} NOT IN (SELECT #{association_foreign_key} FROM #{join_table} WHERE #{join_table}.#{foreign_key} = ?)\", record.id], :include=>reflection.klass.scaffold_include)\n select_tag(id, \"<option></option>\" << items.collect{|item| \"<option value='#{item.id}' id='#{id}_#{item.id}'>#{h item.scaffold_name}</option>\"}.join(\"\\n\"))\n end\n end",
"def get_complexities\n work_subtype = WorkSubtype.find(params[:work_subtype_id])\n @complexities = work_subtype.work_subtype_complexities\n render :update do |page|\n page.show 'task_'+@task_index+'_complexity'\n page.replace_html 'task_'+@task_index+'_complexity_select', :partial=>'complexity_select'\n end\n end",
"def remote_select(object,method,options,controller,action,selected_value=nil, record = nil)\n option_tags = \"<option value=''></option>\"\n options.each do |option|\n if selected_value.to_s == option[1].to_s || (!record.nil? && record.send(method).to_s == option[1].to_s)\n option_tags << \"<option value='#{option[1]}' selected='selected'>#{option[0]}</option>\"\n else\n option_tags << \"<option value='#{option[1]}'>#{option[0]}</option>\"\n end\n end\n output = \"<select name=\\\"#{object}[#{method}]\\\" id=\\\"#{object}[#{method}]\\\" onchange=\\\";new Ajax.Request('/#{controller}/#{action}',\n {asynchronous:false, evalScripts:true, parameters:'#{object}[#{method}]='+escape(value)})\\\">\" + option_tags + \"</select>\"\n output.html_safe\n end",
"def select_project_for_project_membership_assignment\n @projects = current_office.active_projects.order(\"shoot_date ASC\")\n \n add_breadcrumb \"Select Project\", 'select_project_for_project_membership_assignment_url'\n render :file => \"projects/project_memberships/select_project_for_project_membership_assignment\"\n end",
"def selectables(f, value, group)\n\t\trender :partial => \"shared/forms/panel/selection\", :locals => { :f => f, :value => value, :group => group, :select_class => \"selectables\", :selected_value => nil }\n\tend",
"def select_field_tag(name, current_value, choices, html_options = {})\r\n #MGS- force the name to be set to the name, no matter the html options\r\n html_options['name'] = name\r\n #MES- Set the ID to the name, if no ID was supplied\r\n if !html_options.has_key?('id')\r\n #MES- Replace '[' with '_' and ']' with '' because square brackets are not\r\n # allowed in IDs.\r\n html_options['id'] = name.sub(/[\\[]/, '_').sub(/\\]/, '')\r\n end\r\n\r\n options = ''\r\n choices.each do | item |\r\n options << option_tag(item[1], item[0], current_value.to_s == item[0].to_s)\r\n end\r\n #MGS- use this rails helper to build the select element\r\n content_tag(\"select\", options, html_options)\r\n end",
"def scaffold_select_tag(name, collection, multiple = false)\n \"<select name='#{name}#{scaffold_param_list_suffix if multiple}' id='#{name}' #{\"multiple='multiple'\" if multiple}>#{'<option></option>' unless multiple}#{collection.collect{|obj| \"<option value='#{i = obj.scaffold_id}' id='#{name}_#{i}'>#{h obj.scaffold_name}</option>\"}.join(\"\\n\")}</select>\"\n end",
"def in_my_select attrs = nil\n attrs[:class] ||= ''\n attrs[:class] << ' myselect'\n attrs[:class] = attrs[:class].strip\n\n # La taille du menu peut être déterminé par :width\n size = attrs.delete(:size) || 'normal'\n\n # Il faut ajouter un champ hidden qui contiendra vraiment\n # la valeur avec le nom déterminé\n fid = attrs[:id] || attrs[:name]\n fname = attrs[:name] || attrs[:id]\n attrs[:id] = \"myselect_#{fid}\"\n attrs[:name] = \"myselect_#{fname}\"\n \"<div class=\\\"container_myselect #{size}size\\\">\" +\n attrs[:selected].in_hidden(id: fid, name: fname) +\n self.class.opened_tag('div', attrs) + self.to_s + '</div>' +\n '</div>'\n end",
"def edit_form\n\t\toptions = { :disabled => false, :show_all => true, :edit => true}\n\t\tform_template(options)\n\tend",
"def edit_form\n\t\toptions = { :disabled => false, :show_all => true, :edit => true}\n\t\tform_template(options)\n\tend",
"def initialize(params={})\n @parent ||= params[:parent]\n if params[:model] then\n @entities ||= params[:model].find(:all).entities\n else\n @entities ||= params[:entities]\n @entities ||= @parent.entities if @parent && @parent.respond_to?(:entities)\n end\n params ||= params\n params.delete(:parent)\n params.delete(:entities)\n \n if !params[:options] && !params[:option_values] then\n params[:option_values] ||= [ '' ]\n params[:option_labels] ||= [ tl(:select_option) ]\n @entities.each { |e|\n params[:option_values] << e.pkey\n params[:option_labels] << e.label\n }\n end\n \n if params[:name].empty? then\n params[:name] ||= @entities.first.class.primary_key_name if @entities.first\n end\n if @parent then\n params[:onchange] ||= \"Aurita.Main.selection_list_add({ select_field:'#{params[:id]}', \n name: '#{@parent.options_name}' });\" \n end\n \n super(params)\n end",
"def ui_select_field(content = nil, options = nil, html_options = nil, &block)\n UiBibz::Ui::Core::Forms::Selects::SelectField.new(content, options, html_options, &block).render\n end",
"def nested_select(object, method, collection, options = {}, html_options = {})\n choices = nested_as_options(collection) { |record| [\"#{@indent} #{record.name}\", record.id] }\n select(object, method, choices, options, html_options)\n end",
"def element_form(context={}, aspect_model)\n \n app = context[:app]\n\n if resource.can_write?(app.user) and (not app.user.belongs_to?(Users::Group.get('anonymous')))\n renderer = ::UI::FieldSetRender.new('resourceaccesscontrol', app) \n renderer.render('form', 'em') \n else \n ''\n end\n\n end",
"def select_account\n # updates projects based on the account selected\n projects = Project.all(:account_id => params[:account_id])\n # map to id for use in options_for_select\n @projects = projects.map{|a| a.id}\n # updates users based on the account selected\n users = User.all(:account_id => params[:account_id])\n # map to id for use in options_for_select\n @users = users.map{|a| a.id} \n end",
"def select_project_to_monitor_post_production\n @projects = current_user.assigned_projects_for( PROJECT_ROLE[:account_executive] )\n \n add_breadcrumb \"Select Project\", 'select_project_to_monitor_post_production_url'\n render :file => \"projects/project_management/select_project_to_monitor_post_production\"\n end",
"def select_cat_from_tree(obj, col, root, selected_obj, *args)\n options = args.extract_options!\n select_name = obj + '[' + col.to_s + ']'\n out = \"<select name='#{select_name}' onchange => update_category('#{obj}', facture)>\"\n out << select_cat_from_tree_recurs(root, selected_obj)\n out << \"</select>\"\n end",
"def render_crud_form_field(column, item, locals)\n locals = locals.merge({:item => item, :column => column})\n\n if param(column,:grouped_select)\n return content_tag(\n \"select\",\n tag(\"option\", :value => \"\") + grouped_options_for_select(param(column,:grouped_select), @item.send(column[:name])),\n :id => \"#{@singular.underscore}_#{column[:name]}\",\n :name => \"#{@singular.underscore}[#{column[:name]}]\"\n )\n elsif param(column,:select)\n locals[:f].select(column[:name].to_s, param(column,:select).collect {|element| element.is_a?(Array) && element.length == 2 ? element : [element.to_s, element.to_s]}, { :include_blank => true }.merge(param(column, :params, {})), param(column, :params, {}))\n else\n type = param(column, :type, (item.attributes.include?(column[:name].to_s) ? item.column_for_attribute(column[:name]).type : \"other\")).to_s\n type = 'other_record' if param(column, :type, '') == '' && item.respond_to?(column[:name].to_s+\"_id\") && (attribute_class(column).respond_to?(:find) || column.include?(:find_class))\n locals = locals.merge({:type => type})\n\n if class_exists?('Lico::AutoCrud::Types::' + type.classify)\n return get_class('Lico::AutoCrud::Types::' + type.classify).to_input(item, column[:name], locals[:f], locals[:params])\n end\n \n return case type.to_sym\n when :boolean then locals[:f].check_box(column[:name], :class => 'in_boolean')\n when :country_select then locals[:f].localized_country_select(\n column[:name].to_s,\n [:NL, :BE, :LU, :FR, :DE],\n { :include_blank => '' },\n param(column, :params, { }).merge({ :class => 'in_country_select' })\n )\n when :currency then number_to_currency(0, :format => \"%u\") + \" \".html_safe + locals[:f].text_field(column[:name], :class => 'in_currency', :style => 'text-align: right', :value => number_to_currency(@item.send(column[:name]).to_f, :separator => \".\", :delimiter => \"\", :format => \"%n\"))\n when :custom then send(\"input_for_#{@singular.underscore}_#{column[:name].to_s}\", locals[:f], item)\n when :date then locals[:f].date_select(column[:name], param(column, :options, {}),{ :class => 'in_date' })\n when :time then locals[:f].time_select(column[:name], param(column, :options, {}),{ :class => 'in_time' })\n when :datetime then locals[:f].datetime_select(column[:name], :minute_step => 15, :class => 'in_datetime')\n when :file then locals[:f].file_field(column[:name], :class => 'in_file')\n when :hidden then locals[:f].hidden_field(column[:name], param(column, :params, { }).merge({:class => 'in_hidden'}))\n when :no_input then @item.send(column[:name])\n when :other_record then\n find_class = column.include?(:find_class) ? column[:find_class] : attribute_class(column)\n find_conditions = column[:conditions]\n find_items = find_class.find(:all, :select => param(column, :select, nil), :joins => param(column, :joins, []), :include => param(column, :include, []), :conditions => find_conditions).collect do |element| \n [ element.to_s, element.id ]\n end\n locals[:f].select(\"#{column[:name].to_s}_id\", find_items, { :include_blank => true }.merge(param(column, :options, {})))\n when :paperclip then\n item.send(column[:name].to_s).nil? ? \n # no image\n locals[:f].file_field(column[:name], :class => 'in_paperclip') :\n\n # with image\n image_tag(item.send(column[:name].to_s, param(column, :size))) +\n content_tag(\n \"div\", \n t('paperclip.upload_new') + \" \" + locals[:f].file_field(column[:name], :class => 'in_paperclip') +\n content_tag(\n \"div\",\n locals[:f].check_box(\"#{column[:name]}_delete\") +\n locals[:f].label(\"#{column[:name]}_delete\", t('paperclip.select_unlink'))\n )\n )\n when :password then locals[:f].password_field(column[:name], :class => 'in_password')\n when :select then locals[:f].select(column[:name].to_s, param(column,:select).collect {|element| element.is_a?(Array) && element.length == 2 ? element : [element.to_s, element.to_s]}, { :include_blank => true }.merge(param(column, :params, {})), param(column, :params, {}))\n when :textarea then locals[:f].text_area(column[:name], {:class => 'in_textarea'}.merge(param(column, :params, { })))\n else\n locals[:f].text_field(column[:name], param(column, :params, { }).merge({:class => 'in_' + type}))\n end\n end\n end",
"def index\n authorize! :read, Deal\n \n respond_to do |format|\n format.html\n format.json { render json: Deal.select2_options(params, @current_user) }\n end\n end",
"def menu\n ([[0, 'Choisir l’icarien…']] + User.values_select(type_icarien => true)).in_my_select(id: 'opuser_user_id', name: 'opuser[user_id]', selected: param_opuser[:user_id])\n end",
"def form_tr_select_cat_from_tree(form, obj, root, name, col, id, display_name, selected_obj, *args)\n options = args.extract_options!\n out = ''\n out += '<tr><td class=\"label\">'\n out += form.label col.to_sym, name\n out += ' : </td>'\n out += '<td class=\"field\">'\n out += select_cat_from_tree(obj, col, root, selected_obj, options)\n out += '</td></tr>'\n return out\n end",
"def options_for_component_select var_name, var_data, fields, item\n options = []\n\n # _nil\n unless var_data[:required]\n options.push ['', '_nil']\n end\n\n # fields\n fields.each do |field|\n options.push [field, field]\n end\n\n # _literal\n options.push ['Literal...', '_literal']\n\n # figure\n current = value_for_data(var_name, item)\n\n return options_for_select(options, current)\n end",
"def projects_select_id_equals(form, projects)\n form.select :project_id_equals, to_form_select(projects),\n {:include_blank => ''}\n end",
"def set_for_select\n @for_select = ForSelect.find(params[:id])\n # For PUNDIT will authorize all the actions that call 'set_for_select'\n # authorize @for_select\n end",
"def multiple_application_environment_options\n app_ids = params[:app_ids]\n app_ids = [app_ids].flatten\n unless app_ids.blank?\n options = \"\"\n App.where(:id => app_ids).order('apps.name asc').each do |app|\n apply_method = current_user.has_global_access? ? nil : \"app_environments_visible_to_user\"\n options += \"<optgroup class='app' label='#{app.name}'>\"\n options += options_from_model_association(app, :application_environments, :apply_method => apply_method)\n options += \"</optgroup>\"\n end\n render :text => options\n else\n render :nothing => true\n end\n end",
"def program_function_program_name_changed\n\tprogram_name = get_selected_combo_value(params)\n\tsession[:program_function_form][:program_name_combo_selection] = program_name\n\t@functional_area_names = ProgramFunction.functional_area_names_for_program_name(program_name)\n#\trender (inline) the html to replace the contents of the td that contains the dropdown \n\trender :inline => %{\n\t\t<%= select('program_function','functional_area_name',@functional_area_names)%>\n\n\t\t}\n\nend",
"def preview\r\n\t\t\trender(\"option_#{self.id}_preview\")\r\n\t\tend",
"def components_select_table(cp, depth)\n\n pt= \"<option value=\\\"#{cp.id}\\\"\"\n pt+= \" selected=\\\"true\\\"\" if @component == cp\n pt+= \">#{\"-\"*depth}\"\n pt+= \"#{cp.name}\"\n pt+= \"</option>\\n\"\n\n for child in cp.components\n if(child != @component)\n pt += components_select_table(child, depth+1)\n end\n end\n\n return pt\n end",
"def association_select_tag(record, association)\n reflection = record.camelize.constantize.reflect_on_association(association)\n foreign_key = reflection.options[:foreign_key] || reflection.klass.table_name.classify.foreign_key\n if reflection.klass.scaffold_use_auto_complete\n scaffold_text_field_with_auto_complete(record, foreign_key, reflection.klass.name.underscore)\n else\n items = reflection.klass.find(:all, :order => reflection.klass.scaffold_select_order, :conditions => reflection.klass.interpolate_conditions(reflection.options[:conditions]), :include=>reflection.klass.scaffold_include)\n select(record, foreign_key, items.collect{|i| [i.scaffold_name, i.id]}, {:include_blank=>true})\n end\n end",
"def options_for_user_projects(task)\n projects = current_user.projects.find(:all, :include => \"customer\", :order => \"customers.name, projects.name\")\n\n last_customer = nil\n options = []\n\n projects.each do |project|\n if project.customer != last_customer\n options << [ h(project.customer.name), [] ]\n last_customer = project.customer\n end\n\n options.last[1] << [ project.name, project.id ]\n end\n\n return grouped_options_for_select(options, task.project_id, \"Please select\")\n end",
"def edit\n #Finds selected datafile\n @data_file = DataFile.find(params[:id])\n #creates an array of all products\n @all_products = Product.all\n #creates an array of all components\n @all_components = Component.all\n #creates an array of all valuefields\n @all_valuefields = Valuefield.all\n @all_properties = Property.all\n\n @items_to_select = @data_file.products + @data_file.components + @data_file.valuefields\n end",
"def authorization_select_options\n ContentAuthorization.select_options\n end",
"def edit\n #Finds selected image\n @image = Image.find(params[:id])\n #creates an array of all products\n @all_products = Product.all\n #creates an array of all components\n @all_components = Component.all\n #creates an array of all valuefields\n @all_valuefields = Valuefield.all\n #assigns variable associated product\n\n @items_to_select = @image.products + @image.components + @image.valuefields\n\n end",
"def edit\n\t\t@heating_choices = [ [\"Gas\", \"Gas\"], [\"Electric\", \"Electric\"], [\"Geothermal\", \"Geothermal\"], [\"Other\", \"Other\"]]\n\t\t@cooling_choices = [ [\"Central Air\", \"Central Air\"], [\"Geothermal\", \"Geothermal\"], [\"None\", \"None\"], [\"Other\", \"Other\"]]\n\t\t@property_types = [ [\"Single Family\", \"Single Family\"], [\"Condo\", \"Condo\"], [\"Multi Family\", \"Multi Family\"], [\"Vacant Land\", \"Vacant Land\"], [\"Mobile Home\", \"Mobile Home\"] ]\n\t\t@basement_types = [ [\"Finished\", \"Finished\"], [\"Partially Finished\", \"Partially Finished\"], [\"Unfinished\", \"Unfinished\"], [\"Other\", \"Other\"], [\"None\", \"None\"]]\n\n\t\t@bathroom_col = (1..10).step(0.25)\n\t\t@states = [\n\t [ \"Alabama\", \"AL\" ],\n\t [ \"Alaska\", \"AK\" ],\n\t [ \"Arizona\", \"AZ\" ],\n\t [ \"Arkansas\", \"AR\" ],\n\t [ \"California\", \"CA\" ],\n\t [ \"Colorado\", \"CO\" ],\n\t [ \"Connecticut\", \"CT\" ],\n\t [ \"Delaware\", \"DE\" ],\n\t [ \"Florida\", \"FL\" ],\n\t [ \"Georgia\", \"GA\" ],\n\t [ \"Hawaii\", \"HI\" ],\n\t [ \"Idaho\", \"ID\" ],\n\t [ \"Illinois\", \"IL\" ],\n\t [ \"Indiana\", \"IN\" ],\n\t [ \"Iowa\", \"IA\" ],\n\t [ \"Kansas\", \"KS\" ],\n\t [ \"Kentucky\", \"KY\" ],\n\t [ \"Louisiana\", \"LA\" ],\n\t [ \"Maine\", \"ME\" ],\n\t [ \"Maryland\", \"MD\" ],\n\t [ \"Massachusetts\", \"MA\" ],\n\t [ \"Michigan\", \"MI\" ],\n\t [ \"Minnesota\", \"MN\" ],\n\t [ \"Mississippi\", \"MS\" ],\n\t [ \"Missouri\", \"MO\" ],\n\t [ \"Montana\", \"MT\" ],\n\t [ \"Nebraska\", \"NE\" ],\n\t [ \"Nevada\", \"NV\" ],\n\t [ \"New Hampshire\", \"NH\" ],\n\t [ \"New Jersey\", \"NJ\" ],\n\t [ \"New Mexico\", \"NM\" ],\n\t [ \"New York\", \"NY\" ],\n\t [ \"North Carolina\", \"NC\" ],\n\t [ \"North Dakota\", \"ND\" ],\n\t [ \"Ohio\", \"OH\" ],\n\t [ \"Oklahoma\", \"OK\" ],\n\t [ \"Oregon\", \"OR\" ],\n\t [ \"Pennsylvania\", \"PA\" ],\n\t [ \"Rhode Island\", \"RI\" ],\n\t [ \"South Carolina\", \"SC\" ],\n\t [ \"South Dakota\", \"SD\" ],\n\t [ \"Tennessee\", \"TN\" ],\n\t [ \"Texas\", \"TX\" ],\n\t [ \"Utah\", \"UT\" ],\n\t [ \"Vermont\", \"VT\" ],\n\t [ \"Virginia\", \"VA\" ],\n\t [ \"Washington\", \"WA\" ],\n\t [ \"West Virginia\", \"WV\" ],\n\t [ \"Wisconsin\", \"WI\" ],\n\t [ \"Wyoming\", \"WY\" ]\n\t ].freeze\n\t \n\n\t\t@listing = Listing.find(params[:id])\n\t\t9.times { @listing.images.build }\n\tend",
"def _whimsy_forms_select(\n name: nil,\n label: 'Enter string',\n value: '', # Currently selected value\n valuelabel: '', # Currently selected valuelabel\n options: nil, # ['value'] or {\"value\" => 'Label for value'} of all selectable values\n multiple: false, # Not currently supported\n required: false,\n readonly: false,\n icon: nil,\n iconlabel: nil,\n iconlink: nil,\n placeholder: nil, # Currently displayed text if value is blank (not selectable)\n helptext: nil\n )\n return unless name\n aria_describedby = \"#{name}_help\" if helptext\n _div.form_group do\n _label.control_label.col_sm_3 label, for: \"#{name}\"\n _div.col_sm_9 do\n _div.input_group do\n _select.form_control name: \"#{name}\", id: \"#{name}\", aria_describedby: \"#{aria_describedby}\", required: required, readonly: readonly do\n if ''.eql?(value)\n if ''.eql?(placeholder)\n _option '', value: '', selected: 'selected'\n else\n _option \"#{placeholder}\", value: '', selected: 'selected', disabled: 'disabled', hidden: 'hidden'\n end\n else\n _option ''.eql?(valuelabel) ? \"#{value}\" : \"#{valuelabel}\", value: \"#{value}\", selected: 'selected'\n end\n if options.kind_of?(Array)\n options.each do |opt|\n _option opt, value: opt\n end\n else\n options.each do |val, disp|\n _option disp, value: val\n end\n end\n end\n _whimsy_forms_iconlink(icon: icon, iconlabel: iconlabel, iconlink: iconlink)\n end\n if helptext\n _span.help_block id: \"#{aria_describedby}\" do\n _markdown \"#{helptext}\"\n end\n end\n end\n end\n end",
"def select(label, name, args = {})\n id = args[:id] ? args[:id] : id_for(name)\n multiple, size = args.values_at(:multiple, :size)\n \n # Get all the values\n if !args[:values] and @form_values.respond_to?(name)\n values = @form_values.send(name)\n else\n values = args[:values]\n args.delete(:values)\n end\n \n args[:multiple] = 'multiple' if multiple\n args[:size] = (size || values.count || 1).to_i\n args[:name] = multiple ? \"#{name}[]\" : name\n args = args.merge(:id => id)\n\n # Retrieve the selected value\n has_selected, selected = args.key?(:selected), args[:selected]\n selected = [selected] if !selected.is_a?(Array)\n args.delete(:selected)\n\n @g.p do\n label_for(id, label, name)\n @g.select args do\n values.each do |value, o_name|\n o_name ||= value\n o_args = {:value => value}\n \n if has_selected and selected.include?(value)\n o_args[:selected] = 'selected'\n end\n \n @g.option(o_args){ o_name }\n end\n end\n end\n end",
"def chain_select_options(model_name, prefix)\n indicator_id = chain_select_indicator_name('global', prefix)\n \n {:onchange => \"new Ajax.Request('/chain_selects/query/' + this.value + '?parent=#{model_name}&prefix=#{prefix}', {asynchronous:true, evalScripts:true,onLoading:function(request){$('#{indicator_id}').show()},onComplete:function(request){$('#{indicator_id}').hide()}}); return false;\", :class => 'chain_select_boxes'}\n end",
"def lens_select_menu(selected: nil, path: request.path, prompt: nil)\n prompt ||= I18n.t('blacklight.about.select.label', default: 'Lens')\n menu = Blacklight::Lens.lens_keys.map { |k| [k.to_s.capitalize, k.to_s] }\n menu = menu.unshift([prompt, ''])\n menu = options_for_select(menu, selected.to_s)\n form_tag(path, method: :get, class: 'about-lens-select') do\n select_opt = { class: 'form-control', onchange: 'this.form.submit();' }\n select_tag(:lens, menu, select_opt)\n end\n end",
"def get_listbox_data\n @countries = current_user.company.countries.dropdown_list\n @sectors = current_user.company.sectors.order(:sector)\n @rel_types = current_user.company.rel_types.dropdown_list\n @relationgroups = current_user.company.relations.dropdown_list\n end",
"def options_field\n load_resource\n\n col = @grid.get_column(params[:field])\n if col\n render :json => col.get_opts_for_select(@resource)\n else\n render :json => { status: \"ERROR\" }, status: :not_found\n end\n end",
"def farm_puc_account_puc_type_code_changed\n\tpuc_type_code = get_selected_combo_value(params)\n\tsession[:farm_puc_account_form][:puc_type_code_combo_selection] = puc_type_code\n\t@puc_codes = FarmPucAccount.puc_codes_for_puc_type_code(puc_type_code)\n#\trender (inline) the html to replace the contents of the td that contains the dropdown \n\trender :inline => %{\n\t\t<%= select('farm_puc_account','puc_code',@puc_codes)%>\n\n\t\t}\n\nend",
"def option_selects\n content_profile_entries.map do |cpe|\n [cpe.description, cpe.id, {'data-description': \"#{cpe.content_type}:#{cpe.topic_type}\"} ]\n end\n end",
"def form_advanced_options(f, document, *list)\n render_partial_from_theme \"documents/shared/form_advanced_options\", :locals => {:f => f, :document => document, :list => list}\n end",
"def edit\n @user = User.find(params[:id])\n @select =\"My Account\"\n end",
"def projects_select_id_equals(form, projects, options = {})\n form.select :project_id_equals, to_form_select(projects),\n {:include_blank => ''}, options\n end",
"def select_options\n (first_level_options || []).map { |o| [o.name, o.id] }\n end",
"def form_content_options(pid = nil)\n {:view => form_template, :layout => 'form_wrapper.html.erb',\n :locals => {:container => \"#{dom_id}_form\", :record => record, :pid => pid, :multipart_form => multipart_form}}\n end",
"def select_project_to_be_started\n @projects = current_office.pending_start_projects\n \n add_breadcrumb \"Select Project\", 'select_project_to_be_started_url'\n render :file => \"projects/start_project/select_project_to_be_started\" \n end",
"def chain_select_model_options(model_name, options = {})\n ar_model = constantize_model(model_name)\n \n # always display the data for the 1st drop-down\n if ar_model.is_chain_select_root?\n options[:select_txt_only] = nil\n options[:value] = options[:values][model_name] if options[:values] and options[:values][model_name]\n \n # for succeeding drop-downs, either display a plain \"-- Select --\"\n # or display a selected value\n else\n # user specified a value so we need to retrieve all data that are related to it\n if options[:values] and options[:values][model_name]\n options[:value] = options[:values][model_name]\n options[:parent] = [options[:values][ar_model.chain_select_from], ar_model.chain_select_from.to_s]\n else\n options[:select_txt_only] = true\n end\n end\n \n options\n end",
"def new\n @menu = \"option\"\n @board = \"option\"\n @section = \"new\"\n \n @option = Option.new\n @select_main_option = Option.all(:order => [ :priority.asc ]) \n\n render 'admin/options/option'\n end",
"def render\n return ro_standard if @readonly \n set_initial_value('html','value')\n require 'sort_alphabetical' \n \n record = record_text_for(@yaml['name'])\n p '******', \"<div id=\\\"#{@yaml['name']}\\\" class=\\\"tree-select\\\" #{set_style()} >\"\n @html << \"<div id=\\\"#{@yaml['name']}\\\" class=\\\"tree-select\\\" #{set_style()} >\"\n# Fill @choices hash. The key is parent object id\n @choices = {}\n do_eval(@yaml['eval']).each {|data| @choices[ data[2].to_s ] ||= []; @choices[ data[2].to_s ] << (data << false)}\n# put current values hash with. To speed up selection when there is a lot of categories\n current_values = {}\n current = @record[@yaml['name']] || []\n current.each {|e| current_values[e.to_s] = true}\n# set third element of @choices when selected\n @choices.keys.each do |key|\n 0.upto( @choices[key].size - 1 ) do |i|\n choice = @choices[key][i]\n choice[3] = true if current_values[ choice[1].to_s ]\n end\n end\n make_tree(nil)\n @html << '</ul></div>'\n# add hidden communication field \n @html << @parent.hidden_field(record, @yaml['name'], value: current.join(','))\n# javascript to update hidden record field when tree looses focus\n @js =<<EOJS\n$(function(){\n $(\"##{@yaml['name']}\").jstree( {\n \"checkbox\" : {\"three_state\" : false}, \n \"core\" : { \"themes\" : { \"icons\": false } },\n \"plugins\" : [\"checkbox\"]\n });\n});\n \n$(document).ready(function() {\n $('##{@yaml['name']}').on('focusout', function(e) {\n var checked_ids = [];\n var checked = $('##{@yaml['name']}').jstree(\"get_checked\", true);\n $.each(checked, function() {\n checked_ids.push( this.data.id );\n });\n $('#record_#{@yaml['name']}').val( checked_ids.join(\",\") );\n });\n});\nEOJS\n self\nend",
"def get_format_dropdown()\n collection_select(\"project\", \"format\", format_list(), :first, :last, {:prompt => \"Please select\"})\n end",
"def _parent_selection\n if @selector_for\n render :js => select_record_js(selector_field_value) + js_choose_id(selector_field_value)\n else\n render :js => update_recordset_js\n end\n end",
"def contact_methods_party_party_type_name_changed\n\tparty_type_name = get_selected_combo_value(params)\n\tsession[:contact_methods_party_form][:party_type_name_combo_selection] = party_type_name\n\t@party_names = ContactMethodsParty.party_names_for_party_type_name(party_type_name)\n#\trender (inline) the html to replace the contents of the td that contains the dropdown \n\trender :inline => %{\n\t\t<%= select('contact_methods_party','party_name',@party_names)%>\n\n\t\t}\n\nend",
"def build_year_options(selected, options = {})\n start = options.delete(:start)\n stop = options.delete(:end)\n step = options.delete(:step)\n\n select_options = []\n start.step(stop, step) do |value|\n tag_options = { value: value }\n tag_options[:selected] = \"selected\" if selected == value\n text = year_name(value)\n select_options << content_tag(\"option\", text, tag_options)\n end\n\n (select_options.join(\"\\n\") + \"\\n\").html_safe\n end",
"def edit\n @context = params[:context] # context\n @className = params[:class] if isok(params[:class])\n @id = params[:id]\n\n # Just pass on to the form that will allow us to 'edit' the tag list i.e. to add tags\n respond_to do |format|\n format.html {render :layout => 'content'} # new.html.erb\n end\n end",
"def get\n render json: Project.select(:id, \"name as label\")\n end",
"def index\n super\n use_widgets do |root|\n root << jqg_top_widget('degree', :cell_class => 'degrees_select', :widget_id => 'degrees_select') do |degwid|\n jqg_child_widget(degwid, 'program', :cell_class => 'program_lookup', :selector_for => :program_id)\n end\n end\n render\n end",
"def select_with_grouped_options(object, method, choices, selected_key = nil, prompt = nil)\n name = object.class.name.downcase\n html = \"<select id=\\\"#{name}_#{method}\\\" name=\\\"#{name}[#{method}]\\\">\"\n html += grouped_options_for_select(choices, selected_key, prompt)\n html += \"</select>\"\n end",
"def set_collection_select\n @facultades = Facultad.all\n @programas = Programa.all\n @grupos = Grupo.all\n @semilleros = Semillero.all\n @investigadores = Investigador.all\n end",
"def projects_dropdown\n if session[:office] != '0'\n Project.where(office_id: session[:office].to_i).ser_or_tca_order_type\n elsif session[:company] != '0'\n Project.where(company_id: session[:company].to_i).ser_or_tca_order_type\n else\n session[:organization] != '0' ? Project.where(organization_id: session[:organization].to_i).ser_or_tca_order_type : Project.ser_or_tca_order_type\n end\n end",
"def collection_select(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end",
"def project_select current_user\n\t\tif current_user.role == \"factory\"\n\t\t\tProject.where(user_id: current_user.id).order(project_name: :asc).collect {|t| [t.project_name, t.id]}\n\t\telsif current_user.role == \"admin\" || \"user\" || \"user2\"\n\t\t\tProject.all.order(project_name: :asc).collect {|t| [t.project_name, t.id]}\n\t\tend\n\tend",
"def professional_organization_dropdown(form: nil, choices_from:)\n select_class = 'selectpicker'\n if choices_from.kind_of?(ProfessionalOrganization)\n options = options_from_collection_for_select(choices_from.self_and_siblings.order(:name), 'id', 'name', choices_from.id)\n select_id = \"select-pro-org-#{choices_from.org_type}\"\n else\n options = options_from_collection_for_select(choices_from.order(:name), 'id', 'name')\n select_id = \"select-pro-org-#{choices_from.first.org_type}\"\n end\n\n if form\n form.select(:professional_organization_id,\n options,\n { include_blank: true },\n class: select_class,\n id: select_id)\n else\n select_tag(nil,\n options,\n include_blank: true,\n class: select_class,\n id: select_id)\n end\n end"
] | [
"0.64530843",
"0.64189035",
"0.63901716",
"0.6265834",
"0.6086652",
"0.6046609",
"0.59766245",
"0.5923445",
"0.5881491",
"0.58235943",
"0.57833385",
"0.5761094",
"0.57375026",
"0.5715274",
"0.5714764",
"0.5690044",
"0.5689722",
"0.568534",
"0.5662409",
"0.5655522",
"0.56463814",
"0.5643808",
"0.56379837",
"0.5613656",
"0.5609971",
"0.56056184",
"0.55988353",
"0.5577517",
"0.5548005",
"0.5548005",
"0.55430526",
"0.5538389",
"0.550814",
"0.5495099",
"0.5472204",
"0.545542",
"0.54505557",
"0.54464704",
"0.54287577",
"0.53992236",
"0.53964895",
"0.5382978",
"0.53473014",
"0.53365886",
"0.5330939",
"0.5330939",
"0.53243244",
"0.53214",
"0.5319887",
"0.53168935",
"0.5313008",
"0.53126156",
"0.53041273",
"0.529747",
"0.52953976",
"0.52898526",
"0.52825534",
"0.5261603",
"0.52557284",
"0.52468807",
"0.52444434",
"0.5243839",
"0.5242136",
"0.5240277",
"0.5226865",
"0.5226031",
"0.5218575",
"0.52178025",
"0.5216662",
"0.52157384",
"0.5213663",
"0.5213179",
"0.5212568",
"0.5208671",
"0.5206524",
"0.520071",
"0.51923054",
"0.5185363",
"0.51850545",
"0.51802933",
"0.51779395",
"0.51778394",
"0.5175805",
"0.5175097",
"0.5174815",
"0.5174738",
"0.5156907",
"0.51476544",
"0.5145604",
"0.5141507",
"0.51412815",
"0.5133899",
"0.51305354",
"0.5124453",
"0.51198804",
"0.5119543",
"0.5112863",
"0.5111317",
"0.51100576",
"0.5107834"
] | 0.6147712 | 4 |
Renders a select tag with all the Deliverables for the bulk edit page Context: :project => Current project | def view_issues_bulk_edit_details_bottom(context = { })
if context[:project].module_enabled?('dashboards') and Dashboard.find_by_project_id(context[:project].id)
select = select_tag('objective_id',
content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_none), :value => 'none') +
options_for_select(
Dashboard.find_by_project_id(context[:project].id).objectives.all(
:order => 'name').sort {|x, y| x.ancestors_path <=> y.ancestors_path}.collect {|v| ["#{v.ancestors_path} #{v.name}", v.id]}))
return content_tag(:p, "<label>#{l(:field_objective)}: " + select + "</label>")
else
return ''
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_form_select(projects)\n projects.collect do |p|\n [[p.shortname, p.description].join(\" - \"), p.id]\n end\n end",
"def auto_complete_for_filter_expense_pending_description\r\n project_ids = (@current_user.supervised_projects.nil? || @current_user.supervised_projects.empty? ) ? '' : (@current_user.supervised_projects.collect {|p| p.id}.flatten)\r\n \r\n @items=BulkExpense.find(:all,:include=> [:user, :project],\r\n :conditions=>['expenses.description like ? and users.enterprise_id=? and (users.supervisor_id= ? OR projects.id IN (?))',\"%#{params[:crt_description]}%\",@enterprise.id,@current_user.id, project_ids])\r\n render :inline => '<%= auto_complete_result(@items, \"description\") %>'\r\n end",
"def so_update_selects_from_project\n project = params[:project]\n projects = projects_dropdown\n if project != '0'\n @project = Project.find(project)\n @contracting_requests = @project.blank? ? projects_contracting_requests(projects) : projects_contracting_requests(@project)\n @work_order = @project.blank? ? work_orders_dropdown : @project.work_orders.order(:order_no)\n @charge_account = @project.blank? ? projects_charge_accounts(projects) : charge_accounts_dropdown_edit(@project)\n @store = project_stores(@project)\n else\n @contracting_requests = projects_contracting_requests(projects)\n @work_order = work_orders_dropdown\n @charge_account = projects_charge_accounts(projects)\n @store = stores_dropdown\n end\n # Work orders array\n @orders_dropdown = orders_array(@work_order)\n # Contracting requests array\n @constracting_requests_dropdown = contracting_requests_array(@contracting_requests)\n # Setup JSON\n @json_data = { \"contracting_request\" => @constracting_requests_dropdown, \"work_order\" => @orders_dropdown,\n \"charge_account\" => @charge_account, \"store\" => @store }\n render json: @json_data\n end",
"def index\n @deliverables = Deliverable.all\n end",
"def to_form_select(projects)\n projects.collect do |p|\n [project_identifier(p), p.id]\n end\n end",
"def auto_complete_for_filter_expense_pending_envelope\r\n project_ids = (@current_user.supervised_projects.nil? || @current_user.supervised_projects.empty? ) ? '' : (@current_user.supervised_projects.collect {|p| p.id}.flatten)\r\n @items=BulkExpense.find(:all,:include=> [:user, :project] ,\r\n :conditions=>['expenses.envelope like ? and users.enterprise_id=? and (users.supervisor_id=? OR projects.id IN (?))',\"%#{params[:crt_envelope]}%\",@enterprise.id,@current_user.id, project_ids]) \r\n render :inline => '<%= auto_complete_result(@items, \"envelope\") %>'\r\n end",
"def si_update_selects_from_company\n company = params[:org]\n if company != '0'\n @company = Company.find(company)\n @projects = @company.blank? ? projects_dropdown : @company.projects.order(:project_code)\n else\n @projects = projects_dropdown\n end\n # Setup JSON\n @json_data = { \"project\" => @projects }\n render json: @json_data\n end",
"def select_project_to_manage_production\n @projects = current_user.assigned_projects_for( PROJECT_ROLE[:account_executive] ) \n \n add_breadcrumb \"Select Project\", 'select_project_to_manage_production_url'\n render :file => \"projects/project_management/select_project_to_manage_production\"\n end",
"def edit\n @deliverable = Deliverable.find_by_id_and_project_id(params[:deliverable_id], @project.id)\n end",
"def edit\n #Finds selected datafile\n @data_file = DataFile.find(params[:id])\n #creates an array of all products\n @all_products = Product.all\n #creates an array of all components\n @all_components = Component.all\n #creates an array of all valuefields\n @all_valuefields = Valuefield.all\n @all_properties = Property.all\n\n @items_to_select = @data_file.products + @data_file.components + @data_file.valuefields\n end",
"def select_deliverable_to_create_component\n @deliverables = current_office.deliverables \n add_breadcrumb \"Search Deliverable\", 'select_deliverable_to_create_component_url' \n end",
"def edit\n @deliverable = Deliverable.find(params[:id])\n #get the project by project_id, project_id is got from @deliverable's attribute\n @project = Project.find_by_id(@deliverable.project_id)\n #get the lifecycle phase by lifecycle_id, lifecycle_id is got from @deliverable's attribute\n @lifecycle_phase = LifecyclePhase.find_by_id(@project.lifecycle_id)\n #get the deliverable type by deliverable_type_id, deliverable_type_id is got from @deliverable's attribute\n @deliverable_type = DeliverableType.find_by_id(@deliverable.deliverable_type_id)\n end",
"def get_products_colletion_select\n model = self.controller_name.singularize\n collection_select model, :product_ids, Product.find(:all), :id, :name, { }, { :multiple => true, :size => '10', :style => \"width:240px\" }\n end",
"def select_project_to_update_production_progress\n @projects = current_user.assigned_projects_for( PROJECT_ROLE[:post_production] ) \n add_breadcrumb \"Select Project\", 'select_project_to_update_production_progress_url'\n \n render :file => \"projects/project_management/select_project_to_update_production_progress\"\n end",
"def render_project_jump_box\n # Retrieve them now to avoid a COUNT query\n testprojects = Testproject.find(:all, :conditions => \"id > 0\")\n if testprojects.any?\n s = '<select onchange=\"if (this.value != \\'\\') { window.location = this.value; }\">' +\n \"<option value='' selected='selected'>#{ l(:label_jump_to_a_project) }</option>\" +\n '<option value=\"\" disabled=\"disabled\">---</option>'\n testprojects.each do |testproject|\n tag_options = {:value => url_for(:controller => 'testprojects', :action => 'show', :id => testproject.id)}\n s << content_tag('option', h(testproject.name), tag_options)\n end\n s << '</select>'\n s\n end\n end",
"def index\n @delivery_options = DeliveryOption.accessible_by(current_ability).order(id: :desc).page params[:page]\n end",
"def select_project_to_monitor_post_production\n @projects = current_user.assigned_projects_for( PROJECT_ROLE[:account_executive] )\n \n add_breadcrumb \"Select Project\", 'select_project_to_monitor_post_production_url'\n render :file => \"projects/project_management/select_project_to_monitor_post_production\"\n end",
"def project_dropdown\n @workspace = params[:workspace_id]\n @projects = Project.where(:workspace_id => params[:workspace_id])\n\n respond_to do |format|\n format.js\n end\n\n end",
"def deliverables\n return Deliverable.where(project_id: @project.id)\n end",
"def select_package_account\n # updates projects based on the account selected\n projects = Project.all(:account_id => params[:account_id])\n\n # map to id for use in options_for_select\n @projects = projects.map{|a| a.id}\n end",
"def set_collection_select\n @facultades = Facultad.all\n @programas = Programa.all\n @grupos = Grupo.all\n @semilleros = Semillero.all\n @investigadores = Investigador.all\n end",
"def render_project_jump_box\n projects = Project.all(:is_private => false)\n if logged_in?\n projects = projects | current_user.projects\n end\n if projects.count > 0 \n s = '<select onchange=\"if (this.value != \\'\\') { window.location = this.value; }\">' +\n \"<option value=''>Jump to Project...</option>\" +\n '<option value=\"\" disabled=\"disabled\">---</option>'\n \n options = projects.collect{|p| [p.name, \"/projects/#{p.id}\"]}\n s << options_for_select(options, @project.nil? ? '' : \"/projects/#{@project.id}\")\n \n s << '</select>'\n s.html_safe\n end\n end",
"def select_project_to_be_scheduled_in_production_mode\n @projects = current_user.assigned_projects_for( PROJECT_ROLE[:project_manager] ) \n add_breadcrumb \"Select Project\", 'select_project_to_be_scheduled_in_production_mode_url'\n \n render :file => \"projects/project_management/select_project_to_be_scheduled_in_production_mode\"\n end",
"def show\n opts = {\n multiple: true,\n placeholder: t('.placeholder')\n }\n select_tag('new_volunteer_ids', select_options, opts)\n end",
"def selectables(f, value, group)\n\t\trender :partial => \"shared/forms/panel/selection\", :locals => { :f => f, :value => value, :group => group, :select_class => \"selectables\", :selected_value => nil }\n\tend",
"def wot_update_account_select_from_project\n project = params[:project]\n tbl = params[:tbl]\n if project != '0'\n @project = Project.find(project)\n @accounts = @project.blank? ? project_charge_accounts_dropdown(nil) : @project.charge_accounts.expenditures\n else\n @accounts = project_charge_accounts_dropdown(nil)\n end\n # Setup JSON\n @json_data = { \"account\" => @accounts, \"tbl\" => tbl.to_s }\n render json: @json_data\n end",
"def getDeliverableTypes\n @projectPhase = ProjectPhase.find(@project_phase_id)\n @deliverableTypes = DeliverableType.find_all_by_lifecycle_phase_id(@projectPhase.lifecycle_phase_id)\n @deliverableTypesArray = []\n @deliverableTypes.each do |type|\n @deliverableTypesArray.append([type.name,type.id])\n end\n end",
"def index\n @project_phase_deliverables = ProjectPhaseDeliverable.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @project_phase_deliverables }\n end\n end",
"def edit_supplier_service\n redirect_unless_privilege('Proveedores')\n \t@not_deliverable_services_ids = IndustryCategory.joins(:countries).where(\"countries.id = ?\", session[:country].id).where(industry_category_type_id:2).map(&:id) \n \t@service = Service.find params[:service_id]\n \[email protected] if @service.videos.blank?\n \t@supplier_account = @service.supplier_account\n \t@supplier = @service.supplier_account.supplier\n @color_types = ColorType.all\n\t\t@industry_categories = @industry_categories = @supplier_account.industry_categories.where(\"industry_category_type_id = 3 OR industry_category_type_id = 2\")\n\t\t#DZF here I make the dynamic grouped_options_for_select options\n\t\t@industry_cat_types = @industry_categories.inject({}) do |options, industry_category|\n\t\t (options[industry_category.industry_category_type.name] ||= []) << [industry_category.get_name, industry_category.id]\n \t\toptions\n\t\tend\n end",
"def display_select(name, default_selected)\n options = [\n [_(\"Tasks\"), \"1\"],\n [_(\"Tags\"), \"2\"],\n [_(\"Users\"), \"3\"],\n [_(\"Clients\"), \"4\"],\n [_(\"Projects\"), \"5\"],\n [_(\"Milestones\"), \"6\"],\n [_(\"Date\"), \"7\"],\n [_(\"Task Status\"), \"8\"],\n [_(\"Requested By\"), \"20\"]\n ]\n current_user.company.properties.each do |p|\n options << [ p.name, p.filter_name ]\n end\n \n if params[:report] and params[:report][name.to_sym]\n selected = params[:report][name.to_sym]\n end\n\n return select(\"report\", name, options, :selected => (selected || default_selected))\n end",
"def index\n respond_with (@depts = Dept.all)\n end",
"def templates_select_tag\r\n templates = MailTasks::Template.find( :all, :order => \"name\" )\r\n template_options = templates.collect{ |template| [template.name, template.id] }.unshift( ['-- Pre-set templates --', nil] )\r\n select :tasks, :template_id, template_options\r\n end",
"def index\n @projects = Project.find(:all, :conditions => \"status = 'Active'\")\n @phases = ProjectPhase.find(:all, :conditions => {:projects => {:status => \"Active\"}}, :joins => [:project])\n @deliverables = Deliverable.find(:all, :conditions => {:project_phases => {:projects => {:status => \"Active\"}}}, :joins => [:project_phase => :project])\n\n if is_developer\n @efforts = Effort.find(:all, :conditions => ['user_id = ?', current_user.id])\n else\n @efforts = Effort.find(:all)\n end\n @efforts.sort! { |a,b| b.effort_date <=> a.effort_date }\n @effort = Effort.new\n\n respond_to do |format|\n format.html\n end\n end",
"def list_deliveries\n\n @company = Company.find(params[:company_id])\n @pagetitle = \"#{@company.name} - guias\"\n @filters_display = \"block\"\n \n @locations = Location.where(company_id: @company.id).order(\"name ASC\")\n @divisions = Division.where(company_id: @company.id).order(\"name ASC\")\n \n if(params[:location] and params[:location] != \"\")\n @sel_location = params[:location]\n end\n \n if(params[:division] and params[:division] != \"\")\n @sel_division = params[:division]\n end\n \n if(@company.can_view(current_user))\n if(params[:search] and params[:search] != \"\")\n @deliveries = Delivery.where([\"company_id = ? AND code like ? \", @company.id, \"%\" + params[:search] + \"%\"]).paginate(:page => params[:page])\n\n else\n @deliveries = Delivery.where(company_id: @company.id).order(\"created_at desc \").paginate(:page => params[:page])\n @filters_display = \"none\"\n end\n else\n errPerms()\n end\n end",
"def get_format_dropdown()\n collection_select(\"project\", \"format\", format_list(), :first, :last, {:prompt => \"Please select\"})\n end",
"def si_update_receipt_and_order_select_from_project\n project = params[:order]\n if project != '0'\n @project = Project.find(project)\n @receipt_notes = @project.blank? ? receipts_dropdown : receipts_dropdown_by_project(@project)\n @purchase_orders = @project.blank? ? unbilled_purchase_orders_dropdown : unbilled_purchase_orders_dropdown_by_project(@project)\n else\n @receipt_notes = receipts_dropdown\n @purchase_orders = unbilled_purchase_orders_dropdown\n end\n # Notes array\n @notes_dropdown = notes_array(@receipt_notes)\n # Orders array\n @purchase_orders_dropdown = purchase_orders_array(@purchase_orders)\n # Setup JSON\n @json_data = { \"note\" => @notes_dropdown, \"order\" => @purchase_orders_dropdown }\n render json: @json_data\n end",
"def items\n load_selection\n import_selection or render_select\n end",
"def opportunity_campaign_select(options = {})\n options[:selected] ||= @opportunity.campaign_id || 0\n selected_campaign = Campaign.find_by_id(options[:selected])\n campaigns = ([selected_campaign] + Campaign.my.order(:name).limit(25)).compact.uniq\n collection_select :opportunity, :campaign_id, campaigns, :id, :name, options,\n \"data-placeholder\": t(:select_a_campaign),\n \"data-url\": auto_complete_campaigns_path(format: 'json'),\n style: \"width:330px; display:none;\",\n class: 'ajax_chosen'\n end",
"def select\n @pds_projects = PdsProject.includes(:company).where('ProjectID in (?)', PROJECT_LIST)\n end",
"def get_field_edit_rtpl\n ([email protected]? && @multiple != '') ? multiple = @multiple : multiple = ''\n\n select_str = '<select id=\"' + @id + '\" name=\"' + @name + '\" ' + multiple + '>'\n select_str << @option_str\n select_str << '</select>'\n\n select_str\n end",
"def competitor_select_box(form, competition, options = {})\n options[:autofocus] = true\n options[:class] = \"chosen-select #{options[:class]}\"\n disabled_ids = options[:disabled_ids]\n form.select :competitor_id, competition.competitors.active.ordered.map { |comp| [\"##{comp.bib_number}-#{comp}\", comp.id] }, { include_blank: true, disabled: disabled_ids }, options\n end",
"def select_account\n # updates projects based on the account selected\n projects = Project.all(:account_id => params[:account_id])\n # map to id for use in options_for_select\n @projects = projects.map{|a| a.id}\n # updates users based on the account selected\n users = User.all(:account_id => params[:account_id])\n # map to id for use in options_for_select\n @users = users.map{|a| a.id} \n end",
"def index\n # Will show all departments and allow you to make new departments, view individual departments,\n # edit departments, and delete departments\n\n @deps = Dep.all\n # setting an instance variable to be all of my departments in my database\n\n render component: \"Deps\", props: { deps: @deps }\n #need to call and dislay the list of all departments (aka render)\n end",
"def index\n @company_dei_fields = CompanyDeiField.all\n end",
"def edit\n #find adhoc deliverable to edit\n @adhoc_deliverable = Deliverable.find(params[:id])\n end",
"def index\n @selected_items = SelectedItem.all\n @product=Product.all\n end",
"def index\n @dropdown_items = DropdownItem.all\n end",
"def select_project_for_project_membership_assignment\n @projects = current_office.active_projects.order(\"shoot_date ASC\")\n \n add_breadcrumb \"Select Project\", 'select_project_for_project_membership_assignment_url'\n render :file => \"projects/project_memberships/select_project_for_project_membership_assignment\"\n end",
"def index\n @coleccion = DetallePedido.all\n end",
"def index\n # @departments = Department.all\n #\n # respond_to do |format|\n # format.html # index.html.erb\n # format.json { render json: @departments }\n # end\n @departments = @project.departments.all\n # show the board if there is only one\n if @departments.size == 1\n @department = @departments.first\n #show\n render :action => 'show', :layout => !request.xhr?\n end\nend",
"def index\n respond_to do |format|\n if params[:department_id]\n @department = Department.find(params[:department_id])\n else\n @projects = current_user.projects.all\n end\n format.html\n format.js{render :partial => \"departments/projects_table\"}\n end\n end",
"def so_update_selects_from_organization\n organization = params[:org]\n if organization != '0'\n @organization = Organization.find(organization)\n @clients = @organization.blank? ? clients_dropdown : @organization.clients.order(:client_code)\n @projects = @organization.blank? ? projects_dropdown : @organization.projects.order(:project_code)\n @work_orders = @organization.blank? ? work_orders_dropdown : @organization.work_orders.order(:order_no)\n @charge_accounts = @organization.blank? ? charge_accounts_dropdown : @organization.charge_accounts.expenditures\n @stores = @organization.blank? ? stores_dropdown : @organization.stores.order(:name)\n @payment_methods = @organization.blank? ? payment_methods_dropdown : collection_payment_methods(@organization.id)\n @contracting_requests = @organization.blank? ? contracting_requests_dropdown : projects_contracting_requests(@projects)\n @products = @organization.blank? ? products_dropdown : @organization.products.order(:product_code)\n else\n @clients = clients_dropdown\n @projects = projects_dropdown\n @work_orders = work_orders_dropdown\n @charge_accounts = charge_accounts_dropdown\n @stores = stores_dropdown\n @payment_methods = payment_methods_dropdown\n @contracting_requests = contracting_requests_dropdown\n @products = products_dropdown\n end\n # Work orders array\n @orders_dropdown = orders_array(@work_orders)\n # Products array\n @products_dropdown = products_array(@products)\n # Clients array\n @clients_dropdown = clients_array(@clients)\n # Contracting requests array\n @constracting_requests_dropdown = contracting_requests_array(@contracting_requests)\n # Setup JSON\n @json_data = { \"client\" => @clients_dropdown, \"project\" => @projects, \"work_order\" => @orders_dropdown,\n \"charge_account\" => @charge_accounts, \"store\" => @stores,\n \"payment_method\" => @payment_methods, \"contracting_request\" => @constracting_requests_dropdown,\n \"product\" => @products_dropdown }\n render json: @json_data\n end",
"def index\n authorize! :read, Deal\n \n respond_to do |format|\n format.html\n format.json { render json: Deal.select2_options(params, @current_user) }\n end\n end",
"def index\n @project_choices = ProjectChoice.all\n end",
"def trade_environment_setup_id_search_combo_changed\n\tid = get_selected_combo_value(params)\n\tsession[:trade_environment_setup_search_form][:id_combo_selection] = id\n\t@production_schedule_ids = TradeEnvironmentSetup.find_by_sql(\"Select distinct production_schedule_id from trade_environment_setups where id = '#{id}'\").map{|g|[g.production_schedule_id]}\n\t@production_schedule_ids.unshift(\"<empty>\")\n\n#\trender (inline) the html to replace the contents of the td that contains the dropdown \n\trender :inline => %{\n\t\t<%= select('trade_environment_setup','production_schedule_id',@production_schedule_ids)%>\n\n\t\t}\n\nend",
"def index\n @admin_departamentos = Admin::Departamento.all\n end",
"def index\n @dropdown_edits = DropdownEdit.all\n end",
"def set_lista_departamento\n @lista_departamento = Departamento.find(params[:id])\n end",
"def update_test_plan_select \n test_plans = TestPlan.where(:product_id => params[:id]).order(:name) unless params[:id].blank?\n\n # Verify user can view this schedule. Must be in his product\n authorize_product!(Product.find(params[:id]))\n \n render :partial => \"test_plans\", :locals => { :test_plans => test_plans }\n end",
"def amount_select\n tag = \"<select id=\\\"voucher_#{@voucher.id}_amount\\\">\"\n for i in (1..20)\n tag += \"<option value=\\\"#{i}\\\">#{i}</option>\"\n end\n tag += \"</select>\"\n end",
"def index\n @deposits_products = DepositsProduct.all\n end",
"def index\n @departments = Department.all_active\n end",
"def prepare_select\n @group_items = GroupItem.all\n end",
"def render(field_id, value = nil, product = nil)\r\n\t\t\tselected_value = !value.nil? ? value : self.default_value || nil\r\n\t\t\tr = \"<select name=\\\"#{field_id}\\\">\"\r\n\t\t\tavailable_values(product).each do |v|\r\n\t\t\t\tr += \"<option value=\\\"#{v.id}\\\"\"\r\n\t\t\t\tif v.id.to_s == selected_value.to_s then\r\n\t\t\t\t\tr += \" selected=\\\"selected\\\"\"\r\n\t\t\t\tend\r\n\t\t\t\tr += \">#{v.value}</option>\"\r\n\t\t\tend\r\n\t\t\tr += \"</select>\"\r\n\t\tend",
"def get_complexities\n work_subtype = WorkSubtype.find(params[:work_subtype_id])\n @complexities = work_subtype.work_subtype_complexities\n render :update do |page|\n page.show 'task_'+@task_index+'_complexity'\n page.replace_html 'task_'+@task_index+'_complexity_select', :partial=>'complexity_select'\n end\n end",
"def index\n @budget_products = BudgetProduct.all\n end",
"def of_update_selects_from_request\n request = params[:request]\n project_id = 0\n work_order_id = 0\n charge_account_id = 0\n store_id = 0\n payment_method_id = 0\n if request != '0'\n @offer_request = OfferRequest.find(request)\n @request_items = @offer_request.blank? ? [] : @offer_request.offer_request_items\n @projects = @offer_request.blank? ? projects_dropdown : @offer_request.project\n @work_orders = @offer_request.blank? ? work_orders_dropdown : WorkOrder.where(id: @offer_request.work_order)\n @charge_accounts = @offer_request.blank? ? charge_accounts_dropdown : @offer_request.charge_account\n @stores = @offer_request.blank? ? stores_dropdown : @offer_request.store\n @payment_methods = @offer_request.blank? ? payment_methods_dropdown : @offer_request.payment_method\n if @request_items.blank?\n @products = @offer_request.blank? ? products_dropdown : @offer_request.organization.products.order(:product_code)\n else\n @products = @offer_request.products.group(:product_code)\n end\n project_id = @projects.id rescue 0\n work_order_id = @work_orders.id rescue 0\n charge_account_id = @charge_accounts.id rescue 0\n store_id = @stores.id rescue 0\n payment_method_id = @payment_methods.id rescue 0\n else\n @projects = projects_dropdown\n @work_orders = work_orders_dropdown\n @charge_accounts = charge_accounts_dropdown\n @stores = stores_dropdown\n @payment_methods = payment_methods_dropdown\n @products = products_dropdown\n end\n # Work orders array\n @orders_dropdown = orders_array(@work_orders)\n # Products array\n @products_dropdown = products_array(@products)\n # Setup JSON\n @json_data = { \"project\" => @projects, \"work_order\" => @orders_dropdown,\n \"charge_account\" => @charge_accounts, \"store\" => @stores,\n \"payment_method\" => @payment_methods, \"product\" => @products_dropdown,\n \"project_id\" => project_id, \"work_order_id\" => work_order_id,\n \"charge_account_id\" => charge_account_id, \"store_id\" => store_id,\n \"payment_method_id\" => payment_method_id }\n render json: @json_data\n end",
"def show\n @travel_forms = TravelForm.all\n @expense_reports = ExpenseReport.all\n @request_forms = RequestForm.all\n @budget_approver = BudgetApprover.all\n @departments = Department.all\n end",
"def per_page_select_html\n \n options = [10,20,50,100,250].collect{|x| [\n \"#{x} per page\", \n url_for(params.merge(:per_page => x))\n ]}\n \n current_selected = url_for(params.merge(:per_page => per_page))\n \n select_tag \"per_page\", options_for_select(options, current_selected)\n \n end",
"def of_update_product_select_from_organization\n organization = params[:org]\n if organization != '0'\n @organization = Organization.find(organization)\n @products = @organization.blank? ? products_dropdown : @organization.products.order(:product_code)\n else\n @products = products_dropdown\n end\n # Products array\n @products_dropdown = products_array(@products)\n # Setup JSON\n @json_data = { \"product\" => @products_dropdown }\n render json: @json_data\n end",
"def farm_puc_account_puc_type_code_changed\n\tpuc_type_code = get_selected_combo_value(params)\n\tsession[:farm_puc_account_form][:puc_type_code_combo_selection] = puc_type_code\n\t@puc_codes = FarmPucAccount.puc_codes_for_puc_type_code(puc_type_code)\n#\trender (inline) the html to replace the contents of the td that contains the dropdown \n\trender :inline => %{\n\t\t<%= select('farm_puc_account','puc_code',@puc_codes)%>\n\n\t\t}\n\nend",
"def list\n @module_name = _('release_Edit')\n @project_id = params[:project_id]\n @releases = Release.find :all,\n :conditions => \"project_id = #{params[:project_id]}\", :order => 'due desc'\n if params[:layout] == 'false'\n render :layout => false \n end\n end",
"def index\n @project_offers = Project::Offer.all\n end",
"def parties_postal_address_postal_address_type_code_changed\n\tpostal_address_type_code = get_selected_combo_value(params)\n\tsession[:parties_postal_address_form][:postal_address_type_code_combo_selection] = postal_address_type_code\n\t@cities = PartiesPostalAddress.cities_for_postal_address_type_code(postal_address_type_code)\n#\trender (inline) the html to replace the contents of the td that contains the dropdown \n\trender :inline => %{\n\t\t<%= select('parties_postal_address','city',@cities)%>\n\t\t<img src = '/images/spinner.gif' style = 'display:none;' id = 'img_parties_postal_address_city'/>\n\t\t<%= observe_field('parties_postal_address_city',:update => 'address1_cell',:url => {:action => session[:parties_postal_address_form][:city_observer][:remote_method]},:loading => \"show_element('img_parties_postal_address_city');\",:complete => session[:parties_postal_address_form][:city_observer][:on_completed_js])%>\n\t\t}\n\nend",
"def update_client_users_list\n render :update do |page|\n users = Client.find(params[:client_id]).client_users\n page.replace_html 'client_user_select', :partial => 'user_select', :locals => { :users => users }\n end\n end",
"def parties_postal_address_party_type_name_changed\n\tparty_type_name = get_selected_combo_value(params)\n\tsession[:parties_postal_address_form][:party_type_name_combo_selection] = party_type_name\n\t@party_names = PartiesPostalAddress.party_names_for_party_type_name(party_type_name)\n#\trender (inline) the html to replace the contents of the td that contains the dropdown \n\trender :inline => %{\n\t\t<%= select('parties_postal_address','party_name',@party_names)%>\n\n\t\t}\n\nend",
"def index\n # TODO: implement filters\n @budgets = Budget.order(\"budgets.starts_at DESC, budgets.number ASC\")\n .page(params[:page])\n\n respond_to do |format|\n format.html # index.html.erb\n #format.select2 { render json: { items: budgets.map(&:to_select2_json), total: @budgets.count} }\n #format.json { render json: @budgets }\n end\n end",
"def of_update_request_select_from_supplier\n supplier = params[:supplier]\n if supplier != '0'\n @supplier = Supplier.find(supplier)\n @offer_requests = @supplier.blank? ? offer_requests_dropdown : @supplier.offer_requests.not_approved(@supplier.organization_id)\n else\n @offer_requests = offer_requests_dropdown\n end\n # Offer requests array\n @requests_dropdown = offer_requests_array(@offer_requests)\n # Setup JSON\n @json_data = { \"offer_request\" => @requests_dropdown }\n render json: @json_data\n end",
"def render_multi_select(remote_url, fields, options = {})\n render :partial => \"admin/general/multi_select\", :locals => {\n :remote_url => remote_url,\n :fields => fields,\n :valueField => options[:valueField],\n :showField => options[:showField],\n :name => options[:name],\n :selected_values => options[:selected_values]\n }\n end",
"def clipboard_select_tag(items, html_options = {})\n options = [[_t('Please choose'), \"\"]]\n items.each do |item|\n options << [item.class.to_s == 'Alchemy::Element' ? item.display_name_with_preview_text : item.name, item.id]\n end\n select_tag(\n 'paste_from_clipboard',\n [email protected]_record? && @page.can_have_cells? ? grouped_elements_for_select(items, :id) : options_for_select(options),\n {\n :class => [html_options[:class], 'alchemy_selectbox'].join(' '),\n :style => html_options[:style]\n }\n )\n end",
"def form_escolher\n lst_from.select 'London'\n lst_on.select 'December'\n lst_month.select '20'\n lst_arriving.select 'Acapulco'\n lst_returning.select 'October'\n lst_month_returning.select '21'\n check_port.click\n lst_airline.select 'Blue Skies Airlines'\n end",
"def new\n @offering = Offering.new\n @resources = Resource.find_all_by_user_id current_user.id\n @select = []\n @resources.each do |resource|\n addresses = Address.find_all_by_id resource.address_id\n addresses.each do |address|\n @select << [address.street + \", \" + address.number.to_s + \" - \" + resource.place, resource.id]\n end\n end\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @offering }\n end\n end",
"def index\n @deposits = Deposit.all\n end",
"def virtual_studio\n \n @spec = Specification.where(florist_id: session[\"found_florist_id\"]).where(id: params[\"spec_id\"]).first\n @products = Product.joins(:designed_products).where(\"designed_products.florist_id\" => session[\"found_florist_id\"]).where(\"designed_products.event_id\" => @spec.event.id).uniq\n @used_products = @products.order(\"name\")\n @list_of_product_types = @products.uniq.pluck(:product_type).sort\n @list_of_product_ids = @products.uniq.pluck(:id) \n \n \n \n \n #Generate dropdown list for adding new products to the Virtual Studio Page\n products = Product.where(status: \"Active\").where(florist_id: session[\"found_florist_id\"]).order(\"name\")\n dropdown = []\n for product in products\n dropdown << product.name\n end\n for item in @products\n dropdown = dropdown - [item.name]\n end\n @dropdown = dropdown\n render (:virtual_studio) and return\n end",
"def select_list; end",
"def select(resource_name, field_name, options_list, selected_value)\n html = ''\n options_list.each do |nv_pair|\n option_value = nv_pair.keys.first\n option_name = nv_pair.values.first\n html << \"<option value=\\\"#{option_value}\\\"\"\n html << \" selected=\\\"selected\\\"\" if option_value == selected_value\n html << '>'\n html << option_name\n html << \"</option>\"\n end\n \"<select id=\\\"#{resource_name}_#{field_name}\\\" name=\\\"#{resource_name}_#{field_name}\\\" class=\\\"required\\\">#{html}</select>\"\n end",
"def combobox_tag(name, options, opts= {})\n @template.content_tag(:input, :name => \"findpost[\"+sanitize_to_id(name)+\"]\", :placeholder => \"ENGL\", :maxlength => 4, :style => \"width: 55px;\", :type => \"text\", :list => opts[:list_id]) do\n content_tag(:datalist, :id => opts[:list_id]) {options}\n end \n end",
"def options_for_user_projects(task)\n projects = current_user.projects.find(:all, :include => \"customer\", :order => \"customers.name, projects.name\")\n\n last_customer = nil\n options = []\n\n projects.each do |project|\n if project.customer != last_customer\n options << [ h(project.customer.name), [] ]\n last_customer = project.customer\n end\n\n options.last[1] << [ project.name, project.id ]\n end\n\n return grouped_options_for_select(options, task.project_id, \"Please select\")\n end",
"def index\n prepare_projects_display\n \n end",
"def index\n @departments = Department.all\n end",
"def index\n @departments = Department.all\n end",
"def index\n @departments = Department.all\n end",
"def edit\n @broodmare = Broodmare.find(params[:id])\n # @stallion_options = Stallion.all.map do |stallion| [stallion.name, stallion.id] end\nend",
"def update_provinces\n country_ids = params[:advanced][:countrie].split(\",\")\n @provinces = Province.find(:all, :conditions => [\"country_id IN (?)\", country_ids], :order => \"name\")\n render :partial => \"list_provinces\", :locals => {:provinces => @provinces}\n end",
"def index\n # Authorize only if current user can read Supplier\n authorize! :read, Supplier\n # OCO\n init_oco if !session[:organization]\n @export = formats_array\n # @projects = projects_dropdown\n # @periods = projects_periods(@projects)\n @billers = billers_dropdown\n end",
"def get_listbox_data\n @countries = current_user.company.countries.dropdown_list\n @sectors = current_user.company.sectors.order(:sector)\n @rel_types = current_user.company.rel_types.dropdown_list\n @relationgroups = current_user.company.relations.dropdown_list\n end",
"def edit\n #Finds selected image\n @image = Image.find(params[:id])\n #creates an array of all products\n @all_products = Product.all\n #creates an array of all components\n @all_components = Component.all\n #creates an array of all valuefields\n @all_valuefields = Valuefield.all\n #assigns variable associated product\n\n @items_to_select = @image.products + @image.components + @image.valuefields\n\n end",
"def index\n @departmentlessons = Departmentlesson.all\n if(params.has_key?(:department))\n @department=Department.find(params[:department])\n @[email protected]\n end\n end",
"def index\n @export_budgets = ExportBudget.all\n end",
"def locales_menu \n result = \"<form action=\\\"\" + url_for(:action => 'set', :controller => 'locales') + \"\\\">\\n\" \n result << \"<div><select id='accessible_menu' name='locale_id' >\\n\"\n result << options_from_collection_for_select(@loaded_locales, :iso, :name, @current_locale.iso)\n result << \"</select></div>\"\n result << \"<noscript><p><input type=\\\"submit\\\" name=\\\"commit\\\" value=\\\"Go\\\" /></p></noscript>\"\n result << \"</form>\"\n return result\n end"
] | [
"0.59198695",
"0.5859185",
"0.5765693",
"0.5669184",
"0.565542",
"0.56258386",
"0.5566596",
"0.5534172",
"0.5525595",
"0.5517989",
"0.55142623",
"0.5508554",
"0.54550004",
"0.53816795",
"0.53646076",
"0.53419334",
"0.5325024",
"0.5314674",
"0.5286233",
"0.52856064",
"0.5278925",
"0.52653015",
"0.5234664",
"0.5198539",
"0.5120396",
"0.5115088",
"0.5114873",
"0.51091266",
"0.51055115",
"0.5103204",
"0.5094357",
"0.50700593",
"0.5065695",
"0.5063526",
"0.5060763",
"0.50550956",
"0.50540334",
"0.5052764",
"0.50512743",
"0.504653",
"0.50405914",
"0.5037734",
"0.50365347",
"0.5029822",
"0.5018682",
"0.50135833",
"0.49906805",
"0.49774298",
"0.49709183",
"0.49672306",
"0.49653962",
"0.4962024",
"0.49579462",
"0.49578187",
"0.49486342",
"0.49313137",
"0.49297476",
"0.49236465",
"0.49213243",
"0.49208942",
"0.4919308",
"0.4918352",
"0.49114802",
"0.49070394",
"0.4905517",
"0.4885952",
"0.48751754",
"0.4874495",
"0.48567894",
"0.48521504",
"0.4847043",
"0.4839566",
"0.48347968",
"0.48311484",
"0.48296174",
"0.48269233",
"0.48265877",
"0.4826141",
"0.48261067",
"0.48217613",
"0.48203132",
"0.48103616",
"0.48098272",
"0.48090857",
"0.48077255",
"0.48022765",
"0.47990397",
"0.4795854",
"0.4787447",
"0.47861147",
"0.47861147",
"0.47861147",
"0.47816306",
"0.47804105",
"0.47739688",
"0.47727016",
"0.47648525",
"0.4759277",
"0.4755351",
"0.4752824"
] | 0.52735454 | 21 |
Saves the Deliverable assignment to the issue Context: :issue => Issue being saved :params => HTML parameters | def controller_issues_bulk_edit_before_save(context = { })
case true
when context[:params][:objective_id].blank?
# Do nothing
when context[:params][:objective_id] == 'none'
# Unassign objective
context[:issue].objective = nil
else
context[:issue].objective = Objective.find(context[:params][:objective_id])
end
return ''
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def save\n frm.button(:value=>\"Save\").click\n Announcements.new(@browser)\n end",
"def issue_params\n params.require(:issue).permit(:Title, :Description, :Type, :Priority, :Status, :assignee_id, :Attachments)\n end",
"def create\n @issue = @issuable.issues.new(params[:issue])\n\n respond_to do |format|\n if @issue.save\n track_activity(@issuable, 'open', nil, @issue)\n format.html { redirect_to [@issuable, @issue], notice: 'Issue was successfully created.' }\n format.json { render json: @issue, status: :created, location: @issue }\n else\n format.html { render layout: 'form', action: \"new\" }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def assignment_form_save_handler\n exist_assignment = Assignment.find_by(name: @assignment_form.assignment.name)\n assignment_form_params[:assignment][:id] = exist_assignment.id.to_s\n fix_assignment_missing_path\n update_assignment_form(exist_assignment)\n aid = Assignment.find_by(name: @assignment_form.assignment.name).id\n ExpertizaLogger.info \"Assignment created: #{@assignment_form.as_json}\"\n redirect_to edit_assignment_path aid\n undo_link(\"Assignment \\\"#{@assignment_form.assignment.name}\\\" has been created successfully. \")\n end",
"def issue_params\n params.require(:issue).permit(:title, :description, :received, :progressing, :resolved)\n end",
"def save_draft\n frm.button(:name=>\"save\").click\n AssignmentsList.new(@browser)\n end",
"def create\n #@feedback = Feedback.find(params[:feedback_id])\n #@issue.feedback_id = @feedback.id\n @issue = Issue.new(params[:issue])\n @tester = Tester.find(current_tester)\n @issue.tester_id = @tester.id\n @issue.approvalstatus = \"Waiting for Approval\"\n\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to projects_path, notice: 'Issue was successfully created.' }\n format.json { render json: @issue, status: :created, location: @issue }\n else\n format.html { render action: \"new\" }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def issue_params\n params.require(:issue).permit(:title, :description, :status, :category, :estimated_time, :priority, :estimated_end_date,\n :estimated_start_date, :actual_start_date, :actual_end_date, :reviewer_id, :creator_id, :assignee_id, :project_id)\n end",
"def create\n @deliverable = Deliverable.new(params[:deliverable])\n\n respond_to do |format|\n if @deliverable.save\n format.html { redirect_to @deliverable, notice: \"\\\"#{@deliverable.identifier}: #{@deliverable.description}\\\" was successfully created.\" }\n format.json { render json: @deliverable, status: :created, location: @deliverable }\n else\n format.html { render action: \"new\" }\n format.json { render json: @deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def save\n frm.button(:value=>\"Save\").click\n AssignmentsList.new(@browser)\n end",
"def save\n frm.button(:value=>\"Save\").click\n AssignmentsList.new(@browser)\n end",
"def create\n #@feedback = Feedback.find(params[:feedback_id])\n #@issue.feedback_id = @feedback.id\n @issue = Issue.new(params[:issue])\n @tester = Tester.find(current_tester)\n @issue.tester_id = @tester.id\n @issue.approvalstatus = \"Waiting for Approval\"\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to projects_tester_path(@issue), notice: 'Issue was successfully created.' }\n format.json { render json: @issue, status: :created, location: @issue }\n else\n format.html { render action: \"new\" }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @issue = Issue.new(issue_params)\n @issue.status=\"Open\"\n @issue.resolution=\"\"\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to @issue, notice: 'Issue was successfully created.' }\n format.json { render action: 'show', status: :created, location: @issue }\n else\n format.html { render action: 'new' }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @deliverable = Deliverable.find(params[:deliverable_id])\n\n if params[:deliverable][:type] != @deliverable.class\n @deliverable = @deliverable.change_type(params[:deliverable][:type])\n end\n\n respond_to do |format|\n if @deliverable.update_attributes(params[:deliverable])\n @flash = l(:notice_successful_create)\n format.html { redirect_to :action => 'index', :id => @project.identifier }\n else\n format.html { render :action => 'edit', :id => @project.identifier }\n end\n end\n\n\n end",
"def issue_params\n params.require(:issue).permit(:subject, :description, :status,\n :due_date, :user_id, :category_id, :project_id)\n end",
"def create\n #the params will be passed by default\n @adhoc_deliverable = Deliverable.new(params[:adhoc_deliverable])\n\n respond_to do |format|\n #save the data into database\n if @adhoc_deliverable.save\n format.html { redirect_to @adhoc_deliverable, notice: 'AdhocDeliverable was successfully created.' }\n format.json { render json: @adhoc_deliverable, status: :created, location: @adhoc_deliverable }\n else\n format.html { render \"new\" }\n format.json { render json: @adhoc_deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def post_issue(issue)\n proj = issue[\"project\"][\"name\"]\n cat = issue[\"category\"] ? issue[\"category\"][\"name\"] : nil\n id = issue[\"id\"]\n subject = issue[\"subject\"]\n description = issue[\"description\"]\n author = issue[\"author\"][\"name\"]\n # author_slack = Utils.convert_redmine_name_to_slack author\n assigned_to = issue[\"assigned_to\"] ? issue[\"assigned_to\"][\"name\"] : :not_assigned\n assigned_to_slack = Utils.convert_redmine_name_to_slack assigned_to\n tracker = issue[\"tracker\"][\"name\"]\n url = SlackAPI.url(issue_url(id), \"##{id}\")\n # updated = issue[\"updated_on\"]\n created = issue[\"created_on\"]\n\n description = RedmineSlackGlue.convert_textile_to_markdown(description.gsub(/\\n\\n/,\"\\n\"))\n color = RedmineSlackGlue.priority_to_color(issue[\"priority\"][\"id\"])\n\n puts \"#{issue[\"priority\"][\"id\"]} #{created} #{proj} ##{id} #{cat} #{subject}\" if self.verbose\n\n cat = RedmineSlackGlue.convert_category(cat)\n\n @slack_api.post({\n :channel => \"##{proj.downcase}\",\n :text => \"#{assigned_to_slack}: Ticket #{url} *#{subject}* - #{tracker}#{cat}\",\n :attachments => [{\n :fallback => RedmineSlackGlue.clean_markup(description),\n :color => color,\n :text => description,\n :mrkdwn_in=> [\"text\"]\n }],\n :username => \"#{author}\",\n :icon_url => REDMINE_ICON_URL\n })\n end",
"def create\n @deliverable = Deliverable.new(params[:deliverable])\n\n #get deliverable type, unit of measure and project id\n @deliverable_type = DeliverableType.find_by_id(@deliverable.deliverable_type_id)\n @deliverable.unit_of_measure = @deliverable_type.unit_of_measure\n if @deliverable.unit_of_measure == nil\n @deliverable.unit_of_measure = params[:deliverable][:unit_of_measure]\n end\n @deliverable.project_id = params[:deliverable][:project_id]\n\n respond_to do |format|\n deliverable_exist = Deliverable.find_by_name(@deliverable.name)\n if deliverable_exist\n redirect_to user_path(current_user), :notice => \"This deliverable exists, can not create it!!\"\n return\n end\n\n #save deliverable data into database\n if @deliverable.save\n #if deliverable exist, can not create it\n format.html { redirect_to @deliverable, notice: 'Deliverable was successfully created.' }\n format.json { render json: @deliverable, status: :created, location: @deliverable }\n else\n format.html { render \"new\" }\n format.json { render json: @deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n if params[:deliverable][:type] == FixedDeliverable.name\n @deliverable = FixedDeliverable.new(params[:deliverable])\n elsif params[:deliverable][:type] == HourlyDeliverable.name\n @deliverable = HourlyDeliverable.new(params[:deliverable])\n else\n @deliverable = Deliverable.new(params[:deliverable])\n end\n\n @deliverable.project = @project\n @budget = Budget.new(@project.id)\n respond_to do |format|\n if @deliverable.save\n @flash = l(:notice_successful_create)\n format.html { redirect_to :action => 'index' }\n format.js\n else\n format.js\n end\n end\n\n end",
"def controller_issues_edit_before_save(context={})\r\n issue = context[:issue]\r\n end",
"def create\n @issue = Issue.new(params[:id])\n project = Project.find(params[:project_id])\n @issue.project_id = project.id\n @issue.resolved = 0\n @issue.title = params[:issue][:title]\n @issue.description = params[:issue][:description]\n\n if @issue.save\n flash[:notice] = \"Your Issue was Added\"\n redirect_to(:controller => \"projects\", :action => 'show', :id => project)\n else\n flash[:error] = \"Error in Saving. Please retry.\"\n render action: \"new\"\n end\n end",
"def issue_params\n params.require(:issue).permit! if editor?\n end",
"def issue_params\n params.require(:issue).permit(:title, :body, :project_id)\n end",
"def new\n @issue = Issue.new\n @issue.copy_from(params[:copy_from]) if params[:copy_from]\n @issue.project = @project\n @issue.user_story_id = params[:user_story_id] unless params[:user_story_id].blank? \n # Tracker must be set before custom field values\n @issue.tracker ||= @project.trackers.find((params[:issue] && params[:issue][:tracker_id]) || params[:tracker_id] || :first)\n if @issue.tracker.nil?\n render_error l(:error_no_tracker_in_project)\n return\n end\n if params[:issue].is_a?(Hash)\n @issue.attributes = params[:issue]\n @issue.watcher_user_ids = params[:issue]['watcher_user_ids'] if User.current.allowed_to?(:add_issue_watchers, @project)\n end\n @issue.author = User.current\n\n default_status = IssueStatus.default\n unless default_status\n render_error l(:error_no_default_issue_status)\n return\n end\n @issue.status = default_status\n @allowed_statuses = ([default_status] + default_status.find_new_statuses_allowed_to(User.current.roles_for_project(@project), @issue.tracker)).uniq\n\n if request.get? || request.post? && !params[:reload].blank?\n @issue.start_date ||= Date.today\n @priorities = IssuePriority.all\n render :partial => \"issue_sprints/new\"\n else\n requested_status = IssueStatus.find_by_id(params[:issue][:status_id])\n # Check that the user is allowed to apply the requested status\n @issue.status = (@allowed_statuses.include? requested_status) ? requested_status : default_status\n @issue.fixed_version_id = @issue.user_story.version_id\n if @issue.save\n status = done_ratio_to_status(@issue)\n attach_files(@issue, params[:attachments])\n call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})\n @issue_statuses = IssueStatus.find(:all)\n @project_users = User.find(:all, :joins => :members, :conditions => [\"members.project_id = ?\", @project.id])\n render :update do |p|\n p.insert_html :bottom, \"tasks_#{status}_us_#{@issue.user_story_id}\", :partial => \"shared/task_view\",\n :locals => {:task => @issue, :issue_statuses => @issue_statuses,\n :project_users => @project_users}\n end\n return\n end\n end\n end",
"def create\n @deliverable = Deliverable.new(deliverable_params)\n\n respond_to do |format|\n if @deliverable.save\n format.html { redirect_to @deliverable, notice: 'Deliverable was successfully created.' }\n format.json { render action: 'show', status: :created, location: @deliverable }\n else\n format.html { render action: 'new' }\n format.json { render json: @deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @effort_log = EffortLog.new(params[:effort_log])\n @effort_log.user_id = @current_user.id\n \n respond_to do |format|\n if @effort_log.save\n @deliverable = Deliverable.find(@effort_log.deliverable_id)\n \n format.html { redirect_to(@deliverable, :notice => 'Effort log was successfully created.') }\n format.xml { render :xml => @effort_log, :status => :created, :location => @effort_log }\n else\n @deliverable_id = params[:effort_log][:deliverable_id]\n format.html { render :action => \"new\" }\n format.xml { render :xml => @effort_log.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @deliverable = Deliverable.find(params[:id])\n\n respond_to do |format|\n if @deliverable.update_attributes(params[:deliverable])\n format.html { redirect_to @deliverable, notice: \"\\\"#{@deliverable.identifier}: #{@deliverable.description}\\\" was successfully updated.\" }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def save_changes\n frm.button(:value=>\"Save Changes\").click\n Announcements.new(@browser)\n end",
"def save_changes\n frm.button(:value=>\"Save Changes\").click\n Announcements.new(@browser)\n end",
"def legalissue_params\n params.require(:legalissue).permit(:name, :issue, :comment, :done)\n end",
"def issue_params\n params.require(:issue).permit(:companyid, :companyname, :sicdescription, :price, :sharesout, :sharesheld, :numholders, :industryid, :industry, :sectorid, :sector, :type, :querydate, :issuetitle, :isprimary, :activeonly, :ticker, :exchangeid, :exchange, :cik, :sic, :street1, :street2, :city, :state, :zip, :country, :phonecountrycode, :phoneareacode, :phonenumber, :sharesoutdate, :pricedate, :numbernewholders, :numbuyers, :numsellers, :numbersellouts)\n end",
"def issue_params\n params.require(:issue).permit(:subject, :description, :due_date, custom_field_values: (1..6).map(&:to_s)).merge(project_id: REDMINE_PROJECT, tracker: \"Data Request\", status: \"New\")\n end",
"def issue_params\n params.require(:issue).permit(:title, :url, :labels, :project_id)\n end",
"def issue_params\n params.require(:issue).permit(:userCreator, :idUserAssignee, :title, :description, :issueType, :priority, :status, :votes, :file, :creationDate, :updated)\n end",
"def local_issue_params\n params.require(:local_issue).permit(:title, :desription, :priority_level_id, :fixer_id, :tester_id)\n end",
"def issue_params\n params.require(:issue).permit(:description, :status, :resolution, :thermostat_id)\n end",
"def controller_issues_new_after_save(context={ })\n controller_issues_edit_after_save context\n end",
"def save\n frm.button(:name=>\"modifyPartForm:_id89\").click\n EditAssessment.new(@browser)\n end",
"def create\n if params[:project_phase_deliverable][:deliverable_type_id] == \"\"\n #it is ad-hoc\n params[:project_phase_deliverable][:deliverable_type_id] = 0\n end\n @new_project_phase_deliverable = ProjectPhaseDeliverable.new(params[:project_phase_deliverable])\n\n respond_to do |format|\n if @new_project_phase_deliverable.save\n format.html { redirect_to(@new_project_phase_deliverable.project_phase.project, :notice => 'Project phase deliverable was successfully created.') }\n format.xml { render :xml => @new_project_phase_deliverable, :status => :created, :location => @new_project_phase_deliverable }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @new_project_phase_deliverable.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def create\n @deliverable = Deliverable.new(params[:deliverable])\n\t @deliverable.account_id = current_user.account.id if @deliverable .account_id == nil\n\t @deliverable.created_by = current_user.id if @deliverable.created_by == nil\n\t @task = Task.new\n\t \n respond_to do |format|\n if @deliverable.save\n format.html {render :partial => 'deliverables/item', :locals => {:d => @deliverable}, :layout => false}\n format.json { render :json => @deliverable, :status => :created, :location => @deliverable }\n else\n format.html { render :action => \"new\" }\n format.json { render :json => @deliverable.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def create\n @issue = Issue.new(issue_params)\n @issue.userCreator = current_user.id\n @issue.idUserAssignee = current_user.id\n @issue.votes = 0\n @issue.creationDate = Time.now\n @issue.updated = Time.now\n @issue.status = 'NEW'\n respond_to do |format|\n if @issue.save\n format.html { redirect_to @issue, notice: 'Issue was successfully created.' }\n format.json { render :show, status: :created, location: @issue }\n else\n format.html { render :new }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def save_ppoint\n @ppoint = Ppoint.find(params[:ppoint_id])\n if params[:ppoint][:content].empty?\n params[:ppoint][:content] = \"Add content here.\"\n end\n assignment = Assignment.find(@task.assignment_id)\n \n respond_to do |format|\n if assignment.editable?(current_user)\n if @ppoint.update_attributes(params[:ppoint])\n format.js \n else\n format.js { render \"shared/save_failed\" }\n end\n else\n format.js { render \"shared/pastdue\" }\n end\n end\n end",
"def controller_issues_edit_after_save(context={ })\n # Get the updated issue\n issue = context[:issue]\n\n # TODO: Make the parameters safe and secure\n context[:params][:test].each do |id, value|\n\n # Get the testcase with the given id\n testcase = Testcase.find(id)\n\n # If the value is set to true\n if value.downcase == \"true\"\n # Create an association connecting the current testcase\n # with the given issue\n testcase.issues << issue unless testcase.issues.include? issue\n else\n # Remove the association, as it is not wanted (anymore)\n testcase.issues.delete(issue)\n end\n\n # Save the changes. TODO: What if it fails?\n testcase.save\n end\n end",
"def submission_params\n params.require(:submission).permit(:intro, :body, :due_by, :title)\n end",
"def backlogitem_params\n params.require(:backlogitem).permit(:title, :description, :author, :creationdate, :author, :creationdate, :assignedto, :state, :priorty, :effort, :project_id, :project, :sprint_id, :acceptancecriterion)\n end",
"def issue_params\n params.require(:issue).permit(:image_url, :location, :title, :description, :resolved, :resolved_notes, :user_id)\n end",
"def issue_params\n \t\tparams.require(:issue).permit(:description, :location, :tenant_notes, :status, :priority, :building_id, :user_id, :contractor_id, :admin_notes)\n\tend",
"def assign_params\n params.require(:assign).permit(:project_id, :document, :user_id, :round, :done, :curatable)\n end",
"def bugreport_params\n params.require(:bugreport).permit(:subject, :description, :userid, :employeeid)\n end",
"def create\n @issue = Issue.new(issue_params)\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to @issue, notice: 'Issue was successfully created.' }\n format.json { render :show, status: :created, location: @issue }\n else\n format.html { render :new }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @issue = Issue.new(issue_params)\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to @issue, notice: 'Issue was successfully created.' }\n format.json { render :show, status: :created, location: @issue }\n else\n format.html { render :new }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @issue = Issue.new(issue_params)\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to @issue, notice: 'Issue was successfully created.' }\n format.json { render :show, status: :created, location: @issue }\n else\n format.html { render :new }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @issue = Issue.new(issue_params)\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to @issue, notice: 'Issue was successfully created.' }\n format.json { render :show, status: :created, location: @issue }\n else\n format.html { render :new }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def issue_params\n #params.require(:issue).permit(:title, :content, :courseid, :user, :username, :useremail)\n params.require(:issue).permit(:title, :content, :courseid, :username, :useremail)\n end",
"def new_issue(issue)\n @issue = issue\n\n mail subject: \"New Issue Ticket\"\n end",
"def bulk_assign_issues\n @deliverable = Deliverable.find_by_id_and_project_id(params[:deliverable_id], @project.id)\n\n render_404 and return unless @deliverable\n render_403 and return unless @deliverable.editable_by?(User.current)\n\n number_updated = @deliverable.assign_issues_by_version(params[:version][:id])\n\n flash[:notice] = l(:message_updated_issues, number_updated)\n redirect_to :action => 'index', :id => @project.identifier\n end",
"def save_announcement\n @announcement = Announcement.new announcement_params\n @announcement.save\n end",
"def bug_params\n params.require(:bug).permit(:title, :deadline, :kind, :screenshot, :status,:description)\n end",
"def issue_params\n params.require(:issue).permit(:retro_id, :issue_type, :creator_id, :description)\n end",
"def create\n #params[:item][:description] = ActionController::Base.helpers.sanitize(params[:post][:body], :attributes => 'abbr alt cite datetime height href name src title width rowspan colspan rel')\n @item = @course.items.build(params[:item])\n respond_to do |format|\n if @item.save\n @item.update_attributes(:due_date => @item.due_date - DateTime.now.utc_offset) # Rails doesn't do this automatically!\n format.html { redirect_to(course_item_url(@item.params), :notice => 'Item was successfully created.') }\n format.xml { render :xml => @item, :status => :created, :location => @item }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @item.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def create\n @issue = Issue.new(issue_params)\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to :back, notice: 'Issue was successfully created.' }\n format.json { render :show, status: :created, location: @issue }\n else\n format.html { render :new }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @item_delivery = ItemDelivery.new(item_delivery_params)\n @item_name = item_delivery_params[:item_name]\n \n puts \"Item name [#{@item_delivery.item_name}], Item: #{@item_delivery.item}\"\n\n respond_to do |format|\n if @item_delivery.save\n @item_delivery.record_activity(:create, current_user, \"Add PO Delivery\")\n format.html { redirect_to @item_delivery.purchase_order, notice: 'Item delivery was successfully created.' }\n format.json { render action: 'show', status: :created, location: @item_delivery }\n format.js\n else\n format.html { render action: 'new' }\n format.json { render json: @item_delivery.errors, status: :unprocessable_entity }\n format.js { render 'error' }\n end\n end\n end",
"def issue_params\n params.require(:issue).permit(:title, :severity, :description, :customtargets, :rating, :recommendation, :type,\n :index)\n end",
"def issue_params\n params.require(:issue).permit(:title, :description, :url, :lat, :lng, :status, :organisation, :tag_list)\n end",
"def save\n CONNECTION.execute(\"UPDATE assignments SET general_info = '#{self.general_info}', github_link = '#{self.github_link}', co_workers = '#{self.co_workers}' WHERE id = #{self.id};\")\n end",
"def doing_item_params\n params.require(:doing_item).permit(:title, :deadline, :priority, :complete, :description)\n end",
"def solution_params\n params.require(:solution).permit(:issue_id, :description)\n end",
"def issue_params\n params.require(:issue).permit(:title, :closed, :comments_attributes => [:body])\n end",
"def update\n @deliverable = Deliverable.find(params[:id])\n\n respond_to do |format|\n if @deliverable.update_attributes(params[:deliverable])\n format.html { redirect_to @deliverable, notice: 'Deliverable was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render \"edit\" }\n format.json { render json: @deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @important_issue = ImportantIssue.new(params[:important_issue])\n\n respond_to do |format|\n if @important_issue.save\n format.html { redirect_to @important_issue, notice: 'Important issue was successfully created.' }\n format.json { render json: @important_issue, status: :created, location: @important_issue }\n else\n format.html { render action: \"new\" }\n format.json { render json: @important_issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def issue_params\n params.require(:issue).permit(:description, :reported_date, :software_version, :reporter_name, :severity, :title, :github_issue_number_reference, :customer_id, :status, :user_id)\n end",
"def issue_params\n params.require(:issue)\n .permit(:name, :code, :url, :company, :base_unit, :trade_unit)\n end",
"def update\n @adhoc_deliverable = Deliverable.find(params[:id])\n\n respond_to do |format|\n if @adhoc_deliverable.update_attributes(params[:adhoc_deliverable])\n format.html { redirect_to @adhoc_deliverable, notice: 'AdhocDeliverable was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render \"edit\" }\n format.json { render json: @adhoc_deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def bug_params\n params.require(:bug).permit(:user_id,:title, :bug_type, :status, :deadline, :description)\n end",
"def save!\n ScriptoriaCore::Ruote.engine.storage_participant.do_update(_workitem)\n end",
"def my_new\r\n @issue = Issue.new\r\n @issue.defaults_from(params[:related_to]) if params[:related_to] && params[:do_copy]\r\n @issue.project = @project\r\n @issue.tracker ||= @project.trackers.find((params[:issue] && params[:issue][:tracker_id]) || params[:tracker_id] || :first)\r\n if @issue.tracker.nil?\r\n render_error l(:error_no_tracker_in_project)\r\n return\r\n end\r\n if params[:issue].is_a?(Hash)\r\n @issue.attributes = params[:issue]\r\n @issue.watcher_user_ids = params[:issue]['watcher_user_ids'] if User.current.allowed_to?(:add_issue_watchers, @project)\r\n end\r\n @issue.author = User.current\r\n \r\n default_status = IssueStatus.default\r\n unless default_status\r\n render_error l(:error_no_default_issue_status)\r\n return\r\n end\r\n @issue.status = default_status\r\n @allowed_statuses = ([default_status] + default_status.find_new_statuses_allowed_to(User.current.roles_for_project(@project), @issue.tracker)).uniq\r\n @priorities = IssuePriority.all\r\n if request.get? || request.xhr?\r\n @issue.start_date ||= Date.today\r\n render :template => 'issues/new'\r\n else\r\n requested_status = IssueStatus.find_by_id(params[:issue][:status_id])\r\n @issue.status = (@allowed_statuses.include? requested_status) ? requested_status : default_status\r\n call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })\r\n if @issue.save\r\n attach_files(@issue, params[:attachments])\r\n flash[:notice] = l(:notice_successful_create)\r\n call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})\r\n redirect_to(params[:continue] ? { :action => 'my_new', :project_id=>@issue.project.identifier,:related_to=>params[:related_to],:do_copy=>true } :\r\n { :action => 'show', :id => @issue })\r\n else\r\n render :template => 'issues/new'\r\n end \r\n end\r\n end",
"def post(summary, description, assignee, product=\"TestProduct\", component=\"\")\n @log.debug \"Attempting to file a new bug\"\n url = \"#{@url}/enter_bug.cgi?product=#{product}&assigned_to=#{assignee}&component=#{component}\"\n @log.debug url\n page = @agent.get(url)\n form_name = 'Create'\n form = page.form_with(:name => form_name)\n if form\n form['short_desc']=summary\n form['comment']=description\n form['assignee']=assignee\n form['component']=component if not component.empty?\n page = @agent.submit form if not @dummy\n @log.info page.search(\".//td[@id='title']\")[0].content.strip\n # Read the bug number from the page\n return page.search(\".//a[@title='NEW - #{summary}']\")[0].content.match(/Bug ([0-9]+)/)[1] \n else\n @log.error \"Unable to find form with name #{form_name}\"\n end\n end",
"def assignment_params\n params.fetch(:data, {}).fetch(:attributes, {})\n .permit(:title, :deadline, :content)\n end",
"def save_and_publish\n frm.button(:value=>\"Save Settings and Publish\").click\n PublishAssessment.new(@browser)\n end",
"def edit\n @deliverable = Deliverable.find(params[:id])\n #get the project by project_id, project_id is got from @deliverable's attribute\n @project = Project.find_by_id(@deliverable.project_id)\n #get the lifecycle phase by lifecycle_id, lifecycle_id is got from @deliverable's attribute\n @lifecycle_phase = LifecyclePhase.find_by_id(@project.lifecycle_id)\n #get the deliverable type by deliverable_type_id, deliverable_type_id is got from @deliverable's attribute\n @deliverable_type = DeliverableType.find_by_id(@deliverable.deliverable_type_id)\n end",
"def assign_detail_params\n params.require(:assign_detail).permit(:quantity, :stock_id, :assignation_stock_id)\n end",
"def submit_assignment\n\t\tsubmission_id = params[:id]\n\n\t\tif Submission.exists?(submission_id)\n\t\t\tsubmission = Submission.find(submission_id)\n\t\t\tsubmission.content = params[:submission][:content]\n\t\t\tsubmission.submitted_date = DateTime.now\n\t\t\tsubmission.save\n\t\t\tgroup_id = submission.assignment.group_id\n\t\t\tredirect_to group_db_show_url(group_id)\n\t\t\treturn\n\t\tend\n\n\tend",
"def save_charttext\n @charttext = Charttext.find(params[:charttext_id])\n assignment = Assignment.find(@task.assignment_id)\n respond_to do |format|\n if assignment.editable?(current_user)\n if @charttext.update_attributes(params[:charttext])\n @autopreview = @charttext\n unless params[:autopreview]\n format.js { render \"shared/save_success\" }\n else\n format.js { render \"shared/autopreview\" }\n end\n else\n format.js {render \"shared/save_failed\"}\n end\n else\n format.js {render \"shared/pastdue\"}\n end\n end\n end",
"def create\n @issue = Issue.new(params[:issue])\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to issues_path, notice: 'O assunto foi criado com sucesso.' }\n else\n format.html { render action: \"new\" }\n end\n end\n end",
"def update\n @project_phase_deliverable = ProjectPhaseDeliverable.find(params[:id])\n\n respond_to do |format|\n if @project_phase_deliverable.update_attributes(params[:project_phase_deliverable])\n format.html { redirect_to(Project.find(@project_phase_deliverable.project_phase.project), :notice => 'Project phase deliverable was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @project_phase_deliverable.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def issue_params\n #params.fetch(:issue, {})\n params.permit(:program_name, :brand_name, :store_name, :campaign_start, :campaign_end, :remark, :photo_name, :store_id)\n issue_data = {\n store_id: params.fetch(:store_id).to_i,\n program_name: params.fetch(:program_name).to_s,\n brand_name: params.fetch(:brand_name).to_s,\n store_name: params.fetch(:store_name).to_s,\n campaign_start: params.fetch(:campaign_start).to_time,\n campaign_end: params.fetch(:campaign_end).to_time,\n remark: params.fetch(:remark, nil).to_s,\n photo_name: params.fetch(:photo_name, nil)\n }\n end",
"def set_issue\n id = params[:id].present? ? params[:id] : params[:issue_id] \n @issue = Issue.find(id)\n end",
"def create\n @issue = Issue.new(issue_params)\n @issue.user_id = current_user.id \n respond_to do |format|\n if @issue.save\n format.html { redirect_to @issue, notice: 'Issue was successfully created.' }\n format.json { render :show, status: :created, location: @issue }\n else\n format.html { render :new }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def assign_this_note\n if !params[:assign].blank? && !params[:assign_comment].blank?\n @note.update_attributes(:assigned_to_user_id => params[:assigned_to_user_id], :updated_by_user_id => current_user.id)\n create_comment(@note,params[:comment])\n end\n end",
"def post_ticket(params)\n ticket = Lighthouse::Ticket.new(:project_id => project_id)\n ticket.title = params[:title]\n ticket.body = params[:body]\n ticket.tags = params[:tags]\n ticket.save\n end",
"def create\n @sub_issue = SubIssue.new(sub_issue_params)\n\n respond_to do |format|\n if @sub_issue.save\n format.html { redirect_to @sub_issue, notice: 'Sub issue was successfully created.' }\n format.json { render :show, status: :created, location: @sub_issue }\n else\n format.html { render :new }\n format.json { render json: @sub_issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def accept\n @issue = Issue.find(params[:id])\n @issue.resolved = 2\n project = Project.find(@issue.project_id)\n if @issue.save\n flash[:notice] = \"The Solution was Accepted\"\n UserMailer.resolution_approved(@issue, @issue.submitter_id).deliver\n redirect_to project_issue_path(project.slug,@issue.id)\n else\n flash[:error] = \"Error in Saving. Please retry.\"\n redirect_to project_issue_path(project.slug,@issue.id)\n end\n end",
"def save(env)\n locals = {title: params['title'], attachment: params['attachment']}\n [201, {}, haml(:saved, :locals => locals )]\n end",
"def bug_params\n params.require(:bug).permit(:title, :deadline, :type, :project_id, :bug_type, :image, :Description)\n end",
"def bug_params\n params.require(:bug).permit(:title, :deadline, :issue_type, :status, :bug_image)\n end",
"def create\n @issue = Issue.new(issue_params)\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to :success, notice: 'Issue was successfully created.' }\n format.json { render json: @issue }\n else\n format.html { render :new }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @issue = Issue.new(params[:issue])\n\n respond_to do |format|\n if @issue.save\n flash[:notice] = 'Issue was successfully created.'\n format.html { redirect_to(@issue) }\n format.xml { render :xml => @issue, :status => :created, :location => @issue }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @issue.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def issue_params\n params.require(:issue).permit(:name, :description, :issue_status_id, :user_id, :project_id)\n end",
"def create\n @issue = Issue.new(params[:issue])\n\n respond_to do |format|\n if @issue.save\n format.html { redirect_to @issue, notice: 'Issue was successfully created.' }\n format.json { render json: @issue, status: :created, location: @issue }\n else\n format.html { render action: \"new\" }\n format.json { render json: @issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @issue_type = IssueType.new(issue_type_params)\n @issue_types = IssueType.all\n @issue_type.save\n @issue_type = IssueType.new\n redirect_to new_issue_type_path\n flash[:notice] = \"Saved Successfully\"\n end",
"def assign_note\n if params[:assign_comment].blank?\n render :update do |page|\n page << \"show_error_full_msg('assign_to_errors','Comment can not be blank','message_error_div');\"\n end\n else\n @note.update_attributes(:assigned_to_user_id => params[:note][:assigned_to_user_id], :updated_by_user_id => current_user.id)\n create_comment(@note,params[:comment])\n render :update do |page|\n flash[:notice] = 'Note assigned successfully'\n page << 'tb_remove();'\n page.redirect_to wfm_notes_path\n end\n end\n end"
] | [
"0.59415907",
"0.59390056",
"0.59142524",
"0.5873954",
"0.5872078",
"0.58266485",
"0.5810045",
"0.5799205",
"0.5793148",
"0.5768828",
"0.5768828",
"0.576681",
"0.5743812",
"0.57119465",
"0.57114285",
"0.5691348",
"0.56779057",
"0.5676881",
"0.56757444",
"0.5674522",
"0.5666465",
"0.56636965",
"0.5657828",
"0.56300217",
"0.5623246",
"0.5599788",
"0.5597778",
"0.55824316",
"0.55824316",
"0.5582415",
"0.5571691",
"0.55713665",
"0.5569883",
"0.55524385",
"0.55249643",
"0.55231476",
"0.5510999",
"0.55028665",
"0.5502228",
"0.5501303",
"0.549915",
"0.5486468",
"0.5460776",
"0.5445296",
"0.5438048",
"0.543745",
"0.5434285",
"0.5426775",
"0.5420371",
"0.54196525",
"0.54196525",
"0.54196525",
"0.54196525",
"0.541309",
"0.54103315",
"0.54040915",
"0.53968173",
"0.53956616",
"0.5391817",
"0.5389933",
"0.5382291",
"0.5375564",
"0.537396",
"0.53685296",
"0.5365172",
"0.5359996",
"0.53582335",
"0.53564596",
"0.5350858",
"0.5347181",
"0.53433263",
"0.53410214",
"0.5340248",
"0.53353",
"0.5333097",
"0.5330867",
"0.5321921",
"0.5319271",
"0.53148735",
"0.5313498",
"0.5309918",
"0.5308848",
"0.5305902",
"0.5288947",
"0.5285426",
"0.5285322",
"0.5284918",
"0.52820694",
"0.5279511",
"0.527936",
"0.52746093",
"0.5267176",
"0.5266188",
"0.52639633",
"0.5254219",
"0.52497846",
"0.52496433",
"0.5246448",
"0.5239624",
"0.5233837",
"0.52328193"
] | 0.0 | -1 |
Deliverable changes for the journal use the Deliverable name instead of the id Context: :detail => Detail about the journal change | def helper_issues_show_detail_after_setting(context = { })
# TODO Later: Overwritting the caller is bad juju
#if context[:detail].prop_key == 'objective_id'
# d = Objective.find_by_name(context[:detail].value)
# context[:detail].value = d.name unless d.nil? || d.name.nil?
# d = Objective.find_by_name(context[:detail].old_value) if context[:detail].old_value
# context[:detail].old_value = d.name unless d.nil? || d.name.nil?
#end
#''
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def edit\n @deliverable = Deliverable.find(params[:id])\n #get the project by project_id, project_id is got from @deliverable's attribute\n @project = Project.find_by_id(@deliverable.project_id)\n #get the lifecycle phase by lifecycle_id, lifecycle_id is got from @deliverable's attribute\n @lifecycle_phase = LifecyclePhase.find_by_id(@project.lifecycle_id)\n #get the deliverable type by deliverable_type_id, deliverable_type_id is got from @deliverable's attribute\n @deliverable_type = DeliverableType.find_by_id(@deliverable.deliverable_type_id)\n end",
"def edit\n #find adhoc deliverable to edit\n @adhoc_deliverable = Deliverable.find(params[:id])\n end",
"def issue_edit(user, journal)\n issue = journal.journalized\n redmine_headers 'Project' => issue.project.identifier,\n 'Issue-Tracker' => issue.tracker.name,\n 'Issue-Id' => issue.id,\n 'Issue-Author' => issue.author.login,\n 'Issue-Assignee' => assignee_for_header(issue)\n redmine_headers 'Issue-Priority' => issue.priority.name if issue.priority\n message_id journal\n references issue\n @author = journal.user\n s = \"[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] \"\n s += \"(#{issue.status.name}) \" if journal.new_value_for('status_id') && Setting.show_status_changes_in_mail_subject?\n s += issue.subject\n @issue = issue\n @user = user\n @journal = journal\n @journal_details = journal.visible_details\n @issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue, :anchor => \"change-#{journal.id}\")\n\n mail :to => user,\n :subject => s\n end",
"def edit\n @typical_deliverable = TypicalDeliverable.find(params[:id])\n end",
"def update\n @deliverable = Deliverable.find(params[:id])\n\n respond_to do |format|\n if @deliverable.update_attributes(params[:deliverable])\n format.html { redirect_to @deliverable, notice: \"\\\"#{@deliverable.identifier}: #{@deliverable.description}\\\" was successfully updated.\" }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @deliverable = Deliverable.find(params[:deliverable_id])\n\n if params[:deliverable][:type] != @deliverable.class\n @deliverable = @deliverable.change_type(params[:deliverable][:type])\n end\n\n respond_to do |format|\n if @deliverable.update_attributes(params[:deliverable])\n @flash = l(:notice_successful_create)\n format.html { redirect_to :action => 'index', :id => @project.identifier }\n else\n format.html { render :action => 'edit', :id => @project.identifier }\n end\n end\n\n\n end",
"def edit\n @deliverable = Deliverable.find_by_id_and_project_id(params[:deliverable_id], @project.id)\n end",
"def show\n @deliverable = Deliverable.find(params[:id])\n\n unless @deliverable.editable?(current_user)\n flash[:error] = I18n.t(:not_your_deliverable)\n redirect_to root_path and return\n end\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @deliverable }\n end\n end",
"def changed_details\n mail_deliver(:notify_staff_details, :subject => \"Your details have changed for \" + self.school.school_name)\n end",
"def dispute_notification(id, amount, currency)\n @id, @amount, @currency = id, amount, currency\n \n mail to: \"[email protected]\",\n subject: \"Hikarigo dispute created. Attention may be needed\"\n end",
"def update\n @typical_deliverable = TypicalDeliverable.find(params[:id])\n\n respond_to do |format|\n if @typical_deliverable.update_attributes(params[:typical_deliverable])\n flash[:notice] = 'Typical Deliverable was successfully updated.'\n format.html { redirect_to(:controller => 'catalogs') }\n #format.xml { head :ok }\n else\n flash[:error] = error_html(@typical_deliverable.errors)\n format.html { render :action => \"edit\" }\n #format.xml { render :xml => @typical_deliverable.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def edit\n @project_phase_deliverable = ProjectPhaseDeliverable.find(params[:id])\n if(!@project_phase_deliverable.deliverable_type.blank? && !@project_phase_deliverable.complexity.blank?)\n @historical_data = HistoricalData.get_historical_data(@project_phase_deliverable.deliverable_type_id,\n @project_phase_deliverable.complexity)\n end\n\n respond_to do |format|\n if(!@project_phase_deliverable.has_effort_log?)\n if(params[:no_layout] == \"true\")\n @no_layout = true\n format.html { render :layout => false}\n else\n format.html # show.html.erb\n end\n else\n format.html { redirect_to(@project_phase_deliverable.project_phase.project, :error => 'You cannot update a deliverable that has logged effort.') }\n end\n end\n end",
"def update\n @detour = Detour.find(params[:id])\n\n @detour.change_addr = request.remote_ip\n @detour.change_at = Time.now.strftime(\"%Y-%m-%d %H:%M:%S\")\n\n respond_to do |format|\n \tif @detour.update_attributes(params[:detour])\n \tflash[:notice] = 'Detour was successfully updated.'\n\n\t\[email protected]_pdf_path = nil\n\t\[email protected]\n\t\[email protected] do |n|\n\t\t\tnext if n.notification_type != 'DETON'\n\t\t\t@new_not = Notification.new\n\t\t\t@new_not.detour_id = n.detour_id\n\t\t\t@new_not.location_id = n.location_id\n\t\t\t@new_not.notification_method = n.notification_method\n\t\t\t@new_not.notification_type = 'DETCHG'\n\t\t\t@new_not.acknowledge_requested = n.acknowledge_requested\n\t\t\t@new_not.save\n\t \tend\n\n format.html { redirect_to(detours_url) }\n # format.html { redirect_to(@detour) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @detour.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @deliverable = Deliverable.find(params[:id])\n\n respond_to do |format|\n if @deliverable.update_attributes(params[:deliverable])\n format.html { redirect_to @deliverable, notice: 'Deliverable was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render \"edit\" }\n format.json { render json: @deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def notify_modification\n if @ok\n msg = params[:details_placeholder].blank? ? '' : params[:details]\n @lesson.notify_changes msg\n end\n end",
"def update\n @deliverable = Deliverable.find(params[:id])\n\n respond_to do |format|\n if @deliverable.update_attributes(params[:deliverable])\n format.html { redirect_to @deliverable, :notice => 'Deliverable was successfully updated.' }\n format.json { respond_with_bip(@deliverable)}\n else\n format.html { render :action => \"edit\" }\n format.json { respond_with_bip(@deliverable)}\n end\n end\n end",
"def dispute_updated\n UserMailer.dispute_updated\n end",
"def describe_history_item( item )\n case item.action_type\n when MaintenanceRequestHistoryItem::TYPE_ADD_REMARK:\n # nothing to do\n return \"\";\n when MaintenanceRequestHistoryItem::TYPE_ASSIGNEE_CHANGE:\n return \"העברת אחריות ל-#{item.new_state_data}\";\n when MaintenanceRequestHistoryItem::TYPE_STATE_CHANGE: \n return \"שינוי מצב ל-#{mt_state(item.new_state_data.to_i)}\";\n when MaintenanceRequestHistoryItem::TYPE_TITLE_CHANGE:\n return \"שינוי כותרת מ-'#{h(item.old_state_data)}' ל-'#{h(item.new_state_data)}'\";\n when MaintenanceRequestHistoryItem::TYPE_URGENCY_CHANGE:\n return \"שינוי דחיפות ל-\" + pp_urgency(item.new_state_data.to_i);\n when MaintenanceRequestHistoryItem::TYPE_PLACE_CHANGE:\n return \"שינוי מיקום מ-\" + item.old_state_data + \" ל-\" + item.new_state_data;\n when MaintenanceRequestHistoryItem::TYPE_BODY_CHANGE:\n return \"שינוי תאור\";\n when MaintenanceRequestHistoryItem::TYPE_SERVICE_TYPE_CHANGE: \n return \"שינוי סוג שירות מ-\" + mt_req_service_type(item.old_state_data.to_i) + \" ל-\" + mt_req_service_type(item.new_state_data.to_i) + \".\";\n when MaintenanceRequestHistoryItem::TYPE_ADD_COST_DATA:\n ret_str = [];\n ret_str << \"הוספו נתוני עלות:<br/><ul>\";\n item.new_state_data.split(\"|\").each do | pair |\n vals = pair.split(\"=\");\n case vals[0]\n when \"hrs\":\n ret_str << \"<li>#{vals[1]} שעות</li>\" unless vals[1].blank?\n when \"pph\":\n ret_str << \"<li>מחיר לשעה: #{vals[1]} #{self.currency()}</li>\" unless vals[1].blank?\n when \"pc\":\n ret_str << \"<li>מחיר חלקים: #{vals[1]} #{self.currency()}</li>\" unless vals[1].blank?\n when \"fp\":\n ret_str << \"<li>מחיר קבוע: #{vals[1]} #{self.currency()}</li>\" unless vals[1].blank?\n end\n end\n ret_str << \"</ul>\";\n return ret_str.join();\n when MaintenanceRequestHistoryItem::TYPE_HOURS_OF_FIX_CHANGE:\n return \"מספר שעות העבודה שונה מ-\" + safe_str(item.old_state_data) + \" \" + \" ל-\" + item.new_state_data + \".\";\n when MaintenanceRequestHistoryItem::TYPE_PRICE_PER_HOUR_CHANGE:\n return \"מחיר לשעה שונה מ-\" + safe_str(item.old_state_data) + \" \" + self.currency() + \" ל-\" + item.new_state_data + \" \" + self.currency(); \n when MaintenanceRequestHistoryItem::TYPE_PARTS_COST_CHANGE: \n return \"מחיר החלקים שונה מ-\" + safe_str(item.old_state_data) + \" \" + self.currency() + \" ל-\" + item.new_state_data + \" \" + self.currency();\n when MaintenanceRequestHistoryItem::TYPE_FIXED_PRICE_CHANGE:\n return \"המחיר הקבוע שונה מ-\" + safe_str(item.old_state_data) + \" \" + self.currency() + \" ל-\" + item.new_state_data + \" \" + self.currency();\n when MaintenanceRequestHistoryItem::TYPE_BUILDING_CHANGE:\n return \"הבניין שונה מ-#{safe_str(item.old_state_data)} ל-#{safe_str(item.new_state_data)}\";\n when MaintenanceRequestHistoryItem::TYPE_ADD_FILES:\n return \"צירוף קבצים: #{item.new_state_data}\";\n when MaintenanceRequestHistoryItem::TYPE_REMOVE_FILES:\n return \"מחיקת קבצים: #{item.new_state_data}\";\n when MaintenanceRequestHistoryItem::TYPE_BUDGET_CHANGE:\n return \"הוספת תקציב: #{item.new_state_data}\" if item.old_state_data.nil?\n return \"שינוי תקציב מ-#{item.old_state_data} ל-#{item.new_state_data}\";\n end\n end\n \n # return human readable form of the value\n def pp_boolean(value)\n if value\n return \"כן\";\n else\n return \"לא\";\n end\n end\n \n def pp_flat( a_flat )\n return \"דירה #{a_flat.number} קומה #{a_flat.floor}\";\n end\n \nend",
"def update\r\n @receivable = Receivable.find(params[:id])\r\n\r\n respond_to do |format|\r\n if @receivable.update_attributes(params[:receivable])\r\n flash[:notice] = 'Título a receber atualizado.'\r\n format.html { redirect_to(@receivable) }\r\n format.xml { head :ok }\r\n else\r\n format.html { render :action => \"edit\" }\r\n format.xml { render :xml => @receivable.errors, :status => :unprocessable_entity }\r\n end\r\n end\r\n end",
"def update\n @adhoc_deliverable = Deliverable.find(params[:id])\n\n respond_to do |format|\n if @adhoc_deliverable.update_attributes(params[:adhoc_deliverable])\n format.html { redirect_to @adhoc_deliverable, notice: 'AdhocDeliverable was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render \"edit\" }\n format.json { render json: @adhoc_deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @change = @priority.change_with_deleted.find(params[:id])\n\n respond_to do |format|\n if @change.update_attributes(params[:change])\n flash[:notice] = t('changes.saved')\n format.html { redirect_to(priority_changes_path(@change)) }\n else\n format.html { render :action => \"edit\" }\n end\n end\n end",
"def update\n respond_to do |format|\n if @deliverable.update(deliverable_params)\n format.html { redirect_to @deliverable, notice: 'Deliverable was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @deliverable.errors, status: :unprocessable_entity }\n end\n end\n end",
"def after_save(subscription)\n attributes = {}\n description = []\n if subscription.state_changed?\n state_changes = subscription.changes['state']\n attributes.merge!(\n :old_state => state_changes.first,\n :new_state => state_changes.last\n )\n if state_changes.first == 'pending' && state_changes.last == 'active'\n if subscription.pending == :payment\n description << subscription.actions.last.try(:payment).try(:description)\n end\n if subscription.pending == :concession_verification\n description << \"Concession: #{subscription.note}\"\n end\n if subscription.pending == :student_verification\n description << \"Student Discount: #{subscription.note}\"\n end\n end\n if state_changes.first == 'pending'\n # Set the pending column to nil if we are no longer pending anything\n subscription.pending = nil\n end\n end\n if subscription.expires_at_changed?\n if subscription.expires_at\n description << \"Expiry Date set to #{subscription.changes['expires_at'].last.strftime(\"%d/%m/%y\")}\"\n else\n description << \"Expiry Date set to nil!\"\n end\n end\n attributes[:description] = description.join(\"; \")\n subscription.log_entries.create(attributes) unless attributes.empty?\n end",
"def deliver_process_notification\n deliver_contributor_notification(:processing_payment)\n end",
"def deliver_security_notification_update\n if saved_change_to_address?\n options = {\n recipients: [address_before_last_save],\n message: :mail_body_security_notification_change_to,\n field: :field_mail,\n value: address\n }\n elsif saved_change_to_notify?\n options = {\n recipients: [address],\n message: notify_before_last_save ? :mail_body_security_notification_notify_disabled : :mail_body_security_notification_notify_enabled,\n value: address\n }\n end\n deliver_security_notification(options)\n end",
"def set_deliverable\n @deliverable = Deliverable.find(params[:id])\n end",
"def update\n @project_phase_deliverable = ProjectPhaseDeliverable.find(params[:id])\n\n respond_to do |format|\n if @project_phase_deliverable.update_attributes(params[:project_phase_deliverable])\n format.html { redirect_to(Project.find(@project_phase_deliverable.project_phase.project), :notice => 'Project phase deliverable was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @project_phase_deliverable.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def build_detail_fee_based\n details = self.invoice_details.new(:created_user => self.created_user, :record_type => InvoiceDetail::FEE, :provider_name => 'a',\n :patient_name => 'a', :dos => Date.today, :disposition => InvoiceDetail::INCLUDE)\n end",
"def alter\n UserNotifier.deliver_user_review(self, user)\n end",
"def to_s_for_changelog(with_reference)\n \"- #{title}\"\n end",
"def show\n @commitment = Commitment.find(params[:id])\n @title = \"Commitment for #{@commitment.orderable.product.name}\"\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @commitment }\n end\n end",
"def populate_changelog_notes_description(issue)\n issue.custom_values.each do |custom_value|\n include_changelog_note(custom_value) \\\n if custom_value.customized_id == issue.id && \\\n custom_value.custom_field_id == changelog_notes_id\n end\n end",
"def description; raw_changeset.description; end",
"def show\n @design_change = DesignChange.find(params[:id])\n \n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @change_detail }\n end\n end",
"def publish_description # :norobots:\n pass_query_params\n if draft = find_description(params[:id].to_s)\n parent = draft.parent\n old = parent.description\n type = parent.type_tag\n old_partial = old.unique_partial_format_name if old\n draft_partial = draft.unique_partial_format_name\n\n # Must be admin on the draft in order for this to work. (Must be able\n # to delete the draft after publishing it.)\n if !draft.is_admin?(@user)\n flash_error(:runtime_edit_description_denied.t)\n redirect_to(:action => parent.show_action, :id => parent.id,\n :params => query_params)\n\n # Can't merge it into itself!\n elsif old == draft\n flash_error(:runtime_description_already_default.t)\n redirect_to(:action => draft.show_action, :id => draft.id,\n :params => query_params)\n\n # I've temporarily decided to always just turn it into a public desc.\n # User can then merge by hand if public desc already exists.\n else\n draft.source_type = :public\n draft.source_name = ''\n draft.project = nil\n draft.admin_groups.clear\n draft.admin_groups << UserGroup.reviewers\n draft.writer_groups.clear\n draft.writer_groups << UserGroup.all_users\n draft.reader_groups.clear\n draft.reader_groups << UserGroup.all_users\n draft.save\n parent.log(:log_published_description, :user => @user.login,\n :name => draft.unique_partial_format_name, :touch => true)\n parent.description = draft\n parent.save\n Transaction.send(\"put_#{type}_description\",\n :id => draft,\n :set_source_type => draft.source_type,\n :set_source_name => draft.source_name,\n :set_project => draft.project,\n :set_admins => draft.admin_groups,\n :set_writers => draft.writer_groups,\n :set_readers => draft.reader_groups\n )\n redirect_to(:action => parent.show_action, :id => parent.id,\n :params => query_params)\n end\n end\n end",
"def update\n @supplier_debit_note = SupplierDebitNote.find(params[:id])\n\n respond_to do |format|\n if @supplier_debit_note.update_attributes(params[:supplier_debit_note])\n format.html { redirect_to(@supplier_debit_note, :notice => 'Receive From Supplier note was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @supplier_debit_note.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def status_change\n petition = Petition.where(status: 'live').first\n PetitionMailer.status_change_mail(Petition.live.first)\n end",
"def changes_notification\n NotifierMailer.changes_notification(User.limit(2), {\n title: 'Email test title',\n content: 'Email test content',\n body: 'Email test body'\n })\n end",
"def update\n @ticket = Ticket.find(params[:id])\n\t\tchanges = \"\"\n\t\tnew_employee = params[:ticket][:employee_id].nil? || params[:ticket][:employee_id].empty? ? nil : Employee.find(params[:ticket][:employee_id])\n\t\tunless new_employee == @ticket.employee\n\t\t\tchanges += \"> Responsible changed from #{@ticket.employee ? @ticket.employee.login : \"None\"} to #{new_employee.login}\"\n\t\t\[email protected] = new_employee\n\t\tend\n\t\tnew_status = params[:ticket][:status_id].nil? || params[:ticket][:status_id].empty? ? nil : Status.find(params[:ticket][:status_id])\n\t\tunless new_status == @ticket.status\n\t\t\tchanges += $/ + \"> Status changed from \\\"#{@ticket.status ? @ticket.status.name : \"None\"}\\\" to \\\"#{new_status.name}\\\"\"\n\t\t\[email protected] = new_status\n\t\tend\n\t\t@reply = @ticket.replies.build(params[:reply])\n\t\[email protected] = changes\n\t\[email protected] = current_user.login\n respond_to do |format|\n if @ticket.valid? && @reply.valid?\n\t\t\t\[email protected]\n\t\t\t\[email protected]\n\t\t\t\tCustomerSupport.update_ticket_email(@ticket,@reply).deliver\n format.html { redirect_to backend_ticket_path(@ticket), notice: 'Ticket was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"show\" }\n format.json { render json: @ticket.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_item(id, content, responsible_party=nil, notify=true)\n record \"/todos/update_item/#{id}\",\n :item => { :content => content }, :responsible_party => responsible_party,\n :notify => notify\n end",
"def deliver\n raise Pomodori::Notifier::Error, \"This method needs to be overwritten\"\n end",
"def show\n begin\n @proposal = Proposal.approved.published.find(params[:id])\n rescue ActiveRecord::RecordNotFound\n @proposal = Proposal.find_by_id(params[:id].to_i)\n if @proposal.present? && !(logged_in? && (is_admin? || @proposal.user_id == current_user.id))\n raise ActiveRecord::RecordNotFound and return\n elsif @proposal.nil?\n @debate = Debate.published.find(params[:id])\n redirect_to debate_path(@debate) and return\n end\n end\n\n @parent = @proposal\n\n @comments = @proposal.comments.approved.paginate :page => params[:page], :per_page => 25\n @arguments = @proposal.arguments.published.paginate :page => params[:page], :per_page => 50\n\n if logged_in? && params[:n_id].present?\n notification = current_user.notifications.find(params[:n_id])\n notification.read_at = Time.zone.now if notification.read_at.nil?\n notification.save\n end\n\n respond_to do |format|\n format.html { render }\n format.floki { render }\n end\n end",
"def show\n @deliverable = Deliverable.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @deliverable }\n end\n end",
"def status_changed(expense)\n @expense = expense\n mail to: @expense.user.email, subject: 'Expense Report Notification: The status of your expense has been changed'\n end",
"def update\n \n #add201229\n #コンスタントへ注文番号を書き込む(先頭記号が変わった時)\n update_constant\n \n #工事データの住所を更新\n update_address_to_construction\n \n ###\n #メール送信する(メール送信ボタン押した場合)\n\t if params[:send].present?\n \n #画面のメアドをグローバルへセット\n set_responsible\n \n ##画面のメアドをグローバルへセット\n #$email_responsible = params[:purchase_order_datum][:supplier_master_attributes][:email1]\n ##CC用に担当者2のアドレスもグローバルへセット\n #$email_responsible2 = nil\n #if params[:purchase_order_datum][:supplier_master_id].present?\n # supplier = SupplierMaster.where(id: params[:purchase_order_datum][:supplier_master_id]).first\n # if supplier.present? && supplier.email_cc.present?\n # $email_responsible2 = supplier.email_cc\n # end\n #end\n \n #インスタンスへパラメータを再セット\n reset_parameters\n\t \n\t #メール送信フラグをセット\n params[:purchase_order_datum][:mail_sent_flag] = 1\n\t \n #moved200519\n\t #PostMailer.send_when_update(@purchase_order_datum).deliver\n\t end\n ###\n \n \n respond_to do |format|\n \n \n if @purchase_order_datum.update(purchase_order_datum_params)\n \n #moved 200519\n ###\n #メール送信する(メール送信ボタン押した場合)\n\t if params[:send].present?\n PostMailer.send_when_update(@purchase_order_datum).deliver\n\t end\n ###\n \n save_only_flag = true\n \n #臨時FAX用\n set_order_data_fax(format)\n \n #add210706\n #仕入担当者の追加・更新\n #update_responsible\n \n #format.html { redirect_to @purchase_order_datum, notice: 'Purchase order datum was successfully updated.' }\n\t #format.json { render :show, status: :ok, location: @purchase_order_datum , construction_id: params[:construction_id], move_flag: params[:move_flag]}\n\t\t if save_only_flag\n \n format.html {redirect_to purchase_order_datum_path(@purchase_order_datum, :construction_id => params[:construction_id], :move_flag => params[:move_flag])}\n\t\t else\n format.json { render :show, status: :ok, location: @purchase_order_datum }\n \n end\n else\n #add210727\n #バリデーション失敗の場合も、仕入担当者をリビルド\n\t @purchase_order_datum.build_supplier_responsible\n \n format.html { render :edit }\n format.json { render json: @purchase_order_datum.errors, status: :unprocessable_entity }\n end\n end\n\t\t\n end",
"def controller_issues_edit_after_save(context = {})\n tracks_link = TracksLink.find_by_issue_id_and_user_id(context[:issue].id, User.current.id)\n if User.current.tracks_url.present? && tracks_link.present? && context[:issue].changed?\n toggle_todo(context, tracks_link, 'completed') if context[:issue].closing?\n update_todo(tracks_link, context[:issue]) if User.current.tracks_time_sync\n end\n end",
"def show\n @change = @priority.changes.find(params[:id])\n @page_title = t('changes.show.title', :priority_name => @priority.name)\n for a in @change.activities.find(:all, :conditions => \"type in ('ActivityCapitalAcquisitionProposal','ActivityPriorityMergeProposal')\")\n @activity = a\n end\n if @activity\n @activities = @change.activities.active.by_recently_updated.find(:all, :conditions => \"id <> #{@activity.id.to_s}\").paginate :page => params[:page], :per_page => params[:per_page]\n else\n @activities = @change.activities.active.by_recently_updated.paginate :page => params[:page], :per_page => params[:per_page]\n end\n @vote = nil\n\t\t@vote = @change.votes.find_by_user_id(current_user.id) if logged_in?\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @change.to_xml(:include => [:user, :priority, :new_priority], :except => NB_CONFIG['api_exclude_fields']) }\n format.json { render :json => @change.to_json(:include => [:user, :priority, :new_priority], :except => NB_CONFIG['api_exclude_fields']) } \n end\n end",
"def change_detail_set?\n self.change_detail\n end",
"def news_comment_added_with_change(comment)\n news = comment.commented\n redmine_headers 'Project' => news.project.identifier\n @author = comment.author\n message_id comment\n references news\n @news = news\n @comment = comment\n @news_url = url_for(:controller => 'news', :action => 'show', :id => news)\n mail :to => news.recipients,\n :cc => news.watcher_recipients,\n :subject => \"Re: [#{news.project.to_s}] #{l(:label_news)}: #{news.title}\"\n end",
"def update\n @journal = @compte_bancaire.journals.find(params[:id])\n\n respond_to do |format|\n if @journal.update_attributes(params[:journal])\n format.html { redirect_to compte_bancaire_journals_path(@compte_bancaire), :notice => 'Le Journal a bien été modifié !' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render json :@journal.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @team = Team.find(params[:id])\n @team.needs_change = true\n @team.save!\n flash[:notice] = \"Changes to #{@team.title} successfully requested\"\n TeamNotifications.deliver_change_request(@team,params[:changes])\n redirect_to admin_teams_path\n end",
"def lease_history_message(state, deactivate_date, expiration_date, visibility_during, visibility_after)\n I18n.t 'hydra.lease.history_message',\n state: state,\n deactivate_date: deactivate_date,\n expiration_date: expiration_date,\n visibility_during: visibility_during,\n visibility_after: visibility_after\n end",
"def deliver_change(enterprise: @enterprise, organization: @organization, project: @project, pipeline: @pipeline, topic: nil, wait: false, timeout: 10, retries: 5)\n o = self.change_by_topic(\n enterprise: enterprise,\n organization: organization,\n project: project,\n pipeline: pipeline,\n topic: topic\n )\n return false if !o.deliverable?\n if wait && !o.deliverable?\n times = 1\n while times <= retries\n o = self.change_by_topic(\n enterprise: enterprise,\n organization: organization,\n project: project,\n pipeline: pipeline,\n topic: topic\n )\n break if o.deliverable?\n return false if o.current_stage.failed?\n puts \"Stage #{o.current_stage.stage}: #{o.current_stage.status} retries #{times}/#{retries}\"\n sleep timeout\n times += 1\n end\n end\n\n de = o.deliver\n return true if !wait && !de.nil? && o.delivered?\n\n if de.nil? && !o.deliverable?\n puts \"Could not deliver change #{o.current_stage.stage}: #{o.current_stage.status}\"\n return false\n end\n\n times = 1\n while times <= retries\n o = self.change_by_topic(\n enterprise: enterprise,\n organization: organization,\n project: project,\n pipeline: pipeline,\n topic: topic\n )\n break if o.delivered?\n return false if o.current_stage.failed?\n puts \"Stage #{o.current_stage.stage}: #{o.current_stage.status} retries #{times}/#{retries}\"\n times += 1\n sleep timeout\n end\n true\n end",
"def update\n respond_to do |format|\n if @item_delivery.update(item_delivery_params)\n @item_delivery.record_activity(:update, current_user, \"Updated PO Delivery\")\n format.html { redirect_to @item_delivery, notice: 'Item delivery was successfully updated.' }\n format.json { respond_with_bip @item_delivery }\n else\n format.html { render action: 'edit' }\n format.json { respond_with_bip @item_delivery }\n end\n end\n end",
"def show\n #find Adhoc Deliverable by deliverable id\n @adhoc_deliverable = Deliverable.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @adhoc_deliverable }\n end\n end",
"def update\n authorize @detail\n if @detail.emailed == false\n @detail.emailed = true\n UsersMailer.welcome(current_user).deliver_now\n end \n \n \n respond_to do |format|\n if @detail.update(detail_params)\n format.html { redirect_to root_path, notice: 'Detail was successfully updated.' }\n format.json { render :show, status: :ok, location: @detail }\n else\n format.html { render :edit }\n format.json { render json: @detail.errors, status: :unprocessable_entity }\n end\n end\n end",
"def describe_changes_within_release(enum)\n change = enum.peek\n span \"Product #{change.release} [#{change.level}]\"\n ul.release do\n list_changes_within_release(enum)\n end\n end",
"def show\n @deliverable = Deliverable.find(params[:id])\n @artifact = Artifact.find_by_deliverable_id(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @deliverable }\n end\n end",
"def statusChange\n BookingMailer.statusChange\n end",
"def delivery_details; message[:delivery_details]; end",
"def update\n @draft_company = DraftCompany.find(params[:id])\n\n draft_review_info=@draft_company.draft_review\n email_tracker_info=draft_review_info.email_tracker\n CustomMessage.deliver_send_alert_mail_to_return_email(email_tracker_info.return_email)\n respond_to do |format|\n if @draft_company.update_attributes(params[:company])\n flash[:notice] = 'DraftCompany was successfully updated.'\n \n format.xml \n else\n \n format.xml { render :xml => @draft_company.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def user_wrote_editnote(user_id, media_id)\n @company = Company.first\n @user = User.find(user_id)\n @media_file = MediaFile.find(media_id)\n @booking = @media_file.booking\n mail(to: @company.email, subject: \"For admin: #{ @user.full_name} wrote an edit note\")\n # CHANGE @USER.EMAIL TO COMPANY EMAIL OR PRODUCER EMAIL\n end",
"def add_attribute_changed_notes\n if self.valid?\n # 'advance_charge_paid' attribute\n if self.advance_charge_paid_changed?\n charge_paid_note = self.advance_charge_paid? ?\n I18n.t(\"views.pickup_order.advance_charges_paid\").capitalize :\n I18n.t(\"views.pickup_order.advance_charges_not_paid\").capitalize\n self.add_note(Note::RECORD_UPDATE, NoteType::NOTE_TYPE_CODE_LOT, charge_paid_note, Employee.current, true)\n end\n\n # If any holds were added (pickup or sale holds), add the appropriate system note(s).\n if self.hold_for_pickup_changed? && !self.hold_for_pickup_change.any?(&:nil?)\n note_text =\n if self.hold_for_pickup?\n (I18n.t(\"controllers.vehicle.notes.pickup_hold_added_for\") +\n \" #{self.hold_for_pickup_date.strftime('%-d.%-m.%Y')}.<br/>\" +\n I18n.t(\"controllers.vehicle.notes.reason\") +\n \": #{self.hold_for_pickup_reason}\")\n else\n I18n.t(\"controllers.vehicle.notes.pickup_hold_removed\")\n end\n self.add_note(Note::RECORD_UPDATE, NoteType::NOTE_TYPE_CODE_LOT, note_text, Employee.current, true)\n end\n if self.hold_for_sale_changed? && !self.hold_for_sale_change.any?(&:nil?)\n note_text =\n if self.hold_for_sale?\n (I18n.t(\"controllers.vehicle.notes.sale_hold_added_for\") +\n \" #{self.sale_hold_action_date.strftime('%-d.%-m.%Y')}.<br/>\" +\n I18n.t(\"controllers.vehicle.notes.reason\") +\n \": #{self.sale_hold_comment}\")\n else\n I18n.t(\"controllers.vehicle.notes.sale_hold_removed\")\n end\n self.add_note(Note::RECORD_UPDATE, NoteType::NOTE_TYPE_CODE_LOT, note_text, Employee.current, true)\n end\n\n # If any holds (pickup or sale) are present and the hold date was changed, add a system note.\n if self.hold_for_pickup_date_changed? && !self.hold_for_pickup_date_change.any?(&:nil?)\n note_text =\n I18n.t(\"controllers.vehicle.notes.pickup_hold_date_changed\",\n original_date: self.hold_for_pickup_date_change[0].strftime(\"%-d.%-m.%Y\"),\n new_date: self.hold_for_pickup_date_change[1].strftime(\"%-d.%-m.%Y\"))\n self.add_note(Note::RECORD_UPDATE, NoteType::NOTE_TYPE_CODE_LOT, note_text, Employee.current, true)\n end\n if self.sale_hold_action_date_changed? && !self.sale_hold_action_date_change.any?(&:nil?)\n note_text =\n I18n.t(\"controllers.vehicle.notes.sale_hold_date_changed\",\n original_date: self.sale_hold_action_date_change[0].strftime(\"%-d.%-m.%Y\"),\n new_date: self.sale_hold_action_date_change[1].strftime(\"%-d.%-m.%Y\"))\n self.add_note(Note::RECORD_UPDATE, NoteType::NOTE_TYPE_CODE_LOT, note_text, Employee.current, true)\n end\n\n # Add a system note if the high bid amount has been changed.\n if self.high_bid_amount_changed?\n original_high_bid = (self.yard.present? && self.yard.facility.present? && self.yard.facility.address.present? && self.yard.facility.address.country.present?) ?\n number_to_currency(self.high_bid_amount_change[0] || 0.0, precision: 2, unit: self.yard.facility.address.country.currency) :\n number_to_currency(self.high_bid_amount_change[0] || 0.0, precision: 2)\n new_high_bid = (self.yard.present? && self.yard.facility.present? && self.yard.facility.address.present? && self.yard.facility.address.country.present?) ?\n number_to_currency(self.high_bid_amount_change[1] || 0.0, precision: 2, unit: self.yard.facility.address.country.currency) :\n number_to_currency(self.high_bid_amount_change[1] || 0.0, precision: 2)\n self.add_note(Note::RECORD_UPDATE, NoteType::NOTE_TYPE_CODE_LOT,\n I18n.t(\"controllers.vehicle.notes.high_bid_amount_changed\",\n original_high_bid: original_high_bid, new_high_bid: new_high_bid),\n Employee.current, true)\n end\n\n # Add a system note if the member has been changed.\n if self.member_id_changed?\n=begin\n original_member = Member.find_by_id(self.member_id_change[0])\n new_member = Member.find_by_id(self.member_id_change[1])\n if original_member.present? && new_member.present?\n note_text = I18n.t(\"controllers.vehicle.notes.member_changed\",\n original_member: \"<a href='#{member_path(original_member)}' target='_blank'>#{original_member.display_name} (##{original_member.member_uid})</a>\",\n new_member: \"<a href='#{member_path(new_member)}' target='_blank'>#{new_member.display_name} (##{new_member.member_uid})</a>\")\n self.add_note(Note::RECORD_UPDATE, NoteType::NOTE_TYPE_CODE_LOT, note_text, Employee.current, true)\n end\n=end\n end\n end\n end",
"def show\n #get the deliverable id from URL\n @deliverable = Deliverable.find(params[:id])\n #get the deliverable type for the deliverable\n @deliverable_type = DeliverableType.find_by_id(@deliverable.deliverable_type_id)\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @deliverable }\n end\n end",
"def update\n @pagetitle = \"Edit delivery\"\n @action_txt = \"Update\"\n \n items = params[:items].split(\",\")\n \n @delivery = Delivery.find(params[:id])\n @company = @delivery.company\n @payments = @company.get_payments() \n @transports = @company.get_transports()\n @remision = Remision.all \n if(params[:ac_customer] and params[:ac_customer] != \"\")\n @ac_customer = params[:ac_customer]\n else\n @ac_customer = @delivery.customer.name\n end\n \n @products_lines = @delivery.services_lines\n \n @locations = @company.get_locations()\n @divisions = @company.get_divisions()\n @trucks = @company.get_trucks()\n @employees = @company.get_employees()\n @empsubs = @company.get_empsubs()\n @unidads = @company.get_unidads()\n @addresses = @company.get_addresses()\n @addresses2 = @company.get_addresses()\n @services = @company.get_services() \n @servicebuys = @company.get_servicebuys()\n @customers = @company.get_customers()\n @remites = @company.get_customers()\n\n @delivery[:subtotal] = @delivery.get_subtotal(items)\n @delivery[:tax] = @delivery.get_tax(items, @delivery[:customer_id])\n @delivery[:total] = @delivery[:subtotal] + @delivery[:tax]\n\n\n remision =@delivery[:remision]\n code = @delivery[:code]\n fecha1 =@delivery[:fecha1]\n fecha2 =@delivery[:fecha2]\n remite_id =@delivery[:remite_id]\n address_id = @delivery[:address_id]\n location_id =@delivery[:location_id]\n division_id = @delivery[:division_id]\n customer_id = @delivery[:customer_id]\n address2_id = @delivery[:address2_id]\n description =@delivery[:description]\n processed = @delivery[:processed]\n truck_id =@delivery[:truck_id]\n truck2_id = @delivery[:truck2_id]\n employee_id = @delivery[:employee_id]\n subcontrat_id = @delivery[:subcontrat_id]\n user_id =@delivery[:user_id]\n company_id = @delivery[:company_id]\n return1=\"\"\n date_processed = Date.today \n tranportorder_id = @delivery[:tranportorder_id]\n comments=\"\"\n subtotal = 0\n tax = 0\n total = 0\n empsub_id =@delivery[:empsub_id]\n\n\n respond_to do |format|\n if @delivery.update(delivery_params)\n \n # Create products for kit\n #@delivery.delete_services()\n #@delivery.add_services(items)\n \n # Check if we gotta process the delivery\n @delivery.process()\n \n format.html { redirect_to(@delivery, :notice => 'delivery was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @delivery.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def send_back_office_updates(to,member_type,from, newsletter_subject,audit_id ,user_id)\n audit = Audit.find(audit_id)\n object = audit.auditable_type.classify.constantize.find(audit.auditable_id) rescue nil\n recipients to\n from from\n\t\tsubject newsletter_subject\n\t\tbody :audit =>audit, \n\t\t :object => object ,\n\t\t :user =>User.find(user_id),\n\t\t :site => self.site_name,\n\t\t :member_type => member_type,\n\t\t :email => to,\n\t\t :url => self.daurl\n sent_on Time.now\n content_type \"text/html\"\n end",
"def reason_not_to_edit\n d = @data_object\n if d.order_amount_paid > 0.0\n return \"Cannot edit an order after it has been partially paid\"\n end\n\n pays = Pays.for_order(self)\n unless pays.empty?\n return \"Cannot edit an order after payments have been applied\"\n end\n\n each_line do |line|\n if line.li_date_shipped\n return \"Cannot edit: '#{line.li_desc}' has been shipped\"\n end\n end\n\n nil\n end",
"def update \n data=params\n employee = Employee.find(params[:id])\n if update_lawyer_preferences(employee)\n flash[:notice] = \"Lawyer preferences updated successfully\"\n redirect_to :back\n return true\n else\n flash[:error] = \"<ul>\" + employee.errors.full_messages.collect {|e| \"<li>\" + e + \"</li>\"}.join(\" \") + \"</ul>\"\n redirect_to :back\n return false\n end\n @com_notes_entries = Communication.find(data[\"id\"].to_i)\n @note_priority = (data[:com_notes_entries][:note_priority] == 0 ||data[:com_notes_entries][:note_priority].eql?('0'))? 1 : 2 \n notes = data[:com_notes_entries][:description] if data[:com_notes_entries][:description]\n # Below code is common in \"Complete Task\" and \"Assign To\" logic.\n if data[:commit].eql?(\"Complete Task\") || data[:commit].eql?(\"Assign To\")\n notes_type = data[:task][:tasktype] unless data[:task][:tasktype].blank?\n task_details = {}\n task_details.merge!(data[:task])\n task_details.merge!(:name=>notes,:tasktype =>notes_type,:priority=>@note_priority)\n end\n if data[:commit].eql?(\"Save & Exit\")\n respond_to do |format| \n if @com_notes_entries.update_attributes(:description=>notes,:more_action =>data[:com_notes_entries][:more_action], :matter_id =>data[:com_notes_entries][:matter_id], :contact_id=>data[:com_notes_entries][:contact_id],:note_priority=>@note_priority.to_i)\n flash[:notice] = \"#{t(:text_task)} \" \"#{t(:flash_was_successful)} \" \"#{t(:text_saved)}\"\n format.html {redirect_to physical_liviaservices_livia_secretaries_url}\n else\n format.html { render :action => \"show\" }\n end\n end\n elsif data[:commit].eql?(\"Complete Task\") \n task_details.merge!(data[:task])\n task_details.merge!(:assigned_to_user_id =>@current_user.id,:status=>'complete',:completed_at=>Time.now,:completed_by_user_id=>@current_user.id)\n @task= UserTask.new(task_details)\n respond_to do |format|\n # Below mention transaction block basically revert Task entry and even revert the Communication to update.\n # Added by Ajay Arsud Date:09 Sept 2010\n UserTask.transaction do\n if @task.save\n @com_notes_entries = Communication.find(data[\"id\"].to_i)\n @task.update_attributes(:company_id=>@com_notes_entries.company_id)\n @com_notes_entries.update_attributes(:status => 'complete')\n flash[:notice] = \"#{t(:text_task)} \" \"#{t(:flash_was_successful)} \" \"#{t(:text_completed)}\"\n format.html { redirect_to physical_liviaservices_livia_secretaries_url }\n else\n flash[:error] = t(:flash_task_type)\n format.html { redirect_to physical_liviaservices_livia_secretaries_url }\n end\n end\n end\n elsif data[:commit].eql?(\"Assign To\")\n task_details.merge!(:assigned_to_user_id =>data[:task][:assigned_to_user_id])\n @task = UserTask.new(task_details)\n respond_to do |format|\n # Below mention transaction block basically revert Task entry and even revert the Communication to update.\n # Added by Ajay Arsud Date:09 Sept 2010\n Communication.transaction do\n if @task.save\n @com_notes_entries = Communication.find(data[\"id\"].to_i)\n @task.update_attributes(:company_id=>@com_notes_entries.company_id) \n @com_notes_entries.update_attributes(:status => 'complete')\n flash[:notice] = \"#{t(:text_task)} \" \"#{t(:flash_was_successful)} \" \"#{t(:text_assigned)}\"\n format.html { redirect_to physical_liviaservices_livia_secretaries_url }\n else\n flash[:error] = t(:flash_task_type)\n format.html { redirect_to physical_liviaservices_livia_secretaries_url }\n end\n end\n end\n end \n end",
"def update\n \t@courier = Courier.find(params[:courier_id])\n @delivery = @courier.deliveries.find(params[:delivery_id])\n @dropoff = @delivery.dropoffs.find(params[:id])\n\n respond_to do |format|\n if @dropoff.update_attributes(params[:dropoff])\n format.html { redirect_to(@dropoff, :notice => 'Dropoff was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @dropoff.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def show\n @item = ItemPurchase.find(params[:id])\n @recent_purchases = ItemPurchase.for_customer(current_user.id).for_item(@item.item.id)\n @store = Store.find(ItemStore.find(@item.item_store_id).store_id)\n @itemname = Item.find(ItemStore.find(@item.item_store_id).item_id)\n def change_status(int)\n @item.update_attribute(:status, int)\n flash[:notice] = \"Successfully updated #{@item.item.name} status to #{int}.\"\n end\n end",
"def notification(data)\n type = data.delete(\"type\") || data.delete(:type) || data.delete(\"type\") || data.delete(:type)\n zone = to_demiurge_name(data.delete(\"zone\") || data.delete(:zone) || @item.zone)\n location = to_demiurge_name(data.delete(\"location\") || data.delete(:location) || @item.location)\n actor = to_demiurge_name(data.delete(\"actor\") || data.delete(:actor) || @item)\n @item.engine.send_notification(data, type: type.to_s, zone: zone, location: location, actor: actor, include_context: true)\n nil\n end",
"def product_order_notification(order_detail, recipient)\n @order = order_detail.order\n @order_detail = OrderDetailPresenter.new(order_detail)\n attach_reservation_ical(order_detail.reservation) if order_detail.reservation.present?\n send_nucore_mail recipient, text(\"views.purchase_notifier.product_order_notification.subject\", product: order_detail.product)\n end",
"def update\n respond_to do |format|\n if @bug.update(bug_params)\n BugHistoric.create(bug_id: @bug.id, ref: BugHistoric.MODIFIED, user_id: current_user.id)\n format.html { redirect_to @bug, notice: 'Bug was successfully updated.' }\n format.json { render :show, status: :ok, location: @bug }\n else\n format.html { render :edit }\n format.json { render json: @bug.errors, status: :unprocessable_entity }\n end\n end\n end",
"def controller_issues_edit_after_save(context={ })\n if context[:time_entry] && context[:time_entry][:hours].present?\n if(context[:time_entry].user_id == context[:issue].assigned_to_id && context[:time_entry].activity.name[0..2].include?(\"BD\"))\n context[:controller].flash[:warning] = l(:notice_ayty_remember_fill_rest_bd,\n :hours => ( context[:issue].ayty_get_value_by_custom_field_name(\"Tempo Restante BD\",\n context[:issue].ayty_get_value_by_custom_field_name(\"Estimativa BD - hr\", 0)).to_f -\n context[:time_entry][:hours].to_f))\n end\n if(context[:time_entry].user_id == context[:issue].assigned_to_id && context[:time_entry].activity.name[0..2].include?(\"SIS\"))\n context[:controller].flash[:warning] = l(:notice_ayty_remember_fill_rest_sys,\n :hours => ( context[:issue].ayty_get_value_by_custom_field_name(\"Tempo Restante SIS\",\n context[:issue].ayty_get_value_by_custom_field_name(\"Estimativa SIS - hr\", 0)).to_f -\n context[:time_entry][:hours].to_f))\n end\n end\n end",
"def drafts; end",
"def update\n @deliverable = Deliverable.find(params[:id])\n\n\n there_is_an_attachment = params[:deliverable_attachment][:attachment]\n if there_is_an_attachment\n\n @attachment = DeliverableAttachment.new(params[:deliverable_attachment])\n @attachment.submitter = current_person\n @deliverable.attachment_versions = @attachment\n @attachment.deliverable = @deliverable\n\n if @attachment.valid? and @deliverable.valid? and @deliverable.update_attributes(params[:deliverable])\n @deliverable.send_deliverable_upload_email(url_for(@deliverable))\n flash[:notice] = 'Deliverable was successfully updated.'\n redirect_to(@deliverable)\n else\n render :action => \"edit\"\n end\n else\n if @deliverable.valid? and @deliverable.update_attributes(params[:deliverable])\n flash[:notice] = 'Deliverable was successfully updated.'\n redirect_to(@deliverable)\n else\n render :action => \"edit\"\n end\n end\n\n\n end",
"def update\n respond_to do |format|\n if @delivery.update(delivery_params)\n format.html { redirect_to deliveries_url, notice: 'La livraison à été modifié.' }\n format.json { render :show, status: :ok, location: @delivery }\n else\n format.html { render :edit }\n format.json { render json: @delivery.errors, status: :unprocessable_entity }\n end\n end\n end",
"def after_commit(idea_progress)\n\t\t# only process if a create just occurred\n\t\t# - see after_create method above\n\t\tif idea_progress.send_notification\n\t\t\t# determine if idea is realized\n\t\t\tif idea_progress.is_completed && idea_progress.url\n\t\t\t\t# idea realized\n\n\t\t\t\t# notify owner if wants notification\n\t\t\t\tif idea_progress.idea.user.wants_notifications\n\t\t\t\t\tmessage = Message.new\n message.locale = idea_progress.idea.user.notification_language \n\t\t\t\t\tmessage.email = idea_progress.idea.user.email\n\t\t\t\t\tmessage.subject = I18n.t(\"mailer.notification.idea_realized_owner.subject\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t:organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\tmessage.message = I18n.t(\"mailer.notification.idea_realized_owner.message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t:organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\tmessage.org_message = idea_progress.explaination\n\t\t\t\t\tmessage.url = idea_progress.url\n\t\t\t\t\tNotificationMailer.idea_realized_owner(message).deliver\n\t\t\t\tend\n\n\t\t\t\t# notify subscribers\n\t\t\t\tI18n.available_locales.each do |locale|\n\t\t\t\t message = Message.new\n\t\t\t\t message.bcc = Notification.follow_idea_users(idea_progress.idea_id, locale)\n\t\t\t\t if !message.bcc.blank?\n\t\t\t\t\t # if the owner is a subscriber, remove from list\n\t\t\t\t\t index = message.bcc.index(idea_progress.idea.user.email)\n\t\t\t\t\t message.bcc.delete_at(index) if index\n\t\t\t\t\t # only continue if owner was not only subscriber\n\t\t\t\t\t if message.bcc.length > 0\n message.locale = locale\n\t\t\t\t\t\t message.subject = I18n.t(\"mailer.notification.idea_realized_subscriber.subject\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t :organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\t message.message = I18n.t(\"mailer.notification.idea_realized_subscriber.message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t :organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\t message.org_message = idea_progress.explaination\n\t\t\t\t\t\t message.url = idea_progress.url\n\t\t\t\t\t\t NotificationMailer.idea_realized_subscriber(message).deliver\n\t\t\t\t\t end\n \t\t\t\tend\n\t\t\t\tend\n\t\t\telse\n\t\t\t\t# see if this idea is already claimed by this org\n\t\t\t\tideas = IdeaProgress.where(\"idea_id = ? and organization_id = ? and id != ?\",\n\t\t\t\t\tidea_progress.idea_id, idea_progress.organization_id, idea_progress.id)\n\n\t\t\t\tif ideas && !ideas.empty?\n\t\t\t\t\t# org already claimed, just an update\n\t\t\t\t\t# notify owner if wants notification\n\t\t\t\t\tif idea_progress.idea.user.wants_notifications\n\t\t\t\t\t\tmessage = Message.new\n message.locale = idea_progress.idea.user.notification_language \n\t\t\t\t\t\tmessage.email = idea_progress.idea.user.email\n\t\t\t\t\t\tmessage.subject = I18n.t(\"mailer.notification.idea_progress_update_owner.subject\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t:organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\tmessage.message = I18n.t(\"mailer.notification.idea_progress_update_owner.message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t:organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\tmessage.org_message = idea_progress.explaination\n\t\t\t\t\t\tmessage.url_id = idea_progress.idea_id\n\t\t\t\t\t\tNotificationMailer.idea_progress_update_owner(message).deliver\n\t\t\t\t\tend\n\n\t\t\t\t\t# notify subscribers\n \t\t\t\tI18n.available_locales.each do |locale|\n\t\t\t\t\t message = Message.new\n\t\t\t\t\t message.bcc = Notification.follow_idea_users(idea_progress.idea_id, locale)\n\t\t\t\t\t if !message.bcc.blank?\n\t\t\t\t\t\t # if the owner is a subscriber, remove from list\n\t\t\t\t\t\t index = message.bcc.index(idea_progress.idea.user.email)\n\t\t\t\t\t\t message.bcc.delete_at(index) if index\n\t\t\t\t\t\t # only continue if owner was not only subscriber\n\t\t\t\t\t\t if message.bcc.length > 0\n message.locale = locale\n\t\t\t\t\t\t\t message.subject = I18n.t(\"mailer.notification.idea_progress_update_subscriber.subject\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t :organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\t\t message.message = I18n.t(\"mailer.notification.idea_progress_update_subscriber.message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t :organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\t\t message.org_message = idea_progress.explaination\n\t\t\t\t\t\t\t message.url_id = idea_progress.idea_id\n\t\t\t\t\t\t\t NotificationMailer.idea_progress_update_subscriber(message).deliver\n\t\t\t\t\t\t end\n \t\t\t\t\tend\n\t\t\t\t\tend\n\t\t\t\telse\n\t\t\t\t\t# org is claiming idea\n\t\t\t\t\t# notify owner if wants notification\n\t\t\t\t\tif idea_progress.idea.user.wants_notifications\n\t\t\t\t\t\tmessage = Message.new\n message.locale = idea_progress.idea.user.notification_language \n\t\t\t\t\t\tmessage.email = idea_progress.idea.user.email\n\t\t\t\t\t\tmessage.subject = I18n.t(\"mailer.notification.idea_claimed_owner.subject\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t:organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\tmessage.message = I18n.t(\"mailer.notification.idea_claimed_owner.message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t:organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\tmessage.org_message = idea_progress.explaination\n\t\t\t\t\t\tmessage.url_id = idea_progress.idea_id\n\t\t\t\t\t\tNotificationMailer.idea_claimed_owner(message).deliver\n\t\t\t\t\tend\n\n\t\t\t\t\t# notify subscribers\n \t\t\t\tI18n.available_locales.each do |locale|\n\t\t\t\t\t message = Message.new\n\t\t\t\t\t message.bcc = Notification.follow_idea_users(idea_progress.idea_id, locale)\n\t\t\t\t\t if !message.bcc.blank?\n\t\t\t\t\t\t # if the owner is a subscriber, remove from list\n\t\t\t\t\t\t index = message.bcc.index(idea_progress.idea.user.email)\n\t\t\t\t\t\t message.bcc.delete_at(index) if index\n\t\t\t\t\t\t # only continue if owner was not only subscriber\n\t\t\t\t\t\t if message.bcc.length > 0\n message.locale = locale\n\t\t\t\t\t\t\t message.subject = I18n.t(\"mailer.notification.idea_claimed_subscriber.subject\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t :organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\t\t message.message = I18n.t(\"mailer.notification.idea_claimed_subscriber.message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t :organization => idea_progress.organization.name, :locale => locale)\n\t\t\t\t\t\t\t message.org_message = idea_progress.explaination\n\t\t\t\t\t\t\t message.url_id = idea_progress.idea_id\n\t\t\t\t\t\t\t NotificationMailer.idea_claimed_subscriber(message).deliver\n\t\t\t\t\t\t end\n\t\t\t\t\t end\n \t\t\t\tend\n\t\t\t\tend\n\t\t\tend\n\t\tend\n\n\tend",
"def new\n @effort_log = EffortLog.new\n @deliverable_id = params[:deliverable_id]\n \n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @effort_log }\n end\n end",
"def update\n # Call `draft_publication_dependencies` to check if any other drafted\n # records should be published along with this `@draft`.\n @dependencies = @draft.draft_publication_dependencies\n\n # If you would like to warn the user about dependent drafts that would need\n # to be published along with this one, you would implement an\n # `app/views/drafts/update.html.erb` view template. In that view template,\n # you could list the `@dependencies` and show a button posting back to this\n # action with a name of `commit_publication`. (The button's being clicked\n # indicates to your application that the user accepts that the dependencies\n # should be published along with the `@draft`, thus avoiding orphaned\n # records).\n if @dependencies.empty? || params[:commit_publication]\n @draft.publish!\n flash[:notice] = t('.notice')\n redirect_to @draft.item\n else\n # Renders `app/views/drafts/update.html.erb`\n end\n end",
"def dispute_closed\n UserMailer.dispute_closed\n end",
"def update\n if @admin_journal_issue.asignee != params[:admin_journal_issue][:asignee]\n params[:admin_journal_issue][:notif_status] = false\n end\n if params[:admin_journal_issue][:status_id] == \"5\"\n params[:admin_journal_issue][:from] = params[:temp_from]\n end\n respond_to do |format|\n if @admin_journal_issue.update(admin_journal_issue_params)\n Admin::JournalIssue.save_attributes(@admin_journal_issue.id,params)\n #this method for sending message to admin about Journal issue who assign\n AdminMailer.delay(:queue => 'notification_create_journal_issue', :priority => 1).mail_journal_issue(@admin_journal_issue.id,@admin_journal_issue.asignee,\"main\")\n unless params[:selected].blank?\n id_params = params[:selected] \n id = convert_to_arr_for_query(id_params)\n @selected_images = Admin::JournalIssueImage.where(\"id in #{id}\")\n @selected_images.each do |image|\n loaded = Cloudinary::Uploader.destroy(\"journal_issue/images/#{image.id}\", :public_id => \"journal_issue/files/#{image.id}\", :invalidate => true)\n end\n Admin::JournalIssueImage.delete_all \"id in #{id}\"\n end\n unless params[:selected_files].blank?\n id_params = params[:selected_files] \n id = convert_to_arr_for_query(id_params)\n @selected_files = Admin::JournalIssueFile.where(\"id in #{id}\")\n @selected_files.each do |file|\n loaded = Cloudinary::Uploader.destroy(\"journal_issue/files/#{file.id}_#{file.document_file_name}\", :invalidate => true, :resource_type => :raw)\n end\n Admin::JournalIssueFile.delete_all \"id in #{id}\"\n end\n format.html { redirect_to admin_journal_issue_path(id_journal: @admin_journal_issue.journal_id), notice: 'Journal issue was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @admin_journal_issue.errors, status: :unprocessable_entity }\n end\n end\n end",
"def pending_list\n @design_changes = DesignChange.find_pending\n \n respond_to do |format|\n format.html # pending_list.html.erb\n format.xml { render :xml => @design_changes }\n end\n end",
"def dispatch_brief \n # @brief.each do |chuck|\n # Jaconda::Notification.notify(text: chuck, sender_name: @@sender)\n # end\n\n Jaconda::Notification.notify(text: @brief, sender_name: @@sender)\n end",
"def show\n @diaper_change = DiaperChange.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @diaper_change }\n end\n end",
"def email_status_change_notices\n return if previously_published?\n\n case status\n when 'published', 'embargoed'\n StashEngine::UserMailer.status_change(resource, status).deliver_now\n StashEngine::UserMailer.journal_published_notice(resource, status).deliver_now\n when 'peer_review'\n StashEngine::UserMailer.status_change(resource, status).deliver_now\n StashEngine::UserMailer.journal_review_notice(resource, status).deliver_now\n when 'submitted'\n\n # Don't send multiple emails for the same resource, or for submission made by curator\n return if previously_submitted?\n\n StashEngine::UserMailer.status_change(resource, status).deliver_now\n when 'withdrawn'\n return if note.include?('final action required reminder') # this has already gotten a special withdrawal email\n\n if user_id == 0\n StashEngine::UserMailer.user_journal_withdrawn(resource, status).deliver_now\n else\n StashEngine::UserMailer.status_change(resource, status).deliver_now\n end\n end\n end",
"def add_detail(property, prop_key, old_value, value)\n details << AlterRecordDetail.new(:property => property, :prop_key => prop_key, :old_value => old_value, :value => value)\n end",
"def observer_detail_info\n observer_detail == 'true'\n end",
"def created()\n pending = @@server.pending\n messages = []\n\n # common format for message lines\n append = proc do |title, list|\n next unless list\n if list.length > 0 and list.length < 6\n titles = []\n Agenda.index.each do |item|\n titles << item.title if list.include? item.attach\n end\n messages << \"#{title} #{titles.join(', ')}\"\n elsif list.length > 1\n messages << \"#{title} #{list.length} reports\"\n end\n end\n\n append 'Approve', pending.approved\n append 'Unapprove', pending.unapproved\n append 'Flag', pending.flagged\n append 'Unflag', pending.unflagged\n\n # list (or number) of comments made with this commit\n comments = pending.comments.keys().length\n if comments > 0 and comments < 6\n titles = []\n Agenda.index.each do |item|\n titles << item.title if pending.comments[item.attach]\n end\n messages << \"Comment on #{titles.join(', ')}\"\n elsif comments > 1\n messages << \"Comment on #{comments} reports\"\n end\n\n # identify (or number) action item(s) updated with this commit\n if pending.status\n if pending.status.length == 1\n item = pending.status.first\n text = item.text\n if item.pmc or item.date\n text += ' ['\n text += \" #{item.pmc}\" if item.pmc\n text += \" #{item.date}\" if item.date\n text += ' ]'\n end\n\n messages << \"Update AI: #{text}\"\n elsif pending.status.length > 1\n messages << \"Update #{pending.status.length} action items\"\n end\n end\n\n @message = messages.join(\"\\n\")\n end",
"def draft?; end",
"def update\n @breadcrumb = 'update'\n @supplier_invoice = SupplierInvoice.find(params[:id])\n\n master_changed = false\n # Should use attachment from drag&drop?\n if $attachment != nil && !$attachment.avatar.blank? && $attachment.updated_at > @supplier_invoice.updated_at\n @supplier_invoice.attachment = $attachment.avatar\n end\n if @supplier_invoice.attachment.dirty? || $attachment_changed\n master_changed = true\n end\n\n items_changed = false\n if params[:supplier_invoice][:supplier_invoice_approvals_attributes]\n params[:supplier_invoice][:supplier_invoice_approvals_attributes].values.each do |new_item|\n current_item = SupplierInvoiceApproval.find(new_item[:id]) rescue nil\n if ((current_item.nil?) || (new_item[:_destroy] != \"false\") ||\n ((current_item.approver_id.to_i != new_item[:approver_id].to_i) ||\n (current_item.approval_date != new_item[:approval_date].to_date) ||\n (current_item.approved_amount.to_f != new_item[:approved_amount].to_f) ||\n (current_item.remarks != new_item[:remarks])))\n items_changed = true\n break\n end\n end\n end\n if !items_changed && params[:supplier_invoice][:supplier_invoice_items_attributes]\n params[:supplier_invoice][:supplier_invoice_items_attributes].values.each do |new_item|\n current_item = SupplierInvoiceItem.find(new_item[:id]) rescue nil\n if ((current_item.nil?) || (new_item[:_destroy] != \"false\") ||\n ((current_item.product_id.to_i != new_item[:product_id].to_i) ||\n (current_item.description != new_item[:description]) ||\n (current_item.code != new_item[:code]) ||\n (current_item.quantity.to_f != new_item[:quantity].to_f) ||\n (current_item.price.to_f != new_item[:price].to_f) ||\n (current_item.discount_pct.to_f != new_item[:discount_pct].to_f) ||\n (current_item.discount.to_f != new_item[:discount].to_f) ||\n (current_item.tax_type_id.to_i != new_item[:tax_type_id].to_i) ||\n (current_item.receipt_note_id.to_i != new_item[:receipt_note_id].to_i) ||\n (current_item.receipt_note_item_id.to_i != new_item[:receipt_note_item_id].to_i) ||\n (current_item.project_id.to_i != new_item[:project_id].to_i) ||\n (current_item.work_order_id.to_i != new_item[:work_order_id].to_i) ||\n (current_item.charge_account_id.to_i != new_item[:charge_account_id].to_i)))\n items_changed = true\n break\n end\n end\n end\n if ((params[:supplier_invoice][:organization_id].to_i != @supplier_invoice.organization_id.to_i) ||\n (params[:supplier_invoice][:project_id].to_i != @supplier_invoice.project_id.to_i) ||\n (params[:supplier_invoice][:invoice_no].to_s != @supplier_invoice.invoice_no) ||\n (params[:supplier_invoice][:invoice_date].to_date != @supplier_invoice.invoice_date) ||\n (params[:supplier_invoice][:supplier_id].to_i != @supplier_invoice.supplier_id.to_i) ||\n (params[:supplier_invoice][:receipt_note_id].to_i != @supplier_invoice.receipt_note_id.to_i) ||\n (params[:supplier_invoice][:work_order_id].to_i != @supplier_invoice.work_order_id.to_i) ||\n (params[:supplier_invoice][:charge_account_id].to_i != @supplier_invoice.charge_account_id.to_i) ||\n (params[:supplier_invoice][:payment_method_id].to_i != @supplier_invoice.payment_method_id.to_i) ||\n (params[:supplier_invoice][:withholding].to_f != @supplier_invoice.withholding.to_f) ||\n (params[:supplier_invoice][:discount_pct].to_f != @supplier_invoice.discount_pct.to_f) ||\n (params[:supplier_invoice][:internal_no].to_s != @supplier_invoice.internal_no) ||\n (params[:supplier_invoice][:payday_limit].to_s != @supplier_invoice.payday_limit) ||\n (params[:supplier_invoice][:posted_at].to_s != @supplier_invoice.posted_at) ||\n (params[:supplier_invoice][:remarks].to_s != @supplier_invoice.remarks))\n master_changed = true\n end\n\n respond_to do |format|\n if master_changed || items_changed\n @supplier_invoice.updated_by = current_user.id if !current_user.nil?\n $attachment_changed = false\n if @supplier_invoice.update_attributes(params[:supplier_invoice])\n destroy_attachment\n $attachment = nil\n format.html { redirect_to @supplier_invoice,\n notice: (crud_notice('updated', @supplier_invoice) + \"#{undo_link(@supplier_invoice)}\").html_safe }\n format.json { head :no_content }\n else\n destroy_attachment\n $attachment = Attachment.new\n @projects = projects_dropdown_edit(@supplier_invoice.project)\n # @search_projects = @projects.map{ |p| p.id }.map(&:inspect).join(',')\n @work_orders = @supplier_invoice.project.blank? ? work_orders_dropdown : @supplier_invoice.project.work_orders.order(:order_no)\n @charge_accounts = work_order_charge_account(@supplier_invoice)\n # @stores = work_order_store(@supplier_invoice)\n @suppliers = suppliers_dropdown\n @payment_methods = @supplier_invoice.organization.blank? ? payment_methods_dropdown : payment_payment_methods(@supplier_invoice.organization_id)\n @receipt_notes = @supplier_invoice.supplier.blank? ? receipts_dropdown : receipts_dropdown_by_supplier(@supplier_invoice.supplier)\n @purchase_orders = @supplier_invoice.supplier.blank? ? unbilled_purchase_orders_dropdown : unbilled_purchase_orders_dropdown_by_supplier(@supplier_invoice.supplier)\n @note_items = []\n @order_items = []\n @products = []\n # @note_items = @supplier_invoice.receipt_note.blank? ? [] : note_items_dropdown(@supplier_invoice.receipt_note)\n # if @note_items.blank?\n # @products = @supplier_invoice.organization.blank? ? products_dropdown : @supplier_invoice.organization.products(:product_code)\n # else\n # @products = @note_items.first.receipt_note.products.group(:product_code)\n # end\n # Special to approvals\n @invoice_debt = number_with_precision(@supplier_invoice.debt.round(4), precision: 4)\n @invoice_not_yet_approved = number_with_precision(@supplier_invoice.amount_not_yet_approved.round(4), precision: 4)\n @users = User.where('id = ?', current_user.id)\n @is_approver = company_approver(@supplier_invoice, @supplier_invoice.project.company, current_user.id) ||\n office_approver(@supplier_invoice, @supplier_invoice.project.office, current_user.id) ||\n (current_user.has_role? :Approver)\n @companies = @supplier_invoice.organization.blank? ? companies_dropdown : companies_dropdown_edit(@supplier_invoice.organization)\n format.html { render action: \"edit\" }\n format.json { render json: @supplier_invoice.errors, status: :unprocessable_entity }\n end\n else\n format.html { redirect_to @supplier_invoice }\n format.json { head :no_content }\n end\n end\n end",
"def record_changelog_identifier\n\t\tself.valve_code\n\tend",
"def show\n if @purchase_order.status == \"draft\"\n render :action => \"edit\"\n end\n end",
"def show\n @deliverables = submission.deliverables # old code from redis\n end",
"def publish_ordebook_change(event_name, data)\n\n # Example of Kraken JSON data:\n #\n # { \"result\": {\"XXBTZUSD\": {\n # \"asks\":[[\"646.00000\",\"0.960\",1394838815],[\"650.00000\",\"0.010\",1394884158],[\"650.10080\",\"0.014\",1394846392]],\n # \"bids\":[[\"640.01000\",\"1.403\",1394910367],[\"640.00000\",\"0.010\",1394883827],[\"637.35372\",\"0.014\",1394846392]]\n # }}}'\n\n data = JSON.parse(data) if data.kind_of?(String)\n \n direction = (data[3].to_i == 'b' ? 1 : -1)\n\n standartized_data = {\n price: data[0].to_f,\n size: data[1].to_f,\n # As of now, we can't rely on timestamps with Kraken.\n # Kraken doesn't provide a timestamp for a full depth orderbook\n # so Orderbook can't check it against what we've got here.\n # Thus we use real time.\n timestamp: Time.now.to_i,\n direction: direction\n }\n\n # Note the block that is passed. We only want to notify orderbook with the right direction,\n # that is if the update is to 'asks' orderbook, we only notify 'asks' orderbook.\n publish_event(\"order_#{event_name}\", standartized_data) { |orderbook| orderbook.direction == direction }\n end",
"def create_journal_with_subissues\n if @current_journal\n # attributes changes\n (Issue.column_names - %w(id description lock_version created_on updated_on parent_id materialized_path)).each {|c|\n @current_journal.details << JournalDetail.new(:property => 'attr',\n :prop_key => c,\n :old_value => @issue_before_change.send(c),\n :value => send(c)) unless send(c)==@issue_before_change.send(c)\n }\n # custom fields changes\n custom_values.each {|c|\n next if (@custom_values_before_change[c.custom_field_id]==c.value ||\n (@custom_values_before_change[c.custom_field_id].blank? && c.value.blank?))\n @current_journal.details << JournalDetail.new(:property => 'cf', \n :prop_key => c.custom_field_id,\n :old_value => @custom_values_before_change[c.custom_field_id],\n :value => c.value)\n } \n @current_journal.save\n end\n end",
"def update\r\n @solicitudlabexa = Solicitudlabexa.find(params[:id])\r\n saveObject(params)\r\n getViewModel\r\n\r\n respond_to do |format|\r\n if @solicitudlabexa.save\r\n CorreoTecnicos::emitesolicitudexamen(@solicitudlabexa,params[:fecha],\"Solicitud cursada por admin\",\"Cambios en \").deliver_later \r\n @solicitudlabexas = Solicitudlabexa.all\r\n format.html { redirect_to :action => \"index\" }\r\n format.xml { head :ok }\r\n else\r\n format.html { render :action => \"edit\"}\r\n format.xml { render :xml => @solicitudlabexa.errors, :status => :unprocessable_entity }\r\n end\r\n end\r\nend",
"def deliver(jql, delivered_status_name)\n @jira.finished_issues(jql).map(&:key).each do |issue|\n if @git.contains?(issue)\n @jira.deliver(issue, delivered_status_name) unless @dry_run\n puts \"delivered issue: #{issue}\"\n #TODO project.comment(story, server_name) if server_name\n end\n end\n end",
"def update\n unless params[:unpaid_debt][:status].nil? or isManager?\n redirect_to unpaid_debts_url, :alert => '您没有权限进行此操作'\n return\n end\n @unpaid_debt = UnpaidDebt.find(params[:id])\n\n respond_to do |format|\n if @unpaid_debt.update_attributes(params[:unpaid_debt])\n format.html { redirect_to @unpaid_debt, notice: '挂帐单 成功更新.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @unpaid_debt.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @consumer_debt.update(consumer_debt_params)\n format.html { redirect_to my_portfolio_path, notice: 'Consumer debt was successfully updated.' }\n format.json { render :show, status: :ok, location: @consumer_debt }\n else\n format.html { render :edit }\n format.json { render json: @consumer_debt.errors, status: :unprocessable_entity }\n end\n end\n end"
] | [
"0.60061777",
"0.5667252",
"0.5608281",
"0.5588416",
"0.55597526",
"0.55342776",
"0.55339885",
"0.5521309",
"0.55158114",
"0.5388616",
"0.53762066",
"0.5298179",
"0.5289025",
"0.52882946",
"0.5272368",
"0.52437246",
"0.5156913",
"0.5078224",
"0.50654095",
"0.5060568",
"0.50590444",
"0.5046423",
"0.50379133",
"0.5003908",
"0.4992854",
"0.49833366",
"0.49774393",
"0.49715504",
"0.49501953",
"0.49402553",
"0.49215716",
"0.49076164",
"0.48918113",
"0.4891149",
"0.48844138",
"0.4878254",
"0.48741674",
"0.48724905",
"0.4868843",
"0.48626113",
"0.48491758",
"0.48460034",
"0.48361924",
"0.4832478",
"0.48312336",
"0.48294467",
"0.4824206",
"0.48238626",
"0.48184752",
"0.4802659",
"0.4800113",
"0.47970656",
"0.47962943",
"0.47946084",
"0.47897887",
"0.47793934",
"0.477831",
"0.4763956",
"0.47586074",
"0.4752251",
"0.47479582",
"0.47470957",
"0.47414944",
"0.47407004",
"0.4738282",
"0.47350523",
"0.4732391",
"0.4731081",
"0.47305307",
"0.47239846",
"0.47201166",
"0.4712393",
"0.4695238",
"0.46951887",
"0.46949834",
"0.46940804",
"0.469112",
"0.4684671",
"0.4683406",
"0.46800756",
"0.4675778",
"0.46696615",
"0.46620846",
"0.46614882",
"0.46611586",
"0.46599564",
"0.46572807",
"0.46506712",
"0.46492857",
"0.46478063",
"0.46470776",
"0.46441442",
"0.46433967",
"0.46419418",
"0.46396375",
"0.4639159",
"0.46391207",
"0.46365368",
"0.463636",
"0.46347615"
] | 0.5158357 | 16 |
Using a private method to encapsulate the permissible parameters is just a good pattern since you'll be able to reuse the same permit list between create and update. Also, you can specialize this method with peruser checking of permissible attributes. | def upload_files_params
params.require(:project).permit(:file)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def permitted_params\n policy(resource || resource_class.new).send(\"permitted_#{action_name}_attributes\")\n end",
"def safe_params\n resurce_name = self.class.resource_name\n params_method_name = \"#{resurce_name}_params\".to_sym\n if params[resurce_name]\n if respond_to?(params_method_name) || private_methods.include?(params_method_name)\n send(params_method_name)\n else\n raise ActiveModel::ForbiddenAttributesError, \"Please, define the '#{params_method_name}' method in #{self.class.name}\"\n end\n end\n end",
"def permitted_create_params\n fail NotImplementedError\n end",
"def form_params\n # Remove role and privilege ids as these are managed by the app not by\n # the active record associations\n params[:user].delete :role_ids\n params[:user].delete :privilege_ids\n params.require(:user).permit(user_allowable_params)\n end",
"def permitted_params\n res = attribute_names.map(&:to_sym) - %i[disabled user_id created_at updated_at tracker_id tracker_history_id\n admin_id]\n refine_permitted_params res\n end",
"def strengthen_params!(method_name)\n permitting_model_name = self.class.instance_variable_defined?(:@permitting_model_name) && self.class.instance_variable_get(:@permitting_model_name)\n target_model_name = (permitting_model_name || self.class.name.sub(/.+::/, '').sub(/Controller$/, '')).singularize.underscore.tr('/', '_').to_sym\n permitted_attributes = self.class.instance_variable_defined?(:@permitted_attributes) && self.class.instance_variable_get(:@permitted_attributes)\n\n method_parameters = method(method_name).parameters\n method_parameters.each do |type, key|\n trimmed_key = key.to_s.sub(/_params\\z/, '').to_sym\n if (trimmed_key == target_model_name) && permitted_attributes\n params.require(trimmed_key) if %i[req keyreq].include?(type)\n params[trimmed_key] = params[trimmed_key].try :permit, *permitted_attributes if params.key? trimmed_key\n end\n end\n end",
"def permit(*permitted)\n hardened_params = params.dup\n\n hardened_params.keep_if { |k, _v| permitted.flatten.include?(k.to_sym) }\n\n hardened_params.symbolize_keys\n end",
"def permitted_params\n @implementation_class ||= implementation_class\n\n res = @implementation_class.permitted_params\n @implementation_class.refine_permitted_params res\n end",
"def permitters\n @_parametrizr_permitters || {}\n end",
"def permitted_update_params\n fail NotImplementedError\n end",
"def restricted_params\n #params.require(self.controller_name.classify.underscore.to_sym).permit([])\n raise(\"No strong params set, override restricted_params method in your controller. E.g. params.require(:model).permit(:attribute1, :attribute2)\")\n end",
"def permitted?; end",
"def permitted_params\n if is_singleton?\n singleton_permitted_params\n else\n params.require(:data).permit(allowed_resource_params.to_a)\n end\n end",
"def permit(type,options={})\n raise NameError.new(\"duplicate ability definition\") if @ability.key? type\n ability_object = GraphQL::Authorization::AbilityType.new(type,nil,{})\n if options.key?(:except) && options.key?(:only)\n raise ArgumentError.new(\"you cannot specify white list and black list\")\n end\n if options[:except]\n ability_object.access(type.fields.keys.map(&:to_sym) - options[:except])\n elsif options[:only]\n ability_object.access(options[:only])\n end\n ability_object.execute options[:execute]\n if block_given?\n #note Proc.new creates a proc with the block given to the method\n ability_object.instance_eval(&Proc.new)\n end\n @ability[type] = ability_object\n end",
"def set_permit\n @vehiclepermit = Permit.find(params[:id])\n authorize @vehiclepermit\n end",
"def permit_attributes\n params.require(resource_as_param_key).permit(*permitted_attributes)\n end",
"def set_permit\n @permit = Permit.find(params[:id])\n end",
"def permitted_params\n \t@permitted_params ||= PermittedParams.new(params, current_user)\n end",
"def permitir_parametros\n \t\tparams.permit!\n \tend",
"def request_permitted?(item)\n true\n end",
"def set_permit\n @permit = Permit.find(params[:id])\n end",
"def permitted\n {attrib_name => spec.permitted}\n end",
"def create\n\n vehicle = Vehicle.find_by(license_number: permit_params[:vehicle_attributes][:license_number])\n if current_user.faculty?\n @vehiclepermit = current_user.vehiclepermit.build(permit_params.merge(date_entered: Date.today, \n entered_by: current_user.faculty.first_name + \" \" + current_user.faculty.last_name))\n @vehiclepermit.update(vehicle: vehicle)\n elsif current_user.student?\n @vehiclepermit = current_user.vehiclepermit.build(permit_params.merge(date_entered: Date.today,\n entered_by: current_user.student.first_name + \" \" + current_user.student.last_name))\n @vehiclepermit.update(vehicle: vehicle)\n end\n authorize @permit\n\n respond_to do |format|\n if @vehiclepermit.save\n format.html { redirect_to @vehiclepermit, notice: 'Permit was successfully created.' }\n format.json { render :show, status: :created, location: @vehiclepermit }\n else\n format.html { render :new }\n format.json { render json: @vehiclepermit.errors, status: :unprocessable_entity }\n end\n end\n end",
"def analise_privacidade_params\n #params.require(:analise_privacidade).permit(:rede_social, :url_rede_social, :descricao_analise, tipo_coumunicacoes_attributes: [:id, :tipo_comunicacao, :observacao])\n \n \n params.require(:analise_privacidade).permit!\n \n \n \n \n \n end",
"def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end",
"def user_params\n params.require(:user).permit(policy(@user || User).permitted_attributes)\n end",
"def user_params\n params.require(:user).permit(policy(@user || User).permitted_attributes)\n end",
"def formulary_params\n allow = [:responsable_llenado,:cod01,:cod02,:ape01,:ape04,:ape07,:ape02,:ape05,:ape03,:ape06,:api01,:api04,:api02,:ssb01,:api03,:cao01,:cao04,:cao07,:cao10,:tit01,:cao02,:cao05,:cao08,:cao11,:cao03,:cao06,:cao09,:cao12,:uni01,:uni02,:uni03,:ben01,:ben02,:per01,:per02,:user_id]\n params.require(:formulary).permit(allow)\n end",
"def permitted_params\n declared(params, include_missing: false)\n end",
"def permitted_params\n declared(params, include_missing: false)\n end",
"def permitted_resource_params\n params[resource.object_name].present? ? params.require(resource.object_name).permit! : ActionController::Parameters.new\n end",
"def permitted_params\n\n \n if action_name.to_s == \"update\" && !current_signed_in_resource.is_admin?\n\n \n params.permit({cart_item: [:discount_code,:quantity]},:id)\n\n elsif action_name.to_s == \"create_multiple\"\n params.permit({discount: [:id, {:product_ids => []}]})\n else\n\n params.permit({cart_item: [:product_id,:discount_code,:quantity]},:id)\n\n end\n\n\n end",
"def permitted_params\n @permitted_params ||= PermittedParams.new(params, current_user)\n end",
"def permitted_params(action, kind=nil)\n params.require(model_name).permit!\n end",
"def sanitize_parameters!(sanitizer, params)\n # replace :readwrite with :onlyif\n if params.has_key?(:readwrite)\n warn \":readwrite is deprecated. Replacing with :onlyif\"\n params[:onlyif] = params.delete(:readwrite)\n end\n\n # add default parameters\n bindata_default_parameters.each do |k,v|\n params[k] = v unless params.has_key?(k)\n end\n\n # ensure mandatory parameters exist\n bindata_mandatory_parameters.each do |prm|\n if not params.has_key?(prm)\n raise ArgumentError, \"parameter ':#{prm}' must be specified \" +\n \"in #{self}\"\n end\n end\n\n # ensure mutual exclusion\n bindata_mutually_exclusive_parameters.each do |param1, param2|\n if params.has_key?(param1) and params.has_key?(param2)\n raise ArgumentError, \"params #{param1} and #{param2} \" +\n \"are mutually exclusive\"\n end\n end\n end",
"def strong_params\n params.require(:team_member).permit(param_whitelist)\n end",
"def param_whitelist\n whitelist = [\n :username, :name,\n :parent_id,\n :headline, :description, :video,\n :policy, :signup_mode, :category,\n :website, :facebook, :twitter, :linkedin,\n :founded_at,\n privacy: [\n :events,\n :resources\n ],\n permission: [\n :profile,\n :members,\n :children,\n :statistics,\n :posts,\n :listings,\n :resources,\n :events\n ],\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n \n if action_name === 'update'\n whitelist.delete(:parent_id)\n unless current_user.role_in(@community) === 'owner'\n whitelist.delete(:privacy)\n whitelist.delete(:permission)\n end\n end\n \n whitelist\n end",
"def grant_params\n @whitelisted = params.require(:grant).permit(:name, :description, :agency_id, :acronym)\n end",
"def form_params\n params.require(:funding_request).permit(FundingRequest.allowable_params)\n end",
"def expected_permitted_parameter_names; end",
"def permission_policy_params\n params.require(:permission_policy).permit(:name, :io1, :io2, :io3, :io4)\n end",
"def resource_params\n params[resource_singular_name].try(:permit, self.class.param_whitelist)\n end",
"def access_control_params\n params.require(:access_control).permit(:uuid, :role_id, :ability_to_create_stream, :ability_to_create_discussion, :ability_to_comment, :ability_to_create_question, :ability_to_create_answer, :ability_to_administrate)\n end",
"def params_not_permitted\n logger.warn('exception: params not permitted')\n render plain: \"403 ForbiddEn\", status: 403\n end",
"def borrowership_params\n params\n .require(:borrowership)\n .permit(*policy(@borrowership || Borrowership.new).permitted_attributes)\n end",
"def permit( params, whitelist, name = nil )\n raise 'Parametrization not yet configured' unless @configured\n whitelist ||= []\n px = params.respond_to?( :permit ) ? params : ActionController::Parameters.new( params )\n px = dig(px, name)\n px.permit( *whitelist )\n end",
"def allowed_attributes=(_arg0); end",
"def allowed_attributes=(_arg0); end",
"def allow_params(action, keys: nil, except: nil, &blk)\n keys &&= Array.wrap(keys)\n keys ||= User.field_names\n except &&= Array.wrap(except)\n except ||= %i[id email]\n devise_parameter_sanitizer.permit(action, keys: keys, except: except, &blk)\n end",
"def unpermitted_parameters\n fail 'Define me!'\n end",
"def allowed_params\n ALLOWED_PARAMS\n end",
"def user_params\n params.require(:user).permit(*policy(@user || User).permitted_attributes)\n end",
"def strong_params\n params.require(:experience).permit(param_whitelist)\n end",
"def user_params\n params.require(:user).permit(current_ability.permitted_attributes(:manage, @user))\n end",
"def vip_privilege_params\n params[:vip_privilege].permit!\n end",
"def sanitize_params_for user, params, allowed_params\n params.each do |key, val|\n #if allowed_params.include?(key)\n #sanitize!(user, params, key) if key =~ /_attributes|_ids$/\n #else\n #params.delete(key)\n #end\n params.delete(key) unless allowed_params.include?(key.to_sym)\n end\n end",
"def available_activity_params\n # params.require(:available_activity).permit(:type,:geometry,:properties)\n whitelisted = ActionController::Parameters.new({\n type: params.require(:available_activity)[:type],\n geometry: params.require(:available_activity)[:geometry].try(:permit!).to_h,\n properties: params.require(:available_activity)[:properties].try(:permit!).to_h\n }).try(:permit!)\n end",
"def is_permitted_for?( user )\n ( user.id == self.user.id ) or ( user.privileged? )\n end",
"def specialty_params\n\t\tparams.require(:specialty).permit(*Specialty::DEFAULT_ACCESSIBLE_ATTRIBUTES)\n\tend",
"def user_params\n params.permit(User::UPDATABLE_ATTRIBUTES)\n end",
"def permitted_params_from_policy(object_or_class, key)\n _params = permitted_params[key]\n _attributes = policy(object_or_class).permitted_attributes\n ::ActionController::Parameters.new(_params).permit(*_attributes)\n end",
"def param_whitelist\n whitelist = [\n :description,\n :progress,\n :kpi_id\n ]\n \n unless action_name === 'create'\n whitelist.delete(:kpi_id)\n end\n \n whitelist\n end",
"def users_params\n\t\tparams.require(:user).permit(User::PERMIT_ATTRIBUTES)\n\tend",
"def tam_policy_params\n params.require(:tam_policy).permit(TamPolicy.allowable_params)\n end",
"def resource_filter_permitted_params\n raise(NotImplementedError, 'resource_filter_permitted_params method not implemented')\n end",
"def permit(*keys)\n select { |key, _| keys.include?(key) }\n end",
"def post_card_params\n params[:post_card].permit!\n end",
"def secure_params(require_param, permit_keys)\n params.require(require_param).permit(*permit_keys)\n end",
"def create_permitted?\n acting_user.administrator?\n end",
"def create_permitted?\n acting_user.administrator?\n end",
"def create_permitted?\n acting_user.administrator?\n end",
"def create_permitted?\n acting_user.administrator?\n end",
"def privilege_params\n params.require(:privilege).permit(:qDrive, :addSong, :editSong, :deleteSong, :grantPermission, :addUser, :editUser, :deleteUser)\n end",
"def permit_params_on_create *keys\n filter_strong_params :permit, [:create], keys\n end",
"def permitted=(_arg0); end",
"def user_params\n allowed_params = [:username, :email, :jabber_id, :jabber_otr_fingerprint, :avatar]\n allowed_params << [:password, :password_confirmation] unless params[:user][:password].blank?\n allowed_params << [:role] if current_user.moderator_or_admin?\n allowed_params << [:tenant_ids => []] if current_user.admin?\n allowed_params << [:user_ids => []] if current_user.moderator_or_admin?\n params.require(:user).permit(allowed_params)\n end",
"def safe_params\n safe_attributes = %i[name key]\n params.require(:role).permit(safe_attributes)\n end",
"def param_whitelist\n [:role, :title]\n end",
"def allow_params_authentication!; end",
"def defect_params\n params.require(:defect).permit(Defect.allowable_params)\n end",
"def secure_params\n return @secure_params if @secure_params\n\n @implementation_class = implementation_class\n resname = @implementation_class.name.ns_underscore.gsub('__', '_').singularize.to_sym\n @secure_params = params.require(resname).permit(*permitted_params)\n end",
"def object_params\n params.require(resource.name.underscore.to_sym)\n .permit(resource_params)\n end",
"def resource_params\n # TODO DANGER!\n params.require(@resource_class.name.underscore.to_sym).permit!\n end",
"def resource_params\n deserialized_params.permit!\n end",
"def sanitize_params\n if valid_lease?\n sanitize_lease_params\n elsif valid_embargo?\n sanitize_embargo_params\n elsif !wants_lease? && !wants_embargo?\n sanitize_unrestricted_params\n else\n @attributes\n end\n end",
"def update_params\n params.require(:permission_template)\n .permit(:release_date, :release_period, :release_varies, :release_embargo,\n :visibility, :workflow_id, :metadata_context_id,\n access_grants_attributes: %i[access agent_id agent_type id])\n end",
"def resource_params\n params.require(resource_name).permit(*permitted_params)\n end",
"def permition_params\n params.require(:permition).permit(:act, :information_system_id, :parameter)\n end",
"def cancan_parameter_sanitizer\n resource = controller_name.singularize.to_sym\n method = \"#{resource}_params\"\n params[resource] &&= send(method) if respond_to?(method, true)\n end",
"def resource_params\n permition = @klazz.attribute_names - [:created_at, :updated_at]\n @metadata.items.each do |entity|\n permition << {\"many_#{entity.name}_attributes\".to_sym =>\n [:id] + entity.many_field.map{|field| field.name.to_sym} - [:created_at, :updated_at]}\n end\n params.require(@resource_sym).permit(*permition)\n end",
"def update_permitted?\n\t\tacting_user.administrator?\n\tend",
"def secure_params\n return @secure_params if @secure_params\n\n defn = implementation_class.definition\n field_list = [:master_id] + defn.field_list_array\n\n res = params.require(controller_name.singularize.to_sym).permit(field_list)\n res[implementation_class.external_id_attribute.to_sym] = nil if implementation_class.allow_to_generate_ids?\n @secure_params = res\n end",
"def allowed?\n raise NotImplementedError, 'please implement #allowed? '\\\n \"for #{self.class.name} which should decide if the action is allowed, \"\\\n 'based on the given attributes'\n end",
"def permit?(action)\n case action\n # -- list\n when :list\n permit?(:list_cases)\n\n # -- create\n when :create\n source? && @settings.working_hours?\n when :create_assignment\n agent? || enroller? || governor?\n when :create_note\n agent? || enroller?\n\n # -- edit\n when :edit\n agent? || governor? || enroller?\n when :edit_address\n agent? || source?\n when :edit_contact\n agent? || source?\n when :edit_address_geography\n source?\n when :edit_household\n agent? || governor? || permit?(:edit_household_source)\n when :edit_household_source\n permit?(:edit_household_ownership) || permit?(:edit_household_proof_of_income)\n when :edit_household_size\n agent? || governor?\n when :edit_household_ownership\n (agent? || source?) && requirement?(R::HouseholdOwnership)\n when :edit_household_proof_of_income\n (agent? || source?) && !requirement?(R::HouseholdProofOfIncomeDhs)\n when :edit_household_dhs_number\n (agent? || governor?) && proof_of_income?(P::Dhs)\n when :edit_household_size\n agent? || governor?\n when :edit_household_income\n (agent? || governor?) && proof_of_income?(P::Dhs)\n when :edit_supplier_account\n (agent? || source?) && requirement?(R::SupplierAccountPresent)\n when :edit_supplier\n agent? || (source? && !supplier?)\n when :edit_supplier_account_active_service\n agent? && requirement?(R::SupplierAccountActiveService)\n when :edit_food\n (source? || agent?) && requirement?(R::FoodDietaryRestrictions)\n when :edit_benefit\n agent? || enroller?\n when :edit_benefit_amount\n (agent? || enroller?)\n when :edit_benefit_contract\n (agent?) && requirement?(R::ContractPresent)\n when :edit_documents\n agent?\n when :edit_admin\n agent?\n\n # -- view\n when :view\n agent? || source? || enroller?\n when :view_details\n permit?(:view)\n when :view_details_status\n agent? || enroller?\n when :view_details_enroller\n agent?\n when :view_supplier_account\n permit?(:view) && requirement?(R::SupplierAccountPresent)\n when :view_food\n permit?(:view) && requirement?(R::FoodDietaryRestrictions)\n when :view_household_size\n (agent? || enroller?)\n when :view_household_ownership\n permit?(:view) && requirement?(R::HouseholdOwnership)\n when :view_household_proof_of_income\n (agent? || enroller?) && !requirement?(R::HouseholdProofOfIncomeDhs)\n when :view_household_dhs_number\n (agent? || enroller?) && proof_of_income?(P::Dhs)\n when :view_household_income\n (agent? || enroller?) && proof_of_income?(P::Dhs)\n when :view_supplier_account_active_service\n (agent? || enroller?) && requirement?(R::SupplierAccountActiveService)\n\n # -- actions\n when :convert\n agent?\n when :referral\n agent?\n when :complete\n agent? || enroller?\n\n # -- destroy\n when :destroy\n agent?\n when :destroy_assignment\n agent?\n\n # -- archive\n when :archive\n agent?\n else\n super\n end\n end",
"def ability_params\n params.require(:ability).permit(:child_id, :skill_id, :status)\n end",
"def permitUser\n @member_permitted_name=Member.where(:id=>params[:id]).first.first_name\n Member.update(params[:id], :permitted => 1)\n flash[:notice] = \"User #{@member_permitted_name} allowed to book multiple rooms\"\n redirect_to(:action => 'index' )\n end",
"def setting_attribute_is_allowed?(name, user)\n return false unless user.can_write?(self, name)\n (self.whitelisted_attributes && self.whitelisted_attributes.has_key?( name.to_sym)) ||\n (\n self.attribute_names.include?( name.to_s ) &&\n ( self.blacklisted_attributes.nil? ||\n ! self.blacklisted_attributes.has_key?( name.to_sym ) )\n )\n end",
"def permitted_params\n []\n end",
"def update_sanitized_params\n\t\t\tif \"#{resource_name}\" == \"lecturer\"\n\t\t\t\tdevise_parameter_sanitizer.for(:sign_up) {\n\t\t\t\t\t|lecturer| lecturer.permit(:name, :email,\n\t\t\t\t\t\t:password, :password_confirmation,\n\t\t\t\t\t\t:university, :department)\n\t\t\t\t}\n\t\t\t\tdevise_parameter_sanitizer.for(:account_update) {\n\t\t\t\t\t|lecturer| lecturer.permit(:name, :current_password,\n\t\t\t\t\t\t:password, :password_confirmation,\n\t\t\t\t\t\t:university, :department,\n\t\t\t\t\t\t:profile_image, :profile_image_cache)\n\t\t\t\t}\n\t\t\telsif \"#{resource_name}\" == \"student\"\n\t\t\t\tdevise_parameter_sanitizer.for(:sign_up) {\n\t\t\t\t\t|student| student.permit(:name, :email,\n\t\t\t\t\t\t:password, :password_confirmation,\n\t\t\t\t\t\t:university, :faculty, :major, :semester,\n\t\t\t\t\t\t:advising, :probation)\n\t\t\t\t}\n\t\t\t\tdevise_parameter_sanitizer.for(:account_update) {\n\t\t\t\t\t|student| student.permit(:name, :current_password,\n\t\t\t\t\t\t:password, :password_confirmation,\n\t\t\t\t\t\t:university, :faculty, :major, :semester,\n\t\t\t\t\t\t:advising, :probation, :profile_image,\n\t\t\t\t\t\t:profile_image_cache)\n\t\t\t\t}\n\t\t\telsif \"#{resource_name}\" == \"teaching_assistant\"\n\t\t\t\tdevise_parameter_sanitizer.for(:sign_up) {\n\t\t\t\t\t|teaching_assistant| teaching_assistant.permit(:name,\n\t\t\t\t\t\t:email, :password, :password_confirmation,\n\t\t\t\t\t\t:graduated_from, :graduated_year, :degree,\n\t\t\t\t\t\t:university, :department)\n\t\t\t\t}\n\t\t\t\tdevise_parameter_sanitizer.for(:account_update) {\n\t\t\t\t\t|teaching_assistant| teaching_assistant.permit(:name,\n\t\t\t\t\t\t:current_password, :password, :password_confirmation,\n\t\t\t\t\t\t:graduated_from, :graduated_year, :degree,\n\t\t\t\t\t\t:university, :department, :profile_image,\n\t\t\t\t\t\t:profile_image_cache)\n\t\t\t\t}\n\t\t\tend\n\t\tend",
"def build_permissions(perms, other)\n perms.permits! :read\n perms.permits! :write if self == other\n end"
] | [
"0.70205086",
"0.7011447",
"0.68427056",
"0.68110335",
"0.6692179",
"0.66879106",
"0.6682208",
"0.6668624",
"0.66344637",
"0.6618673",
"0.6616452",
"0.6605087",
"0.65903014",
"0.65752155",
"0.6571612",
"0.6531045",
"0.65260863",
"0.65229654",
"0.6518278",
"0.65089744",
"0.64706147",
"0.6470576",
"0.6454115",
"0.6430214",
"0.6426446",
"0.64191383",
"0.63888997",
"0.63888997",
"0.63697165",
"0.6360804",
"0.6360804",
"0.6354921",
"0.63510346",
"0.6350541",
"0.6341705",
"0.6334894",
"0.6327459",
"0.6313253",
"0.6304312",
"0.63021016",
"0.6297368",
"0.62823254",
"0.6274536",
"0.6270998",
"0.6268699",
"0.6238165",
"0.623423",
"0.623057",
"0.623057",
"0.6226853",
"0.6215247",
"0.62144506",
"0.61981136",
"0.61978525",
"0.61969733",
"0.61953515",
"0.61927164",
"0.6179996",
"0.6178944",
"0.6162146",
"0.61522263",
"0.6151823",
"0.61449987",
"0.6139863",
"0.61285406",
"0.61281145",
"0.6125872",
"0.6116935",
"0.6111487",
"0.6108517",
"0.6108517",
"0.6108517",
"0.6108517",
"0.6105689",
"0.6101821",
"0.6088204",
"0.6087979",
"0.60797924",
"0.60743076",
"0.6073551",
"0.60643774",
"0.6063267",
"0.6051014",
"0.60440737",
"0.6028787",
"0.6020116",
"0.60147816",
"0.60071504",
"0.59999204",
"0.5983723",
"0.5976133",
"0.59700525",
"0.59690267",
"0.596729",
"0.59671736",
"0.5965017",
"0.5960918",
"0.59579897",
"0.59556025",
"0.59549975",
"0.5952489"
] | 0.0 | -1 |
access the class methods (find or create in the module) | def initialize(path = "./db/mp3s") #Default argument for the ending of the file given in path.
@importer = MusicImporter.new(path).import
#Create new instance (.new) of the MusicIMporter object (instantated in the MusicLibraryController class). And then you can call that MusicImporter's own class methods on this object (.import)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def methods() end",
"def methods; end",
"def methods; end",
"def methods; end",
"def methods; end",
"def method_missing(name)\n name = name.to_s \n \n # Class name\n class_name = \"_\" << name\n class_name.gsub!(self.class::CLASS_NAME_GENERATOR) { |s| s[1].chr.upcase }\n\n # Module name\n module_name = @module.name + \"::\" + class_name\n \n # File path\n file_path = \"x\" << module_name\n file_path.gsub!(self.class::FILE_NAME_GENERATOR) { |s| s[0].chr << \"-\" << s[1].chr }\n file_path.replace(file_path[2..-1])\n file_path.gsub!(\"::\", \"/\")\n file_path.downcase!\n \n if not @@files.has_key? file_path\n require file_path\n @@files[file_path] = true\n end\n \n return __get_module(module_name)\n end",
"def instance_methods; end",
"def class_methods\n @cache[:class_methods]\n end",
"def finder_methods; end",
"def api\n methods - Object.public_methods\n end",
"def finder_methods=(_arg0); end",
"def internal_methods; end",
"def rest_class_methods\n @rest_class_methods ||= {}\n end",
"def method_module\n home.method_module\n end",
"def classes; end",
"def api_methods\n self.class.instance_methods(false)\n end",
"def api_methods\n self.class.instance_methods(false)\n end",
"def reflection; end",
"def reflection; end",
"def methods(class_name)\n @methods[class_name] ||= []\n end",
"def define_reflection_methods\n\n # *_class_name, *_class, *_table_name methods for all classes\n @config.classes.to_h.each do |class_type,class_name|\n class_type_name = class_type.to_s.gsub(/_class$/,'').singularize\n class_eval do\n \n # def CLASS_TYPE_class_name\n define_method \"#{class_type_name}_class_name\" do\n if @config.send(class_type).is_a?(Class)\n @config.send(class_type).name\n else\n @config.send(class_type).to_s.camelize\n end\n end\n alias_method \"#{class_type_name.pluralize}_class_name\", \"#{class_type_name}_class_name\"\n \n # def CLASS_TYPE_class\n define_method \"#{class_type_name}_class\" do\n \"::#{send(\"#{class_type_name}_class_name\")}\".constantize\n end\n alias_method \"#{class_type_name.pluralize}_class\", \"#{class_type_name}_class\"\n\n # def CLASS_TYPE_table_name\n define_method \"#{class_type_name}_table_name\" do\n send(\"#{class_type_name}_class\").table_name\n end\n alias_method \"#{class_type_name.pluralize}_table_name\", \"#{class_type_name}_table_name\"\n\n # def CLASS_TYPE_singular_key (used primarily for associations)\n define_method \"#{class_type_name}_singular_key\" do\n send(\"#{class_type_name}_class_name\").underscore.split(\"/\").last.singularize.to_sym\n end\n alias_method \"#{class_type_name.pluralize}_singular_key\", \"#{class_type_name}_singular_key\"\n\n # def CLASS_TYPE_plural_key (use primarily for associations)\n define_method \"#{class_type_name}_plural_key\" do\n send(\"#{class_type_name}_class_name\").underscore.split(\"/\").last.pluralize.to_sym\n end\n alias_method \"#{class_type_name.pluralize}_plural_key\", \"#{class_type_name}_plural_key\"\n \n # These define aliases for custom class names, like user_class and user_table_name aliased to subject_class and subject_table_name\n unless class_type.to_s.underscore == \"#{class_name.to_s.underscore}_class\"\n %w(_class_name _class _table_name _singular_key _plural_key).each do |suffix|\n alias_method \"#{class_name.to_s.underscore.singularize}#{suffix}\", \"#{class_type_name}#{suffix}\"\n alias_method \"#{class_name.to_s.underscore.pluralize}#{suffix}\", \"#{class_name.to_s.underscore.singularize}#{suffix}\"\n end\n end\n \n end\n end\n\n # *_foreign_key method for primary classes\n @config.primary_classes.to_h.each do |class_type,class_name|\n class_type_name = class_type.to_s.gsub(/_class$/,'').singularize\n class_eval do\n # def CLASS_TYPE_foreign_key\n define_method \"#{class_type_name}_foreign_key\" do\n # This is hideous, but we need some sort of fallback for cases like Rails 4 Heroku deploys where the environment and\n # database are not available.\n begin\n \"#{send(\"#{class_type_name}_table_name\").singularize}_#{send(\"#{class_type_name}_class\").primary_key}\"\n rescue\n \"#{send(\"#{class_type_name}_table_name\").singularize}_id\"\n end\n end\n alias_method \"#{class_type.to_s.gsub(/_class$/,\"\").pluralize}_foreign_key\", \"#{class_type.to_s.gsub(/_class$/,\"\").singularize}_foreign_key\"\n \n unless class_type.to_s.underscore == \"#{class_name.to_s.underscore}_class\"\n alias_method \"#{class_name.to_s.underscore.singularize}_foreign_key\", \"#{class_type.to_s.gsub(/_class$/,\"\").singularize}_foreign_key\" # CLASS_NAME_foreign_key\n alias_method \"#{class_name.to_s.underscore.pluralize}_foreign_key\", \"#{class_name.to_s.underscore.singularize}_foreign_key\"\n end\n end\n end\n end",
"def class_method2\n end",
"def lookup_classes(met)\n new_klasses = @module_collection.keys\n res = Hash.new { |h, k| h[k] = [] }\n @method_collection.list.select { |method_info| method_info.name == met.to_sym }.map do |method_info|\n m_owner = method_info.owner\n # add method_info myself to res\n res[m_owner] << MethodStat.new(method_info, ModuleInfo.root(m_owner), 0)\n\n owner_module_info = find_module_info(method_info)\n new_klasses.each do |klass|\n next if klass == method_info.owner\n if (idx = klass.ancestors.index(method_info.owner))\n raise ModuleNotFoundError if owner_module_info.nil?\n res[klass] << MethodStat.new(method_info, owner_module_info, idx - self.class.offset(klass))\n end\n end\n end\n res\n end",
"def classes\n\t\traise \"classes: Not Implemented\"\n\tend",
"def class() end",
"def interesting_methods\n em = extension_modules\n methods-[em.last ? em.last.methods : nil]-self.class.instance_methods\n end",
"def acts_as_msfte\n extend ClassMethods\n end",
"def add_doc_helper_methods_to(a_module)\n a_module.instance_eval do\n\n # Implement access to the model id\n define_method :id do\n return @id unless @d.nil?\n # retrieve the class and id from data\n klass_name, id = data.split(\"-\")\n @id = id.to_i\n end\n\n # Implement access to the indexed object\n define_method :indexed_object do\n return @indexed_object unless @indexed_object.nil?\n # retrieve the class and id from data\n klass_name, id = data.split(\"-\")\n klass = Kernel.const_get(klass_name)\n @indexed_object = klass.find(id.to_i)\n end\n\n end\n\n end",
"def method_missing(meth, *args)\n begin\n raise \"method_missing is recursing\" if @mm_locked\n @mm_locked = true\n return if not class_method_missing_hook(meth, *args)\n\n if args[-1].kind_of? Hash\n mod = args[-1][:from]\n end\n\n structure_field_def_hook args\n # XXX no good hook for this\n mod ||= derive_search_module\n\n begin\n klass = mod.const_get(meth.to_s.class_name)\n rescue\n raise \"can't find \\\"#{ meth.to_s.class_name }\\\" in the default module\"\n end\n\n add(klass, *args)\n rescue => e\n raise \"you called \\\"#{ meth.to_s }\\\" on a #{ self.to_s }, and we don't know how to handle that\"\n ensure\n @mm_locked = false\n end\n end",
"def class_methods\n all_methods().find_all{|m| m.singleton && (@options.show_all || m.visibility == :public || m.visibility == :protected)}.collect{|m| method_hash(m)}\n end",
"def methods\n return @methods if defined?(@methods)\n @methods = contents_of_type(Entities::InstanceMethod)\n @methods << contents_of_type(Entities::ClassMethod)\n @methods << contents_of_type(Entities::SingletonMethod)\n @methods.flatten!\n end",
"def methods\n @methods ||= {}\n end",
"def methods\n return @methods\n end",
"def dsl_methods\n (Chef::Node.public_instance_methods +\n Chef::Mixin::RecipeDefinitionDSLCore.included_modules.map{|mixin| mixin.public_instance_methods}).flatten.sort.uniq\n end",
"def public_class_method(*rest) end",
"def promote_page_object_methods\n ::Pages.constants.each do |class_name|\n Kernel.send(:define_method, class_name.to_s.downcase) do\n Pages.const_get(class_name)\n end\n end\nend",
"def get_methods(mod)\n methods = []\n mod.constants.sort.each do |c|\n mod.const_get(c).singleton_methods.sort.each do |m|\n methods << \"#{c}::#{m}\"\n end\n end\n methods\nend",
"def all_methods\n self.all_classes_and_modules.map do |klassmod|\n klassmod.own_methods.as_array\n end.flatten\n end",
"def methods=(_arg0); end",
"def show_methods(klass)\n \t\tputs Object.const_get(klass).methods.inspect\n\tend",
"def modules; end",
"def modules; end",
"def modules; end",
"def method_of_instance; end",
"def method_of_instance; end",
"def method_of_instance; end",
"def method_of_instance; end",
"def class_method2\nend",
"def singleton_methods; end",
"def reflector; end",
"def reflector; end",
"def accessors\n self.class.accessors\n end",
"def internal_methods(controller)\n controller = controller.superclass until controller.abstract?\n controller.public_instance_methods(true)\n end",
"def find_modules\n find_engine\n find_storage\n find_pod\n end",
"def startMethods()\n @orderMethods = OrderTree.new(@root) ##Metodos de recorridos\n @addMethods = AddTree.new(@root,@compare) ##Metodos de agregado\n @searchMethods = SearchTree.new(@root,@compare) ## Metodos de busqueda en arbol\n @removeMethods = RemoveTree.new(@root,@compare) ##Metodos para remover elementos\n @drawMethods = DrawTree.new(@root,@compare)\n end",
"def classes_and_modules\n classes + modules\n end",
"def classes_and_modules\n classes + modules\n end",
"def all_get_methods\n instance_methods.grep /^get_/\n end",
"def method_missing(method)\n\t\t self[method]\n\t\tend",
"def create_methods!\n return unless type == :normal\n\n fn = name\n dmm = session_class._dynamic_methods_module\n mn = name.to_s.downcase\n\n dmm.define_method(mn) do\n self[fn]\n end\n\n dmm.define_method(\"#{mn}=\") do |new_value|\n self[fn] = new_value\n end\n\n if visibility == :private\n dmm.send(:private, mn, \"#{mn}=\".to_sym)\n end\n end",
"def runnable_methods; end",
"def runnable_methods; end",
"def classes\n [self]\n end",
"def all_rb_methods\n self.all_classes_and_modules.flat_map do |klassmod|\n klassmod.select_rb_methods\n end\n end",
"def instance_methods(include_super=true) end",
"def instance_modules(*mods)\n @instance_modules ||= [ \n Command::InstanceMethods, \n Command::Options::InstanceMethods\n ]\n @instance_modules += mods\n end",
"def internal_methods\n controller = self\n\n controller = controller.superclass until controller.abstract?\n controller.public_instance_methods(true)\n end",
"def create_methods_from_instance(instance)\n\t instance.public_methods(false).each do |method_name|\n\t add_method(instance, method_name)\n\t end\n\t end",
"def simple_classes\n _simple_classes\n end",
"def add_to_classes_or_modules mod\n @classes_or_modules << mod\n end",
"def extract\n raise NoMethodError, \"#{__method__} not defined for#{self.class.name}\"\n end",
"def getters; end",
"def find_method method_name, klass\n return nil if sexp? method_name\n method_name = method_name.to_sym\n\n if method = @method_cache[method_name]\n return method\n end\n\n controller = @tracker.controllers[klass]\n controller ||= @tracker.libs[klass]\n\n if klass and controller\n method = controller[:public][method_name]\n method ||= controller[:private][method_name]\n method ||= controller[:protected][method_name]\n\n if method.nil?\n controller[:includes].each do |included|\n method = find_method method_name, included\n if method\n @method_cache[method_name] = method\n return method\n end\n end\n\n @method_cache[method_name] = find_method method_name, controller[:parent]\n else\n @method_cache[method_name] = { :controller => controller[:name], :method => method[:src] }\n end\n else\n nil\n end\n end",
"def class; end",
"def class; end",
"def class_modules(*mods)\n @class_modules ||= [ \n Command::ClassMethods,\n Command::Options::ClassMethods,\n ]\n @class_modules += mods\n end",
"def class_variables() end",
"def all_c_methods\n self.all_classes_and_modules.flat_map do |klassmod|\n klassmod.select_c_methods\n end\n end",
"def method_missing(method_name, *args)\n\t \tif public_instance_methods.include? method_name\n\t \t\tnew.send(method_name, *args)\n\t \telse\n\t \t\tsuper\n\t \tend\n\t end",
"def intersys_methods\n @methods ||= intersys_reflector._methods.to_a\n end",
"def method_missing(method, *args, &block)\n if name?(method.to_sym)\n find(method.to_sym)\n else\n super\n end\n end",
"def get_module()\n raise NoMethodError, 'This method needs to be overridden'\n end",
"def defined_methods\n # TODO: check content type before scanning\n content.scan(/\\s*def\\s+([A-Za-z0-9_\\.]*)/).flatten\n end",
"def define_missing_methods(klass, hash)\n methods = find_methods(hash)\n klass.include(Module.new do\n instance_exec do\n methods.each do |method|\n define_method method do\n if (object = instance_variable_get('@object'))\n object.public_send(method)\n end\n end\n end\n end\n end)\n end",
"def faker_methods(mod)\n methods = mod.methods - Module.methods - UTILS_METHODS\n\n # For Company.name (et al), don't discard :name if it was reimplemented\n methods << :name if mod.send(:name) != mod.to_s\n methods\nend",
"def index_methods\n debug_msg \" generating method search index\"\n\n list = @classes.uniq.map do |klass|\n klass.method_list\n end.flatten.sort_by do |method|\n [method.name, method.parent.full_name]\n end\n\n list.each do |method|\n debug_msg \" #{method.full_name}\"\n record = method.search_record\n @index[:searchIndex] << \"#{search_string record.shift}()\"\n @index[:longSearchIndex] << \"#{search_string record.shift}()\"\n @index[:info] << record\n end\n end",
"def instance_methods\n @cache[:instance_methods]\n end",
"def helpers\r\n Helper.instance\r\n end",
"def create_method( class_name , method_name , args = {})\n raise \"create_method #{class_name}.#{class_name.class}\" unless class_name.is_a? Symbol\n clazz = Register.machine.space.get_class_by_name class_name\n raise \"No such class #{class_name}\" unless clazz\n create_method_for( clazz , method_name , args)\n end",
"def prerecord(klass, name); end",
"def exposed_methods\n []\n end",
"def exposed_methods\n []\n end",
"def register_methods\n types.each do |type|\n self.class.send(:define_method, \"find_#{type}\".to_sym) do |*args|\n find(type, *args)\n end\n end\n end",
"def public_instance_methods(include_super=true) end",
"def modular_class_name\n @modular_class_name\n end",
"def display_class_info\n end",
"def commands\n self.class.commands\n end",
"def method; end",
"def method; end",
"def method; end",
"def method; end"
] | [
"0.70421654",
"0.6772794",
"0.6772794",
"0.6772794",
"0.6772794",
"0.6566029",
"0.6402716",
"0.6299233",
"0.62875634",
"0.6251316",
"0.6211665",
"0.6193143",
"0.6191185",
"0.61554223",
"0.6145698",
"0.61243916",
"0.61243916",
"0.6122232",
"0.6122232",
"0.6111341",
"0.6096861",
"0.6089882",
"0.6048968",
"0.6029811",
"0.60044956",
"0.5990684",
"0.5963973",
"0.5932902",
"0.59087825",
"0.5889646",
"0.5876334",
"0.5850775",
"0.58474654",
"0.5840055",
"0.58377093",
"0.58304673",
"0.5826897",
"0.5819612",
"0.5807073",
"0.58070207",
"0.57753307",
"0.57753307",
"0.57753307",
"0.5766233",
"0.5766233",
"0.5766233",
"0.5766233",
"0.5758557",
"0.5752691",
"0.5751027",
"0.5751027",
"0.57405186",
"0.5737655",
"0.57181275",
"0.5706023",
"0.5702262",
"0.5702262",
"0.5701951",
"0.56949955",
"0.56921357",
"0.5677101",
"0.5677101",
"0.567418",
"0.5672534",
"0.5666334",
"0.566323",
"0.5658084",
"0.56557566",
"0.565536",
"0.5655044",
"0.5644329",
"0.56410366",
"0.5638085",
"0.5635434",
"0.5635434",
"0.56303394",
"0.5627101",
"0.56222564",
"0.56136",
"0.5610714",
"0.560575",
"0.5599901",
"0.5589922",
"0.5586688",
"0.5563899",
"0.55626005",
"0.55615145",
"0.5558954",
"0.5542494",
"0.5541638",
"0.554059",
"0.554059",
"0.553739",
"0.55317587",
"0.55244005",
"0.55225986",
"0.55071807",
"0.55044496",
"0.55044496",
"0.55044496",
"0.55044496"
] | 0.0 | -1 |
Update given spec with urls It is expected identified security scheme to be oauth2 type | def set_oauth2_urls(spec, sec_scheme_id, authorization_url, token_url)
sec_scheme_obj = spec.dig('securityDefinitions', sec_scheme_id)
if sec_scheme_obj.nil? || sec_scheme_obj['type'] != 'oauth2'
raise ThreeScaleToolbox::Error, "Expected security scheme {#{sec_scheme_id}} not found or not oauth2"
end
sec_scheme_obj['authorizationUrl'] = authorization_url if %w[implicit accessCode].include?(sec_scheme_obj['flow'])
sec_scheme_obj['tokenUrl'] = token_url if %w[password application accessCode].include?(sec_scheme_obj['flow'])
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_oauth2_urls(spec, sec_scheme_id, authorization_url, token_url)\n sec_scheme_obj = spec.dig('components', 'securitySchemes', sec_scheme_id)\n if sec_scheme_obj.nil? || sec_scheme_obj['type'] != 'oauth2'\n raise ThreeScaleToolbox::Error, \"Expected security scheme {#{sec_scheme_id}} not found or not oauth2\"\n end\n\n sec_scheme_obj['flows'].each do |flow_key, flow_obj|\n flow_obj['authorizationUrl'] = authorization_url if %w[implicit authorizationCode].include?(flow_key)\n flow_obj['tokenUrl'] = token_url if %w[password clientCredentials authorizationCode].include?(flow_key)\n end\n end",
"def update!(**args)\n @access_uris = args[:access_uris] if args.key?(:access_uris)\n end",
"def update!(**args)\n @scheme = args[:scheme] if args.key?(:scheme)\n end",
"def update!(**args)\n @private_do_not_access_or_else_trusted_resource_url_wrapped_value = args[:private_do_not_access_or_else_trusted_resource_url_wrapped_value] if args.key?(:private_do_not_access_or_else_trusted_resource_url_wrapped_value)\n end",
"def doc_auth_oauth2(name, flows)\n add_auth_method name,{\n type: 'oauth2',\n flows: flows\n }\n end",
"def configure_oauth!(config)\n [\n { backend: :google_oauth2, id: \"id\", secret: \"secret\" },\n { backend: :open_id },\n { backend: :openid_connect },\n { backend: :github, id: \"client_id\", secret: \"client_secret\" },\n { backend: :gitlab, id: \"application_id\", secret: \"secret\" },\n { backend: :bitbucket, id: \"key\", secret: \"secret\" }\n ].each do |b|\n if b[:id]\n id = APP_CONFIG[\"oauth\"][b[:backend].to_s][b[:id]]\n secret = APP_CONFIG[\"oauth\"][b[:backend].to_s][b[:secret]]\n else\n id = nil\n secret = nil\n end\n\n configure_backend!(config, b[:backend], id, secret)\n end\nend",
"def with_uri_credentials(uri); end",
"def update!(**args)\n @authentication_url = args[:authentication_url] if args.key?(:authentication_url)\n @type = args[:type] if args.key?(:type)\n end",
"def update!(**args)\n @uris = args[:uris] if args.key?(:uris)\n end",
"def update!(**args)\n @uris = args[:uris] if args.key?(:uris)\n end",
"def scheme(new_scheme)\n allow_list = %w[ftp http rtmp rtsp https gopher mailto news nntp irc smb prospero telnet\n wais xmpp file data tel afs cid mid mailserver nfs tn3270 z39 skype smsto\n ed2k market steam bitcoin ob tg]\n unless allow_list.include?(new_scheme)\n raise Urb::InvalidUrl\n end\n\n @scheme = new_scheme\n\n self\n end",
"def patch_url_from_field(syms = [])\n notify \"URL replace, old : #{@url}\"\n syms.each do |sym|\n pattern = sym.id2name\n if @url =~ /#{pattern}/\n @url.gsub!(%r{#{pattern}=([^&]*)},\"#{pattern}=\" + @fields[sym])\n else\n @url += \"&#{pattern}=#{@fields[sym]}\"\n end\n end\n notify \"URL replace result : #{@url}\"\n end",
"def patch_with_app(url, payload = '')\n github_api_conn.patch do |request|\n request.url url\n\n request.headers['Authorization'] = \"Token #{access_token}\"\n request.headers['Accept'] = accept_header\n request.body = payload\n end\n end",
"def replace_scopes(*scopes)\n uris = ensure_and_get_uris(scopes.flatten)\n patch('replace', '/scopeUris', uris)\n end",
"def scheme_set(scheme)\n rebuild_uri :scheme => scheme\n end",
"def update!(**args)\n @auth_mechanism_for_remote_requests = args[:auth_mechanism_for_remote_requests] if args.key?(:auth_mechanism_for_remote_requests)\n end",
"def update_resources_from_rspec(descr_el, clean_state, authorizer)\n debug \"update_resources_from_rspec: descr_el:'#{descr_el}' clean_state:'#{clean_state}' authorizer:'#{authorizer}'\"\n if !descr_el.nil? && descr_el.name.downcase == 'rspec'\n xsd_path = File.join(File.dirname(__FILE__), '../../../schema/rspec-v3', 'request.xsd')\n schema = Nokogiri::XML::Schema(File.open(xsd_path))\n\n #TODO: make sure we pass the schema validation\n #res = schema.validate(descr_el.document)\n #raise FormatException.new(\"RSpec format is not valid: '#{res}'\") unless res.empty?\n\n unless descr_el.xpath('//ol:*', 'ol' => OL_NAMESPACE).empty?\n #TODO: make proper schemas and validate them\n #lease_xsd_path = File.join(File.dirname(__FILE__), '../../../schema/rspec-v3', 'request-reservation.xsd')\n #lease_rng_path = File.join(File.dirname(__FILE__), '../../../schema/rspec-v3', 'request-reservation.rng')\n #lease_schema = Nokogiri::XML::Schema(File.open(lease_xsd_path))\n #lease_schema = Nokogiri::XML::RelaxNG(File.open(lease_rng_path))\n\n #TODO: make sure we pass the schema validation\n #res = schema.validate(descr_el.document)\n #raise FormatException.new(\"RSpec format is not valid: '#{res}'\") unless res.empty?\n end\n\n\n if descr_el.namespaces.values.include?(OL_NAMESPACE)\n leases = descr_el.xpath('//ol:lease', 'ol' => OL_NAMESPACE)\n # leases = descr_el.xpath('/xmlns:rspec/ol:lease', 'ol' => OL_NAMESPACE, 'xmlns' => \"http://www.geni.net/resources/rspec/3\")\n leases = update_leases_from_rspec(leases, authorizer)\n else\n leases = {}\n end\n\n resources = leases.values\n\n nodes = descr_el.xpath('//xmlns:node').collect do |el|\n #debug \"create_resources_from_xml::EL: #{el.inspect}\"\n if el.kind_of?(Nokogiri::XML::Element)\n # ignore any text elements\n #if el[:lease_name].nil?\n # update_resource_from_rspec(el, nil, clean_state, authorizer)\n #else # This node has a lease\n # lease = leases.find { |l| l[:name].eql?(el[:lease_name]) }\n #leases = el.xpath('child::ol:lease', 'ol' => OL_NAMESPACE)\n #leases = update_leases_from_rspec(leases, authorizer)\n update_resource_from_rspec(el, leases, clean_state, authorizer)\n #end\n end\n end.compact\n\n resources = resources.concat(nodes)\n\n # channel reservation\n channels = descr_el.xpath('/xmlns:rspec/ol:channel', 'ol' => OL_NAMESPACE, 'xmlns' => \"http://www.geni.net/resources/rspec/3\").collect do |el|\n update_resource_from_rspec(el, leases, clean_state, authorizer)\n end.compact\n\n resources = resources.concat(channels)\n\n # e_node_b reservation\n e_node_bs = descr_el.xpath('/xmlns:rspec/flex:e_node_b', 'flex' => FLEX_NAMESPACE, 'xmlns' => \"http://www.geni.net/resources/rspec/3\").collect do |el|\n update_resource_from_rspec(el, leases, clean_state, authorizer)\n end.compact\n\n resources = resources.concat(e_node_bs)\n\n # if resources.include?(false) # a component failed to be leased because of scheduler lease_component returned false\n # resources.delete(false)\n # release_resources(resources, authorizer)\n # raise UnavailableResourceException.new \"One or more resources failed to be allocated\"\n # end\n\n failed_resources = []\n resources.each do |res|\n failed_resources << res if res.kind_of? Hash\n end\n\n unless failed_resources.empty?\n resources.delete_if {|item| failed_resources.include?(item)}\n urns = []\n failed_resources.each do |fres|\n release_resource(fres[:failed], authorizer)\n urns << fres[:failed].urn\n end\n release_resources(resources, authorizer)\n raise UnavailableResourceException.new \"The resources with the following URNs: '#{urns.inspect}' failed to be allocated\"\n end\n\n # TODO: release the unused leases. The leases we have created but we never managed\n # to attach them to a resource because the scheduler denied it.\n if clean_state\n # Now free any leases owned by this account but not contained in +leases+\n # all_leases = Set.new(leases.values)\n #leases = descr_el.xpath('//ol:lease', 'ol' => OL_NAMESPACE).collect do |l|\n # update_leases_from_rspec(leases, authorizer)\n #end.compact\n\n # leases.each_value {|l| l.all_resources(all_leases)}\n all_leases = find_all_leases(authorizer.account, authorizer)\n leases_values = leases.values\n unused = all_leases.delete_if do |l|\n out = leases_values.select {|res| res.id == l.id}\n !out.empty?\n end\n # unused = find_all_leases(authorizer.account, authorizer).to_set - all_leases\n unused.each do |u|\n release_lease(u, authorizer)\n end\n # Now free any resources owned by this account but not contained in +resources+\n # rspec_resources = Set.new(resources)\n # resources.each {|r| r.all_resources(rspec_resources)}\n all_components = find_all_components_for_account(authorizer.account, authorizer)\n unused = all_components.delete_if do |comp|\n out = resources.select {|res| res.id == comp.id}\n !out.empty?\n end\n\n release_resources(unused, authorizer)\n end\n return resources\n else\n raise FormatException.new \"Unknown resources description root '#{descr_el}'\"\n end\n end",
"def update!(**args)\n @collection_overrides = args[:collection_overrides] if args.key?(:collection_overrides)\n @credential = args[:credential] if args.key?(:credential)\n @descriptor_url = args[:descriptor_url] if args.key?(:descriptor_url)\n @options = args[:options] if args.key?(:options)\n end",
"def update!(**args)\n @address = args[:address] if args.key?(:address)\n @expiration = args[:expiration] if args.key?(:expiration)\n @id = args[:id] if args.key?(:id)\n @kind = args[:kind] if args.key?(:kind)\n @params = args[:params] if args.key?(:params)\n @payload = args[:payload] if args.key?(:payload)\n @resource_id = args[:resource_id] if args.key?(:resource_id)\n @resource_uri = args[:resource_uri] if args.key?(:resource_uri)\n @token = args[:token] if args.key?(:token)\n @type = args[:type] if args.key?(:type)\n end",
"def update\n if valid_user && @url.update(url_params)\n render_jsonapi_response(@url)\n else\n if valid_user\n render json: {errors: @url.errors}, status: :unprocessable_entity\n else\n render json: {errors: \"unauthorized\"}, status: :unauthorized \n end\n end\n end",
"def validate_source_url(spec)\n return if spec.source.nil? || spec.source[:http].nil?\n url = URI(spec.source[:http])\n return if url.scheme == 'https' || url.scheme == 'file'\n warning('http', \"The URL (`#{url}`) doesn't use the encrypted HTTPS protocol. \" \\\n 'It is crucial for Pods to be transferred over a secure protocol to protect your users from man-in-the-middle attacks. '\\\n 'This will be an error in future releases. Please update the URL to use https.')\n end",
"def update!(**args)\n @name = args[:name] if args.key?(:name)\n @scopes = args[:scopes] if args.key?(:scopes)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @admin_config_url = args[:admin_config_url] if args.key?(:admin_config_url)\n @deletion_policy_url = args[:deletion_policy_url] if args.key?(:deletion_policy_url)\n @gwm_url = args[:gwm_url] if args.key?(:gwm_url)\n @privacy_policy_url = args[:privacy_policy_url] if args.key?(:privacy_policy_url)\n @setup_url = args[:setup_url] if args.key?(:setup_url)\n @support_url = args[:support_url] if args.key?(:support_url)\n @tos_url = args[:tos_url] if args.key?(:tos_url)\n end",
"def update!(**args)\n @provider = args[:provider] if args.key?(:provider)\n @provider_uri = args[:provider_uri] if args.key?(:provider_uri)\n end",
"def update!(**args)\n @resource_type = args[:resource_type] if args.key?(:resource_type)\n @resource_url = args[:resource_url] if args.key?(:resource_url)\n end",
"def update!(**args)\n @resource_type = args[:resource_type] if args.key?(:resource_type)\n @resource_url = args[:resource_url] if args.key?(:resource_url)\n end",
"def update!(**args)\n @id = args[:id] if args.key?(:id)\n @kind = args[:kind] if args.key?(:kind)\n @url_pattern = args[:url_pattern] if args.key?(:url_pattern)\n end",
"def refresh_single_use_oauth2_token!\n assign_single_use_oauth2_token\n save!\n end",
"def add_protocol_for_urls\n URLS.each do |url|\n if self.send(url).present? && self.send(url) != \"\"\n unless self.send(url)[/\\Ahttp:\\/\\//] || self.send(url)[/\\Ahttps:\\/\\//]\n self.send(\"#{url}=\", \"http://#{self.send(url)}\")\n end\n end\n end\n end",
"def oauth_authentication; end",
"def validate_documentation_url(spec)\n validate_url(spec.documentation_url) if spec.documentation_url\n end",
"def auth_scheme; end",
"def authorize_url\n # Fix: replace default oauth2 options, specially to prevent the Faraday gem which\n # concatenates with \"/\", removing the Facebook api version\n options = {\n site: File.join(@site, api_version.to_s),\n authorize_url: File.join(@auth_site, api_version.to_s, auth_path),\n token_url: token_url\n }\n\n @scope = access_permissions.present? ? access_permissions.join(',') : scope\n super(options)\n end",
"def test_srpm_spec_url\n get '/srpm/Sisyphus/glibc/spec'\n assert_equal 'http://packages.altlinux.org/ru/Sisyphus/srpms/glibc/spec', last_response.location\n assert_equal 301, last_response.status\n\n get '/srpm/Branch51/glibc/spec'\n assert_equal 'http://packages.altlinux.org/ru/5.1/srpms/glibc/spec', last_response.location\n assert_equal 301, last_response.status\n\n get '/srpm/p5/glibc/spec'\n assert_equal 'http://packages.altlinux.org/ru/Platform5/srpms/glibc/spec', last_response.location\n assert_equal 301, last_response.status\n\n get '/srpm/Branch41/glibc/spec'\n assert_equal 'http://packages.altlinux.org/ru/4.1/srpms/glibc/spec', last_response.location\n assert_equal 301, last_response.status\n\n get '/srpm/Branch4/glibc/spec'\n assert_equal 'http://packages.altlinux.org/ru/4.0/srpms/glibc/spec', last_response.location\n assert_equal 301, last_response.status\n end",
"def update\n \n\n @client.redirect_urls << client_params[:add_redirect_url] if client_params[:add_redirect_url]\n \n @client.app_ids << BSON::ObjectId.new.to_s if client_params[:add_app_id]\n \n \n @client.versioned_update({\"redirect_urls\" => 1, \"app_ids\" => 1})\n\n if @client.op_success?\n render \"show\"\n else\n render \"edit\"\n end\n \n end",
"def merge_uri_with! details\n resource_uri = convert_id_to_uri(@resource_id)\n details.merge! :resource_uri => resource_uri\n end",
"def update_uri(p)\n update_attribute(:uri_actual, p)\n end",
"def update!(**args)\n @kind = args[:kind] if args.key?(:kind)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n @resources = args[:resources] if args.key?(:resources)\n end",
"def update!(**args)\n @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n end",
"def oauth_url(response_type = 'code')\n # The Redirect URI must be the same as registered with Put.io\n PUTIO_BASE_URL + \"/oauth2/authenticate?client_id=%i&response_type=%s&redirect_uri=%s\" % [@client_id, response_type, @redirect_uri]\n end",
"def credential(url); end",
"def update_url(url)\n assert_type(url, Wgit::Url)\n selection = { url: url }\n url_hash = Wgit::Model.url(url).merge(Wgit::Model.common_update_data)\n update = { '$set' => url_hash }\n mutate(true, :urls, selection, update)\n end",
"def update!(**args)\n @client_id = args[:client_id] if args.key?(:client_id)\n @client_secret = args[:client_secret] if args.key?(:client_secret)\n @display_name = args[:display_name] if args.key?(:display_name)\n @enabled = args[:enabled] if args.key?(:enabled)\n @issuer = args[:issuer] if args.key?(:issuer)\n @name = args[:name] if args.key?(:name)\n @response_type = args[:response_type] if args.key?(:response_type)\n end",
"def authenticated_url=(url)\n uri = URI(url)\n self.api_key = uri.user\n uri.user = nil\n uri.password = nil\n self.endpoint = uri.to_s\n end",
"def update!(**args)\n @api_signatures = args[:api_signatures] if args.key?(:api_signatures)\n @unique_apis = args[:unique_apis] if args.key?(:unique_apis)\n end",
"def update!(**args)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n @oauth_idp_configs = args[:oauth_idp_configs] if args.key?(:oauth_idp_configs)\n end",
"def endpoint_url=(url)\n params['accepturl'] = params['declineurl'] = params['exceptionurl'] = params['cancelurl'] = url\n end",
"def set_url_scheme(url, scheme = nil )\n orig_scheme = scheme\n\n if scheme.blank?\n scheme = is_ssl ? 'https' : 'http'\n elsif scheme == 'admin' || scheme == 'login' || scheme == 'login_post' || scheme == 'rpc'\n scheme = is_ssl || force_ssl_admin() ? 'https' : 'http'\n elsif scheme != 'http' && scheme != 'https' && scheme != 'relative'\n scheme = is_ssl ? 'https' : 'http';\n end\n\n url = url.strip\n url = 'http:' + url if url.start_with?('//')\n\n if 'relative' == scheme\n url = url.gsub(/^\\w+:\\/\\/[^\\/]*/, '').lstrip\n if url != '' && url[0] == '/'\n url = '/' + ltrim( url, \"/ \\t\\n\\r\\0\\x0B\" )\n end\n else\n url = url.gsub(/^\\w+:\\/\\//, scheme + '://')\n end\n\n # Filters the resulting URL after setting the scheme.\n #\n # @since 3.4.0\n #\n # @param string $url The complete URL including scheme and path.\n # @param string $scheme Scheme applied to the URL. One of 'http', 'https', or 'relative'.\n # @param string|null $orig_scheme Scheme requested for the URL. One of 'http', 'https', 'login',\n # 'login_post', 'admin', 'relative', 'rest', 'rpc', or null.\n apply_filters( 'set_url_scheme', url, scheme, orig_scheme )\n end",
"def update!(**args)\n @ray_spec = args[:ray_spec] if args.key?(:ray_spec)\n @service_account_spec = args[:service_account_spec] if args.key?(:service_account_spec)\n end",
"def auth_workarounds(url)\n # crepeerase workaround\n if(url.include?('crepeerase') && url.include?('.grdev.'))\n env = url.scan(/.crepeerase.([^.]+)/).first.first\n @browser.driver.browser.get \"https://storefront:[email protected].#{env}.dw2.grdev.com\"\n end\n end",
"def update!(**args)\n @firewall_policies = args[:firewall_policies] if args.key?(:firewall_policies)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n end",
"def exchange_oauth_tokens\n end",
"def update!(**args)\n @auth_provider = args[:auth_provider] if args.key?(:auth_provider)\n end",
"def valid_for_oauth2(resource, attributes)\n true\n end",
"def update!(**args)\n @supported_routes = args[:supported_routes] if args.key?(:supported_routes)\n end",
"def configured_uri_for(uri)\n if /https?:/ =~ uri\n remote = URI(uri)\n config_auth = Bundler.settings[remote.to_s] || Bundler.settings[remote.host]\n remote.userinfo ||= config_auth\n remote.to_s\n else\n uri\n end\n end",
"def use_oauth\n\t\t\t\n\t\tend",
"def beta\n validate_arguments!\n update_from_url(true)\n end",
"def update_oauth_application(token, name, redirect_uris, description = '', icon = nil)\n request(\n __method__,\n :put,\n \"#{api_base}/oauth2/applications\",\n { name: name, redirect_uris: redirect_uris, description: description, icon: icon }.to_json,\n Authorization: token,\n content_type: :json\n )\n end",
"def update_oauth_application(token, name, redirect_uris, description = '', icon = nil)\n request(\n __method__,\n :put,\n \"#{api_base}/oauth2/applications\",\n { name: name, redirect_uris: redirect_uris, description: description, icon: icon }.to_json,\n Authorization: token,\n content_type: :json\n )\n end",
"def change_resource_assignments(add_resources: [], remove_resources: [])\n if !add_resources.empty? || !remove_resources.empty?\n ensure_uri && ensure_client\n add_uris = ensure_and_get_uris(add_resources)\n remove_uris = ensure_and_get_uris(remove_resources)\n body = []\n\n add_uris.each do |uri|\n body << { 'op' => 'add', 'path' => '/addedResourceUris/-', 'value' => uri }\n end\n body << { 'op' => 'replace', 'path' => '/removedResourceUris', 'value' => remove_uris }\n\n response = @client.rest_patch(@data['uri'], { 'Content-Type' => 'application/json-patch+json', 'body' => body }, @api_version)\n @client.response_handler(response)\n end\n self\n end",
"def update!(**args)\n @body = args[:body] if args.key?(:body)\n @headers = args[:headers] if args.key?(:headers)\n @http_method = args[:http_method] if args.key?(:http_method)\n @oauth_token = args[:oauth_token] if args.key?(:oauth_token)\n @oidc_token = args[:oidc_token] if args.key?(:oidc_token)\n @uri = args[:uri] if args.key?(:uri)\n end",
"def update!(**args)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n @server_tls_policies = args[:server_tls_policies] if args.key?(:server_tls_policies)\n end",
"def update!(**args)\n @collection_overrides = args[:collection_overrides] if args.key?(:collection_overrides)\n @credential = args[:credential] if args.key?(:credential)\n @custom_certificate_authority_roots = args[:custom_certificate_authority_roots] if args.key?(:custom_certificate_authority_roots)\n @description = args[:description] if args.key?(:description)\n @descriptor_url = args[:descriptor_url] if args.key?(:descriptor_url)\n @id = args[:id] if args.key?(:id)\n @insert_time = args[:insert_time] if args.key?(:insert_time)\n @labels = args[:labels] if args.key?(:labels)\n @name = args[:name] if args.key?(:name)\n @operation = args[:operation] if args.key?(:operation)\n @options = args[:options] if args.key?(:options)\n @self_link = args[:self_link] if args.key?(:self_link)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def allowed_uri_class\n [URI::HTTP, URI::HTTPS]\n end",
"def configured_uri_for(uri)\n uri = uri.gsub(\"[email protected]:\", \"https://github.com/\")\n if /https?:/ =~ uri\n remote = URI(uri)\n config_auth =\n Bundler.settings[remote.to_s] || Bundler.settings[remote.host]\n remote.userinfo ||= config_auth\n remote.to_s\n else\n uri\n end\n end",
"def smart_add_url_protocol\n return if self.original.blank?\n unless self.original[/\\Ahttp:\\/\\//] || self.original[/\\Ahttps:\\/\\//]\n self.original = \"http://#{self.original}\"\n end\n end",
"def url_whitelisted_by_spec?(url, spec)\n parsed_url = url\n begin\n parsed_url = URI.parse(url) unless parsed_url.kind_of?(URI)\n rescue URI::InvalidURIError\n return false\n end\n\n parsed_spec = spec.kind_of?(URI) ? spec : URI.parse(spec)\n\n # Don't include 'host' yet, we check that special for wildcards. \n part_list = [:scheme, :userinfo, :port, :path, :query, :fragment]\n\n # special handling for hosts to support trailing period as wildcard\n spec_host = parsed_spec.host\n\n if spec_host && spec_host.start_with?(\".\")\n return false unless (parsed_url.host && parsed_url.host.ends_with?(spec_host) || parsed_url.host == spec_host.slice(1..-1))\n elsif spec_host && (! spec_host.empty?)\n # just check it normally below\n part_list << :host\n end\n\n\n # Other parts, just match if spec part is not empty\n part_list.each do |part|\n spec_part = parsed_spec.send(part).to_s\n if (! spec_part.nil?) && (! spec_part.empty?) && \n (parsed_url.send(part).to_s != spec_part )\n return false\n end\n end\n\n # If we got this far without a return false, we're good. \n return true\n end",
"def update!(**args)\n @audience = args[:audience] if args.key?(:audience)\n @grant_type = args[:grant_type] if args.key?(:grant_type)\n @options = args[:options] if args.key?(:options)\n @requested_token_type = args[:requested_token_type] if args.key?(:requested_token_type)\n @scope = args[:scope] if args.key?(:scope)\n @subject_token = args[:subject_token] if args.key?(:subject_token)\n @subject_token_type = args[:subject_token_type] if args.key?(:subject_token_type)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @default_supported_idp_configs = args[:default_supported_idp_configs] if args.key?(:default_supported_idp_configs)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n end",
"def apply_grip_config(config)\n if !config.is_a?(Array)\n config = [config]\n end\n config.each do |entry|\n if !entry.key?('control_uri')\n next\n end\n client = PubControlClient.new(entry['control_uri'])\n if entry.key?('control_iss')\n client.set_auth_jwt({'iss' => entry['control_iss']}, entry['key'])\n end\n super_add_client(client)\n end\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def update!(**args)\n @url = args[:url] if args.key?(:url)\n end",
"def third_party_credential(url); end",
"def update!(**args)\n @authorization_policies = args[:authorization_policies] if args.key?(:authorization_policies)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n end",
"def add_url_protocol\n unless url[/\\Ahttp:\\/\\//] || url[/\\Ahttps:\\/\\//]\n self.url = \"http://#{self.url}\"\n end\n end",
"def update!(**args)\n @uri = args[:uri] if args.key?(:uri)\n end",
"def update!(**args)\n @uri = args[:uri] if args.key?(:uri)\n end",
"def update!(**args)\n @uri = args[:uri] if args.key?(:uri)\n end",
"def update!(**args)\n @uri = args[:uri] if args.key?(:uri)\n end",
"def update!(**args)\n @uri = args[:uri] if args.key?(:uri)\n end",
"def update!(**args)\n @uri = args[:uri] if args.key?(:uri)\n end"
] | [
"0.7838067",
"0.5405094",
"0.5389428",
"0.5343627",
"0.531135",
"0.52875876",
"0.5248033",
"0.52192277",
"0.5216703",
"0.5216703",
"0.5131309",
"0.5075023",
"0.5073467",
"0.50577843",
"0.5030655",
"0.5027904",
"0.5017818",
"0.49848565",
"0.4974084",
"0.49725547",
"0.49591675",
"0.4942628",
"0.4940456",
"0.49365345",
"0.49293143",
"0.49293143",
"0.49278504",
"0.49260047",
"0.49253792",
"0.49168572",
"0.49126622",
"0.49086177",
"0.490246",
"0.48900902",
"0.48895538",
"0.48829895",
"0.488126",
"0.4878185",
"0.4877027",
"0.48693803",
"0.4868908",
"0.48682186",
"0.48670378",
"0.48668662",
"0.48555365",
"0.4853104",
"0.48506993",
"0.48362422",
"0.4835816",
"0.48200503",
"0.4806517",
"0.4803695",
"0.48013577",
"0.48009542",
"0.47889325",
"0.4786089",
"0.47675943",
"0.4766712",
"0.47646156",
"0.47646156",
"0.4763516",
"0.47624716",
"0.47606513",
"0.47584912",
"0.4754905",
"0.47534826",
"0.47525373",
"0.4752294",
"0.475005",
"0.4745109",
"0.47408098",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47404817",
"0.47384766",
"0.4735987",
"0.47343835",
"0.47343835",
"0.47343835",
"0.47338003",
"0.47333577",
"0.47313905",
"0.47268388",
"0.47268388",
"0.47268388",
"0.47268388",
"0.47268388",
"0.47268388"
] | 0.78614545 | 0 |
TODO realize this method remember to take different syntax into consideration def ending_directive?(primitive_params) primitive_params.match end TODO add docs | def legal_directive?(primitive_params)
[vendor_directive, lib_directive, app_directive].any? { |d| d =~ primitive_params }
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tag_is_directive?(tag_name); end",
"def maybe_directives?; end",
"def supports_directive?\n @name == '@supports'\n end",
"def parameterized?\n macro_string.match Regexp.identifier\n end",
"def in_directive_department?(cop); end",
"def valid_end_node(token)\n [\"pp\", \"cc\"].include? token[:tag]\nend",
"def check_for_directive(line)\n chunks = line.split(' ')\n if chunks.include? 'ORIG'\n @compile_start = chunks.last.to_i\n @compile_counter = @compile_start\n return true\n\n elsif chunks.include? 'EQU'\n sym = chunks.first\n val = chunks.last\n @symbols[sym] = val\n return true\n\n elsif chunks.include? 'CON'\n val = chunks.last\n @computer.memory.storage[@pc].from_int(val.to_i)\n @compile_counter += 1\n return true\n\n elsif chunks.include? 'ALF'\n val = chunks.last\n @computer.memory.storage[@pc].from_string(val.to_s)\n @compile_counter += 1\n return true\n\n elsif chunks.include? 'END'\n @program_start = chunks.last.to_i\n return true\n end\n\n return false\n end",
"def end_of_word?\n @end_of_word\n end",
"def dot_is_end?\n @rule.right_tokens.count == @pos_index\n end",
"def optional_directive(directive_name, attr_base, attribute, quoted=false)\n if attr_base[attribute] and not (attr_base[attribute].instance_of?(String) and attr_base[attribute].empty?)\n sep = ''\n sep = '\"' if quoted\n \"#{directive_name} #{sep}#{attr_base[attribute]}#{sep};\"\n else\n \"\"\n end\nend",
"def parse(primitive_params)\n asset_root = ''\n path_param_str = ''\n path_params = []\n # unknown_directive = false\n\n # TODO make sure path_param_str will return nil for non-matched result and array for matched result\n # rememer to write tests for this section of codes\n if vendor_directive =~ primitive_params\n asset_root = 'vendor'\n path_param_str = primitive_params.match(vendor_directive)[:path_params]\n elsif lib_directive =~ primitive_params\n asset_root = 'lib'\n path_param_str = primitive_params.match(lib_directive)[:path_params]\n elsif app_directive =~ primitive_params\n asset_root = 'app'\n path_param_str = primitive_params.match(app_directive)[:path_params]\n # else\n # # TODO remove UnknownDirectiveError or try to find another way to get thing done\n # # raise UnknownDirectiveError.new \"'#{primitive_params}' is not in legal directive format\"\n # unknown_directive = true\n end\n\n # TODO refactor codes bellow after the above paragraph was refactored\n would_be_path_params = path_param_str.strip.split(/,\\s?/)\n # would_be_path_params = [would_be_path_params] if would_be_path_params.kind_of?(String)\n path_params = would_be_path_params unless would_be_path_params.empty?\n\n # unknown_directive ? [nil, nil] : [asset_root, path_params.strip.split(/,\\s?/)]\n # TODO: add rspec examples for returning a ['', []] when the primitive_params is illegal\n [asset_root, path_params]\n end",
"def process_directives\n end",
"def endToken( byte )\r b = byte\r\n \r\n if (b.chr == ' ' || b.chr == '\\n' || b.chr == '\\r' || b.chr == '\\t') then\r return true\r elsif (b.chr == ',' || b.chr == '-' || b.chr == '\"' || b.chr == '[' || b.chr == ']') then\r return true\r\n elsif (b.chr == ':' || b.chr == ';' || b.chr == '/' || b.chr == \"+\" || b.chr == \"=\") then\r\n return true\r\n end\r\n \r\n return false\r\nend",
"def is_endstr?(); @type == GRT_ENDSTR; end",
"def end_word?(word)\n !word.nil? && !(word =~ /^*+[?\\.!]$/).nil?\n end",
"def stop_here?(param)\n # No param Explicit HTML attribute Implicit HTML attribute\n param.nil? || param.match?(/^--\\S*/) || param.match?(/^\\w*=\"/)\n end",
"def invalid_param?\n self[:params][:tag_param].match(@definition[:tag_param]).nil?\n end",
"def handle_directive prefix, directive, param, code_object = nil,\n encoding = nil\n blankline = \"#{prefix.strip}\\n\"\n directive = directive.downcase\n\n case directive\n when 'arg', 'args' then\n return \"#{prefix}:#{directive}: #{param}\\n\" unless code_object && code_object.kind_of?(RDoc::AnyMethod)\n\n code_object.params = param\n\n blankline\n when 'category' then\n if RDoc::Context === code_object then\n section = code_object.add_section param\n code_object.temporary_section = section\n elsif RDoc::AnyMethod === code_object then\n code_object.section_title = param\n end\n\n blankline # ignore category if we're not on an RDoc::Context\n when 'doc' then\n return blankline unless code_object\n code_object.document_self = true\n code_object.force_documentation = true\n\n blankline\n when 'enddoc' then\n return blankline unless code_object\n code_object.done_documenting = true\n\n blankline\n when 'include' then\n filename = param.split(' ', 2).first\n include_file filename, prefix, encoding\n when 'main' then\n @options.main_page = param if @options.respond_to? :main_page\n\n blankline\n when 'nodoc' then\n return blankline unless code_object\n code_object.document_self = nil # notify nodoc\n code_object.document_children = param !~ /all/i\n\n blankline\n when 'notnew', 'not_new', 'not-new' then\n return blankline unless RDoc::AnyMethod === code_object\n\n code_object.dont_rename_initialize = true\n\n blankline\n when 'startdoc' then\n return blankline unless code_object\n\n code_object.start_doc\n code_object.force_documentation = true\n\n blankline\n when 'stopdoc' then\n return blankline unless code_object\n\n code_object.stop_doc\n\n blankline\n when 'title' then\n @options.default_title = param if @options.respond_to? :default_title=\n\n blankline\n when 'yield', 'yields' then\n return blankline unless code_object\n # remove parameter &block\n code_object.params = code_object.params.sub(/,?\\s*&\\w+/, '') if code_object.params\n\n code_object.block_params = param\n\n blankline\n else\n result = yield directive, param if block_given?\n\n case result\n when nil then\n code_object.metadata[directive] = param if code_object\n\n if RDoc::Markup::PreProcess.registered.include? directive then\n handler = RDoc::Markup::PreProcess.registered[directive]\n result = handler.call directive, param if handler\n else\n result = \"#{prefix}:#{directive}: #{param}\\n\"\n end\n when false then\n result = \"#{prefix}:#{directive}: #{param}\\n\"\n end\n\n result\n end\n end",
"def handle_parser_directive(statement)\r\n\r\n directive,args = statement.split(' ')\r\n\r\n case directive.downcase\r\n when \"if\"\r\n parser_if(args)\r\n return 0\r\n when \"endif\"\r\n parser_endif(args)\r\n return 0\r\n when \"else\"\r\n parser_else(args)\r\n return 0\r\n when \"include\"\r\n parser_include(args)\r\n return 0\r\n end\r\n\r\n #_rl_init_file_error(\"unknown parser directive\")\r\n return 1\r\n end",
"def start_identifier?(text = T.unsafe(nil)); end",
"def directive_close( line )\n #return line && line.include?( get_tag( :close ) )\n if line && line.include?( get_tag( :close ) ) then\n # index = line.index( get_tag(:close) )\n # return true, index == 0 ? nil : line[0..index-1], line[ index+ get_tag(:close).length..-1]\n # do not output anythin on line for directive\n return true, nil, nil\n \n elsif line && line.include?( get_tag(:fold_off) ) then\n # replace fold-off direcive line with fold_off text\n return true, self.fold_off, nil\n else\n return false, nil, line\n end\n end",
"def describes_parameter?(name)\n return false if name.nil?\n describe_parameter_regexps(name).any? do |pattern|\n @text.index(pattern)\n end\n end",
"def despined?(*)\n end",
"def is_parm?(long_form)\n return !@parm_names[long_form].nil?\n end",
"def partial_word? word = ''\n is? :partial_word, word\n end",
"def match?(name, literal) true end",
"def match_token(token)\n return true\n end",
"def complete_expression?(str); end",
"def complex_token_matches?(token) # :nodoc:\n Matchers.matchers.any? {|matcher| matcher.matches?(token) }\n end",
"def validate_syntax\n full_matcher = Regexp.compile('\\A\\s*(?:' + MATCHER.to_s + '(?=\\s|\\z)\\s*)*\\z')\n unless @params =~ full_matcher\n raise SyntaxError.new <<-eos\nInvalid syntax for include tag:\n\n #{@params}\n\nValid syntax:\n\n {% include file.ext param='value' param2=\"value\" %}\n\neos\n end\n end",
"def end_of_word; end",
"def look_for_directives_in container, comment\n @preprocess.handle comment, container do |directive, param|\n case directive\n when 'method', 'singleton-method',\n 'attr', 'attr_accessor', 'attr_reader', 'attr_writer' then\n false # handled elsewhere\n when 'section' then\n break unless container.kind_of?(RDoc::Context)\n container.set_current_section param, comment.dup\n comment.text = ''\n break\n end\n end\n\n comment.remove_private\n end",
"def namespace_directive?\n @name == '@namespace'\n end",
"def validate_parameter(*param)\n param.each do |a|\n return false unless a && (a.to_s =~ /^\\{.*\\}$/) == nil && a != '' && a != {}\n end\n end",
"def part_outside?\r\n return @name.scan(/\\[POUT\\]/).size > 0\r\n end",
"def mentions_parameter?(name)\n return false if name.nil?\n mention_parameter_regexps(name).any? do |pattern|\n @text.index(pattern)\n end\n end",
"def has?(param)\n \tparam and param.length > 0\n end",
"def param?(item)\n return item.eql?(item.match(/[|a-z0-9-]+/m).to_s) ? true : false\n end",
"def valid_param_supplied_as_text?\n tag = @bbtree.current_node.definition\n \n # this conditional ensures whether the validation is apropriate to this tag type\n if @ti.element_is_text? and within_open_tag? and tag[:require_between] and candidate_for_using_between_as_param?\n \n # check if valid\n if @ti[:text].match(tag[:tag_param]).nil?\n @errors = [tag[:tag_param_description].gsub('%param%', @ti[:text])]\n return false\n end\n end\n true\n end",
"def keyword_constant?\n token = peek\n return false unless token\n\n token.value == \"true\" ||\n token.value == \"false\" ||\n token.value == \"null\" ||\n token.value == \"this\"\n end",
"def needs_word?\n if has_type? :reference\n return true\n end\n \n if has_type? :literal\n return true\n end\n \n #otherwise it is only a register or raw special value\n return false\n end",
"def end?()\n END_MARKER.equal? _next_element\n end",
"def handle_switch(directive, names, extras); end",
"def directives; end",
"def directives; end",
"def end_element?\n @contents[0] == :end_element\n end",
"def primitive?(type)\n PRIMITIVES.include?(type)\n end",
"def allowed_multiline_argument?(node)\n elements(node).one? && !Util.begins_its_line?(node.loc.end)\n end",
"def regular_ending(verb)\n verb[-2..-1]\n end",
"def parse_end\n (get_end(/^(,)\\/(\\n)/) ? true : \\\n (get_end(/^[ \\t]*(~+)\\/(\\n)/) ? true : \\\n get_end(/^[ \\t]*(!)\\/(\\n)/)))\n end",
"def regexp?(var)\n return false unless extended?(var)\n colon = var.index(':') || var.size\n slash = var.index('/') || var.size\n slash < colon\n end",
"def valid_token(card_type: T.unsafe(nil)); end",
"def celestialBody?\n\t\trawString.start_with? 'c'\n\tend",
"def end_word_pattern; end",
"def keep_with_next? para\n if self.class.keep_with_nexts.is_a? Array\n self.class.keep_with_nexts.include? para.class.name[/[^:]+$/]\n else\n self.keep_with_nexts(:next_para => para)\n end\n end",
"def is_question?( statement )\n statement.end_with? '?'\n end",
"def parameters_match?(obj)\r\n # if parameters are not specified, let's assume that the rule is always relevant\r\n if @parameters.size == 0\r\n logger.debug \"no parameters defined for rule: #{self}\" if logger\r\n return true\r\n end\r\n \r\n @parameters.each do |params|\r\n match = false\r\n \r\n params.each do |p|\r\n logger.debug( \"#{self} match p:#{p} obj:#{obj}\") if logger\r\n \r\n if p.is_a?(Symbol) \r\n if obj.respond_to?(p)\r\n match = true\r\n else\r\n return false\r\n end\r\n elsif obj.is_a?(p)\r\n match = true\r\n end\r\n end\r\n return true if match\r\n end\r\n \r\n return false\r\n end",
"def argument_optional?\n !short.to_s.match(SHORT_ARGUMENT_OPTIONAL_RE).nil? ||\n !long.to_s.match(LONG_ARGUMENT_OPTIONAL_RE).nil?\n end",
"def closing?(char)\n DELIMITERS.values.include?(char)\n end",
"def elementdecl?\n @contents[0] == :elementdecl\n end",
"def ends_with(str, let)\n output = false\n if str[str.length - 1] == let\n output = true\n end\n return output\nend",
"def valid?\n return false if !raw.include?('Returns')\n return false if sections.size < 2\n true\n end",
"def continue_response\n parameter = @expected.shift\n name, type, *args = parameter\n\n # Some command words can be read from the buffer directly, whereas\n # the parser has its own logic for the more complex ones.\n own_type = respond_to?(type, true)\n own_type ? send(type, name, *args) : primitive(parameter)\n end",
"def require_then?(in_pattern_node); end",
"def parameter_rule?; end",
"def exact_match?\n !partial_match?\n end",
"def tagMethod?()\r\n\t\tlang = language()\r\n\t\treturn (@type == \"m\" || @type==\"f\") if (lang == \"java\")\r\n\t\treturn (@type == \"f\") if (lang == \"cpp\")\r\n\tend",
"def end_with?(sentencia)\n sentencia.end_with?('?')\n end",
"def is_verb? m\n is_token?(m) || is_absolute_iri?(m)\n end",
"def paragraph_end; end",
"def must_respond?(symbol_doc)\n !symbol_doc.nil?\n end",
"def valid?\n @params_definition.each { |pd| return false unless @params.has_key?(pd) }\n true\n end",
"def attrs_provided?(attrs)\n !attrs.empty?\n end",
"def is_non_terminal?(s)\n # TODO: your implementation here\n /<[\\w-]+>/.match(s)\n #------------------------------------------------------------------------\n #\\w regular expression = Any word character(letter, number, underscore)\n #The brackets accept the range of the matching\n #The plus sign expands multiple words where the - allows hyphenations\n #like that of the Bond-movie file\n #------------------------------------------------------------------------\nend",
"def is_primitive_sentence?\n index = 1\n if @classified[index].instance_of?(Proposition) || @classified[index].instance_of?(Constant)\n if @classified[index + 1].instance_of?(LogicalOperator)\n if @classified[index + 2].instance_of?(Proposition) || @classified[index + 2].instance_of?(Constant)\n return true\n end\n end\n end\n false\n end",
"def isVariable(variableName, arraySize)\n # Only output non-array variables or array members (i.e., skip array\n # definitions)\nreturn variableName != nil && arraySize != nil && (arraySize == \"\" || variableName.end_with?(\"]\"))\nend",
"def argument_required?\n !short.to_s.match(SHORT_ARGUMENT_REQUIRED_RE).nil? ||\n !long.to_s.match(LONG_ARGUMENT_REQUIRED_RE).nil?\n end",
"def regex_end_prefix\n Regexp.new(\"endline#{VM_PREFIX}\")\nend",
"def validrptDotsCommand?\n\tif @commands.size < 3\n\t\treturn false \n\telsif @commands[1].size <=0\n\t\treturn false\n\telsif @commands[2].size <=0\n\t\treturn false\n\tend \n\t\treturn true \nend",
"def close_tag?(char)\n unless char == nil\n char =~ %r!\\A</[^>]+>!\n else\n false\n end\n end",
"def validate_parameter_type\n if PRIMITIVE_PARAMETER_TYPES.include? self.parameter_type || self.parameter_type === 'Object'\n true\n elsif self.parameter_type.include?('[') # compound types have brackets []\n # extract primitives from complex type\n raw_primitives = self.parameter_type.split('[').last\n raw_primitives.gsub!(/]\\??/, '')\n primitives = raw_primitives.split(',').map(&:strip)\n if self.parameter_type.start_with?('Array')\n # there is only one primitive type from the control list\n unless primitives.size === 1 && PRIMITIVE_PARAMETER_TYPES.include?(primitives.first)\n errors.add(:parameter_type, \"has an invalid primitive type: #{(primitives - PRIMITIVE_PARAMETER_TYPES).join(', ')}\")\n end\n elsif self.parameter_type.start_with?('Map')\n # there are two primitive types, and the intersection is the same as the unique list of primitives\n unless primitives.size === 2 && (primitives & PRIMITIVE_PARAMETER_TYPES === primitives.uniq)\n errors.add(:parameter_type, \"has an invalid primitive type: #{(primitives - PRIMITIVE_PARAMETER_TYPES).join(', ')}\")\n end\n else\n errors.add(:parameter_type, \"has an invalid complex type: #{self.parameter_type.split('[').first}\")\n end\n else\n errors.add(:parameter_type, \"has an invalid value: #{self.parameter_type}\")\n end\n end",
"def matched_by_basic_range?(range)\n if range.kind_of?(self.class)\n s = range.recompose.tag\n elsif range.respond_to?(:to_str)\n return true if range.to_str == Const::WILDCARD\n s = self.class.parse(range).tag\n else\n return false\n end\n recompose\n @tag == s || @tag.index(s + Const::HYPHEN) == 0\n rescue\n false\n end",
"def final?\n @modifiers.include? :final\n end",
"def any_tag_in_params?\n params[:t] != nil\n end",
"def next?(expected_type, expected_tokens = [])\n next_type, next_token = tokenizer{ @tokens.peek }\n\n # Checks token type\n primitive = next_type == :KEYWORD && [:INT, :CHAR, :BOOLEAN].include?(next_token)\n type_valid = if expected_type == :TYPE\n primitive || next_type == :IDENTIFIER\n else\n next_type == expected_type\n end\n\n return false if !type_valid\n return true if expected_tokens.empty? # No need to check token content\n\n # Checks token content\n [expected_tokens].flatten.include?(next_token)\n end",
"def literal?\n LITERALS.include? @kind\n end",
"def visibility_directive(tag, parser); end",
"def has_param?(name)\n\n end",
"def sentence?\n if self.end_with?(\".\"); return true\n else return false\n end\n end",
"def end_with?(string)\n to_s.end_with?(string.to_s)\n end",
"def read_directive allowed\n tokens = []\n\n while tk = get_tk do\n tokens << tk\n\n if :on_nl == tk[:kind] or (:on_kw == tk[:kind] && 'def' == tk[:text]) then\n return\n elsif :on_comment == tk[:kind] or :on_embdoc == tk[:kind] then\n return unless tk[:text] =~ /\\s*:?([\\w-]+):\\s*(.*)/\n\n directive = $1.downcase\n\n return [directive, $2] if allowed.include? directive\n\n return\n end\n end\n ensure\n unless tokens.length == 1 and (:on_comment == tokens.first[:kind] or :on_embdoc == tokens.first[:kind]) then\n tokens.reverse_each do |token|\n unget_tk token\n end\n end\n end",
"def non_complex_expression?(condition); end",
"def delimited_string_literal?(node); end",
"def stop_if_match; true; end",
"def implicit_docstring?\n YARD.implicit_docstring?(docstring, method)\n end",
"def lex_en_expr_endarg; end",
"def lex_en_expr_endarg; end",
"def lex_en_expr_endarg; end",
"def entitydecl?\n @contents[0] == :entitydecl\n end",
"def is_footer(str)\n (str =~ /American Legal Publishing Corporation provides these documents for informational purposes only./i) != nil\nend"
] | [
"0.66104245",
"0.6425712",
"0.60357356",
"0.6032189",
"0.5804799",
"0.56826025",
"0.55321544",
"0.55099404",
"0.550944",
"0.5481375",
"0.547024",
"0.54135835",
"0.5374396",
"0.53557956",
"0.5342509",
"0.53097546",
"0.5290659",
"0.52691627",
"0.52239305",
"0.52068424",
"0.51814693",
"0.5179388",
"0.51778764",
"0.5174131",
"0.5171631",
"0.5132131",
"0.51245314",
"0.509949",
"0.50925845",
"0.5057986",
"0.50438416",
"0.5029733",
"0.5022475",
"0.50196826",
"0.5003691",
"0.49992752",
"0.4995183",
"0.49502513",
"0.49481878",
"0.49399608",
"0.4909446",
"0.49090368",
"0.49074388",
"0.48829946",
"0.48829946",
"0.4844561",
"0.48445237",
"0.4837406",
"0.483373",
"0.48120427",
"0.4800084",
"0.47986135",
"0.4797142",
"0.47951022",
"0.47935316",
"0.47924143",
"0.47918826",
"0.47891626",
"0.47871426",
"0.47868624",
"0.4778896",
"0.4760992",
"0.475441",
"0.47536898",
"0.4750377",
"0.47454852",
"0.4743853",
"0.473463",
"0.47236806",
"0.47179416",
"0.47130853",
"0.46971464",
"0.4694959",
"0.4692233",
"0.4688822",
"0.46869043",
"0.46850705",
"0.4678585",
"0.46775284",
"0.46753776",
"0.4674786",
"0.4668652",
"0.46672156",
"0.46637905",
"0.4663702",
"0.4662513",
"0.46590695",
"0.46588376",
"0.46520957",
"0.46455818",
"0.46444833",
"0.46436882",
"0.46432933",
"0.4640563",
"0.46396932",
"0.4638829",
"0.4638829",
"0.4638829",
"0.46377036",
"0.46352613"
] | 0.765872 | 0 |
return root folder and all the path params that have been split TODO this method bellow need refactor | def parse(primitive_params)
asset_root = ''
path_param_str = ''
path_params = []
# unknown_directive = false
# TODO make sure path_param_str will return nil for non-matched result and array for matched result
# rememer to write tests for this section of codes
if vendor_directive =~ primitive_params
asset_root = 'vendor'
path_param_str = primitive_params.match(vendor_directive)[:path_params]
elsif lib_directive =~ primitive_params
asset_root = 'lib'
path_param_str = primitive_params.match(lib_directive)[:path_params]
elsif app_directive =~ primitive_params
asset_root = 'app'
path_param_str = primitive_params.match(app_directive)[:path_params]
# else
# # TODO remove UnknownDirectiveError or try to find another way to get thing done
# # raise UnknownDirectiveError.new "'#{primitive_params}' is not in legal directive format"
# unknown_directive = true
end
# TODO refactor codes bellow after the above paragraph was refactored
would_be_path_params = path_param_str.strip.split(/,\s?/)
# would_be_path_params = [would_be_path_params] if would_be_path_params.kind_of?(String)
path_params = would_be_path_params unless would_be_path_params.empty?
# unknown_directive ? [nil, nil] : [asset_root, path_params.strip.split(/,\s?/)]
# TODO: add rspec examples for returning a ['', []] when the primitive_params is illegal
[asset_root, path_params]
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def split_path; end",
"def base_dir_for_path_parameters; end",
"def parts\n prefix, parts = split_names(@path)\n prefix.empty? ? parts : [prefix] + parts\n end",
"def split_path\n to_s.split_path\n end",
"def root_path=(_arg0); end",
"def root_path=(_arg0); end",
"def root_path=(_arg0); end",
"def path_comps path\n path.nil? || path.empty? ? [] : path[1..(path[-1] == \"/\" ? -2 : -1)].split('/')\n end",
"def parse_path(path_chunks)\n path = path_chunks[1]\n subpath_chunks = path.split(\"/\")\n base_dir = subpath_chunks[1]\n remaining_path = subpath_chunks[2..-1].join(\"/\")\n [base_dir, remaining_path]\n end",
"def split_nsh_path(path)\n result = [\"\",path]\n result[0] = path.split(\"/\")[2] if path.start_with?(\"//\")\n result[1] = \"/#{path.split(\"/\")[3..-1].join(\"/\")}\" if path.start_with?(\"//\") \n result\n end",
"def rel_split(fallback: true)\n\t\t\t\tif (i=components.index(\".\"))\n\t\t\t\t\tdirname=Pathname.new(components[0..i-1].join(\"/\"))\n\t\t\t\t\tbasename=Pathname.new(components[i+1..-1].join(\"/\"))\n\t\t\t\telsif fallback\n\t\t\t\t dirname=self.dirname\n\t\t\t\t basename=self.basename\n\t\t\t\tend\n\t\t\t\treturn dirname,basename\n\t\t\tend",
"def path_setup\n raise ArgumentError, \"Required path param missing\" unless path_params?\n path_params.values.join(\".\")\n end",
"def split_paths(path)\n dir_list = path.split('/').drop(1) # drops the \"\" because of the first \"/\"\n path_list = ['/'+dir_list.first]\n dir_list.drop(1).each do |dir|\n path = path_list.last + '/' + dir\n path_list.push path\n end\n path_list\nend",
"def root_dir=(_arg0); end",
"def folder\n @root_folder\n end",
"def root_path\n Pathname.new(upload_path_value).join(search_directory)\n end",
"def root\n folders.first\n end",
"def split_path(path)\n path.split(\"/\", -1)\n end",
"def get_Path(initial)\n\tinitial.split(' ',3)[1]\nend",
"def root\n '../' * file.count('/')\n end",
"def root_path(*path) File.join(root, *path) end",
"def split_wiki_path(path)\n if path == \"/\"\n [ @default_coll_name, @default_wiki_name, \"/\" ]\n else\n path = path[1..-1] if path[0] == '/'\n path = path[0..-2] if path[-1] == '/'\n path = path.gsub(%r{//+}, '/')\n\n cn, wn, pn = path.split('/', 3)\n if wn.nil?\n [ cn, @default_wiki_name, \"/\" ]\n elsif pn.nil?\n [ cn, wn, \"/\" ]\n else\n [ cn, wn, pn ]\n end\n end\n end",
"def path_roots=(_arg0); end",
"def file_get_initialization(structure = ENV[\"HOME\"]) # this is linux specific for now\n @file_information = {} # {\"/directory\"=>[\"file\"], \"/directory/directory\"=>[\"file\", \"file\"]\n files = [] \n directory = \"\"\n directories = [] \n things = structure.split('/')\n things.each do |thing|\n if thing == \"\"\n directories.push(\"/root\")\n else\n directory = \"#{directory}/#{thing}\" \n @current_directory = directory\n directories.push(\"#{directory}\") if File.directory?(\"#{directory}\")\n end\n end \n return directories\n end",
"def root_path\n attributes.fetch(:rootPath)\n end",
"def get_win_server_folder_path(ends_with_slash,starting_path,arr,sep)\n list = []\n if Dir.exists?(app_config(:win_ftp_root)) && Dir.chdir(app_config(:win_ftp_root))\n glob_value = ends_with_slash ? \"#{arr.join(sep)}/*\" : \"#{arr.join(sep)}*\"\n count = starting_path.count \"/\"\n glob_value = \"#{starting_path.split(\"/\").last}*\" if count == 1 and starting_path[0] == \"/\"\n #list=Dir.glob(glob_value)\n glob_value_dc = glob_value.downcase\n glob_value_cc = glob_value.camelcase.split(\"::\").join(\"/\")\n glob_value_uc = glob_value.upcase\n list=Dir.glob(glob_value_dc)\n list=list+Dir.glob(glob_value_cc)\n list=list+Dir.glob(glob_value_uc)\n end\n return list\n end",
"def handle_folders(subdata)\n \t\t # Single folder\n if subdata.is_a? Hash\n \t\t\t @path_components.push(subdata[:name])\n \t\t \tparse(subdata[:contents])\n \t\t \t@path_components.slice!(-1)\n # Multiple folders\n \t\t elsif subdata.is_a? Array\n \t\t \tsubdata.each do |f|\n \t\t \t\t@path_components.push(f[:name])\n \t\t \t\tparse(f[:contents])\n \t\t \t\t@path_components.slice!(-1)\n \t\t \tend\n \t\t end\n end",
"def root *folders\n File.expand_path(File.join(*([app_root, folders].flatten.uniq.tap{|path| path.delete(nil) })))\n end",
"def split_chroot(str)\n if idx = str.index('/')\n host = str[0...idx]\n chroot_path = str[idx..-1]\n\n [host, chroot_path]\n else\n [str, nil]\n end\n end",
"def paths\n {\n :homepage => '/',\n :people => '/people',\n :work => '/work',\n :labs => '/labs',\n :\"find-us\" => '/find-us',\n :\"pebbles-good-code\" => '/pebbles-good-code'\n }\nend",
"def root_path(path) File.join(root, path) end",
"def file_folder_params\n params[:file_folder]\n end",
"def retrieve_dirs(_base, dir, dot_dirs); end",
"def root( *args )\n if self.home =~ /^[a-zA-Z]:/\n self.home.to_s[0..3].fwf_filepath.join( *args )\n else\n \"/\".fwf_filepath.join( *args )\n end\n end",
"def getRoot\n @path[0]\n end",
"def defined_paths()\n return root_defined_path_part\n end",
"def root_path\n return @root_path if @root_path\n\n @root_path = @sftp.root_path\n unless @root_path == ''\n if @root_path == '/'\n @root_path = ''\n else\n @root_path = '/' + @root_path unless @root_path.match(/\\A\\//)\n @root_path = @root_path.sub(/\\/\\z/, '') if @root_path.match(/\\/\\z/)\n end\n end\n @root_path\n end",
"def root hash = {}\n root_path hash\n end",
"def figure_rootpath()\n name = File.basename(path)\n dirname = File.dirname(path)\n extname = File.extname(path)\n raise(\"Invalid property file name: '#{path}': too many underscores.\") if name.count(\"_\") > 2\n \n first_underscore = name.index('_')\n if first_underscore\n @rootpath = File.join(dirname, name[0, first_underscore] + extname)\n else\n @rootpath = path\n end\n end",
"def subdir_and_filename_for(entry)\n Pathname.new(entry).split\n end",
"def paths\n tree_path = File.join(File.dirname(__FILE__), 'rails_tree')\n [\"\", \"multitest\", \"results\"].inject([tree_path]) do |result, suffix|\n result << File.join(result[-1], suffix)\n end[1..3]\n end",
"def root_path \n @root_path\n end",
"def paths\n root.paths\n end",
"def _result_root\n\t\tresult_path = ResultPath.new\n\t\tresult_path.update @job\n\t\t@path_scheme = result_path.path_scheme\n\t\tresult_path['rootfs'] ||= 'debian-x86_64.cgz'\n\t\tresult_path['rootfs'] = rootfs_filename result_path['rootfs']\n\t\tresult_path['path_params'] = self.path_params\n\t\tresult_path._result_root\n\tend",
"def root_file_path; end",
"def root_path; end",
"def root_path; end",
"def root_path; end",
"def root(*args)\n where = ''\n where = @config.send(\"#{args.shift.to_s}_path\") if args[0].class == Symbol\n path = args\n File.expand_path File.join([@root, where, path].reject { |s| s.empty? })\n end",
"def process_params(path)\n # find symbols: \"users/show/:id/:name\" will give us [\"users/show\", \"id\", \"name\"]\n params = path.split(/\\/:/)\n # first element is path \"users/show\"\n params.shift\n # return params\n params\n end",
"def root_folder_id\n self.root_folder\n end",
"def split\n @original_route.split('/')[1..-1]\n end",
"def get_folder_name\n return folder_name = ARGV.join\nend",
"def getPathAndFilename #:doc:\n if params[:filepath]\n if params[:filepath].size == 1 # no path, just filename\n @path = \"/\"\n @filename = params[:filepath][0]\n elsif params[:filepath].size > 1\n pathparts = params[:filepath][0..-2]\n @path = \"/\" + pathparts.join(\"/\") + \"/\"\n @filename = params[:filepath][-1]\n end\n end\n end",
"def path(controller,folder, link_to_self,matter=nil)\n # the base url for a path is always the same:\n unless folder==nil\n url = url_for(:controller => controller, :action => 'folder_list', :id => nil)\n # start with the deepest folder and work your way up\n if link_to_self\n path = h(folder.name)\n id = folder.id.to_s\n # get the folders until folder doesn't have a parent anymore\n # (you're working your way up now)\n until folder.parent == nil\n folder = folder.parent\n path = truncate_hover(folder.name,18,true) + \"/\" + path + '»'\n end\n\n # Finally, make it a link...\n path = ' <a href=\"#\" onclick= \"GetFoldersList('+ id + ',true);return false;\">' + h(path) + '» </a> '\n else\n path = truncate_hover(folder.name,30,false)\n # get the folders until folder doesn't have a parent anymore\n # (you're working your way up now)\n until folder.parent == nil\n folder = folder.parent\n if controller=='workspaces'\n path =' <a href=\"#\" onclick= \"GetFoldersList('+ folder.id.to_s + ',true);return false;\">' + truncate_hover(folder.name,18,true) + '» </a> '+ path\n elsif controller=='repositories'\n path =' <a href=\"#\" onclick= \"GetFoldersListRepository('+ folder.id.to_s + ',true);return false;\">' + truncate_hover(folder.name,18,true) + '» </a> '+ path\n elsif controller=='document_homes'\n path =' <a href=\"#\" onclick= \"GetFoldersListMatter('+ folder.id.to_s + ',true,this,' + matter.id.to_s + ');return false;\">' + truncate_hover(folder.name,18,true) + '» </a> '+ path\n end\n end\n if controller=='document_homes'\n linkto = \"/matters/#{+ matter.id }/#{controller}\"\n path = '<a href=\"'+\"#{linkto }\"+'\">' +\" Root Folder\" + ' » </a> ' + path\n else\n path = '<a href=\"/' + \"#{controller}\" + '\">' +\" Root Folder\" + ' » </a> ' + path\n end\n end\n else\n path = 'Root Folder'\n end\n return path.html_safe!\n end",
"def split_path(path)\n parts = path.split('/')\n [parts[0..-2].join('/'), parts[-1]]\n end",
"def root\n @root ||= Pathname.new('.')\nend",
"def path_components\n ENV[\"PATH\"].split(File::PATH_SEPARATOR)\n end",
"def parent_directory\n File.dirname(@full_path).split('/').last\n end",
"def parent_directory\n File.dirname(@full_path).split('/').last\n end",
"def path_parts(input) # :nodoc:\n case input\n when /((?:@{1,2}|\\$|)\\w+(?:\\[[^\\]]+\\])*)([\\[\\/])(['\"])([^\\3]*)$/\n $~.to_a.slice(1, 4).push($~.pre_match)\n when /((?:@{1,2}|\\$|)\\w+(?:\\[[^\\]]+\\])*)(\\.)(\\w*)$/\n $~.to_a.slice(1, 3).push($~.pre_match)\n when /((?:@{1,2}|\\$|)\\w+)$/\n $~.to_a.slice(1, 1).push(nil).push($~.pre_match)\n else\n [ nil, nil, nil ]\n end\n end",
"def paths; end",
"def paths; end",
"def paths; end",
"def paths; end",
"def paths; end",
"def query\n parent_folders = @pattern.split('/')[0..-2]\n parent_folders << '*' if parent_folders[-1] != '*'\n File.join(*parent_folders)\n end",
"def root_path(*args)\n File.join(ROOT_DIR, *args)\nend",
"def root_path(*args)\n File.join(ROOT_DIR, *args)\nend",
"def _result_root\n result_path = ResultPath.new\n result_path.update @job\n @path_scheme = result_path.path_scheme\n result_path['rootfs'] ||= 'debian-x86_64.cgz'\n result_path['rootfs'] = rootfs_filename result_path['rootfs']\n result_path['path_params'] = self.path_params\n result_path._result_root\n end",
"def from_root(*components)\n base_path = File.join(@root_path, *components.map(&:to_s))\n Dir[base_path + '*'].first\n end",
"def urlpath\n path = cleanpath\n path.blank? ? '/root' : '/' + path\n end",
"def partial_pieces(partial_path)\n if partial_path.include?('/')\n return File.dirname(partial_path), File.basename(partial_path)\n else\n return controller.class.controller_path, partial_path\n end\n end",
"def root path\n File.dirname(find_dotjam(path))\n end",
"def split_path(path)\n path.strip.split(/[,;:\\ \\n\\t]/).map{|s| s.strip}\n end",
"def base_dir_for_path_parameters\n @base_dir_for_path_parameters ||=\n if File.basename(loaded_path).start_with?('.rubocop') &&\n loaded_path != File.join(Dir.home, ConfigLoader::DOTFILE)\n File.expand_path(File.dirname(loaded_path))\n else\n Dir.pwd\n end\n end",
"def base_dir_for_path_parameters\n @base_dir_for_path_parameters ||=\n if File.basename(loaded_path).start_with?('.rubocop') &&\n loaded_path != File.join(Dir.home, ConfigLoader::DOTFILE)\n File.expand_path(File.dirname(loaded_path))\n else\n Dir.pwd\n end\n end",
"def last_folder\n return content_path unless request.params.has_key?(\"page\")\n path = request.params[\"page\"].split('/')\n File.join(content_path, path[0..-2])\n end",
"def last_folder\n return content_path unless request.params.has_key?(\"page\")\n path = request.params[\"page\"].split('/')\n File.join(content_path, path[0..-2])\n end",
"def root_path(*args)\n relative = File.join(*args)\n return relative if relative.expand_path == relative\n root.expand_path / relative\n end",
"def root_path(*args)\n relative = File.join(*args)\n return relative if relative.expand_path == relative\n root.expand_path / relative\n end",
"def dir_name string\n string.split('/')[0..-2].join('/')\nend",
"def get_name_folder_from_path(path)\n folder_path_array = path.split('/')\n folder_path_array[folder_path_array.count - 2]\nend",
"def initial_paths; end",
"def match_root_folder(path)\n SETTINGS.each_key do |key|\n return SETTINGS[key] if path.index(SETTINGS[key]['path'])\n end\n return nil\nend",
"def convert_to_path_params_segments(some_path)\n segs = strip_bookend_slashes(some_path).split('/')\n \n return segs.map{ |seg|\n if ms = seg.match(/(?<=:)\\w+/)\n ms[0].to_sym\n else\n seg\n end\n }\n end",
"def split_all(path)\n head, tail = File.split(path)\n return [tail] if head == '.' || tail == '/'\n return [head, tail] if head == '/'\n return split_all(head) + [tail]\n end",
"def split_all(path)\n head, tail = File.split(path)\n return [tail] if head == '.' || tail == '/'\n return [head, tail] if head == '/'\n return split_all(head) + [tail]\n end",
"def root_path(*path)\n File.join(root, *path)\n end",
"def fully_split_pathname(pathname, accumulator = nil)\n accumulator ||= Array.new\n rest, last = pathname.split\n accumulator << last.to_s\n if rest.to_s == '.'\n return accumulator.reverse\n else\n return fully_split_pathname(rest, accumulator)\n end\n end",
"def guest_paths(folders)\n folders.map { |parts| parts[2] }\n end",
"def common_directory paths\n dirs = paths.map{|path| path.split('/')}\n min_size = dirs.map{|splits| splits.size}.min\n dirs = dirs.map{|splits| splits[0...min_size]}\n uncommon_idx = dirs.transpose.each_with_index.find{|dirnames, idx| dirnames.uniq.length > 1}.last\n dirs[0][0...uncommon_idx].join('/')\n end",
"def dirname(delimiter = '/', start = nil)\n prefix = self.key\n unless start.nil?\n prefix = prefix.gsub(start,'')\n end\n \n arr = prefix.split(delimiter)\n if arr.length > 1\n arr[0] + delimiter\n elsif arr.length == 1 && is_placeholder_directory?\n arr[0] + delimiter\n else\n nil\n end\n end",
"def split(path)\n array = path.kind_of?(String) ? path.split(\"/\") : path.dup\n array.shift if nil_or_empty_string?(array[0])\n array.pop if nil_or_empty_string?(array[-1])\n array\n end",
"def get_path_root\n return self if @path.nil?\n @path.get_path_root\n end",
"def path_to_parts(path)\n path.\n downcase.\n split('/').\n map { |part| part.empty? ? nil : part.strip }.\n compact\n end",
"def path_arguments\n\t\t\t\t@path_arguments ||= @path.split('/')\n\t\t\t\t\t.each_with_object(req: [], opt: []) do |part, hash|\n\t\t\t\t\t\t## Take only argument parts\n\t\t\t\t\t\tnext if part[0] != Router::ARG_CHAR\n\t\t\t\t\t\t## Clean argument from special chars\n\t\t\t\t\t\tclean_part = part.delete(\n\t\t\t\t\t\t\tRouter::ARG_CHAR + Router::ARG_CHAR_OPT\n\t\t\t\t\t\t).to_sym\n\t\t\t\t\t\t## Memorize arguments\n\t\t\t\t\t\thash[part[1] != Router::ARG_CHAR_OPT ? :req : :opt] << clean_part\n\t\t\t\t\tend\n\t\t\tend",
"def get_root\n return File.join('/root/path', SETTINGS[:project])\n end",
"def segments\n if [email protected]?\n @segments = path.split('/').select { |s| !s.empty? }\n else\n @segments\n end\n end",
"def path_dir\n File.split(path).first\n end",
"def dirs; end"
] | [
"0.7419433",
"0.68125635",
"0.66665363",
"0.6471558",
"0.6466878",
"0.6466878",
"0.6466878",
"0.64370555",
"0.63654",
"0.6343699",
"0.633626",
"0.62088364",
"0.6139807",
"0.61383957",
"0.60924304",
"0.60712314",
"0.6065899",
"0.6049092",
"0.604575",
"0.60367334",
"0.60331225",
"0.60023385",
"0.5969764",
"0.59558976",
"0.5943622",
"0.59088004",
"0.5895731",
"0.5876461",
"0.58685035",
"0.5868121",
"0.5859184",
"0.5832493",
"0.58257866",
"0.5817247",
"0.5808926",
"0.579529",
"0.5782879",
"0.5745561",
"0.57306993",
"0.57234913",
"0.5705854",
"0.57008827",
"0.56974095",
"0.5692519",
"0.5681097",
"0.5648821",
"0.5648821",
"0.5648821",
"0.56432533",
"0.56297946",
"0.56240517",
"0.56227314",
"0.56211036",
"0.5620927",
"0.5616635",
"0.5610422",
"0.5607302",
"0.56065315",
"0.56060094",
"0.56060094",
"0.5586734",
"0.55728793",
"0.55728793",
"0.55728793",
"0.55728793",
"0.55728793",
"0.5563218",
"0.5552937",
"0.5552937",
"0.5552866",
"0.5547152",
"0.5531351",
"0.55292493",
"0.5521916",
"0.55215675",
"0.5512718",
"0.5512718",
"0.5511056",
"0.5511056",
"0.5507198",
"0.5507198",
"0.55066854",
"0.5505081",
"0.5498019",
"0.5487385",
"0.54730314",
"0.5468344",
"0.5468344",
"0.54638356",
"0.5461925",
"0.5458583",
"0.54575664",
"0.5454588",
"0.54460627",
"0.5445538",
"0.5442242",
"0.54397357",
"0.5432183",
"0.5431891",
"0.542545",
"0.5422554"
] | 0.0 | -1 |
GET /api/v1/group_updates GET /api/v1/group_updates.json | def index
@api_v1_group_updates = Api::V1::GroupUpdate.all
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update\n respond_to do |format|\n if @api_v1_group_update.update(api_v1_group_update_params)\n format.html { redirect_to @api_v1_group_update, notice: 'Group update was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_group_update }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_group_update.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n if @group.update_attributes(params[:group])\n respond_with(@group, only: [:id, :name, :creator_id, :admin_id])\n else\n render_error(404, request.path, 20103, \"Failed to update group info\")\n end\n end",
"def UpdateGroup params = {}\n \n APICall(path: 'groups.json',method: 'PUT',payload: params.to_json)\n \n end",
"def create\n @api_v1_group_update = Api::V1::GroupUpdate.new(api_v1_group_update_params)\n\n respond_to do |format|\n if @api_v1_group_update.save\n format.html { redirect_to @api_v1_group_update, notice: 'Group update was successfully created.' }\n format.json { render :show, status: :created, location: @api_v1_group_update }\n else\n format.html { render :new }\n format.json { render json: @api_v1_group_update.errors, status: :unprocessable_entity }\n end\n end\n end",
"def set_api_v1_group_update\n @api_v1_group_update = Api::V1::GroupUpdate.find(params[:id])\n end",
"def update\n group = Group.find(params[:id])\n if group.update(group_params)\n render json: group\n else\n render json: group.errors.full_messages, status: :unprocessable_entity\n end\n end",
"def update\n @group = Group.find(params[:id])\n @users = @group.users\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to edit_user_registration_path, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n if @group.update(group_params)\n render_json_message({success: t('.success')}, 200)\n else\n render_json_message({errors: @group.errors.messages}, 422)\n end\n end",
"def update\n @group.update(group_params)\n respond_with(@group)\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n invite_members\n format.html { redirect_to @group, notice: t('flash.notice.groups.successfully_updated') }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n audit(@group, \"update\", @group.name)\n format.html { redirect_to group_path(@group), notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.json { head :no_content }\n else\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(params[:group])\n format.html { redirect_to [@hub, @group], :notice => 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n update_params = params_for_update\n\n errors = update_article_groups(@group, update_params)\n if errors\n render_errors(errors)\n return\n end\n\n respond_with @project do |format|\n format.json { render json: decorate_group(@group) }\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, :notice => 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n counter = 0\n groupCounter = 1\n if !params[:group].nil?\n $inspectparams = params[:group]\n params[:group].each do |group|\n if groupCounter > $groupUpdateNumber || group[:id] == \"\"\n puts \"WORKKKK\"\n break if group[:group_name] == \"\" || group[:end_time] == \"\"\n @group = current_user.groups.build(group_name: group[:group_name].downcase, end_time: group[:end_time], group_day: group[:group_day], conversation_id: group[:conversation_id], time_zone: current_user.time_zone)\n @group.save\n end\n break if group[:group_name] == \"\" || group[:end_time] == \"\"\n @groupUpdate = Group.find_by(id: group[:id])\n @groupUpdate.update(group_name: group[:group_name].downcase, end_time: group[:end_time], time_zone: current_user.time_zone) if [email protected]?\n puts \"this is @group: \" + @group.inspect.to_s\n groupCounter += 1\n counter += 1\n end\n end\n redirect_to root_path, notice: \"successfully updated your classes\"\n end",
"def update\n respond_to do |format|\n if @api_v1_group_field.update(api_v1_group_field_params)\n format.html { redirect_to @api_v1_group_field, notice: 'Group field was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_group_field }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_group_field.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, :notice => 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n\n if @group.update(group_params)\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n end",
"def update\n @group = Group.find_by_guid(params[:id])\n respond_to do |format|\n if @group.update_attributes(update_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render json: @group }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Группа обновлена!' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n# format.json { head :no_content }\nformat.json { render :json=>{'statusCode'=>'200','message'=>'Edit Group Success!','navTableId'=>'','rel'=>'','callbackType'=>'','forwardUrl'=>'','confirmMsg'=>''} }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n logger.info \"Put parameters: #{params.to_json}\"\n @group = Group.find(params[:id])\n\n if @group.update_attributes(params[:group])\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @resource.update(group_params)\n # Load records in order to refresh index page\n index\n flash[:success] = t('notices.updated_successfully')\n format.html { redirect_to @resource, warning: 'Group was successfully updated.'}\n format.json { render :show, status: :ok, location: @resource }\n else\n format.html { render :edit }\n format.json { render json: @resource.errors, status: :unprocessable_entity }\n end\n format.js\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: I18n.t(:group_update) }\n format.json { render :show, status: :ok, location: @group }\n else\n flash[:alert] = @group.errors.full_messages.to_sentence\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to [@group], notice: 'group was successfully updated.' }\n format.json { render :show, status: :ok, location: [@group] }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_list\n current_path = '/api/v1/update'\n @conn.get(current_path)\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n Log.create! description: \"<b>#{current_user.email} </b> updated group <b>#{@group.name} </b> at #{@group.updated_at.strftime '%d-%m-%Y %H:%M:%S'}\", role_id: current_user.roles.ids.first\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Le groupe a été modifié.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n \n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to(@group, :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n format.html { redirect_to @user_group, notice: 'User group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @user_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to groups_path }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update(group, tags)\n body = {:tags => tags}.to_json\n url = build_url(group)\n response = rest_patch(url, body)\n response.return!\n end",
"def update\n newparam= checker()\n respond_to do |format|\n if @group.update(newparam)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_group(optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'UpdateGroup'\n\t\targs[:region] = optional[:_region] if (optional.key? :_region)\n\t\targs[:scheme] = 'https'\n\t\tif optional.key? :_method\n\t\t\traise ArgumentError, '_method must be GET|POST' unless 'GET|POST'.split('|').include? optional[:_method]\n\t\t\targs[:method] = optional[:_method]\n\t\tend\n\t\tif optional.key? :group_name\n\t\t\targs[:query]['GroupName'] = optional[:group_name]\n\t\tend\n\t\tif optional.key? :new_comments\n\t\t\targs[:query]['NewComments'] = optional[:new_comments]\n\t\tend\n\t\tif optional.key? :new_group_name\n\t\t\targs[:query]['NewGroupName'] = optional[:new_group_name]\n\t\tend\n\t\tself.run(args)\n\tend",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n format.html { redirect_to @user_group, notice: 'User group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @user_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def get_updates(list_id, contact_id)\n get(\"contactLists/#{list_id}/#{contact_id}/updates\")\n end",
"def update_group_with_http_info(group_id, group_body_update, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: GroupsApi.update_group ...\"\n end\n # verify the required parameter 'group_id' is set\n fail ArgumentError, \"Missing the required parameter 'group_id' when calling GroupsApi.update_group\" if group_id.nil?\n # verify the required parameter 'group_body_update' is set\n fail ArgumentError, \"Missing the required parameter 'group_body_update' when calling GroupsApi.update_group\" if group_body_update.nil?\n # resource path\n local_var_path = \"/groups/{groupId}\".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)\n\n # query parameters\n query_params = {}\n query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?\n query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n local_header_accept = ['application/json']\n local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result\n\n # HTTP header 'Content-Type'\n local_header_content_type = ['application/json']\n header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(group_body_update)\n auth_names = ['basicAuth']\n data, status_code, headers = @api_client.call_api(:PUT, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'GroupEntry')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: GroupsApi#update_group\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def update\n @group = Group.find(params[:id])\n\n if @group.update_attributes(params[:group])\n flash[:notice] = t('flash_msg47')\n @groups = Group.all\n # format.html { redirect_to(@group) }\n # format.xml { head :ok }\n else\n # format.html { render :action => \"edit\" }\n # format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end",
"def get_updates\n \n # Params for testing\n #params[:deviceId] = \"E010312204098\"\n #params[:update] = TRUE\n \n # Basic parameters to be sent in the response\n result = Hash.new\n result[\"isValid\"] = FALSE\n result[\"errorMessage\"] = ''\n\n # Check if the valid device id is present in the request\n if !params[:deviceId].blank?\n result[\"deviceId\"] = params[:deviceId]\n \n # TODO: Currently if the request has a device id then treating it as a valid request have to implement device validation in the future\n result[\"isValid\"] = TRUE\n \n # The params that are to sent related to the package\n result[\"updateAvailable\"] = FALSE\n result[\"updatePackageLink\"] = ''\n \n # TODO: Currently if they are asking for the update then sending an update In the future have to check if the updates are available from the repository database\n if !params[:update].blank? && !params[:update]\n \n ## TODO: Currenting sending the dummy data\n result[\"updateAvailable\"] = TRUE\n result[\"updatePackageLink\"] = '/dummy/junk.zip'\n result[\"updatePackageSize\"] = File.size(Rails.root.to_s+\"/public/dummy/junk.zip\")\n result[\"updatePackageFileName\"] = \"junk.zip\"\n \n end\n else\n # Device id is not present in the request then sending an error message\n result[\"errorMessage\"] = \"Please send a valid device Id\"\n end\n\n # Sending the respose as json array\n respond_to do |format|\n format.json { render :json => result}\n end\n end",
"def update\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = '{object} was successfully {action}.'[:object_action_notice, \"Group\"[], \"updated\"[]]\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n Group.rebuild! if nil.|Group.find(:first).rgt\n\t @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @request_group.update(request_group_params)\n format.html { redirect_to @request_group, \n\t\t\t\t\t\t\t\t\t\t\tnotice: 'Request group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @request_group.errors, \n\t\t\t\t\t\t\t\t\t\t\tstatus: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to((current_user and current_user.is_site_admin? and current_user != @group.users.owners.first) ? by_user_groups_path(:user_id => @group.users.owners.first.id) : groups_path) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def api_v1_group_update_params\n params.fetch(:api_v1_group_update, {})\n end",
"def postGroupBulk_update( group_id, data)\n params = Hash.new\n params['group_id'] = group_id\n params['data'] = data\n return doCurl(\"post\",\"/group/bulk_update\",params)\n end",
"def update\n @group = Group.find(params[:id])\n \n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(admin_groups_url) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to params[:back_to], notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def test_update_group_basic_success\n\n client = create_mock_client\n refute_nil client, \"Client object couldn't be created.\"\n\n stub_request(:patch, mock_uri('Groups', '17'))\n .to_return(status: 202, body: { 'Success' => true,\n 'Message' => \"Operation succeeded\",\n 'ApiId' => API_ID }.to_json)\n\n status, = client.group.update_group(17, 'bogus')\n refute_nil status, \"No status object returned.\"\n assert status.success, \"Status did not indicate success: \" + status.message\n\n end",
"def update\n authorize @group\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to group_path(@group), notice: \"Group was successfully updated.\" }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n redirect_to :action => :index and return unless is_owner?\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @list_group.update(list_group_params)\n format.html { redirect_to @list_group, notice: 'List group was successfully updated.' }\n format.json { render :show, status: :ok, location: @list_group }\n else\n format.html { render :edit }\n format.json { render json: @list_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n authorize! :update, @group\n @group.creator = current_user\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @entry = Entry.find(params[:id])\n\n if (a = params.delete(:group))\n params[:entry][:group_id] = set_group(a)\n end\n\n respond_to do |format|\n if @entry.update_attributes(params[:entry])\n format.html { 'Entry was successfully updated.' }\n format.json { head :ok }\n else\n format.html { 'Foo' }\n format.json { render json: @entry.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n params[:group][:member_ids] = (params[:group][:member_ids] << @group.member_ids).flatten\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to root_path }\n format.js\n # format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n # format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @s_group.update(s_group_params)\n #format.html { redirect_to @s_group, notice: 'S group was successfully updated.' }\n format.html { redirect_to '/s_groups' }\n format.json { render :show, status: :ok, location: @s_group }\n else\n format.html { render :edit }\n format.json { render json: @s_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @field_group = FieldGroup.find(params[:id])\n @field_group.update_attributes(field_group_params)\n\n respond_with(@field_group)\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = \"Group was successfully updated.\"\n format.html { redirect_to(@group) }\n format.js # update.js.rjs\n format.xml { head :ok }\n format.json { head :ok }\n else\n flash[:error] = \"Group could not be updated.\"\n format.html { render 'edit' }\n format.js # update.js.rjs\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to( view_group_path(@group.label), :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to [:admin, @group], notice: t('activerecord.models.group') +'更新成功!' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group.name = params['name']\n @group.save\n respond_to do |format|\n format.json { render :show, status: :ok, location: @group }\n end\n end",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n flash[:notice] = \"User group <em>#{@user_group.name}</em> updated.\"\n format.html { redirect_to(@user_group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @user_group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = WorkGroup.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n \n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n @group.invite params[:invite_emails].split(',')\n\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n begin\n group = Group.find(params[:id])\n if params[:name] and group.update_attributes(name: params[:name])\n render json: { \"notice\"=>\"group name updated to #{params[:name]}\" }\n else\n render json: { \"alert\"=>\"record not updated. check your params.\" }\n end\n rescue ActiveRecord::RecordNotFound\n render json: { \"alert\"=>\"did not specify a valid id. no record updated.\" }\n end\n end",
"def update\n respond_to do |format|\n if @api_v1_groups_poll.update(api_v1_groups_poll_params)\n format.html { redirect_to @api_v1_groups_poll, notice: 'Groups poll was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_groups_poll }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_groups_poll.errors, status: :unprocessable_entity }\n end\n end\n end",
"def destroy\n @api_v1_group_update.destroy\n respond_to do |format|\n format.html { redirect_to api_v1_group_updates_url, notice: 'Group update was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def update\n respond_to do |format|\n if @usergroup.update(usergroup_params)\n format.html { redirect_to @usergroup, notice: 'User group was successfully updated.' }\n format.json { render :show, status: :ok, location: @usergroup }\n else\n format.html { render :edit }\n format.json { render json: @usergroup.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update #:nodoc:\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = I18n.t(\"{{value}} was successfully updated.\", :default => \"{{value}} was successfully updated.\", :value => I18n.t(\"Group\", :default => \"Group\"))\n format.html { redirect_to groups_url }\n # format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n # format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @groups = Group.all\n @users = User.all\n @message = Message.find(params[:id])\n if params[:message_group_ids] \n @select_group_ids = params[:message_group_ids]\n end\n if !params[:message_group_ids].nil?\n params[:message_group_ids].each do |group_id|\n user_ids = Group.find(group_id).users.collect(&:id)\n user_ids.each do |user_id|\n if !params[:message][:user_ids].include?(user_id.to_s)\n params[:message][:user_ids] << user_id.to_s\n end\n end\n end\n end\n\n respond_to do |format|\n if @message.update_attributes(params[:message])\n format.html { redirect_to @message, notice: t(:message_updated) }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @message.errors, status: :unprocessable_entity }\n end\n end\n end"
] | [
"0.7197787",
"0.68139327",
"0.6781224",
"0.6760521",
"0.671307",
"0.667855",
"0.6642351",
"0.66085577",
"0.6569267",
"0.656643",
"0.6533247",
"0.6492643",
"0.64780974",
"0.64662325",
"0.6414186",
"0.64123964",
"0.63847536",
"0.6369236",
"0.6367612",
"0.63601875",
"0.63594633",
"0.6355601",
"0.63537633",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6347923",
"0.6329827",
"0.63280904",
"0.63280904",
"0.63280904",
"0.63280904",
"0.6326127",
"0.6326127",
"0.63220423",
"0.63121885",
"0.6294999",
"0.6288169",
"0.6288169",
"0.6288169",
"0.627734",
"0.62735313",
"0.6255914",
"0.6255411",
"0.62536156",
"0.6253275",
"0.6249182",
"0.62436837",
"0.6239602",
"0.62308496",
"0.62254167",
"0.62125576",
"0.61940414",
"0.61918294",
"0.618835",
"0.6186627",
"0.61842424",
"0.6167389",
"0.61607605",
"0.61563236",
"0.6152932",
"0.6152538",
"0.6148899",
"0.61443573",
"0.6143885",
"0.6133307",
"0.61277604",
"0.6123462",
"0.6119065",
"0.6116905",
"0.6108625",
"0.60958874",
"0.609399",
"0.6082917",
"0.6075296",
"0.6073389",
"0.6072611",
"0.60681504",
"0.60681504",
"0.60676223",
"0.60676223",
"0.60676223",
"0.60676223",
"0.60676223",
"0.60676223",
"0.60649073",
"0.60646904",
"0.6059176",
"0.6056236",
"0.60401034",
"0.60378915",
"0.60349756"
] | 0.84812504 | 0 |
GET /api/v1/group_updates/1 GET /api/v1/group_updates/1.json | def show
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index\n @api_v1_group_updates = Api::V1::GroupUpdate.all\n end",
"def update\n respond_to do |format|\n if @api_v1_group_update.update(api_v1_group_update_params)\n format.html { redirect_to @api_v1_group_update, notice: 'Group update was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_group_update }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_group_update.errors, status: :unprocessable_entity }\n end\n end\n end",
"def set_api_v1_group_update\n @api_v1_group_update = Api::V1::GroupUpdate.find(params[:id])\n end",
"def create\n @api_v1_group_update = Api::V1::GroupUpdate.new(api_v1_group_update_params)\n\n respond_to do |format|\n if @api_v1_group_update.save\n format.html { redirect_to @api_v1_group_update, notice: 'Group update was successfully created.' }\n format.json { render :show, status: :created, location: @api_v1_group_update }\n else\n format.html { render :new }\n format.json { render json: @api_v1_group_update.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n if @group.update_attributes(params[:group])\n respond_with(@group, only: [:id, :name, :creator_id, :admin_id])\n else\n render_error(404, request.path, 20103, \"Failed to update group info\")\n end\n end",
"def update\n group = Group.find(params[:id])\n if group.update(group_params)\n render json: group\n else\n render json: group.errors.full_messages, status: :unprocessable_entity\n end\n end",
"def UpdateGroup params = {}\n \n APICall(path: 'groups.json',method: 'PUT',payload: params.to_json)\n \n end",
"def update\n if @group.update(group_params)\n render_json_message({success: t('.success')}, 200)\n else\n render_json_message({errors: @group.errors.messages}, 422)\n end\n end",
"def update\n respond_to do |format|\n if @api_v1_group_field.update(api_v1_group_field_params)\n format.html { redirect_to @api_v1_group_field, notice: 'Group field was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_group_field }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_group_field.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.json { head :no_content }\n else\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group.update(group_params)\n respond_with(@group)\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n audit(@group, \"update\", @group.name)\n format.html { redirect_to group_path(@group), notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n @users = @group.users\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to edit_user_registration_path, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n# format.json { head :no_content }\nformat.json { render :json=>{'statusCode'=>'200','message'=>'Edit Group Success!','navTableId'=>'','rel'=>'','callbackType'=>'','forwardUrl'=>'','confirmMsg'=>''} }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n logger.info \"Put parameters: #{params.to_json}\"\n @group = Group.find(params[:id])\n\n if @group.update_attributes(params[:group])\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n end",
"def update\n\n if @group.update(group_params)\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, :notice => 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(params[:group])\n format.html { redirect_to [@hub, @group], :notice => 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, :notice => 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find_by_guid(params[:id])\n respond_to do |format|\n if @group.update_attributes(update_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render json: @group }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n invite_members\n format.html { redirect_to @group, notice: t('flash.notice.groups.successfully_updated') }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n update_params = params_for_update\n\n errors = update_article_groups(@group, update_params)\n if errors\n render_errors(errors)\n return\n end\n\n respond_with @project do |format|\n format.json { render json: decorate_group(@group) }\n end\n end",
"def update\n respond_to do |format|\n if @resource.update(group_params)\n # Load records in order to refresh index page\n index\n flash[:success] = t('notices.updated_successfully')\n format.html { redirect_to @resource, warning: 'Group was successfully updated.'}\n format.json { render :show, status: :ok, location: @resource }\n else\n format.html { render :edit }\n format.json { render json: @resource.errors, status: :unprocessable_entity }\n end\n format.js\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Группа обновлена!' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n newparam= checker()\n respond_to do |format|\n if @group.update(newparam)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n Group.rebuild! if nil.|Group.find(:first).rgt\n\t @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n counter = 0\n groupCounter = 1\n if !params[:group].nil?\n $inspectparams = params[:group]\n params[:group].each do |group|\n if groupCounter > $groupUpdateNumber || group[:id] == \"\"\n puts \"WORKKKK\"\n break if group[:group_name] == \"\" || group[:end_time] == \"\"\n @group = current_user.groups.build(group_name: group[:group_name].downcase, end_time: group[:end_time], group_day: group[:group_day], conversation_id: group[:conversation_id], time_zone: current_user.time_zone)\n @group.save\n end\n break if group[:group_name] == \"\" || group[:end_time] == \"\"\n @groupUpdate = Group.find_by(id: group[:id])\n @groupUpdate.update(group_name: group[:group_name].downcase, end_time: group[:end_time], time_zone: current_user.time_zone) if [email protected]?\n puts \"this is @group: \" + @group.inspect.to_s\n groupCounter += 1\n counter += 1\n end\n end\n redirect_to root_path, notice: \"successfully updated your classes\"\n end",
"def update\n @group.name = params['name']\n @group.save\n respond_to do |format|\n format.json { render :show, status: :ok, location: @group }\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: I18n.t(:group_update) }\n format.json { render :show, status: :ok, location: @group }\n else\n flash[:alert] = @group.errors.full_messages.to_sentence\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def api_v1_group_update_params\n params.fetch(:api_v1_group_update, {})\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to [@group], notice: 'group was successfully updated.' }\n format.json { render :show, status: :ok, location: [@group] }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def test_update_group_basic_success\n\n client = create_mock_client\n refute_nil client, \"Client object couldn't be created.\"\n\n stub_request(:patch, mock_uri('Groups', '17'))\n .to_return(status: 202, body: { 'Success' => true,\n 'Message' => \"Operation succeeded\",\n 'ApiId' => API_ID }.to_json)\n\n status, = client.group.update_group(17, 'bogus')\n refute_nil status, \"No status object returned.\"\n assert status.success, \"Status did not indicate success: \" + status.message\n\n end",
"def update\n \n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to(@group, :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @entry = Entry.find(params[:id])\n\n if (a = params.delete(:group))\n params[:entry][:group_id] = set_group(a)\n end\n\n respond_to do |format|\n if @entry.update_attributes(params[:entry])\n format.html { 'Entry was successfully updated.' }\n format.json { head :ok }\n else\n format.html { 'Foo' }\n format.json { render json: @entry.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to params[:back_to], notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n Log.create! description: \"<b>#{current_user.email} </b> updated group <b>#{@group.name} </b> at #{@group.updated_at.strftime '%d-%m-%Y %H:%M:%S'}\", role_id: current_user.roles.ids.first\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n begin\n group = Group.find(params[:id])\n if params[:name] and group.update_attributes(name: params[:name])\n render json: { \"notice\"=>\"group name updated to #{params[:name]}\" }\n else\n render json: { \"alert\"=>\"record not updated. check your params.\" }\n end\n rescue ActiveRecord::RecordNotFound\n render json: { \"alert\"=>\"did not specify a valid id. no record updated.\" }\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Le groupe a été modifié.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n format.html { redirect_to @user_group, notice: 'User group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @user_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n format.html { redirect_to @user_group, notice: 'User group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @user_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @request_group.update(request_group_params)\n format.html { redirect_to @request_group, \n\t\t\t\t\t\t\t\t\t\t\tnotice: 'Request group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @request_group.errors, \n\t\t\t\t\t\t\t\t\t\t\tstatus: :unprocessable_entity }\n end\n end\n end",
"def update\n authorize! :update, @group\n @group.creator = current_user\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n \n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(admin_groups_url) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n redirect_to :action => :index and return unless is_owner?\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n if @group.update_attributes(params[:group])\n flash[:notice] = t('flash_msg47')\n @groups = Group.all\n # format.html { redirect_to(@group) }\n # format.xml { head :ok }\n else\n # format.html { render :action => \"edit\" }\n # format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to groups_path }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to( view_group_path(@group.label), :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n authorize @group\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to group_path(@group), notice: \"Group was successfully updated.\" }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_group(optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'UpdateGroup'\n\t\targs[:region] = optional[:_region] if (optional.key? :_region)\n\t\targs[:scheme] = 'https'\n\t\tif optional.key? :_method\n\t\t\traise ArgumentError, '_method must be GET|POST' unless 'GET|POST'.split('|').include? optional[:_method]\n\t\t\targs[:method] = optional[:_method]\n\t\tend\n\t\tif optional.key? :group_name\n\t\t\targs[:query]['GroupName'] = optional[:group_name]\n\t\tend\n\t\tif optional.key? :new_comments\n\t\t\targs[:query]['NewComments'] = optional[:new_comments]\n\t\tend\n\t\tif optional.key? :new_group_name\n\t\t\targs[:query]['NewGroupName'] = optional[:new_group_name]\n\t\tend\n\t\tself.run(args)\n\tend",
"def update\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = '{object} was successfully {action}.'[:object_action_notice, \"Group\"[], \"updated\"[]]\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def destroy\n @api_v1_group_update.destroy\n respond_to do |format|\n format.html { redirect_to api_v1_group_updates_url, notice: 'Group update was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def update\n @field_group = FieldGroup.find(params[:id])\n @field_group.update_attributes(field_group_params)\n\n respond_with(@field_group)\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to((current_user and current_user.is_site_admin? and current_user != @group.users.owners.first) ? by_user_groups_path(:user_id => @group.users.owners.first.id) : groups_path) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to [:admin, @group], notice: t('activerecord.models.group') +'更新成功!' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n \n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group_stat = GroupStat.find(params[:id])\n\n respond_to do |format|\n if @group_stat.update_attributes(params[:group_stat])\n format.html { redirect_to @group_stat, notice: 'Group stat was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group_stat.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:success] = \"Группа успешно отредактирована.\"\n format.html { redirect_to @group }\n format.json { head :no_content }\n else\n flash.now[:error] = \"Введены некорректные данные!\"\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = WorkGroup.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @s_group.update(s_group_params)\n #format.html { redirect_to @s_group, notice: 'S group was successfully updated.' }\n format.html { redirect_to '/s_groups' }\n format.json { render :show, status: :ok, location: @s_group }\n else\n format.html { render :edit }\n format.json { render json: @s_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find_by_param(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to(@group, :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @list_group.update(list_group_params)\n format.html { redirect_to @list_group, notice: 'List group was successfully updated.' }\n format.json { render :show, status: :ok, location: @list_group }\n else\n format.html { render :edit }\n format.json { render json: @list_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @add_group_to_user = AddGroupToUser.find(params[:id])\n\n respond_to do |format|\n if @add_group_to_user.update_attributes(params[:add_group_to_user])\n format.html { redirect_to @add_group_to_user, notice: 'Add group to user was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @add_group_to_user.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_group_with_http_info(group_id, group_body_update, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: GroupsApi.update_group ...\"\n end\n # verify the required parameter 'group_id' is set\n fail ArgumentError, \"Missing the required parameter 'group_id' when calling GroupsApi.update_group\" if group_id.nil?\n # verify the required parameter 'group_body_update' is set\n fail ArgumentError, \"Missing the required parameter 'group_body_update' when calling GroupsApi.update_group\" if group_body_update.nil?\n # resource path\n local_var_path = \"/groups/{groupId}\".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)\n\n # query parameters\n query_params = {}\n query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?\n query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n local_header_accept = ['application/json']\n local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result\n\n # HTTP header 'Content-Type'\n local_header_content_type = ['application/json']\n header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(group_body_update)\n auth_names = ['basicAuth']\n data, status_code, headers = @api_client.call_api(:PUT, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'GroupEntry')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: GroupsApi#update_group\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def update\n respond_to do |format|\n if @no_group.update(no_group_params)\n format.html { redirect_to @no_group, notice: 'No group was successfully updated.' }\n format.json { render :show, status: :ok, location: @no_group }\n else\n format.html { render :edit }\n format.json { render json: @no_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n params[:group][:member_ids] = (params[:group][:member_ids] << @group.member_ids).flatten\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to root_path }\n format.js\n # format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n # format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n flash[:notice] = \"User group <em>#{@user_group.name}</em> updated.\"\n format.html { redirect_to(@user_group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @user_group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update #:nodoc:\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = I18n.t(\"{{value}} was successfully updated.\", :default => \"{{value}} was successfully updated.\", :value => I18n.t(\"Group\", :default => \"Group\"))\n format.html { redirect_to groups_url }\n # format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n # format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = \"Group was successfully updated.\"\n format.html { redirect_to(@group) }\n format.js # update.js.rjs\n format.xml { head :ok }\n format.json { head :ok }\n else\n flash[:error] = \"Group could not be updated.\"\n format.html { render 'edit' }\n format.js # update.js.rjs\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n token = params[:token]\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to group_path(:id => @group.id), notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group_doc.update(group_doc_params)\n format.html { redirect_to @group_doc, notice: 'Group doc was successfully updated.' }\n format.json { render :show, status: :ok, location: @group_doc }\n else\n format.html { render :edit }\n format.json { render json: @group_doc.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @api_v1_groups_poll.update(api_v1_groups_poll_params)\n format.html { redirect_to @api_v1_groups_poll, notice: 'Groups poll was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_groups_poll }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_groups_poll.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @collection_group.update(collection_group_params)\n format.html { redirect_to @collection_group, notice: 'Collection group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @collection_group.errors, status: :unprocessable_entity }\n end\n end\n end"
] | [
"0.8411826",
"0.74082226",
"0.7403874",
"0.71012986",
"0.6935078",
"0.688075",
"0.67310935",
"0.66975343",
"0.6685838",
"0.66820216",
"0.6642552",
"0.66420054",
"0.6611828",
"0.6606429",
"0.6598093",
"0.6580875",
"0.65746933",
"0.6574039",
"0.65448606",
"0.65294564",
"0.65127295",
"0.64981854",
"0.64981854",
"0.6477186",
"0.6477186",
"0.6477186",
"0.64504075",
"0.6446312",
"0.6446144",
"0.6446144",
"0.6446144",
"0.6446144",
"0.64415246",
"0.64413714",
"0.64413714",
"0.64413714",
"0.64413714",
"0.64413714",
"0.64413714",
"0.64413714",
"0.64413714",
"0.64413714",
"0.64413714",
"0.64413714",
"0.64413714",
"0.6438969",
"0.6433382",
"0.64319843",
"0.642644",
"0.64115137",
"0.6408147",
"0.6407657",
"0.6375071",
"0.63712543",
"0.63665795",
"0.6366577",
"0.6364432",
"0.6362404",
"0.63581896",
"0.634404",
"0.6339932",
"0.6318888",
"0.630979",
"0.6299659",
"0.6297548",
"0.6296618",
"0.62807584",
"0.62632453",
"0.62499714",
"0.62497765",
"0.62471265",
"0.62470937",
"0.6237125",
"0.6234822",
"0.622387",
"0.621328",
"0.6201956",
"0.61928594",
"0.61928594",
"0.61928594",
"0.61928594",
"0.61928594",
"0.61928594",
"0.6187385",
"0.6187385",
"0.6183338",
"0.6181307",
"0.6180778",
"0.61706096",
"0.61652195",
"0.61530787",
"0.6142041",
"0.6134625",
"0.6134251",
"0.6132036",
"0.61290836",
"0.61263293",
"0.6119124",
"0.6109449",
"0.6105564",
"0.609956"
] | 0.0 | -1 |
POST /api/v1/group_updates POST /api/v1/group_updates.json | def create
@api_v1_group_update = Api::V1::GroupUpdate.new(api_v1_group_update_params)
respond_to do |format|
if @api_v1_group_update.save
format.html { redirect_to @api_v1_group_update, notice: 'Group update was successfully created.' }
format.json { render :show, status: :created, location: @api_v1_group_update }
else
format.html { render :new }
format.json { render json: @api_v1_group_update.errors, status: :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index\n @api_v1_group_updates = Api::V1::GroupUpdate.all\n end",
"def UpdateGroup params = {}\n \n APICall(path: 'groups.json',method: 'PUT',payload: params.to_json)\n \n end",
"def postGroupBulk_update( group_id, data)\n params = Hash.new\n params['group_id'] = group_id\n params['data'] = data\n return doCurl(\"post\",\"/group/bulk_update\",params)\n end",
"def update\n respond_to do |format|\n if @api_v1_group_update.update(api_v1_group_update_params)\n format.html { redirect_to @api_v1_group_update, notice: 'Group update was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_group_update }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_group_update.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n if @group.update(group_params)\n render_json_message({success: t('.success')}, 200)\n else\n render_json_message({errors: @group.errors.messages}, 422)\n end\n end",
"def update\n counter = 0\n groupCounter = 1\n if !params[:group].nil?\n $inspectparams = params[:group]\n params[:group].each do |group|\n if groupCounter > $groupUpdateNumber || group[:id] == \"\"\n puts \"WORKKKK\"\n break if group[:group_name] == \"\" || group[:end_time] == \"\"\n @group = current_user.groups.build(group_name: group[:group_name].downcase, end_time: group[:end_time], group_day: group[:group_day], conversation_id: group[:conversation_id], time_zone: current_user.time_zone)\n @group.save\n end\n break if group[:group_name] == \"\" || group[:end_time] == \"\"\n @groupUpdate = Group.find_by(id: group[:id])\n @groupUpdate.update(group_name: group[:group_name].downcase, end_time: group[:end_time], time_zone: current_user.time_zone) if [email protected]?\n puts \"this is @group: \" + @group.inspect.to_s\n groupCounter += 1\n counter += 1\n end\n end\n redirect_to root_path, notice: \"successfully updated your classes\"\n end",
"def update\n group = Group.find(params[:id])\n if group.update(group_params)\n render json: group\n else\n render json: group.errors.full_messages, status: :unprocessable_entity\n end\n end",
"def update\n if @group.update_attributes(params[:group])\n respond_with(@group, only: [:id, :name, :creator_id, :admin_id])\n else\n render_error(404, request.path, 20103, \"Failed to update group info\")\n end\n end",
"def update_group(optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'UpdateGroup'\n\t\targs[:region] = optional[:_region] if (optional.key? :_region)\n\t\targs[:scheme] = 'https'\n\t\tif optional.key? :_method\n\t\t\traise ArgumentError, '_method must be GET|POST' unless 'GET|POST'.split('|').include? optional[:_method]\n\t\t\targs[:method] = optional[:_method]\n\t\tend\n\t\tif optional.key? :group_name\n\t\t\targs[:query]['GroupName'] = optional[:group_name]\n\t\tend\n\t\tif optional.key? :new_comments\n\t\t\targs[:query]['NewComments'] = optional[:new_comments]\n\t\tend\n\t\tif optional.key? :new_group_name\n\t\t\targs[:query]['NewGroupName'] = optional[:new_group_name]\n\t\tend\n\t\tself.run(args)\n\tend",
"def update\n @group.update(group_params)\n respond_with(@group)\n end",
"def atest_ID_25862_new_post_in_group_you_manage()\n login_as_user1\n read_all_updates\n groupName = create_any_new_group(\"Open Group\", \"Family\")\n logout_common\n login_as_user2\n post_to_any_group(\"Family\",groupName)\n logout_common\n login_as_user1\n verify_updates\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n invite_members\n format.html { redirect_to @group, notice: t('flash.notice.groups.successfully_updated') }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n\n if @group.update(group_params)\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n end",
"def update\n logger.info \"Put parameters: #{params.to_json}\"\n @group = Group.find(params[:id])\n\n if @group.update_attributes(params[:group])\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.json { head :no_content }\n else\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n audit(@group, \"update\", @group.name)\n format.html { redirect_to group_path(@group), notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def test_update_group_basic_success\n\n client = create_mock_client\n refute_nil client, \"Client object couldn't be created.\"\n\n stub_request(:patch, mock_uri('Groups', '17'))\n .to_return(status: 202, body: { 'Success' => true,\n 'Message' => \"Operation succeeded\",\n 'ApiId' => API_ID }.to_json)\n\n status, = client.group.update_group(17, 'bogus')\n refute_nil status, \"No status object returned.\"\n assert status.success, \"Status did not indicate success: \" + status.message\n\n end",
"def update\n @group = Group.find(params[:id])\n @users = @group.users\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to edit_user_registration_path, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def set_api_v1_group_update\n @api_v1_group_update = Api::V1::GroupUpdate.find(params[:id])\n end",
"def update_group_with_http_info(group_id, group_body_update, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: GroupsApi.update_group ...\"\n end\n # verify the required parameter 'group_id' is set\n fail ArgumentError, \"Missing the required parameter 'group_id' when calling GroupsApi.update_group\" if group_id.nil?\n # verify the required parameter 'group_body_update' is set\n fail ArgumentError, \"Missing the required parameter 'group_body_update' when calling GroupsApi.update_group\" if group_body_update.nil?\n # resource path\n local_var_path = \"/groups/{groupId}\".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)\n\n # query parameters\n query_params = {}\n query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?\n query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n local_header_accept = ['application/json']\n local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result\n\n # HTTP header 'Content-Type'\n local_header_content_type = ['application/json']\n header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(group_body_update)\n auth_names = ['basicAuth']\n data, status_code, headers = @api_client.call_api(:PUT, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'GroupEntry')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: GroupsApi#update_group\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def update\n update_params = params_for_update\n\n errors = update_article_groups(@group, update_params)\n if errors\n render_errors(errors)\n return\n end\n\n respond_with @project do |format|\n format.json { render json: decorate_group(@group) }\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Le groupe a été modifié.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Группа обновлена!' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(params[:group])\n format.html { redirect_to [@hub, @group], :notice => 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, :notice => 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @api_v1_group_field.update(api_v1_group_field_params)\n format.html { redirect_to @api_v1_group_field, notice: 'Group field was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_group_field }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_group_field.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n @group.invite params[:invite_emails].split(',')\n\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find_by_guid(params[:id])\n respond_to do |format|\n if @group.update_attributes(update_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render json: @group }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_group\n if @ok\n @mailing_list_group.name = params[:name]\n @ok = @mailing_list_group.save\n @mailing_list_group = MailingListGroup.find @mailing_list_group_id if !@ok\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, :notice => 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @add_group_to_user = AddGroupToUser.find(params[:id])\n\n respond_to do |format|\n if @add_group_to_user.update_attributes(params[:add_group_to_user])\n format.html { redirect_to @add_group_to_user, notice: 'Add group to user was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @add_group_to_user.errors, status: :unprocessable_entity }\n end\n end\n end",
"def api_v1_group_update_params\n params.fetch(:api_v1_group_update, {})\n end",
"def update\n if request.post?\n if @group.update_attributes(params[:group])\n redirect_to :action => 'list'\n else\n render :action => 'rename'\n end\n end\n end",
"def update(group, tags)\n body = {:tags => tags}.to_json\n url = build_url(group)\n response = rest_patch(url, body)\n response.return!\n end",
"def update\n newparam= checker()\n respond_to do |format|\n if @group.update(newparam)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_group(group, attributes)\n group.update(attributes)\n end",
"def update\n @entry = Entry.find(params[:id])\n\n if (a = params.delete(:group))\n params[:entry][:group_id] = set_group(a)\n end\n\n respond_to do |format|\n if @entry.update_attributes(params[:entry])\n format.html { 'Entry was successfully updated.' }\n format.json { head :ok }\n else\n format.html { 'Foo' }\n format.json { render json: @entry.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: I18n.t(:group_update) }\n format.json { render :show, status: :ok, location: @group }\n else\n flash[:alert] = @group.errors.full_messages.to_sentence\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n Log.create! description: \"<b>#{current_user.email} </b> updated group <b>#{@group.name} </b> at #{@group.updated_at.strftime '%d-%m-%Y %H:%M:%S'}\", role_id: current_user.roles.ids.first\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n Group.rebuild! if nil.|Group.find(:first).rgt\n\t @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n begin\n group = Group.find(params[:id])\n if params[:name] and group.update_attributes(name: params[:name])\n render json: { \"notice\"=>\"group name updated to #{params[:name]}\" }\n else\n render json: { \"alert\"=>\"record not updated. check your params.\" }\n end\n rescue ActiveRecord::RecordNotFound\n render json: { \"alert\"=>\"did not specify a valid id. no record updated.\" }\n end\n end",
"def update\n @field_group = FieldGroup.find(params[:id])\n @field_group.update_attributes(field_group_params)\n\n respond_with(@field_group)\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to [@group], notice: 'group was successfully updated.' }\n format.json { render :show, status: :ok, location: [@group] }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n# format.json { head :no_content }\nformat.json { render :json=>{'statusCode'=>'200','message'=>'Edit Group Success!','navTableId'=>'','rel'=>'','callbackType'=>'','forwardUrl'=>'','confirmMsg'=>''} }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to groups_path }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n params[:group][:member_ids] = (params[:group][:member_ids] << @group.member_ids).flatten\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to root_path }\n format.js\n # format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n # format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create_full_group(creator_id, groupname, title = nil, description = nil)\n creator = User.new(creator_id, \"testuser\")\n @sling.switch_user(creator)\n #POST 1 - creating the manager sub-group\n create_pseudo_group(groupname + \"-manager\", groupname + \" Manager\", description)\n\n #POST 2 - creating the member sub-group\n create_pseudo_group(groupname + \"-member\", groupname + \" Member\", description)\n\n #POST 3 creating the main group\n group = create_target_group(groupname, title, description) #POST 3\n\n update_uri = \"/#{$USERMANAGER_URI}group/\"\n\n #POST 4 - updating the group managers\n batch_post = []\n batch_post[0] = {\"url\" => \"#{update_uri}#{groupname}-member.update.json\", \"method\" => \"POST\", \"parameters\" => {\":manager\" => \"#{groupname}-manager\",\"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post[1] = {\"url\" => \"#{update_uri}#{groupname}-manager.update.json\", \"method\" => \"POST\", \"parameters\" => {\":manager\" => \"#{groupname}-manager\",\"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post[2] = {\"url\" => \"#{update_uri}#{groupname}.update.json\", \"method\" => \"POST\", \"parameters\" => {\":manager\" => \"#{groupname}-manager\",\"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post_json = JSON.generate batch_post\n @log.debug(\"POST 4 - updating the group managersbatch post is: #{batch_post_json}\")\n @file_log.debug(\"POST 4 - updating the group managersbatch post is: #{batch_post_json}\") if (@file_log)\n parameters = {\"requests\" => batch_post_json}\n response = @sling.execute_post(@sling.url_for(\"#{$BATCH_URI}\"), parameters)\n @log.info(\"POST 4 - updating the group managers response code is: #{response.code}\")\n @file_log.info(\"POST 4 - updating the group managers response code is: #{response.code}\") if (@file_log)\n\n #POST 5 - updating the group members\n batch_post = []\n batch_post[0] = {\"url\" => \"#{update_uri}#{groupname}-manager.update.json\", \"method\" => \"POST\", \"parameters\" => {\":member\" => \"#{creator_id}\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post[1] = {\"url\" => \"#{update_uri}#{groupname}.update.json\", \"method\" => \"POST\", \"parameters\" => {\":member\" => \"#{groupname}-member\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post[2] = {\"url\" => \"#{update_uri}#{groupname}.update.json\", \"method\" => \"POST\", \"parameters\" => {\":member\" => \"#{groupname}-manager\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post_json = JSON.generate batch_post\n @log.debug(\"POST 5 - updating the group members batch post is: #{batch_post_json}\")\n @file_log.debug(\"POST 5 - updating the group members batch post is: #{batch_post_json}\") if (@file_log)\n parameters = {\"requests\" => batch_post_json}\n response = @sling.execute_post(@sling.url_for(\"#{$BATCH_URI}\"), parameters)\n @log.info(\"POST 5 - updating the group members response code is: #{response.code}\")\n @file_log.info(\"POST 5 - updating the group members response code is: #{response.code}\") if (@file_log)\n\n #POST 6 - creating test tags\n batch_post = []\n batch_post[0] = {\"url\" => \"/tags/test-tag1\", \"method\" => \"POST\", \"parameters\" => {\"sakai:tag-name\" => \"test-tag1\", \"sling:resourceType\" => \"sakai/tag\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post[1] = {\"url\" => \"/tags/test-tag2\", \"method\" => \"POST\", \"parameters\" => {\"sakai:tag-name\" => \"test-tag2\", \"sling:resourceType\" => \"sakai/tag\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post_json = JSON.generate batch_post\n @log.debug(\"POST 6 - creating test tags batch post is: #{batch_post_json}\")\n @file_log.debug(\"POST 6 - creating test tags batch post is: #{batch_post_json}\") if (@file_log)\n parameters = {\"requests\" => batch_post_json}\n response = @sling.execute_post(@sling.url_for(\"#{$BATCH_URI}\"), parameters)\n @log.info(\"POST 6 - creating test tags response code is: #{response.code}\")\n @file_log.info(\"POST 6 - creating test tags response code is: #{response.code}\") if (@file_log)\n\n #POST 7 - updating group visibility, joinability and permissions\n batch_post = []\n batch_post[0] = {\"url\" => \"#{update_uri}#{groupname}.update.html\", \"method\" => \"POST\", \"parameters\" => {\"rep:group-viewers@Delete\" => \"\", \"sakai:group-visible\" => \"public\", \"sakai:group-joinable\" => \"yes\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post[1] = {\"url\" => \"/~#{groupname}.modifyAce.html\", \"method\" => \"POST\", \"parameters\" => {\"principalId\" => \"everyone\", \"privilege@jcr:read\" => \"granted\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post[2] = {\"url\" => \"/~#{groupname}.modifyAce.html\", \"method\" => \"POST\", \"parameters\" => {\"principalId\" => \"anonymous\", \"privilege@jcr:read\" => \"granted\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post_json = JSON.generate batch_post\n @log.debug(\"POST 7 - updating group visibility, joinability and permissions batch post is: #{batch_post_json}\")\n @file_log.debug(\"POST 7 - updating group visibility, joinability and permissions batch post is: #{batch_post_json}\") if (@file_log)\n parameters = {\"requests\" => batch_post_json}\n response = @sling.execute_post(@sling.url_for(\"#{$BATCH_URI}\"), parameters)\n @log.info(\"POST 7 - updating group visibility, joinability and permissions response code is: #{response.code}\")\n @file_log.info(\"POST 7 - updating group visibility, joinability and permissions response code is: #{response.code}\") if (@file_log)\n\n #POST 8 - creating initial sakai docs\n batch_post = []\n batch_post[0] = {\"url\" => \"/system/pool/createfile\", \"method\" => \"POST\", \"parameters\" => {\"sakai:pooled-content-file-name\" => \"Library\", \"sakai:description\" => \"\", \"sakai:permissions\" => \"public\", \"sakai:copyright\" => \"creativecommons\", \\\n \"structure0\" => \"{\\\"library\\\":{\\\"_ref\\\":\\\"id9867543247\\\",\\\"_order\\\":0,\\\"_nonEditable\\\":true,\\\"_title\\\":\\\"Library\\\",\\\"main\\\":{\\\"_ref\\\":\\\"id9867543247\\\",\\\"_order\\\":0,\\\"_nonEditable\\\":true,\\\"_title\\\":\\\"Library\\\"}}}\", \\\n \"mimeType\" => \"x-sakai/document\",\"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n\n batch_post[1] = {\"url\" => \"/system/pool/createfile\", \"method\" => \"POST\", \"parameters\" => {\"sakai:pooled-content-file-name\" => \"Participants\", \"sakai:description\" => \"\", \"sakai:permissions\" => \"public\", \"sakai:copyright\" => \"creativecommons\", \\\n \"structure0\" => \"{\\\"participants\\\":{\\\"_ref\\\":\\\"id6573920372\\\",\\\"_order\\\":0,\\\"_nonEditable\\\":true,\\\"_title\\\":\\\"Participants\\\",\\\"main\\\":{\\\"_ref\\\":\\\"id6573920372\\\",\\\"_order\\\":0,\\\"_nonEditable\\\":true,\\\"_title\\\":\\\"Participants\\\"}}}\", \\\n \"mimeType\" => \"x-sakai/document\",\"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post_json = JSON.generate batch_post\n @log.debug(\"#POST 8 - creating initial sakai docs batch post is: #{batch_post_json}\")\n @file_log.debug(\"#POST 8 - creating initial sakai docs batch post is: #{batch_post_json}\") if (@file_log)\n parameters = {\"requests\" => batch_post_json}\n response = @sling.execute_post(@sling.url_for(\"#{$BATCH_URI}\"), parameters)\n @log.info(\"POST 8 - creating initial sakai docs response code is: #{response.code}\")\n @file_log.info(\"POST 8 - creating initial sakai docs response code is: #{response.code}\") if (@file_log)\n ruby_body = JSON response.body\n results = ruby_body[\"results\"]\n @log.debug(\"POST 8 - creating initial sakai docs results: #{results}\")\n @file_log.debug(\"POST 8 - creating initial sakai docs results: #{results}\") if (@file_log)\n library_doc_hash, participants_doc_hash = nil, nil\n i = 0\n results.each do |result|\n result_body_json = JSON result[\"body\"]\n content_item = result_body_json[\"_contentItem\"]\n doc_hash = content_item[\"poolId\"]\n content_item_name = content_item[\"item\"][\"sakai:pooled-content-file-name\"]\n if (\"Library\".eql? content_item_name)\n library_doc_hash = doc_hash\n elsif (\"Participants\".eql? content_item_name)\n participants_doc_hash = doc_hash\n else\n @log.warn(\"could not find sakai doc name to confirm doc_hash\")\n end\n end\n @log.info(\"POST 8 - creating initial sakai docs Library sakai doc hash: #{library_doc_hash}, Participants sakai doc hash #{participants_doc_hash}\")\n @file_log.info(\"POST 8 - creating initial sakai docs Library sakai doc hash: #{library_doc_hash}, Participants sakai doc hash #{participants_doc_hash}\") if (@file_log)\n\n #POST 9 - importing sakai docs content \n batch_post = []\n batch_post[0] = {\"url\" => \"/p/#{library_doc_hash}.resource\", \"method\" => \"POST\", \"parameters\" => {\":operation\" => \"import\", \":contentType\" => \"json\", \":replace\" => \"true\", \":replaceProperties\" => \"true\", \\\n \":content\" => \"{\\\"id9867543247\\\":{\\\"page\\\":\\\"<img id='widget_mylibrary_id1367865652332' class='widget_inline' style='display: block; padding: 10px; margin: 4px;' \\\n src='/devwidgets/mylibrary/images/mylibrary.png' data-mce-src='/devwidgets/mylibrary/images/mylibrary.png' data-mce-style='display: block; padding: 10px; margin: 4px;' border='1'><br></p>\\\"},\\\n \\\"id1367865652332\\\":{\\\"mylibrary\\\":{\\\"groupid\\\":\\\"#{groupname}\\\"}}}\",\"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n\n batch_post[1] = {\"url\" => \"/p/#{participants_doc_hash}.resource\", \"method\" => \"POST\", \"parameters\" => {\":operation\" => \"import\", \":contentType\" => \"json\", \":replace\" => \"true\", \":replaceProperties\" => \"true\", \\\n \":content\" => \"{\\\"id6573920372\\\":{\\\"page\\\":\\\"<img id='widget_participants_id439704665' class='widget_inline' style='display: block; padding: 10px; margin: 4px;' src='/devwidgets/participants/images/participants.png' \\\n data-mce-src='/devwidgets/participants/images/participants.png' data-mce-style='display: block; padding: 10px; margin: 4px;' border='1'><br></p>\\\"}, \\\n \\\"id439704665\\\":{\\\"participants\\\":{\\\"groupid\\\":\\\"#{groupname}\\\"}}}\",\"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post_json = JSON.generate batch_post\n @log.debug(\"POST 9 - importing sakai docs content batch post is: #{batch_post_json}\")\n @file_log.debug(\"POST 9 - importing sakai docs content batch post is: #{batch_post_json}\") if (@file_log)\n parameters = {\"requests\" => batch_post_json}\n response = @sling.execute_post(@sling.url_for(\"#{$BATCH_URI}\"), parameters)\n @log.info(\"POST 9 - importing sakai docs content response code is: #{response.code}\")\n @file_log.info(\"POST 9 - importing sakai docs content response code is: #{response.code}\") if (@file_log)\n ruby_body = JSON response.body\n results = ruby_body[\"results\"]\n @log.debug(\"POST 9 - importing sakai docs content results from importing sakai docs post: #{results}\")\n @file_log.debug(\"POST 9 - importing sakai docs content results from importing sakai docs post: #{results}\") if (@file_log)\n\n #POST 10 - applying the test tags\n batch_post = []\n batch_post[0] = {\"url\" => \"/~#{groupname}/public/authprofile\", \"method\" => \"POST\", \"parameters\" => {\"key\" => \"/tags/test-tag1\", \":operation\" => \"tag\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n batch_post[1] = {\"url\" => \"/~#{groupname}/public/authprofile\", \"method\" => \"POST\", \"parameters\" => {\"key\" => \"/tags/test-tag2\", \":operation\" => \"tag\", \"_charset_\" => \"utf-8\"}, \"_charset_\" => \"utf-8\"}\n @log.debug(\"resource batch post is: #{batch_post}\")\n batch_post_json = JSON.generate batch_post\n @log.debug(\"POST 10 - applying the test tags batch post is: #{batch_post_json}\")\n @file_log.debug(\"POST 10 - applying the test tags batch post is: #{batch_post_json}\") if (@file_log)\n parameters = {\"requests\" => batch_post_json}\n response = @sling.execute_post(@sling.url_for(\"#{$BATCH_URI}\"), parameters)\n @log.info(\"POST 10 - applying the test tags response code is: #{response.code}\")\n @file_log.info(\"POST 10 - applying the test tags response code is: #{response.code}\") if (@file_log)\n ruby_body = JSON response.body\n results = ruby_body[\"results\"]\n @log.debug(\"POST 10 - applying the test tags results from :operation => tag post: #{results}\")\n @file_log.debug(\"POST 10 - applying the test tags results from :operation => tag post: #{results}\") if (@file_log)\n\n\n #POST 11 - setting the global viewers and permissions on the sakai docs\n batch_post = []\n batch_post[0] = {\"url\" => \"/p/#{library_doc_hash}.members.html\", \"method\" => \"POST\", \"parameters\" => {\":viewer\" => [\"everyone\", \"anonymous\"]}}\n batch_post[1] = {\"url\" => \"/p/#{library_doc_hash}.modifyAce.html\", \"method\" => \"POST\", \"parameters\" => {\"principalId\" => [\"everyone\", \"anonymous\"], \"privilege@jcr:read\" => \"granted\"}}\n batch_post[2] = {\"url\" => \"/p/#{participants_doc_hash}.members.html\", \"method\" => \"POST\", \"parameters\" => {\":viewer\" => [\"everyone\", \"anonymous\"]}}\n batch_post[3] = {\"url\" => \"/p/#{participants_doc_hash}.modifyAce.html\", \"method\" => \"POST\", \"parameters\" => {\"principalId\" => [\"everyone\", \"anonymous\"], \"privilege@jcr:read\" => \"granted\"}}\n batch_post_json = JSON.generate batch_post\n @log.debug(\"POST 11 - setting the global viewers and permissions on the sakai docs batch post is: #{batch_post_json}\")\n @file_log.debug(\"POST 11 - setting the global viewers and permissions on the sakai docs batch post is: #{batch_post_json}\") if (@file_log)\n parameters = {\"requests\" => batch_post_json}\n response = @sling.execute_post(@sling.url_for(\"#{$BATCH_URI}\"), parameters)\n @log.info(\"POST 11 - setting the global viewers and permissions on the sakai docs response code is: #{response.code}\")\n @file_log.info(\"POST 11 - setting the global viewers and permissions on the sakai docs response code is: #{response.code}\") if (@file_log)\n ruby_body = JSON response.body\n results = ruby_body[\"results\"]\n @log.debug(\"POST 11 - setting the global viewers and permissions on the sakai docs results from setting permissions on sakai docs #{results}\")\n @file_log.debug(\"POST 11 - setting the global viewers and permissions on the sakai docs results from setting permissions on sakai docs #{results}\") if (@file_log)\n\n #POST 12 - setting the member viewer and manager viewer for the sakai docs\n batch_post = []\n batch_post[0] = {\"url\" => \"/p/#{library_doc_hash}.members.html\", \"method\" => \"POST\", \"parameters\" => {\":viewer\" => \"#{groupname}-member\", \"_charset_\" =>\"utf-8\"},\"_charset_\" => \"utf-8\"}\n batch_post[1] = {\"url\" => \"/p/#{library_doc_hash}.members.html\", \"method\" => \"POST\", \"parameters\" => {\":manager\" => \"#{groupname}-manager\", \"_charset_\" =>\"utf-8\"},\"_charset_\" => \"utf-8\"}\n batch_post[2] = {\"url\" => \"/p/#{participants_doc_hash}.members.html\", \"method\" => \"POST\", \"parameters\" => {\":viewer\" => \"#{groupname}-member\", \"_charset_\" =>\"utf-8\"},\"_charset_\" => \"utf-8\"}\n batch_post[3] = {\"url\" => \"/p/#{participants_doc_hash}.members.html\", \"method\" => \"POST\", \"parameters\" => {\":manager\" => \"#{groupname}-manager\", \"_charset_\" =>\"utf-8\"},\"_charset_\" => \"utf-8\"}\n batch_post_json = JSON.generate batch_post\n @log.debug(\"POST 12 - setting the member viewer and manager viewer for the sakai docs batch post is: #{batch_post_json}\")\n @file_log.debug(\"POST 12 - setting the member viewer and manager viewer for the sakai docs batch post is: #{batch_post_json}\") if (@file_log)\n parameters = {\"requests\" => batch_post_json}\n response = @sling.execute_post(@sling.url_for(\"#{$BATCH_URI}\"), parameters)\n @log.info(\"POST 12 - setting the member viewer and manager viewer for the sakai docs response code is: #{response.code}\")\n @file_log.info(\"POST 12 - setting the member viewer and manager viewer for the sakai docs response code is: #{response.code}\") if (@file_log)\n ruby_body = JSON response.body\n results = response.body[\"results\"]\n @log.debug(\"POST 12 - setting the member viewer and manager viewer for the sakai docs results from setting viewer and manager on sakai docs #{results}\")\n @file_log.debug(\"POST 12 - setting the member viewer and manager viewer for the sakai docs results from setting viewer and manager on sakai docs #{results}\") if (@file_log)\n\n #POST 13 - setting the doc structure on the sakai docs\n struct0 = {}\n str = \"{\\\"library\\\":{\\\"_title\\\":\\\"Library\\\",\\\"_order\\\":0,\\\"_nonEditable\\\":true,\\\"_view\\\":\\\"[\\\\\\\"everyone\\\\\\\",\\\\\\\"anonymous\\\\\\\",\\\\\\\"-member\\\\\\\"]\\\",\\\"_edit\\\":\\\"[\\\\\\\"-manager\\\\\\\"]\\\",\\\"_pid\\\":\\\"#{library_doc_hash}\\\"},\\\"participants\\\":{\\\"_title\\\":\\\"Participants\\\",\\\"_order\\\":1,\\\"_nonEditable\\\":true,\\\"_view\\\":\\\"[\\\\\\\"everyone\\\\\\\",\\\\\\\"anonymous\\\\\\\",\\\\\\\"-member\\\\\\\"]\\\",\\\"_edit\\\":\\\"[\\\\\\\"-manager\\\\\\\"]\\\",\\\"_pid\\\":\\\"#{participants_doc_hash}\\\"}}\"\n struct0[\"structure0\"] = str\n params = {}\n params[\":content\"] = JSON.generate struct0\n params[\":contentType\"] = \"json\"\n params[\":operation\"] = \"import\"\n params[\":replace\"] = true\n params[\":replaceProperties\"] = true\n params[\"_charset_\"] = \"utf-8\"\n @log.debug(\"POST 13 - setting the doc structure on the sakai docs post params are: \" + params.inspect)\n @file_log.debug(\"POST 13 - setting the doc structure on the sakai docs post params are: \" + params.inspect) if (@file_log)\n uri = \"/~#{groupname}/docstructure\"\n response = @sling.execute_post(@sling.url_for(uri), params)\n #this is an html response\n @log.info(\"POST 13 - setting the doc structure on the sakai docs response code: #{response.code}\")\n @file_log.info(\"POST 13 - setting the doc structure on the sakai docs response code: #{response.code}\") if (@file_log)\n\n # return the group that was created in create_target_group\n return group\n end",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n format.html { redirect_to @user_group, notice: 'User group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @user_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n format.html { redirect_to @user_group, notice: 'User group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @user_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n \n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to(@group, :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n authorize! :update, @group\n @group.creator = current_user\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group.name = params['name']\n @group.save\n respond_to do |format|\n format.json { render :show, status: :ok, location: @group }\n end\n end",
"def update\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = '{object} was successfully {action}.'[:object_action_notice, \"Group\"[], \"updated\"[]]\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n\t\tparams[:group][:member_ids] = (params[:group][:member_ids] << @group.member_ids).flatten\n\t\t#special method update_attribute only updates explicitly stated attribute\n\t\tif @group.update_attributes(params[:group])\n\t\t\tredirect_to @group\n\t\t\tflash[:success] = \"group updated\"\n\t\tend\n\tend",
"def update\n respond_to do |format|\n if @request_group.update(request_group_params)\n format.html { redirect_to @request_group, \n\t\t\t\t\t\t\t\t\t\t\tnotice: 'Request group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @request_group.errors, \n\t\t\t\t\t\t\t\t\t\t\tstatus: :unprocessable_entity }\n end\n end\n end",
"def update_group(group_name, options = {})\n request({\n 'Action' => 'UpdateGroup',\n 'GroupName' => group_name,\n :parser => Fog::Parsers::AWS::IAM::UpdateGroup.new\n }.merge!(options))\n end",
"def update\n @group = StudentGroup.find(params[:id])\n users= []\n respond_to do |format|\n if @group.update_attributes(params[:student_group])\n if params[\"users\"].present?\n users = users+params[\"users\"]\n end\n if params[\"students\"].present?\n users = users+params[\"students\"]\n end\n if params[\"teachers\"].present?\n users = users+params[\"teachers\"]\n end\n unless users.empty?\n UserGroup.where(:group_id=>@group.id).destroy_all\n users.uniq.each do |i|\n UserGroup.create(:group_id=>@group.id,:user_id=>i.to_i)\n end\n end\n # @group.profile.update_attributes(params[:user][:profile_attributes]) if params[:user][:profile_attributes]\n #@group.user_group.update_attributes(params[:user][:user_group_attributes]) if params[:user][:user_group_attributes]\n format.html { redirect_to group_path(@group), notice: 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_group(id, params)\n put(\"groups/#{id}\", group: params)\n end",
"def update\n @tasks_group = @tasks_group.do_before_update\n respond_to do |format|\n if @tasks_group.update(tasks_group_params)\n format.html { redirect_to @tasks_group, notice: 'Tasks group was successfully updated.' }\n format.json { render :show, status: :ok, location: @tasks_group }\n else\n format.html { render :edit }\n format.json { render json: @tasks_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n if @contact_group.update(contact_group_params)\n render json: @contact_group, status: :ok\n else\n render json: @contact_group.errors, status: :unprocessable_entity\n end\n end",
"def update\n @add_to_group = AddToGroup.find(params[:id])\n\n respond_to do |format|\n if @add_to_group.update_attributes(params[:add_to_group])\n format.html { redirect_to(@add_to_group, :notice => 'Add to group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @add_to_group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to( view_group_path(@group.label), :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n begin\n @deptgroup = Deptgroup.find(params[:id])\n\n updated_group = @@data_util.hash_data_to_upper_case(@@data_util.strip_hash_data(params[:dept_group]), ['description'])\n updated_group[:lastupdateby] = session[:username]\n\n if @deptgroup.update_attributes(updated_group)\n @@request_result[:success] = true\n @@request_result[:notice] = 'Department Sub Group was successfully updated.'\n else\n @@request_result[:errormsg] = @deptgroup.errors.full_messages[0]\n end\n rescue Exception => e\n @@request_result[:errormsg] = e.message\n end\n render json: @@request_result\n end",
"def update\n unless @group.update(group_params)\n render :edit and return\n end\n msg = [\"Updated group.\", rebuild_configs].join(\" \")\n redirect_to groups_url, notice: msg\n end",
"def update\n @group = Group.find(params[:id])\n\n if @group.update_attributes(params[:group])\n flash[:notice] = t('flash_msg47')\n @groups = Group.all\n # format.html { redirect_to(@group) }\n # format.xml { head :ok }\n else\n # format.html { render :action => \"edit\" }\n # format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end",
"def update_group(group_id, attributes)\n put(\"/v1/groups/#{group_id}\", attributes)\n end",
"def update\n @group = SuperSimpleCms::Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to super_simple_group_path(@group) } \n format.js { redirect_to formatted_super_simple_group_path(@group, :js) }\n format.xml { render :xml => @group, :status => :created, :location => @group }\n else\n format.html { render :action => \"new\" }\n format.js { render :action => \"new\", :layout=>false}\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n \n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(admin_groups_url) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to params[:back_to], notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_nodegroup(nodegroup_json, nodegroup_id)\n nodemgr_rest_call(\"POST\", \"classifier\", \"groups\", $credentials, id=nodegroup_id, nodegroup_json)\nend",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to((current_user and current_user.is_site_admin? and current_user != @group.users.owners.first) ? by_user_groups_path(:user_id => @group.users.owners.first.id) : groups_path) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n #logger.info \"Put parameters: #{params.to_json}\"\n\n if @membership.admin \n if @group.update_attributes(params[:group])\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n else \n render json: {error: \"YOU MUST BE AN ADMINISTRATOR TO COMPLETE THIS ACTION\"}, status: :unprocessable_entity\n end \n end",
"def modify_group\n group = Group.find_by_id params[:group_id]\n current_maillist = get_maillist_for_space(group.id)\n\n if params[:join_type]\n params[:join_level] = convert_join_type_to_join_level(params[:join_type])\n end\n\n if params[:leader_id] && params[:leader_id] != group.leader_id\n membership = group.group_memberships.where(user_id: params[:leader_id]).first\n return render :json => {}, :status => :bad_request unless membership\n params[:leader] = membership.user\n end\n\n if params[:maillist] != current_maillist\n render json: { valid_maillist: false }, status: :ok unless params[:maillist].empty? || maillist_is_valid?(params[:maillist])\n # params[:new_membership] = maillist_members(params[:maillist]).map { |member| Pseudonym.find_by_unique_id(member).user rescue nil}.compact\n params[:new_membership] = maillist_members(params[:maillist]).map do |member|\n pseudonym = Pseudonym.active.by_unique_id member\n pseudonym.first.user unless pseudonym.empty?\n end\n params[:new_membership].compact!\n params[:new_membership].uniq!\n end\n\n if authorized_action(group, @current_user, :update)\n respond_to do |format|\n group.transaction do\n group.update_attributes(params.permit(*SETTABLE_GROUP_ATTRIBUTES))\n if params.has_key?(:leader)\n group.leader = params[:leader]\n end\n if params.has_key?(:new_membership) && params[:new_membership].empty?\n group.group_memberships.where(\"user_id NOT IN (?)\", [group.leader]).destroy_all\n delete_maillist_for_space(group.id)\n end\n group.set_users(params[:new_membership]) if params.has_key?(:new_membership)\n set_maillist_for_space(group.id, params[:maillist]) unless params[:maillist].nil? || params[:maillist].empty?\n end\n\n if !group.errors.any?\n format.json { render :json => group_formatter(group, { include: ['users'] }), :status => :ok }\n else\n format.json { render :json => @group.errors, :status => :bad_request }\n end\n end\n end\n end",
"def update\n token = params[:token]\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to group_path(:id => @group.id), notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @s_group.update(s_group_params)\n #format.html { redirect_to @s_group, notice: 'S group was successfully updated.' }\n format.html { redirect_to '/s_groups' }\n format.json { render :show, status: :ok, location: @s_group }\n else\n format.html { render :edit }\n format.json { render json: @s_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n params[:group].delete(:domain) unless current_group.shapado_version.has_custom_domain?\n if params[:group][:languages]\n params[:group][:languages].reject! { |lang| lang.blank? }\n end\n @group.safe_update(%w[track_users name legend description default_tags subdomain logo logo_info forum enable_latex enable_mathjax\n custom_favicon language languages current_theme_id reputation_rewards daily_cap reputation_constrains\n has_adult_content registered_only enable_anonymous signup_type custom_css wysiwyg_editor layout\n fb_button notification_opts auth_providers allow_any_openid], params[:group])\n @group.share.safe_update(%w[fb_app_id fb_secret_key fb_active starts_with ends_with enable_twitter twitter_user twitter_pattern], params[:group][:share]) if params[:group][:share]\n @group.safe_update(%w[isolate domain private has_custom_analytics has_custom_html has_custom_js], params[:group]) #if current_user.admin?\n @group.safe_update(%w[analytics_id analytics_vendor], params[:group]) if @group.has_custom_analytics\n @group.custom_html.update_attributes(params[:group][:custom_html] || {}) if @group.has_custom_html\n @group.notification_opts.safe_update(%w[questions_to_twitter badges_to_twitter favorites_to_twitter answers_to_twitter comments_to_twitter], params[:group][:notification_opts]) if params[:group][:notification_opts]\n if params[:group][:language] && !params[:group]['languages']\n @group.languages = []\n end\n\n if @group.domain == AppConfig.domain ||\n @group.domain.index(AppConfig.domain).nil? ||\n @group.user.role == 'admin'\n @group.has_custom_js = true\n else\n @group.has_custom_js = false\n end\n\n if params[:group][:logo]\n @group.logo_version += 1\n end\n if params[:group][:custom_favicon]\n @group.custom_favicon_version += 1\n end\n\n respond_to do |format|\n if @group.save\n flash[:notice] = I18n.t('groups.update.notice')\n format.html {\n if params[:group][:custom_domain] && @group.has_custom_domain?\n redirect_to \"#{request.protocol}#{AppConfig.domain}:#{request.port}#{check_custom_domain_path(@group.id)}\"\n elsif params[:group][:custom_domain]\n redirect_to \"#{request.protocol}#{@group.domain}:#{request.port}/manage/properties/domain\"\n else\n redirect_to(params[:source] ? params[:source] : group_path(@group))\n end\n }\n format.json { head :ok }\n else\n format.html {\n flash[:error] = @group.errors.messages.first[1]\n redirect_to :back\n }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = \"Group was successfully updated.\"\n format.html { redirect_to(@group) }\n format.js # update.js.rjs\n format.xml { head :ok }\n format.json { head :ok }\n else\n flash[:error] = \"Group could not be updated.\"\n format.html { render 'edit' }\n format.js # update.js.rjs\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update_group(increment)\n end",
"def update!(**args)\n @group_ids = args[:group_ids] if args.key?(:group_ids)\n @id = args[:id] if args.key?(:id)\n end"
] | [
"0.7409032",
"0.7216503",
"0.7082403",
"0.70630306",
"0.6994088",
"0.6956218",
"0.67850304",
"0.67622954",
"0.67394894",
"0.6697957",
"0.66970754",
"0.6660707",
"0.66287714",
"0.657658",
"0.65713453",
"0.6562992",
"0.6539921",
"0.6532988",
"0.65196484",
"0.65185934",
"0.64540696",
"0.644843",
"0.64469516",
"0.6431989",
"0.6429262",
"0.6426722",
"0.64141816",
"0.6407102",
"0.63984406",
"0.63975465",
"0.6379204",
"0.6378282",
"0.63767314",
"0.6375741",
"0.63735586",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63678026",
"0.63580775",
"0.63557035",
"0.6353578",
"0.63489246",
"0.63489246",
"0.6337394",
"0.6337394",
"0.6337394",
"0.6337394",
"0.63294584",
"0.63261217",
"0.6320249",
"0.6320249",
"0.6320249",
"0.6316938",
"0.631164",
"0.63084835",
"0.6300059",
"0.6290192",
"0.6289622",
"0.6288092",
"0.6278543",
"0.62678605",
"0.6263773",
"0.6251506",
"0.6247954",
"0.6240684",
"0.6229594",
"0.6229467",
"0.6218253",
"0.62155116",
"0.62125766",
"0.62076735",
"0.6198553",
"0.6189693",
"0.6189331",
"0.6184865",
"0.61782444",
"0.61745673",
"0.61725307",
"0.6167605",
"0.61587214",
"0.6155034",
"0.6153477",
"0.61500907",
"0.61482865",
"0.6146833",
"0.61436796",
"0.6139043",
"0.61314046",
"0.6130666",
"0.6122216",
"0.6121106"
] | 0.7506911 | 0 |
PATCH/PUT /api/v1/group_updates/1 PATCH/PUT /api/v1/group_updates/1.json | def update
respond_to do |format|
if @api_v1_group_update.update(api_v1_group_update_params)
format.html { redirect_to @api_v1_group_update, notice: 'Group update was successfully updated.' }
format.json { render :show, status: :ok, location: @api_v1_group_update }
else
format.html { render :edit }
format.json { render json: @api_v1_group_update.errors, status: :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UpdateGroup params = {}\n \n APICall(path: 'groups.json',method: 'PUT',payload: params.to_json)\n \n end",
"def set_api_v1_group_update\n @api_v1_group_update = Api::V1::GroupUpdate.find(params[:id])\n end",
"def update\n logger.info \"Put parameters: #{params.to_json}\"\n @group = Group.find(params[:id])\n\n if @group.update_attributes(params[:group])\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n end",
"def update\n group = Group.find(params[:id])\n if group.update(group_params)\n render json: group\n else\n render json: group.errors.full_messages, status: :unprocessable_entity\n end\n end",
"def update\n respond_to do |format|\n if @api_v1_group_field.update(api_v1_group_field_params)\n format.html { redirect_to @api_v1_group_field, notice: 'Group field was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_v1_group_field }\n else\n format.html { render :edit }\n format.json { render json: @api_v1_group_field.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n if @group.update(group_params)\n render_json_message({success: t('.success')}, 200)\n else\n render_json_message({errors: @group.errors.messages}, 422)\n end\n end",
"def update\n if @group.update_attributes(params[:group])\n respond_with(@group, only: [:id, :name, :creator_id, :admin_id])\n else\n render_error(404, request.path, 20103, \"Failed to update group info\")\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.json { head :no_content }\n else\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def index\n @api_v1_group_updates = Api::V1::GroupUpdate.all\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, :notice => 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, :notice => 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @request_group.update(request_group_params)\n format.html { redirect_to @request_group, \n\t\t\t\t\t\t\t\t\t\t\tnotice: 'Request group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @request_group.errors, \n\t\t\t\t\t\t\t\t\t\t\tstatus: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n audit(@group, \"update\", @group.name)\n format.html { redirect_to group_path(@group), notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n\n if @group.update(group_params)\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n# format.json { head :no_content }\nformat.json { render :json=>{'statusCode'=>'200','message'=>'Edit Group Success!','navTableId'=>'','rel'=>'','callbackType'=>'','forwardUrl'=>'','confirmMsg'=>''} }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group.update(group_params)\n respond_with(@group)\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(params[:group])\n format.html { redirect_to [@hub, @group], :notice => 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render :action => \"edit\" }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group_request.update(group_request_params)\n format.html { redirect_to @group_request, notice: 'Group request was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group_request.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create\n @api_v1_group_update = Api::V1::GroupUpdate.new(api_v1_group_update_params)\n\n respond_to do |format|\n if @api_v1_group_update.save\n format.html { redirect_to @api_v1_group_update, notice: 'Group update was successfully created.' }\n format.json { render :show, status: :created, location: @api_v1_group_update }\n else\n format.html { render :new }\n format.json { render json: @api_v1_group_update.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @entry = Entry.find(params[:id])\n\n if (a = params.delete(:group))\n params[:entry][:group_id] = set_group(a)\n end\n\n respond_to do |format|\n if @entry.update_attributes(params[:entry])\n format.html { 'Entry was successfully updated.' }\n format.json { head :ok }\n else\n format.html { 'Foo' }\n format.json { render json: @entry.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n newparam= checker()\n respond_to do |format|\n if @group.update(newparam)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find_by_guid(params[:id])\n respond_to do |format|\n if @group.update_attributes(update_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { render json: @group }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_group_with_http_info(group_id, group_body_update, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: GroupsApi.update_group ...\"\n end\n # verify the required parameter 'group_id' is set\n fail ArgumentError, \"Missing the required parameter 'group_id' when calling GroupsApi.update_group\" if group_id.nil?\n # verify the required parameter 'group_body_update' is set\n fail ArgumentError, \"Missing the required parameter 'group_body_update' when calling GroupsApi.update_group\" if group_body_update.nil?\n # resource path\n local_var_path = \"/groups/{groupId}\".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)\n\n # query parameters\n query_params = {}\n query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?\n query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n local_header_accept = ['application/json']\n local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result\n\n # HTTP header 'Content-Type'\n local_header_content_type = ['application/json']\n header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(group_body_update)\n auth_names = ['basicAuth']\n data, status_code, headers = @api_client.call_api(:PUT, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'GroupEntry')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: GroupsApi#update_group\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def update\n authorize! :update, @group\n @group.creator = current_user\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_group(optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'UpdateGroup'\n\t\targs[:region] = optional[:_region] if (optional.key? :_region)\n\t\targs[:scheme] = 'https'\n\t\tif optional.key? :_method\n\t\t\traise ArgumentError, '_method must be GET|POST' unless 'GET|POST'.split('|').include? optional[:_method]\n\t\t\targs[:method] = optional[:_method]\n\t\tend\n\t\tif optional.key? :group_name\n\t\t\targs[:query]['GroupName'] = optional[:group_name]\n\t\tend\n\t\tif optional.key? :new_comments\n\t\t\targs[:query]['NewComments'] = optional[:new_comments]\n\t\tend\n\t\tif optional.key? :new_group_name\n\t\t\targs[:query]['NewGroupName'] = optional[:new_group_name]\n\t\tend\n\t\tself.run(args)\n\tend",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to [@group], notice: 'group was successfully updated.' }\n format.json { render :show, status: :ok, location: [@group] }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @tasks_group = @tasks_group.do_before_update\n respond_to do |format|\n if @tasks_group.update(tasks_group_params)\n format.html { redirect_to @tasks_group, notice: 'Tasks group was successfully updated.' }\n format.json { render :show, status: :ok, location: @tasks_group }\n else\n format.html { render :edit }\n format.json { render json: @tasks_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Le groupe a été modifié.' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n redirect_to :action => :index and return unless is_owner?\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: 'Группа обновлена!' }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to @group, notice: I18n.t(:group_update) }\n format.json { render :show, status: :ok, location: @group }\n else\n flash[:alert] = @group.errors.full_messages.to_sentence\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to params[:back_to], notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n format.html { redirect_to @user_group, notice: 'User group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @user_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @user_group = UserGroup.find(params[:id])\n\n respond_to do |format|\n if @user_group.update_attributes(params[:user_group])\n format.html { redirect_to @user_group, notice: 'User group was successfully updated.' }\n format.json { head :ok }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @user_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n \n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to(@group, :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def api_v1_group_update_params\n params.fetch(:api_v1_group_update, {})\n end",
"def update\n authorize @group\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to group_path(@group), notice: \"Group was successfully updated.\" }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def test_update_group_basic_success\n\n client = create_mock_client\n refute_nil client, \"Client object couldn't be created.\"\n\n stub_request(:patch, mock_uri('Groups', '17'))\n .to_return(status: 202, body: { 'Success' => true,\n 'Message' => \"Operation succeeded\",\n 'ApiId' => API_ID }.to_json)\n\n status, = client.group.update_group(17, 'bogus')\n refute_nil status, \"No status object returned.\"\n assert status.success, \"Status did not indicate success: \" + status.message\n\n end",
"def update\n begin\n group = Group.find(params[:id])\n if params[:name] and group.update_attributes(name: params[:name])\n render json: { \"notice\"=>\"group name updated to #{params[:name]}\" }\n else\n render json: { \"alert\"=>\"record not updated. check your params.\" }\n end\n rescue ActiveRecord::RecordNotFound\n render json: { \"alert\"=>\"did not specify a valid id. no record updated.\" }\n end\n end",
"def update\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = '{object} was successfully {action}.'[:object_action_notice, \"Group\"[], \"updated\"[]]\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n Group.rebuild! if nil.|Group.find(:first).rgt\n\t @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @resource.update(group_params)\n # Load records in order to refresh index page\n index\n flash[:success] = t('notices.updated_successfully')\n format.html { redirect_to @resource, warning: 'Group was successfully updated.'}\n format.json { render :show, status: :ok, location: @resource }\n else\n format.html { render :edit }\n format.json { render json: @resource.errors, status: :unprocessable_entity }\n end\n format.js\n end\n end",
"def update\n respond_to do |format|\n if @event_group.update(event_group_params)\n format.html { redirect_to @event_group, notice: 'Event group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @event_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n invite_members\n format.html { redirect_to @group, notice: t('flash.notice.groups.successfully_updated') }\n format.json { render :show, status: :ok, location: @group }\n else\n format.html { render :edit }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @collection_group.update(collection_group_params)\n format.html { redirect_to @collection_group, notice: 'Collection group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @collection_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group.name = params['name']\n @group.save\n respond_to do |format|\n format.json { render :show, status: :ok, location: @group }\n end\n end",
"def update\n respond_to do |format|\n if @group_doc.update(group_doc_params)\n format.html { redirect_to @group_doc, notice: 'Group doc was successfully updated.' }\n format.json { render :show, status: :ok, location: @group_doc }\n else\n format.html { render :edit }\n format.json { render json: @group_doc.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @s_group.update(s_group_params)\n #format.html { redirect_to @s_group, notice: 'S group was successfully updated.' }\n format.html { redirect_to '/s_groups' }\n format.json { render :show, status: :ok, location: @s_group }\n else\n format.html { render :edit }\n format.json { render json: @s_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update(group, tags)\n body = {:tags => tags}.to_json\n url = build_url(group)\n response = rest_patch(url, body)\n response.return!\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to groups_path }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n update_params = params_for_update\n\n errors = update_article_groups(@group, update_params)\n if errors\n render_errors(errors)\n return\n end\n\n respond_with @project do |format|\n format.json { render json: decorate_group(@group) }\n end\n end",
"def update\n @group = Group.find(params[:id])\n @users = @group.users\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to edit_user_registration_path, notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @field_group = FieldGroup.find(params[:id])\n @field_group.update_attributes(field_group_params)\n\n respond_with(@field_group)\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to( view_group_path(@group.label), :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @issue_group = IssueGroup.find(params[:id])\n\n respond_to do |format|\n if @issue_group.update_attributes(params[:issue_group])\n format.html { redirect_to @issue_group, notice: 'Issue group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @issue_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update(&block)\n validate_request()\n\n # Params includes all of the PATCH data at the top level along with other\n # other Rails-injected params like 'id', 'action', 'controller'. These\n # are harmless given no namespace collision and we're only interested in\n # the 'Operations' key for the actual patch data.\n #\n render(json: yield(self.safe_params()[:id], self.safe_params().to_hash()))\n end",
"def update\n respond_to do |format|\n if @group.update(group_params)\n format.html { redirect_to [:admin, @group], notice: t('activerecord.models.group') +'更新成功!' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = \"Group was successfully updated.\"\n format.html { redirect_to(@group) }\n format.js # update.js.rjs\n format.xml { head :ok }\n format.json { head :ok }\n else\n flash[:error] = \"Group could not be updated.\"\n format.html { render 'edit' }\n format.js # update.js.rjs\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n format.json { render :json => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @group_order.update(group_order_params)\n format.html { redirect_to group_orders_path, notice: 'Group order was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render json: @group_order.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n \n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(admin_groups_url) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n @group_user = GroupUser.find(params[:id])\n\n respond_to do |format|\n if @group_user.update_attributes(params[:group_user])\n format.html { redirect_to @group_user, notice: 'Group user was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group_user.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @groupaddrobj = Groupaddrobj.find(params[:id])\n\n respond_to do |format|\n if @groupaddrobj.update_attributes(params[:groupaddrobj])\n format.html { redirect_to @groupaddrobj, notice: 'Groupaddrobj was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @groupaddrobj.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n # TODO: get /groups/4/shifts/19/edit submission working\n respond_to do |format|\n if @shift.update shift_params.merge(group: @group)\n format.html { redirect_to @shift, notice: 'Shift was successfully updated.' }\n format.json { render :show, status: :ok, location: @shift }\n else\n format.html { render :edit }\n format.json { render json: @shift.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update_group_with_http_info(group, group_oid, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: UserApi.update_group ...'\n end\n # verify the required parameter 'group' is set\n if @api_client.config.client_side_validation && group.nil?\n fail ArgumentError, \"Missing the required parameter 'group' when calling UserApi.update_group\"\n end\n # verify the required parameter 'group_oid' is set\n if @api_client.config.client_side_validation && group_oid.nil?\n fail ArgumentError, \"Missing the required parameter 'group_oid' when calling UserApi.update_group\"\n end\n # resource path\n local_var_path = '/user/groups/{group_oid}'.sub('{' + 'group_oid' + '}', group_oid.to_s)\n\n # query parameters\n query_params = {}\n\n # header parameters\n header_params = {}\n header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n # HTTP header 'Content-Type'\n header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(group)\n auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']\n data, status_code, headers = @api_client.call_api(:PUT, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'GroupResponse')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: UserApi#update_group\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def update\n #logger.info \"Put parameters: #{params.to_json}\"\n\n if @membership.admin \n if @group.update_attributes(params[:group])\n head :no_content\n else\n render json: @group.errors, status: :unprocessable_entity\n end\n else \n render json: {error: \"YOU MUST BE AN ADMINISTRATOR TO COMPLETE THIS ACTION\"}, status: :unprocessable_entity\n end \n end",
"def update\n @group = Group.find(params[:id])\n \n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n group_ids = params[:group_id]\n org_id = params[:organization_id]\n @user = User.find_by_id(params[:user_id])\n current_group_ids = @user.user_group_ids\n\n respond_to do |format|\n if @user.update_attributes(full_name: params[:full_name], abbreviation: params[:abbreviation], email: params[:email], status: params[:status], staff_number: params[:employee_id], career_path: params[:career_path])\n\n is_logged = [email protected]_changes.blank?\n if current_group_ids != group_ids\n @user.user_group_ids = group_ids\n format.json { render json: @user }\n end\n else\n format.json { render json: @user.errors.messages, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find_by_param(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n format.html { redirect_to(@group, :notice => 'Group was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update!(**args)\n @group_ids = args[:group_ids] if args.key?(:group_ids)\n @id = args[:id] if args.key?(:id)\n end",
"def update\n respond_to do |format|\n if @service_group.update(service_group_params)\n format.html { redirect_to @service_group, notice: 'Service group was successfully updated.' }\n format.json { render :show, status: :ok, location: @service_group }\n else\n format.html { render :edit }\n format.json { render json: @service_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = Group.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:success] = \"Группа успешно отредактирована.\"\n format.html { redirect_to @group }\n format.json { head :no_content }\n else\n flash.now[:error] = \"Введены некорректные данные!\"\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n\n respond_to do |format|\n if @group.update_attributes(group_params)\n format.html { redirect_to @group.becomes(Group), notice: 'Group was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @add_group_to_user = AddGroupToUser.find(params[:id])\n\n respond_to do |format|\n if @add_group_to_user.update_attributes(params[:add_group_to_user])\n format.html { redirect_to @add_group_to_user, notice: 'Add group to user was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit\" }\n format.json { render json: @add_group_to_user.errors, status: :unprocessable_entity }\n end\n end\n end",
"def im_group_update_with_http_info(group_id, body, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: IMGroupsApi.im_group_update ...'\n end\n # verify the required parameter 'group_id' is set\n if @api_client.config.client_side_validation && group_id.nil?\n fail ArgumentError, \"Missing the required parameter 'group_id' when calling IMGroupsApi.im_group_update\"\n end\n # verify the required parameter 'body' is set\n if @api_client.config.client_side_validation && body.nil?\n fail ArgumentError, \"Missing the required parameter 'body' when calling IMGroupsApi.im_group_update\"\n end\n # resource path\n local_var_path = '/im/groups/{groupId}'.sub('{' + 'groupId' + '}', group_id.to_s)\n\n # query parameters\n query_params = {}\n\n # header parameters\n header_params = {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])\n # HTTP header 'Content-Type'\n header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(body)\n auth_names = ['OAuth']\n data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names)\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: IMGroupsApi#im_group_update\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def update\n respond_to do |format|\n if @task_group.update(task_group_params)\n format.html { redirect_to @task_group, notice: 'Task group was successfully updated.' }\n format.json { render :show, status: :ok, location: @task_group }\n else\n format.html { render :edit }\n format.json { render json: @task_group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n @group = WorkGroup.find(params[:id])\n\n respond_to do |format|\n if @group.update_attributes(params[:group])\n flash[:notice] = 'Group was successfully updated.'\n format.html { redirect_to(@group) }\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def update\n if @contact_group.update(contact_group_params)\n render json: @contact_group, status: :ok\n else\n render json: @contact_group.errors, status: :unprocessable_entity\n end\n end"
] | [
"0.7528402",
"0.719816",
"0.7180273",
"0.7174812",
"0.7164367",
"0.7097414",
"0.70363265",
"0.7021937",
"0.6970352",
"0.6967853",
"0.69457227",
"0.6942222",
"0.69401973",
"0.6938227",
"0.6938227",
"0.6938227",
"0.6938227",
"0.6933088",
"0.6929036",
"0.69111985",
"0.6902384",
"0.6902384",
"0.6895832",
"0.6895832",
"0.6895832",
"0.6870276",
"0.6849285",
"0.68484086",
"0.68359953",
"0.67927915",
"0.67927915",
"0.67927915",
"0.67927915",
"0.67927915",
"0.67927915",
"0.67927915",
"0.67927915",
"0.67927915",
"0.67927915",
"0.67927915",
"0.67927915",
"0.6784184",
"0.67821765",
"0.6780986",
"0.6776053",
"0.67680985",
"0.6760543",
"0.67581195",
"0.67537385",
"0.67349285",
"0.6730621",
"0.6717398",
"0.67096627",
"0.6693412",
"0.6679271",
"0.6675887",
"0.66650546",
"0.666028",
"0.6658499",
"0.6653853",
"0.66381586",
"0.662913",
"0.6618669",
"0.66148895",
"0.6597008",
"0.65949494",
"0.6594939",
"0.6592529",
"0.6582416",
"0.6569465",
"0.656744",
"0.6565998",
"0.6562499",
"0.6555845",
"0.6549461",
"0.6543384",
"0.6539147",
"0.65390706",
"0.65291744",
"0.65274495",
"0.6512908",
"0.6493788",
"0.6492606",
"0.6477969",
"0.6473978",
"0.64702195",
"0.6467455",
"0.6460959",
"0.6455611",
"0.64539087",
"0.64539087",
"0.64535666",
"0.6453406",
"0.64466983",
"0.6446052",
"0.64428127",
"0.6438744",
"0.6437833",
"0.64324456",
"0.6429518"
] | 0.7731694 | 0 |
DELETE /api/v1/group_updates/1 DELETE /api/v1/group_updates/1.json | def destroy
@api_v1_group_update.destroy
respond_to do |format|
format.html { redirect_to api_v1_group_updates_url, notice: 'Group update was successfully destroyed.' }
format.json { head :no_content }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DeleteGroup id\n \n APICall(path: \"groups/#{id}.json\",method: 'DELETE')\n \n end",
"def destroy\n @group_request.destroy\n respond_to do |format|\n format.html { redirect_to group_requests_url }\n format.json { head :no_content }\n end\n end",
"def deleteGroup( group_id)\n params = Hash.new\n params['group_id'] = group_id\n return doCurl(\"delete\",\"/group\",params)\n end",
"def delete(group)\n url = build_url(group)\n response = rest_delete(url)\n response.return!\n end",
"def destroy\n group = Group.find(params[:id])\n group.destroy\n render json: {}\n end",
"def destroy\n @api_v1_group_field.destroy\n respond_to do |format|\n format.html { redirect_to api_v1_group_fields_url, notice: 'Group field was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @request_group.destroy\n respond_to do |format|\n format.html { redirect_to request_groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n # @group = @hub.groups.get(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to hub_groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group_stat = GroupStat.find(params[:id])\n @group_stat.destroy\n\n respond_to do |format|\n format.html { redirect_to group_stats_url }\n format.json { head :no_content }\n end\n end",
"def delete(group_id)\n if expired?(@begin_time)\n @auth = get_auth(@api_key)\n end\n Log.debug(\"#{@base_url}#{@get_post_delete_url}#{group_id}\")\n user_group = RestClient.delete \"#{@base_url}#{@get_post_delete_url}#{group_id}\", header\n end",
"def destroy\n begin\n group = Group.find(params[:id])\n group.destroy\n render json: { \"notice\"=>\"group deleted successfully\" }\n rescue ActiveRecord::RecordNotFound\n render json: { \"alert\"=>\"did not specify a valid id. no record deleted.\" }\n end\n end",
"def destroy\n @group_key.destroy\n respond_to do |format|\n format.html { redirect_to group_keys_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :ok }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :ok }\n end\n end",
"def remove_user_from_group(user_id, group_id)\n @url = \"http://#{$canvas_host}/api/v1/groups/#{group_id}/users/#{user_id}\"\n puts \"@url is #{@url}\"\n\n @deleteResponse = HTTParty.delete(@url, :headers => $header)\n puts(\" DELETE to remove user from group has Response.code #{@deleteResponse.code} and getResponse is #{@deleteResponse}\")\nend",
"def service_group_delete(a10, name)\n a10.send(:axapi, 'slb.service_group.delete', 'post', {name: name, format: 'json'})\nend",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :ok }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n #@s_group.destroy\n @s_group = SGroup.find(params[:id].to_i)\n @s_group.delete_flg = 1\n @s_group.save!\n\n respond_to do |format|\n format.html { redirect_to s_groups_url, notice: 'S group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find_by_guid(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find_by_slug_or_id(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.json { head :ok }\n end\n end",
"def destroy\n if @group.destroy\n render_json_message({:success => t('.success')}, 200)\n else\n render_json_message({:errors => @group.errors.messages}, 422)\n end\n end",
"def destroy\n @user_group = UserGroup.find_by_id(params[:id])\n @user_group.destroy\n render :json=>{:status =>t('users.destroy.success')}\n end",
"def destroy\n Group.rebuild! if nil.|Group.find(:first).rgt\n\t @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n head :no_content\n end",
"def destroy\n @groups = Group.find(params[:id])\n @groups.destroy\n\n respond_to do |format|\n format.html { redirect_to users_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n audit(@group, \"destroy\", @group.name )\n respond_to do |format|\n format.html { redirect_to groups_path, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n authorize! :destroy, @group\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group_client.destroy\n respond_to do |format|\n format.html { redirect_to group_clients_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to root_path, notice: 'Le groupe a été supprimé.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @esol_group = EsolGroup.find(params[:id])\n @esol_group.destroy\n\n respond_to do |format|\n format.html { redirect_to esol_groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @contact_group.destroy\n\n render json: @contact_group, status: :ok\n end",
"def destroy\n @groupon = Groupon.find(params[:id])\n @groupon.destroy\n\n respond_to do |format|\n format.html { redirect_to groupons_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @api_v1_initiative_group.destroy\n respond_to do |format|\n format.html { redirect_to api_v1_initiative_groups_url, notice: 'Initiative group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n if @group.destroy\n render json: {result: 1}\n else\n render json: {result: 0}\n end\n end",
"def destroy\n Group.destroy(params[:id])\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n # format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @event_group.destroy\n respond_to do |format|\n format.html { redirect_to event_groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n \n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group.destroy\n\n head :no_content\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_path, notice: 'group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to @index_url, notice: \"#{@group_model.to_s} was successfully destroyed.\" }\n format.json { head :no_content }\n end\n end",
"def destroy\n @user_group = UserGroup.find(params[:id])\n @user_group.destroy\n\n respond_to do |format|\n format.html { redirect_to user_groups_url }\n format.json { head :ok }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n flash[:success] = \"Group successfully deleted\"\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group_event = GroupEvent.find(params[:id])\n @group_event.destroy\n\n respond_to do |format|\n format.html { redirect_to groups_events_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group_doc.destroy\n respond_to do |format|\n format.html { redirect_to group_docs_url, notice: 'Group doc was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @reagent_group = ReagentGroup.find(params[:id])\n @reagent_group.destroy\n\n respond_to do |format|\n format.html { redirect_to reagent_groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @user_group = UserGroup.find(params[:id])\n @user_group.destroy\n\n respond_to do |format|\n format.html { redirect_to user_groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @groupaddrobj = Groupaddrobj.find(params[:id])\n @groupaddrobj.destroy\n\n respond_to do |format|\n format.html { redirect_to groupaddrobjs_url }\n format.json { head :no_content }\n end\n end",
"def test_delete_group_basic_success\n\n client = create_mock_client\n refute_nil client, \"Client object couldn't be created.\"\n\n stub_request(:delete, mock_uri('Groups', '17'))\n .to_return(status: 204)\n\n status, = client.group.delete_group(17)\n refute_nil status, \"No status object returned.\"\n assert status.success, \"Status did not indicate success: \" + status.message.to_s\n\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to admin_groups_url, notice: t('activerecord.models.group') +'删除成功!' }\n format.json { head :no_content }\n end\n end",
"def delete_group\n @mailing_list_group.destroy if @ok\n render 'update_list'\n end",
"def destroy\n @group_event.destroy\n respond_to do |format|\n format.html { redirect_to group_events_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(admin_groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @add_to_group = AddToGroup.find(params[:id])\n @add_to_group.destroy\n\n respond_to do |format|\n format.html { redirect_to(add_to_groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @eventgroup = Eventgroup.find(params[:id])\n @eventgroup.destroy\n\n respond_to do |format|\n format.html { redirect_to eventgroups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @customers_group.destroy\n\n respond_to do |format|\n format.html { redirect_to customers_groups_url }\n format.json { head :ok }\n end\n end",
"def destroy\n @customers_group.destroy\n\n respond_to do |format|\n format.html { redirect_to customers_groups_url }\n format.json { head :ok }\n end\n end",
"def destroy\n\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @add_group_to_user = AddGroupToUser.find(params[:id])\n @add_group_to_user.destroy\n\n respond_to do |format|\n format.html { redirect_to add_group_to_users_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n flash[:success] = \"Группа успешно удалена.\"\n format.html { redirect_to groups_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @api_v1_group_category.destroy\n respond_to do |format|\n format.html { redirect_to api_v1_group_categories_url, notice: 'Group category was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group = Group.find(params[:id])\n @group.destroy\n\n respond_to do |format|\n format.html { redirect_to(groups_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @group.destroy\n respond_to do |format|\n format.html { redirect_to groups_url, notice: 'Группа удалена!' }\n format.json { head :no_content }\n end\n end"
] | [
"0.72380424",
"0.7027809",
"0.69768375",
"0.6949575",
"0.6931553",
"0.69150966",
"0.691265",
"0.6902129",
"0.683739",
"0.6833909",
"0.68336076",
"0.68322176",
"0.6831413",
"0.6831413",
"0.6826274",
"0.6825714",
"0.6807084",
"0.6807084",
"0.6807084",
"0.6807084",
"0.6807084",
"0.6807084",
"0.68053657",
"0.68053657",
"0.6802929",
"0.67973197",
"0.67973197",
"0.67973197",
"0.67973197",
"0.67973197",
"0.67765516",
"0.6767705",
"0.6763138",
"0.6751978",
"0.6731646",
"0.67313623",
"0.67204845",
"0.6654048",
"0.6649135",
"0.66432947",
"0.66314054",
"0.6629044",
"0.66224366",
"0.6621054",
"0.66184664",
"0.66053843",
"0.6597308",
"0.65971965",
"0.65963674",
"0.65930927",
"0.65850323",
"0.65829164",
"0.6582194",
"0.65802616",
"0.6578015",
"0.6577453",
"0.6577164",
"0.65767",
"0.6570687",
"0.65705305",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.65685815",
"0.6566974",
"0.6566777",
"0.65639013",
"0.6562419",
"0.6558882",
"0.6556387",
"0.6555478",
"0.655236",
"0.65499836",
"0.654991",
"0.654991",
"0.6549745",
"0.6549745",
"0.6539109",
"0.6533644",
"0.6531145",
"0.6528298",
"0.6528298",
"0.6528298",
"0.6528298",
"0.6528298",
"0.6528298",
"0.6528298",
"0.6528298",
"0.6526548"
] | 0.8158721 | 0 |
Use callbacks to share common setup or constraints between actions. | def set_api_v1_group_update
@api_v1_group_update = Api::V1::GroupUpdate.find(params[:id])
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"def action_hook; end",
"def run_actions; end",
"def define_action_hook; end",
"def actions; end",
"def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_eval do\n define_method(:valid?) do |*args|\n self.class.state_machines.fire_event_attributes(self, :save, false) { super(*args) }\n end\n end\n end\n end",
"def add_actions; end",
"def callbacks; end",
"def callbacks; end",
"def setup *actions, &proc\n (@setup_procs ||= []) << [proc, actions.size > 0 ? actions : [:*]]\n end",
"def define_action_helpers; end",
"def post_setup\n end",
"def action_methods; end",
"def action_methods; end",
"def action_methods; end",
"def before_setup; end",
"def action_run\n end",
"def execute(setup)\n @action.call(setup)\n end",
"def define_action_helpers?; end",
"def set_actions\n actions :all\n end",
"def action_done(action)\n dispatch = { :migrate => :done_migrating, :map => :done_mapping, :reduce =>\n :done_reducing, :finalize => :done_finalizing } \n self.send dispatch[action[:action]], action\n end",
"def dependencies action, &block\n @actions.each do |other|\n if action[:requires].include? other[:provide]\n block.call other\n end\n end\n end",
"def setup!\n return unless @setup_procs\n http_actions = actions\n @setup_procs.each do |setup_proc|\n proc, actions = setup_proc\n @setup__actions = actions.map do |action|\n\n action.is_a?(Regexp) ?\n http_actions.select { |a| a.to_s =~ action } :\n action.is_a?(String) && action =~ /\\A\\./ ?\n http_actions.map { |a| a.to_s << action if format?(a).include?(action) }.compact :\n action\n\n end.flatten\n self.class_exec &proc\n @setup__actions = nil\n end\n @setup_procs = nil\n end",
"def before_actions(*logic)\n self.before_actions = logic\n end",
"def setup_handler\n end",
"def set_action(opts)\n opts = check_params(opts,[:actions])\n super(opts)\n end",
"def setup(action)\n @targets.clear\n unless action.item.target_filters.empty?\n @targets = SES::TargetManager.make_targets(action)\n else\n item = action.item\n if item.for_opponent?\n @targets = $game_troop.alive_members\n elsif item.for_dead_friend?\n @targets = $game_party.battle_members.select { |actor| actor.dead? }\n else\n $game_party.battle_members.select { |actor| actor.alive? }\n end\n end\n @item_max = @targets.size\n create_contents\n refresh\n show\n activate\n end",
"def action; end",
"def action; end",
"def action; end",
"def action; end",
"def action; end",
"def workflow\n end",
"def revisable_shared_setup(args, block)\n class << self\n attr_accessor :revisable_options\n end\n options = args.extract_options!\n self.revisable_options = Options.new(options, &block)\n \n self.send(:include, Common)\n self.send(:extend, Validations) unless self.revisable_options.no_validation_scoping?\n self.send(:include, WithoutScope::QuotedColumnConditions)\n end",
"def setup\n @action = SampleActionAndroid.new(os_name: 'android',\n app_name: APP_PATH)\n end",
"def before(action)\n invoke_callbacks *self.class.send(action).before\n end",
"def process_action(...)\n send_action(...)\n end",
"def before_dispatch(env); end",
"def after_actions(*logic)\n self.after_actions = logic\n end",
"def setup\n # override and do something appropriate\n end",
"def setup(client)\n return unless @setup\n actions = @setup['setup'].select { |action| action['do'] }.map { |action| Action.new(action['do']) }\n actions.each do |action|\n action.execute(client)\n end\n self\n end",
"def setup(_context)\n end",
"def setup(resources) ; end",
"def validate_actions\n errors.add(:base, :should_give_at_least_one_action) if !manage? && !forecasting? && !read? && !api?\n end",
"def setup\n @resource_config = {\n :callbacks => {\n :before_create => nil,\n :after_create => nil,\n :before_update => nil,\n :after_update => nil,\n :before_destroy => nil,\n :after_destroy => nil,\n },\n :child_assoc => nil,\n :model => nil,\n :parent => nil,\n :path => nil,\n :permission => {},\n :properties => {},\n :relation => {\n :create => nil,\n :delete => nil,\n },\n :roles => nil,\n }\n end",
"def determine_valid_action\n\n end",
"def process_shared\n handle_taxes\n handle_shippings\n create_adjustments_from_params\n handle_status\n handle_inventory_refunds\n handle_payment_transactions\n order.updater.update\n end",
"def startcompany(action)\n @done = true\n action.setup\n end",
"def init_actions\n am = action_manager()\n am.add_action(Action.new(\"&Disable selection\") { @selection_mode = :none; unbind_key(32); bind_key(32, :scroll_forward); } )\n am.add_action(Action.new(\"&Edit Toggle\") { @edit_toggle = !@edit_toggle; $status_message.value = \"Edit toggle is #{@edit_toggle}\" })\n end",
"def event_callbacks(event, metadata={})\n case event\n when :reset, :review\n if confirmed\n update_attributes(confirmed: false)\n end\n when :confirm\n confirm\n # trigger :order for all applicable items\n # NOTE: :order event is common to both physical and digital items\n items.each do |i|\n if i.event_permitted(:order)\n user_id = last_transition.user_id\n i.trigger!(:order, { order_id: id, user_id: user_id })\n end\n end\n when :complete_work\n request = metadata[:request]\n work_complete_notification(request)\n when :close\n close\n end\n if event != :close && !open\n reopen\n end\n end",
"def setup_action\n return unless PONY::ERRNO::check_sequence(current_act)\n new_sequence = @action_sequence[@sequence_index+1...@action_sequence.size]\n @sequence_index = 0\n new_sequence = DND::SkillSequence::ACTS[@acts[1]] + new_sequence\n execute_sequence\n end",
"def define_tasks\n define_weave_task\n connect_common_tasks\n end",
"def setup(&block)\n define_method(:setup, &block)\n end",
"def setup\n transition_to(:setup)\n end",
"def setup\n transition_to(:setup)\n end",
"def action\n end",
"def setup( *args )\n\t\t\tself.class.setupBlocks.each {|sblock|\n\t\t\t\tdebugMsg \"Calling setup block method #{sblock}\"\n\t\t\t\tself.send( sblock )\n\t\t\t}\n\t\t\tsuper( *args )\n\t\tend",
"def config(action, *args); end",
"def setup\n @setup_proc.call(self) if @setup_proc\n end",
"def before_action \n end",
"def setup_callbacks\n defined_callbacks.each do |meth|\n unless respond_to?(\"call_#{meth}_callbacks\".to_sym)\n self.class.module_eval <<-EOE\n def call_#{meth}_callbacks(*args)\n plugin_store.each {|a| a.call_#{meth}_callbacks(*args) } if respond_to?(:plugin_store) && plugin_store\n self.send :#{meth}, *args if respond_to?(:#{meth})\n end\n EOE\n end\n end\n end",
"def action\n end",
"def matt_custom_action_begin(label); end",
"def setup\n # override this if needed\n end",
"def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend",
"def setup\n\t\t\t\t\t\t# Do nothing\n\t\t\t\tend",
"def action(options,&callback)\n new_action = Action===options ? options : Action.new(options,&callback)\n # replace any with (shared name/alias or both default) + same arity\n @actions.delete_if do |existing_action|\n ((existing_action.names & new_action.names).size > 0 ||\n existing_action.default? && new_action.default?) &&\n existing_action.required.size == new_action.required.size &&\n existing_action.optional.size <= new_action.optional.size\n end\n @actions = (@actions + [new_action]).sort\n new_action\n end",
"def set_target_and_action target, action\n self.target = target\n self.action = 'sugarcube_handle_action:'\n @sugarcube_action = action\n end",
"def after(action)\n invoke_callbacks *options_for(action).after\n end",
"def pre_task\n end",
"def setup(server)\n server.on('beforeMethod', method(:before_method), 10)\n end",
"def add_actions\n attribute = machine.attribute\n name = self.name\n \n owner_class.class_eval do\n define_method(name) {self.class.state_machines[attribute].events[name].fire(self)}\n define_method(\"#{name}!\") {self.class.state_machines[attribute].events[name].fire!(self)}\n define_method(\"can_#{name}?\") {self.class.state_machines[attribute].events[name].can_fire?(self)}\n end\n end",
"def init_actions\n @select_action = SelectAction.new\n @endpoint_mouse_action = EndpointMouseAction.new\n @move_action = MoveAction.new\n end",
"def setup_signals; end",
"def after_created\r\n return unless compile_time\r\n Array(action).each do |action|\r\n run_action(action)\r\n end\r\nend",
"def after_created\r\n return unless compile_time\r\n Array(action).each do |action|\r\n run_action(action)\r\n end\r\nend",
"def set_target_and_action target, action\n self.target = target\n self.action = 'sugarcube_handle_action:'\n @sugarcube_action = action.respond_to?('weak!') ? action.weak! : action\n end",
"def initialize(*args)\n super\n @action = :set\nend",
"def after_set_callback; end",
"def setup\n #implement in subclass;\n end",
"def lookup_action; end",
"def setup &block\n if block_given?\n @setup = block\n else\n @setup.call\n end\n end",
"def setup_action\n return TSBS.error(@acts[0], 1, @used_sequence) if @acts.size < 2\n actions = TSBS::AnimLoop[@acts[1]]\n if actions.nil?\n show_action_error(@acts[1])\n end\n @sequence_stack.push(@acts[1])\n @used_sequence = @acts[1]\n actions.each do |acts|\n @acts = acts\n execute_sequence\n break if @break_action\n end\n @sequence_stack.pop\n @used_sequence = @sequence_stack[-1]\n end",
"def release_actions; end",
"def around_hooks; end",
"def save_action; end",
"def setup(easy)\n super\n easy.customrequest = @verb\n end",
"def action_target()\n \n end",
"def setup\n callback(:setup) do\n notify(:setup)\n migration_check.last_deployed_commit\n end\n end",
"def setup\n return unless @setup\n\n actions = @setup['setup'].select { |action| action['do'] }.map { |action| Action.new(action['do']) }\n run_actions_and_retry(actions)\n self\n end",
"def before_setup\n # do nothing by default\n end",
"def my_actions(options)\n @setup = false\n get_template_part(\"custom_used\",\"action_users\",true)\n end",
"def default_action; end",
"def setup(&blk)\n @setup_block = blk\n end",
"def callback_phase\n super\n end",
"def advice\n end",
"def _handle_action_missing(*args); end",
"def duas1(action)\n action.call\n action.call\nend",
"def shared_action(name, &block)\n @controller.shared_actions[name] = block\n end",
"def before_action action, &block\n @audience[:before][action] ||= Set.new\n @audience[:before][action] << block\n end",
"def setup_initial_state\n\n state_a = State.new(\"a\", 0)\n state_b = State.new(\"b\", 0)\n state_c = State.new(\"c\", 10)\n\n move_to_b = Action.new(\"move_to_b\", 1, state_b)\n\n move_to_c = Action.new(\"move_to_c\", 1, state_c)\n\n state_a.actions = [move_to_b, move_to_c]\n\n return state_a\n \nend"
] | [
"0.6163163",
"0.6045976",
"0.5946146",
"0.591683",
"0.5890051",
"0.58349305",
"0.5776858",
"0.5703237",
"0.5703237",
"0.5652805",
"0.5621621",
"0.54210985",
"0.5411113",
"0.5411113",
"0.5411113",
"0.5391541",
"0.53794575",
"0.5357573",
"0.53402257",
"0.53394014",
"0.53321576",
"0.53124547",
"0.529654",
"0.5296262",
"0.52952296",
"0.52600986",
"0.52442724",
"0.52385926",
"0.52385926",
"0.52385926",
"0.52385926",
"0.52385926",
"0.5232394",
"0.523231",
"0.5227454",
"0.52226824",
"0.52201617",
"0.5212327",
"0.52079266",
"0.52050185",
"0.51754695",
"0.51726824",
"0.51710224",
"0.5166172",
"0.5159343",
"0.51578903",
"0.51522785",
"0.5152022",
"0.51518047",
"0.51456624",
"0.51398855",
"0.5133759",
"0.5112076",
"0.5111866",
"0.5111866",
"0.5110294",
"0.5106169",
"0.509231",
"0.50873137",
"0.5081088",
"0.508059",
"0.50677156",
"0.50562143",
"0.5050554",
"0.50474834",
"0.50474834",
"0.5036181",
"0.5026331",
"0.5022976",
"0.5015441",
"0.50121695",
"0.5000944",
"0.5000019",
"0.4996878",
"0.4989888",
"0.4989888",
"0.49864885",
"0.49797225",
"0.49785787",
"0.4976161",
"0.49683493",
"0.4965126",
"0.4958034",
"0.49559742",
"0.4954353",
"0.49535993",
"0.4952725",
"0.49467874",
"0.49423352",
"0.49325448",
"0.49282882",
"0.49269363",
"0.49269104",
"0.49252945",
"0.4923091",
"0.49194667",
"0.49174926",
"0.49173003",
"0.49171105",
"0.4915879",
"0.49155936"
] | 0.0 | -1 |
Never trust parameters from the scary internet, only allow the white list through. | def api_v1_group_update_params
params.fetch(:api_v1_group_update, {})
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end",
"def allow_params_authentication!; end",
"def allowed_params\n ALLOWED_PARAMS\n end",
"def default_param_whitelist\n [\"mode\"]\n end",
"def param_whitelist\n [:role, :title]\n end",
"def expected_permitted_parameter_names; end",
"def safe_params\n params.except(:host, :port, :protocol).permit!\n end",
"def strong_params\n params.require(:team_member).permit(param_whitelist)\n end",
"def permitir_parametros\n \t\tparams.permit!\n \tend",
"def strong_params\n params.require(:community).permit(param_whitelist)\n end",
"def permitted_strong_parameters\n :all #or an array of parameters, example: [:name, :email]\n end",
"def strong_params\n params.require(:education).permit(param_whitelist)\n end",
"def restricted_params\n #params.require(self.controller_name.classify.underscore.to_sym).permit([])\n raise(\"No strong params set, override restricted_params method in your controller. E.g. params.require(:model).permit(:attribute1, :attribute2)\")\n end",
"def allowed_params\n params.require(:user).permit(:username, :email, :password, :password_confirmation)\n end",
"def param_whitelist\n [:rating, :review]\n end",
"def param_whitelist\n whitelist = [\n :username, :name,\n :parent_id,\n :headline, :description, :video,\n :policy, :signup_mode, :category,\n :website, :facebook, :twitter, :linkedin,\n :founded_at,\n privacy: [\n :events,\n :resources\n ],\n permission: [\n :profile,\n :members,\n :children,\n :statistics,\n :posts,\n :listings,\n :resources,\n :events\n ],\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n \n if action_name === 'update'\n whitelist.delete(:parent_id)\n unless current_user.role_in(@community) === 'owner'\n whitelist.delete(:privacy)\n whitelist.delete(:permission)\n end\n end\n \n whitelist\n end",
"def param_whitelist\n if @user.present? && current_user != @user\n return [:followed]\n end\n \n whitelist = [\n :username, :email, :password,\n :first_name, :last_name,\n :birthday, :gender,\n :headline, :biography, :ask_about, :focus,\n :website, :facebook, :linkedin, :twitter, :github,\n roles: [],\n skills: [],\n interests: [],\n privacy: { contact: [] },\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n \n if action_name === 'update'\n whitelist.delete(:email)\n whitelist.delete(:password)\n end\n \n whitelist\n end",
"def user_params \n \tparams.require(:user).permit(:name, :email, :password, :password_confirmation)# preventing CSTR\n end",
"def user_params\n params.permit(:name, :phoneNumber, :address, :postalCode, :local, :link, :counter, :latitude, :longitude) \n end",
"def valid_params_request?; end",
"def strong_params\n params.require(:experience).permit(param_whitelist)\n end",
"def trim_whitelisted(params, whitelist)\n # remove any parameters that are not whitelisted\n params.each do |key, value|\n # if white listed\n if whitelist.include? key\n # strip the parameters of any extra spaces, save as string\n params[key] = value.to_s.strip\n else\n # delete any unauthorized parameters\n params.delete key\n end\n end\n params\n end",
"def whitelist_url_params\n params.require(:whitelist_url).permit(:domain)\n end",
"def allowed_params\n params.require(:allowed).permit(:email)\n end",
"def permitted_params\n []\n end",
"def trim_whitelisted(params, whitelist)\n # remove any parameters that are not whitelisted\n params.each do |key, value|\n # if white listed\n if whitelist.include? key\n # strip the parameters of any extra spaces, save as string\n params[key] = value.to_s.strip\n else\n # delete any unauthorized parameters\n params.delete key\n end\n end\n params\n end",
"def safe_params\n params.permit(:id, :name, :origin, :emails => []); #emails is an array\n end",
"def query_param\n\t\tparams.permit(:first_name, :last_name, :phone)\n\tend",
"def strong_params\n params.require(:success_metric).permit(param_whitelist)\n end",
"def devise_filter\r\n logger.debug(\"In devise_filter =>PARAMS: #{params.inspect}\")\r\n\r\n # White list for sign_up\r\n devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(user_whitelist) }\r\n\r\n # White list for account update\r\n devise_parameter_sanitizer.for(:account_update) { |u| u.permit(user_whitelist, :current_password) }\r\n\r\n # White list for Invitation creation\r\n devise_parameter_sanitizer.for(:invite) { |u| u.permit(:account_type, :email, :invitation_token)}\r\n\r\n # White list for accept invitation\r\n devise_parameter_sanitizer.for(:accept_invitation) { |u| u.permit(user_whitelist, :invitation_token)}\r\n\r\n end",
"def whitelisted_user_params\n params.require(:user).\n permit( :first_name, :last_name, :email,:password,:password_confirmation,:birthday,:gender)\n end",
"def user_params\n ActionController::Parameters.permit_all_parameters = true\n params.require(:user) #.permit(:name, :surname, :phone, :password, :email, :time_zone)\n end",
"def strong_params\n params.require(:metric_change).permit(param_whitelist)\n end",
"def safe_params\n params.require(:user).permit(:name)\n end",
"def get_params\n\t\treturn ActionController::Parameters.new(self.attributes).permit(\"account_id\", \"title\", \"category\", \"introduction\", \"tags\", \"segment_type\", \"visible\", \"status\", \"main_image\")\n\tend",
"def grant_params\n @whitelisted = params.require(:grant).permit(:name, :description, :agency_id, :acronym)\n end",
"def check_params; true; end",
"def param_whitelist\n whitelist = [\n :description,\n :progress,\n :kpi_id\n ]\n \n unless action_name === 'create'\n whitelist.delete(:kpi_id)\n end\n \n whitelist\n end",
"def quote_params\n params.permit!\n end",
"def valid_params?; end",
"def paramunold_params\n params.require(:paramunold).permit!\n end",
"def user_params\n\t\tparams.permit(:nickname, :avatar, :description, :password, :gender, :birthday, :email, :phone, :qq_id, :wechat_id)\n\tend",
"def filtered_parameters; end",
"def user_params\n params.permit(\n \t:id,\n \t:email, \n \t:first_name, \n \t:last_name, \n \t:password, \n \t:confirm_token, \n \t:phone_number,\n \t:facebook_link,\n \t:car_model,\n \t:license_plate)\n end",
"def filtering_params\n params.permit(:email, :name)\n end",
"def check_params\n true\n end",
"def wx_public_params\n params.require(:wx_public).permit(:nickname, :manager, :alias)\n end",
"def allowed_params\n params.require(:user).permit(:email, :password, :role, :first_name, :last_name, :password_confirmation)\n end",
"def allowed_params\n params.require(:user).permit(:email, :password, :role, :first_name, :last_name, :password_confirmation)\n end",
"def listing_params\n\t\tparams.permit(:address, :transit_info, :rules, :other_info, :lat, :lng)\n\tend",
"def social_account_params\n\t\t\tparams.require(:social_account).permit!\n\t\tend",
"def safe_params\n resurce_name = self.class.resource_name\n params_method_name = \"#{resurce_name}_params\".to_sym\n if params[resurce_name]\n if respond_to?(params_method_name) || private_methods.include?(params_method_name)\n send(params_method_name)\n else\n raise ActiveModel::ForbiddenAttributesError, \"Please, define the '#{params_method_name}' method in #{self.class.name}\"\n end\n end\n end",
"def url_params\n params.require(:url).permit(:short_url, :original_url, :clicks, :ip_addresses)\n end",
"def user_params\n params.require(:user).permit(:uri, :username, :password, :realname, :email, :publicvisible)\n end",
"def model_params\n\t\tparams.require(:manager).permit(\n\t :user_name,\n :password,\n :email,\n \t\t\t)\n\tend",
"def article_params_whitelist\n params.require(:article).permit(:title, :description, category_ids: [])\n end",
"def college_whitelist_params\n params.require(:college_whitelist).permit(:status)\n end",
"def active_code_params\n params[:active_code].permit\n end",
"def filtering_params\n params.permit(:email)\n end",
"def valid_params(params)\n params.permit(:user_id, :photo_id, :originX, :originY, :width, :height)\n end",
"def ip_address_params\n\t\t\tparams.require(:ip_address).permit!\n end",
"def pull_request_params\n whitelist = [\n :url,\n :id,\n :html_url,\n :diff_url,\n :patch_url,\n :issue_url,\n :number,\n :state,\n :locked,\n :title\n ]\n params.require(:pull_request).permit(whitelist)\n end",
"def reserved_params\n params.require(:reserved).permit(:name, :email, :pax, :address, :KTP, :title)\n end",
"def post_params\n if current_user.admin? \n params.permit(:title, :body, :city, :country, :gps_location, :privacy, :visible, :latitude, :longitude, images: [], files: [])\n else \n params.permit(:title, :body, :city, :country, :gps_location, :privacy,:latitude, :longitude, images: [], files: [])\n end \n end",
"def list_params\n params.permit(:name)\n end",
"def filter_parameters; end",
"def filter_parameters; end",
"def vineyard_params\n params.permit(:vineyard_name, :email, :website_url, :phone, :address, :city, :region, :postcode, :country, :specialty, :description, :pet_friendly, :holiday, :tours, :events, :family_friendly, :cover_image, :image_one, :image_two, :image_three, :image_four, :user_id, :base64)\n end",
"def available_activity_params\n # params.require(:available_activity).permit(:type,:geometry,:properties)\n whitelisted = ActionController::Parameters.new({\n type: params.require(:available_activity)[:type],\n geometry: params.require(:available_activity)[:geometry].try(:permit!).to_h,\n properties: params.require(:available_activity)[:properties].try(:permit!).to_h\n }).try(:permit!)\n end",
"def user_params\n params.permit(:name, :username, :email, :password, :img_url, :bg_url, :coinbank)\n end",
"def user_params_pub\n\t \tparams[:user].permit(:hruid)\n\t end",
"def user_params\n params.permit(:id, :email, :password, :nickname, :status, :avatar, :flat_picture, :flatsharing_id, :member,\n :user, :color, :solde)\n end",
"def validate_search_inputs\n @whitelisted = params.fetch(:user, nil)\n if @whitelisted.blank?\n render_error(400, \"#{I18n.t('general_error.params_missing_key')}\": [I18n.t('general_error.params_missing_value', model: \"review\")])\n return\n else\n @whitelisted = @whitelisted.permit(:name, :uen, :description)\n end\n end",
"def param_whitelist\n [\n :title,\n :description,\n :organization,\n :team_id,\n :started_at,\n :finished_at,\n location: [\n :description,\n :street,\n :city,\n :state,\n :zip,\n :country,\n :latitude,\n :longitude\n ]\n ]\n end",
"def url_whitelist; end",
"def admin_social_network_params\n params.require(:social_network).permit!\n end",
"def filter_params\n params.require(:filters).permit(:letters)\n end",
"def origin_params\n params.permit(:country, :state, :city, :postal_code, :address, :description)\n end",
"def valid_params(params)\n params.permit(:login, :first_name, :last_name, \n :password, :password_confirmation)\n end",
"def sensitive_params=(params)\n @sensitive_params = params\n end",
"def permit_request_params\n params.permit(:address)\n end",
"def user_params\n # Ensure a user can't give themselves admin priveleges\n params.delete(:admin) if current_user.admin?\n params.require(:user).permit(:name, :email, :admin, :image)\n end",
"def secure_params\n params.require(:location).permit(:name)\n end",
"def strong_params\n params.require( :setting ).\n permit( :global_scan_limit, :per_user_scan_limit,\n :target_whitelist_patterns, :target_blacklist_patterns )\n end",
"def question_params\n params.require(:survey_question).permit(question_whitelist)\n end",
"def case_insensitive_params\n params.require(:case_insensitive).permit(:name)\n end",
"def empire_master_no_match_params\n params.require(:empire_master_no_match).permit(:uid, :last_name, :list, :search_date, :double, :source)\n end",
"def maintenance_request_params\n params[:maintenance_request].permit! #allow all parameters for now\n end",
"def unwanted_params\n params.require(:unwanted).permit(:title, :description, :image)\n end",
"def url_params\n params[:url].permit(:full)\n end",
"def backend_user_params\n params.permit!\n end",
"def filter_params\n\t\treturn params[:candidate].permit(:name_for_filter)\n\tend",
"def speed_measurement_params\n\n #fuckit, to lazy to deal with permit crap right now\n ActionController::Parameters.permit_all_parameters = true\n\n params[:speed_measurement]\n end",
"def user_params\n params.permit(:name, :age, :username, :display_photo, :password)\n end",
"def get_params\r\n #params.require(:article).permit(:title, :permalink, :content, :source_site, :introtext, :type_id, :order_by, :searchable, :created_by, :edited_by, :published_by, :published_on, :user_id)\r\n params.require(:article).permit!\r\n\r\n end",
"def pub_params\n params.require(:pub).permit(:name, :description, :phone, :email, :hidden, :city_id, :address)\n end",
"def pass_params\n params[:pass].permit(:name, :price, :description, :colour, :events)\n end",
"def droptraining_params\n params.permit(:training_id,:user_id, :utf8, :authenticity_token, :commit)\n end",
"def person_params\n # params whitelist does *not* include admin, sub, remember_token\n # TBD: share this whitelist with the list used by configuration_permitted_parameters\n # TBD: should current_password be on this list? -- for now, leaving off, since it seems to work without\n # NOTE: do not include 'admin' in this list!\n params.require(:person).permit(\n :name, \n :email, \n :description,\n :password, \n :password_confirmation\n )\n end",
"def parameter_params\n params.require(:parameter).permit(:name, :description, :param_code, :param_value, :active_from, :active_to)\n end"
] | [
"0.69792545",
"0.6781151",
"0.67419964",
"0.674013",
"0.6734356",
"0.6591046",
"0.6502396",
"0.6496313",
"0.6480641",
"0.6477825",
"0.64565",
"0.6438387",
"0.63791263",
"0.63740575",
"0.6364131",
"0.63192815",
"0.62991166",
"0.62978333",
"0.6292148",
"0.6290449",
"0.6290076",
"0.62894756",
"0.6283177",
"0.6242471",
"0.62382483",
"0.6217549",
"0.6214457",
"0.6209053",
"0.6193042",
"0.6177802",
"0.6174604",
"0.61714715",
"0.6161512",
"0.6151757",
"0.6150663",
"0.61461",
"0.61213595",
"0.611406",
"0.6106206",
"0.6105114",
"0.6089039",
"0.6081015",
"0.6071004",
"0.60620916",
"0.6019971",
"0.601788",
"0.6011056",
"0.6010898",
"0.6005122",
"0.6005122",
"0.6001556",
"0.6001049",
"0.59943926",
"0.5992201",
"0.59909594",
"0.5990628",
"0.5980841",
"0.59669393",
"0.59589154",
"0.5958826",
"0.5957911",
"0.5957385",
"0.5953072",
"0.59526145",
"0.5943361",
"0.59386164",
"0.59375334",
"0.59375334",
"0.5933856",
"0.59292704",
"0.59254247",
"0.5924164",
"0.59167904",
"0.59088355",
"0.5907542",
"0.59064597",
"0.5906243",
"0.5898226",
"0.589687",
"0.5896091",
"0.5894501",
"0.5894289",
"0.5891739",
"0.58860534",
"0.5882406",
"0.587974",
"0.58738774",
"0.5869024",
"0.58679986",
"0.5867561",
"0.5865932",
"0.5864461",
"0.58639693",
"0.58617616",
"0.5861436",
"0.5860451",
"0.58602303",
"0.5854586",
"0.58537364",
"0.5850427",
"0.5850199"
] | 0.0 | -1 |
to display it in old roman numberals | def old_roman_numeral(num)
@romanNumeral = ""
while num > 0
quotient, modulus = num.divmod(1000)
if quotient > 0 #using a divisor
@romanNumeral << ("M" * quotient) #using divisor again
num = modulus #using modulus
elsif
num / 500 > 0
@romanNumeral << ("D" * (num/500))
num %= 500
elsif
if num / 100 > 0
@romanNumeral << ("C" * (num/100))
num %= 100
elsif
num / 90 > 0
@romanNumeral << ("XC" * (num/90))
num %= 90
end
elsif
if num / 50 > 0
@romanNumeral << ("L" * (num/50))
num %= 50
elsif
num / 40 > 0
@romanNumeral << ("XL" * (num/40))
num %= 40
end
elsif
if num / 10 > 0
@romanNumeral << ("X" * (num/10))
num %= 10
elsif
num / 9 > 0
@romanNumeral << ("IX" * (num/9))
num %= 9
end
elsif
num / 5 > 0
@romanNumeral << ("V" * (num/5))
num %= 5
else
if
num / 4 > 0
@romanNumeral << ("I" * (num/4))
num %= 4
else
num / 1 > 0
@romanNumeral << ("I" * (num/1))
num %= 1
end
end
end
@romanNumeral
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_roman(num)\n \n output = ''\n\n if num\n how_many_thousand = (num - num % 1000) / 1000\n num = num - (num - num % 1000)\n\n how_many_hundred = (num - num % 100) / 100\n num = num - (num - num % 100)\n\n how_many_tens = (num - num % 10) / 10\n num = num - (num - num % 10)\n\n how_many_ones = num - (num - num % 10)\n else\n \treturn nil\n end\n\n #adding thousands\n output << 'M' * how_many_thousand\n #adding hundreds\n if how_many_hundred == 9\n \t output << 'CM'\n \telsif how_many_hundred >= 5\n \t output << 'D' + 'C' * (how_many_hundred - 5)\n elsif how_many_hundred == 4\n output << 'CD'\n else\n output << \"C\" * how_many_hundred\n end\n #adding tens\n if how_many_tens == 9\n \t output << 'XC'\n \telsif how_many_tens >= 5 \n \t output << 'L' + 'X' * (how_many_tens - 5)\n elsif how_many_tens == 4\n output << 'XL'\n else\n output << \"X\" * how_many_tens\n end\n #adding ones\n if how_many_ones == 9\n \t output << 'IX'\n \telsif how_many_ones >= 5 \n \t output << 'V' + 'I' * (how_many_ones - 5)\n elsif how_many_ones == 4\n output << 'IV'\n else\n output << \"I\" * how_many_ones\n end\n\n output\n\nend",
"def old_roman_numeral num\n orn = ''\n \torn += 'M' * (num/1000)\n \tnum = num % 1000\n \torn += 'D' * (num/500)\n \tnum = num % 500\n \torn += 'C' * (num/100)\n \tnum = num % 100\n \torn += 'L' * (num/50)\n \tnum = num % 50\n \torn += 'X' * (num/10)\n \tnum = num % 10\n \torn += 'V' * (num/5)\n \tnum = num % 5\n \torn += 'I' * (num)\n \treturn orn\nend",
"def to_roman\n\n roman = ''\n\n roman = roman + 'M' * (self / 1000)\n roman = roman + 'D' * (self % 1000 / 500)\n roman = roman + 'C' * (self % 500 / 100)\n roman = roman + 'L' * (self % 100 / 50)\n roman = roman + 'X' * (self % 50 / 10)\n roman = roman + 'V' * (self % 10 / 5)\n roman = roman + 'I' * (self % 5 / 1)\n\n roman\n end",
"def old_roman_string num\n raise \"Use positive integer\" if num <= 0\n roman_str = ''\nroman_str << 'M' * (num /1000)\nroman_str << 'D' * (num % 1000 / 500)\nroman_str << 'C' * (num % 500 / 100)\nroman_str << 'L' * (num % 100 / 50)\nroman_str << 'X' * (num % 50 / 10)\nroman_str << 'V' * (num % 10 / 5)\nroman_str << 'I' * (num % 5 / 1)\n\n#build up the strings by * H,T,U\nend",
"def old_roman_numeral num\nnumerals = \"\"\nnumerals << \"M\" * (num / 1000)\nnumerals << \"D\" * (num % 1000 /500)\nnumerals << \"C\" * (num % 500 / 100)\nnumerals << \"L\" * (num % 100 / 50)\nnumerals << \"X\" * (num % 50 / 10)\nnumerals << \"V\" * (num % 10 / 5)\nnumerals << \"I\" * (num % 5 / 1)\nnumerals\nend",
"def to_roman\n roman = ''\n\n roman = roman + 'M' * (self / 1000)\n roman = roman + 'D' * (self % 1000 / 500)\n roman = roman + 'C' * (self % 500 / 100)\n roman = roman + 'L' * (self % 100 / 50)\n roman = roman + 'X' * (self % 50 / 10)\n roman = roman + 'V' * (self % 10 / 5)\n roman = roman + 'I' * (self % 5 / 1)\n\n roman\n\n end",
"def to_roman(num)\nend",
"def to_roman(num)\nend",
"def to_roman2 number\t\r\n\t@roman = ''\r\n\tmarker = ['I','V','X','L','C','D','M']\r\n\t(0..Math.log10(number).to_i).each do |i|\r\n\t\tputs i\r\n\t\t@unit_number = (number % (10^(i+1)))/10^i\r\n\t\tputs @unit_number\t\r\n\t\t@roman = @roman + show_power_of_ten(@unit_number,marker[2*i+2],marker[2*i+1],marker[2*i])\t\r\n\tend\r\n\[email protected]\r\nend",
"def old_school_roman (y)\n\troman = \"\"\n\troman << \"M\" * (y / 1000)\n\troman << \"D\" * (y % 1000 / 500)\n\troman << \"C\" * (y % 500 / 100)\n\troman << \"L\" * (y % 100 / 50)\n\troman << \"X\" * (y % 50 / 10)\n\troman << \"V\" * (y % 10 / 5)\n\troman << \"I\" * (y % 5 / 1)\n\troman\nend",
"def new_roman_numeral(number)\n \n roman = \"\"\n\n thousands_place = number/1000\n hundreds_place = (number%1000)/100\n tens_place = (number%100)/10\n ones_place = (number%10)\n\n roman << \"M\"*thousands_place\n\n if hundreds_place == 9\n roman << \"CM\"\n elsif hundreds_place == 4\n roman << \"CD\"\n else\n roman = roman << 'D' * (number%1000 /500)\n roman = roman << 'C' * (number%500 /100)\n end\n\n if tens_place == 9\n roman << \"XC\"\n elsif tens_place == 4\n roman << \"XL\"\n else\n roman = roman << 'L' * (number%100 /50)\n roman = roman << 'X' * (number%50 /10)\n end\n\n\n if ones_place == 9\n roman << \"IX\"\n elsif ones_place == 4\n roman << \"IV\"\n else\n roman = roman << 'V' * (number%10 /5)\n roman = roman << 'I' * (number%5)\n end\n \n\n\nend",
"def old_roman_numberals num\n roman = \"\"\n roman += \"M\" * (num/1000)\n roman += \"D\" * ((num%1000)/500)\n roman += \"C\" * ((num%500)/100)\n roman += \"L\" * ((num%100)/50)\n roman += \"X\" * ((num%50)/10)\n roman += \"V\" * ((num%10)/5)\n roman += \"I\" * ((num%5)/1)\nputs roman\nend",
"def roman number\n\t\nm_length = 0\nd_length = 0\nc_length = 0\nl_length = 0\nx_length = 0\nv_length = 0\ni_length = 0\n\nif number >= 1000\n\tm_length = number/1000\n\tnumber = number%1000\nend\nif number >= 500\n\td_length = number/500\n\tnumber = number%500\nend\nif number >= 100\n\tc_length = number/100\n\tnumber = number%100\nend\nif number >= 50\n\tl_length = number/50\n\tnumber = number%50\nend\nif number >= 10\n\tx_length = number/10\n\tnumber = number%10\nend\nif number >= 5\n\tv_length = number/5\n\tnumber = number%5\nend\nif number < 5\n\ti_length = number/1\n\tnumber = number%10\nend\n\nputs 'M'*m_length + 'D'*d_length + 'C'*c_length + 'L'*l_length + \"X\"*x_length + \"V\"*v_length + \"I\"*i_length\n\nend",
"def to_roman\n n = self\n roman = ''\n ROMAN_NUMBERS.each do |value, letter|\n roman << letter * (n / value)\n n = n % value\n end\n roman\n end",
"def get_roman()\n num = @number\n answer = \"\"\n# you can also use: If num >= 10 \n\n while num >= 10\n answer += \"X\"\n num -= 10\n end\n if num == 9\n answer += \"IX\"\n num -= 9\n end\n if num >= 5\n answer += \"V\"\n num -= 5\n end\n if num == 4\n answer += \"IV\"\n num -= 4\n end\n answer += \"I\" * num # * @number\n return answer\n end",
"def old_roman_numeral(num)\n return \"Please use a positive integer.\" if num <= 0\n \n roman = \"\"\n \n roman << \"M\" * (num / 1000)\n roman << \"D\" * (num % 1000 / 500)\n roman << \"C\" * (num % 500 / 100)\n roman << \"L\" * (num % 100 / 50)\n roman << \"X\" * (num % 50 / 10)\n roman << \"V\" * (num % 10 / 5)\n roman << \"I\" * (num % 5 / 1)\n \n roman\nend",
"def old_roman_numeral num\n\t\n\tif num >= 1000\n\t\tthousands = 'M' * (num / 1000)\n\tend\n\n\tif num >= 100\n\t\ttemp_hundreds = (num % 1000) / 100\n\t\tif temp_hundreds > 5\n\t\t\thundreds = 'D' + 'C' * (temp_hundreds - 5)\n\t\telsif temp_hundreds == 5\n\t\t\thundreds = 'D'\n\t\telse\n\t\t\thundreds = 'C' * temp_hundreds\n\t\tend\n\tend\n\t\n\tif num >= 10\n\t\ttemp_tens = (num % 100) / 10\n\t\tif temp_tens > 5\n\t\t\ttens = 'L' + 'X' * (temp_tens - 5)\n\t\telsif temp_tens == 5\n\t\t\ttens = 'L'\n\t\telse\n\t\t\ttens = 'X' * temp_tens\n\t\tend\n\tend\n\t\n\tif num > 0\n\t\ttemp_ones = num % 10\n\t\tif temp_ones > 5\n\t\t\tones = 'V' + 'I' * (temp_ones - 5)\n\t\telsif temp_ones == 5\n\t\t\tones = 'V'\n\t\telse\n\t\t\tones = 'I' * temp_ones\n\t\tend\n\tend\n\t\n\tputs \"#{num} in Roman numerals is \"+\"#{thousands}\"+\"#{hundreds}\"+\"#{tens}\"+\"#{ones}\"\nend",
"def old_roman_numeral number\n numeral = \"\"\n\n numeral = numeral + \"M\" * (number / 1000)\n numeral = numeral + \"D\" * (number % 1000/500)\n numeral = numeral + \"C\" * (number % 500/ 100) \n numeral = numeral + \"L\" * (number % 100/ 50) \n numeral = numeral + \"X\" * (number % 50/ 10) \n numeral = numeral + \"V\" * (number % 10/ 5) \n numeral = numeral + \"I\" *(number % 5/ 1) \n numeral\nend",
"def to_roman\n result = ''\n number = self\n ROMAN_NUMERALS.each do |key, value|\n numeral, remainder = number.divmod(value)\n if numeral > 0 \n result += (key * numeral)\n end\n number = remainder\n end\n result\n end",
"def to_roman3(num)\n result = \"\"\n @roman_mapping.each do |pair|\n value = pair[0]\n binding.pry\n roman = pair[1]\n level_occurance = num / value\n level_occurance.times do |x|\n result << roman\n end\n num = num - value * level_occurance\n end\n return result\nend",
"def roman\n return \"-#{(-self).roman}\" if self < 0\n return \"\" if self == 0\n @@roman_values_assoc.each do | (i, v) | return(i+(self-v).roman) if v <= self end\n end",
"def old_roman_numeral num\n\troman = ''\n\n\troman = roman + 'M' * (num / 1000)\n\troman = roman + 'D' * (num % 1000 / 500)\n\troman = roman + 'C' * (num % 500 / 100)\n\troman = roman + 'L' * (num % 100 / 50)\n\troman = roman + 'X' * (num % 50 / 10)\n\troman = roman + 'V' * (num % 10 / 5)\n\troman = roman + 'I' * (num % 5 / 1)\n\n\troman\nend",
"def roman\n\t\treturn \"-#{(-self).roman}\" if self < 0\n\t\treturn \"\" if self == 0\n\t\t@@roman_values_assoc.each do | (i, v) |\treturn(i+(self-v).roman) if v <= self\tend\n\tend",
"def roman_numerals(number)\n\n puts (\"M\" * (number/1000)).to_s\n if ((number%1000)%500) == 0\n puts (\"D\" * (number%1000/500)).to_s\n if ((number%500)%100) == 0\n puts (\"C\" * (number%500/100)).to_s\n if ((number%100)%50) == 0\n puts (\"L\" * (number%100/50)).to_s\n if ((number%50)%10) == 0\n puts (\"X\" * (number%50/10)).to_s\n if ((number%10)%5) == 0\n puts (\"V\" * (number%10/5)).to_s\n if ((number%5)%1)) == 0\n puts (\"I\" * (number%5/1)).to_s\n end\n end\n end\n end\n end\n end\n\n\nend",
"def to_roman\n result = \"\"\n number = self\n roman_mapping.keys.each do |divisor|\n quotient, modulus = number.divmod(divisor)\n result << roman_mapping[divisor] * quotient\n number = modulus\n end\n result\n end",
"def modern_roman_numeral number\n numeral = \"\"\n\n numeral_1 = (number / 1000)\n numeral_2 = (number % 1000/100)\n numeral_3 = (number % 100/ 10) \n numeral_4 = (number % 10) \n \n roman = \"M\" * numeral_1\n\nif numeral_2 == 9\n roman = roman + \"CM\"\nelsif numeral_2 == 4\n roman = roman + \"CD\"\nelse\n roman = roman + \"D\" * (number % 1000 / 500)\n roman = roman + \"C\" *(number % 500/100) \n end\nif numeral_3 == 9\n roman = roman + \"XC\"\nelsif numeral_3 == 4\n roman = roman + \"XL\"\nelse\n roman=roman +\"L\" *(number % 100/ 50)\n roman=roman + \"X\"*(number % 50/ 10) \n end\nif numeral_4 == 9\n roman = roman + \"IX\"\nelsif numeral_4 == 4\n roman = roman + \"IV\"\nelse\n roman = roman + \"V\" * (number % 10/ 5)\n roman = roman + \"I\" * (number % 5/ 1) \nend\n\nroman\n\nend",
"def modern_roman (z)\n\tfirst = (z / 1000)\n\tsecond = (z % 1000 / 100)\n\tthird = (z % 100 / 10)\n\tlast = (z % 10 )\n\n\troman = \"\"\n\troman << \"M\" * first\n\n\tif second == 9\n\t\troman << \"CM\"\n\telsif second == 4\n\t\troman << \"CD\"\n\telse\n\t\troman << \"D\" * (z % 1000 / 500)\n\t\troman << \"C\" * (z % 500 / 100)\n\tend\n\n\tif third == 9\n\t\troman << \"XC\"\n\telsif third == 4\n\t\troman << \"XL\"\n\telse\n\t\troman << \"L\" * (z % 100 / 50)\n\t\troman << \"X\" * (z % 50 / 10)\n\tend\n\n\tif last == 9\n\t\troman << \"IX\"\n\telsif last == 4\n\t\troman << \"IV\"\n\telse\n\t\troman << \"V\" * (z % 10 / 5)\n\t\troman << \"I\" * (z % 5 / 1)\n\tend\nend",
"def old_school(num) \n roman = ''\n roman = roman + 'M' * (num / 1000)\n roman = roman + 'D' * (num % 1000/ 500)\n roman = roman + 'C' * (num % 500/ 100)\n roman = roman + 'L' * (num % 100/ 50)\n roman = roman + 'X' * (num % 50/ 10)\n roman = roman + 'V' * (num % 10/ 5)\n roman = roman + 'I' * (num % 5/ 1)\n roman \nend",
"def old_roman number\n\tnumerals = []\n\twhile number < 0\n\t\tputs 'please use a whole number => 1 and <= 3000'\n\tend\n\tif number % 1000 > 0\n\t\tthousands = number / 1000\n\t\tm_numerals = 'M' * thousands\n\t\tnumerals.push m_numerals\n\t\tnumber = number - (thousands * 1000)\n\tend\n\tif number % 500 > 0\n\t\tnumerals.push 'D'\n\t\tnumber = number - 500\n\tend\n\tif number % 100 > 0\n\t\thundreds = number / 100\n\t\tc_numerals = 'C' * hundreds\n\t\tnumerals.push c_numerals\n\t\tnumber = number - (hundreds * 100)\n\tend\n\tif number % 50 > 0\n\t\tnumerals.push 'L'\n\t\tnumber = number - 50\n\tend\n\tif number % 10 > 0\n\t\ttens = number / 10\n\t\tx_numerals = 'X' * tens\n\t\tnumerals.push x_numerals\n\t\tnumber = number - (tens * 10)\n\tend\n\tif number % 5 > 0\n\t\tnumerals.push 'V'\n\t\tnumber = number - 5\n\tend\n\n\tones = number\n\ti_numerals = 'I' * ones\n\tnumerals.push i_numerals\n\n\tputs numerals\nend",
"def old_roman num\r\n\r\n\taux = num\r\n\troman_num = ''\r\n\t\r\n\twhile true\r\n\t\r\n\t\tif((aux / 1000) >= 1)\r\n\t\t\troman_num = roman_num + 'M'\r\n\t\t\taux = aux - 1000\r\n\t\t\tputs aux\r\n\t\telsif ((aux / 500) >= 1)\r\n\t\t\troman_num = roman_num + 'D'\r\n\t\t\taux = aux - 500\t\t\r\n\t\t\tputs aux\r\n\t\telsif((aux / 100) >= 1)\r\n\t\t\troman_num = roman_num + 'C'\r\n\t\t\taux = aux - 100\r\n\t\t\tputs aux\r\n\t\telsif((aux / 50) >= 1)\r\n\t\t\troman_num = roman_num + 'L'\r\n\t\t\taux = aux - 50\r\n\t\t\tputs aux\r\n\t\telsif((aux / 10) >= 1)\r\n\t\t\troman_num = roman_num + 'X'\r\n\t\t\taux = aux - 10\r\n\t\t\tputs aux\r\n\t\telsif((aux / 5) >= 1)\r\n\t\t\troman_num = roman_num + 'V'\r\n\t\t\taux = aux - 5\r\n\t\t\tputs aux\r\n\t\telsif((aux / 1) >= 1)\r\n\t\t\troman_num = roman_num + 'I'\r\n\t\t\taux = aux - 1\r\n\t\t\tputs aux\r\n\t\telse\r\n\t\t\tbreak\t\t\t\r\n\t\tend\r\n\tend\r\n\t\r\n\troman_num\r\nend",
"def roman_numerals number\n roman_numerals = ''\n\n roman_numerals += 'M' * (number / 1000)\n number %= 1000\n\n roman_numerals += 'D' * (number / 500)\n number %= 500\n\n roman_numerals += 'C' * (number / 100)\n number %= 100\n\n roman_numerals += 'L' * (number / 50)\n number %= 50\n\n roman_numerals += 'X' * (number / 10)\n number %= 10\n\n roman_numerals += 'V' * (number / 5)\n number %= 5\n\n roman_numerals += 'I' * (number / 1)\n number %= 1\n\n roman_numerals\nend",
"def new_roman_numeral num\n roman = \"\"\n if num == 400\n roman = \"CD\"\n elsif num == 40\n roman = \"XL\"\n elsif num == 4\n roman = \"IV\"\n elsif num == 9\n roman == \"IX\"\n elsif num == 90\n roman == \"XC\"\n elsif num == 900\n roman == \"CM\"\n end\n roman += \"M\" * (num/1000)\n roman += \"D\" * ((num%1000)/500)\n roman += \"C\" * ((num%500)/100)\n roman += \"L\" * ((num%100)/50)\n roman += \"X\" * ((num%50)/10)\n roman += \"V\" * ((num%10)/5)\n roman += \"I\" * ((num%5)/1)\n puts roman\n end",
"def old_roman_numeral number\n digits = []\n i = 4\n while i>0\n digits.push (number%10)\n number = (number/10).to_i\n i -= 1\n end\n thousandth = 'M'*digits[3]\n hundredth = 'D'*(digits[2]/5).to_i+'C'*(digits[2]%5)\n tenth = 'L'*(digits[1]/5).to_i+'X'*(digits[1]%5)\n unit = 'V'*(digits[0]/5).to_i+'I'*(digits[0]%5)\n puts thousandth+hundredth+tenth+unit\nend",
"def to_roman1(num)\n # Your code here\n ans = \"\"\n\n while (num / 1000 > 0)\n ans << 'M'\n num -= 1000\n end\n\n while (num / 500 > 0)\n ans << 'D'\n num -= 500\n end\n\n while (num / 100 > 0)\n ans << 'C'\n num -= 100\n end\n\n while (num / 50 > 0)\n ans << 'L'\n num -= 50\n end\n\n while (num / 10 > 0)\n ans << 'X'\n num -= 10\n end\n\n while (num / 5 > 0)\n ans << 'V'\n num -= 5\n end\n\n while (num > 0)\n ans << 'I'\n num -= 1\n end\n\n ans.gsub!(/DCCCC/, 'CM')\n ans.gsub!(/CCCC/, 'CD')\n ans.gsub!(/LXXXX/, 'XC')\n ans.gsub!(/XXXX/, 'XL')\n ans.gsub!(/VIIII/, 'IX')\n ans.gsub!(/IIII/, 'IV')\n\n ans\nend",
"def to_roman\n result = \"\"\n num_str = self.to_s\n str_a = num_str.split(//) # [\"1\", \"9\", \"9\", \"0\"]\n \n # case on number digits of the string array\n case str_a.size\n when 4\n result << do_digit(str_a[0], 1000)\n result << do_digit(str_a[1], 100)\n result << do_digit(str_a[2], 10 )\n result << do_digit(str_a[3], 1)\n when 3\n result << do_digit(str_a[0], 100)\n result << do_digit(str_a[1], 10)\n result << do_digit(str_a[2], 1) \n when 2\n result << do_digit(str_a[0], 10)\n result << do_digit(str_a[1], 1)\n when 1\n result << do_digit(str_a[0], 1) \n end\n result \n end",
"def to_roman(num)\n place_value_digits = num.to_s.split('').map { |digit| digit.to_i}\n\n if place_value_digits.length == 0 \n return \"\"\n end \n\n if place_value_digits[0] == 0 \n place_value_digits.shift \n return \"\" + to_roman(place_value_digits) if place_value_digits.empty? == false\n return \"\"\n end \n\n if place_value_digits.length == 1 \n digit = place_value_digits.shift\n if digit <= 3\n return \"I\" * digit\n elsif digit == 4\n return \"IV\" \n elsif digit == 5 \n return \"V\" \n elsif digit > 5 && digit < 9\n return \"V\" + (\"I\" * (digit - 5))\n else \n return \"IX\"\n end \n\n elsif place_value_digits.length == 2 \n digit = place_value_digits.shift\n if digit <= 3\n return \"X\" * digit + to_roman(place_value_digits.join.to_i)\n elsif digit == 4\n return \"XL\" + to_roman(place_value_digits.join.to_i)\n elsif digit == 5 \n return \"L\" + to_roman(place_value_digits.join.to_i)\n elsif digit > 5 && digit < 9\n return \"L\" + (\"X\" * (digit - 5)) + to_roman(place_value_digits.join.to_i)\n else \n return \"XC\" + to_roman(place_value_digits.join.to_i)\n end \n\n elsif place_value_digits.length == 3\n digit = place_value_digits.shift\n if digit <= 3\n return \"C\" * digit + to_roman(place_value_digits.join.to_i)\n elsif digit == 4\n return \"CD\" + to_roman(place_value_digits.join.to_i)\n elsif digit == 5 \n return \"D\" + to_roman(place_value_digits.join.to_i)\n elsif digit > 5 && digit < 9\n return \"D\" + (\"C\" * (digit - 5)) + to_roman(place_value_digits.join.to_i)\n else \n return \"CM\" + to_roman(place_value_digits.join.to_i)\n end \n\n elsif place_value_digits.length == 4 \n digit = place_value_digits.shift\n return \"M\" * digit + to_roman(place_value_digits.join.to_i)\n end \n end",
"def to_roman\n result = \"\"\n num_str = self.to_s\n str_a = num_str.split(//) # [\"1\", \"9\", \"9\", \"0\"]\n \n # case on number digits of the string array\n case str_a.size\n when 4\n result << do_digit(str_a[0], 1000)\n result << do_digit(str_a[1], 100)\n result << do_digit(str_a[2], 10 )\n result << do_digit(str_a[3], 1)\n when 3\n result << do_digit(str_a[0], 100)\n result << do_digit(str_a[1], 10)\n result << do_digit(str_a[2], 1) \n when 2\n result << do_digit(str_a[0], 10)\n result << do_digit(str_a[1], 1)\n when 1\n result << do_digit(str_a[0], 1) \n end\n result\n end",
"def to_roman\n old_roman_num = ''\n\n old_roman_num << 'M' * (self / 1000)\n\n old_roman_num << 'D' * (self % 1000 / 500)\n\n old_roman_num << 'C' * (self % 500 / 100)\n\n old_roman_num << 'L' * (self % 100 / 50)\n\n old_roman_num << 'X' * (self % 50 / 10)\n\n old_roman_num << 'V' * (self % 10 / 5)\n\n old_roman_num << 'I' * (self % 5 / 1)\n\n return old_roman_num\n end",
"def old_r_conv nums\n\troman = ''\n\troman = roman + 'M' * (nums/1000)\n\troman = roman + 'D' * ((nums%1000)/500)\n\troman = roman + 'C' * ((nums%500)/100)\n\troman = roman + 'L' * ((nums%100)/50)\n\troman = roman + 'X' * ((nums%50)/10)\n\troman = roman + 'V' * ((nums%10)/5)\n\troman = roman + 'I' * ((nums%5)/1)\n\n\tputs roman\nend",
"def roman_numeral year\n thou = year/1000\n thou_remain = year%1000\n five_hundreds = thou_remain/500\n hundreds = (thou_remain%500)/100\n fifties = ((thou_remain%500)%100)/50\n tens = (((thou_remain%500)%100)%50)/10\n fives = ((((thou_remain%500)%100)%50)%10)/5\n ones = (((((thou_remain%500)%100)%50)%10)%5)/1\n \n \n #this is just to clear the terminal screen so you only see the result.\n100.times do puts \"\" \n end\n \n #outputs the letters times the number returned.\n puts \"M\" * thou + \"D\" * five_hundreds + \"C\" * hundreds + \"L\" * fifties + \"X\" * tens + \"V\" * fives + \"I\" * ones\nend",
"def new_roman_numeral num\n number = \"\"\n if (num / 1000) > 0\n number = \"M\" * (num / 1000)\n end\n if (num % 1000) >= 900 \n number += \"CM\"\n end\n if (num % 1000) >= 500 && (num % 1000) < 900\n number += \"D\"\n end\n if (num % 1000) >= 400 && (num % 1000) < 500\n number += \"CD\"\n end\n if ((num % 1000) % 500) >= 100 && ((num % 1000) % 500) < 400\n number += \"C\" * (((num % 1000) % 500) / 100)\n end\n if (((num % 1000) % 500) % 100) >= 90\n number += \"XC\"\n end\n if (((num % 1000) % 500) % 100) >= 50 && (((num % 1000) % 500) % 100) < 90\n number += \"L\"\n end\n if (((num % 1000) % 500) % 100) >= 40 && (((num % 1000) % 500) % 100) < 50\n number += \"XL\"\n end\n if (((num % 1000) % 500) % 50) >= 10 && (((num % 1000) % 500) % 50) < 40\n number += \"X\" * ((((num % 1000) % 500) % 50) / 10)\n end\n if ((((num % 1000) % 500) % 50) % 10) == 9\n number += \"IX\"\n end\n if ((((num % 1000) % 500) % 50) % 10) >= 5 && ((((num % 1000) % 500) % 50) % 10) < 9\n number += \"V\" + \"I\" * (((((num % 1000) % 500) % 50) % 10) % 5)\n end\n if ((((num % 1000) % 500) % 50) % 10) == 4\n number += \"IV\"\n end\n if ((((num % 1000) % 500) % 50) % 10) < 4\n number += \"I\" * (((((num % 1000) % 500) % 50) % 10) % 5)\n end\n puts number\nend",
"def to_roman(num)\n\toutput = \"\"\n\t@roman_num.each do |key, val|\n\t\tremainder = num%key.to_i\n\t\twhile remainder < num\n\t\t\toutput << val\n\t\t\tnum = num - key.to_i\n\t\tend\n\tend\n\toutput\nend",
"def old_roman num\r\n\r\n\taux = num\r\n\troman_num = ''\r\n\t\r\n\twhile true\r\n\t\r\n\t\tif((aux / 1000) >= 1)\r\n\t\t\troman_num = roman_num + 'M'\r\n\t\t\taux = aux - 1000\r\n\t\telsif ((aux / 500) >= 1)\r\n\t\t\tif(aux >= 900)\r\n\t\t\t\troman_num = roman_num + 'CM'\r\n\t\t\t\taux = aux - 900\t\t\t\t\t\r\n\t\t\telse\r\n\t\t\t\troman_num = roman_num + 'D'\r\n\t\t\t\taux = aux - 500\t\t\r\n\t\t\tend\r\n\t\telsif((aux / 100) >= 1)\r\n\t\t\tif(aux >= 400)\r\n\t\t\t\troman_num = roman_num + 'CD'\r\n\t\t\t\taux = aux - 400\t\t\t\t\t\r\n\t\t\telse\r\n\t\t\t\troman_num = roman_num + 'C'\r\n\t\t\t\taux = aux - 100\t\t\r\n\t\t\tend\r\n\t\telsif((aux / 50) >= 1)\r\n\t\t\tif(aux >= 90)\r\n\t\t\t\troman_num = roman_num + 'XC'\r\n\t\t\t\taux = aux - 90\t\t\t\t\t\r\n\t\t\telse\r\n\t\t\t\troman_num = roman_num + 'L'\r\n\t\t\t\taux = aux - 50\t\t\r\n\t\t\tend\r\n\t\telsif((aux / 10) >= 1)\r\n\t\t\tif(aux >= 40)\r\n\t\t\t\troman_num = roman_num + 'XL'\r\n\t\t\t\taux = aux - 40\t\t\t\t\t\r\n\t\t\telse\r\n\t\t\t\troman_num = roman_num + 'X'\r\n\t\t\t\taux = aux - 10\t\t\r\n\t\t\tend\r\n\r\n\t\telsif((aux / 5) >= 1)\r\n\t\t\tif(aux >= 9)\r\n\t\t\t\troman_num = roman_num + 'IX'\r\n\t\t\t\taux = aux - 9\t\t\t\t\t\r\n\t\t\telse\r\n\t\t\t\troman_num = roman_num + 'V'\r\n\t\t\t\taux = aux - 5\t\t\r\n\t\t\tend\r\n\t\telsif((aux / 1) >= 1)\r\n\t\t\tif(aux >= 4)\r\n\t\t\t\troman_num = roman_num + 'IV'\r\n\t\t\t\taux = aux - 4\t\t\t\t\t\r\n\t\t\telse\r\n\t\t\t\troman_num = roman_num + 'I'\r\n\t\t\t\taux = aux - 1\t\r\n\t\t\tend\r\n\t\telse\r\n\t\t\tbreak\t\t\t\r\n\t\tend\r\n\tend\r\n\t\r\n\troman_num\r\nend",
"def roman_numeral num\n thous = (num / 1000)\n hunds = (num % 1000 / 100)\n tens = (num % 100 / 10)\n ones = (num % 10 )\n\n roman = \"M\" * thous\n if hunds == 9\n roman = roman + \"CM\" \n elsif hunds == 4\n roman = roman + \"CD\"\n else\n roman = roman + \"D\" * (num % 1000 / 500)\n roman = roman + \"C\" * (num % 500 / 100)\n end\n\n if tens == 9 \n roman = roman + \"XC\"\n elsif tens == 4\n roman = roman + \"XL\"\n else\n roman = roman + \"L\" * (num % 100 / 50) \n roman = roman + \"X\" * (num % 50 / 10)\n end\n\n if ones == 9 \n roman = roman + \"IX\"\n elsif ones == 4\n roman = roman + \"IV\"\n else\n roman = roman + \"V\" * (num % 10/ 5)\n roman = roman + \"I\" * (num % 5 / 1)\n end\n roman\n end",
"def old_roman_numeral number\n\n if number >= 1000\n thousands = 'M' * (number / 1000)\n end\n\n if number >= 100\n hundreds = (number % 1000) / 100\n if hundreds >= 5\n hundreds = 'D' + 'C' * (hundreds - 5)\n else\n hundreds = 'C' * ((number % 1000) / 100)\n end\n end\n\n if number >= 10\n tens = (number % 100) / 10\n if tens >= 5\n tens = 'L' + 'X' * (tens - 5)\n else\n tens = 'X' * ((number % 100) / 10)\n end\n end\n\n if number >= 1\n ones = (number % 10) / 1\n if ones >= 5\n ones = 'V' + 'I' * (ones - 5)\n else\n ones = 'I' * ((number % 10) / 1)\n end\n end\n\n puts \"#{number} in old-school Roman numerals is \"+\"#{thousands}\"+\"#{hundreds}\"+\"#{tens}\"+\"#{ones}\"\nend",
"def num_to_roman_numeral num\n \n orig_num = num\n \n # Clear values for all characters before starting\n m = ''\n d = ''\n c = ''\n l = ''\n x = ''\n v = ''\n i = ''\n \n # Get 1000s\n if num/1000 >= 1\n m = 'M'*(num/1000)\n num = num%1000\n end\n \n # Get 500s\n if num/500 >= 1\n if num/100 == 9\n d = ''\n c = 'CM'\n num = num%100\n else\n d = 'D'*(num/500)\n num = num%500\n end\n end\n \n # Get 100s\n if num/100 >= 1\n c = 'C'*(num/100)\n num = num%100\n end\n \n # Get 50s\n if num/50 >= 1\n if num/10 == 9\n l = ''\n x = 'XC'\n num = num%10\n else\n l = 'L'*(num/50)\n num = num%50\n end\n end\n \n # Get 10s\n if num/10 >= 1\n if num/10 == 4\n x = 'XL'\n else\n x = 'X'*(num/10)\n end\n num = num%10\n end\n \n # Get 5s\n if num/5 >= 1\n if num == 9\n v = ''\n i = 'IX'\n num = 0\n else\n v = 'V'*(num/5)\n num = num%5\n end\n end\n \n # Get 1s\n if num >= 1\n if num == 4\n i = 'IV'\n num = 0\n else\n i = 'I'*num\n end\n end\n \n roman_numeral = m + d + c + l + x + v + i\n \n puts orig_num.to_s + ' in old roman numerals is ' + roman_numeral\nend",
"def roman_numeral num\r\n\r\n\tthous = (num \t\t\t/ 1000)\r\n\thunds = (num \t% 1000 \t/ 100)\r\n\ttens = (num \t% 100 \t/ 10)\r\n\tones = (num \t% \t\t\t10)\r\n\r\n\troman = 'M' * thous\r\n\r\nend",
"def old_school_roman_numerial number\n roman = ''\n\n # 1000\n roman << \"M\" * (number / 1000)\n # 500\n roman << \"D\" * (number % 1000 / 500)\n # 100\n roman << \"C\" * (number % 1000 % 500 / 100)\n # 50\n roman << \"L\" * (number % 1000 % 500 % 100 / 50)\n # 10\n roman << \"X\" * (number % 1000 % 500 % 100 % 50 / 10)\n # 5\n roman << \"V\" * (number % 1000 % 500 % 100 % 50 % 10 / 5)\n # 1\n roman << \"I\" * (number % 1000 % 500 % 100 % 50 % 10 % 5 / 1)\n\n puts roman\nend",
"def new_roman_numeral number\n digits = []\n i = 4\n while i>0\n digits.push (number%10)\n number = (number/10).to_i\n i -= 1\n end\n thousandth = 'M'*digits[3]\n hundredth = 'D'*(digits[2]/5).to_i+'C'*(digits[2]%5)\n tenth = 'L'*(digits[1]/5).to_i+'X'*(digits[1]%5)\n unit = 'V'*(digits[0]/5).to_i+'I'*(digits[0]%5)\n hundredth = 'CD' if hundredth == 'C'*4\n hundredth = 'CM' if hundredth == 'D'+'C'*4\n tenth = 'XL' if tenth == 'X'*4\n tenth = 'XC' if tenth == 'L'+'X'*4\n unit = 'IV' if unit == 'I'*4\n unit = 'IX' if unit == 'V'+'I'*4\n puts thousandth+hundredth+tenth+unit\nend",
"def to_roman2(num)\n result = \"\"\n \n @roman_mapping.each do |pair|\n value = pair[0]\n roman = pair[1]\n division_result = num / value\n result += roman * division_result\n num = num - (value * division_result)\n end\n return result\nend",
"def galactic_words_to_roman # returns roman representaion \n\t\[email protected]{ |e| @@galactic_words_roman_symbol_assignments[e] }.join\n\tend",
"def galactic_words_to_roman # returns roman representaion \n\t\[email protected]{ |e| @@galactic_words_roman_symbol_assignments[e] }.join\n\tend",
"def roman_numeral(num)\n digits = [[1000, 500, 100, 50, 10, 5, 1], [0, 0, 0, 0, 0, 0, 0], ['M','D','C','L','X','V','I']]\n answer = ' '\n h = 0\n \n digits[0].each do |z|\n if num / z > 0\n digits[1][h] = (num / z) #Counting the number of 10s, 50s, 100s, etc in num\n num = num % z #Using the remainder as the next value of num\n end\n h += 1\n end\n \n for a in 0..digits[1].size - 1 do #Iterate through array to calculate roman numerals old school style\n answer << digits[2][a] * digits[1][a]\n answer = answer.gsub(\"DCCCC\",\"CM\").gsub(\"CCCC\",\"CD\").gsub(\"LXXXX\",\"XC\").gsub(\"XXXX\",\"XL\").gsub(\"VIIII\",\"IX\").gsub(\"IIII\",\"IV\") #Catching edge cases to update old school roman numeral\n end\n\n answer.strip\nend",
"def roman_numeral(num)\n thousands = (num / 1000)\n hundreds = (num % 1000 / 100)\n tens = (num % 100 / 10)\n ones = (num % 10)\n\n roman = 'M' * thousands\n\n if hundreds == 9\n roman = roman + 'CM'\n elsif hundreds == 4\n roman = roman + 'CD'\n else\n roman = roman + 'D' * (num % 1000 / 500)\n roman = roman + 'C' * (num % 500 / 100)\n end\n\n if tens == 9\n roman = roman + 'XC'\n elsif tens == 4\n roman = romann + 'XL'\n else\n roman = roman + 'L' * (num % 100 / 50)\n roman = roman + 'X' * (num % 50 / 10)\n end\n\n if ones == 9\n roman = roman + 'IX'\n elsif ones == 4\n roman = roman + 'IV'\n else\n roman = roman + 'V' * (num % 10 / 5)\n roman = roman + 'I' * (num % 5 / 1)\n end\n roman\nend",
"def new_roman_numeral num\n roman = ''\n\n roman << 'M' * (num / 1000)\n\n digit_hundred = num % 1000 / 100\n if digit_hundred >= 5\n if digit_hundred == 9\n roman << 'CM'\n else\n roman << 'D'\n roman << 'C' * (digit_hundred % 5)\n end\n else\n if digit_hundred == 4\n roman << 'CD'\n else\n roman << 'C' * digit_hundred\n end\n end\n\n digit_ten = num % 100 / 10\n if digit_ten >= 5\n if digit_ten == 9\n roman << 'XC'\n else\n roman << 'L'\n roman << 'X' * (digit_ten % 5)\n end\n else\n if digit_ten == 4\n roman << 'XL'\n else\n roman << 'X' * digit_ten\n end\n end\n\n digit_one = num % 10\n if digit_one >= 5\n if digit_one == 9\n roman << 'IX'\n else\n roman << 'V'\n roman << 'I' * (digit_one % 5)\n end\n else\n if digit_one == 4\n roman << 'IV'\n else\n roman << 'I' * digit_one\n end\n end\n\n roman\nend",
"def old_roman_numeral num\r\n\traise 'must use + integer' if num <= 0\r\n\troman = ''\r\n\r\n\troman << 'M' * (num / 1000)\r\n\t\t# -> 1.925 -> 1 (floor)\r\n\troman << 'D' * (num % 1000 / 500)\r\n\t\t# -> 925/500 -> 1.85 -> 1 (floor)\r\n\troman << 'C' * (num % 500 / 100)\r\n\t\t# -> 425/100 -> 4.25 -> 4 (floor)\r\n\troman << 'L' * (num % 100 / 50)\r\n\t\t# -> 25/50 -> 0.5 -> 0 (floor)\r\n\troman << 'X' * (num % 50 / 10)\r\n\t\t# -> 25/10 -> 2.5 -> 2 (floor)\r\n\troman << 'V' * (num % 10 / 5)\r\n\t\t# -> 5/5 -> 1 -> 1\r\n\troman << 'I' * (num % 5 / 1)\r\n\t\t# -> 0/10 -> 0 -> 0\r\n\r\n\troman\r\nend",
"def roman_numeral num\n\n number1000s = (num / 1000)\n number100s = (num % 1000) / 100\n number10s = (num % 100) / 10\n number1s = (num % 10) / 1\n\n numberDs = (num % 1000) / 500\n numberCs = (num % 500) / 100\n numberLs = (num % 100) / 50\n numberXs = (num % 50) / 10\n numberVs = (num % 10) / 5\n numberIs = (num % 5) / 1\n\n result = \"M\" * number1000s\n\n if number100s == 9\n result = result + \"CM\"\n elsif number100s == 4\n result = result + \"CD\"\n else\n result = result + \"D\" * numberDs\n result = result + \"C\" * numberCs\n end\n\n if number10s == 9\n result = result + \"XC\"\n elsif number10s == 4\n result = result + \"XL\"\n else\n result = result + \"L\" * numberLs\n result = result + \"X\" * numberXs\n end\n\n if number1s == 9\n result = result + \"IX\"\n elsif number1s == 4\n result = result + \"IV\"\n else\n result = result + \"V\" * numberVs\n result = result + \"I\" * numberIs\n end\n\n result\n\nend",
"def roman_numeral number\n\nend",
"def ancientify\n\t\troman = self\n\t\troman.gsub(\"CM\", \"DCCCC\")\n\t\troman.gsub(\"CD\", \"CCCC\")\n\t\troman.gsub(\"XC\", \"LXXXX\")\n\t\troman.gsub(\"XL\", \"XXXX\")\n\t\troman.gsub(\"IX\", \"VIIII\")\n\t\troman.gsub(\"IV\", \"IIII\")\n\tend",
"def to_roman(num, way = \"new\")\n \n\troman_string = \"\"\n\n\tif way == \"new\"\n\t\tNEW_WAY.each do |number, roman| \n\t\t\troman_string += roman * (num/number)\t\n\t\t\tnum %= number \n\t\tend\n\telsif way == \"old\"\n\t\tOLD_WAY.each do |number, roman| \n\t\t\troman_string += roman * (num/number)\t\n\t\t\tnum %= number \n\t\tend\n\telse\n\t\traise \"We don't know how to convert that way\"\n\tend\n \n\troman_string\nend",
"def to_modern_roman(number)\n\n\twhile number.to_i <= 3000\n\t\t# split number into an array\n\t\tarray = number.split(//).map { |x| x.to_i }\n\t\tresult =[]\n\t\t# array has length of 4\n\t\tuntil array.length == 4\n\t\tarray.unshift(0)\n\t\tend\n\t\t# 1000s of number\n\t\tif array[-4] < 4 \n\t\t\t\tnum = array[-4]\n\t\t\t\tnum.times { result << \"M\" }\n\t\tend\n\t\t# 100s of number\n\t\tif array[-3] < 4\n\t\t\t\tnum = array[-3]\n\t\t\t\tnum.times { result << \"C\" }\n\t\telsif array[-3] == 4\n\t\t\t\tnum = array[-3]\n\t\t\t\tresult << \"CD\"\n\t\telsif array[-3] == 6\n\t\t\t\tnum = array[-3]\n\t\t\t\tresult << \"DC\"\n\t\telsif array[-3] == 9\n\t\t\t\tnum = array[-3]\n\t\t\t\tresult << \"CM\"\n\t\telse\n\t\t\t\tnum = array[-3]\n\t\t\t\tresult << \"D\" \n\t\t\t\t(num-5).times { result << \"C\" }\n\t\tend\n\t\t# 10s of number\n\t\tif array[-2] < 4\n\t\t\t\tnum = array[-2]\n\t\t\t\tnum.times { result << \"X\" }\n\t\telsif array[-2] == 4\n\t\t\t\tnum = array[-2]\n\t\t\t\tresult << \"XL\"\n\t\telsif array[-2] == 6\n\t\t\t\tnum = array[-2]\n\t\t\t\tresult << \"LX\"\n\t\telsif array[-2] == 9\n\t\t\t\tnum = array[-2]\n\t\t\t\tresult << \"XC\"\n\t\telse\n\t\t\t\tnum = array[-2]\n\t\t\t\tresult << \"L\" \n\t\t\t\t(num-5).times { result << \"X\" }\n\t\tend\n\t\t# single digits of number\n\t\tif array[-1] < 4\n\t\t\t\tnum = array[-1]\n\t\t\t\tnum.times { result << \"I\" }\n\t\telsif array[-1] == 4\n\t\t\t\tnum = array[-1]\n\t\t\t\tresult << \"IV\"\n\t\telsif array[-1] == 6\n\t\t\t\tnum = array[-1]\n\t\t\t\tresult << \"VI\"\n\t\telsif array[-1] == 9\n\t\t\t\tnum = array[-1]\n\t\t\t\tresult << \"IX\"\n\t\telse\n\t\t\t\tnum = array[-1]\n\t\t\t\tresult << \"V\" \n\t\t\t\t(num-5).times { result << \"I\" }\t\n\t\tend\n\t\t# return number in roman numerals\n\t\tputs \"#{number} in New Style Roman Numerals is #{result.join(\"\")}.\"\n\t\texit\n\tend\n\tputs \"Number must be greater than 3000.\"\n\texit\nend",
"def converter(x)\n i=x\n roman_num=[]\n while i!=0\n if i/1000>0\n roman_num.push('M'*(i/1000))\n i-=i-i%1000\n elsif i/100>0\n if i/100<4\n roman_num.push('C'*(i/100))\n i-=i-i%100\n elsif i/100==4\n roman_num.push('CD')\n i-=400\n elsif i/100==5\n roman_num.push('D')\n i-=500\n elsif ((i/100)>5 && (i/100)<9)\n roman_num.push('D')\n i-=500\n roman_num.push('C'*(i/100))\n i-=i-i%100\n elsif i/100==9\n roman_num.push('CM')\n i-=900\n end\n elsif i/10>0\n if i/10<4\n roman_num.push('X'*(i/10))\n i-=i-i%10\n elsif i/10==4\n roman_num.push('XL')\n i-=40\n elsif i/10==5\n roman_num.push('L')\n i-=50\n elsif ((i/10)>5 && (i/10)<9)\n roman_num.push('L')\n i-=50\n roman_num.push('X'*(i/10))\n i-=i-i%10\n elsif i/10==9\n roman_num.push('XC')\n i-=90\n end\n else \n if (i>=1 && i<4)\n roman_num.push('I'*i)\n i=0\n elsif i==4\n roman_num.push('IV')\n i=0\n elsif i==5\n roman_num.push('V')\n i=0\n elsif (i>5 && i<9)\n roman_num.push('V')\n i-=5\n roman_num.push('I'*i)\n i=0\n else\n roman_num.push('IX')\n i=0\n end\n end\n end\n return roman_num.join('')\nend",
"def vol_roman\n dict = { M: 1000, CM: 900, D: 500, CD: 400,\n C: 100, XC: 90, L: 50, XL: 40,\n X: 10 , IX: 9, V: 5, IV: 4,\n I: 1 };\n input, output = vol.to_i, ''\n\n # Descend through the character list.\n dict.each_pair do |r, a|\n # Subtract from the input/add to the output until\n # this character is no longer useful.\n while input >= a { input -= a; output << r.to_s }\n end\n \n output\n end\nend",
"def modernize\n\t\troman = self\n\t\troman.gsub(\"DCCCC\", \"CM\")\n\t\troman.gsub(\"CCCC\", \"CD\")\n\t\troman.gsub(\"LXXXX\", \"XC\")\n\t\troman.gsub(\"XXXX\", \"XL\")\n\t\troman.gsub(\"VIIII\", \"IX\")\n\t\troman.gsub(\"IIII\", \"IV\")\n\tend",
"def old_school_roman_numeral(num)\n arabs_to_romans = [\n ['M', 1000],\n ['D', 500],\n ['C', 100],\n ['L', 50],\n ['X', 10],\n ['V', 5],\n ['I', 1]\n ]\n\n result = ''\n\n arabs_to_romans.each do |arab_to_roman|\n arab = arab_to_roman[1]\n roman = arab_to_roman[0]\n\n if num / arab != 0\n result += roman * (num / arab)\n num = num % arab\n end\n end\n result\nend",
"def roman_numeral num_to_convert\n\t\n\tnum_converted = ''\n\n\tthousands = num_to_convert / 1000\n\tnum_converted = 'M'*thousands\n\tremainder = num_to_convert % 1000\n\n\tfivehundreds = remainder / 500\n\tif remainder >= 900\n\t\tnum_converted += 'CM'\n\t\tremainder = remainder % 900\n\telse\n\t\tnum_converted += 'D'*fivehundreds\n\t\tremainder = remainder % 500\n\tend\n\n\tonehundreds = remainder / 100\n\tif onehundreds == 4\n\t\tnum_converted += 'CD'\n\t\tremainder = remainder % 400\n\telse\n\t\tnum_converted += 'C'*onehundreds\n\t\tremainder = remainder % 100\n\tend\n\t\n\n\tfifties = remainder / 50\n\tif remainder >= 90\n\t\tnum_converted += 'XC'\n\t\tremainder = remainder % 90\n\telse\n\t\tnum_converted += 'L'*fifties\n\t\tremainder = remainder % 50\t\n\tend\n\t\n\ttens = remainder / 10\n\tif tens == 4\n\t\tnum_converted += 'XL'\n\t\tremainder = remainder % 40\n\telse\n\t\tnum_converted += 'X'*tens\n\t\tremainder = remainder % 10\n\tend\n\t\n\tfives = remainder / 5\n\tif remainder >= 9\n\t\tnum_converted += 'IX'\n\t\tremainder = remainder % 9\n\telse\n\t\tnum_converted += 'V'*fives\n\t\tremainder = remainder % 5\n\tend\n\n\tones = remainder\n\tif ones == 4\n\t\tnum_converted += 'IV'\n\telse \n\t\tnum_converted += 'I'*ones\n\tend\n\n\tputs num_converted\n\treturn num_converted\nend",
"def to_roman(n)\n resto = []\n num = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]\n num.each do |element|\n resto.push(n / element)\n n = n % element\n end\n chars = %w[M CM D CD C XC L XL X IX V IV I]\n resto.each_with_index.map do |element, index|\n chars[index] * element\n end.join\nend",
"def to_roman(num)\n\n result = \"\"\n\n roman_mappings.each do |arabic, roman|\n #if 2000 appended to result then repeat\n while num >= arabic\n result << roman\n num -= arabic\n end\n end\n puts result\nend",
"def int_to_roman_2(num)\n result = \"\"\n while num > 0\n if num >= 1000\n num -= 1000\n result += \"M\"\n elsif num >= 900\n num -= 900\n result += \"CM\"\n elsif num >= 500\n num -= 500\n result += \"D\"\n elsif num >= 400\n num -= 400\n result += \"CD\"\n elsif num >= 100\n num -= 100\n result += \"C\"\n elsif num >= 90\n num -= 90\n result += \"XC\"\n elsif num >= 50\n num -= 50\n result += \"L\"\n elsif num >= 40\n num -= 40\n result += \"XL\"\n elsif num >= 10\n num -= 10\n result += \"X\"\n elsif num >= 9\n num -= 9\n result += \"IX\"\n elsif num >= 5\n num -= 5\n result += \"V\"\n elsif num >= 4\n num -= 4\n result += \"IV\"\n else\n num -= 1\n result += \"I\"\n end\n end\n\n return result\nend",
"def to_roman(num)\n roman_sym=[\"M\",\"CM\",\"D\",\"CD\",\"C\",\"XC\",\"L\",\"XL\",\"X\",\"IX\",\"V\",\"IV\",\"I\"]\n roman_val=[1000,900,500,400,100,90,50,40,10,9,5,4,1]\n roman = \"\"\n roman_sym.each_index do |i|\n roman += roman_sym[i] * (num/roman_val[i])\n num = num%roman_val[i]\n end\n return roman\nend",
"def convert_to_roman(i)\n\troman_numeral = \"\"\n\ti = i\n\t(i/1000).times {print \"M\"}\t\t\t\t# 3 * M\n\ti = i % 1000\t\t\t\t\t\t\t# i = 780\n\t\n\t(i/500).times {print \"D\"}\t\t\t\t# 1 * C\n\ti = i % 500\t\t\t\t\t\t\t\t# i = 280\n\n\t(i/100).times {print \"C\"}\t\t\t\t# 2 * C\n\ti = i % 100\t\t\t\t\t\t\t\t# i = 80\n\n\t(i/50).times {print \"L\"}\t\t\t\t# 1 * L\n\ti = i % 50\t\t\t\t\t\t\t\t# i = 30\n\n\t(i/10).times {print \"X\"}\t\t\t\t# 3 * X\n\ti = i % 10\t\t\t\t\t\t\t\t# i = 0\n\n\t(i/1).times {print \"I\"}\t\t\t\t\t# 0 * I\nend",
"def to_roman(input)\n result = \"\"\n MAPPING.each do |k,v|\n while input%v < input\n result += k\n input -= v\n end\n end\n result\n end",
"def roman_numeral num\n\tif num > 999999\n\t\treturn \"number too big for roman numerals\"\n\tend\n\n\trom_digits = ['I','V','X','L','C','D','M','P','Q','R','S','T','A','B','E','F']\n\tnum_of_digits = (num).to_s.length\n\troman_num = ''\n\n\tfor i in 0...num_of_digits\n\t\troman_num = romnum_1_to_9(num,rom_digits[i*2],rom_digits[i*2+1],rom_digits[i*2+2],10**i) + roman_num\n\tend\n\t\n\treturn roman_num.downcase\n\nend",
"def romanize(input)\n\n raise ArgumentError, 'can not encode negative number' if input < 0\n raise ArgumentError, 'can not encode zero' if input == 0\n\n #Creating a Hash that pointing different numbers to different characters.\n romkeys = {1000 => 'M', 900 => 'CM', 500 => 'D', 400 => 'CD', 100 => 'C', 90 => 'XC', 50 => 'L', 40 => 'XL', 10 => 'X', 9 => 'IX', 5 => 'V', 4 => 'IV' ,1 => 'I'}\n\n #Creating a variable that have the format string, for storing the different characters.\n output = ' '\n\n #Looping until the input is zero.\n until input == 0\n\n #Looping thro the different keys and values of the hash.\n romkeys.each do |key, value|\n if input >= key\n\n #If the input was 5 this will result as 'V' after that the output will save the V and loop thro until it's nothing left.\n output += value\n\n #This subtract the key value to make the loop end.\n input -= key\n\n #This just ending the loop.\n break\n end\n end\n end\n\n #Returning the output string.\n return output\nend",
"def roman_numeral num\n \n if num >= 1000\n thousands = 'M' * (num / 1000)\n end\n\n # We now account for cases of 400 and 900 (CD, CM, respectively)\n # CCC=300, CD=400, D=500, DCCC=800, CM=900\n if num >= 100\n temp_hundreds = (num % 1000) / 100\n if temp_hundreds == 9\n hundreds = 'CM'\n elsif (temp_hundreds < 9 && temp_hundreds > 5)\n hundreds = 'D' + 'C' * (temp_hundreds - 5)\n elsif temp_hundreds == 5\n hundreds = 'D'\n elsif temp_hundreds == 4\n hundreds = 'CD'\n else\n hundreds = 'C' * temp_hundreds\n end\n end\n \n # We now account for cases of 40 and 90 (XL, XC, respectively)\n # XXX=30, XL=40, L=50, LXXX=80, XC=90\n if num >= 10\n temp_tens = (num % 100) / 10\n if temp_tens == 9\n tens = 'XC'\n elsif (temp_tens < 9 && temp_tens > 5)\n tens = 'L' + 'X' * (temp_tens - 5)\n elsif temp_tens == 5\n tens = 'L'\n elsif temp_tens == 4\n tens = 'XL'\n else\n tens = 'X' * temp_tens\n end\n end\n \n # We now account for cases of 4 and 9 (IV, IX, respectively)\n # III=3, IV=4, V=5, XIII=8, IX=9\n if num > 0\n temp_ones = num % 10\n if temp_ones == 9\n ones = 'IX'\n elsif (temp_ones < 9 && temp_ones > 5)\n ones = 'V' + 'I' * (temp_ones - 5)\n elsif temp_ones == 5\n ones = 'V'\n elsif temp_ones == 4\n ones = 'IV'\n else\n ones = 'I' * temp_ones\n end\n end\n \n puts \"#{num} in \\\"Modern\\\" Roman numerals is \"+\"#{thousands}\"+\"#{hundreds}\"+\"#{tens}\"+\"#{ones}\"\nend",
"def old_roman_mod\n old_roman = nil\n i,v,x,l,c,d,ms,request = nil,nil,nil,nil,nil,nil,nil,nil\n ms = 0\n while true \n puts \"enter a number between 1 and 3000 ['q' to quit program]\"\n request = gets.chomp\n break if request.downcase == 'q'\n (puts 'only enter between 1 and 3000';next) if request.to_i < 1 || request.to_i > 3000\n request= request.to_i\n ms = request / 1000\n test = request % 1000\n d = test / 500\n test = test % 500\n c = test / 100\n test = test % 100\n l = test / 50\n test = test % 50\n x = test / 10\n test = test % 10\n v = test / 5\n test = test % 5\n i = test\n puts\n puts \n old_roman = 'M'*ms + 'D'*d + 'C'*c+ 'L'*l + 'X'*x + 'V'*v+ 'I'*i\n puts old_roman\n end\n old_roman\nend",
"def solution(number)\n\nm, r_1 = number.divmod(1000)\ncd, r_2 = r_1.divmod(100)\nlx, r_3 = r_2.divmod(10)\nvi, r_4 = r_3.divmod(1)\n\nroman = []\n\nm.times { roman << \"M\" }\n\nif cd <= 3\n\tcd.times { roman << \"C\" }\nelsif cd == 4\n\troman << \"CD\"\nelsif cd == 5\n\troman << \"D\"\nelsif cd > 5 && cd < 9\n\troman << \"D\"\n\t(cd - 5).times { roman << \"C\" }\nelsif cd == 9\n\troman << \"CM\"\nend\n\nif lx <= 3\n\tlx.times { roman << \"X\" }\nelsif lx == 4\n\troman << \"XL\"\nelsif lx == 5\n\troman << \"L\"\nelsif lx > 5 && lx < 9\n\troman << \"L\"\n\t(lx - 5).times { roman << \"X\" }\nelsif lx == 9\n\troman << \"XC\"\nend\n\nif vi <= 3\n\tvi.times { roman << \"I\" }\nelsif vi == 4\n\troman << \"IV\"\nelsif vi == 5\n\troman << \"V\"\nelsif vi > 5 && vi < 9\n\troman << \"V\"\n\t(vi - 5).times { roman << \"I\" }\nelsif vi == 9\n\troman << \"IX\"\nend\n\nroman.join\n\nend",
"def roman\n #old_roman = nil\n #i,v,x,l,c,d,ms,request = nil\n while true \n puts \"enter a number between 1 and 3000 ['q' to quit program]\"\n request = gets.chomp\n break if request.downcase == 'q'\n (puts 'only enter between 1 and 3000';next) if request.to_i < 1 || request.to_i > 3000\n request= request.to_i\n ms = request / 1000\n test = request % 1000\n d = test / 500\n test = test % 500\n c = test / 100\n test = test % 100\n l = test / 50\n test = test % 50\n x = test / 10\n test = test % 10\n v = test / 5\n test = test % 5\n i = test\n puts\n puts \n old_roman = 'M'*ms + 'D'*d + 'C'*c+ 'L'*l + 'X'*x + 'V'*v+ 'I'*i\n puts old_roman\n end\n old_roman\nend",
"def roman_mappings\n {\n 1000 => 'M',\n 900 => 'CM',\n 500 => 'D',\n 400 => 'CD',\n 100 => 'C',\n 90 => 'XC',\n 50 => 'L',\n 40 => 'XL',\n 10 => 'X',\n 9 => 'IX',\n 5 => 'V',\n 4 => 'IV',\n 1 => 'I',\n }\n end",
"def int_to_roman val\n ROMAN_NUMERALS.map do |l, i|\n repeat, val = val.divmod i\n l * repeat\n end.join\n end",
"def roman_numeral num\n roman_to_arabic = {\n M: 1_000, CM: 900, D: 500, CD: 400,\n C: 100, XC: 90, L: 50, XL: 40,\n X: 10, IX: 9, V: 5, IV: 4,\n I: 1\n }\n\n return '' if num <= 0\n roman_to_arabic.each { |key, val| return key.to_s + roman_numeral(num - val) if num >= val }\nend",
"def roman_convert(input)\n numerals_string = []\n input_array = input.split('')\n\n until input_array.empty?\n case input_array.length\n when 4\n puts \"#{input_array.first}000 = #{@thousands[input_array.first.to_i]}\"\n numerals_string.push(@thousands[input_array.shift.to_i])\n when 3\n puts \" #{input_array.first}00 = #{@hundreds[input_array.first.to_i]}\"\n numerals_string.push(@hundreds[input_array.shift.to_i])\n when 2\n puts \" #{input_array.first}0 = #{@tens[input_array.first.to_i]}\"\n numerals_string.push(@tens[input_array.shift.to_i])\n when 1\n puts \" #{input_array.first} = #{@units[input_array.first.to_i]}\"\n numerals_string.push(@units[input_array.shift.to_i])\n else\n break\n end\n end\n\n puts ''\n puts 'Your number converted to Roman Numerals is: '\n puts \"#{numerals_string.join}\"\n puts ''\n end",
"def roman_numeral num\n\tif num > 999999\n\t\treturn \"number too big for roman numerals\"\n\tend\n\n\trom_digits = ['I','V','X','L','C','D','M','P','Q','R','S','T','A','B','E','F']\n\tnum_of_digits = (num).to_s.length\n\troman_num = ''\n\n\tfor i in 0...num_of_digits\n\t\troman_num = romnum_1_to_9(num,rom_digits[i*2],rom_digits[i*2+1],rom_digits[i*2+2],10**i) + roman_num\n\tend\n\t\n\treturn roman_num\n\nend",
"def old_roman_numeral num\n working_num = num\n roman_val = ''\n \n numeral_ref = [[1, 'I'],\n [5, 'V'],\n [10, 'X'],\n [50, 'L'],\n [100, 'C'],\n [500, 'D'],\n [1000, 'M']]\n \n (0...numeral_ref.length).reverse_each { |i|\n if working_num >= numeral_ref[i][0]\n mult = working_num/numeral_ref[i][0]\n roman_val += numeral_ref[i][1]*(mult)\n working_num %= numeral_ref[i][0]\n end\n }\n roman_val\nend",
"def modern_roman_numeral(num)\n arabs_to_romans = [\n ['M', 1000],\n ['CM', 900],\n ['D', 500],\n ['CD', 400],\n ['C', 100],\n ['XC', 90],\n ['L', 50],\n ['XL', 40],\n ['X', 10],\n ['IX', 9],\n ['V', 5],\n ['IV', 4],\n ['I', 1]\n ]\n\n result = ''\n\n arabs_to_romans.each do |arab_to_roman|\n arab = arab_to_roman[1]\n roman = arab_to_roman[0]\n\n if num / arab != 0\n result += roman * (num / arab)\n num = num % arab\n end\n end\n result\nend",
"def to_roman(value)\n return \"zero\" if value == 0\n roman_numeral = value < 0 ? \"-\" : \"\"\n value = value.abs\n \n while value >= 1\n NUMERALS.each_with_index do |number, index|\n if value >= number\n roman_numeral += ROMANS[index]\n value -= number\n break\n end\n end\n end\n return roman_numeral\n end",
"def convertToRoman(n)\n #divide by roman num taken out\n #num is remainder \n #repeat\n roman = { 1000 => \"M\", 900 => \"CM\", 500 => \"D\", 400 => \"CD\", 100 => \"C\", 90 => \"XC\", 50 => \"L\", 40 => \"XL\", 10 => \"X\", 9 => \"IX\", 5 => \"V\", 4 => \"IV\", 1 => \"I\" }\n\n ans = \"\"\n roman.keys.each do |divisor|\n quotient, modulus = n.divmod(divisor)\n ans << roman[divisor] * quotient\n n = modulus\n end\n return ans \nend",
"def convert(c)\n out = []\n if c == 100\n out << \"C\"\n c -= 100\n end\n if c >= 90\n out << \"XC\"\n c -= 90\n end\n if c >= 50\n out << \"L\"\n c -= 50\n end\n if c >= 40\n out << \"XL\"\n c -= 40\n end\n while c >= 10\n out << \"X\"\n c -= 10\n end\n if c == 9\n out << \"IX\"\n c -= 9\n end\n if c >= 5\n out << \"V\"\n c -= 5\n end\n if c == 4\n out << \"IV\"\n c -= 4\n end\n while c > 0\n out << \"I\"\n c -= 1\n end\n puts \"Your number in Roman Numeral is:\"\n puts out.join\nend",
"def roman digit\n\n\trules = [ 'I', 'V', 'X', 'L', 'C', 'D', 'M']\n\tnum = digit[0]\n\tplace = digit[1]\n\n\nromannumeral = []\nif num == 5\n\tromannumeral.push rules[place+1].to_s\n\n\nelse if num > 5\n\tromannumeral.push rules[place+1].to_s\n\tnum = num - 5\n\tnum.times do\n\tromannumeral.push rules[place].to_s\n\tend\n\nelse if num < 5\n\tnum.times do\n\t\tputs 'num<5'\n\tromannumeral.push rules[place].to_s\n\tend\n\n\tend\n\tend\n\tend\n\nreturn romannumeral\nend",
"def old_roman\n #old_roman = ''\n while true \n puts \"enter a number between 1 and 3000\"\n request = gets.chomp.to_i\n (puts 'only enter between 1 and 3000';next) if request < 1 || request > 3000\n ms = request / 1000\n test = request - ms*1000\n d = test / 500\n test = test - d*500\n c = test / 100\n test = test - c*100\n l = test / 50\n test = test - l*50\n x = test / 10\n test = test - x*10\n v = test / 5\n test = test - v*5\n i = test\n puts\n puts request\n puts 'M'*ms + 'D'*d + 'C'*c+ 'L'*l + 'X'*x + 'V'*v+ 'I'*i\n end\nend",
"def roman_numeral(arabic_numeral)\n arabic_array = arabic_numeral.to_s.split(//)\n arabic_array_int = arabic_array.map { |int| int.to_i }\n if arabic_array.length >= 8\n puts \">> This feature only supports numbers up to 9,999,999, as the unicode for Roman numerals above 1,000 is not universally displayable. Please enter a positive whole number less than 10,000,000:\"\n arabic_numeral = gets.to_i\n roman_numeral(arabic_numeral)\n loop do\n break if arabic_numeral > 0\n if arabic_numeral <= 0\n puts \">> Make sure that the number you enter is greater than 0:\"\n end\n arabic_numeral = gets.to_i\n end\n end\n# begin millions place\n if arabic_array_int[-7] != nil\n millions = arabic_array_int[-7] * 1000\n millions.times { |mmmmm| print \"M\" }\n end\n# begin hundred thousands place\n if arabic_array_int[-6] != nil\n hundred_thousands = arabic_array_int[-6] * 100\n hundred_thousands.times { |mmm| print \"M\" }\n end\n# begin ten thousands place\n if arabic_array_int[-5] != nil\n ten_thousands = arabic_array_int[-5] * 10\n ten_thousands.times { |mm| print \"M\" }\n end\n# begin thousands place\n if arabic_array_int[-4] != nil\n m = arabic_array_int[-4]\n m.times { |m| print \"M\" }\n end\n# begin hundreds place\n unless arabic_array_int[-3] != true || arabic_array_int[-3] == 9 || arabic_array_int[-3] == 4 || arabic_array_int[-3] >= 5 && arabic_array_int[-3] <= 8\n arabic_array_int[-3].times { |c| print \"C\" }\n end\n if arabic_array_int[-3] == 1\n print \"C\"\n end\n if arabic_array_int[-3] == 2\n print \"CC\"\n end\n if arabic_array_int[-3] == 3\n print \"CCC\"\n end\n if arabic_array_int[-3] == 4\n print \"CD\"\n end\n if arabic_array_int[-3] == 5\n print \"D\"\n elsif arabic_array_int[-3] == 6 \n print \"DC\"\n elsif arabic_array_int[-3] == 7\n print \"DCC\"\n elsif arabic_array_int[-3] == 8\n print \"DCCC\"\n end \n if arabic_array_int[-3] == 9\n print \"CM\"\n end\n \n# begin tens place\n unless arabic_array_int[-2] != true || arabic_array_int[-2] == 9 || arabic_array_int[-2] == 4 || arabic_array_int[-2] >= 5 && arabic_array_int[-2] <= 8\n arabic_array_int[-2].times { |x| print \"X\" }\n end\n if arabic_array_int[-2] == 1\n print \"X\" \n elsif arabic_array_int[-2] == 2\n print \"XX\"\n elsif arabic_array_int[-2] == 3\n print \"XXX\"\n elsif arabic_array_int[-2] == 4\n print \"XL\"\n elsif arabic_array_int[-2] == 5\n print \"L\"\n elsif arabic_array_int[-2] == 6 \n print \"LX\"\n elsif arabic_array_int[-2] == 7\n print \"LXX\"\n elsif arabic_array_int[-2] == 8\n print \"LXXX\"\n elsif arabic_array_int[-2] == 9\n print \"XC\"\n end\n \n# begin ones place\n unless arabic_array_int[-1] == 9 || arabic_array_int[-1] == 4 || arabic_array_int[-1] >= 5 && arabic_array_int[-1] <= 8\n arabic_array_int[-1].times { |ones| print \"I\" }\n end\n if arabic_array_int[-1] == 5\n print \"V\"\n elsif arabic_array_int[-1] == 6 \n print \"VI\"\n elsif arabic_array_int[-1] == 7\n print \"VII\"\n elsif arabic_array_int[-1] == 8\n print \"VIII\"\n end \n if arabic_array_int[-1] == 9\n print \"IX\"\n end\n if arabic_array_int[-1] == 4\n print \"IV\"\n end\n# end line for readability\nprint \"\\n\"\nend",
"def roman(decimal)\n bases = ROMANS.keys\n roman = \"\"\n base = bases.pop\n while base > 1 and decimal > 0 do\n y = Math.log(decimal, base).floor \n if y > 0\n roman << ROMANS[base] * y\n decimal -= base ** y\n else\n base = bases.pop\n end\n end\n roman << ROMANS[base] * decimal\n end",
"def roman(decimal)\n bases = ROMANS.keys\n roman = \"\"\n base = bases.pop\n while base > 1 and decimal > 0 do\n y = Math.log(decimal, base).floor \n if y > 0\n roman << ROMANS[base] * y\n decimal -= base ** y\n else\n base = bases.pop\n end\n end\n roman << ROMANS[base] * decimal\n end",
"def roman\n return ROMANS[ self] if ROMANS.has_key? self\n ROMANSUB.each do |cut,sub|\n return cut.roman + (self - cut).roman if self > cut\n return sub.roman + (self + sub).roman if self >= cut - sub and self < cut\n end\n nil\n end",
"def roman (remainder, digit)\r\n if remainder < digit # ie you do not have any of this roman letter\r\n x = nil.to_i\r\n else\r\n x = remainder / digit\r\n end\r\n\r\n y = remainder % digit\r\n\r\n return [x,y]\r\nend",
"def solution(number)\n roman_numeral = { 1 => 'I', 4 => 'IV', 5=> 'V', 6 => 'VI', 10=> 'X', 50=> 'L', 100=> 'C', 500=> 'D', 1000=> 'M' }\n numbers = number.digits.map.with_index{ |int, idx| int * 10**idx }\n numbers.map{ |number| roman_numeral[number] }.reverse.join\nend",
"def to_arabic_numeral(roman)\n number = sum = 0\n roman.bytes do |char| \n sum += number - 2 * number % number = 10 ** (205558 % char % 7) % 9995\n end\n sum + number\n end",
"def to_roman(integer)\n integer = integer.to_i\n if integer < 1 or integer > 3999\n raise RangeError, \"Integer must be between 1 and 3999\"\n end\n\n roman = \"\"\n integer, roman = prepare_group(integer, roman, 1000, \"M\", 900, \"CM\")\n integer, roman = prepare_group(integer, roman, 500, \"D\", 400, \"CD\")\n integer, roman = prepare_group(integer, roman, 100, \"C\", 90, \"XC\")\n integer, roman = prepare_group(integer, roman, 50, \"L\", 40, \"XL\")\n integer, roman = prepare_group(integer, roman, 10, \"X\", 9, \"IX\")\n integer, roman = prepare_group(integer, roman, 5, \"V\", 4, \"IV\")\n integer, roman = prepare_group(integer, roman, 1, \"I\", nil, nil)\n\n roman\nend",
"def to_r(decimal)\n roman_form = ''\n\n decimal = decimal.round if decimal.is_a? Float\n\n @@roman_numerals.reverse_each do |letter, number|\n while decimal / number > 0\n roman_form = roman_form + letter.to_s\n decimal = decimal - number\n end\n end\n if subtractive_notation?\n roman_form.gsub! 'VIIII', 'IX'\n roman_form.gsub! 'IIII', 'IV'\n roman_form.gsub! 'LXXXX', 'XC'\n roman_form.gsub! 'XXXX', 'XL'\n roman_form.gsub! 'DCCCC', 'CM'\n roman_form.gsub! 'CCCC', 'CD'\n end\n roman_form\n end",
"def roman_numeral num\n working_num = num\n roman_val = ''\n \n # [number value, roman value, index of its modifier (if any)]\n numeral_ref = [[1, 'I'], #0\n [5, 'V', 0],\n [10, 'X', 0], #2\n [50, 'L', 2],\n [100, 'C', 2], # 4\n [500, 'D', 4],\n [1000, 'M', 4]] #6\n \n (0...numeral_ref.length).reverse_each { |i|\n \n ref_num = numeral_ref[i][0]\n ref_rom = numeral_ref[i][1]\n ref_mod_i = numeral_ref[i][2]\n ref_mod_num = ref_mod_i ? numeral_ref[ref_mod_i][0] : 0\n ref_mod_rom = ref_mod_i ? numeral_ref[ref_mod_i][1] : ''\n \n if working_num >= ref_num # The 'normal' case\n mult = working_num/ref_num\n roman_val += ref_rom*(mult)\n working_num %= ref_num\n end\n if working_num >= (ref_num - ref_mod_num) # The 'subtraction case'\n roman_val += ref_mod_rom+ref_rom\n working_num -= (ref_num - ref_mod_num)\n end\n \n }\n roman_val\nend"
] | [
"0.78683865",
"0.78165555",
"0.77671367",
"0.7752862",
"0.77039236",
"0.7701574",
"0.7695017",
"0.7695017",
"0.76948476",
"0.76708907",
"0.7661366",
"0.7657832",
"0.76352364",
"0.76172334",
"0.76136774",
"0.7606277",
"0.76027477",
"0.75841004",
"0.75776225",
"0.75199264",
"0.75170386",
"0.7511064",
"0.7491191",
"0.7481689",
"0.7476974",
"0.7470074",
"0.7456023",
"0.744559",
"0.7413425",
"0.7402702",
"0.7398129",
"0.73883075",
"0.7383534",
"0.73738575",
"0.73579365",
"0.735381",
"0.7350702",
"0.7339747",
"0.73363966",
"0.732649",
"0.7326267",
"0.7317663",
"0.7311201",
"0.7308205",
"0.7307884",
"0.72993356",
"0.7291728",
"0.72913694",
"0.727822",
"0.7264851",
"0.72506946",
"0.72506946",
"0.7245262",
"0.7239318",
"0.7231868",
"0.7208416",
"0.7205686",
"0.71761614",
"0.7169522",
"0.7165408",
"0.71499115",
"0.71198064",
"0.7090566",
"0.70709956",
"0.7033953",
"0.7027471",
"0.7023852",
"0.7023211",
"0.70133454",
"0.7009494",
"0.70067436",
"0.6994463",
"0.69722503",
"0.6970521",
"0.695351",
"0.69455564",
"0.6945324",
"0.69346786",
"0.6914009",
"0.6913379",
"0.68382084",
"0.68347067",
"0.68174034",
"0.680987",
"0.6800229",
"0.6799885",
"0.67910874",
"0.67148775",
"0.6713689",
"0.66754836",
"0.66753805",
"0.6645236",
"0.6645236",
"0.6644506",
"0.6631412",
"0.660258",
"0.6599812",
"0.6596134",
"0.659558",
"0.6591174"
] | 0.7668897 | 10 |
Removed deprecated Loan.find call | def set_loan
@loan = Loan.where(id: params[:id]).first
render json: 'not_found', status: :not_found if (@loan.nil?)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find_by()\n\n end",
"def find(id); end",
"def find(id); end",
"def find(query); end",
"def find(query); end",
"def find; end",
"def find\n raise \"Method not implemented\"\n end",
"def find(id)\n\nend",
"def find\n fail NotImplementedError\n end",
"def find_by_sql(sql)\n raise \"not implemented\"\n end",
"def find(id)\n end",
"def find(id)\n find_result\n end",
"def method_for_find\n :find_by_slug!\n end",
"def find(id)\n raise NotImplementedError\n end",
"def find opt = nil, opts = { }\n opt ||= :all\n \n opts[:limit] = 1 if opt == :first\n\n # self.sql sets self.model_class.\n this_sql = self.sql(opts)\n result = model_class.find_by_sql(this_sql)\n\n result = result.first if opt == :first\n\n result\n end",
"def find(name); end",
"def find_unpublished(*args)\r\n unpublished.find(*args)\r\n end",
"def find_by_name(name)\n end",
"def find_by_name(id)\n end",
"def find(id)\n finder_or_run(:find, id)\n end",
"def find(options={})\n query(options)\n end",
"def find_by_id(id)\n find_by(:id, id)\n end",
"def find(value)\n end",
"def find(dn = self.dn, options = {})\n # Some misguided attempts to emulate active record.\n case dn\n when :all then search({:limit => false}.merge(options))\n when :first then first(options)\n when Array then dn.map {|d| fetch(d, options)}\n else fetch(dn, options)\n end\n end",
"def find(num)\n Politician.find(num)\n end",
"def db_find(query=nil)\n return $posts.find(query)\nend",
"def list_find_by_name(name, options = {})\n list_find({\n :name => name,\n }.merge(options))\n end",
"def find_all\n \n end",
"def find(id)\n fetch([name, id]) do\n super\n end\n end",
"def find( options = {} )\n table = store.table( options.delete(:_table) )\n if GreyscaleRecord.live_reload\n load_table!( table.name )\n end\n\n # TODO: this is where all the meat is\n table.find options\n end",
"def index\n @pupil_has_lessons = PupilHasLesson.all\n @lessons = Lesson.all.to_a\n @payments = PupilHasLesson.find_by_sql(\"SELECT * FROM pupil_has_lessons;\").to_a\n\n\n @payments.define_singleton_method(:find_by_pupil_lesson) do |*args|\n puts args.inspect\n self.each do |l|\n if l.lesson_id == args[0] && l.lesson_id == args[1]\n puts \"#{l.inspect}\"\n return l\n end\n end\n return nil\n end\n end",
"def simple_find(*args, &blk)\n find(:__no_pretty_finder__, nil, *args, &blk)\n end",
"def find id, params = {}, &block\n rel = relation params, &block\n rel.where!(config.document_unique_id_param => id) \n rel.load\n rel\n end",
"def find_all\n end",
"def find(id)\n # Your code Here\n @candidates.each do |candidate|\n \tif candidate[:id] == id\n \t return candidate\n \tend\n end\n return nil\nend",
"def list_find_by_id(id, options = {})\n list_find({\n :id => id\n }.merge(options))\n end",
"def loans(hash={})\n hash[:funding_line_id] = funding_lines.map{|x| x.id}\n Loan.all(hash)\n end",
"def find(*args)\n find_all(*args).first\n end",
"def find_account\n @to_find = Account.find(params[:id])\n end",
"def find_account\n @to_find = Account.find(params[:id])\n end",
"def find(options = {})\n if(options.class == Integer)\n model = self.new(quickbook_gateway.get(\"#{entity.downcase}/#{options}\")[entity]) \n model.is_new_record = false\n return model\n end\n \n return self.find_all(options, 1)[0]\n end",
"def find(id)\n @candidates.select{|candidate| candidate[:id] === id }\n #return @candidates\n\nend",
"def find_by_id(id)\n find(id)\n end",
"def find_for_koala(identifier)\n self.first(:conditions => { koala_identifier_field => identifier })\n end",
"def student_find(name)\n\t@directory_students.find {|student|students_equal(student,name)}\n\tend",
"def find!\n @total_found = 0\n @results = nil\n return results\n end",
"def find(id)\n binding.pry\n candidate.each do |candidate|\n if @candidate[:id] == id\n return candidate\n else\n nil\n end \n end \nend",
"def find(loc, data)\n list.find(loc, data)\n end",
"def find_angelina\n #find Angelina Jolie by name in the actors table\n\n # find_by\n # Finds the first record matching the specified conditions.\n # There is no implied ordering so if order matters, you should specify it yourself.\n # If no record is found, returns nil.\n\n # Actor.find_by name: 'Angelina Jolie'\n Actor.find_by(name: 'Angelina Jolie')\nend",
"def find\n super.first\n end",
"def find_by_id!(id)\n SchoolYear.find_by_id!(id)\n end",
"def get_news_by_id(news_ids,opt={})\n News.find news_ids, update_rank: opt[:update_rank], user_id: ($user ? $user.id : nil)\nend",
"def find(*args)\n list = []\n if args.first == :all\n result = Rhom::RhomDbAdapter::select_from_table(Rhom::TABLE_NAME,\n '*',\n {\"source_id\"=>get_source_id,\"update_type\"=>'query'},\n {\"order by\"=>'object'})\n else\n obj = strip_braces(args.first.to_s)\n result = Rhom::RhomDbAdapter::select_from_table(Rhom::TABLE_NAME,\n '*',\n {\"object\"=>obj})\n end\n list = get_list(result)\n if list.length == 1\n return list[0]\n end\n list\n end",
"def find!(id)\n find(id) || raise(RecordNotFound, id)\n end",
"def find_by_name(name)\n # self.all.find do |customer|\n # customer.name == name\n # end\n Customer.find_by(name: name)\n end",
"def find_relations\n puts '2nd pass: find relations'\n find :relations\n self\n end",
"def find_by_id(id)\n raise NotImplementedError.new\n end",
"def method_missing(method, *args)\n begin\n if method != :find_by_symbol\n if obj = find_by_symbol(method)\n redefine_method method do\n find_by_symbol(method)\n end\n return obj\n end\n end\n rescue\n # Ignore errors, and call super\n end\n super\n end",
"def find( id )\n model.get( id ).extend( InstanceMethods )\n end",
"def find(id)\n @candidates.each do |candidate|\n if id == candidate[:id] \n return candidate\n end\nend\n\n nil\nend",
"def find id\n model.find id\n end",
"def set_loan\n @loan = Loan.find(params[:id])\n end",
"def find(*args, &block)\n if args.first.is_a?(Hash)\n super(*args, &block)\n else\n super(id: args)\n end\n end",
"def find_record\n if record\n self.new_session = false\n return record\n end\n \n find_with.each do |find_method|\n if send(\"valid_#{find_method}?\")\n self.new_session = false\n return record\n end\n end\n nil\n end",
"def find_by_id(id)\n results = many.find_with_attributes_ne(id)\n results.blank? && nil || with_details(results)\n end",
"def _find_record(options)\n if options && options[:lock]\n self.class.preload(strict_loaded_associations).lock(options[:lock]).find_by!(hid: hid)\n else\n self.class.preload(strict_loaded_associations).find_by!(hid: hid)\n end\n end",
"def find list, &block\n list.find &block\nend",
"def find(id)\n # Your code Here\n @candidates.each do |candidate|\n if id == candidate[:id]\n return candidate\n end\n end\n\n nil\nend",
"def find_all\n finder_or_run(:find_all)\n end",
"def find(*args)\n select(*args)\n\n=begin\n\n options = args.last.is_a?(Hash) ? args.pop : {}\n case args.first\n when :all then find_every options\n when :first then find_initial options\n else find_from_ids args, options\n end\n\n=end\n\n end",
"def find(input)\n end",
"def find(*args)\n return super if block_given?\n find_with_ids(*args)\n end",
"def find_by_token!(token)\n record = find_by_token(token)\n raise ActiveRecord::RecordNotFound, \"Could not find #{self.name} with token #{token.inspect}\" if record.nil?\n record\n end",
"def find(id)\n # Your code Here\n @candidates.each do |candidate|\n if candidate[:id] == id\n return candidate\n end\n end\n nil\nend",
"def find_by!(values)\n find_by(values) || fail(RecordNotFound.new(\"#{self.query_as(:n).where(n: values).limit(1).to_cypher} returned no results\", name))\n end",
"def find_published(*args)\r\n published.find(*args)\r\n end",
"def find item\n\tend",
"def find_by(**args)\n where(**args).first\n end",
"def find_account\n @to_find = Account.find(params[:id])\n\n if @to_find.is_deleted\n render status: :not_found and return\n end\n end",
"def find(options = {})\n tmp = nil\n @member_class.with_scope(options) do\n tmp = @owner.send(@find_proc, @find_options)\n end\n return tmp\n end",
"def find_all\n fail NotImplementedError\n end",
"def set_loan\n @loan = @user.loans.find(params[:id])\n end",
"def find(&block)\n return nil unless valid?\n @hops.find(&block)\n end",
"def for_unit(unit); find(:all, :conditions => {:unit_id => (unit.nil? ? nil : unit.class == Fixnum ? unit : unit.id)}); end",
"def find_locally(id)\n if @all.present?\n @all.find { |model| model.id == id }\n end\n end",
"def find_by_id!(id)\n new(one.find_by_id(id) || raise(RecordNotFound, \"A #{name} record for #{id} does not exist.\"))\n end",
"def find_one(&block)\r\n copy_and_return(@records.find(&block))\r\n end",
"def find(id)\n @candidates.detect{|number| number[:id] == id} \n #or option #2\n #def find(id) \n #@candidates.detect{|number| number[:id] == id}\nend",
"def find(id)\n # Your code Here\n # puts \"you are looking for id: #{id}\"\n @candidates.each do |candidate|\n if candidate[:id] == id\n return candidate\n end\n end\n return nil\nend",
"def calls_where\n self.class.where(person_to_look_up)\n end",
"def find_object(name); end",
"def find(id)\n # takes single candidate as id :\n @candidates.each do | candidate |\n if candidate[:id] == id \n\n return candidate\n else \n nil\n end\n end\nend",
"def find list, &block\n list.find(&block)\nend",
"def find(id)\n\t records = DATA.execute(\"SELECT * FROM #{@table} WHERE id = #{id}\")\n\t record = records[0]\n fields=[]\n if record.nil?\n return nil\n else\n for i in 0..((record.count/2)-1)\n fields.push(record[i])\n end\n end\n \n self.new(*fields)\n end",
"def find(id=nil)\n record = self.connection.exec_params('SELECT * FROM contacts '\\\n 'WHERE id = $1::int', [id]) if id.is_a?(Integer)\n \n record.nil? || record.num_tuples.zero? ? nil : new(record[0].values[1], record[0].values[2], record[0].values[0])\n end",
"def find(id)\n @candidates.each do |person|\n if person[:id] === id\n return person\n end\n end\n return nil\nend",
"def index\n @loans = Loan.all\n end",
"def index\n @loans = Loan.all\n end",
"def item_find\n find(playlist_url(@response.old_index))\n end",
"def find(query,options={})\n options.merge!(:q => query, :sll => @latlng) # Merge in the query and the lat/lng into the options\n fetch_locations(self.class.get(\"/local\", :query => options)) # Make the get request\n end",
"def find(id)\n # binding.pry\n raise '@candidates must be an Array' if @candidates.nil?\n candidate.each do |candidate|\n if candidate[:id] == id\n return candidate\n else\n nil\n end \n end \nend"
] | [
"0.6241496",
"0.623613",
"0.623613",
"0.62188005",
"0.62188005",
"0.6179869",
"0.5895776",
"0.586347",
"0.5818577",
"0.5815296",
"0.56866366",
"0.56771946",
"0.56570977",
"0.56187296",
"0.5570898",
"0.55703187",
"0.5556999",
"0.5552476",
"0.5522732",
"0.5475456",
"0.5451579",
"0.5437686",
"0.5429349",
"0.54189116",
"0.54185",
"0.5404398",
"0.54010034",
"0.5380768",
"0.5366155",
"0.53604895",
"0.5358599",
"0.5347345",
"0.5338684",
"0.53335273",
"0.532954",
"0.53287065",
"0.5325493",
"0.532158",
"0.53173834",
"0.53173834",
"0.53145707",
"0.5314427",
"0.5311291",
"0.53056663",
"0.52623624",
"0.5250612",
"0.5244722",
"0.5244132",
"0.52369285",
"0.5235881",
"0.5227153",
"0.5226743",
"0.52230304",
"0.5215977",
"0.52124083",
"0.5200676",
"0.51981753",
"0.51917374",
"0.5187759",
"0.5185651",
"0.51830363",
"0.5178013",
"0.5173612",
"0.5170371",
"0.5161883",
"0.51617146",
"0.5160879",
"0.51587045",
"0.5158038",
"0.5151377",
"0.51423264",
"0.51343906",
"0.512682",
"0.5122816",
"0.5114993",
"0.5108864",
"0.51003486",
"0.50958395",
"0.50949246",
"0.50934523",
"0.5092195",
"0.50911564",
"0.5090134",
"0.50896776",
"0.50862306",
"0.5085973",
"0.5083563",
"0.50831985",
"0.5080228",
"0.5075426",
"0.50748706",
"0.5054642",
"0.5052384",
"0.50521684",
"0.5046835",
"0.50457525",
"0.5045293",
"0.5045293",
"0.5042069",
"0.50410616",
"0.50395364"
] | 0.0 | -1 |
Gets the addIns property value. Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its 'FileHandler' functionality. This will let services like Office 365 call the application in the context of a document the user is working on. | def add_ins
return @add_ins
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_addins\n self.class.addins\n end",
"def add_ins=(value)\n @add_ins = value\n end",
"def addins\n @addins ||= []\n end",
"def custom_extension_callout_instances\n return @custom_extension_callout_instances\n end",
"def handle_addins\n add_addins_to_context\n self\n end",
"def extensions\n @config[:extensions]\n end",
"def custom_extension_callout_instances=(value)\n @custom_extension_callout_instances = value\n end",
"def include_locations\n return @include_locations\n end",
"def casein_config_javascript_includes\n %w[casein/custom casein/casein]\n end",
"def add_addins_to_context\n addin_data = setup_addins addins\n\n addin_data[:methods].each do |method|\n @context.add_method method[:name], method[:receiver]\n end\n\n @context.define_klass\n\n addin_data[:builds].each do |build|\n @context.run_with_current(&build)\n end\n end",
"def insight\n return @insight\n end",
"def custom_endpoints\n data[:custom_endpoints]\n end",
"def includes(*args)\n config.includes.push *args\n end",
"def apps_install_allow_list\n return @apps_install_allow_list\n end",
"def authorized_gae_applications\n settings[:authorized_gae_applications]\n end",
"def client_app_types\n return @client_app_types\n end",
"def custom_workflow_extensions\n return @custom_workflow_extensions\n end",
"def extension_properties\n return @extension_properties\n end",
"def casein_config_javascript_includes\n\t \t['/casein/javascripts/custom.js', '/casein/javascripts/casein.js', '/javascripts/prototype.js']\n\tend",
"def framework\n 'inspec'\n end",
"def current_app_support\r\n\r\n end",
"def custom_extension_stage_settings\n return @custom_extension_stage_settings\n end",
"def application_include\n @application_include || false\n end",
"def include_extensions\n @included_extensions ||= include_extensions!\n end",
"def pre_authorized_applications\n return @pre_authorized_applications\n end",
"def inspect\n context = @solution.map{|k, v| \"#{k}: #{v}\"}.join(',')\n \"#<Twilio.Microvisor.V1.AppManifestContext #{context}>\"\n end",
"def sign_in_audience\n return @sign_in_audience\n end",
"def extensions\n return @extensions\n end",
"def extensions\n return @extensions\n end",
"def extensions\n return @extensions\n end",
"def include?\n @options[:include]\n end",
"def custom_workflow_extensions=(value)\n @custom_workflow_extensions = value\n end",
"def extensions\n self.class.extensions\n end",
"def extensions\n self.class.extensions\n end",
"def includes\n @includes ||= params[:include].to_s.split(',')\n end",
"def included_in\n @included_in ||= []\n end",
"def wix_light_extensions\n @wix_light_extensions ||= []\n end",
"def addons(app_env)\n app_setting_list('addons', app_env)\n end",
"def managed_apps\n return @managed_apps\n end",
"def client_applications\n return @client_applications\n end",
"def get_use_context\n use_context_array =\n locations.each_with_object([]) do |loc, accumulator|\n key = \"venue$#{loc.resource.identifier.last.value}\"\n\n accumulator << key\n end\n\n use_context_array.join(USE_CONTEXT_DELIMITER)\n end",
"def get_extensions\n get_siteinfo('extensions')['query']['extensions'].collect { |e| e['name'] }\n end",
"def infection \n\n return @extra_infection + @patient.infection\n\n end",
"def sites_to_load\n @appl_settings[:registered_config_modules]\n end",
"def get_extensions\n # no extensions to include\n ::Occi::Collection.new\n end",
"def targeted_managed_app_configurations\n return @targeted_managed_app_configurations\n end",
"def getMyEnterpriseAPP\n \treturn view_context.getMyEnterprise\n end",
"def include_locations=(value)\n @include_locations = value\n end",
"def app_accept\n sword_accepts.find{|a| a.alternate.nil? }\n end",
"def extensions\n @@extensions\n end",
"def extensions\n @@extensions\n end",
"def includes\n include_params.select { |i| config_for(i).present? }\n end",
"def extension_whitelist\r\n self.class.available_extensions\r\n end",
"def pre_authorized_applications=(value)\n @pre_authorized_applications = value\n end",
"def includes()\n includes = @data[\"includes\"]\n if includes.nil? || includes == \"\"\n return []\n elsif includes.class == String\n return [includes]\n elsif includes.class == Array\n return includes\n else\n raise InvalidIncludesFormat.new(\"Value for 'includes' in #{@name} must be a String or an Array, (#{includes.inspect})\")\n end\n end",
"def to_a\n if metadata[:included]\n metadata[:included].map { |uri| @environment.load(uri) }\n else\n [self]\n end\n end",
"def add_includes out, includes\n add_extension_modules out, 'Includes', includes\n end",
"def extensions\n if wrapper\n (wrapper.extensions + config[:extensions]).uniq\n else\n config[:extensions]\n end\n end",
"def managed_app_policies\n return @managed_app_policies\n end",
"def addin(*ads)\n ads.each do |ad|\n addins << Addin.new(ad)\n end\n end",
"def installer_options\n definition.installer_options\n end",
"def configured_handlers\n\t\treturn Mongrel2::Config::Handler.by_send_ident( self.app_id )\n\tend",
"def incidents\n return @incidents\n end",
"def index\n @insints = current_user.insints if !current_admin\n end",
"def includes(*args)\n @options[:include] ||= []\n @options[:include] |= args\n end",
"def managed_app_registrations\n return @managed_app_registrations\n end",
"def client_applications_from_verified_publisher_only\n return @client_applications_from_verified_publisher_only\n end",
"def detected_app_type\n @detected_app_type\n end",
"def show?\n if user.type == 'ReferralAgency'\n user.tenants.include?(app.tenant)\n else\n user.properties.each do |property|\n return true if property.applications.include?(app)\n end\n false\n end\n end",
"def entitlement_management\n return @entitlement_management\n end",
"def mobile_app_configurations\n return @mobile_app_configurations\n end",
"def extensions\n @extensions.to_a\n end",
"def getInstrumentsPath\n if @instrumentsPath.nil?\n if File.directory? \"#{@xcodePath}/../Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/\"\n @instrumentsPath = \"AutomationInstrument.xrplugin\";\n else\n #fallback to old instruments bundle (pre Xcode6)\n @instrumentsPath = \"AutomationInstrument.bundle\";\n end\n end\n @instrumentsPath\n end",
"def office_integration_enabled\n @attributes[:office_integration_enabled]\n end",
"def add_includes(inc)\r\n return if inc.nil?\r\n \r\n inc = [inc] if (!inc.respond_to?(:each) || inc.kind_of?(String))\r\n \r\n if inc.include?(:all)\r\n ole_methods.each do |m|\r\n m = m.to_s\r\n if m =~ /\\AInclude/ && m != 'IncludeRetElementList'\r\n @request.__send__(\"#{m.underscore}=\", true)\r\n end\r\n end\r\n return\r\n end\r\n \r\n inc.each do |item|\r\n cam_item = item.to_s.camelize.gsub(/Id/, \"ID\")\r\n if @request.respond_to_ole?(\"Include#{cam_item}\")\r\n @request.__send__(\"include_#{item}=\", true)\r\n else\r\n @request.IncludeRetElementList.Add(cam_item)\r\n end\r\n end\r\n end",
"def client_app_types=(value)\n @client_app_types = value\n end",
"def extension_allowlist\n end",
"def apps_single_app_mode_list\n return @apps_single_app_mode_list\n end",
"def known_client_applications\n return @known_client_applications\n end",
"def insights\n return @insights\n end",
"def insights\n return @insights\n end",
"def insights\n return @insights\n end",
"def extension_whitelist\n Spotlight::Engine.config.allowed_upload_extensions\n end",
"def known_client_applications=(value)\n @known_client_applications = value\n end",
"def mobile_apps\n return @mobile_apps\n end",
"def app_management_policies\n return @app_management_policies\n end",
"def addons(app_env)\n addons_hash = {}\n app_setting_list('addons', app_env).each do |setting|\n name, slug = setting.split(':')\n addons_hash[name] = slug\n end\n addons_hash\n end",
"def appl_settings\n @appl_settings\n end",
"def includes\n return :identity => {:service_providers => :organization}\n end",
"def toys_include_builtins(value = :read)\n @toys_include_builtins = value unless value == :read\n return @toys_include_builtins if defined?(@toys_include_builtins)\n begin\n super\n rescue ::NoMethodError\n Testing.toys_include_builtins\n end\n end",
"def introduced\n options[:introduced]\n end",
"def app_roles\n return @app_roles\n end",
"def extension_strategy\n mixin? ? '@include ' : '@extend %'\n end",
"def ext_config\n config[:ext_config] || {}\n end",
"def recommendation_insight_settings\n return @recommendation_insight_settings\n end",
"def extras\n @extras\n end",
"def client_application_ids\n return @client_application_ids\n end",
"def profile_examples\n @options[:profile_examples]\n end",
"def extend(*args)\n include_or_extend(:extend, *args)\n end",
"def app_consent_requests\n return @app_consent_requests\n end"
] | [
"0.584917",
"0.5263579",
"0.5211086",
"0.4929383",
"0.49133906",
"0.4864056",
"0.48339948",
"0.47097632",
"0.46675828",
"0.46615952",
"0.46563137",
"0.46093845",
"0.45622376",
"0.45327112",
"0.44754365",
"0.44612592",
"0.44115275",
"0.44096813",
"0.43906245",
"0.43892723",
"0.43861023",
"0.43815818",
"0.43786073",
"0.43685454",
"0.43495032",
"0.4334999",
"0.43174013",
"0.43015182",
"0.43015182",
"0.43015182",
"0.42886177",
"0.42839453",
"0.427859",
"0.427859",
"0.4265801",
"0.42641854",
"0.42518422",
"0.42449737",
"0.42408454",
"0.42381757",
"0.42377874",
"0.42242098",
"0.42193738",
"0.42187673",
"0.42187348",
"0.42149708",
"0.42139348",
"0.4207995",
"0.4192795",
"0.41815692",
"0.41815692",
"0.41776615",
"0.4176782",
"0.41761383",
"0.4158682",
"0.41560888",
"0.415606",
"0.41436088",
"0.41400886",
"0.41290286",
"0.41265264",
"0.41222492",
"0.41187558",
"0.41064134",
"0.40992326",
"0.40927646",
"0.4088124",
"0.40784806",
"0.40762502",
"0.40751997",
"0.40740368",
"0.40734172",
"0.40690532",
"0.406738",
"0.40599996",
"0.40519857",
"0.40489376",
"0.40452966",
"0.40343404",
"0.40341097",
"0.40341097",
"0.40341097",
"0.40330032",
"0.4031517",
"0.40288207",
"0.402784",
"0.40256828",
"0.40246007",
"0.4008731",
"0.4006251",
"0.3997376",
"0.39966294",
"0.39907673",
"0.3989459",
"0.396695",
"0.39597246",
"0.39575592",
"0.3955593",
"0.39525998",
"0.39487883"
] | 0.532413 | 1 |
Sets the addIns property value. Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its 'FileHandler' functionality. This will let services like Office 365 call the application in the context of a document the user is working on. | def add_ins=(value)
@add_ins = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_addins_to_context\n addin_data = setup_addins addins\n\n addin_data[:methods].each do |method|\n @context.add_method method[:name], method[:receiver]\n end\n\n @context.define_klass\n\n addin_data[:builds].each do |build|\n @context.run_with_current(&build)\n end\n end",
"def handle_addins\n add_addins_to_context\n self\n end",
"def custom_extension_callout_instances=(value)\n @custom_extension_callout_instances = value\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def set_Extras(value)\n set_input(\"Extras\", value)\n end",
"def includes(*args)\n config.includes.push *args\n end",
"def custom_workflow_extensions=(value)\n @custom_workflow_extensions = value\n end",
"def extend(*args)\n include_or_extend(:extend, *args)\n end",
"def pre_authorized_applications=(value)\n @pre_authorized_applications = value\n end",
"def addin(*ads)\n ads.each do |ad|\n addins << Addin.new(ad)\n end\n end",
"def add_extensions(*extensions)\n self.extensions += extensions\n end",
"def include_locations=(value)\n @include_locations = value\n end",
"def casein_config_javascript_includes\n %w[casein/custom casein/casein]\n end",
"def add_extensions(exts)\n if exts.any?\n self.class.wrap(self, extensions + exts.to_a)\n else\n self\n end\n end",
"def add_extensions(exts)\n if exts.any?\n self.class.wrap(self, extensions + exts.to_a)\n else\n self\n end\n end",
"def add_includes out, includes\n add_extension_modules out, 'Includes', includes\n end",
"def includes(*args)\n @options[:include] ||= []\n @options[:include] |= args\n end",
"def add_to_context(args)\n Context::ReservedKeysViaOrganizerVerifier.new(args).verify\n\n Hash(args).map do |key, value|\n context_key = lambda do |ctx|\n ctx[key.to_sym] = value\n ctx.define_accessor_methods_for_keys(key)\n end\n\n execute(context_key)\n end\n end",
"def apps_install_allow_list=(value)\n @apps_install_allow_list = value\n end",
"def add_extend ext\n add_to @extends, ext\n\n ext\n end",
"def addins\n @addins ||= []\n end",
"def set_extensions(val)\n @extensions = val\n build_path_query\n @extensions\n end",
"def set_IncludeEntitities(value)\n set_input(\"IncludeEntitities\", value)\n end",
"def set_client_app_initializers\n return unless request.format == 'html'\n @initializers = { soundcloud: { client_id: ENV['SOUND_CLOUD_CLIENT_ID'] } }\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def set_IncludeEntities(value)\n set_input(\"IncludeEntities\", value)\n end",
"def extensions=(value)\n @extensions = value\n end",
"def extensions=(value)\n @extensions = value\n end",
"def extensions=(value)\n @extensions = value\n end",
"def get_addins\n self.class.addins\n end",
"def set_IncludeUserEntities(value)\n set_input(\"IncludeUserEntities\", value)\n end",
"def set_IncludeUserEntities(value)\n set_input(\"IncludeUserEntities\", value)\n end",
"def set_IncludeUserEntities(value)\n set_input(\"IncludeUserEntities\", value)\n end",
"def set_IncludeUserEntities(value)\n set_input(\"IncludeUserEntities\", value)\n end",
"def set_IncludeUserEntities(value)\n set_input(\"IncludeUserEntities\", value)\n end",
"def extend_options\n options.each do |option|\n klass = Post::Extension.const_get(option.camelize)\n self.extend klass\n end\n end",
"def run_on_additions(paths)\n end",
"def client_app_types=(value)\n @client_app_types = value\n end",
"def custom_extension_stage_settings=(value)\n @custom_extension_stage_settings = value\n end",
"def customize(key, value)\n @customizations << [key, value]\n end",
"def update!(**args)\n @request_extensions = args[:request_extensions] if args.key?(:request_extensions)\n end",
"def add_to_init(*src)\n @init_extra.push(*src)\n end",
"def client_applications=(value)\n @client_applications = value\n end",
"def known_client_applications=(value)\n @known_client_applications = value\n end",
"def before_extend( *contexts, & block )\n \n add_execution_context( *contexts )\n add_hook_context( :before_extend )\n action( & block ) if block_given?\n \n return self\n \n end",
"def enable_extension(name, **)\n end",
"def include_profile(arg)\n (cookbook_name, profile_name) = arg.split(\"::\")\n\n profile_name = \"default\" if profile_name.nil?\n\n profiles = select { |profile| /^#{cookbook_name}$/.match?(profile.cookbook_name) && /^#{profile_name}$/.match?(profile.pathname) }\n\n if profiles.empty?\n raise \"No inspec profiles matching '#{profile_name}' found in cookbooks matching '#{cookbook_name}'\"\n end\n\n profiles.each(&:enable!)\n end",
"def add_extends out, extends\n add_extension_modules out, 'Extended by', extends\n end",
"def managed_apps=(value)\n @managed_apps = value\n end",
"def identity_providers=(value)\n @identity_providers = value\n end",
"def identity_providers=(value)\n @identity_providers = value\n end",
"def add_to_mixable_app_types #:nodoc:\n paths = load_paths.collect {|path| File.expand_path(path)}\n paths.each do |path|\n if path =~ /app\\/([^\\/]+)(\\/.*)?$/\n type = $1.to_sym\n Dependencies.mixable_app_types[type] ||= /.+/\n end\n end\n end",
"def set_app_properties(properties)\n properties = properties.respond_to?(:to_json) ? properties.to_json : properties\n (@session.post 'facebook.admin.setAppProperties', :properties => properties) == '1'\n end",
"def includeImages=(value)\n\t\t\t@includeImages = value\n\t\tend",
"def include_extensions\n @included_extensions ||= include_extensions!\n end",
"def add_hook_context( context )\n\n case context\n when :before_include, :before_extend, :after_include, :after_extend\n case @cluster.instance\n when ::Class\n unless @cluster.instance <= ::Module\n raise ::RuntimeError, 'Include/Extend execution hooks cannot be created for classes.'\n end\n end\n when :subclass\n case @cluster.instance\n when ::Class\n when ::Module\n raise ::RuntimeError, 'Subclass execution hooks cannot be created for modules.'\n end\n end\n \n @hook_contexts[ context ] = true\n \n return self\n \n end",
"def mcx_import(content, append=false)\n settings = Settings.new content\n mcx_flags = { 'has_mcx_settings' => true }\n mcx_flags = mcx_flags.to_plist({:plist_format => CFPropertyList::List::FORMAT_XML, :formatted => true})\n self['mcx_flags'] = [CFPropertyList::Blob.new(mcx_flags)]\n self['mcx_settings'] = settings.domains\n end",
"def add_includes(inc)\r\n return if inc.nil?\r\n \r\n inc = [inc] if (!inc.respond_to?(:each) || inc.kind_of?(String))\r\n \r\n if inc.include?(:all)\r\n ole_methods.each do |m|\r\n m = m.to_s\r\n if m =~ /\\AInclude/ && m != 'IncludeRetElementList'\r\n @request.__send__(\"#{m.underscore}=\", true)\r\n end\r\n end\r\n return\r\n end\r\n \r\n inc.each do |item|\r\n cam_item = item.to_s.camelize.gsub(/Id/, \"ID\")\r\n if @request.respond_to_ole?(\"Include#{cam_item}\")\r\n @request.__send__(\"include_#{item}=\", true)\r\n else\r\n @request.IncludeRetElementList.Add(cam_item)\r\n end\r\n end\r\n end",
"def targeted_managed_app_configurations=(value)\n @targeted_managed_app_configurations = value\n end",
"def addCuratorAddons _obj, _args\n \"_obj addCuratorAddons _args;\" \n end",
"def extensions=(extensions)\n @extensions = Array extensions\n end",
"def add_purposes(activity, visit)\n context_menu_open(activity, visit, 'purpose')\n end",
"def enable_features(feature_names)\n self.enabled_features = feature_names\n end"
] | [
"0.56592166",
"0.5435179",
"0.53855604",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.48666844",
"0.4842669",
"0.48081827",
"0.46149844",
"0.46055546",
"0.4605323",
"0.45983168",
"0.45826185",
"0.45511395",
"0.45366314",
"0.45366314",
"0.45050645",
"0.448465",
"0.44689745",
"0.44570068",
"0.4456684",
"0.44257504",
"0.44199574",
"0.43844044",
"0.43778723",
"0.4371999",
"0.4371999",
"0.4371999",
"0.4371999",
"0.4371999",
"0.43716025",
"0.43716025",
"0.43716025",
"0.43716025",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43715823",
"0.43709156",
"0.43709156",
"0.43709156",
"0.43690047",
"0.4349239",
"0.4349239",
"0.4349239",
"0.4349239",
"0.43491438",
"0.43293893",
"0.43280748",
"0.42946985",
"0.4292396",
"0.42769128",
"0.4274889",
"0.42479783",
"0.4226374",
"0.42154446",
"0.4214838",
"0.4208223",
"0.42052191",
"0.419958",
"0.41981405",
"0.41839698",
"0.41839698",
"0.4182557",
"0.41709146",
"0.41671386",
"0.4164643",
"0.4163012",
"0.41607583",
"0.41579667",
"0.41398752",
"0.4126017",
"0.41259632",
"0.41248617",
"0.4121827"
] | 0.5625202 | 1 |
Gets the api property value. Specifies settings for an application that implements a web API. | def api
return @api
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_api_setting\n @api_setting = ApiSetting.find(params[:id])\n end",
"def api=(value)\n @api = value\n end",
"def api_key\n @api_key ||= config_value.split('-')[1].chomp\n end",
"def api_key\n config.api_key\n end",
"def api_key\n config.api_key\n end",
"def api_version; config[:api_version]; end",
"def api_config()\n AdwordsApi::ApiConfig\n end",
"def api_url\n @api_url || DEFAULT_API_URL\n end",
"def api_url\n @api_url || DEFAULT_API_URL\n end",
"def api_key\n configuration.api_key\n end",
"def api_property?(property)\n api.respond_to?(:\"#{property}\") && api.send(:\"#{property}\")\n end",
"def set_api_config\n @api_config = ApiConfig.find(params[:id])\n end",
"def api_version\n self.class.get('/api')['api_ver']\n end",
"def api_url\n @api_url ||=\"#{base_url}#{@options['api_url']}\"\n end",
"def api\n @api\n end",
"def api_url\n @@API_URL\n end",
"def api_base=(value)\n @api_base = value\n end",
"def api_base=(value)\n @api_base = value\n end",
"def api_key\n @api_key\n end",
"def set_api_v1_property\n @api_v1_property = Api::V1::Property.find(params[:id])\n end",
"def api_params\n params[:api]\n end",
"def api_endpoint=(value)\n @api_endpoint = value\n end",
"def api_version\n @api_version || :latest\n end",
"def api_token\n @attributes[:api_token]\n end",
"def api_client\n env[:api_client]\n end",
"def api_endpoint\n @api_endpoint ||= DEFAULT_API_ENDPOINT\n end",
"def api_key\n @@api_key\n end",
"def api_key\n @@api_key\n end",
"def get_api_version()\n return API_VERSION\n end",
"def apikey\n @apikey ||= ENV['WORDHOP_API_KEY']\n end",
"def index\n @api_settings = ApiSetting.all\n end",
"def api_key\n @@api_key\n end",
"def api_token\n @api_token || Hey.api_token\n end",
"def api_params\n params[:api]\n end",
"def set_api_v1_property\n @api_v1_property = Property.find(params[:id])\n end",
"def api_version\n self.class.api_version\n end",
"def api_token\n if @yaml[\"deployment\"][\"api_token\"] != \"example\"\n @yaml[\"deployment\"][\"api_token\"]\n end\n end",
"def apikey\n @apikey ||= ENV['JANIS_API_KEY']\n end",
"def api_version\n @api_version || \"2011-02-01\"\n end",
"def api_key(sending_object = nil, opts = {})\n return opts[:api_key] if opts[:api_key]\n return sending_object[:api_key] if sending_object && sending_object[:api_key]\n\n Settings.default.web_object.api_key\nend",
"def api_key\n token = self.api_token || self.create_api_token(:action => 'api')\n token.value\n end",
"def set_api_v1_property\n @api_v1_property = Property.find(params[:id])\n end",
"def teams_app_settings\n return @teams_app_settings\n end",
"def api_endpoint\n @api_endpoint ||= ENDPOINTS[:sandbox][:api]\n end",
"def is_api?\n current_user\n @env[API_KEY]\n end",
"def update\n respond_to do |format|\n if @api_setting.update(api_setting_params)\n format.html { redirect_to admin_api_settings_path, notice: 'Api setting was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_setting }\n else\n format.html { render :edit }\n format.json { render json: @api_setting.errors, status: :unprocessable_entity }\n end\n end\n end",
"def api_key=(val)\n @api_key = val\n end",
"def api\n self.well_info.api\n end",
"def api_key\n # We are not lazy loading the @api_key in order to preserve the\n # distinction between it and the default (class) key.\n @api_key || self.class.api_key\n end",
"def api_only\n @config.instance_variable_set(:@api_only, true)\n end",
"def config\n ModelApi.config\n end",
"def [](api_name)\n request.api = api_name\n self\n end",
"def can_use_api?\n api_enabled\n end",
"def api_endpoint\n case current_user.environment\n when 'int', 'integration'\n 'http://newapi.int.brandwatch.com'\n when 'rel', 'release', 'stage'\n 'http://newapi.rel.brandwatch.com'\n else\n 'http://newapi.brandwatch.com'\n end\n end",
"def api_setting_params\n params.require(:api_setting).permit(:url, :client_id, :event_id, :api_auth_token, :active)\n end",
"def current_api_version\n JSON.parse(get('/api').to_s)['currentVersion'] rescue 1\n end",
"def api_prefix\n @api_url || DEFAULT_API_PREFIX\n end",
"def api_connector_configuration\n return @api_connector_configuration\n end",
"def api_key\n @@api_key ||= ''\n end",
"def api_key_id\n @attributes[:api_key_id]\n end",
"def set_api_application\n @api_application = ApiApplication.find(params[:id])\n end",
"def api\n {\n 'host' => self['apiHost'],\n 'password' => self['apiPassword'],\n 'path' => self['apiPath'],\n 'port' => self['apiPort'],\n 'protocol' => self['apiProtocol'],\n 'username' => self['apiUsername']\n }\n end",
"def get_config()\n return @api.do_request(\"GET\", get_base_api_path() + \"/config\")\n end",
"def get_settings\n request :get, \"_settings\"\n end",
"def get_settings\n request :get, \"_settings\"\n end",
"def api_defaults\n @api_defaults ||= self.class.api_defaults\n @api_defaults\n end",
"def api_id\n ENV['UNLEASHED_API_ID']\n end",
"def auth_settings\n {\n 'api-key' =>\n {\n type: 'api_key',\n in: 'header',\n key: 'api-key',\n value: api_key_with_prefix('api-key')\n },\n }\n end",
"def appl_settings\n @appl_settings\n end",
"def api\n @config = ZipMoney::Configuration\n configure_api if @_api.nil?\n \t @_api\n end",
"def api_key; @opts[:api_key]; end",
"def api_key\n @api_key || ENV['OMDB_API_KEY']\n end",
"def api_base_url; @opts[:api_base_url]; end",
"def set_api\n @api = Api.find(params[:id])\n end",
"def set_api\n @api = Api.find(params[:id])\n end",
"def auth_settings\n {\n 'api_key' =>\n {\n type: 'api_key',\n in: 'header',\n key: 'API-Key',\n value: api_key_with_prefix('API-Key')\n },\n }\n end",
"def api_uri\n @api_uri ||= URI(api_url)\n end",
"def user\n conf['api']['user']\n end",
"def current_settings\n Weby::Settings\n end",
"def settings\n @settings ||= get('/settings')['settings']\n end",
"def api_version\n Gandi.call('version.info')['api_version']\n end",
"def appliance_api_version\n options = { 'Content-Type' => :none, 'X-API-Version' => :none, 'auth' => :none }\n response = rest_api(:get, '/rest/version', options)\n version = response_handler(response)['currentVersion']\n raise ConnectionError, \"Couldn't get API version\" unless version\n version = version.to_i if version.class != Integer\n version\n rescue ConnectionError\n @logger.warn \"Failed to get OneView max api version. Using default (#{OneviewSDK::DEFAULT_API_VERSION})\"\n OneviewSDK::DEFAULT_API_VERSION\n end",
"def api_mode; end",
"def get_settings\n settings.get\n end",
"def api_key_field(value = nil)\n rw_config(:api_key_field, value, first_column_to_exist(nil, :api_key, :application_key))\n end",
"def url\n api_url\n end",
"def host\n conf['api']['host']\n end",
"def api_secret_field(value = nil)\n rw_config(:api_secret_field, value, first_column_to_exist(nil, :api_secret, :application_secret))\n end",
"def api_path\n @api_path ||= find_api_path(base_uri)\n end",
"def api_version\n request('getAPIVersion')\n end",
"def api_uri\n @api_uri ||= URI.parse(api_endpoint)\n end",
"def api\n @http ||= Http.new(config)\n end",
"def api_version\n @version\n end",
"def api_key\n @@api_key || ENV['CV_API_KEY']\n end",
"def api_version\n @api_version ||= begin\n pool = self.pool.get_all[0]\n host = self.pool.get_master(pool)\n major = self.host.get_API_version_major(host)\n minor = self.host.get_API_version_minor(host)\n \"#{major}.#{minor}\"\n end\n end",
"def set_api\n @api = Api.find(params[:id])\n end",
"def api_url\n @api_url ||= URI.parse(::File.join(base_url, endpoint))\n end",
"def get_settings\n get_uri = @data['uri'] + '/settings'\n response = @client.rest_get(get_uri, {}, @api_version)\n @client.response_handler(response)\n end",
"def api_key\n @key\n end",
"def get_api_version_string(api_version)\n \"?api-version=#{api_version}\"\n end"
] | [
"0.6932186",
"0.656111",
"0.6441757",
"0.63801134",
"0.63801134",
"0.63535184",
"0.6327335",
"0.630022",
"0.6294039",
"0.62893236",
"0.6283055",
"0.62306285",
"0.62006164",
"0.61711377",
"0.6153687",
"0.6135441",
"0.6122923",
"0.6122923",
"0.60713005",
"0.60698366",
"0.6014623",
"0.5994931",
"0.5992419",
"0.59919816",
"0.5978255",
"0.5970572",
"0.5963059",
"0.5963059",
"0.5953555",
"0.59428596",
"0.59252286",
"0.58974594",
"0.58928394",
"0.5891182",
"0.5888076",
"0.5883576",
"0.5866776",
"0.58624774",
"0.5858699",
"0.58308154",
"0.5818919",
"0.58096945",
"0.5809109",
"0.5805733",
"0.5804305",
"0.57813627",
"0.57566726",
"0.57338333",
"0.57334864",
"0.5720793",
"0.5713037",
"0.57076734",
"0.5691376",
"0.568967",
"0.5688002",
"0.56840426",
"0.56778234",
"0.5673301",
"0.5669925",
"0.5649339",
"0.56404525",
"0.5634672",
"0.5633918",
"0.5619058",
"0.5619058",
"0.56159097",
"0.5597019",
"0.5591709",
"0.5582418",
"0.55806047",
"0.5576573",
"0.5572644",
"0.5569361",
"0.5564302",
"0.5564302",
"0.5562298",
"0.5557201",
"0.55520743",
"0.5551771",
"0.553795",
"0.55357784",
"0.5519204",
"0.55121577",
"0.5491452",
"0.54876983",
"0.54704946",
"0.54636586",
"0.54518145",
"0.5449657",
"0.5445704",
"0.54414326",
"0.54375875",
"0.54343176",
"0.54312044",
"0.5423785",
"0.5418702",
"0.54102516",
"0.54026854",
"0.54015887",
"0.5401406"
] | 0.6306911 | 7 |
Sets the api property value. Specifies settings for an application that implements a web API. | def api=(value)
@api = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_api_setting\n @api_setting = ApiSetting.find(params[:id])\n end",
"def set_api_config\n @api_config = ApiConfig.find(params[:id])\n end",
"def api_endpoint=(value)\n @api_endpoint = value\n end",
"def set_api_v1_property\n @api_v1_property = Api::V1::Property.find(params[:id])\n end",
"def api_base=(value)\n @api_base = value\n end",
"def api_base=(value)\n @api_base = value\n end",
"def set_api\n @api = Api.find(params[:id])\n end",
"def set_api\n @api = Api.find(params[:id])\n end",
"def set_api_application\n @api_application = ApiApplication.find(params[:id])\n end",
"def set_api_v1_property\n @api_v1_property = Property.find(params[:id])\n end",
"def set_api_url(url)\n @api_url = url\n end",
"def api_key=(val)\n @api_key = val\n end",
"def set_api_key(api_key)\n @api_key = api_key\n end",
"def set_api_v1_property\n @api_v1_property = Property.find(params[:id])\n end",
"def [](api_name)\n request.api = api_name\n self\n end",
"def set_api\n @api = Api.find(params[:id])\n end",
"def set_APIKey(value)\n set_input(\"APIKey\", value)\n end",
"def set_APIKey(value)\n set_input(\"APIKey\", value)\n end",
"def api_only\n @config.instance_variable_set(:@api_only, true)\n end",
"def set_APIKey(value)\n set_input(\"APIKey\", value)\n end",
"def set_APIKey(value)\n set_input(\"APIKey\", value)\n end",
"def set_api\n @api = Api.find(params[:id])\n rescue\n @api = Api.new\n end",
"def api_setting_params\n params.require(:api_setting).permit(:url, :client_id, :event_id, :api_auth_token, :active)\n end",
"def api_url=(value)\n raise TypeError, 'api_url must be a String or respond_to #to_s' unless value.is_a?(String) || value.respond_to?(:to_s)\n \n @api_url = value.to_s\n end",
"def api_key=(value)\n puts \"DEPRECATED: PigCI.com API has been retired, you no longer need to set config.api_key in your spec/rails_helper.rb file.\"\n end",
"def api_connector_configuration=(value)\n @api_connector_configuration = value\n end",
"def set_api(*args); end",
"def set_api(*args); end",
"def set_api_key\n\t\tself.api_key = ApiKey.create()\n\tend",
"def update\n respond_to do |format|\n if @api_setting.update(api_setting_params)\n format.html { redirect_to admin_api_settings_path, notice: 'Api setting was successfully updated.' }\n format.json { render :show, status: :ok, location: @api_setting }\n else\n format.html { render :edit }\n format.json { render json: @api_setting.errors, status: :unprocessable_entity }\n end\n end\n end",
"def app_settings=(value)\n @children['app-settings'][:value] = value\n end",
"def app_settings=(value)\n @children['app-settings'][:value] = value\n end",
"def api_key=(key)\n\t\t\t\t\t@@api_key = key\n\t\t\t\tend",
"def set_api_key\n @api_key = ApiKey.find(params[:id])\n end",
"def set_api_key\n @api_key = ApiKey.find(params[:id])\n end",
"def set_api_key\n @api_key = ApiKey.find(params[:id])\n end",
"def server_api_version=(v)\n $server_api_version = v || Pedant::Config.server_api_version\n end",
"def user=(value)\n conf['api']['user'] = value\n end",
"def host=(value)\n conf['api']['host'] = value\n end",
"def api_key=(key)\n @@api_key = key\n end",
"def set_rest_api\n @rest_api = RestApi.find(params[:id])\n end",
"def port=(value)\n conf['api']['port'] = value.to_i\n end",
"def set_api\r\n api = EVEAPI::API.new\r\n api.api_id = api_key.api_id\r\n api.v_code = api_key.v_code\r\n api.character_id = id\r\n api\r\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def set_APISecret(value)\n set_input(\"APISecret\", value)\n end",
"def api_key(value)\n @api_key = value unless value.nil?\n @headers['api-key'] = @api_key\n @api_key\n end",
"def teams_app_settings=(value)\n @teams_app_settings = value\n end",
"def set_current_user_api(api)\n $user_api_mutex.lock\n CC.logger.debug(\"API: set current api to #{api == nil ? 'nil' : api.user_environment}\")\n $SDK_API = api\nend",
"def api_url\n @api_url ||=\"#{base_url}#{@options['api_url']}\"\n end",
"def set_apikey\n @apikey = Apikey.find(params[:id])\n end",
"def set_apikey\n @apikey = Apikey.find(params[:id])\n end",
"def set_app_setting\n @app_setting = AppSetting.settings\n end",
"def api_url\n @api_url || DEFAULT_API_URL\n end",
"def api_url\n @api_url || DEFAULT_API_URL\n end",
"def create\n @api_setting = ApiSetting.new(api_setting_params)\n\n respond_to do |format|\n if @api_setting.save\n format.html { redirect_to admin_api_settings_path, notice: 'Api setting was successfully created.' }\n format.json { render :show, status: :created, location: @api_setting }\n else\n format.html { render :new }\n format.json { render json: @api_setting.errors, status: :unprocessable_entity }\n end\n end\n end",
"def node_api=(new_value)\n if !@node_api.nil? and !new_value.nil?\n Log.log.warn('overriding existing node api value')\n end\n @node_api=new_value\n end",
"def set_team_api_default!\n Team.where(api: nil).update_all(api: false)\n end",
"def api_property?(property)\n api.respond_to?(:\"#{property}\") && api.send(:\"#{property}\")\n end"
] | [
"0.75264436",
"0.6855164",
"0.68004036",
"0.67046267",
"0.6681524",
"0.6681524",
"0.66615593",
"0.66615593",
"0.6574338",
"0.65529174",
"0.65090615",
"0.64439654",
"0.63932604",
"0.6366128",
"0.63556063",
"0.6354796",
"0.63511974",
"0.63511974",
"0.63436854",
"0.6322902",
"0.6322902",
"0.62702054",
"0.62675",
"0.60772973",
"0.6076714",
"0.6044638",
"0.6034261",
"0.6034261",
"0.60318726",
"0.60294485",
"0.5998124",
"0.5998124",
"0.59753025",
"0.5913047",
"0.5913047",
"0.5913047",
"0.5909476",
"0.5908947",
"0.58990026",
"0.5857435",
"0.58477294",
"0.5846352",
"0.58288395",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.58252305",
"0.579462",
"0.5768373",
"0.5761084",
"0.57587135",
"0.57487863",
"0.57487863",
"0.5748146",
"0.5738239",
"0.57200617",
"0.57143235",
"0.5692261",
"0.56908154",
"0.567381"
] | 0.7783184 | 0 |
Gets the appId property value. The unique identifier for the application that is assigned to an application by Azure AD. Not nullable. Readonly. Supports $filter (eq). | def app_id
return @app_id
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def app_id\n @values.fetch('appId') { \n @values['appId'] = nil\n }\n end",
"def app_id\n @app.id\n end",
"def application_id\n return @application_id\n end",
"def app_identifier\n return @app_identifier\n end",
"def appid\n if (@appid.nil? or @appid.empty?)\n fatal(\"Error: appid: App ID was not set. Aborting.\")\n end\n @appid\n end",
"def app_id\n fb_app.id\n end",
"def app_id=(value)\n @app_id = value\n end",
"def app_id=(value)\n @app_id = value\n end",
"def app_id=(value)\n @app_id = value\n end",
"def application_id\n @application_id || YodleeApi.application_id\n end",
"def application_id=(value)\n @application_id = value\n end",
"def application_id\n get_key('ALGOLIA_APPLICATION_ID', 'application_id')\n end",
"def app_id=(value)\n if value == @defaults['appId']\n @values.delete 'appId' if @values.key? 'appId'\n else\n @values['appId'] = value\n end\n end",
"def get id\n apps.select do |app|\n app.id == id\n end.first\n end",
"def resource_app_id\n return @resource_app_id\n end",
"def app_item_id\n read('app_item_id')\n end",
"def app_identifier=(value)\n @app_identifier = value\n end",
"def app_id=(id)\n @app_id = id.to_s\n end",
"def fb_app_id\n ENV['facebook_app_id']\n end",
"def current_application\n fail 'Application ID is missing' unless params.key?(:application_id)\n applications = current_user.applications\n applications.where(id: params[:application_id]).first\n end",
"def app_scope_id\n return @app_scope_id\n end",
"def resource_app_id=(value)\n @resource_app_id = value\n end",
"def app_item_id\n read_integer('app_item_id')\n end",
"def application_id=(value)\n @children['application-id'][:value] = value\n end",
"def ccdb_app_id()\n KNIFE::get_app_id(@current_name)\n end",
"def user_app_id(force=false)\n @user_app_id = nil if force\n @user_app_id ||= read_user_app_id\n end",
"def current_application\n @current_application ||= Application.find(params[:application_id]) if params[:application_id]\n end",
"def set_app\n @app = current_client.apps.find(params[:id] || params[:app_id])\n end",
"def appid=(appid)\n if (appid.nil? or appid.empty?)\n fatal(\"Error: appid: Null application ID.\") \n end\n if (not appid =~ /^\\w+$/)\n fatal(\"Error: appid: Application ID must be alpha-numeric: \" + appid)\n end\n @appid = appid\n end",
"def app_id\n self.class.send :class_variable_get, :@@app_id\n end",
"def app_activity_id\n return @app_activity_id\n end",
"def application_name\n return @application_name\n end",
"def app_scope_id=(value)\n @app_scope_id = value\n end",
"def app_id; end",
"def app_id; end",
"def application(applicant_id)\n request(:get, \"applicant_tracking/applications/#{applicant_id}\")\n end",
"def set_app\n @app = current_user.apps.find(params[:id])\n end",
"def app_name\n @app_name || Sapience.app_name\n end",
"def set_app\n @app = current_user.apps.find(params[:app_id])\n end",
"def select_application(app_id)\n ber_data = iso_apdu! :ins => 0xA4, :p1 => 0x04, :p2 => 0x00, :data => app_id\n app_tags = Asn1Ber.decode ber_data\n app_data = {}\n Asn1Ber.visit app_tags do |path, value|\n case path\n when [0x6F, 0xA5, 0x9F65]\n app_data[:max_apdu_length] = value.inject(0) { |acc, v| (acc << 8) | v }\n when [0x6F, 0x84]\n app_data[:aid] = value\n end\n end\n app_data\n end",
"def app_by_id(id)\n get(\"/apps/#{id}\")\n end",
"def set_application\n @application = Application.where(token: params[:id]).first\n end",
"def getFacebookAppId\n config = YAML.load_file(\"#{Rails.root}/config/keys.yml\")\n config[\"FacebookAppId\"]\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_application\n @application = current_user.oauth_applications.find(params[:id])\n end",
"def app\n App.load(self.app_id)\n end",
"def created_by_app_id=(value)\n @created_by_app_id = value\n end",
"def app_name\n return @app_name\n end",
"def app_name\n return @app_name\n end",
"def app_name\n ApplicationService.application_name\n end",
"def created_by_app_id\n return @created_by_app_id\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def get_opsworks_app\n data = opsworks_client.describe_apps(app_ids: [app_id])\n if !(data[:apps] && data[:apps].count == 1)\n raise Error, \"App #{app_id} not found.\", error.backtrace\n end\n data[:apps].first\n end",
"def get_applications\n\t\tApplication.where(\"api_user_id = ?\", id)\n\tend",
"def set_application\n @application = applications_scope.find(params[:id])\n end",
"def app_key \n 'app-id-9bb5f1c77f0df722a9b1bc650a41988a'\n end",
"def get(id)\n response = Network.get(['Applications', id])\n Application.new(response)\n end",
"def app(id_or_name_or_package_id)\n all_available_apps.find do |app|\n [app.name, app.id, app.package_id].include?(id_or_name_or_package_id)\n end\n end",
"def get_current_application_information\n response = request(\n :oauth2_applications_me, nil,\n :get,\n \"oauth2/applications/@me\"\n )\n Rapture::OauthApplication.from_json(response.body)\n end",
"def set_application\n @application = current_user.applications.find(params[:id])\n end",
"def app_id\n @object.send(Innsights.user_id)\n end",
"def app_name\n @data['CFBundleExecutable'].to_s\n end",
"def app_identifier\n Origen.config.initials || 'Anon App'\n end",
"def appt_id\n @appt_id ||= base_qm.dig(:appointment, 'id')\n end",
"def kiosk_mode_built_in_app_id\n return @kiosk_mode_built_in_app_id\n end",
"def applications_with_app_id(app_id)\n raise StandardError, 'app_id cannot be null' if app_id.nil?\n return ApplicationsWithAppIdRequestBuilder.new(@path_parameters, @request_adapter, appId)\n end",
"def application_version\n return @application_version\n end",
"def application_version\n return @application_version\n end",
"def application_name\n @application_name || _application_name_from_namespace || _default_application_name\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end"
] | [
"0.7382468",
"0.7276707",
"0.7244628",
"0.7009927",
"0.6915016",
"0.6870152",
"0.68661594",
"0.68661594",
"0.68661594",
"0.6846401",
"0.68378574",
"0.6834939",
"0.68225765",
"0.6740042",
"0.6497659",
"0.6446811",
"0.640802",
"0.6405589",
"0.63196504",
"0.62878746",
"0.62787527",
"0.6249138",
"0.61916405",
"0.61128736",
"0.6104037",
"0.59645575",
"0.5959635",
"0.59348476",
"0.58861077",
"0.586751",
"0.58609027",
"0.58328533",
"0.58185637",
"0.5779477",
"0.5779477",
"0.576666",
"0.5747601",
"0.5741561",
"0.57411987",
"0.57241875",
"0.57052755",
"0.5703904",
"0.5683501",
"0.5656751",
"0.5656751",
"0.5656751",
"0.5656751",
"0.5656751",
"0.5656751",
"0.5656751",
"0.5656751",
"0.5656751",
"0.5640749",
"0.56396675",
"0.5630165",
"0.5626677",
"0.5626677",
"0.56068075",
"0.55966794",
"0.55851746",
"0.55851746",
"0.55851746",
"0.55851746",
"0.55851746",
"0.55851746",
"0.55851746",
"0.55851746",
"0.55851746",
"0.5580801",
"0.5578903",
"0.5576091",
"0.55683756",
"0.554976",
"0.553784",
"0.5521763",
"0.55215234",
"0.551707",
"0.5498975",
"0.54461133",
"0.5436183",
"0.54272777",
"0.54142404",
"0.53891695",
"0.53891695",
"0.53881234",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271",
"0.5385271"
] | 0.72168577 | 5 |
Sets the appId property value. The unique identifier for the application that is assigned to an application by Azure AD. Not nullable. Readonly. Supports $filter (eq). | def app_id=(value)
@app_id = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def app_id=(value)\n if value == @defaults['appId']\n @values.delete 'appId' if @values.key? 'appId'\n else\n @values['appId'] = value\n end\n end",
"def application_id=(value)\n @application_id = value\n end",
"def set_app\n @app = current_client.apps.find(params[:id] || params[:app_id])\n end",
"def app_id\n @values.fetch('appId') { \n @values['appId'] = nil\n }\n end",
"def app_identifier=(value)\n @app_identifier = value\n end",
"def set_app\n @app = current_user.apps.find(params[:app_id])\n end",
"def appid=(appid)\n if (appid.nil? or appid.empty?)\n fatal(\"Error: appid: Null application ID.\") \n end\n if (not appid =~ /^\\w+$/)\n fatal(\"Error: appid: Application ID must be alpha-numeric: \" + appid)\n end\n @appid = appid\n end",
"def app_id=(id)\n @app_id = id.to_s\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_AppID(value)\n set_input(\"AppID\", value)\n end",
"def set_app\n @app = current_user.apps.find(params[:id])\n end",
"def resource_app_id=(value)\n @resource_app_id = value\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_app\n @app = App.find(params[:id])\n end",
"def set_application\n @application = Application.find_by!(number: params[:application_token])\n end",
"def application_id=(value)\n @children['application-id'][:value] = value\n end",
"def set_application\n @application = applications_scope.find(params[:id])\n end",
"def set_app\n @app = App.find_by( token: params[:app_id])\n if !@app \n render json: { error: \"app not found\"}, status: :not_found\n end\n end",
"def application=(app)\n @application = app\n end",
"def application=(app)\n @application = app\n end",
"def application=(app)\n @application = app\n end",
"def set_application\n @application = current_user.applications.find(params[:id])\n end",
"def set_application\n @application = @application_scope.find(params[:id])\n @current_application = @application\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def app_scope_id=(value)\n @app_scope_id = value\n end",
"def set_app\n @app = App.find(params[:uid])\n end",
"def set_application\n @application = Application.where(token: params[:id]).first\n end",
"def set_application\n @application = Oread::Application.find(params[:id])\n end",
"def application=(value)\n @application = value\n end",
"def set_application\n @application = current_user.oauth_applications.find(params[:id])\n end",
"def set_app\n @app = App.find_by(token: params[:token])\n end",
"def set_app\n @app = App.with_roles(%i[admin notifier], current_user).find(params[:id] || params[:app_id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_appparam\n @appparam = Appparam.find(params[:id])\n end",
"def appname=(appname)\n validate_options(appname: appname)\n @appname = appname\n end",
"def set_project_application\n @project_application = ProjectApplication.find(params[:id])\n end",
"def set_api_application\n @api_application = ApiApplication.find(params[:id])\n end",
"def set_app_record\n @app_record = AppRecord.find(params[:id])\n end",
"def set_app_user\n @app_user = AppUser.find(params[:id])\n end",
"def app_id\n @app.id\n end",
"def applications_with_app_id(app_id)\n raise StandardError, 'app_id cannot be null' if app_id.nil?\n return ApplicationsWithAppIdRequestBuilder.new(@path_parameters, @request_adapter, appId)\n end",
"def set_app\n @app = FortyTwo::App.find(params[:id])\n end",
"def set_app_form\n @app_form = AppForm.find(params[:app_form_id])\n end",
"def app=(name)\n self.config[:app] = name\n end",
"def set_application\n @application = CollaborationApplication.find(params[:id])\n end",
"def set_user_application\n @user_application = UserApplication.find(params[:id])\n end",
"def app_name=(value)\n @app_name = value\n end",
"def app_name=(value)\n @app_name = value\n end",
"def update_appdata(person_id, appId, key, value)\n @restv9.update_appdata(person_id, appId, key, value)\n end",
"def application_id\n @application_id || YodleeApi.application_id\n end",
"def created_by_app_id=(value)\n @created_by_app_id = value\n end",
"def set_campaign_application(id)\n @campaign_application = CampaignApplication.find(id)\n end",
"def set_userapplication\n @userapplication = Userapplication.find(params[:id])\n end",
"def appid\n if (@appid.nil? or @appid.empty?)\n fatal(\"Error: appid: App ID was not set. Aborting.\")\n end\n @appid\n end",
"def assign_application_id\n self.application_id = supported_permission.application_id if supported_permission.present?\n end",
"def assign_application_id\n self.application_id = supported_permission.application_id if supported_permission.present?\n end",
"def set_mobile_app\n @mobile_app = MobileApp.find(params[:id])\n end",
"def set_mobile_app\n @mobile_app = MobileApp.find(params[:id])\n end",
"def apps=(value)\n @apps = value\n end",
"def set_customer_app\n @customer_app = CustomerApp.find(params[:id])\n end",
"def set_phone_app\n @phone_app = PhoneApp.find(params[:id])\n end",
"def set_client_application\n @client_application = ClientApplication.find(params[:id])\n end",
"def set_oauth_application\n @oauth_application = Doorkeeper::Application.find(params[:oauth_application_id])\n end",
"def app_id\n return @app_id\n end",
"def app_id\n return @app_id\n end",
"def app_id\n return @app_id\n end",
"def application_name=(value)\n @application_name = value\n end"
] | [
"0.7540471",
"0.7271779",
"0.71557",
"0.7033686",
"0.6979906",
"0.6918348",
"0.6871881",
"0.686809",
"0.6770877",
"0.6770877",
"0.6770877",
"0.6770877",
"0.6770877",
"0.6770877",
"0.6770877",
"0.6770877",
"0.6770877",
"0.6756562",
"0.67543036",
"0.67347884",
"0.67347884",
"0.67347884",
"0.67347884",
"0.67347884",
"0.67347884",
"0.67347884",
"0.67347884",
"0.67347884",
"0.6684249",
"0.66661835",
"0.66227096",
"0.6614325",
"0.6597906",
"0.6597906",
"0.6597906",
"0.65808177",
"0.6573686",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.6562752",
"0.64503425",
"0.6429099",
"0.63904804",
"0.63741386",
"0.6365161",
"0.6358555",
"0.63202775",
"0.6273861",
"0.6215966",
"0.6215966",
"0.6215966",
"0.6215966",
"0.6137684",
"0.61298555",
"0.60856956",
"0.6028251",
"0.6025987",
"0.6015288",
"0.60036063",
"0.6002807",
"0.5994892",
"0.5989089",
"0.5961131",
"0.595348",
"0.5937426",
"0.59367543",
"0.59367543",
"0.593269",
"0.59321487",
"0.5908281",
"0.58823025",
"0.5876833",
"0.587609",
"0.5871485",
"0.5871485",
"0.58630604",
"0.58630604",
"0.58538866",
"0.58315057",
"0.581997",
"0.5816214",
"0.5812874",
"0.5803876",
"0.5803876",
"0.5803876",
"0.580127"
] | 0.74364346 | 3 |
Gets the appManagementPolicies property value. The appManagementPolicy applied to this application. | def app_management_policies
return @app_management_policies
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def app_management_policies=(value)\n @app_management_policies = value\n end",
"def managed_app_policies\n return @managed_app_policies\n end",
"def managed_app_policies=(value)\n @managed_app_policies = value\n end",
"def managed_app_policies()\n return MicrosoftGraph::DeviceAppManagement::ManagedAppPolicies::ManagedAppPoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def applied_policies\n return @applied_policies\n end",
"def have_policy_for?(app_name)\n @policies ||= Vault.sys.policies\n @policies.include?(app_name)\n end",
"def managed_apps\n return @managed_apps\n end",
"def mdm_windows_information_protection_policies\n return @mdm_windows_information_protection_policies\n end",
"def windows_information_protection_policies\n return @windows_information_protection_policies\n end",
"def windows_information_protection_policies=(value)\n @windows_information_protection_policies = value\n end",
"def mdm_windows_information_protection_policies=(value)\n @mdm_windows_information_protection_policies = value\n end",
"def policies\n @policies = Policy.all\n end",
"def applied_policies=(value)\n @applied_policies = value\n end",
"def apps\n return @apps\n end",
"def assignment_policies\n return @assignment_policies\n end",
"def ios_managed_app_protections\n return @ios_managed_app_protections\n end",
"def applications\n return @applications\n end",
"def applications\n return @applications\n end",
"def policy_executables\n Array(settings['external_policy_executable'])\n end",
"def policies()\n return MicrosoftGraph::Policies::PoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def scaling_policies\n @aws.describe_policies(\n auto_scaling_group_name: @group_name\n ).scaling_policies\n end",
"def kiosk_mode_apps\n return @kiosk_mode_apps\n end",
"def list_policies\n nessus_rest_get('policies')['policies']\n end",
"def pre_authorized_applications\n return @pre_authorized_applications\n end",
"def assignment_policies=(value)\n @assignment_policies = value\n end",
"def termination_policies\n @group.termination_policies\n end",
"def apps_single_app_mode_list\n return @apps_single_app_mode_list\n end",
"def compliant_apps_list\n return @compliant_apps_list\n end",
"def compliant_apps_list\n return @compliant_apps_list\n end",
"def protected_apps\n return @protected_apps\n end",
"def home_realm_discovery_policies\n return @home_realm_discovery_policies\n end",
"def android_managed_app_protections\n return @android_managed_app_protections\n end",
"def certificate_policies\n extensions[R509::Cert::Extensions::CertificatePolicies]\n end",
"def group_policies\r\n GroupPoliciesController.instance\r\n end",
"def app_roles\n return @app_roles\n end",
"def apps\n @apps.keys\n end",
"def managed_app_registrations\n return @managed_app_registrations\n end",
"def managed_apps=(value)\n @managed_apps = value\n end",
"def windows_information_protection_policies()\n return MicrosoftGraph::DeviceAppManagement::WindowsInformationProtectionPolicies::WindowsInformationProtectionPoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def auth_policies\n []\n end",
"def intended_policies\n return @intended_policies\n end",
"def ios_mobile_application_management_enabled\n return @ios_mobile_application_management_enabled\n end",
"def account_manager_policy\n return @account_manager_policy\n end",
"def applications=(value)\n @applications = value\n end",
"def applications=(value)\n @applications = value\n end",
"def work_profile_default_app_permission_policy\n return @work_profile_default_app_permission_policy\n end",
"def apps=(value)\n @apps = value\n end",
"def home_realm_discovery_policies=(value)\n @home_realm_discovery_policies = value\n end",
"def allowed_to_create_apps\n return @allowed_to_create_apps\n end",
"def targeted_managed_app_configurations\n return @targeted_managed_app_configurations\n end",
"def app_environments\n @app_environments ||= apps.map { |app| app.app_environments }.flatten\n end",
"def exempt_apps\n return @exempt_apps\n end",
"def apps\n unless @apps\n load!\n end\n\n @apps\n end",
"def authorized_gae_applications\n settings[:authorized_gae_applications]\n end",
"def disable_power_policies\n return @disable_power_policies\n end",
"def apps_install_allow_list\n return @apps_install_allow_list\n end",
"def azure_rights_management_services_allowed\n return @azure_rights_management_services_allowed\n end",
"def installed_apps\n return @installed_apps\n end",
"def installed_apps\n return @installed_apps\n end",
"def client_applications_from_verified_publisher_only\n return @client_applications_from_verified_publisher_only\n end",
"def mobile_apps\n return @mobile_apps\n end",
"def list_monitor_config_policies(opts = {})\n data, _status_code, _headers = list_monitor_config_policies_with_http_info(opts)\n data\n end",
"def escalation_approvers\n return @escalation_approvers\n end",
"def group_policies\n policies = []\n Group.each do |group|\n group.group_memberships.each do |membership|\n if membership.account_id == _id\n policies.push(group.group_policy)\n end\n end\n end\n return policies\n end",
"def app_locker_application_control\n return @app_locker_application_control\n end",
"def apps_permissions_scopes_list\n return {} unless is_app_token?\n semaphore.synchronize {\n @apps_permissions_scopes_list ||= (\n r = get('/api/apps.permissions.scopes.list').parsed\n r['scopes'] || {}\n )\n }\n end",
"def mdm_windows_information_protection_policies()\n return MicrosoftGraph::DeviceAppManagement::MdmWindowsInformationProtectionPolicies::MdmWindowsInformationProtectionPoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def default_managed_app_protections\n return @default_managed_app_protections\n end",
"def aps_applications_count\n redis.smembers(:aps_applications).size\n end",
"def mobile_app_configurations\n return @mobile_app_configurations\n end",
"def managed_app_statuses\n return @managed_app_statuses\n end",
"def android_mobile_application_management_enabled\n return @android_mobile_application_management_enabled\n end",
"def list_alert_policies(opts = {})\n data, _status_code, _headers = list_alert_policies_with_http_info(opts)\n return data\n end",
"def get_application_pools\n\t\ts = get_admin_section \"system.applicationHost/applicationPools\"\n\t\tIisObjectCollection.new s.Collection, :add, ApplicationPool\n end",
"def application_enforced_restrictions\n return @application_enforced_restrictions\n end",
"def applications\n @applications ||= [default_application]\n end",
"def apps_visibility_list\n return @apps_visibility_list\n end",
"def policy\n self.permissions['policy'].to_sym\n end",
"def pre_authorized_applications=(value)\n @pre_authorized_applications = value\n end",
"def policy_role_policies\n @policy_role_policies ||= Array.new.tap do |uris|\n filters = current_ability.agents.map do |agent|\n \"#{Ddr::Index::Fields::POLICY_ROLE}:\\\"#{agent}\\\"\"\n end.join(\" OR \")\n query = \"#{Ddr::Index::Fields::ACTIVE_FEDORA_MODEL}:Collection AND (#{filters})\"\n results = ActiveFedora::SolrService.query(query, rows: Collection.count, fl: Ddr::Index::Fields::INTERNAL_URI)\n results.each_with_object(uris) { |r, memo| memo << r[Ddr::Index::Fields::INTERNAL_URI] }\n end\n end",
"def applications\n get(PLURAL_PATH, RESOURCE)\n end",
"def get_kubernetes_sys_config_policy_list(opts = {})\n data, _status_code, _headers = get_kubernetes_sys_config_policy_list_with_http_info(opts)\n data\n end",
"def list_policies\n http_get(:uri=>\"/policies\", :fields=>x_cookie)\n end",
"def entitlement_management\n return @entitlement_management\n end",
"def kiosk_mode_managed_app_id\n return @kiosk_mode_managed_app_id\n end",
"def token_lifetime_policies\n return @token_lifetime_policies\n end",
"def client_applications\n return @client_applications\n end",
"def media_content_rating_apps\n return @media_content_rating_apps\n end",
"def ios_managed_app_protections=(value)\n @ios_managed_app_protections = value\n end",
"def applications\n Application.from session.get 'operations/application', API_V1\n end",
"def app_definitions\n return @app_definitions\n end",
"def token_lifetime_policies=(value)\n @token_lifetime_policies = value\n end",
"def policies_for_widget widget, options\n widget = widget.is_a?(Widget) ? widget : Widget.find(widget)\n policies = UbiquoDesign::CachePolicies.get(options[:policy_context])[widget.key]\n [widget, policies]\n end",
"def policy_class\n Hydra.config.permissions.policy_class || Hydra::AdminPolicy\n end",
"def default_managed_app_protections()\n return MicrosoftGraph::DeviceAppManagement::DefaultManagedAppProtections::DefaultManagedAppProtectionsRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def ios_managed_app_protections()\n return MicrosoftGraph::DeviceAppManagement::IosManagedAppProtections::IosManagedAppProtectionsRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def kiosk_mode_apps=(value)\n @kiosk_mode_apps = value\n end",
"def policy\n @policy ||= init_policy\n end",
"def protected_apps=(value)\n @protected_apps = value\n end",
"def account_manager_policy=(value)\n @account_manager_policy = value\n end"
] | [
"0.79251957",
"0.772579",
"0.7321491",
"0.70498323",
"0.59212214",
"0.5890579",
"0.5842243",
"0.5774629",
"0.5662351",
"0.56447315",
"0.5589696",
"0.5569927",
"0.552505",
"0.5485212",
"0.5479045",
"0.5440791",
"0.54259676",
"0.54259676",
"0.5423356",
"0.53975046",
"0.53931564",
"0.5389357",
"0.5348763",
"0.5321108",
"0.5264253",
"0.52587116",
"0.52528846",
"0.5221124",
"0.5221124",
"0.5219085",
"0.52179486",
"0.5200627",
"0.5159736",
"0.51514024",
"0.51315564",
"0.51094514",
"0.51067287",
"0.51054114",
"0.5092864",
"0.5064332",
"0.5056929",
"0.50086296",
"0.50053746",
"0.5003082",
"0.5003082",
"0.4989623",
"0.49783128",
"0.49744332",
"0.49646997",
"0.49599567",
"0.49552786",
"0.49425328",
"0.49138638",
"0.48918366",
"0.48886016",
"0.4880946",
"0.48654822",
"0.48639226",
"0.48639226",
"0.48569006",
"0.48413742",
"0.48380992",
"0.48333994",
"0.48275122",
"0.4826073",
"0.48214483",
"0.48139468",
"0.480605",
"0.47919348",
"0.478881",
"0.47857508",
"0.47707552",
"0.47644684",
"0.4755579",
"0.47438326",
"0.4741109",
"0.47287107",
"0.47233567",
"0.47224623",
"0.47168663",
"0.47126642",
"0.46852782",
"0.46667242",
"0.4664786",
"0.46405163",
"0.46251112",
"0.46107295",
"0.45939195",
"0.4586819",
"0.45749712",
"0.4574189",
"0.4564277",
"0.45619842",
"0.45562077",
"0.45382413",
"0.45282412",
"0.45235544",
"0.45209172",
"0.45058316",
"0.44960126"
] | 0.815786 | 0 |
Sets the appManagementPolicies property value. The appManagementPolicy applied to this application. | def app_management_policies=(value)
@app_management_policies = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def managed_app_policies=(value)\n @managed_app_policies = value\n end",
"def app_management_policies\n return @app_management_policies\n end",
"def managed_app_policies()\n return MicrosoftGraph::DeviceAppManagement::ManagedAppPolicies::ManagedAppPoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def applied_policies=(value)\n @applied_policies = value\n end",
"def assignment_policies=(value)\n @assignment_policies = value\n end",
"def mdm_windows_information_protection_policies=(value)\n @mdm_windows_information_protection_policies = value\n end",
"def windows_information_protection_policies=(value)\n @windows_information_protection_policies = value\n end",
"def managed_app_policies\n return @managed_app_policies\n end",
"def apps=(value)\n @apps = value\n end",
"def applications=(value)\n @applications = value\n end",
"def applications=(value)\n @applications = value\n end",
"def managed_apps=(value)\n @managed_apps = value\n end",
"def setPolicies\n=begin\n Util.modifyPolicy(ncaEnclave, '', '\nPolicy DamlBootPolicyNCAServletForRearPolicyAdmin = [\n A user in role RearPolicyAdministration can access a servlet named NCAServlets\n]\n')\n=end\n end",
"def home_realm_discovery_policies=(value)\n @home_realm_discovery_policies = value\n end",
"def intended_policies=(value)\n @intended_policies = value\n end",
"def pre_authorized_applications=(value)\n @pre_authorized_applications = value\n end",
"def protected_apps=(value)\n @protected_apps = value\n end",
"def populate_policies(policies)\n @policies = policies.map do |policy|\n config = PolicyConfig.new()\n config.populate(policy)\n config\n end\n end",
"def have_policy_for?(app_name)\n @policies ||= Vault.sys.policies\n @policies.include?(app_name)\n end",
"def initialize()\n super\n @odata_type = \"#microsoft.graph.appManagementPolicy\"\n end",
"def ios_managed_app_protections=(value)\n @ios_managed_app_protections = value\n end",
"def kiosk_mode_apps=(value)\n @kiosk_mode_apps = value\n end",
"def apps=(selected_apps)\n filter = ( APPS && selected_apps )\n filter = filter.select{|item| !item.blank?}\n # mark (APPS && selected_apps) != (selected_apps && APPS)\n self.apps_mask = filter.map{|app| 2**APPS.index(app) }.sum\n end",
"def exempt_apps=(value)\n @exempt_apps = value\n end",
"def account_manager_policy=(value)\n @account_manager_policy = value\n end",
"def azure_rights_management_services_allowed=(value)\n @azure_rights_management_services_allowed = value\n end",
"def policy=( val )\n val = val.to_s\n raise \"Invalid policy\" unless val == \"allow\" || val == \"deny\"\n\n self.permissions['policy'] = val\n end",
"def allowed_to_create_apps=(value)\n @allowed_to_create_apps = value\n end",
"def disable_power_policies=(value)\n @disable_power_policies = value\n end",
"def use_policies(*policies_or_labels)\n add_policies_to_labels(policies_or_labels, true)\n end",
"def work_profile_default_app_permission_policy=(value)\n @work_profile_default_app_permission_policy = value\n end",
"def token_issuance_policies=(value)\n @token_issuance_policies = value\n end",
"def android_managed_app_protections=(value)\n @android_managed_app_protections = value\n end",
"def managed_app_registrations=(value)\n @managed_app_registrations = value\n end",
"def scaling_policies\n @aws.describe_policies(\n auto_scaling_group_name: @group_name\n ).scaling_policies\n end",
"def token_lifetime_policies=(value)\n @token_lifetime_policies = value\n end",
"def set_apps(apps_attrs)\n (apps_attrs || []).each do |app|\n AppEnvironment.from_hash(api, {'app' => app, 'environment' => self})\n end\n end",
"def policies\n @policies = Policy.all\n end",
"def add_policies(*policies_or_labels)\n add_policies_to_labels(policies_or_labels, false)\n end",
"def policies()\n return MicrosoftGraph::Policies::PoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def update_listener_policies(elb_name, port, policy_names)\n # Make sure a policy exists for each policy on the listener\n policy_names.each do |policy_name|\n ensure_policy_exists(elb_name, policy_name)\n end\n\n @elb.set_load_balancer_policies_of_listener({\n load_balancer_name: elb_name,\n load_balancer_port: port,\n policy_names: policy_names\n })\n end",
"def set_app_properties(properties)\n properties = properties.respond_to?(:to_json) ? properties.to_json : properties\n (@session.post 'facebook.admin.setAppProperties', :properties => properties) == '1'\n end",
"def escalation_approvers=(value)\n @escalation_approvers = value\n end",
"def application_enforced_restrictions=(value)\n @application_enforced_restrictions = value\n end",
"def targeted_managed_app_configurations=(value)\n @targeted_managed_app_configurations = value\n end",
"def client_applications=(value)\n @client_applications = value\n end",
"def entitlement_management=(value)\n @entitlement_management = value\n end",
"def compliant_apps_list=(value)\n @compliant_apps_list = value\n end",
"def compliant_apps_list=(value)\n @compliant_apps_list = value\n end",
"def app_roles=(value)\n @app_roles = value\n end",
"def ios_mobile_application_management_enabled=(value)\n @ios_mobile_application_management_enabled = value\n end",
"def set_app_properties(properties)\n properties.respond_to?(:to_json) ? properties.to_json : properties\n (@session.post 'facebook.admin.setAppProperties', :properties => properties) == '1'\n end",
"def related_policy_ids=(policy_ids)\n policy_ids = Array.wrap(policy_ids).reject(&:blank?)\n new_policies = policy_ids.map {|id| Policy.find(id).document }\n other_related_documents = self.related_documents.reject { |document| document.latest_edition.is_a?(Policy) }\n\n self.related_documents = other_related_documents + new_policies\n end",
"def media_content_rating_apps=(value)\n @media_content_rating_apps = value\n end",
"def default_managed_app_protections=(value)\n @default_managed_app_protections = value\n end",
"def policy_executables\n Array(settings['external_policy_executable'])\n end",
"def set_apps(app_names, secret)\n if !valid_secret?(secret)\n return BAD_SECRET_MSG\n end\n\n if app_names.class != Array\n return \"app names was not an Array but was a #{app_names.class}\"\n end\n\n @app_names = app_names\n return \"App names is now #{@app_names.join(', ')}\"\n end",
"def apps_install_allow_list=(value)\n @apps_install_allow_list = value\n end",
"def apps_single_app_mode_list=(value)\n @apps_single_app_mode_list = value\n end",
"def client_applications_from_verified_publisher_only=(value)\n @client_applications_from_verified_publisher_only = value\n end",
"def mobile_apps=(value)\n @mobile_apps = value\n end",
"def app_locker_application_control=(value)\n @app_locker_application_control = value\n end",
"def client_application_publisher_ids=(value)\n @client_application_publisher_ids = value\n end",
"def compliance_policy=(value)\n @compliance_policy = value\n end",
"def set_app\n @app = App.with_roles(%i[admin notifier], current_user).find(params[:id] || params[:app_id])\n end",
"def set_app_restrictions(app_id, restrictions_hash, args = {}, options = {}, &block)\n graph_call(app_id, args.merge(:restrictions => JSON.dump(restrictions_hash)), \"post\", options, &block)\n end",
"def policy_group=(policy_group)\n policy_group(policy_group)\n end",
"def installed_apps=(value)\n @installed_apps = value\n end",
"def installed_apps=(value)\n @installed_apps = value\n end",
"def windows_information_protection_policies()\n return MicrosoftGraph::DeviceAppManagement::WindowsInformationProtectionPolicies::WindowsInformationProtectionPoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def modern_apps=(value)\n @modern_apps = value\n end",
"def kiosk_mode_managed_app_id=(value)\n @kiosk_mode_managed_app_id = value\n end",
"def application_guard_allow_persistence=(value)\n @application_guard_allow_persistence = value\n end",
"def []= instance_port, policy\n\n client.set_load_balancer_policies_for_backend_server(\n :load_balancer_name => load_balancer.name,\n :instance_port => instance_port.to_i,\n :policy_names => [policy_name(policy)].compact)\n\n nil\n\n end",
"def store_definition policies\n # Policies may have been defined by other means. If it's not a hash, stop\n return unless policies.is_a? Hash\n\n base = current_base\n policies.each_pair do |widget, conditions|\n policy = base[widget] || {\n :self => true,\n :params => [],\n :models => {},\n :procs => [],\n :widget_params => true\n }\n add_conditions(policy, conditions)\n base[widget] = policy\n end\n end",
"def security_require_verify_apps=(value)\n @security_require_verify_apps = value\n end",
"def security_require_verify_apps=(value)\n @security_require_verify_apps = value\n end",
"def security_require_verify_apps=(value)\n @security_require_verify_apps = value\n end",
"def android_mobile_application_management_enabled=(value)\n @android_mobile_application_management_enabled = value\n end",
"def upi_power_management=(upi_power_management)\n validator = EnumAttributeValidator.new('String', [\"platform-default\", \"enabled\", \"disabled\"])\n unless validator.valid?(upi_power_management)\n fail ArgumentError, \"invalid value for \\\"upi_power_management\\\", must be one of #{validator.allowable_values}.\"\n end\n @upi_power_management = upi_power_management\n end",
"def assign_policy(*args)\n target.target.send(\"assign_policy\",*args)\n end",
"def set_app_groups\n @sys_app_groups = bc_sys_app_groups\n @usr_app_groups = bc_usr_app_groups\n @dev_app_groups = bc_dev_app_groups\n @apps_menu_group = bc_custom_apps_group\n end",
"def setup_queues_and_policies\n publisher.setup_queues_and_policies\n end",
"def apps\n unless @apps\n load!\n end\n\n @apps\n end",
"def fix_app_permissions(apps)\n apps.map { |path|\n fix_facl(path, app_acl_template(path))\n }.select { |report| report.updated || report.error }\n end",
"def mobile_app_configurations=(value)\n @mobile_app_configurations = value\n end",
"def mdm_windows_information_protection_policies\n return @mdm_windows_information_protection_policies\n end",
"def mac_os_enrollment_assignments=(value)\n @mac_os_enrollment_assignments = value\n end",
"def update_backend_policies(elb_name, backend_added, backend_removed = [], backend_modified = [])\n\n # Update the created and modified policies\n (backend_added + backend_modified).each do |backend|\n # First make sure each policy exists\n backend.local_policies.each do |policy_name|\n ensure_policy_exists(elb_name, policy_name)\n end\n\n @elb.set_load_balancer_policies_for_backend_server({\n load_balancer_name: elb_name,\n instance_port: backend.port,\n policy_names: backend.local_policies\n })\n end\n\n # Update the deleted ones by setting policy names to []\n backend_removed.each do |backend|\n @elb.set_load_balancer_policies_for_backend_server({\n load_balancer_name: elb_name,\n instance_port: backend.port,\n policy_names: []\n })\n end\n end",
"def migrate_default_policies\n policies_dir = \"#{@migration_root}/elb-default-policies\"\n\n if !Dir.exists?(@migration_root)\n Dir.mkdir(@migration_root)\n end\n if !Dir.exists?(policies_dir)\n Dir.mkdir(policies_dir)\n end\n\n default_policies = ELB::default_policies\n default_policies.map do |policy_name, policy|\n puts \"Processing #{policy_name}\"\n\n cumulus_name = \"Cumulus-#{policy_name}\"\n json = JSON.pretty_generate(policy.to_cumulus_hash)\n\n File.open(\"#{policies_dir}/#{cumulus_name}.json\", \"w\") { |f| f.write(json) }\n end\n end",
"def add_http_permissions_policy\n response.set_header(\n 'Permissions-Policy',\n 'fullscreen=(), geolocation=(), midi=(), ' \\\n 'notifications=(), push=(), sync-xhr=(), microphone=(), ' \\\n 'camera=(), magnetometer=(), gyroscope=(), speaker=(), ' \\\n 'vibrate=(), payment=()'\n )\n # Include the older Feature-Policy header, for older browser versions.\n # We can eventually drop this, but it doesn't hurt to include it for now.\n response.set_header(\n 'Feature-Policy',\n \"fullscreen 'none'; geolocation 'none'; midi 'none';\" \\\n \"notifications 'none'; push 'none'; sync-xhr 'none'; microphone 'none';\" \\\n \"camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none';\" \\\n \"vibrate 'none'; payment 'none'\"\n )\n end",
"def mdm_windows_information_protection_policies()\n return MicrosoftGraph::DeviceAppManagement::MdmWindowsInformationProtectionPolicies::MdmWindowsInformationProtectionPoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def set_policy(node)\n policy_group, policy_name = @name_args[1..]\n node.policy_name = policy_name\n node.policy_group = policy_group\n end",
"def committed_contained_apps=(value)\n @committed_contained_apps = value\n end",
"def initialize_applications\n application_names = (settings['applications'] || '').split(',').flatten.compact.map(&:strip).uniq\n self.applications = []\n application_names.each do |app_name|\n app = Application.find(:name => app_name, :host_id => host.id)\n if app\n self.applications << app\n else\n app = Application.new(:name => app_name, :host_id => host.id)\n if app.save\n self.applications << app\n else\n warn(\"Could not create application '#{app_name}' for host #{host.name}\")\n end\n end\n end\n self.applications\n end",
"def application=(value)\n @application = value\n end",
"def policy=(policy)\n validator = EnumAttributeValidator.new('Object', ['RMF', 'DIACAP', 'Reporting'])\n unless validator.valid?(policy)\n fail ArgumentError, \"invalid value for \\\"policy\\\", must be one of #{validator.allowable_values}.\"\n end\n @policy = policy\n end",
"def policy_name=(policy_name)\n policy_name(policy_name)\n end",
"def set_application\n @application = current_student.current_application\n user_not_authorized unless @application.awaiting_payment? || @application.payment_failed?\n end",
"def admin_app_params\n params.require(:app).permit(:name, :access_key, :secret_key, :permission_level, :enable)\n end"
] | [
"0.7507987",
"0.6221065",
"0.6190385",
"0.5840999",
"0.5826427",
"0.5790539",
"0.5711074",
"0.5692786",
"0.5539803",
"0.54951954",
"0.54951954",
"0.5465558",
"0.5229928",
"0.5206212",
"0.51570183",
"0.51563805",
"0.5120104",
"0.5083624",
"0.5075466",
"0.5072483",
"0.50327617",
"0.49819055",
"0.49560347",
"0.49399567",
"0.48882726",
"0.48780617",
"0.48645836",
"0.48595434",
"0.48122174",
"0.48118028",
"0.4797548",
"0.47733647",
"0.47507665",
"0.47022226",
"0.46927753",
"0.46879408",
"0.46742377",
"0.467198",
"0.46643266",
"0.46571007",
"0.46508908",
"0.46384305",
"0.4620981",
"0.45917898",
"0.45655695",
"0.4562048",
"0.4556731",
"0.4553236",
"0.4553236",
"0.45151207",
"0.44971254",
"0.44897538",
"0.44831783",
"0.4478369",
"0.4467553",
"0.44668034",
"0.44396058",
"0.44348457",
"0.4415426",
"0.43918076",
"0.43783376",
"0.4355249",
"0.43509075",
"0.43371704",
"0.43050238",
"0.43036458",
"0.42875862",
"0.42838988",
"0.42838988",
"0.42826957",
"0.4278854",
"0.42744136",
"0.42694804",
"0.42393082",
"0.4233804",
"0.42324716",
"0.42324716",
"0.42324716",
"0.42298186",
"0.4229135",
"0.42099023",
"0.42000625",
"0.41973728",
"0.41750354",
"0.4169506",
"0.41659647",
"0.41602445",
"0.41424456",
"0.41378334",
"0.41314748",
"0.41238406",
"0.41169828",
"0.4110469",
"0.41072685",
"0.4105996",
"0.41056988",
"0.41013348",
"0.40976682",
"0.4097587",
"0.4084639"
] | 0.8140223 | 0 |
Gets the appRoles property value. The collection of roles defined for the application. With app role assignments, these roles can be assigned to users, groups, or service principals associated with other applications. Not nullable. | def app_roles
return @app_roles
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def app_roles=(value)\n @app_roles = value\n end",
"def roles\r\n @roles ||= user_roles.map(&:name)\r\n end",
"def roles\n response[\"roles\"]\n end",
"def roles\n client.user_roles(id)\n end",
"def roles\n client.user_roles(id)\n end",
"def roles\n roles_from_users\n end",
"def roles\n users.map { |item| item['roles'] }.flatten.uniq\n end",
"def roles\n return proposed_snapshot.roles if proposed? \n return active_snapshot.roles if active?\n []\n end",
"def roles\n @resource_roles\n end",
"def roles(options = {})\n headers = extract_headers!(options)\n json = client.list(\"/v1/auth/approle/role\", options, headers)\n return Secret.decode(json).data[:keys] || []\n rescue HTTPError => e\n return [] if e.code == 404\n raise\n end",
"def roles\n User.valid_roles\n end",
"def the_roles\n roles.each.map{|_r| User::ROLES[_r.to_sym] }\n end",
"def roles\n self.class.roles.map do |name|\n __send__(name)\n end\n end",
"def roles\n return [] if !subject.respond_to?(roles_list_meth) || roles_of(subject).blank?\n roles_of(subject).flatten\n end",
"def resource_roles=(value)\n @resource_roles = value\n end",
"def my_roles\n @my_roles ||= self.roles.map {|r| r.name}.flatten.freeze\n end",
"def roles\n raise \"#{subject.inspect} should have a #{roles_list_meth} method\" if !subject.respond_to?(roles_list_meth)\n subj_roles = subject.send(roles_list_meth)\n return [] if subj_roles.blank?\n subj_roles.flatten\n end",
"def roles\n url = \"/gdc/projects/#{pid}/roles\"\n tmp = GoodData.get(url)\n tmp['projectRoles']['roles'].map do |role_url|\n json = GoodData.get role_url\n GoodData::ProjectRole.new(json)\n end\n end",
"def hubssolib_get_user_roles\n user = self.hubssolib_current_user\n user ? user.user_roles.to_authenticated_roles : nil\n end",
"def roles_from_users\n Role.for_resource(self)\n end",
"def roles\n self.dig_for_array(\"roles\")\n end",
"def deployment_roles\n return proposed_snapshot.deployment_roles if proposed? \n return active_snapshot.deployment_roles if active?\n []\n end",
"def pass_on_roles\n r = self.roles.to_a\n if self.has_access?(:superadmin)\n r = Role.get(Access.roles(:all_users)).to_a\n elsif self.has_access?(:admin)\n r = Role.get(Access.roles(:admin_roles)).to_a\n elsif self.has_access?(:centeradm)\n r = Role.get(Access.roles(:center_users)).to_a\n end\n return (r.is_a?(Array) ? r : [r])\n end",
"def assigned_roles\n to_array_if_not(self.roles)\n end",
"def roles\n roles_as_editor + roles_as_reviewer + role_as_admin\n end",
"def roles\n Role.group_roles_from_cache(self)\n end",
"def role_assignments\n return @role_assignments\n end",
"def pass_on_roles\n r = self.all_roles\n if self.has_access?(:superadmin)\n r = Role.get(Access.roles(:all_users))\n elsif self.has_access?(:admin)\n r = Role.get(Access.roles(:admin_roles))\n elsif self.has_access?(:centeradm)\n r = Role.get(Access.roles(:center_users))\n end\n return (r.is_a?(Array) ? r : [r])\n end",
"def pass_on_roles\n r = self.all_roles\n if self.has_access?(:superadmin)\n r = Role.get(Access.roles(:all_users))\n elsif self.has_access?(:admin)\n r = Role.get(Access.roles(:admin_roles))\n elsif self.has_access?(:centeradm)\n r = Role.get(Access.roles(:center_users))\n end\n return (r.is_a?(Array) ? r : [r])\n end",
"def roles\n Jak.role_klass.where(id: grants.pluck(:role_ids).compact.flatten)\n end",
"def roles\n (properties[:roles] || []).map { |r| r.is_a?(Link) ? r : Link.new(r, nil, client) }\n end",
"def all\n data = []\n conn = @ec2_main.environment.iam_connection\n if conn != nil\n begin\n response = conn.list_roles()\n if response.status == 200\n data = response.body[\"Roles\"]\n end\n rescue\n puts \"ERROR: getting all roles #{$!}\"\n end\n end\n return data\n end",
"def resource_roles\n return @resource_roles\n end",
"def role_list \n @role_list ||= begin\n (store.display_roles | group_store.display_roles)\n end\n end",
"def roles\n get_chef_files_absolute_paths roles_path\n end",
"def normalize_roles\n self.roles = if self.roles.blank?\n []\n else\n self.class.roles.select { |role_to_check| roles.include?(role_to_check.to_s) }\n end\n end",
"def conversation_member_roles=(value)\n @conversation_member_roles = value\n end",
"def index\n client_application_id = current_user.client_application_id.to_s\n @roles = Role.where(client_application_id: client_application_id)\n end",
"def roles\n ::Syncano::QueryBuilder.new(self, ::Syncano::Resources::Role)\n end",
"def roles\n tmp = client.get @json['user']['links']['roles']\n tmp['associatedRoles']['roles'].pmap do |role_uri|\n role = client.get role_uri\n client.factory.create(GoodData::ProjectRole, role)\n end\n end",
"def get_roles_list()\n\n query_parameters = {}\n query_parameters['apiKey'] = @api_key\n query_parameters['apiSecret'] = @api_secret\n\n resource_path = 'identity/v2/manage/role'\n get_request(resource_path, query_parameters, nil)\n end",
"def roles\n # rocking this in memory because eager-loading\n roles = object.paper_roles.select { |role|\n role.user_id == scoped_user.id\n }.map(&:description)\n roles << \"My Paper\" if object.user_id == scoped_user.id\n roles\n end",
"def load_roles\n @roles = service_user.identity.roles.keep_if do |role|\n ALLOWED_ROLES.include?(role.name) || user_has_beta_role?(role.name)\n end.sort_by(&:name)\n end",
"def role_ids\n roles.pluck(:id)\n end",
"def associated_roles\n data[:associated_roles]\n end",
"def associated_roles\n data[:associated_roles]\n end",
"def accessible_roles\n index = ROLES.index(self.role)\n roles = User::ROLES[0..index].map{|x| [x.humanize, x]} if index\n return roles\n end",
"def user_roles\n roles.collect(&:name).join(', ').split(', ').map(&:capitalize).join(', ')#.capitalize\n end",
"def roles(reload = false)\n @roles = nil if reload\n @roles ||=\n Role.find_by_sql ['select * from roles where id in ' +\n self.class.role_assigned_cond(':id'),\n {:id => id}]\n end",
"def list_employee_roles(opts = {})\n data, _status_code, _headers = list_employee_roles_with_http_info(opts)\n return data\n end",
"def list_review_roles\n\n @review_roles = Role.get_review_roles\n\n end",
"def roles_for_project(project)\n roles = []\n # No role on archived projects\n return roles unless project && project.active?\n if logged?\n # Find project membership\n membership = memberships.detect { |m| m.project_id == project.id }\n if membership\n roles = membership.roles\n else\n @role_non_member ||= Role.non_member\n roles << @role_non_member\n end\n else\n @role_anonymous ||= Role.anonymous\n roles << @role_anonymous\n end\n roles\n end",
"def roles\n # we can't use abilities as those are not defined when creating a new operator that is not yet saved\n #result = abilities.collect(&:name)\n authorizations.collect{|auth| auth.ability.try(:name)}\n end",
"def roles\n # we can't use abilities as those are not defined when creating a new operator that is not yet saved\n #result = abilities.collect(&:name)\n authorizations.collect{|auth| auth.ability.try(:name)}\n end",
"def roles(roles) #:nodoc:\n @roles = roles\n end",
"def get_roles(opts = {})\n data, _status_code, _headers = get_roles_with_http_info(opts)\n data\n end",
"def current_user_role_names\n container.current_user_role_names\n end",
"def all_roles\n _role_ids_ = (account_groups.map(&:role_ids) + role_ids).flatten.uniq\n Role.where(id: _role_ids_)\n end",
"def user_roles=(value)\n roles[:user_roles]=value\n end",
"def app_environments\n @app_environments ||= apps.map { |app| app.app_environments }.flatten\n end",
"def get_user_roles\n @roles = @user.roles.pluck(:name)\n render json: @roles\n end",
"def conversation_member_roles\n return @conversation_member_roles\n end",
"def all\n @roles = Array.new\n @connection.deploys.all.each do |deploy|\n deploy.roles.each do |role|\n @roles << role\n end\n end\n @roles\n end",
"def assignment_roles\n AssignmentRole.all\n end",
"def organization_roles\n roles = []\n\n if Figaro.env.respond_to?(:cf_organization_add_manager) &&\n Figaro.env.cf_organization_add_manager.downcase == 'true'\n roles << 'manager'\n end\n\n if Figaro.env.respond_to?(:cf_organization_add_billing_manager) &&\n Figaro.env.cf_organization_add_billing_manager.downcase == 'true'\n roles << 'billing_manager'\n end\n\n if Figaro.env.respond_to?(:cf_organization_add_auditor) &&\n Figaro.env.cf_organization_add_auditor.downcase == 'true'\n roles << 'auditor'\n end\n\n roles\n end",
"def accessible_roles\n @accessible_roles = Role.accessible_by(current_ability, :read)\n end",
"def role_permissions\n return @role_permissions\n end",
"def role_assignments=(value)\n @role_assignments = value\n end",
"def all\n @roles = []\n @connection.deploys.all.each do |deploy|\n deploy.roles.each do |role|\n @roles << role\n end\n end\n @roles\n end",
"def role_data\n APP_CONFIG['roles'].find { |role| role['name'] == self.role }\n end",
"def roles\n @declared_roles ||= Hash.new\n end",
"def role_names\n roles.split(',')\n end",
"def roles\n @roles = Role.order(\"name\")\n\t@rights = Right.order(\"name\").map {|r| [r.name, r.id] }\n end",
"def roles_list(role = nil)\n self.role_symbols\n end",
"def roles_for_user login\n cu = config['user']\n role_alias = cu[login] || cu[nil]\n role_alias = [ role_alias ] unless Array === role_alias\n roles = [ ]\n role_alias.each do | ra |\n roles.concat config['roles'][ra] || [ ra ]\n end\n roles.uniq!\n roles\n end",
"def applications\n return @applications\n end",
"def applications\n return @applications\n end",
"def roles= *new_roles\n roles.set_roles new_roles\n end",
"def roles(system, username)\n\n roles = []\n user = self.get_user\n\n if user.key? \"groups\" and user[\"groups\"].any?\n roles << group_roles\n end\n\n if user.key? \"roles\" and user[\"roles\"].any?\n roles << roles_for(username)\n end\n\n # Convert from [{\"api\":[\"sysadmin\"]},{\"api\":[\"reader\"]}]\n roles = roles.flatten.select {|r| r.key? system} \n roles = roles.map {|system_role| system_role[system]}.flatten.uniq\n # to [\"sysadmin\", \"reader\"]\n\n roles\n end",
"def accessible_roles\n @accessible_roles = Role.accessible_by(current_ability)\n end",
"def accessible_roles\n @accessible_roles = Role.accessible_by(current_ability, :read)\n end",
"def accessible_roles\n @accessible_roles = Role.accessible_by(current_ability, :read)\n end",
"def productions\n roles.map {|role| role.production}\n end",
"def roles_path\n @roles_path ||= '/api/v2/roles'\n end",
"def roles=(t)\n if t.kind_of?(String)\n t = t.downcase.split(\",\").join(\" \").split(\" \").uniq\n end\n self[:roles] = t\n end",
"def get_role_ids()\n server = Rails.cache.read('discord_bot/servers')&.find { |s| s['id'] == self.discord_server.id }\n\n return [] if server.nil?\n\n roles_config = server['exp_roles_config']\n\n return [] if roles_config.nil?\n\n thresholds = roles_config.sort_by { |r| r[0] }\n acquired_roles = []\n\n while thresholds.count > 0 && self.exp > thresholds.first[0] do\n acquired_roles.push(thresholds.shift)\n end\n\n return acquired_roles\n end",
"def current_user_role_names\n @current_user_role_names ||= Manage::Group.role_names_for current_user\n end",
"def to_a\n return @role_array.dup\n end",
"def roles_for(user)\n user ||= Authorization.current_user\n raise AuthorizationUsageError, \"User object doesn't respond to roles (#{user.inspect})\" \\\n if !user.respond_to?(:role_symbols) && !user.respond_to?(:roles)\n\n Rails.logger.info('The use of user.roles is deprecated. Please add a method ' \\\n 'role_symbols to your User model.') if defined?(Rails) && Rails.respond_to?(:logger) && !user.respond_to?(:role_symbols)\n\n roles = user.respond_to?(:role_symbols) ? user.role_symbols : user.roles\n\n raise AuthorizationUsageError, \"User.#{user.respond_to?(:role_symbols) ? 'role_symbols' : 'roles'} \" \\\n \"doesn't return an Array of Symbols (#{roles.inspect})\" \\\n if !roles.is_a?(Array) || (!roles.empty? && !roles[0].is_a?(Symbol))\n\n (roles.empty? ? [Authorization.default_role] : roles)\n end",
"def roles_for_vp_and_sysadmin\n\t\tvp_and_sysadmin_roles = []\n\t\tfor role in Role.all\n\t\t\tif role.name.eql?(\"System Admin\") || role.name.eql?(\"VP of Finance\") \n\t\t\t\tvp_and_sysadmin_roles << role\n\t\t\tend\n\t\tend\n\t\treturn vp_and_sysadmin_roles\n\tend",
"def roles=(roles)\n return self.roles_mask = (roles.map(&:to_sym) & ROLES).map { |r| 2**ROLES.index(r) }.sum\n end",
"def roles\n Role.all.select do |role|\n role.movie == self\n end\n end",
"def list_roles(options={})\n request({\n 'Action' => 'ListRoles',\n :parser => Fog::Parsers::AWS::IAM::ListRoles.new\n }.merge!(options))\n end",
"def secondary_roles\n user.secondary_role\n end",
"def roles\n\t\t\t\tProxy.new connection, 'role-strategy/strategy'\n\t\t\tend",
"def roles_presented\n roles.join(\", \")\n end",
"def map_available_roles\n roles.each.map &:name\n end",
"def accessible_roles\n @accessible_roles = Role.accessible_by(current_ability,:read)\n end",
"def accessible_roles\n @accessible_roles = Role.accessible_by(current_ability,:read)\n end",
"def accessible_roles\n @accessible_roles = Role.accessible_by(current_ability,:read)\n end"
] | [
"0.7921514",
"0.68397963",
"0.63426745",
"0.6263821",
"0.6263821",
"0.6242529",
"0.6073304",
"0.60319895",
"0.6021147",
"0.59836876",
"0.5982714",
"0.5975261",
"0.5956413",
"0.59479994",
"0.5947468",
"0.59390223",
"0.5936557",
"0.5912178",
"0.5909769",
"0.5895336",
"0.5842109",
"0.5842035",
"0.5837623",
"0.58162385",
"0.5787322",
"0.57617015",
"0.5737432",
"0.57325387",
"0.57325387",
"0.572848",
"0.568688",
"0.5667187",
"0.5644511",
"0.5611673",
"0.5608192",
"0.559588",
"0.55796707",
"0.55692154",
"0.5493094",
"0.5487831",
"0.5481929",
"0.5470717",
"0.5466071",
"0.54466164",
"0.54205143",
"0.54205143",
"0.54107803",
"0.538505",
"0.5366745",
"0.5355483",
"0.5355272",
"0.5348365",
"0.53378344",
"0.53378344",
"0.53375083",
"0.53365034",
"0.5334177",
"0.53240454",
"0.5322975",
"0.53181255",
"0.528744",
"0.52668",
"0.5261493",
"0.5260755",
"0.5253203",
"0.5245285",
"0.5243734",
"0.52341294",
"0.52320766",
"0.5230669",
"0.52060676",
"0.52031136",
"0.52001065",
"0.5195409",
"0.5158833",
"0.5137726",
"0.5137726",
"0.51360255",
"0.513569",
"0.51194835",
"0.5107409",
"0.5107409",
"0.5092574",
"0.50910914",
"0.5084102",
"0.50833696",
"0.50825775",
"0.50801307",
"0.50784004",
"0.5077445",
"0.50645435",
"0.5055061",
"0.50455266",
"0.50417864",
"0.5024402",
"0.50191545",
"0.5014548",
"0.50032824",
"0.50032824",
"0.50032824"
] | 0.7863382 | 1 |
Sets the appRoles property value. The collection of roles defined for the application. With app role assignments, these roles can be assigned to users, groups, or service principals associated with other applications. Not nullable. | def app_roles=(value)
@app_roles = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def roles(roles) #:nodoc:\n @roles = roles\n end",
"def roles= *new_roles\n roles.set_roles new_roles\n end",
"def app_roles\n return @app_roles\n end",
"def resource_roles=(value)\n @resource_roles = value\n end",
"def update_roles(roles)\n self.roles |= roles\n self.save!\n end",
"def roles=(roles_arr)\n self.authorizations = []\n roles_arr.each do |role|\n find_or_create_authorization(role) unless role.blank?\n end\n end",
"def roles=(roles_arr)\n self.authorizations = []\n roles_arr.each do |role|\n find_or_create_authorization(role) unless role.blank?\n end\n end",
"def set_roles *roles\n roles = roles.flatten\n raise ArgumentError, \"For a single role strategy you can only set one role, was: #{roles.flatten}\" if roles.empty? || (roles.size > 1)\n set_role roles.first\n end",
"def assign_roles\n roles_map.each do |role_obj|\n Authentication::Account.find_by_email(role_obj['email']).update_attributes(roles: role_obj['roles'])\n end\n end",
"def roles=(roles)\n self.roles_mask = (roles & ROLES).map { |r| 2**ROLES.index(r) }.inject(0, :+)\n end",
"def roles=(roles)\n self.roles_mask = (roles & ROLES).map { |r| 2**ROLES.index(r) }.inject(0, :+)\n end",
"def roles=(roles)\n roles = [*roles].map { |r| r.to_sym }\n self.roles_mask = (roles & ROLES).map { |r| 2**ROLES.index(r) }.inject(0, :+)\n end",
"def set_roles(wanted_roles)\n current_roles = roles.map(&:name)\n\n remove = current_roles.reject { |r| wanted_roles.include?(r) }\n add = wanted_roles.reject { |r| current_roles.include?(r) }\n\n Ruolo.configuration.connection.transaction do\n remove.each do |role|\n remove_role(Ruolo::Models::Role.where(name: role).first)\n end\n\n add.each do |role|\n add_role(Ruolo::Models::Role.where(name: role).first)\n end\n end\n end",
"def user_roles=(value)\n roles[:user_roles]=value\n end",
"def roles=(roles)\n self.roles_mask = (roles & ROLES).map { |r| 2**ROLES.index(r) }.sum\n end",
"def roles=(roles)\n self.roles_mask = (roles & ROLES).map { |r| 2**ROLES.index(r) }.sum\n end",
"def add_roles (roles_in)\n roles_in = to_array_if_not(roles_in)\n roles_in.each do |role|\n add_role(role)\n end\n # Rails.logger.debug(\"* UserRoles - add_role - updated - self.roles:#{self.roles.inspect.to_s}\")\n end",
"def roles=(roles)\n return self.roles_mask = (roles.map(&:to_sym) & ROLES).map { |r| 2**ROLES.index(r) }.sum\n end",
"def role_ids=(id_list)\n\t\tlogger.info(\"[ROLE IDS] #{id_list}\")\n\t\tself.roles.clear\n\t\tfor id in id_list\n\t\t\tnext if id.empty?\n\t\t\trole = Role.find(id)\n\t\t\tself.roles << role if role\n\t\tend\n\tend",
"def roles=(t)\n if t.kind_of?(String)\n t = t.downcase.split(\",\").join(\" \").split(\" \").uniq\n end\n self[:roles] = t\n end",
"def roles\r\n @roles ||= user_roles.map(&:name)\r\n end",
"def roles=(role_attributes)\n role_attributes.each do |id, attribute|\n role = Role.find(id)\n unless attribute['name'].empty?\n roles << role unless has_role?(role)\n else\n roles.delete(role) if has_role?(role)\n end\n end\n end",
"def set_stage_roles(config)\n deployment.deploy_to_roles.each do |r|\n \n # create role attributes hash\n role_attr = r.role_attribute_hash\n \n if role_attr.blank?\n config.role r.name, r.hostname_and_port\n else\n config.role r.name, r.hostname_and_port, role_attr\n end\n end\n end",
"def remove_roles(roles)\n return self.roles = (self.roles - Array(roles))\n end",
"def add_env_role_site(envs, roles, sites)\n { 'Environment' => envs, 'Role' => roles, 'Site' => sites }.each_pair do |kind, selection|\n select_item(kind, selection)\n end\n\n end",
"def conversation_member_roles=(value)\n @conversation_member_roles = value\n end",
"def update_roles(new_roles, authorized_admin = false)\n new_roles.delete('admin') unless authorized_admin\n new_roles.each { |name, value| value.as_boolean ? add_role(name) : remove_role(name) }\n end",
"def role_assignments=(value)\n @role_assignments = value\n end",
"def applications=(value)\n @applications = value\n end",
"def applications=(value)\n @applications = value\n end",
"def add_roles(roles)\n return self.roles = (self.roles + Array(roles)).uniq\n end",
"def roles\n client.user_roles(id)\n end",
"def roles\n client.user_roles(id)\n end",
"def roles(klass)\n if @resource_config[:roles]\n raise DefinitionError, \"roles already declared in #{self}\"\n end\n @resource_config[:roles] = klass\n end",
"def remove_roles *roles\n roles = roles.flatten.compact\n return nil if roles_diff(roles).empty?\n roles_to_remove = select_valid_roles(roles)\n self.roles = self.roles - roles_to_remove\n true\n end",
"def remove_roles(*values)\n self.roles = roles - values.map(&:to_s)\n end",
"def normalize_roles\n self.roles = if self.roles.blank?\n []\n else\n self.class.roles.select { |role_to_check| roles.include?(role_to_check.to_s) }\n end\n end",
"def roles\n (properties[:roles] || []).map { |r| r.is_a?(Link) ? r : Link.new(r, nil, client) }\n end",
"def set_roles *roles\n value = roles.flatten.map(&:to_s).join(',')\n set_ds_field value\n end",
"def create_roles(roles_model)\n if roles_model.blank?\n raise LoginRadius::Error.new, getValidationMessage('roles_model')\n end\n\n query_parameters = {}\n query_parameters['apiKey'] = @api_key\n query_parameters['apiSecret'] = @api_secret\n\n resource_path = 'identity/v2/manage/role'\n post_request(resource_path, query_parameters, roles_model)\n end",
"def roles\n tmp = client.get @json['user']['links']['roles']\n tmp['associatedRoles']['roles'].pmap do |role_uri|\n role = client.get role_uri\n client.factory.create(GoodData::ProjectRole, role)\n end\n end",
"def add_roles(*values)\n values.map(&:to_s).each do |value|\n roles << value if Settings.valid_roles.include?(value) && !role?(value)\n end\n end",
"def add_user_roles(user_id, roles)\n raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?\n validate_strings_array roles\n path = \"#{users_path}/#{user_id}/roles\"\n post(path, roles: roles)\n end",
"def set_roles\n roles << Role.user unless has_role?(\"user\")\n as_seller! if @registration_as_seller.to_i == 1\n end",
"def roles\n url = \"/gdc/projects/#{pid}/roles\"\n tmp = GoodData.get(url)\n tmp['projectRoles']['roles'].map do |role_url|\n json = GoodData.get role_url\n GoodData::ProjectRole.new(json)\n end\n end",
"def roles(options = {})\n headers = extract_headers!(options)\n json = client.list(\"/v1/auth/approle/role\", options, headers)\n return Secret.decode(json).data[:keys] || []\n rescue HTTPError => e\n return [] if e.code == 404\n raise\n end",
"def roles\n response[\"roles\"]\n end",
"def update_user_roles(token, server_id, user_id, roles)\n request(\n __method__,\n :patch,\n \"#{api_base}/guilds/#{server_id}/members/#{user_id}\",\n { roles: roles }.to_json,\n Authorization: token,\n content_type: :json\n )\n end",
"def role_permissions=(value)\n @role_permissions = value\n end",
"def roles_with_from_array_of_strings=(*roles)\n roles = roles.first if roles.size == 1 && roles.first.is_a?(Array)\n roles = roles.map{ |r| r.is_a?(Usermeta) ? r : Usermeta.find_or_initialize_by(user_id: id, key: ROLE_KEY, value: r) }\n self.roles_without_from_array_of_strings = *roles\n end",
"def edit_role(id, *roles)\n request(:put, \"/users/#{id}.json\", default_params(:role_ids => roles))\n end",
"def init_user_roles(roles_in = nil)\n # Rails.logger.debug(\"* Models::UserRoles.init_user_roles - #{self.username.to_s} roles_in:#{roles_in.inspect.to_s}\")\n self.roles = DEFAULT_ROLES.join(' ')\n self.add_roles (roles_in)\n end",
"def assign_roles(role_ids)\n selected_roles = !role_ids.to_a.empty? ? Role.find(:all, :conditions => [\"id IN (#{role_ids.to_a.uniq.join(', ')})\"]) : []\n self.employee_roles.each do |e_l|\n if selected_roles.map{|l| l.id}.include?(e_l.role_id)\n selected_roles.delete_if{|sl| sl.id == e_l.role_id}\n else\n self.employee_roles.delete(e_l)\n end\n end\n self.roles << selected_roles\n end",
"def my_roles\n @my_roles ||= self.roles.map {|r| r.name}.flatten.freeze\n end",
"def load_roles\n @roles = service_user.identity.roles.keep_if do |role|\n ALLOWED_ROLES.include?(role.name) || user_has_beta_role?(role.name)\n end.sort_by(&:name)\n end",
"def edit_roles\n if (@user = find_user(params[:id]))\n begin\n User.transaction(@user) do\n \n roles = params[:user][:roles].collect { |role_id| Role.find(role_id) }\n # add any new roles & remove any missing roles\n roles.each { |role| @user.roles << role if [email protected]?(role) }\n @user.roles.each { |role| @user.roles.delete(role) if !roles.include?(role) }\n\n @user.save\n flash[:notice] = \"Roles updated for user '#{@user.login}'.\"\n end\n rescue\n flash[:warning] = 'Roles could not be edited at this time. Please retry.'\n ensure\n redirect_to :back\n end\n else\n redirect_back_or_default :action => 'list'\n end\n end",
"def roles\n self.class.roles.map do |name|\n __send__(name)\n end\n end",
"def run_for_app_all_roles(*apps, &block)\n the_app = node[:zz][:app_name]\n the_role = node[:zz][:deploy_role]\n rails_env = node[:zz][:group_config][:rails_env]\n apps.each do |app|\n app_name = app.to_s\n if app_name == the_app\n block.call(the_app.to_sym, the_role.to_sym, rails_env.to_sym)\n end\n end\n end",
"def apps=(value)\n @apps = value\n end",
"def roles(*select_roles, &block)\n if block_given?\n return yield(roles(*select_roles))\n end\n\n roles_set = Set.new select_roles.flatten.compact.map{|r| r.to_sym}\n if roles_set.empty? || roles_set.include?(:all)\n self\n else\n @cache[roles_set] ||= select { |server| server.matches_roles?(roles_set) }\n end\n end",
"def roles(*select_roles, &block)\n if block_given?\n return yield(roles(*select_roles))\n end\n\n roles_set = Set.new select_roles.flatten.compact.map{|r| r.to_sym}\n if roles_set.empty? || roles_set.include?(:all)\n self\n else\n @cache[roles_set] ||= select { |server| server.matches_roles?(roles_set) }\n end\n end",
"def roles_presence\n if roles.size == 0\n errors.add(:roles, \"User must have, at least, one role\")\n end\n end",
"def pass_on_roles\n r = self.roles.to_a\n if self.has_access?(:superadmin)\n r = Role.get(Access.roles(:all_users)).to_a\n elsif self.has_access?(:admin)\n r = Role.get(Access.roles(:admin_roles)).to_a\n elsif self.has_access?(:centeradm)\n r = Role.get(Access.roles(:center_users)).to_a\n end\n return (r.is_a?(Array) ? r : [r])\n end",
"def set_users_roles(list, role_list = roles)\n list.map do |user_hash|\n user = user_hash[:user]\n roles = user_hash[:role] || user_hash[:roles]\n {\n :user => user,\n :result => set_user_roles(user, roles, role_list)\n }\n end\n end",
"def set_Role(value)\n set_input(\"Role\", value)\n end",
"def assigned_roles\n to_array_if_not(self.roles)\n end",
"def roles\n roles_as_editor + roles_as_reviewer + role_as_admin\n end",
"def roles_path\n @roles_path ||= '/api/v2/roles'\n end",
"def set_roles_assignment\n @roles_assignment = RolesAssignment.find(params[:id])\n end",
"def roles\n get_chef_files_absolute_paths roles_path\n end",
"def replace_roles(role_names)\n removals = []\n for role in self.roles do\n if !role_names.include?(role.name)\n removals << role \n else\n role_names.delete(role.name)\n end\n end\n self.roles = self.roles - removals\n # all that's left in role_names now is the names of roles to add\n for role_name in role_names do\n add_role(role_name) unless role_name == ''\n end\n end",
"def resource_role_scopes=(value)\n @resource_role_scopes = value\n end",
"def role_ids=(ids)\n ids.each do |role_id|\n if role_id.presence\n role = ::Burlesque::Role.find(role_id)\n self.roles << role unless self.role?(role)\n end\n end\n\n to_deletes = []\n self.roles.each do |role|\n to_deletes << role unless ids.include?(role.id) or ids.include?(role.id.to_s) or self.role_in_groups?(role)\n end\n\n to_deletes.each do |role|\n self.roles.delete(role) if self.roles.include?(role)\n end\n end",
"def assign_roles(organization, user, organization_roles)\n organization.add_manager user if organization_roles.include?('manager')\n organization.add_billing_manager user if organization_roles.include?('billing_manager')\n organization.add_auditor user if organization_roles.include?('auditor')\n end",
"def add_roles(roles)\n if !roles.is_a? Array\n roles = [roles]\n end\n rs = (self.role_symbols + roles.map {|x| x.to_s}).uniq\n self.role_symbols = rs\n end",
"def roles?(a_roles)\n result = false\n a_roles.each{|role|\n result ||= role?(role)\n }\n return result\n end",
"def revoke_roles(user, roles, options = nil)\n policy = create_policy(options, AdminPolicy, default_admin_policy)\n command = AdminCommand.new\n command.revoke_roles(@cluster, policy, user, roles)\n end",
"def set_users_role\n @users_role = Users::Role.find(params[:id])\n end",
"def roles(reload = false)\n @roles = nil if reload\n @roles ||=\n Role.find_by_sql ['select * from roles where id in ' +\n self.class.role_assigned_cond(':id'),\n {:id => id}]\n end",
"def set_movie_role\n @movie_role = @movie.roles.find_by(:id => params[:id])\n end",
"def establish_roles specified_roles\n # TODO: Separate cleanup method / script to take care of duplicate\n # User<->Role connections rather than `delete_all` here.\n self.roles.delete_all\n self.roles = specified_roles\n end",
"def update\n @user = User.find(params[:user_id])\n @roles = Role.all\n \n if current_user.is_admin?\n @user.roles.clear\n @roles.each do |role|\n if (params[:role][:role][role.rolename][:hasrole].to_s == 1.to_s)\n @user.roles << role\n end\n end\n else\n @roles.each do |role|\n if !role.admin_only\n if @user.has_role?(role.rolename)\n @user.roles.destroy(role)\n end\n if (params[:role][:role][role.rolename][:hasrole].to_s == 1.to_s)\n @user.roles << role\n end\n end\n end\n end\n \n flash[:notice] = I18n.t(\"user.success.roles_updated\")\n reload_page\n \n end",
"def process_roles(items=node.run_list.run_list_items.dup)\n if entry = items.shift\n if entry.type == :role && role = inflate_role(entry.name)\n process_roles(role.run_list_for(@environment).run_list_items)\n node.default_attrs = Chef::Mixin::DeepMerge.merge(node.default_attrs, role.default_attributes)\n check_for_state_change \"deep merge of default attribute in role #{entry.name}\"\n node.override_attrs = Chef::Mixin::DeepMerge.merge(node.override_attrs, role.override_attributes)\n check_for_state_change \"deep merge of override attribute in role #{entry.name}\"\n end\n process_roles(items)\n end\n end",
"def set_permissions( new_roles )\n preserved_roles = self.roles & new_roles\n roles_to_remove = self.roles - preserved_roles\n roles_to_add = new_roles - preserved_roles\n \n remove_roles roles_to_remove\n add_roles roles_to_add\n end",
"def role=(value)\n @role = value\n end",
"def roles\n @resource_roles\n end",
"def roles\n ::Syncano::QueryBuilder.new(self, ::Syncano::Resources::Role)\n end",
"def set_users_role\n @users_role = UsersRole.find(params[:id])\n end",
"def roles?(roles)\n roles.include?(role&.name)\n end",
"def grant_roles(user, roles, options = nil)\n policy = create_policy(options, AdminPolicy, default_admin_policy)\n command = AdminCommand.new\n command.grant_roles(@cluster, policy, user, roles)\n end",
"def pass_on_roles\n r = self.all_roles\n if self.has_access?(:superadmin)\n r = Role.get(Access.roles(:all_users))\n elsif self.has_access?(:admin)\n r = Role.get(Access.roles(:admin_roles))\n elsif self.has_access?(:centeradm)\n r = Role.get(Access.roles(:center_users))\n end\n return (r.is_a?(Array) ? r : [r])\n end",
"def pass_on_roles\n r = self.all_roles\n if self.has_access?(:superadmin)\n r = Role.get(Access.roles(:all_users))\n elsif self.has_access?(:admin)\n r = Role.get(Access.roles(:admin_roles))\n elsif self.has_access?(:centeradm)\n r = Role.get(Access.roles(:center_users))\n end\n return (r.is_a?(Array) ? r : [r])\n end",
"def roles\n users.map { |item| item['roles'] }.flatten.uniq\n end",
"def set_roles_cached(ldap_roles_arr)\n # Cache the roles as a concatenated string into the user object\n self.roles_cached = ldap_roles_arr.join(',')\n save\n end",
"def set_Role(value)\n set_input(\"Role\", value)\n end",
"def set_Role(value)\n set_input(\"Role\", value)\n end",
"def client_application_ids=(value)\n @client_application_ids = value\n end",
"def roles_from_users\n Role.for_resource(self)\n end",
"def roles\n roles_from_users\n end",
"def role=(value)\n self.user_type = ROLES[value]\n end"
] | [
"0.65181136",
"0.64321923",
"0.6135886",
"0.60100245",
"0.60042167",
"0.60032207",
"0.60032207",
"0.5830671",
"0.5774186",
"0.5671163",
"0.5671163",
"0.5669819",
"0.5643005",
"0.56359315",
"0.56026113",
"0.56026113",
"0.5577325",
"0.5575257",
"0.55516136",
"0.5520294",
"0.54888916",
"0.54764944",
"0.53268623",
"0.5316492",
"0.5290064",
"0.5283461",
"0.5276302",
"0.5273336",
"0.5268847",
"0.5268847",
"0.52554",
"0.52279544",
"0.52279544",
"0.51811486",
"0.5178755",
"0.5171284",
"0.514113",
"0.50959986",
"0.50868356",
"0.50357026",
"0.50327784",
"0.50123024",
"0.50030386",
"0.49922654",
"0.49913502",
"0.49728042",
"0.49568003",
"0.4941872",
"0.4923384",
"0.49062827",
"0.48953298",
"0.48929843",
"0.48900032",
"0.48819906",
"0.4863444",
"0.4858355",
"0.48377973",
"0.4818959",
"0.4812278",
"0.47967938",
"0.47967938",
"0.47946912",
"0.47736427",
"0.47532216",
"0.4746564",
"0.47327498",
"0.47111523",
"0.46947822",
"0.46907544",
"0.46894208",
"0.46839866",
"0.46647277",
"0.46631995",
"0.4648368",
"0.46463922",
"0.46359715",
"0.46234348",
"0.46147195",
"0.46054497",
"0.46004254",
"0.45829144",
"0.45814508",
"0.45813218",
"0.45751408",
"0.45723408",
"0.45707786",
"0.45681518",
"0.45666724",
"0.4566321",
"0.4565638",
"0.45637155",
"0.45637155",
"0.45546895",
"0.45495653",
"0.45450014",
"0.45450014",
"0.45417693",
"0.45350543",
"0.45234594",
"0.4521127"
] | 0.8082756 | 0 |
Gets the applicationTemplateId property value. Unique identifier of the applicationTemplate. Supports $filter (eq, not, ne). | def application_template_id
return @application_template_id
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def application_template_id=(value)\n @application_template_id = value\n end",
"def template_id\n return @template_id\n end",
"def template_id\n return @template_id\n end",
"def application_id\n return @application_id\n end",
"def templateId=(value)\n\t\t\t@templateId = value\n\t\tend",
"def template_id=(value)\n @template_id = value\n end",
"def template_id=(value)\n @template_id = value\n end",
"def role_template_id\n return @role_template_id\n end",
"def result_template_id\n return @result_template_id\n end",
"def resource_app_id\n return @resource_app_id\n end",
"def app_identifier\n return @app_identifier\n end",
"def funder_id\n if self.template.nil? then\n return nil\n end\n return self.template.org\n end",
"def app_id\n return @app_id\n end",
"def app_id\n return @app_id\n end",
"def app_id\n return @app_id\n end",
"def app_id\n @app.id\n end",
"def template_id_for_test\n if not_tested_yet_template_ids.any?\n # templates were never checked in the past. Order is not important.\n not_tested_yet_template_ids.first\n elsif recent_template_tests.any?\n # all templates to be scheduled were tested in the past\n # return farthest tested in time template_id\n farthest_tested_template_id\n end\n end",
"def application_id=(value)\n @application_id = value\n end",
"def get_template\n if self.template\n return self.template\n end\n Template.find_by(default: true)\n end",
"def get_id(data)\n templateid = nil\n get_full_data(data).each { |template| templateid = template['templateid'].to_i if template['host'] == data[:host] }\n templateid\n end",
"def application_id\n @application_id || YodleeApi.application_id\n end",
"def result_template_id=(value)\n @result_template_id = value\n end",
"def role_template_id=(value)\n @role_template_id = value\n end",
"def db_template_id\n # get template ID from database to check path\n Chef::Log.debug 'Retrieve template ID from database'\n template_id = shell_out!(\"mysql -h #{new_resource.db_host} --user=#{new_resource.db_user} --password=#{new_resource.db_password} --skip-column-names -U cloud -e 'select max(id) from cloud.vm_template where type = \\\"SYSTEM\\\" and hypervisor_type = \\\"#{new_resource.hypervisor}\\\" and removed is null'\")\n Chef::Log.debug \"template id = #{template_id.stdout.chomp}\"\n template_id.stdout.chomp\n end",
"def created_by_app_id\n return @created_by_app_id\n end",
"def application_id\n get_key('ALGOLIA_APPLICATION_ID', 'application_id')\n end",
"def query_template\n return @query_template\n end",
"def get(template_id)\n id = connection.rname_to_id(template_id, :template)\n all.select { |template| template.id == String(id) }.first\n end",
"def template(template = nil)\n $template ||= template\n $template || '{{id}} {{name}}'\n end",
"def notification_template_type\n return @notification_template_type\n end",
"def template\n @template || nil\n end",
"def get_template(template)\n xapi.VM.get_by_name_label(template).first\n end",
"def get_template(template)\n xapi.VM.get_by_name_label(template).first\n end",
"def get_template\n @template\n end",
"def get_template\n # Filters the name of the current theme.\n apply_filters('template', get_option('template'))\n end",
"def rights_management_services_template_id\n return @rights_management_services_template_id\n end",
"def app_item_id\n read('app_item_id')\n end",
"def get_vapp_template(vAppId)\n params = {\n 'method' => :get,\n 'command' => \"/vAppTemplate/vappTemplate-#{vAppId}\"\n }\n\n response, headers = send_request(params)\n\n vapp_node = response.css('VAppTemplate').first\n if vapp_node\n name = vapp_node['name']\n status = convert_vapp_status(vapp_node['status'])\n end\n\n description = response.css(\"Description\").first\n description = description.text unless description.nil?\n\n ip = response.css('IpAddress').first\n ip = ip.text unless ip.nil?\n\n vms = response.css('Children Vm')\n vms_hash = {}\n\n vms.each do |vm|\n vms_hash[vm['name']] = {\n :id => vm['href'].gsub(/.*\\/vAppTemplate\\/vm\\-/, \"\")\n }\n end\n\n { :name => name, :description => description, :vms_hash => vms_hash }\n end",
"def template_tag\n if @tag\n @tag\n else\n TEMPLATE_TAG\n end\n end",
"def template_owner\n\t\tself.dmptemplate.try(:organisation).try(:abbreviation)\n\tend",
"def vcloud_attributes\n Vcloud::Core::Fog::ServiceInterface.new.get_vapp_template(id)\n end",
"def template_cache_key\n context[:template_cache_key]\n end",
"def app_scope_id\n return @app_scope_id\n end",
"def current_application\n @current_application ||= Application.find(params[:application_id]) if params[:application_id]\n end",
"def app_item_id\n read_integer('app_item_id')\n end",
"def app_id\n @values.fetch('appId') { \n @values['appId'] = nil\n }\n end",
"def template_path\n @options[:template_path]\n end",
"def get_or_create(data)\n unless (templateid = get_id(:host => data[:host]))\n templateid = create(data)\n end\n templateid\n end",
"def template\n Kernel.const_get(template_name.upcase << '_TEMPLATE')\n end",
"def _template\n @template\n end",
"def template_id=(template_id)\n pattern = Regexp.new(/^tmpl_[a-zA-Z0-9]+$/)\n if !template_id.nil? && template_id !~ pattern\n fail ArgumentError, \"invalid value for \\\"template_id\\\", must conform to the pattern #{pattern}.\"\n end\n\n @template_id = template_id\n end",
"def resource_app_id=(value)\n @resource_app_id = value\n end",
"def fetch_template_id\n finance_transaction_receipt_record.fee_receipt_template_id\n end",
"def get_vapp_template(vAppId)\n params = {\n 'method' => :get,\n 'command' => \"/vAppTemplate/vappTemplate-#{vAppId}\"\n }\n\n response, headers = send_request(params)\n\n vapp_node = response.css('VAppTemplate').first\n if vapp_node\n name = vapp_node['name']\n status = convert_vapp_status(vapp_node['status'])\n end\n\n description = response.css(\"Description\").first\n description = description.text unless description.nil?\n\n ip = response.css('IpAddress').first\n ip = ip.text unless ip.nil?\n\n vms = response.css('Children Vm')\n vms_hash = {}\n\n vms.each do |vm|\n vms_hash[vm['name']] = {\n :id => vm['href'].gsub(\"#{@api_url}/vAppTemplate/vm-\", '')\n }\n end\n\n # TODO: EXPAND INFO FROM RESPONSE\n { :name => name, :description => description, :vms_hash => vms_hash }\n end",
"def app_id\n self.class.send :class_variable_get, :@@app_id\n end",
"def query_template=(value)\n @query_template = value\n end",
"def template\n @template\n end",
"def template\n return nil unless is_template_profile\n\n @template ||= ProvisioningProfileTemplate.factory(profile_details['template'])\n end",
"def inline_template?\r\n if template_id.blank? || template_id.zero?\r\n return true\r\n else\r\n return false\r\n end\r\n end",
"def template\n @__template\n end",
"def template_name\n command.text_value\n end",
"def full_template_path_from_application(template_path, extension)\n if Engines.disable_application_view_loading\n nil\n else\n full_template_path_without_engine_additions(template_path, extension)\n end \n end",
"def application_version\n return @application_version\n end",
"def application_version\n return @application_version\n end",
"def funder_id\n\t\tif self.dmptemplate.nil? then\n\t\t\treturn nil\n\t\tend\n\t\ttemplate_org = self.dmptemplate.organisation\n\t\tif template_org.organisation_type.name == constant(\"organisation_types.funder\").downcase\n\t\t\treturn template_org.id\n\t\telse\n\t\t\treturn nil\n\t\tend\n\tend",
"def template_parameters\n return @template_parameters\n end",
"def app_user_model_id\n return @app_user_model_id\n end",
"def template\n possible_templates.find {|t| File.exists? \"#{t}.html\"}\n end",
"def template\n return @template\n end",
"def details\n response = get \"/templates/#{template_id}.json\", {}\n Hashie::Mash.new(response)\n end",
"def find_template_by_language(language_code=Utility.language_code)\n find(:first, :conditions => [\"kases.template = ? AND kases.language_code = ?\", true, language_code])\n end",
"def application_id=(value)\n @children['application-id'][:value] = value\n end",
"def pick_template_for_etag(options); end",
"def app_id=(value)\n @app_id = value\n end",
"def app_id=(value)\n @app_id = value\n end",
"def app_id=(value)\n @app_id = value\n end",
"def application_templates()\n return MicrosoftGraph::ApplicationTemplates::ApplicationTemplatesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def template\n if object.respond_to?(:template)\n object.template\n else\n @template\n end\n end",
"def get id\n apps.select do |app|\n app.id == id\n end.first\n end",
"def resource_application\n return @resource_application\n end",
"def comm_template_name\n @@tenant_info[\"comm_template_name\"]\n end",
"def app_id\n object.send(:try, Innsights.group_id)\n end",
"def filter_input_id\n \"#{self.form.object_name}_#{self.filter_field}\"\n end",
"def application_name\n return @application_name\n end",
"def resource_owner_id_for(resource_owner)\n if resource_owner.respond_to?(:to_key)\n resource_owner.id\n else\n resource_owner\n end\n end",
"def cloud_service_deployment_id\n return @cloud_service_deployment_id\n end",
"def consul_template_name\n @consul_template_name ||= 'consul-template'\n end",
"def id\n @customFieldId\n end",
"def front_template_id=(front_template_id)\n pattern = Regexp.new(/^tmpl_[a-zA-Z0-9]+$/)\n if !front_template_id.nil? && front_template_id !~ pattern\n fail ArgumentError, \"invalid value for \\\"front_template_id\\\", must conform to the pattern #{pattern}.\"\n end\n\n @front_template_id = front_template_id\n end",
"def parent_template\n transport[wsdl].get(:get_parent_template, { template_names: self.name})\n end",
"def details\n response = CreateSend.get \"/templates/#{template_id}.json\", {}\n Hashie::Mash.new(response)\n end",
"def get_template(template); end",
"def client_application_tenant_ids\n return @client_application_tenant_ids\n end",
"def typus_template(attribute)\n template = Typus::Configuration.config[self.name]['fields']['options']['templates'][attribute] rescue nil\n return template\n end",
"def get_parent_id()\r\n result = nil\r\n if @coll_id #if coll_id is false, than collection_service is used by environment so no parent\r\n info = Transformer::KeyBuilder.collection_info(@env_id, @coll_id)\r\n result = @db_interface.get_hash_value(info, Transformer::KeyBuilder::PARENT_ID_KEY)\r\n end\r\n return result\r\n end",
"def current_application\n fail 'Application ID is missing' unless params.key?(:application_id)\n applications = current_user.applications\n applications.where(id: params[:application_id]).first\n end",
"def setting_template_key\n if journal_task_type\n \"TaskTemplate:#{journal_task_type.kind}\"\n else\n \"TaskTemplate:#{card.name}\"\n end\n end",
"def running_template\n @running_template\n end",
"def identity_resource_identifier\n return @identity_resource_identifier\n end",
"def to_identifier\n \"#{self.document_template.identifier}::#{self.identifier}\"\n end"
] | [
"0.6729138",
"0.62147593",
"0.62147593",
"0.57780635",
"0.57224137",
"0.5578986",
"0.5578986",
"0.5509487",
"0.54491895",
"0.5160007",
"0.51029176",
"0.5097915",
"0.5042253",
"0.5042253",
"0.5042253",
"0.50271845",
"0.49738213",
"0.4952089",
"0.4931194",
"0.49260065",
"0.49216244",
"0.49036518",
"0.48889923",
"0.48671353",
"0.48300344",
"0.48227987",
"0.47687328",
"0.47668982",
"0.47240427",
"0.4674201",
"0.46458402",
"0.4629719",
"0.4629719",
"0.46148118",
"0.4612084",
"0.46108812",
"0.46083286",
"0.46080026",
"0.46057683",
"0.4563697",
"0.45529354",
"0.45515534",
"0.45214063",
"0.45179218",
"0.45150533",
"0.44997174",
"0.44994974",
"0.44866315",
"0.4475114",
"0.44582865",
"0.44493777",
"0.44420537",
"0.44119263",
"0.44105703",
"0.4393947",
"0.43908417",
"0.43886364",
"0.43707818",
"0.43698925",
"0.43619156",
"0.43556243",
"0.4331609",
"0.43158752",
"0.43158752",
"0.43151337",
"0.43006045",
"0.4289129",
"0.4279507",
"0.42730594",
"0.42717007",
"0.42703074",
"0.4265812",
"0.42468143",
"0.42451867",
"0.42451867",
"0.42451867",
"0.4241538",
"0.4233289",
"0.42223126",
"0.42162734",
"0.41929594",
"0.41815588",
"0.41814056",
"0.41800776",
"0.4166204",
"0.41557923",
"0.41465604",
"0.41395748",
"0.41341394",
"0.41338018",
"0.41335028",
"0.413246",
"0.4130921",
"0.41298166",
"0.41233146",
"0.41111818",
"0.41078192",
"0.41019785",
"0.4099172",
"0.40974638"
] | 0.73273575 | 0 |
Sets the applicationTemplateId property value. Unique identifier of the applicationTemplate. Supports $filter (eq, not, ne). | def application_template_id=(value)
@application_template_id = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def templateId=(value)\n\t\t\t@templateId = value\n\t\tend",
"def application_template_id\n return @application_template_id\n end",
"def template_id=(value)\n @template_id = value\n end",
"def template_id=(value)\n @template_id = value\n end",
"def application_id=(value)\n @application_id = value\n end",
"def template_id=(template_id)\n pattern = Regexp.new(/^tmpl_[a-zA-Z0-9]+$/)\n if !template_id.nil? && template_id !~ pattern\n fail ArgumentError, \"invalid value for \\\"template_id\\\", must conform to the pattern #{pattern}.\"\n end\n\n @template_id = template_id\n end",
"def role_template_id=(value)\n @role_template_id = value\n end",
"def set_template\n @template = Template.find(params[:id])\n end",
"def result_template_id=(value)\n @result_template_id = value\n end",
"def set_template\n @template = ::Template.find(params[:id])\n end",
"def front_template_id=(front_template_id)\n pattern = Regexp.new(/^tmpl_[a-zA-Z0-9]+$/)\n if !front_template_id.nil? && front_template_id !~ pattern\n fail ArgumentError, \"invalid value for \\\"front_template_id\\\", must conform to the pattern #{pattern}.\"\n end\n\n @front_template_id = front_template_id\n end",
"def set_template\n @template = EmailTemplate.find(params[:id])\n end",
"def set_email_template\n @email_template = @current_site.email_templates.find(params[:id])\n @program = @email_template.program\n end",
"def set_template\n @template = Template.find(params[:id])\n end",
"def set_template\n @template = Template.find(params[:id])\n end",
"def set_template\n @template = Template.find(params[:id])\n end",
"def set_template\n @template = Template.find(params[:id])\n end",
"def set_template\n @template = Template.find(params[:id])\n end",
"def set_template\n @template = Template.find(params[:id])\n end",
"def set_template\n @template = Template.find(params[:id])\n end",
"def set_template\n @template = Template.find(params[:id])\n end",
"def set_configuration_template\n @configuration_template = ConfigurationTemplate.find(params[:id])\n end",
"def set_item_template\n @item_template = ItemTemplate.find(params[:id])\n end",
"def set_product_template\n @product_template = ProductTemplate.find(params[:id])\n end",
"def set_etemplate\n @template = Etemplate.find(params[:id])\n end",
"def set_email_template\n @email_template = EmailTemplate.find(params[:id])\n end",
"def set_request_template\n @request_template = RequestTemplate.find(params[:id])\n end",
"def resource_app_id=(value)\n @resource_app_id = value\n end",
"def set_event_template\n @event_template = EventTemplate.find(params[:id])\n end",
"def query_template=(value)\n @query_template = value\n end",
"def template_id\n return @template_id\n end",
"def template_id\n return @template_id\n end",
"def set_template\n tid = Integer(params[:id]) rescue nil\n if tid\n @template = Template.find_by_id(tid)\n else\n @template = Template.find_by_name(params[:id])\n end\n respond_err \"template\", @templates, \"i18> Template #{params[:id]} not found\" unless @template\n end",
"def set_collection_template\n @collection_template = CollectionTemplate.find(\n params[:collection_template_id]\n )\n end",
"def set_emailtemplate\n @emailtemplate = Spree::EmailTemplate.find(params[:id])\n end",
"def set_project_application\n @project_application = ProjectApplication.find(params[:id])\n end",
"def set_question_template\n @question_template = QuestionTemplate.find(params[:id])\n end",
"def set_question_template\n @question_template = QuestionTemplate.find(params[:id])\n end",
"def set_question_template\n @question_template = QuestionTemplate.find(params[:id])\n end",
"def set_custom_pet_template\n @custom_pet_template = CustomPetTemplate.find(params[:id])\n end",
"def set_cf_template\n @cf_template = CfTemplate.find(params.require(:id))\n end",
"def set_item_template\n @item_template = ItemTemplate.find(params[:id])\n end",
"def set_timetable_template\n @timetable_template = TimetableTemplate.find(params[:id])\n end",
"def application_id=(value)\n @children['application-id'][:value] = value\n end",
"def set_template\n @template = Spree::Template.find(params[:id])\n # puts \"ddsfsfsdfsdf\",@template.inspect\n # puts \"ddsfsfsdfsdf\",@template.inspect\n # put\n end",
"def set_template_library\n @template_library = TemplateLibrary.find(params[:id])\n end",
"def set_template\n Settings.reload!\n @template = Template.find(params[:id])\n end",
"def app_id=(value)\n @app_id = value\n end",
"def app_id=(value)\n @app_id = value\n end",
"def app_id=(value)\n @app_id = value\n end",
"def set_page_template\n @page_template = ::PageTemplate.find(params[:id])\n end",
"def set_book_template\n @book_template = BookTemplate.find(params[:id])\n end",
"def attachment_template_id=(attachment_template_id)\n pattern = Regexp.new(/^tmpl_[a-zA-Z0-9]+$/)\n if !attachment_template_id.nil? && attachment_template_id !~ pattern\n fail ArgumentError, \"invalid value for \\\"attachment_template_id\\\", must conform to the pattern #{pattern}.\"\n end\n\n @attachment_template_id = attachment_template_id\n end",
"def set_template_photo\n @template_photo = TemplatePhoto.find(params[:id])\n end",
"def set_form_template\n @form_template = FormTemplate.find(params[:id])\n end",
"def set_template_parameter\n @template_parameter = TemplateParameter.find(params[:id])\n end",
"def set_invitation_template\n @invitation_template = InvitationTemplate.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_my_template\n @my_template = MyTemplate.find(params[:id])\n end",
"def set_application\n @application = current_user.applications.find(params[:id])\n end",
"def set_application_type\n @application_type = ApplicationType.find(params[:id])\n end",
"def set_script_template\n @script_template = ScriptTemplate.find(params[:id])\n end",
"def template(value = nil)\n if value\n @template = value\n options[:template] = @template\n end\n @template ||= nil\n end",
"def set_application\n @application = @application_scope.find(params[:id])\n @current_application = @application\n end",
"def set_application\n @application = applications_scope.find(params[:id])\n end",
"def set_userapplication\n @userapplication = Userapplication.find(params[:id])\n end",
"def set_issue_template\n @issue_template = IssueTemplate.find(params[:id])\n end",
"def set_application\n @application = CollaborationApplication.find(params[:id])\n end",
"def set_rcadmin_email_template\n @rcadmin_email_template = Rcadmin::EmailTemplate.find(params[:id])\n end",
"def set_template_field\n @template_field = TemplateField.find(params[:id])\n end",
"def template(value)\n @template = value\n end",
"def set_review_template\n @review_template = ReviewTemplate.find(params[:id])\n end",
"def set_user_application\n @user_application = UserApplication.find(params[:id])\n end",
"def set_template\n @template = Template.find(params[:id])\n\n rescue ActiveRecord::RecordNotFound\n head 404\n end",
"def set_task_application\n @task_application = TaskApplication.find(params[:id])\n end",
"def rights_management_services_template_id=(value)\n @rights_management_services_template_id = value\n end",
"def set_template\n @template = PrintTemplate.find(params[:id])\n end",
"def set_template_question\n @template_question = TemplateQuestion.find(params[:id])\n end",
"def app_identifier=(value)\n @app_identifier = value\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_application\n @application = Application.find(params[:id])\n end",
"def set_doc_template\n @doc_template = DocTemplate.find(params[:id])\n end",
"def set_lcb_template\n @lcb_template = LcbTemplate.find(params[:id])\n end",
"def template(template = nil)\n $template ||= template\n $template || '{{id}} {{name}}'\n end"
] | [
"0.63211703",
"0.61238605",
"0.6076405",
"0.6076405",
"0.53942096",
"0.5381099",
"0.52713424",
"0.51717234",
"0.5142894",
"0.5133022",
"0.51066977",
"0.50974953",
"0.5090223",
"0.5073122",
"0.5073122",
"0.5073122",
"0.5073122",
"0.5073122",
"0.5073122",
"0.5073122",
"0.5073122",
"0.4994132",
"0.49851072",
"0.4983052",
"0.4952274",
"0.49443325",
"0.49348515",
"0.49153262",
"0.49003097",
"0.48948774",
"0.48816612",
"0.48816612",
"0.487805",
"0.48477113",
"0.48289493",
"0.48005405",
"0.479669",
"0.479669",
"0.479669",
"0.4779252",
"0.47593838",
"0.47482526",
"0.47402674",
"0.47206408",
"0.46991116",
"0.4698537",
"0.46959516",
"0.46951315",
"0.46951315",
"0.46951315",
"0.46860656",
"0.46848753",
"0.46783966",
"0.4665826",
"0.46618626",
"0.46363896",
"0.46329126",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46245626",
"0.46172735",
"0.46160594",
"0.46147177",
"0.46132094",
"0.4611459",
"0.46062505",
"0.46016645",
"0.4595589",
"0.459493",
"0.4587457",
"0.45849484",
"0.454978",
"0.4548385",
"0.45363906",
"0.4529152",
"0.4525422",
"0.45210308",
"0.4517538",
"0.45150784",
"0.45126832",
"0.4496015",
"0.44866645",
"0.44866645",
"0.44866645",
"0.44866645",
"0.44668326",
"0.44617322",
"0.44569093"
] | 0.7275349 | 0 |
Gets the certification property value. Specifies the certification status of the application. | def certification
return @certification
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def certification=(value)\n @certification = value\n end",
"def certification_name\n return @certification_name\n end",
"def cert\n @cert\n end",
"def certificate\n return @certificate\n end",
"def ssl_cert\n datastore['SSLCert']\n end",
"def cert\n @agent.certificate\n end",
"def certificate\n _get_certificate\n end",
"def get_cert_details()\n $log.debug(\"Returning certificate details\")\n self.use_ssl = true\n disable_validations\n begin\n self.start do |x|\n return ResultContainer.new(true, x.peer_cert)\n end\n rescue => ex\n return ResultContainer.new(false, ex)\n end\n end",
"def certificate_details\n data[:certificate_details]\n end",
"def ssl_cert\n self.config.ssl_cert\n end",
"def cert?\n true\n end",
"def get_cert\n cert_str = \"\"\n \n File.open(@cert_file_path, \"r\") do |f|\n cert_str = f.read\n end\n\n return cert_str\n end",
"def certified?\n @data['certifiedDev']\n end",
"def cert; end",
"def cert; end",
"def cert; end",
"def certificate_get\n return @cert unless @cert.nil?\n cert_path = File.join(resource[:cert_dir], resource[:cert_name])\n @cert = if Pathname.new(cert_path).exist?\n file = File.read(cert_path)\n OpenSSL::X509::Certificate.new(file)\n else\n false\n end\n end",
"def get_cert_path\n if !has_cert?\n return nil\n end\n\n return @cert_file_path\n end",
"def cert\n digidoc_cert if @cert.nil?\n @cert\n end",
"def certificate_data\n return @certificate_data\n end",
"def cert_content; end",
"def cert?\n false\n end",
"def cert\n @cert ||= (OpenSSL::X509::Certificate.new File.read(cert_file) if cert_file)\n end",
"def to_x509()\n @cert\n end",
"def cert_type\n @cert_type ||= :pem\n end",
"def own_signing_certificate\n application_response = extract_application_response(OP_PKI)\n at = 'xmlns|Certificate > xmlns|Certificate'\n node = Nokogiri::XML(application_response).at(at, xmlns: OP_XML_DATA)\n\n return unless node\n\n cert_value = process_cert_value node.content\n cert = x509_certificate cert_value\n cert.to_s\n end",
"def certificate; end",
"def certificate; end",
"def cert_path; end",
"def cert_path; end",
"def certificate_signing_request\n return @certificate_signing_request\n end",
"def encryption_certificate\n return @encryption_certificate\n end",
"def certificate\n GeoCerts::Certificate.find_by_order_id(self.id)\n end",
"def ssl_certificate\n @ssl_certificate ||= OpenSSL::X509::Certificate.new <<-CERT\n-----BEGIN CERTIFICATE-----\nMIIBQjCB7aADAgECAgEAMA0GCSqGSIb3DQEBBQUAMCoxDzANBgNVBAMMBm5vYm9k\neTEXMBUGCgmSJomT8ixkARkWB2V4YW1wbGUwIBcNMTExMTAzMjEwODU5WhgPOTk5\nOTEyMzExMjU5NTlaMCoxDzANBgNVBAMMBm5vYm9keTEXMBUGCgmSJomT8ixkARkW\nB2V4YW1wbGUwWjANBgkqhkiG9w0BAQEFAANJADBGAkEA8pmEfmP0Ibir91x6pbts\n4JmmsVZd3xvD5p347EFvBCbhBW1nv1GsbCBEFlSiT1q2qvxGb5IlbrfdhdgyqdTX\nUQIBATANBgkqhkiG9w0BAQUFAANBAAAB////////////////////////////////\n//8AMCEwCQYFKw4DAhoFAAQUePiv+QrJxyjtEJNnH5pB9OTWIqA=\n-----END CERTIFICATE-----\n CERT\n end",
"def cert_pem; end",
"def certificate # :nodoc:\n @agent.certificate\n end",
"def data_recovery_certificate\n return @data_recovery_certificate\n end",
"def certificate_subject\n attributes[:certificate_subject]\n end",
"def cert_store\n @agent.cert_store\n end",
"def certification_name=(value)\n @certification_name = value\n end",
"def ps_cert_location\n new_resource.user_store ? \"CurrentUser\" : \"LocalMachine\"\n end",
"def director_certificate\n @game.initial_offering.certificates_for(@company).find(&:director?)\n end",
"def get(certificate_thumbprint)\n cert_get(certificate_thumbprint)\n end",
"def to_pem\n if @cert.kind_of?(OpenSSL::X509::Certificate)\n return @cert.to_pem.chomp\n end\n end",
"def ca_cert_string\n @ca_cert_string ||= begin\n vcap_services[vcap_services.keys.first].first['credentials']['cacrt']\n end\n end",
"def certificate\n return @cert unless @cert.nil?\n\n # Verify that the given directory exists\n unless File.directory?(resource[:cert_dir])\n raise ArgumentError, \"Directory not found for: #{resource[:cert_dir]}\"\n end\n\n cert_path = File.join(resource[:cert_dir], resource[:cert_name])\n @cert = if Pathname.new(cert_path).exist?\n file = File.read(cert_path)\n OpenSSL::X509::Certificate.new(file)\n else\n false\n end\n end",
"def certificate_list\n return @certificate_list\n end",
"def certificate_for\n @certificate_for || :default\n end",
"def certificate_to_use\n certificates = Spaceship.certificate.development.all\n\n if certificates.count == 0\n Utils.error_msg \"Could not find a matching code signing identity for #{profile_type}. Please contact support ([email protected])\"\n end\n\n return certificates # development profiles support multiple certificates\n end",
"def certificate_value(h)\n v = credential_authentication_inverso_issuer(h)\n h[:k] == \"seal\" && valid_keys.include?(\"certificate\") ? \"#{v} #{join_seal(h[:ver])}\" : v\n end",
"def manufacturer_cert\r\n Tem::CA.ca_cert\r\n end",
"def certificate_path\n\t\t\tFile.join(@root, \"#{@hostname}.crt\")\n\t\tend",
"def get!(certificate_thumbprint)\n cert_pem = cert_get(certificate_thumbprint)\n\n raise ArgumentError, \"Unable to retrieve the certificate\" if cert_pem.empty? || cert_pem == \"Certificate Not Found\"\n\n cert_pem\n end",
"def certificate_subject\n return \"CN=#{project.package_name}\" unless signing_identity\n\n store = machine_store? ? \"LocalMachine\" : \"CurrentUser\"\n cmd = [].tap do |arr|\n arr << \"powershell.exe\"\n arr << \"-ExecutionPolicy Bypass\"\n arr << \"-NoProfile\"\n arr << \"-Command (Get-Item Cert:/#{store}/#{cert_store_name}/#{thumbprint}).Subject\"\n end.join(\" \")\n\n shellout!(cmd).stdout.strip\n end",
"def certificate(name)\n json = client.get(\"/v1/auth/cert/certs/#{encode_path(name)}\")\n return Secret.decode(json)\n rescue HTTPError => e\n return nil if e.code == 404\n raise\n end",
"def cert_store; end",
"def cert_store; end",
"def certificate\n Base64.strict_encode64(parsed_certificate.to_der)\n end",
"def certificate=(value)\n @certificate = value\n end",
"def serial\n @cert.serial\n end",
"def ssl_cert\n OpenSSL::X509::Certificate.new(File.read(self.class.ssl_cert_path))\n rescue => e\n # :nocov:\n unless allow_missing_certs?\n Rails.logger.warn \"Could not load #{service_name} SSL cert: #{e.message}\"\n raise e if Rails.env.production?\n end\n nil\n # :nocov:\n end",
"def certificate_verification_state\n super\n end",
"def certificate_body\n data.certificate_body\n end",
"def certificate_body\n data.certificate_body\n end",
"def x509_certificate_string\n t=self.metadata_nokogiri.clone\n t.remove_namespaces!\n the_xpath = \"//KeyDescriptor/KeyInfo/X509Data/X509Certificate\"\n node = t.xpath(the_xpath)\n if node.blank?\n raise \"Could not extract X509Certificate from #{site.name}\"\n else\n node.inner_text\n end\n end",
"def certified?\n @data['certifiedBot']\n end",
"def certification_controls\n return @certification_controls\n end",
"def certificate_verification?\n [email protected][:ssl_cert_file].nil?\n end",
"def cert_key\n @cert_key ||= (OpenSSL::PKey.read(File.read(cert_key_file), cert_key_password) if cert_key_file)\n end",
"def valify_cert_status\n return self unless idinfo_crawled # if the idinfo -cert was not crawld\n if cert\n blank_size = cert.attributes.keys.inject(0) do |sum, item|\n cert[item].present? ? sum : (sum + 1)\n end\n company_crawled_status = blank_size >= 3 ? :warning : :success #found some good or bad cert info\n else\n company_crawled_status = :important # can not found any cert\n end\n update_blank_attributes_from_cert\n update_attributes({idinfo_status: company_crawled_status})\n end",
"def ca_certificate_identifier\n data[:ca_certificate_identifier]\n end",
"def cert_params\n params[:cert]\n end",
"def certificate\n certificate_value = document.at_xpath('//wse:Security/wse:BinarySecurityToken', namespaces).text.strip\n OpenSSL::X509::Certificate.new Base64.decode64(certificate_value)\n end",
"def certificate\n certificate_value = document.at_xpath('//wse:Security/wse:BinarySecurityToken', namespaces).text.strip\n OpenSSL::X509::Certificate.new Base64.decode64(certificate_value)\n end",
"def ssl\n datastore['SSL']\n end",
"def certificates\n currently_owned(Transaction::IS_CERTIFICATE)\n end",
"def serial\n @cert.serial.to_i\n end",
"def serial\n @cert.serial.to_i\n end",
"def ca_certificate_identifier\n @dbi.ca_certificate_identifier\n end",
"def ca_certificate_identifier\n @dbi.ca_certificate_identifier\n end",
"def to_json_value\n @cert.to_pem.gsub(/\\n/, \"\\\\n\")\n end",
"def x509\n @x509 ||= OpenSSL::X509::Certificate.new(as_pem)\n end",
"def cert=(cert); end",
"def verify_certificates?\n @verify_certificates\n end",
"def endorsement_certificate\n @ecert\n end",
"def compliance_policy\n return @compliance_policy\n end",
"def management_certificate\n ENV['AZURE_MANAGEMENT_CERTIFICATE']\n end",
"def cert\n\t\t\t\t\twhere(:reference_name => \"cert\").select('DISTINCT value')\n\t\t\t\tend",
"def ca_file\n ENV['SSL_CERT_FILE']\n end",
"def encryption_certificate_id\n return @encryption_certificate_id\n end",
"def server_cert_verification_enabled?\n @enable_server_cert_verification\n end",
"def ca_cert\n \n end",
"def cert_file_path\n File.expand_path(File.join(control.newrelic_root, 'cert', 'cacert.pem'))\n end",
"def security_require_safety_net_attestation_certified_device\n return @security_require_safety_net_attestation_certified_device\n end",
"def certificates\n attestation_response.certificate_chain[0..-2]\n end",
"def certificate\n cert_value = @ar.at_css(\n 'xmlns|X509Certificate',\n 'xmlns' => 'http://www.w3.org/2000/09/xmldsig#'\n ).content.gsub(/\\s+/, \"\")\n\n cert = process_cert_value(cert_value)\n\n begin\n OpenSSL::X509::Certificate.new(cert)\n rescue => e\n fail OpenSSL::X509::CertificateError,\n \"The certificate embedded in the application response could not be \" \\\n \"processed. It's most likely corrupted. \" \\\n \"OpenSSL had this to say: #{e}.\"\n end\n end",
"def cert= cert\n @agent.certificate = cert\n end",
"def ca_cert_string\n @ca_cert_string ||= begin\n return nil if ENV['VCAP_SERVICES'].blank?\n\n JSON.parse(ENV['VCAP_SERVICES'])['a9s-elasticsearch'].first['credentials']['cacrt']\n end\n end",
"def encryption_certificate=(value)\n @encryption_certificate = value\n end",
"def ca_cert()\n\t\tENV['CA_FILE'] || \"TestCA.crt\" # The CA cert File\n end"
] | [
"0.72224176",
"0.7129964",
"0.7087404",
"0.6739307",
"0.67298985",
"0.6715603",
"0.66814595",
"0.65563494",
"0.6552165",
"0.6547586",
"0.64531416",
"0.6446269",
"0.6409467",
"0.63635373",
"0.63635373",
"0.63635373",
"0.635561",
"0.63490576",
"0.63102204",
"0.6303351",
"0.62652117",
"0.6223491",
"0.6216347",
"0.6209986",
"0.62082326",
"0.61864275",
"0.61163557",
"0.61163557",
"0.6095016",
"0.6095016",
"0.6092697",
"0.6085923",
"0.60724396",
"0.6064898",
"0.6059326",
"0.6004373",
"0.6003056",
"0.5994704",
"0.59855324",
"0.5983198",
"0.5957129",
"0.5951378",
"0.5945731",
"0.5924643",
"0.5924194",
"0.5910387",
"0.58919394",
"0.5888127",
"0.5881428",
"0.58757895",
"0.5875498",
"0.58730495",
"0.58350676",
"0.57809275",
"0.5760008",
"0.5740518",
"0.5740518",
"0.57300764",
"0.57187206",
"0.5717759",
"0.5695081",
"0.56804776",
"0.5676255",
"0.5676255",
"0.566095",
"0.56506306",
"0.5640871",
"0.5635408",
"0.56328243",
"0.5592675",
"0.55918866",
"0.5589324",
"0.55881536",
"0.55881536",
"0.55830145",
"0.5580901",
"0.5579238",
"0.5573827",
"0.5568376",
"0.5568376",
"0.55607206",
"0.55578256",
"0.5535392",
"0.5532151",
"0.5531461",
"0.5530481",
"0.55174506",
"0.5516532",
"0.5503297",
"0.5498617",
"0.5483206",
"0.5480914",
"0.5471475",
"0.5470523",
"0.54677194",
"0.54575324",
"0.5450479",
"0.54405844",
"0.54387385",
"0.5423674"
] | 0.7950307 | 0 |
Sets the certification property value. Specifies the certification status of the application. | def certification=(value)
@certification = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sslcert=(value)\n Curl.set_option(:sslcert, value_for(value, :string), handle)\n end",
"def certificate=(value)\n @certificate = value\n end",
"def cert=(cert); end",
"def cert= cert\n @agent.certificate = cert\n end",
"def ssl_cert=(cert)\n set_option(:sslcert, cert)\n end",
"def cert_store=(cert_store)\n @cert_store = cert_store\n change_notify\n end",
"def cert_store=(cert_store); end",
"def cert_store=(cert_store); end",
"def set_certification\n @certification = Certification.find(params[:id])\n end",
"def set_certification\n @certification = Certification.find(params[:id])\n end",
"def certification_name=(value)\n @certification_name = value\n end",
"def ssl_cert=(cert)\n set_option(OPTION_VALUES[:CURLOPT_SSLCERT], cert)\n end",
"def ssl_cert_type=(cert_type)\n raise \"Invalid ssl cert type : '#{cert_type}'...\" if cert_type and !%w(PEM DER p12).include?(cert_type)\n set_option(:sslcerttype, cert_type)\n end",
"def certificate=(certificate); end",
"def certificate_data=(value)\n @certificate_data = value\n end",
"def cert_type=(type)\n unless CERT_TYPES.include? type\n raise ArgumentError, \"Invalid SSL cert type #{type.inspect}\\n\" +\n \"Please specify one of #{CERT_TYPES.inspect}\"\n end\n\n @cert_type = type\n end",
"def cert_store= cert_store\n @agent.cert_store = cert_store\n end",
"def sslcerttype=(value)\n Curl.set_option(:sslcerttype, value_for(value, :string), handle)\n end",
"def setVerifySslCertificates(value)\n @fields['verify_ssl_certificates'] = value\n self\n end",
"def setVerifySslCertificates(value)\n @fields['verify_ssl_certificates'] = value\n self\n end",
"def encryption_certificate=(value)\n @encryption_certificate = value\n end",
"def ssl_cert_type=(cert_type)\n raise \"Invalid ssl cert type : '#{cert_type}'...\" if cert_type and !%w(PEM DER).include?(cert_type)\n set_option(OPTION_VALUES[:CURLOPT_SSLCERTTYPE], cert_type)\n end",
"def set_cert\n @cert = Cert.find(params[:id])\n end",
"def set_ssl_client_certificate(opts)\n opts = check_params(opts,[:certificates])\n super(opts)\n end",
"def certificate_list=(value)\n @certificate_list = value\n end",
"def certificate_signing_request=(value)\n @certificate_signing_request = value\n end",
"def enable_ssl_verification=(_value)\n self.properties = properties.except('enable_ssl_verification') # Remove unused key\n end",
"def data_recovery_certificate=(value)\n @data_recovery_certificate = value\n end",
"def cert; end",
"def cert; end",
"def cert; end",
"def certificate_verification_state\n super\n end",
"def certificates_block_untrusted_tls_certificates=(value)\n @certificates_block_untrusted_tls_certificates = value\n end",
"def cert_store=(cert_store)\n # This is object equality check, since OpenSSL::X509::Store doesn't overload ==\n if !@cacerts_loaded || (@cert_store != cert_store)\n @cacerts_loaded = true # avoid lazy override\n @cert_store = cert_store\n change_notify\n end\n end",
"def ssl_certificate\n @ssl_certificate ||= OpenSSL::X509::Certificate.new <<-CERT\n-----BEGIN CERTIFICATE-----\nMIIBQjCB7aADAgECAgEAMA0GCSqGSIb3DQEBBQUAMCoxDzANBgNVBAMMBm5vYm9k\neTEXMBUGCgmSJomT8ixkARkWB2V4YW1wbGUwIBcNMTExMTAzMjEwODU5WhgPOTk5\nOTEyMzExMjU5NTlaMCoxDzANBgNVBAMMBm5vYm9keTEXMBUGCgmSJomT8ixkARkW\nB2V4YW1wbGUwWjANBgkqhkiG9w0BAQEFAANJADBGAkEA8pmEfmP0Ibir91x6pbts\n4JmmsVZd3xvD5p347EFvBCbhBW1nv1GsbCBEFlSiT1q2qvxGb5IlbrfdhdgyqdTX\nUQIBATANBgkqhkiG9w0BAQUFAANBAAAB////////////////////////////////\n//8AMCEwCQYFKw4DAhoFAAQUePiv+QrJxyjtEJNnH5pB9OTWIqA=\n-----END CERTIFICATE-----\n CERT\n end",
"def set_certified\n @certified = Certified.find(params[:id])\n end",
"def certificate; end",
"def certificate; end",
"def cert_store; end",
"def cert_store; end",
"def security_require_safety_net_attestation_certified_device=(value)\n @security_require_safety_net_attestation_certified_device = value\n end",
"def set_certificate_file(opts)\n opts = check_params(opts,[:certs])\n super(opts)\n end",
"def set_cert_file(http)\n http.verify_mode = OpenSSL::SSL::VERIFY_PEER\n\n cert_file = File.join(@app_path, \"cacert.pem\")\n\n #If cert file is not found, create one.\n if not File.exist?(cert_file)\n make_ssl_cert_file(cert_file)\n end\n http.ca_file = cert_file\n http\n end",
"def ssl_cacert=(cacert)\n set_option(:cainfo, cacert)\n end",
"def update!(**args)\n @x509_certificate = args[:x509_certificate] if args.key?(:x509_certificate)\n end",
"def certification_controls=(value)\n @certification_controls = value\n end",
"def certification\n return @certification\n end",
"def set_certification_scheme\n @certification_scheme = CertificationScheme.find(params[:certification_scheme_id])\n end",
"def initialize\n @verify_certificates = true\n end",
"def cert\n @cert\n end",
"def ssl_cacert=(cacert)\n set_option(OPTION_VALUES[:CURLOPT_CAINFO], cacert)\n end",
"def set_cert(cert_str)\n #if !has_cert?\n File.open(@cert_file_path, \"w\") do |f|\n f.write(cert_str)\n end\n\n # Do some sanity checks on the certificate\n begin\n # Check the certificate\n if !check_cert then\n FileUtils.rm_f(@cert_file_path)\n raise ActivatorIdentityCertException.new(is_invalid = true, is_incorrect = true)\n end\n\n # Check if the certificate matches the CSR content.\n if !check_cert_key_match_csr_key then\n FileUtils.rm_f(@cert_file_path)\n raise ActivatorIdentityCertException.new(is_invalid = false, is_incorrect = true)\n end\n \n rescue Exception => ex\n # This makes sure we can restart if there is an unknown exception.\n FileUtils.rm_f(@cert_file_path)\n raise ex\n end\n\n #else\n # raise ActivatorIdentityException.new(\"object read-only\")\n #end\n end",
"def certificate_check_state\n super\n end",
"def set_certtest\n @certtest = Certtest.find(params[:id])\n end",
"def allow_additional_certificate_state\n super\n end",
"def update_sslcert # rubocop:disable AbcSize, MethodLength\n converge_by(\"Update Key/Cert #{new_resource}\") do\n Chef::Log.info \"Update #{new_resource}\"\n\n if new_resource.cert\n pem_crt = load_file_contents(new_resource.cert)\n load_balancer.client['Management.KeyCertificate'].certificate_import_from_pem(\n new_resource.mode,\n [new_resource.sslcert_name],\n [pem_crt],\n new_resource.override\n )\n end\n\n if new_resource.key\n pem_key = load_file_contents(new_resource.key)\n load_balancer.client['Management.KeyCertificate'].key_import_from_pem(\n new_resource.mode,\n [new_resource.sslcert_name],\n [pem_key],\n new_resource.override\n )\n end\n\n new_resource.updated_by_last_action(true)\n end\n end",
"def certificate=(cert_metadata)\n if cert_metadata\n attributes[:certificate_valid_from] = time_or_original(cert_metadata[\"valid_from\"])\n attributes[:certificate_expires_at] = time_or_original(cert_metadata[\"expires_at\"])\n attributes[:certificate_issuer] = cert_metadata[\"issuer\"]\n attributes[:certificate_subject] = cert_metadata[\"subject\"]\n attributes[:certificate_enable_ssl3] = cert_metadata[\"sslv3\"]\n else\n attributes[:certificate_valid_from] = nil\n attributes[:certificate_expires_at] = nil\n attributes[:certificate_issuer] = nil\n attributes[:certificate_subject] = nil\n attributes[:certificate_enable_ssl3] = nil\n end\n end",
"def cert_type\n @cert_type ||= :pem\n end",
"def apple=(options = {})\n if options.respond_to?(:keys)\n apple.cert = options[:cert] if options[:cert]\n apple.cert_pass = options[:cert_pass] if options[:cert_pass]\n apple.host = options[:host] if options[:host]\n apple.port = options[:port] if options[:port]\n end\n end",
"def valify_cert_status\n return self unless idinfo_crawled # if the idinfo -cert was not crawld\n if cert\n blank_size = cert.attributes.keys.inject(0) do |sum, item|\n cert[item].present? ? sum : (sum + 1)\n end\n company_crawled_status = blank_size >= 3 ? :warning : :success #found some good or bad cert info\n else\n company_crawled_status = :important # can not found any cert\n end\n update_blank_attributes_from_cert\n update_attributes({idinfo_status: company_crawled_status})\n end",
"def x509_certificate(value)\n OpenSSL::X509::Certificate.new value\n end",
"def cert?\n true\n end",
"def ca_cert_file=(value)\n raise TypeError, 'ca_cert_file must be a String or respond_to #to_s' unless value.is_a?(String) || value.respond_to?(:to_s)\n \n @ca_cert_file = value.to_s\n end",
"def update_key_cert\n converge_by(\"Update #{new_resource} cert key method\") do\n\t kid = new_resource.keyid\n\t cid = new_resource.certid\n caid = new_resource.cacertid if !new_resource.cacertid.nil?\n\t todel='-alt'\n\t if @current_resource.exists\n\t if !load_balancer.client['LocalLB.ProfileClientSSL'].get_key_file([\"/Common/#{new_resource.sslprofile_name}\"])[0].value.include?(\"#{new_resource.sslprofile_name}-alt\")\n\t\tkid = new_resource.sslprofile_name+'-alt.key'\n\t\tcid = new_resource.sslprofile_name+'-alt.crt'\n\t\tcaid = new_resource.sslprofile_name+'-alt.crt' if !new_resource.cacertid.nil?\n\t\ttodel = ''\n\t end\n\t end\n Chef::Log.info \"Update #{new_resource} cert key method with PASSPHRASE #{new_resource.passphrase}\"\n load_balancer.client['LocalLB.ProfileClientSSL'].set_key_certificate_file([new_resource.sslprofile_name], [{\"value\" => \"/Common/#{kid}\", \"default_flag\" => \"false\"}] , [{\"value\" => \"/Common/#{cid}\", \"default_flag\" => \"false\"}])\n load_balancer.client['LocalLB.ProfileClientSSL'].set_passphrase([\"/Common/#{new_resource.sslprofile_name}\"], [{\"value\" => \"#{new_resource.passphrase}\", \"default_flag\" => \"false\" }]) if !new_resource.passphrase.nil?\n load_balancer.client['LocalLB.ProfileClientSSL'].set_chain_file_v2([\"/Common/#{new_resource.sslprofile_name}\"], [{\"value\" => \"/Common/#{caid}\", \"default_flag\" => \"false\" }]) if !new_resource.cacertid.nil?\n\t \n\t ssl_d = load_balancer.ltm.ssls(\"MANAGEMENT_MODE_DEFAULT\").find { |p| p =~ /(^|\\/)#{new_resource.sslprofile_name}#{todel}$/ } \n\t if !ssl_d.nil?\n\t \tload_balancer.client['Management.KeyCertificate'].key_delete(\"MANAGEMENT_MODE_DEFAULT\", [\"/Common/#{new_resource.sslprofile_name}#{todel}\"])\n\t \tload_balancer.client['Management.KeyCertificate'].certificate_delete(\"MANAGEMENT_MODE_DEFAULT\", [\"/Common/#{new_resource.sslprofile_name}#{todel}\"])\n\t end\n current_resource.keyid(new_resource.keyid)\n current_resource.certid(new_resource.certid)\n current_resource.passphrase(new_resource.passphrase)\n current_resource.cacertid(new_resource.cacertid)\n\n new_resource.updated_by_last_action(true)\n end\n end",
"def trust_other_certificate_state\n super\n end",
"def set_certificate_authority\n @certificate_authority = CertificateAuthority.find(params[:id])\n @certificate_authority.collect_certificates\n end",
"def set_https_cert_file(app_path)\n # Fixes SSL Connection Error in Windows execution of Ruby\n # Based on fix described at: https://gist.github.com/fnichol/867550\n #Note: this has not been successfully tested, but left in for future reference.\n ENV['SSL_CERT_FILE'] = File.join(@app_path, \"cacert.pem\")\n end",
"def cert?\n false\n end",
"def set_load_balancer_listener_ssl_certificate(lb_name, load_balancer_port, ssl_certificate_id)\n request({\n 'Action' => 'SetLoadBalancerListenerSSLCertificate',\n 'LoadBalancerName' => lb_name,\n 'LoadBalancerPort' => load_balancer_port,\n 'SSLCertificateId' => ssl_certificate_id,\n :parser => Fog::Parsers::AWS::ELB::Empty.new\n })\n end",
"def cert_file\n write_file(\"request-#{domain}.crt\", cert.to_pem)\n end",
"def set_certificate\n @certificate = Certificate.find(params[:id])\n end",
"def set_certificate\n @certificate = Certificate.find(params[:id])\n end",
"def set_certificate\n @certificate = Certificate.find(params[:id])\n end",
"def cert_content; end",
"def set_certification_scheme\n @certification_scheme = CertificationScheme.find(params[:id])\n end",
"def set_certificate_verification_state(opts)\n opts = check_params(opts,[:states])\n super(opts)\n end",
"def set_certificate_entry(aliaz, certificate)\n\n end",
"def cert_pem; end",
"def load_trust_ca\n load_cacerts(@cert_store)\n change_notify\n end",
"def create_sslcert\n converge_by(\"Create Cert #{new_resource}\") do\n Chef::Log.info \"Create #{new_resource}\"\n\n update_sslcert\n\n new_resource.updated_by_last_action(true)\n end\n end",
"def set_certificateinfo\n @certificateinfo = Certificateinfo.find(params[:id])\n end",
"def ssl_cert\n datastore['SSLCert']\n end",
"def cert_path; end",
"def cert_path; end",
"def enable_ssl(verify = OpenSSL::SSL::VERIFY_PEER, certs = nil, \n port = SSL_PORT)\n @usessl = true\n @verify = verify\n @certs = certs\n @port = port\n end",
"def update\n respond_to do |format|\n if @certification.update(certification_params)\n format.html { redirect_to @certification, notice: 'Certification was successfully updated.' }\n format.json { render :show, status: :ok, location: @certification }\n else\n format.html { render :edit }\n format.json { render json: @certification.errors, status: :unprocessable_entity }\n end\n end\n end",
"def ssl=(value)\n conf['dashboard']['ssl'] = value\n end",
"def set_ssl_ca_certificate_file(opts)\n opts = check_params(opts,[:ca_cert_files])\n super(opts)\n end",
"def set_certification\n @certification = Certification.find(params[:id])\n rescue ActiveRecord::RecordNotFound\n render_404\n end",
"def certify!(certifier, is_eligible = false)\n return false unless self.locked? # gotta be locked (ie. someone's done work to certify us)\n# NCID staff determined it was best to disable these checks to allow people to recertify things\n# return false unless self.certified_at.nil? # can't already be certified\n# return false unless self.certifier_id == certifier.id # gotta be the currently active user\n\n return self.update_attributes!(:certified_at => Time.now, :certification => is_eligible, :locked => false)\n end",
"def configure(cert)\n req = signing_request\n cert.issuer = Billy.certificate_authority.cert.subject\n cert.not_before = days_ago(2)\n cert.not_after = days_from_now(2)\n cert.public_key = req.public_key\n cert.serial = serial\n cert.subject = req.subject\n cert.version = 2\n end",
"def set_certifying_body\n @certifying_body = CertifyingBody.find(params[:id])\n end",
"def set_course_certificate\n @course_certificate = CourseCertificate.find(params[:id])\n end",
"def set_server_cert_verification(enable)\n unless(enable.eql?(true) or enable.eql?(false))\n fail_response(13001, \"NaServer::set_server_cert_verification: invalid argument \" + enable + \"specified\");\n end\n unless https?\n return fail_response(13001, \"NaServer::set_server_cert_verification: server certificate verification can only be enabled or disabled for HTTPS transport\")\n end\n @enable_server_cert_verification = enable\n @enable_hostname_verification = enable\n end",
"def certification_name\n return @certification_name\n end",
"def ssl_verifypeer=(value)\n Curl.set_option(:ssl_verifypeer, value_for(value, :bool), handle)\n end",
"def update\n respond_to do |format|\n if @cert.update(cert_params)\n format.html { redirect_to @cert, notice: 'Cert was successfully updated.' }\n format.json { render :show, status: :ok, location: @cert }\n else\n format.html { render :edit }\n format.json { render json: @cert.errors, status: :unprocessable_entity }\n end\n end\n end",
"def cert\n @cert ||= (OpenSSL::X509::Certificate.new File.read(cert_file) if cert_file)\n end",
"def encryption_certificate_id=(value)\n @encryption_certificate_id = value\n end",
"def cert=(certificate)\n @cert = certificate\n # Try to guess a digest algorithm for signature creation\n case @cert.signature_algorithm\n when 'GOST R 34.11-94 with GOST R 34.10-2001'\n self.signature_digest_algorithm = :gostr3411\n self.signature_algorithm_id = 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411'\n # Add clauses for other types of keys that require other digest algorithms and identifiers\n else # most common 'sha1WithRSAEncryption' type included here\n set_default_signature_method! # Reset any changes as they can become malformed\n end\n end"
] | [
"0.69933856",
"0.6884979",
"0.6750741",
"0.6670446",
"0.6617093",
"0.66021734",
"0.64437145",
"0.64437145",
"0.6407611",
"0.6407611",
"0.63460416",
"0.6329392",
"0.63115513",
"0.62971216",
"0.62940925",
"0.6234547",
"0.6229105",
"0.6220889",
"0.61912817",
"0.61912817",
"0.6178227",
"0.61471164",
"0.61204803",
"0.60881925",
"0.60803264",
"0.6076502",
"0.6061697",
"0.5999812",
"0.59674025",
"0.59674025",
"0.59674025",
"0.5928998",
"0.59119344",
"0.59109885",
"0.5904947",
"0.58785856",
"0.5860614",
"0.5860614",
"0.58320504",
"0.58320504",
"0.5823837",
"0.5809999",
"0.5801052",
"0.5788293",
"0.57470894",
"0.5731352",
"0.573076",
"0.56912625",
"0.568794",
"0.56762177",
"0.56729937",
"0.5668994",
"0.566394",
"0.56604517",
"0.56534964",
"0.5649456",
"0.56299555",
"0.56231445",
"0.5610618",
"0.5590652",
"0.5586095",
"0.55683684",
"0.55550385",
"0.5529006",
"0.5517641",
"0.550622",
"0.54965234",
"0.5490865",
"0.5485938",
"0.54800487",
"0.5479555",
"0.5479555",
"0.5479555",
"0.54775786",
"0.54678243",
"0.54604006",
"0.54512703",
"0.54342604",
"0.54310703",
"0.5421903",
"0.5419996",
"0.5411812",
"0.54028946",
"0.54028946",
"0.5394266",
"0.5386099",
"0.5380582",
"0.5373256",
"0.53704476",
"0.5367372",
"0.5360305",
"0.5351741",
"0.53504413",
"0.5342811",
"0.53338325",
"0.5331843",
"0.5331728",
"0.5329375",
"0.532634",
"0.53208715"
] | 0.8044353 | 0 |
Instantiates a new application and sets the default values. | def initialize()
super
@odata_type = "#microsoft.graph.application"
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def new\n\t\t@application = Application.new\t\t\n\tend",
"def new(*args, &bk)\n setup_application!\n super(*args, &bk)\n end",
"def new\n puts \"Creating new blank Praxis app under #{app_name}\"\n create_root_files\n create_config\n create_app\n create_design\n create_spec\n create_docs\n end",
"def initialize(options = {}, &blk)\n options ||= {}\n options[:type] = :application\n init(options, &blk)\n end",
"def default(app)\n @default_app = app\n end",
"def initialize()\n props = project_properties\n \n @app_id = props[:id]\n @app_name = props[:name]\n @app_is_desktop = props[:desktop]\n end",
"def application!\n res = get!(APPLICATION_PATH)\n build_application(res)\n end",
"def initialize(options = {})\n @options = default_options.merge(options)\n @app = @options.delete(:app)\n end",
"def app\n TicTacToeAiNApp # most examples use App.new - reason why we don't need .new here? ?????\n end",
"def initialize(app); end",
"def initialize!(app); end",
"def initialize(app, config = T.unsafe(nil)); end",
"def default_application\n if @default_application\n @default_application\n elsif @applications && [email protected]?\n @default_application ||= @applications.first\n else\n @default_application ||= Hsquare::Application.new\n end\n end",
"def create_app()\n app = OpenShift::TestApplication.new(self)\n\n $logger.info(\"Created new application #{app.name} for account #{@name}\")\n\n @apps << app\n app\n end",
"def app\n TicTacToeNApp # most examples use App.new - reason why we don't need .new here? ?????\n end",
"def initialize(options = nil)\n @options = options\n @app = options[:app] if options && options[:app]\n end",
"def create(optional_params = {})\n response = Network.post(['Applications'], optional_params)\n Application.new(response)\n end",
"def initialize(application)\n @application = application\n end",
"def initialize(app, config_options = {})\n super(app)\n @config = Config.new(config_options)\n end",
"def initialize(window_or_handle)\n @main_window = case window_or_handle\n when Window\n window_or_handle\n when Integer\n Window.new window_or_handle\n else\n raise WinGui::Errors::InitError, \"Unable to create App from #{window_or_handle.inspect}\"\n end\n end",
"def initialize(application)\n @application = application\n end",
"def initialize(app_name)\n @app_name = app_name\n end",
"def app\n TestApp.new\n end",
"def application\n @env.fetch( :application, \"N/A\" )\n end",
"def app\n MyApp.new\nend",
"def generate\n @app = Class.new(Rails::Application) {\n config.eager_load = false\n config.session_store :cookie_store, key: \"_myapp_session\"\n config.active_support.deprecation = :log\n config.root = File.dirname(__FILE__)\n config.log_level = :info\n # Set a fake logger to avoid creating the log directory automatically\n fake_logger = Logger.new(nil)\n config.logger = fake_logger\n Rails.application.routes.default_url_options = {host: \"example.com\"}\n }\n @app.respond_to?(:secrets) && @app.secrets.secret_key_base = \"3b7cd727ee24e8444053437c36cc66c4\"\n\n yield @app if block_given?\n @app.initialize!\n end",
"def initialize(app = nil)\n @app = app\n end",
"def initialize\n @application = \"precidix\"\n super\n end",
"def app_with_name name\n AX::Application.new name\n end",
"def app\n defined?(@app) ? @app : build_app\n end",
"def initialize( app )\n\t\t@app = app\n\tend",
"def application\n Application.new self[:application]\n end",
"def initialize(app, opts = nil)\n @app = app\n @config = Marlowe::Config.override(opts)\n end",
"def create(*args)\n if !self.is_?(App)\n self.app_name = HesCentral.application_repository_name\n end\n super(*args)\n end",
"def app\n @app || make_app\nend",
"def initialize\n super(ApplicationController, {}, DEFAULTS.dup)\n end",
"def application(label = nil, &block)\n new_application = Hsquare::Application.new(label: label)\n\n @default_application ||= new_application\n applications.push(new_application) unless applications.include?(new_application)\n\n yield new_application\n end",
"def initialize(raw_app)\r\n @raw_app = raw_app\r\n end",
"def app_with_pid pid\n AX::Application.new pid\n end",
"def initialize_applications\n application_names = (settings['applications'] || '').split(',').flatten.compact.map(&:strip).uniq\n self.applications = []\n application_names.each do |app_name|\n app = Application.find(:name => app_name, :host_id => host.id)\n if app\n self.applications << app\n else\n app = Application.new(:name => app_name, :host_id => host.id)\n if app.save\n self.applications << app\n else\n warn(\"Could not create application '#{app_name}' for host #{host.name}\")\n end\n end\n end\n self.applications\n end",
"def app=(_arg0); end",
"def initialize\n @applications = []\n @current_config = Eye::Config.new\n\n Celluloid::logger = Eye::Logger.new('celluloid')\n Eye::SystemResources.setup\n\n info \"starting #{Eye::ABOUT} (#{$$})\"\n end",
"def new(name)\n ARGV.shift\n #@log.debug \"command 'new' with arguments: #{ARGV.join(', ')}\"\n Generator::Application.start ARGV\n end",
"def build_app(options = {})\n @prev_rails_env = ENV[\"RAILS_ENV\"]\n ENV[\"RAILS_ENV\"] = \"development\"\n ENV[\"SECRET_KEY_BASE\"] ||= SecureRandom.hex(16)\n\n FileUtils.rm_rf(app_path)\n FileUtils.cp_r(app_template_path, app_path)\n\n # Delete the initializers unless requested\n unless options[:initializers]\n Dir[\"#{app_path}/config/initializers/**/*.rb\"].each do |initializer|\n File.delete(initializer)\n end\n end\n\n add_to_config <<-RUBY\n config.eager_load = false\n config.session_store :cookie_store, key: \"_myapp_session\"\n config.active_support.deprecation = :log\n config.active_support.test_order = :random\n config.action_controller.allow_forgery_protection = false\n config.log_level = :info\n RUBY\n end",
"def setup_application\n error_msg = \"#{self.to_s}: you must override setup_application\"\n raise Backdat::Exceptions::Application, error_msg\n end",
"def generate\n @app = Class.new(Rails::Application) {\n config.eager_load = false\n config.session_store :cookie_store, key: \"_myapp_session\"\n config.active_support.deprecation = :log\n config.root = File.dirname(__FILE__)\n config.log_level = :info\n # Set a logger to avoid creating the log directory automatically\n config.logger = Logger.new(ENV[\"DEBUG\"] ? $stdout : nil)\n config.logger.level = Logger::DEBUG\n Rails.application.routes.default_url_options = {host: \"example.com\"}\n\n if Rails::VERSION::MAJOR >= 6\n Rails.application.config.hosts << \"www.example.com\"\n end\n\n # fix railties 5.2.0 issue with secret_key_base\n # https://github.com/rails/rails/commit/7419a4f9 should take care of it\n # in the future.\n if Rails::VERSION::MAJOR == 5\n if Rails::VERSION::MINOR >= 2\n def secret_key_base\n \"3b7cd727ee24e8444053437c36cc66c4\"\n end\n end\n end\n }\n @app.respond_to?(:secrets) && @app.secrets.secret_key_base = \"3b7cd727ee24e8444053437c36cc66c4\"\n\n yield @app if block_given?\n @app.initialize!\n end",
"def init(app_name=\"rum\", argv = ARGV)\n super \"rum\", argv\n end",
"def create_application\n unless self.has_current_application?\n Application.create_for_student self\n end\n end",
"def app(*args)\n\t\tif args == []\n\t\t\treturn MRA_App\n\t\telse\n\t\t\treturn MRA_App.by_name(*args)\n\t\tend\n\tend",
"def application=(value)\n @application = value\n end",
"def initialize\n @applications = []\n @current_config = Eye::Config.new\n\n Celluloid::logger = Eye::Logger.new('celluloid')\n Eye::SystemResources.cache\n\n info \"starting #{Eye::ABOUT} (#{$$})\"\n end",
"def create\n @application = Application.new()\n @application.name = params[:application][:name].to_s.downcase\n # true - доступ запрещен, false - разрешен\n @application.default = true\n respond_to do |format|\n if @application.save\n format.html { redirect_to applications_path, notice: 'Приложение создано.' }\n format.json { render json: @application, status: :created, location: @application }\n else\n format.html { render action: \"new\" }\n format.json { render json: @application.errors, status: :unprocessable_entity }\n end\n end\n end",
"def instance(name)\n apps[name] ||= new\n end",
"def instance(name)\n apps[name] ||= new\n end",
"def app\n Application.new\nend",
"def app\n app_class.new\n end",
"def initialize(app)\n @app = app\n end",
"def initialize(app)\n @app = app\n end",
"def initialize(app)\n @app = app\n end",
"def create_app app_name, dev_name, dev_email\n data[:app_name] = app_name\n data[:dev_name] = dev_name\n data[:dev_email] = dev_email\n end",
"def create_app_object(appname)\n app = OpenStruct.new\n appsettings = JSON.parse(File.read(appname))\n appsettings[\"appvariables\"].each { |k,v| app.public_send(\"#{k}=\", v) }\n injectfunctions($defaultshortcuts[\"tabshash\"],appsettings[\"tabshash\"]).each { |k,v| app.public_send(\"#{k}=\", v) }\n injectfunctions($defaultshortcuts[\"fileshash\"],appsettings[\"fileshash\"]).each { |k,v| app.public_send(\"#{k}=\", v) }\n injectfunctions($defaultshortcuts[\"viewshash\"],appsettings[\"viewshash\"]).each { |k,v| app.public_send(\"#{k}=\", v) }\n return app\nend",
"def init!\n @logger = @config = @database_config = nil\n\n load_application_config\n load_database_config\n note \"Loading #{env} environment (#{Ajaila::VERSION})\"\n load_classes\n note \"Establishing database connection\"\n establish_database_connection\n note \"Running auto-upgrade migrations\"\n run_auto_upgrade_migrations\n note \"Application has been initialized\"\n self\n end",
"def default_configuration!\n # Overwriting Sinatra defaults\n set :app_file, caller_files.first || $0 # Assume app file is first caller\n set :environment, Padrino.env\n set :raise_errors, true if development?\n set :logging, false # !test?\n set :sessions, true\n set :public, Proc.new { Padrino.root('public', self.uri_root) }\n # Padrino specific\n set :uri_root, \"/\"\n set :reload, development?\n set :app_name, self.to_s.underscore.to_sym\n set :default_builder, 'StandardFormBuilder'\n set :flash, defined?(Rack::Flash)\n set :authentication, false\n # Padrino locale\n set :locale_path, Proc.new { Dir[File.join(self.root, \"/locale/**/*.{rb,yml}\")] }\n set :auto_locale, false\n # Plugin specific\n set :padrino_mailer, defined?(Padrino::Mailer)\n set :padrino_helpers, defined?(Padrino::Helpers)\n end",
"def new\n respond_with @application = Application.new\n end",
"def app_class=(_arg0); end",
"def app_class=(_arg0); end",
"def create\n @application = Doorkeeper::Application.new(application_params)\n @application.uid = SecureRandom.hex(4)\n @application.owner = current_user if Doorkeeper.configuration.confirm_application_owner?\n\n if @application.save\n flash[:notice] = I18n.t(:notice, scope: %i[doorkeeper flash applications create])\n redirect_to oauth_application_url(@application)\n else\n render :new\n end\n end",
"def initialize(appname = nil)\n @appname = appname\n @log = Logger.new(STDERR)\n @log.progname = @appname\n @level = @log.level\n end",
"def application(name, options = {}, &blk)\n add_child(:applications, Hubcap::Application.new(self, name, options, &blk))\n end",
"def initialize(app)\n @app = app\n end",
"def initialize(app)\n @app = app\n end",
"def initialize(app)\n @app = app\n end",
"def initialize(app)\n @app = app\n end",
"def load_app\n require File.expand_path(File.join('config', 'application.rb'))\n @app ||= Rails.application\n end",
"def initialize(app)\n @app = app\n end",
"def initialize(app)\n @app = app\n end",
"def initialize(app)\n @app = app\n end",
"def initialize(app)\n @app = app\n end",
"def initialize(*args)\n parse_options(*args)\n set_log_level\n @@application = self\n end",
"def create_application(name)\n store_dir = File.join(@path, name)\n FileUtils.mkdir_p store_dir\n \n ApplicationConfiguration.new name, store_dir\n end",
"def initialize(default_app = nil, &block)\n @use, @map, @run = [], nil, default_app\n instance_eval(&block) if block_given?\n end",
"def blank_application_parser\n @blank_application_parser || BlankApplication\n end",
"def initialize(app_dir)\n @app_dir = app_dir\n end",
"def initialize(opts={})\n super(opts)\n @app_path = opts.fetch(:app_path, nil)\n end",
"def initialize(app, options_hash={}, &block)\n super\n end",
"def app=(name)\n self.config[:app] = name\n end",
"def create_app_root\n puts \"Create app root named #{name}\"\n end",
"def create\n @application = Doorkeeper::Application.new(application_params)\n @application.uid = SecureRandom.hex(4)\n @application.owner = current_user if Doorkeeper.configuration.confirm_application_owner?\n\n if @application.save\n flash[:notice] = I18n.t(:notice, scope: [:doorkeeper, :flash, :applications, :create])\n redirect_to oauth_application_url(@application)\n else\n render :new\n end\n end",
"def setup_application\n Souffle::Daemon.change_privilege\n Souffle::Config[:server] = true if Souffle::Config[:daemonize]\n @app = Souffle::Server.new\n end",
"def initialize app, logger: nil\n @app = app\n @logger = logger\n end",
"def initialize(*args)\n super\n\n @apps = {}\n fields = %w[AppID name StateFlags Universe installdir LastUpdated\n UpdateResult SizeOnDisk buildid LastOwner BytesToDownload BytesDownloaded\n AutoUpdateBehavior AllowOtherDownloadsWhileRunning UserConfig\n MountedDepots\n ]\n \n options[:steam_home].gsub!('~', ENV['HOME'])\n Dir.glob(\"#{options[:steam_home]}/steam/SteamApps/*.acf\") do |file|\n acf = SteamCodec::ACF::loadFromFile(File.open(file))\n @apps[acf.get('AppID')] = fields.map do |field|\n [field.downcase, acf.get(field)]\n end.to_h\n end\n end",
"def initialize(api_id)\n @api_id = api_id\n @app_info = nil\n @channels = {}\n initialize_stats\n logger.debug \"Created application\"\n end",
"def initialize(app_generator, panacea_config, root_dir)\n @app_generator = app_generator\n @config = panacea_config\n @app_generator.instance_variable_set :@panacea, @config\n @root_dir = root_dir\n end",
"def initialize(app, options={})\n options.symbolize_keys!\n\n @app, @config = app, BallotBox::Config.new(options)\n yield @config if block_given?\n self\n end",
"def application=(app)\n @application = app\n end",
"def application=(app)\n @application = app\n end",
"def application=(app)\n @application = app\n end",
"def build_application(config_hash)\n config = build_config(config_hash)\n\n Application.new(plugins, config)\n end",
"def app\n @app ||= LiuLunch\n end",
"def new(app_path, generator: Project.new(cli: self, app_path: app_path))\n app = generator.generate\n say <<~SAY\n\n Success! Created #{app.camelized_name} at #{app.absolute_app_path}\n Inside that directory, you can run several commands:\n\n #{cmd :server}\n Starts the development server\n\n #{cmd :test}\n Starts the test runner\n\n #{cmd :generate}\n Add elements you may have skipped, like RSpec or Webpack\n\n We suggest that you begin by typing:\n\n #{cmd :cd, path: app_path}#{cmd :server}\n\n and visiting localhost:3000 in your browser.\n For more information, check out the generated readme file.\n\n SAY\n end",
"def initialize(app, opts = {})\n @app = app\n @opts = opts\n end"
] | [
"0.7139635",
"0.6990864",
"0.6794157",
"0.67868394",
"0.66239166",
"0.64298576",
"0.6365159",
"0.6361455",
"0.6303619",
"0.62823427",
"0.62361157",
"0.6220929",
"0.621351",
"0.61765987",
"0.61731553",
"0.6132965",
"0.6121808",
"0.6082432",
"0.6072633",
"0.6072195",
"0.6057375",
"0.60417914",
"0.60034955",
"0.60001403",
"0.5985713",
"0.59780324",
"0.5957485",
"0.59537107",
"0.59500575",
"0.5933307",
"0.5914519",
"0.5900055",
"0.5893348",
"0.5867678",
"0.58389634",
"0.5837563",
"0.5836115",
"0.5832597",
"0.5831682",
"0.5802496",
"0.5792505",
"0.5786807",
"0.578451",
"0.57761824",
"0.5768661",
"0.5764792",
"0.57518566",
"0.5750265",
"0.57455087",
"0.5740438",
"0.57116723",
"0.57106394",
"0.5706215",
"0.5705173",
"0.56822217",
"0.56760764",
"0.5646508",
"0.5646508",
"0.5646508",
"0.56430113",
"0.56364805",
"0.56276363",
"0.5620184",
"0.56198317",
"0.5618079",
"0.5618079",
"0.56082696",
"0.56019384",
"0.5596347",
"0.5594138",
"0.5594138",
"0.5594138",
"0.55923367",
"0.5585131",
"0.5584842",
"0.5584842",
"0.5584842",
"0.5584842",
"0.55802554",
"0.5576146",
"0.5575465",
"0.55681163",
"0.5546375",
"0.5543682",
"0.5542347",
"0.55345905",
"0.5525744",
"0.55136204",
"0.55133253",
"0.5509578",
"0.5507037",
"0.5504438",
"0.5503311",
"0.55027074",
"0.54906845",
"0.54906845",
"0.54906845",
"0.54851234",
"0.548063",
"0.54802173",
"0.5477386"
] | 0.0 | -1 |
Gets the createdDateTime property value. The date and time the application was registered. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 20140101T00:00:00Z. Readonly. Supports $filter (eq, ne, not, ge, le, in, and eq on null values) and $orderBy. | def created_date_time
return @created_date_time
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def created_date_time_utc\n return @created_date_time_utc\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_time\n Time.parse(object[\"created_time\"]) if object[\"created_time\"]\n end",
"def created_at\n Time.at(created)\n end",
"def created_at\n Time.at(created)\n end",
"def created_at\n Time.at(created.to_i)\n end",
"def created_at\n Time.at(created.to_i)\n end",
"def created_at\n object.created_at.iso8601\n end",
"def getCreatedTime\r\n\t\t\t\t\treturn @createdTime\r\n\t\t\t\tend",
"def getCreatedTime\r\n\t\t\t\t\treturn @createdTime\r\n\t\t\t\tend",
"def created_at\n begin\n Time.parse(self.create_date)\n rescue\n nil\n end\n end",
"def created_at\n object.created_at.in_time_zone.iso8601 if object.created_at\n end",
"def created_at\n Time.parse(@created_at).utc unless @created_at.nil?\n end",
"def created_at\n @gapi[\"timeCreated\"]\n end",
"def created_at\n if able_to_store_created_at?\n time = instance_read(:created_at)\n time && time.to_f.to_i\n end\n end",
"def created_at\n @created_at ||= self[:created_at] ? Time.parse(self[:created_at]) : nil\n end",
"def created_at\n return DateTime.parse(@created_at) if @created_at\n\n @created_at\n end",
"def created\n Time.parse(@json['user']['meta']['created'])\n end",
"def created_at\n @created_at ||=\n Utilities.utc_to_localtime(@ldap_entry[:whencreated].first)\n end",
"def creation_time\n data[:creation_time]\n end",
"def created\n DateTime.parse(@json['project']['meta']['created'])\n end",
"def created_at\n @created_at ||= Time.zone.now.utc.to_i\n end",
"def created_at\n Time.parse(attributes['created_at'])\n end",
"def created_at\n @record.created_at\n end",
"def created_at\n data['creationDate'].to_date\n end",
"def creationdate\n if !record.nil? and record.respond_to? :created_at\n record.created_at.httpdate\n end\n end",
"def created_time\n ctime\n end",
"def date\n Time.at(self.created_utc)\n end",
"def date\n Time.at(self.created_utc)\n end",
"def date\n Time.at(self.created_utc)\n end",
"def created_at_timestamp\n Time.now.gmtime.strftime(\"%Y-%m-%dT%H:%M:%S.000Z\")\n end",
"def creation_date\n self.created_at.iso8601\n end",
"def createdAt\n self.created_at.to_s(:db)\n end",
"def created_at\n ensure_full_data!\n Time.at(@gapi[\"creationTime\"] / 1000.0)\n end",
"def created_at\n\t\tobject.created_at.strftime(\"%A, %B %e\")\n\tend",
"def created\n @created ||= Time.parse(@attrs[:created]) rescue nil\n end",
"def created_at\n object.created_at.to_time.to_i\n end",
"def created_date_time_utc=(value)\n @created_date_time_utc = value\n end",
"def created_at\n formatted_time(object.created_at)\n end",
"def created_at\n formatted_time(object.created_at)\n end",
"def created_at\n formatted_time(object.created_at)\n end",
"def created_at\n formatted_time(object.created_at)\n end",
"def created_date_time=(createdDateTime)\n @created_date_time = createdDateTime\n end",
"def created_at\n @attributes[:created_at]\n end",
"def created_at\n @attributes[:created_at]\n end",
"def created_at\n @attributes[:created_at]\n end",
"def created_at\n @attributes[:created_at]\n end",
"def created_at\n @attributes[:created_at]\n end",
"def created_at\n @attributes[:created_at]\n end",
"def created_at\n @attributes[:created_at]\n end",
"def created_at\n @attributes[:created_at]\n end",
"def created_at\n @attributes[:created_at]\n end",
"def created_at\n Time.at(response[\"createdAt\"]) if response[\"createdAt\"]\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end",
"def created_date_time=(value)\n @created_date_time = value\n end"
] | [
"0.71878844",
"0.7015428",
"0.6826322",
"0.6818065",
"0.6818065",
"0.67382777",
"0.67382777",
"0.6654277",
"0.6619916",
"0.6619916",
"0.65735734",
"0.6562926",
"0.6546598",
"0.64703715",
"0.6463156",
"0.6415572",
"0.6384822",
"0.6365886",
"0.63520586",
"0.63095534",
"0.6289597",
"0.6280416",
"0.6273825",
"0.62693787",
"0.62615705",
"0.6233494",
"0.62303543",
"0.6226776",
"0.6226776",
"0.6226776",
"0.6221242",
"0.6210922",
"0.6205131",
"0.62028176",
"0.62023443",
"0.6194959",
"0.61840755",
"0.61788595",
"0.61653346",
"0.61653346",
"0.61653346",
"0.61653346",
"0.61561203",
"0.61474884",
"0.61474884",
"0.61474884",
"0.61474884",
"0.61474884",
"0.61474884",
"0.61474884",
"0.61474884",
"0.61474884",
"0.61177784",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763",
"0.6116763"
] | 0.7036145 | 25 |
Sets the createdDateTime property value. The date and time the application was registered. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 20140101T00:00:00Z. Readonly. Supports $filter (eq, ne, not, ge, le, in, and eq on null values) and $orderBy. | def created_date_time=(value)
@created_date_time = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def created_date_time=(createdDateTime)\n @created_date_time = createdDateTime\n end",
"def created_date_time_utc=(value)\n @created_date_time_utc = value\n end",
"def setCreatedTime(createdTime)\r\n\t\t\t\t\t@createdTime = createdTime\r\n\t\t\t\tend",
"def setCreatedTime(createdTime)\r\n\t\t\t\t\t@createdTime = createdTime\r\n\t\t\t\tend",
"def created_at=(value)\n @created_at = DateTime.parse(value)\n end",
"def created_date_time_utc\n return @created_date_time_utc\n end",
"def set_created_at\n if !timeless? && !created_at\n time = Time.configured.now\n self.updated_at = time if is_a?(Updated) && !updated_at_changed?\n self.created_at = time\n end\n clear_timeless_option\n end",
"def set_record_created_at\n self.record_created_at = Time.current.utc.iso8601(3)\n end",
"def created_at\n Time.at(created)\n end",
"def created_at\n Time.at(created)\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_date_time\n return @created_date_time\n end",
"def created_at\n @created_at ||= self[:created_at] ? Time.parse(self[:created_at]) : nil\n end",
"def created_at=(val)\n if val.is_a?(String)\n @created_at = Time.parse(val)\n else\n @created_at = val\n end\n end",
"def created_time\n Time.parse(object[\"created_time\"]) if object[\"created_time\"]\n end",
"def created_at_datetime\n @created_at_datetime ||= DateTime.parse(@created_at)\n end",
"def created_at\n Time.at(created.to_i)\n end",
"def created_at\n Time.at(created.to_i)\n end",
"def created_at\n begin\n Time.parse(self.create_date)\n rescue\n nil\n end\n end",
"def created_at\n @created_at ||= Time.zone.now.utc.to_i\n end",
"def created_at\n Time.parse(@created_at).utc unless @created_at.nil?\n end",
"def create_timestamp\n self.created_at = Time.now\n end",
"def create_timestamp\n self.created_at = Time.now\n end",
"def set_created_at\n self.created_at ||= Date.today if new_record?\n end",
"def creation_date\n return @creation_date if defined? @creation_date\n return unless metadata['dcterms:created']\n\n @creation_date = Time.parse(metadata['dcterms:created'])\n end",
"def created_at\n @created_at ||= Time.now\n end",
"def created_at\n @created_at ||= Time.now\n end",
"def created_at\n @created_at ||= Time.now\n end",
"def getCreatedTime\r\n\t\t\t\t\treturn @createdTime\r\n\t\t\t\tend",
"def getCreatedTime\r\n\t\t\t\t\treturn @createdTime\r\n\t\t\t\tend",
"def created\n @created ||= Time.parse(@attrs[:created]) rescue nil\n end",
"def created_at\n @created_at ||=\n Utilities.utc_to_localtime(@ldap_entry[:whencreated].first)\n end",
"def created_at\n object.created_at.in_time_zone.iso8601 if object.created_at\n end",
"def created_at\n return DateTime.parse(@created_at) if @created_at\n\n @created_at\n end",
"def date\n Time.at(self.created_utc)\n end",
"def date\n Time.at(self.created_utc)\n end",
"def date\n Time.at(self.created_utc)\n end",
"def create\n self[:created] = Time.now.to_s\n save\n end",
"def registered_date_time=(value)\n @registered_date_time = value\n end",
"def created_at\n object.created_at.iso8601\n end",
"def before_validation\n if values[:created_at].nil?\n values[:created_at] = DateTime.now\n end\n end",
"def creation_date\n self.created_at.iso8601\n end",
"def created_at\n Time.at(response[\"createdAt\"]) if response[\"createdAt\"]\n end",
"def created\n Time.parse(@json['user']['meta']['created'])\n end",
"def before_create; self.created_on = Time.now.utc; end",
"def created_at\n with_type!(Fixnum) { attribute_from_model(:created_at) || attribute_from_model(:created) }\n end",
"def created_at\n ensure_full_data!\n Time.at(@gapi[\"creationTime\"] / 1000.0)\n end",
"def date_auth_created=(value)\n @children['date-auth-created'][:value] = value\n end"
] | [
"0.7492453",
"0.71153724",
"0.64460236",
"0.64460236",
"0.6405494",
"0.63464254",
"0.6238259",
"0.6206692",
"0.60917777",
"0.60917777",
"0.60381746",
"0.6000926",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.60006857",
"0.5976006",
"0.59389514",
"0.5938621",
"0.58987576",
"0.58794534",
"0.58794534",
"0.5815307",
"0.5812897",
"0.57891935",
"0.57779944",
"0.57778",
"0.57668144",
"0.5753034",
"0.57237095",
"0.57237095",
"0.57237095",
"0.5697103",
"0.5697103",
"0.5690565",
"0.56812054",
"0.5671024",
"0.56477904",
"0.56283844",
"0.56283844",
"0.56283844",
"0.5598655",
"0.5593594",
"0.55677867",
"0.5538723",
"0.5533688",
"0.5512008",
"0.5508691",
"0.54861706",
"0.54721427",
"0.54623127",
"0.5461281"
] | 0.70107245 | 26 |
Gets the createdOnBehalfOf property value. Supports $filter (/$count eq 0, /$count ne 0). Readonly. | def created_on_behalf_of
return @created_on_behalf_of
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def created_on_behalf_of=(value)\n @created_on_behalf_of = value\n end",
"def on_behalf_of_user_id\n return @on_behalf_of_user_id\n end",
"def on_behalf_of_user_id=(value)\n @on_behalf_of_user_id = value\n end",
"def ordered_on_behalf_of?\n user_id != created_by\n end",
"def created_by; User.get(self.created_by_id) || Lead.get(self.created_by_id) || Account.get(self.created_by_id) || Contact.get(self.created_by_id) || Opportunity.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id) || Lead.get(self.created_by_id) || Account.get(self.created_by_id) || Contact.get(self.created_by_id) || Opportunity.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id) || Lead.get(self.created_by_id) || Account.get(self.created_by_id) || Contact.get(self.created_by_id) || Opportunity.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id) || Lead.get(self.created_by_id) || Account.get(self.created_by_id) || Contact.get(self.created_by_id) || Opportunity.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id) || Lead.get(self.created_by_id) || Account.get(self.created_by_id) || Contact.get(self.created_by_id) || Opportunity.get(self.created_by_id); end",
"def party_owner\n if !self.account_id.nil?\n self.account.name\n elsif !self.vendor_id.nil?\n self.vendor.name\n elsif !self.user_id.nil?\n \"Personal Contact\"\n else\n \"-\"\n end\n end",
"def owner\n {owner_id: self.object.user.id, \n owner_account: self.object.user.email}\n end",
"def owner_name\n return 'N/A' if anonymous? || user.nil?\n return user.name if user.name?\n user.email\n end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def created_by; User.get(self.created_by_id); end",
"def getCreatedBy\r\n\t\t\t\t\treturn @createdBy\r\n\t\t\t\tend",
"def owned_by\n HubEdos::StudentApi::V2::AcademicPolicy::AdministrativeOwners.new(@data['ownedBy'])\n end",
"def owned?\n user.present?\n end",
"def owned?(user_to_check = current_user)\n user_to_check ? self.creator == user_to_check : false\n end",
"def not_account_owner\n not_account_owner_in_signup && !is_account_owner? \n end",
"def owner\n if object.owner && (current_user.lead? || object.owner.id == current_user.id)\n object.owner.id\n else\n nil\n end\n end",
"def created_by\n if self.user\n return self.user.login\n else\n return ''\n end\n end",
"def likely_facebook_account\n facebook_accounts.first.andand.first\n end",
"def created_by\n return @created_by\n end",
"def created_by\n return @created_by\n end",
"def created_by\n return @created_by\n end",
"def created_by\n return @created_by\n end",
"def created_by\n return @created_by\n end",
"def created_by\n return @created_by\n end",
"def created_by\n return @created_by\n end",
"def created_by\n return @created_by\n end",
"def on_behalf_requestors\n return @on_behalf_requestors\n end",
"def get_bot_user_id\n 1.freeze\n end",
"def privacy_owner\r\n\t\t\tself.user\r\n\t\tend",
"def created_by_name\r\n User.find(object.created_by).name || nil\r\n end",
"def owner_user_id\n return @owner_user_id\n end",
"def owner_user_id\n return @owner_user_id\n end",
"def on_behalf_requestors=(value)\n @on_behalf_requestors = value\n end",
"def owner_id\n data[:owner_id]\n end",
"def owner_id\n data[:owner_id]\n end",
"def created_by\n user\n end",
"def owner\n get_user owner_id\n end",
"def get_nil_account()\n @nil_account\n end",
"def can_make_anonymous?\n owner && owner.is_a?(Person)\n end",
"def owners_count\n return @owners_count\n end",
"def owner\n user_id\n end"
] | [
"0.6775381",
"0.6379555",
"0.57823455",
"0.5400411",
"0.50183177",
"0.50183177",
"0.50183177",
"0.50183177",
"0.50183177",
"0.5016211",
"0.49782726",
"0.49641135",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.4912059",
"0.49088338",
"0.48825714",
"0.48700687",
"0.4865437",
"0.4864996",
"0.48524716",
"0.48449835",
"0.48343188",
"0.48074755",
"0.48074755",
"0.48074755",
"0.48074755",
"0.48074755",
"0.48074755",
"0.48074755",
"0.48074755",
"0.4792138",
"0.4785688",
"0.47524175",
"0.47433946",
"0.47136006",
"0.47136006",
"0.4707148",
"0.4698161",
"0.4698161",
"0.46878442",
"0.46769717",
"0.46562105",
"0.46554244",
"0.4648784",
"0.46459863"
] | 0.72363925 | 0 |
Sets the createdOnBehalfOf property value. Supports $filter (/$count eq 0, /$count ne 0). Readonly. | def created_on_behalf_of=(value)
@created_on_behalf_of = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_behalf_of_user_id=(value)\n @on_behalf_of_user_id = value\n end",
"def created_on_behalf_of\n return @created_on_behalf_of\n end",
"def on_behalf_requestors=(value)\n @on_behalf_requestors = value\n end",
"def on_behalf_of_user_id\n return @on_behalf_of_user_id\n end",
"def ordered_on_behalf_of?\n user_id != created_by\n end",
"def set_NotifyLeadOwner(value)\n set_input(\"NotifyLeadOwner\", value)\n end",
"def set_FilterToOwnedLists(value)\n set_input(\"FilterToOwnedLists\", value)\n end",
"def set_NotifyNewEntityOwner(value)\n set_input(\"NotifyNewEntityOwner\", value)\n end",
"def allowed_to_create_tenants=(value)\n @allowed_to_create_tenants = value\n end",
"def set_IsFriend(value)\n set_input(\"IsFriend\", value)\n end",
"def set_IsFriend(value)\n set_input(\"IsFriend\", value)\n end",
"def set_LeadOwner(value)\n set_input(\"LeadOwner\", value)\n end",
"def set_to_activate\n if REQUIRES_ACCOUNT_CONFIRMATION_TO_ACTIVATE && owner.parent && !owner.parent.account_confirmed\n self.status = Status::PENDING_ACCOUNT_CONFIRMATION\n elsif owner.requires_parental_guidance? && owner.parent.nil?\n self.status = Status::PENDING\n else\n self.status = Status::OPEN\n owner.update_friends_new_item\n end\n self.activated_at = Time.now\n end",
"def set_created_by\n account.created_by = current_user.id\n account\n end",
"def sent_only_to_me=(value)\n @sent_only_to_me = value\n end",
"def set_following\n @following = Following.find_by(from: current_user, to_id: params[:to_id])\n end",
"def set_friendship\n end",
"def autoset_owner\n bypass_auth do\n if accessor\n self.owner_id ||= accessor.id\n end\n end\n\n true # this is very important!\n end",
"def befriend new_friend\n run_callbacks :befriend do\n friendships.create friend: new_friend\n end\n end",
"def set_current_user_to_creator_if_empty(options, current_user:, **)\n if options['contract.default'].creator_id\n true\n else\n options['contract.default'].creator_id = current_user.id\n end\n end",
"def find_my_friends_blocked=(value)\n @find_my_friends_blocked = value\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def owners_count=(value)\n @owners_count = value\n end",
"def bought_by(new_owner)\r\n self.owner = new_owner\r\n self.to_inactive\r\n end",
"def set_Ownership(value)\n set_input(\"Ownership\", value)\n end",
"def autosets_owner_on_create\n has_owner # this will do nothing if the user has already set up has_owner :something\n # the hook runs before validation so we can validate_associated\n before_validation_on_create :autoset_owner\n end",
"def befriend! new_friend\n run_callbacks :befriend do\n friendships.create! friend: new_friend\n end\n end",
"def set_create_user_fields\n user_id = AuditModule.get_current_user.uid\n self.created_by = user_id\n self.updated_by = user_id\n end",
"def created_by=(value)\n @created_by = value\n end",
"def setCreatedBy(createdBy)\r\n\t\t\t\t\t@createdBy = createdBy\r\n\t\t\t\tend",
"def set_owner\n @goal.owner = current_user\n end",
"def set_owner_member\n self.organizations << self.owner\n end",
"def send_confirmations_to_owner=(value)\n @send_confirmations_to_owner = value\n end",
"def created_by=(value)\n @created_by = value\n end",
"def created_by=(value)\n @created_by = value\n end",
"def created_by=(value)\n @created_by = value\n end",
"def created_by=(value)\n @created_by = value\n end",
"def created_by=(value)\n @created_by = value\n end",
"def created_by=(value)\n @created_by = value\n end",
"def created_by=(value)\n @created_by = value\n end",
"def created_by=(value)\n @created_by = value\n end",
"def owned?(user_to_check = current_user)\n user_to_check ? self.creator == user_to_check : false\n end",
"def set_owner\n @owner = Owner.find_by_owner_user_id(current_owner_user.id)\n end",
"def set_Follow(value)\n set_input(\"Follow\", value)\n end",
"def owner=(value)\n self.person = value if a_person\n end",
"def hasFollowingUsers\r\n\t\thasFollowing ||= false\r\n\t\thasFollowing = true unless User.following.size == 0 \r\n\r\n @responseObject = OpenStruct.new({\r\n status: true,\r\n errors: [],\r\n code: API_CODE_ERRORS['Services']['Global']['success'],\r\n objectData: OpenStruct.new({ hasFollowing: hasFollowing }),\r\n timestamp: (Date.new).to_time.to_i.abs\r\n })\r\n \trender :template => 'api/v1/users/members/status' ,:handlers => [:rabl], :formats => [:json]\r\n\tend",
"def owner=(attributes)\n @owner = User.new(attributes)\n end",
"def owner=(attributes)\n @owner = User.new(attributes)\n end",
"def allowed_accounts=(value)\n @allowed_accounts = value\n end",
"def owned_by\n HubEdos::StudentApi::V2::AcademicPolicy::AdministrativeOwners.new(@data['ownedBy'])\n end",
"def not_account_owner\n not_account_owner_in_signup && !is_account_owner? \n end",
"def enable_on_behalf_requestors_to_add_access=(value)\n @enable_on_behalf_requestors_to_add_access = value\n end",
"def enable_on_behalf_requestors_to_update_access=(value)\n @enable_on_behalf_requestors_to_update_access = value\n end",
"def update_owner(user)\n self.notify = true if self.owner != user\n self.owner = user unless user.nil?\n self.save\n end",
"def on_behalf_requestors\n return @on_behalf_requestors\n end",
"def initial_setup\n # Give him friends\n f = [User.least_email(\"upstill\"), User.least_email(\"arrone\"), User.super_id ]\n f << self.invited_by_id if self.invited_by_id\n self.followee_ids = f\n\n # Give him some lists \"Keepers\", \"To Try\", \"Now Cooking\"\n List.assert \"Keepers\", self, create: true\n List.assert \"To Try\", self, create: true\n List.assert \"Now Cooking\", self, create: true\n\n self.save\n\n # Make the inviter follow the newbie.\n if self.invited_by_id\n begin\n invited_by = User.find(self.invited_by_id)\n invited_by.followees << self\n rescue\n end\n end\n end",
"def enable_on_behalf_requestors_to_remove_access=(value)\n @enable_on_behalf_requestors_to_remove_access = value\n end",
"def owner=(owner)\n set_visible(owner.visible?, owner.id)\n super\n end",
"def CreateFollowing\n myFollowId = params['followingId']\n myFollowRecord = UsersRecord.find_by(\"userid =:userId\",{userId:myFollowId})\n if myFollowRecord\n if Following.where(\"userid= :userId and followingid= :followingId\",{userId:getUserId[0]['userId'],followingId:myFollowId })\n .first_or_create(\n followingid:myFollowId,\n userid:getUserId[0]['userId'],\n users_record_id:getUserId[0]['rec_id']\n )\n following= Following.where(\"userid =:userId\",{userId:getUserId[0]['userId']}).count\n render json: {following:following, message:\"Following\"}, status: :ok\n else\n render json: {status:\"error\", code:422, message:\"Failed to Follow\"}, status: :unprocessable_entity\n end\n else\n render json: {status:\"error\", code:422, message:\"Failed to Follow\"}, status: :unprocessable_entity\n end\n end",
"def created_by=(user)\n write_attribute(:created_by, user.id) unless user.nil? or user.id.nil?\n end",
"def initialize()\n super\n @odata_type = \"#microsoft.graph.aadUserConversationMember\"\n end",
"def create\n $lovedone = nil\n @family_member = User.new(family_member_params)\n @family_member.profile.user_type = Profile.user_types[:family_member]\n respond_to do |format|\n if @family_member.save\n unless family_member_params_for_lovedone[:lovedones].blank?\n follower = Follower.new user_id: @family_member.id, request_status: \"invited\", \n lovedone_id: family_member_params_for_lovedone[:lovedones]\n follower.save\n end\n @family_member.send_on_create_confirmation_instructions_ex\n format.html { redirect_to familymembers_path, notice: 'Family member was successfully created.' }\n #format.json { render :show, status: :created, location: @family_member }\n else\n if current_user.admin?\n @lovedones = Lovedone.all\n else\n @lovedones = current_user.lovedones\n end\n format.html { render :new }\n format.json { render json: @family_member.errors, status: :unprocessable_entity }\n end\n end\n end",
"def set_user_following\n @user_following = UserFollowing.find(params[:id])\n end",
"def inactive_date\n\t\tif inactive_changed?\n\t\t\tif inactive?\n\t\t\t\tself.inactive_from = Time.now\n\t\t\telse\n\t\t\t\tself.inactive_from = nil\n\t\t\tend\n\t\tend\n\n\t\tdef new_ownership\n\t\t\t@user = User.find(self.created_by)\n\t\t\tOwnership.create(business_id: self.id, user_id: self.created_by, \n\t\t\t\temail_address: @user.email, created_by: self.created_by)\n\t\tend\n\tend",
"def following=(value)\n @following = value\n end",
"def apply_save_data_to_curation_concern(attributes)\n if attributes.fetch('on_behalf_of', nil).present?\n current_depositor = curation_concern.depositor\n new_depositor = ::User.find_by_user_key(attributes.fetch('on_behalf_of'))\n curation_concern.apply_depositor_metadata(new_depositor)\n curation_concern.edit_users = update_edit_users_for_curation_concern(current_depositor, new_depositor)\n end\n super\n end",
"def set_business_owner\n @business_owner = BusinessOwner.find(params[:id])\n end",
"def initialize_mailing_list_group_with_owner\n initialize_mailing_list_group\n update_ok(!@mailing_list_group.nil? && current_user.id == @mailing_list_group.user_id)\n end",
"def can_make_anonymous?\n owner && owner.is_a?(Person)\n end",
"def set_owner(id)\n self.owner_id = id\n end",
"def after_create(user)\n if user.invited_by_id?\n invitation = Invitation.new(sender: user.invited_by, friend: user)\n invitation.accept!\n else\n # TODO There's a potential exploit here where someone creates 100 dummy accounts, invites one account and collects all the free time on that one account.\n Invitation.where(email: user.email).each do |invitation|\n invitation.friend = user\n invitation.accept!\n end\n end\n end",
"def set_owner(user)\n Invitation.create!(:project => self, :user => user, :owner => 1, :admin => 1).accept!\n end",
"def set_AccountName(value)\n set_input(\"AccountName\", value)\n end",
"def set_AccountName(value)\n set_input(\"AccountName\", value)\n end",
"def allowed_to_read_other_users=(value)\n @allowed_to_read_other_users = value\n end",
"def ensure_owner_attends\n attendees << user unless attendees.include? user\n end",
"def following\n @following = @current_user.friends\n end",
"def invite_only=(invite_only)\n self.join_rule = invite_only ? :invite : :public\n invite_only\n end",
"def create\n relationship = Relationship.between(current_user.id, params[:user_two_id]).first\n unless relationship\n current_user.add_friend(User.find(params[:user_two_id]))\n relationship = Relationship.between(current_user.id, params[:user_two_id]).first\n relationship.status = 1\n relationship.save\n end\n friend = User.find_friend(current_user, relationship)\n redirect_to friendlist_path\n end",
"def accept_friend(other_user)\n relationship = self.get_relationship(other_user)\n \n\tif relationship && (relationship.friend_status == \"PENDING\" || relationship.friend_status == \"IGNORED\") && relationship.followed_id == self.id\n\t\trelationship.friend_status = \"FRIENDS\"\n\t\trelationship.follow1 = true\n\t\trelationship.follow2 = true\n\t\t\n\t\trelationship.save\n\tend\n end",
"def set_friends\n @user = current_user\n @friend = User.find(params[:friend_id].to_i)\n end",
"def allowed_to_read_bitlocker_keys_for_owned_device=(value)\n @allowed_to_read_bitlocker_keys_for_owned_device = value\n end",
"def can_show_invite_friends?\n (Date.today - (invited_friends_at || created_at).to_date).to_i >= 30\n end",
"def activate_first_user\n return if User.any?\n\n assign_attributes(\n confirmed_at: Time.current,\n point_of_contact: true\n )\n end",
"def activate_first_user\n return if User.any?\n\n assign_attributes(\n confirmed_at: Time.current,\n point_of_contact: true\n )\n end",
"def set_call_your_friend\n @call_your_friend = CallYourFriend.find(params[:id])\n end",
"def sent_to_or_cc_me=(value)\n @sent_to_or_cc_me = value\n end",
"def set_following\n @following = Following.find(params[:id])\n end",
"def set_following\n @following = Following.find(params[:id])\n end"
] | [
"0.66242373",
"0.6486004",
"0.5860083",
"0.570976",
"0.52651995",
"0.5178244",
"0.5126644",
"0.5088521",
"0.5019203",
"0.50019735",
"0.50019735",
"0.49906784",
"0.49715292",
"0.49554363",
"0.47909018",
"0.47900388",
"0.47753546",
"0.47665575",
"0.4746444",
"0.4740558",
"0.4739585",
"0.47247064",
"0.47247064",
"0.47247064",
"0.47247064",
"0.47247064",
"0.47246253",
"0.47243252",
"0.47243252",
"0.47243252",
"0.47243252",
"0.47243252",
"0.47243252",
"0.47190008",
"0.46856925",
"0.4685284",
"0.4641763",
"0.46075183",
"0.45913315",
"0.45773292",
"0.4577282",
"0.45722377",
"0.45554",
"0.45459878",
"0.4532663",
"0.4532663",
"0.4532663",
"0.4532663",
"0.4532663",
"0.4532663",
"0.4532663",
"0.4532663",
"0.45138815",
"0.45046523",
"0.4488468",
"0.44814852",
"0.44732633",
"0.44729117",
"0.44729117",
"0.44635868",
"0.4460775",
"0.445983",
"0.4459126",
"0.4435162",
"0.4429984",
"0.44297776",
"0.44296232",
"0.4429406",
"0.4425353",
"0.44084626",
"0.4408395",
"0.44046298",
"0.43999612",
"0.43995425",
"0.43994892",
"0.43989882",
"0.43807912",
"0.43686438",
"0.43651018",
"0.43606082",
"0.43555507",
"0.43554834",
"0.4351485",
"0.43493053",
"0.43493053",
"0.43416426",
"0.4334335",
"0.43029898",
"0.42839074",
"0.42829874",
"0.4281728",
"0.4279742",
"0.42555356",
"0.42517215",
"0.42392272",
"0.42392272",
"0.4229959",
"0.4227904",
"0.42259932",
"0.4225619"
] | 0.7725809 | 0 |
Gets the defaultRedirectUri property value. The defaultRedirectUri property | def default_redirect_uri
return @default_redirect_uri
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def default_redirect_uri=(value)\n @default_redirect_uri = value\n end",
"def redirect_uri\n @redirect_uri\n end",
"def redirect_uri\n @payload.present? ? @payload['redirect'] : @redirect_uri\n end",
"def redirect_uri\n @redirect_uri ||= root_url[0..-2] + oauth_callback_path\n end",
"def redirect_uri_settings\n return @redirect_uri_settings\n end",
"def redirect_path(name, default = nil)\n stored_redirect_path(name) || default || root_path\n end",
"def default_redirect_url_after_sign_out\n QAuthRubyClient.configuration.default_redirect_url_after_sign_out\n end",
"def default_uri\n URI.parse('//' + @default_host + '/')\n end",
"def get_redirect_path(default=root_path)\n if params.key? :redirect_path\n @redirect_path = params[:redirect_path]\n elsif not @vertical.nil?\n if @vertical.class == \"Assignment\"\n @redirect_path = show_assignment_path(@vertical)\n else\n @redirect_path = get_vertical_path(@vertical)\n end\n else\n @redirect_path = default\n end\n @redirect_path\n end",
"def redirect_uri\n\t\[email protected]_uri.to_s\n\tend",
"def redirect_url\n @data[:redirect_url]\n end",
"def redirect_url\n @data[:redirect_url]\n end",
"def redirect_url\n @_redirect_url ||= public_child_redirect_url || controller_and_action_url ||\n nil\n end",
"def actual_uri\n redirects_to or uri\n end",
"def redirect_uri\n host = headers['Host']\n uri = \"#{path}/\"\n uri = \"#{uri}?#{query}\" unless (query || '').empty?\n uri = \"http://#{host}#{uri}\" if host\n uri\n end",
"def oauth_redirect_uri\n uri = URI.parse(request.url)\n uri.path = '/sk_auth/callback'\n uri.query = nil\n uri.to_s\n end",
"def redirect_uri_for base_url\n return @callback_uri if uri_is_postmessage?(@callback_uri) || !URI(@callback_uri).scheme.nil?\n raise format(MISSING_ABSOLUTE_URL_ERROR, @callback_uri) if base_url.nil? || URI(base_url).scheme.nil?\n URI.join(base_url, @callback_uri).to_s\n end",
"def default_url\n nil\n end",
"def default_sign_in_url\n user_sign_in_url\n end",
"def callback_url\n options[:redirect_uri] || (full_host + script_name + callback_path)\n end",
"def callback_url\n options[:redirect_uri] || (full_host + script_name + callback_path)\n end",
"def getRedirectUrl\n raise ArgumentError, \"Response body doesnot exist\" if @_responseBody.nil? || @_responseBody.empty?\n resObj = toObject\n return false if resObj.redirect_url.nil? || resObj.redirect_url.empty?\n resObj.redirect_url\n end",
"def default_redirect_url_after_sign_in\n admin_dashboard_url \n end",
"def redirect_uri_settings=(value)\n @redirect_uri_settings = value\n end",
"def redirect_url\n @redirect_url ||= pxpay_request.url rescue add_gateway_error\n end",
"def default_sign_in_url\n sign_in_url\n end",
"def uri\n raise @fetch_error if fetch_error\n raise @invalid_uri_error if invalid_uri_error?\n return @redirect_log.last.uri unless @redirect_log.empty?\n return @source_uri\n end",
"def redirect_uris\n return @redirect_uris\n end",
"def set_RedirectURI(value)\n set_input(\"RedirectURI\", value)\n end",
"def set_RedirectURI(value)\n set_input(\"RedirectURI\", value)\n end",
"def default_url\n url 'default'\n end",
"def get_default_route\n return @m_default_route\n end",
"def redirect_url\n\t\tcallback_url\n\tend",
"def openid_redirect_uri; end",
"def redirect_url; end",
"def default_url\n end",
"def default_route\n @default_route ||= '/'\n end",
"def base_url\n current_base_href = base_href.to_s.strip.empty? ? nil : URL.absolutify(base_href, URL.new(url).root_url)\n current_base_href || url\n end",
"def redirect_location\n http_redirect? ? @get_resp.header['location'] : nil\n end",
"def redirect_location\n http_redirect? ? @get_resp.header['location'] : nil\n end",
"def root_uri_path\n @options[:root_uri_path]\n end",
"def openid_redirect_uri=(_arg0); end",
"def default_path\n '/'\n end",
"def get_redirect_uri\n if Rails.env.development? \n #local_port = ':' + request.port.to_s()\n local_port = \":3000\"\n else\n local_port = \"\"\n end\n \"http://#{request.host}#{local_port}/jobs/accept\"\n end",
"def last_location\n session[:last_location] || root_url\n end",
"def redirectUris=(uris)\n self.redirect_url = uris.first\n end",
"def base_uri\n @base_uri ||= guess_base_uri\n end",
"def post_auth_redirect_url\n referer = params[:referer] || request.referer\n \n if referer && (referer =~ %r|^https?://#{request.host}#{root_path}| ||\n referer =~ %r|^https?://#{request.host}:#{request.port}#{root_path}|)\n #self-referencing absolute url, make it relative\n referer.sub!(%r|^https?://#{request.host}(:#{request.port})?|, '')\n elsif referer && referer =~ %r|^(\\w+:)?//|\n Rails.logger.debug(\"#post_auth_redirect_url will NOT use third party url for post login redirect: #{referer}\")\n referer = nil\n end\n \n if referer && referer_blacklist.any? {|blacklisted| referer.starts_with?(blacklisted) }\n Rails.logger.debug(\"#post_auth_redirect_url will NOT use a blacklisted url for post login redirect: #{referer}\")\n referer = nil\n elsif referer && referer[0,1] != '/'\n Rails.logger.debug(\"#post_auth_redirect_url will NOT use partial path for post login redirect: #{referer}\")\n referer = nil\n end\n \n return referer || root_path \n end",
"def default_url_options\n Linkable.default_url_options\n end",
"def base_uri\n url = URI.parse( @config[\"portal_url\"] )\n if url.path === \"/\"\n return \"\"\n else\n return url.path\n end\n end",
"def redirect_back_or_default(default = root_url(:protocol => \"http\"))\n # be sure we aren't returning the login, register or logout page\n if valid_return_to_url\n url = CGI.unescape(return_to_url)\n url = {:controller => url, :protocol => \"http\"} unless url.match(\"://\")\n redirect_to(url)\n else\n redirect_to(default)\n end\n store_location(nil)\n return false\n end",
"def default_url_options\n if defined?(Settings.application.protocol) && !Settings.application.protocol.blank?\n Rails.logger.debug(\"Setting default URL protocol to #{Settings.application.protocol}\")\n {protocol: Settings.application.protocol}\n else\n {}\n end\n end",
"def redirect_uris=(value)\n @redirect_uris = value\n end",
"def redirect_url(callback_url)\n signin_url(callback_url)\n end",
"def get_default_locationstr\n session[:location] if /\\A\\d{5}\\z/.match(session[:location])\n end",
"def get_auth_url(use_callback_flow=true)\n if use_callback_flow\n service_name = service_name_for_user(DATASOURCE_NAME, @user)\n @client.authorization.state = CALLBACK_STATE_DATA_PLACEHOLDER.sub('user', @user.username)\n .sub('service', service_name)\n else\n @client.authorization.redirect_uri = REDIRECT_URI\n end\n @client.authorization.authorization_uri.to_s\n end",
"def base_url\n base_href || url\n end",
"def stored_location_for(resource_or_scope)\n root_url\n end",
"def base_uri(uri = nil)\n @base_uri = uri unless uri.nil?\n @base_uri\n end",
"def redirect_to\n return @redirect_to\n end",
"def redirect_uri= new_redirect_uri\n new_redirect_uri = Addressable::URI.parse new_redirect_uri\n # TODO: - Better solution to allow google postmessage flow. For now, make an exception to the spec.\n unless new_redirect_uri.nil? || new_redirect_uri.absolute? || uri_is_postmessage?(new_redirect_uri) ||\n uri_is_oob?(new_redirect_uri)\n raise ArgumentError, \"Redirect URI must be an absolute URI.\"\n end\n @redirect_uri = new_redirect_uri\n end",
"def default_endpoint\n @endpoints[default_endpoint_name]\n end",
"def final_url\n call_once\n @headers[\"location\"] || @request.getURI.to_string\n end",
"def base_href\n parsed_search('base').first.attributes['href'].value rescue nil\n end",
"def root_uri\n uri = URI.parse request.url\n uri.path = \"\"\n uri.query = nil\n uri.to_s\n end",
"def redirect_url\n if @next_url.present?\n @next_url = CGI.unescape(@next_url)\n @next_url = nil if !ValidateLink.is_valid_redirect_path?(@next_url)\n end\n\n if !@has_valid_mfa_session\n next_url_param = @next_url.present? ? \"?next=#{CGI.escape @next_url}\" : \"\"\n GlobalConstant::WebUrls.multifactor_auth + next_url_param\n else\n @admin.has_accepted_terms_of_use? ? get_application_url : GlobalConstant::WebUrls.terms_and_conditions\n end\n end",
"def default_value\n config[:default]\n end",
"def after_sign_in_path_for(resource)\n if Rails.env.production?\n request.env['omniauth.origin'] || stored_location_for(resource) || KISALLI_URL\n else\n request.env['omniauth.origin'] || stored_location_for(resource) || root_path\n end\n end",
"def getproxyuri\n proxy = self.getproxy\n proxy_uri = (proxy != nil )? URI.parse(proxy) : nil\n return proxy_uri\n end",
"def after_sign_in_path_for(resource)\n request.env['omniauth.origin'] || stored_location_for(resource) || root_path\n end",
"def after_sign_in_path_for(resource)\n request.env['omniauth.origin'] || stored_location_for(resource) || root_path\n end",
"def after_sign_in_path_for(resource)\n request.env['omniauth.origin'] || stored_location_for(resource) || root_path\n end",
"def default_url(context)\n end",
"def base_url\n GlobalConstant::Base.aml_config[:search][:base_url]\n end",
"def redirect(auth)\n return auth.redirect_uri.split('#',2).first\n end",
"def base_href\n parsed.search('base').first.attributes['href'].value rescue nil\n end",
"def default\n return @default\n end",
"def redirection(url = nil)\n url ||= @uri.to_s\n response = Browser.get(url)\n\n if response.code == 301 || response.code == 302\n redirection = response.headers_hash['location']\n\n # Let's check if there is a redirection in the redirection\n if (other_redirection = redirection(redirection))\n redirection = other_redirection\n end\n end\n\n redirection\n end",
"def set_redirect_location\n @redirect_location = @shareable\n end",
"def after_sign_out_path_for resource_or_scope\n redirect_uri = params[:redirect_uri]\n redirect_uri ? redirect_uri : super\n end",
"def callback_uri\n return @callback_uri\n end",
"def default_path\n nil\n end",
"def after_sign_in_path_for(resource)\n request.env['omniauth.origin'] || stored_location_for(resource) || home_path\n end",
"def store_redirect\n if params.key?(:redirect)\n store_redirect_url_for(params[:redirect], request.referer)\n end\n end",
"def set_redirect\n @redirect = params[:origin_url] == nil ? bookmarks_path : params[:origin_url]\n end",
"def valid_redirect_uri?(redirect_uri)\n true\n end",
"def last_uri\n session[:last_path]\n end",
"def redirect_uri=(redirect_uri)\n if !redirect_uri.nil? && redirect_uri.to_s.length > 256\n fail ArgumentError, 'invalid value for \"redirect_uri\", the character length must be smaller than or equal to 256.'\n end\n\n if !redirect_uri.nil? && redirect_uri.to_s.length < 1\n fail ArgumentError, 'invalid value for \"redirect_uri\", the character length must be great than or equal to 1.'\n end\n\n @redirect_uri = redirect_uri\n end",
"def after_sign_in_path_for(resource)\n\t\trequest.env['omniauth.origin'] || stored_location_for(resource) || root_path\n\tend",
"def after_sign_in_path_for(_resource)\n root_url\n end",
"def get_location_or_redirect(options = {})\n redirect_to(options) if get_location() == nil\n end",
"def root_url\n @response.env[:url].to_s if @response\n end",
"def default_domain_name\n return @default_domain_name\n end",
"def default_domain_name\n return @default_domain_name\n end",
"def default_photo_url\n self.dig_for_string(\"agentSummary\", \"defaultPhotoURL\")\n end",
"def default_path\n @default_path ||= h.can?(:update, object) ? h.edit_form_path(object) : h.form_path(object)\n end",
"def base_url\n Thread.current[\"GopDataTrust/Api/@base_url\"] || connect\n raise \"Must Connect To GOP Data Trust\" if Thread.current[\"GopDataTrust/Api/@base_url\"].nil?\n Thread.current[\"GopDataTrust/Api/@base_url\"]\n end",
"def default\n @default\n end",
"def request_uri\n return nil if absolute? && scheme !~ /^https?$/\n res = path.to_s.empty? ? \"/\" : path\n res += \"?#{self.query}\" if self.query\n return res\n end",
"def after_sign_in_path_for(resource)\n return request.env['omniauth.origin'] || stored_location_for(resource) || dashboards_path\n end"
] | [
"0.79390293",
"0.712423",
"0.7068772",
"0.6894101",
"0.6789881",
"0.6772224",
"0.66421217",
"0.64668953",
"0.6448141",
"0.6378798",
"0.6301478",
"0.6301478",
"0.62106204",
"0.619998",
"0.6076179",
"0.5982506",
"0.59707266",
"0.58956194",
"0.5891372",
"0.58802384",
"0.58802384",
"0.5871532",
"0.5848781",
"0.58211935",
"0.5817468",
"0.5814125",
"0.5782052",
"0.5762525",
"0.57150376",
"0.57150376",
"0.5692274",
"0.56732184",
"0.56560165",
"0.5576188",
"0.554305",
"0.54520965",
"0.54325384",
"0.53805244",
"0.5359707",
"0.5359707",
"0.5358417",
"0.5357437",
"0.53261983",
"0.53237504",
"0.5322788",
"0.5318538",
"0.5304",
"0.52993596",
"0.5249924",
"0.52477324",
"0.52373296",
"0.52327627",
"0.5226692",
"0.52240103",
"0.52124226",
"0.51900786",
"0.51865464",
"0.5186476",
"0.51829916",
"0.5175072",
"0.51692235",
"0.5138077",
"0.5129477",
"0.51233417",
"0.512019",
"0.5110114",
"0.5108667",
"0.51014596",
"0.50990015",
"0.50946695",
"0.50946695",
"0.50946695",
"0.50883514",
"0.50877297",
"0.50842655",
"0.507336",
"0.50680166",
"0.5066852",
"0.50630915",
"0.506029",
"0.50566053",
"0.50514567",
"0.5048134",
"0.5045503",
"0.5024948",
"0.5024358",
"0.5022469",
"0.5016105",
"0.5005437",
"0.4999789",
"0.499937",
"0.49970767",
"0.49820155",
"0.49820155",
"0.497596",
"0.49685958",
"0.4966574",
"0.49611816",
"0.4960667",
"0.49595892"
] | 0.84372884 | 0 |
Sets the defaultRedirectUri property value. The defaultRedirectUri property | def default_redirect_uri=(value)
@default_redirect_uri = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def default_redirect_uri\n return @default_redirect_uri\n end",
"def set_RedirectURI(value)\n set_input(\"RedirectURI\", value)\n end",
"def set_RedirectURI(value)\n set_input(\"RedirectURI\", value)\n end",
"def redirect_uri_settings=(value)\n @redirect_uri_settings = value\n end",
"def redirect_path(name, default = nil)\n stored_redirect_path(name) || default || root_path\n end",
"def redirectUris=(uris)\n self.redirect_url = uris.first\n end",
"def set_redirect_location\n @redirect_location = @shareable\n end",
"def redirect_uri= new_redirect_uri\n new_redirect_uri = Addressable::URI.parse new_redirect_uri\n # TODO: - Better solution to allow google postmessage flow. For now, make an exception to the spec.\n unless new_redirect_uri.nil? || new_redirect_uri.absolute? || uri_is_postmessage?(new_redirect_uri) ||\n uri_is_oob?(new_redirect_uri)\n raise ArgumentError, \"Redirect URI must be an absolute URI.\"\n end\n @redirect_uri = new_redirect_uri\n end",
"def set_redirect\n @redirect = params[:origin_url] == nil ? bookmarks_path : params[:origin_url]\n end",
"def redirect_uri\n @redirect_uri ||= root_url[0..-2] + oauth_callback_path\n end",
"def default_redirect_url_after_sign_out\n QAuthRubyClient.configuration.default_redirect_url_after_sign_out\n end",
"def redirect_uri\n @redirect_uri\n end",
"def get_redirect_path(default=root_path)\n if params.key? :redirect_path\n @redirect_path = params[:redirect_path]\n elsif not @vertical.nil?\n if @vertical.class == \"Assignment\"\n @redirect_path = show_assignment_path(@vertical)\n else\n @redirect_path = get_vertical_path(@vertical)\n end\n else\n @redirect_path = default\n end\n @redirect_path\n end",
"def redirect_uri=(redirect_uri)\n if !redirect_uri.nil? && redirect_uri.to_s.length > 256\n fail ArgumentError, 'invalid value for \"redirect_uri\", the character length must be smaller than or equal to 256.'\n end\n\n if !redirect_uri.nil? && redirect_uri.to_s.length < 1\n fail ArgumentError, 'invalid value for \"redirect_uri\", the character length must be great than or equal to 1.'\n end\n\n @redirect_uri = redirect_uri\n end",
"def redirect_uris=(value)\n @redirect_uris = value\n end",
"def redirect_uri\n @payload.present? ? @payload['redirect'] : @redirect_uri\n end",
"def redirect_to=(value)\n @redirect_to = value\n end",
"def default_url\n nil\n end",
"def redirect_url\n @_redirect_url ||= public_child_redirect_url || controller_and_action_url ||\n nil\n end",
"def default_uri\n URI.parse('//' + @default_host + '/')\n end",
"def redirect_uri_settings\n return @redirect_uri_settings\n end",
"def openid_redirect_uri=(_arg0); end",
"def redirect_back_or_default(default)\n redirect_to(session[:request_uri] || default)\n session[:request_uri] = nil\n end",
"def auto_redirect(options = {})\n\t\t# TODO: document that :exclude may also be a Hash, Array or String.\n\t\tshould_redirect_to_default = false\n\t\tif options[:exclude]\n\t\t\tinfo = get_redirection_information\n\t\t\tif info\n\t\t\t\tshould_redirect_to_default = match_exclusion_list(info,\n\t\t\t\t\toptions[:exclude])\n\t\t\tend\n\t\tend\n\t\tif !should_redirect_to_default\n\t\t\tshould_redirect_to_default = !attempt_auto_redirect\n\t\tend\n\t\tif should_redirect_to_default\n\t\t\tredirect_to(options[:default] || root_path)\n\t\tend\n\tend",
"def redirect_to_referer_or_default(default)\n\t\tredirect_to( session[:refer_to] || \n\t\t\trequest.env[\"HTTP_REFERER\"] || default )\n\t\tsession[:refer_to] = nil\n\tend",
"def actual_uri\n redirects_to or uri\n end",
"def redirect_back_or_default(default = root_url(:protocol => \"http\"))\n # be sure we aren't returning the login, register or logout page\n if valid_return_to_url\n url = CGI.unescape(return_to_url)\n url = {:controller => url, :protocol => \"http\"} unless url.match(\"://\")\n redirect_to(url)\n else\n redirect_to(default)\n end\n store_location(nil)\n return false\n end",
"def set_url\n @url = DEFAULT_URL\n end",
"def base_uri=(base_uri)\n default_application.base_uri = base_uri\n end",
"def hubssolib_redirect_back_or_default(default)\n url = hubssolib_get_return_to\n hubssolib_set_return_to(nil)\n\n redirect_to(url || default)\n end",
"def redirect_to_back_or_default(default = root_url)\n if request.env[\"HTTP_REFERER\"].present? and request.env[\"HTTP_REFERER\"] != request.env[\"REQUEST_URI\"]\n redirect_to :back\n else\n redirect_to default\n end\n end",
"def redirect_to_referer_or_default(default)\n#\t\tredirect_to(session[:refer_to] || default)\n#\tI don't quite know why the writer required that the developer set the :refer_to.\n\t\tredirect_to( session[:refer_to] || request.env[\"HTTP_REFERER\"] || default )\n\t\tsession[:refer_to] = nil\n\tend",
"def set_default_values\n set_url_parts(ssl_enabled? ? 'https://' : 'http://', domain)\n end",
"def redirect_back_or_default(default)\n session[:redirect_after_login] ? \n redirect_to(session[:redirect_after_login]) : \n redirect_to(default)\n\n session[:redirect_after_login] = nil\n end",
"def default_url\n url 'default'\n end",
"def redirect_to_forwarding_url_or(default)\n redirect_to(session[:forwarding_url] || default)\n session.delete(:forwarding_url)\n end",
"def redirect_back_or_default(default)\n redirect_to url_for_redirect(default)\n end",
"def redirect_back_or_default(default)\n redirect_to(pop_stored_location || default)\n end",
"def default_route\n @default_route ||= '/'\n end",
"def set_NoRedirect(value)\n set_input(\"NoRedirect\", value)\n end",
"def redirect_uri\n\t\[email protected]_uri.to_s\n\tend",
"def default(default)\n @default = default\n end",
"def redirect_uri\n host = headers['Host']\n uri = \"#{path}/\"\n uri = \"#{uri}?#{query}\" unless (query || '').empty?\n uri = \"http://#{host}#{uri}\" if host\n uri\n end",
"def default_redirect_url_after_sign_in\n admin_dashboard_url \n end",
"def default_url\n end",
"def default\n lambda { res.redirect('/', 301) }\n end",
"def default_sign_in_url\n sign_in_url\n end",
"def redirect_back_or_default(default)\n redirect_to(pop_stored_location || default)\n end",
"def redirect_to_stored_location_or(default)\n redirect_to(session[:forward_url] || default)\n session.delete(:forward_url)\n end",
"def set_default!\n @@default_user = self\n end",
"def default_url_options=(_arg0); end",
"def default_sign_in_url\n user_sign_in_url\n end",
"def redirect_url; end",
"def default_url(context)\n end",
"def default(default)\n @default = default\n self\n end",
"def redirect_back_or_default(default: root_path, **args)\n redirect_back fallback_location: default, allow_other_host: false, **args\n end",
"def callback_url\n options[:redirect_uri] || (full_host + script_name + callback_path)\n end",
"def callback_url\n options[:redirect_uri] || (full_host + script_name + callback_path)\n end",
"def set_default_slug\n permalink.slug = default_slug unless permalink.slug.present?\n end",
"def default_url_options\n if defined?(Settings.application.protocol) && !Settings.application.protocol.blank?\n Rails.logger.debug(\"Setting default URL protocol to #{Settings.application.protocol}\")\n {protocol: Settings.application.protocol}\n else\n {}\n end\n end",
"def redirect(path=(no_add_script_name = true; default_redirect_path), status=default_redirect_status)\n opts = roda_class.opts\n absolute_redirects = opts[:absolute_redirects]\n prefixed_redirects = no_add_script_name ? false : opts[:prefixed_redirects]\n path = uri(path, absolute_redirects, prefixed_redirects) if absolute_redirects || prefixed_redirects\n super(path, status)\n end",
"def default_url_options; end",
"def default_url_options\n {}\n end",
"def redirect_back_or(default)\n redirect_to(session[:forwarding_url] || default)\n session.delete(:forwarding_url)\n end",
"def redirect_back_or(default)\n redirect_to(session[:forwarding_url] || default)\n session.delete(:forwarding_url)\n end",
"def redirect_back_or_default(default)\n loc = session[:return_to] || default\n session[:return_to] = nil\n redirect loc\n end",
"def redirect_back_or_default(default=nil)\n default = self.default_route\n redirect_to(session[:return_to] || default)\n session[:return_to] = nil\n end",
"def default_scopes(*scopes)\n @config.instance_variable_set(:@default_scopes, OAuth::Scopes.from_array(scopes))\n end",
"def redirect(options = {})\r\n end",
"def set_config\n redirect\n end",
"def set_client_redirect_uris(client_key, opts = {})\n set_client_redirect_uris_with_http_info(client_key, opts)\n return nil\n end",
"def redirect_back_or_default(default)\n redirect_to(session[:return_to] || default, alert: \"Login Successful, Welcome Back!\")\n session[:return_to] = nil\n end",
"def update_permanent_uri(options={})\n for uri, response in @redirects\n break if response.status != \"301\"\n self.resource.permanent_uri =\n Addressable::URI.parse(response.headers[\"Location\"])\n end\n end",
"def default_url_options\n Linkable.default_url_options\n end",
"def set_default_location\n self.location = Rails.application.config.classifeds_default_location;\n end",
"def redirect_back_or_default(default)\n session[:return_to] = nil if session[:return_to] =~ /user_session/\n redirect_to(session[:return_to] || default)\n session[:return_to] = nil\n end",
"def redirect_back_or_default(default=root_path)\n redirect_to back_url(default)\n end",
"def redirect_back_or(default)\n redirect_to(session[:forwarding_url] || default)\n session.delete(:forwarding_url)\n # Delete after the redirect so that the user will not be forwarded to the\n # same URL upon each login attempt.\n # Redirects always wait for the rest of the code block to return before\n # actually redirecting.\n end",
"def default=(new_default)\n @default_proc = nil\n @default = new_default\n end",
"def redirect_to_target(default=nil)\n \n goto_url=params[:return_to] || session[:return_to] || default || \"/\"\n \n session[:return_to] = nil\n redirect_to(goto_url)\n end",
"def redirect_back_or(default)\n redirect_to(session[:forwarding_url] || default)\n session.delete(:forwarding_url) # Delete the stored URL for next log in\n end",
"def redirect_back_or(default)\n redirect_to(session[:forwarding_url] || default)\n session.delete(:forwarding_url)\n end",
"def base_uri=(value)\n raise ConfigurationInvalid, \"Invalid value for base uri, should be a string\" if !value.is_a?(String)\n @base_uri ||= value\n end",
"def default_path\n '/'\n end",
"def addDefaultGraph(uri) \n\n\t\tif uri \n\t\t self._querytext.push([\"default-graph-uri\",uri])\n\t\tend\n\tend",
"def redirect_back_or(default)\n redirect_to(session[:forwarding_url] || default )\n session.delete(:forwarding_url)\n end",
"def redirect_url\n\t\tcallback_url\n\tend",
"def redirect_back_or_default(default)\n redirect_to(location_stored? ? session[:return_to] : default)\n session[:return_to] = nil\n end",
"def redirect_url\n @redirect_url ||= pxpay_request.url rescue add_gateway_error\n end",
"def redirect_uri=(uris)\n super(uris.is_a?(Array) ? uris.join(\"\\n\") : uris)\n end",
"def redirect_uri=(uris)\n super(uris.is_a?(Array) ? uris.join(\"\\n\") : uris)\n end",
"def redirect_uri=(uris)\n super(uris.is_a?(Array) ? uris.join(\"\\n\") : uris)\n end",
"def redirect_back_or(default)\n redirect_to(session[:forwarding_url] || default)\n # The following deletion happens even though the redirect stastement is written first.\n # This is because the redirect doesn't actually happen until an explicit\n # return statement or until the end of a method.\n session.delete(:forwarding_url)\n end",
"def redirect_back_or(default)\n\t\tredirect_to(session[:forwarding_url] || default )\n\t\tsession.delete(:forwarding_url)\n\tend",
"def redirect_back_or(default)\n redirect_to(session[:forwarding_url] || default)\n session.delete(:forwarding_url)\n end",
"def redirect_back_or_default(default)\n redirect_to(session[:return_to] || default)\n session[:return_to] = nil\n end",
"def redirect_back_or_default(default)\n redirect_to(session[:return_to] || default)\n session[:return_to] = nil\n end",
"def redirect_back_or_default(default)\n redirect_to(session[:return_to] || default)\n session[:return_to] = nil\n end",
"def redirect_back_or_default(default)\n redirect_to(session[:return_to] || default)\n session[:return_to] = nil\n end",
"def redirect_back_or_default(default)\n redirect_to(session[:return_to] || default)\n session[:return_to] = nil\n end"
] | [
"0.75363123",
"0.7103814",
"0.7103814",
"0.6750082",
"0.63907325",
"0.63141084",
"0.6260519",
"0.6216437",
"0.6175126",
"0.6039395",
"0.6028759",
"0.5993921",
"0.58519584",
"0.58384097",
"0.57919306",
"0.57319844",
"0.5691489",
"0.5670515",
"0.56685466",
"0.56289655",
"0.5610591",
"0.5575724",
"0.55584306",
"0.5557703",
"0.55521524",
"0.55426925",
"0.55116785",
"0.5477963",
"0.5463594",
"0.5463125",
"0.5413331",
"0.5404267",
"0.5403478",
"0.5396832",
"0.53877467",
"0.53768426",
"0.53137726",
"0.53058505",
"0.5301517",
"0.5289866",
"0.5274748",
"0.5264393",
"0.5256927",
"0.525252",
"0.52475816",
"0.52414364",
"0.5234506",
"0.5230757",
"0.5216023",
"0.5213077",
"0.520454",
"0.5177957",
"0.5172895",
"0.51703036",
"0.5158822",
"0.5144701",
"0.5142265",
"0.5142265",
"0.5129128",
"0.51198316",
"0.5113748",
"0.50962055",
"0.50767046",
"0.505205",
"0.505205",
"0.5051372",
"0.503749",
"0.50349814",
"0.5032698",
"0.50227237",
"0.50190586",
"0.5014928",
"0.5013263",
"0.5009084",
"0.5006979",
"0.5006672",
"0.50061584",
"0.5004225",
"0.49966806",
"0.49947378",
"0.49895716",
"0.49768785",
"0.4969865",
"0.49669665",
"0.4962039",
"0.49592254",
"0.4955791",
"0.49536607",
"0.49508646",
"0.49478588",
"0.49478588",
"0.49478588",
"0.49445912",
"0.49432057",
"0.49364972",
"0.4935851",
"0.4935851",
"0.4935851",
"0.4935851",
"0.4935851"
] | 0.86798406 | 0 |
Gets the description property value. Free text field to provide a description of the application object to end users. The maximum allowed size is 1024 characters. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. | def description
return @description
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def description\n object[\"description\"]\n end",
"def description\n field[:description]\n end",
"def get_description\n get_field_config['description']\n end",
"def description\n if description_attribute = read_attribute(:description)\n description_attribute\n elsif self.properties && self.properties['description'].present?\n self.properties['description']\n else\n default_description\n end\n end",
"def get_description\n @description\n end",
"def description\n data[:description]\n end",
"def description\n data[:description]\n end",
"def description\n text_attribute('description')\n end",
"def description\n fields['description']\n end",
"def description\n search_by_itemprop 'description'\n end",
"def description\n @attributes[:description]\n end",
"def description\n metadata[:description]\n end",
"def description\n @description\n end",
"def description\n @description\n end",
"def description\n @description\n end",
"def description\n @description\n end",
"def description\n data['description']\n end",
"def description\n\n return @description\n\n end",
"def description\n @data['description']\n end",
"def description\n response_json = @client.api_get_request('', 'tree=description')\n response_json['description']\n end",
"def description\n attributes.fetch(:description)\n end",
"def get_description\n return @m_description\n end",
"def get_description\n return @m_description\n end",
"def description\n return @description\n end",
"def description\n data.description\n end",
"def description\n data.description\n end",
"def description\n data.description\n end",
"def description\n @data['description']\n end",
"def description\n @data['description']\n end",
"def description\n @data['description']\n end",
"def description\n read_attribute(:description) || \"n/a\"\n end",
"def getDescription\r\n\t\t\t\t\treturn @description\r\n\t\t\t\tend",
"def getDescription\r\n\t\t\t\t\treturn @description\r\n\t\t\t\tend",
"def description\n read_attribute(:description).presence || self.original_description\n end",
"def description()\n @description.nil? ? raw_description : @description\n end",
"def description\n\t\t\t@data[\"description\"]\n\t\tend",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description=(value)\n @description = value\n end",
"def description\n data['Description']\n end",
"def description\n self[:description] || name\n end",
"def description\n desc = object.description.to_s\n desc = h.strip_tags(markdown.render(desc)).strip # Escape HTML and remove Markdown\n\n if desc.blank? or [\"[!\", \"[](\", \"===\", \"```\"].any? { |s| desc.include? s }\n \"<em>#{ DESCRIPTION_UNAVAILABLE }</em>\".html_safe\n else\n desc = \"#{ desc }.\" if /\\w/ =~ desc.last # Add trailing dot\n desc[0] = desc[0].upcase # Capitalize 1st letter\n desc.html_safe\n end\n end",
"def description\n @options[:description] ||= fetch(:description)\n end",
"def description\n meta['description'] || extract_description\n end",
"def description\n self[:description]\n end",
"def description\n parameter[:description]\n end",
"def description\n\t\t\treturn @description || self.generate_description\n\t\tend",
"def description(val = NULL)\n if null?(val)\n @description\n else\n @description = val\n end\n end",
"def long_description\n if @model\n return (@long_description || @model.long_description.to_s)\n end\n return @long_description.to_s\n end",
"def description\n @description || Defaults::DEFAULT_DESCRIPTION\n end"
] | [
"0.7258778",
"0.7198627",
"0.70830476",
"0.7055561",
"0.7048524",
"0.6981739",
"0.6981739",
"0.69618833",
"0.6945104",
"0.6900204",
"0.68927485",
"0.6888026",
"0.6885215",
"0.6885215",
"0.6885215",
"0.6885215",
"0.68654567",
"0.6860026",
"0.6847789",
"0.6846911",
"0.68060035",
"0.6801547",
"0.6801547",
"0.6772606",
"0.6756471",
"0.6756471",
"0.6756471",
"0.6753076",
"0.6753076",
"0.6750197",
"0.6742815",
"0.6730122",
"0.6730122",
"0.67251664",
"0.67204434",
"0.6718333",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.67115474",
"0.6699685",
"0.66979724",
"0.66945565",
"0.66828495",
"0.66811293",
"0.667073",
"0.6635101",
"0.6628073",
"0.65956295",
"0.6575518",
"0.6571894"
] | 0.677902 | 48 |
Sets the description property value. Free text field to provide a description of the application object to end users. The maximum allowed size is 1024 characters. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. | def description=(value)
@description = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def description=(v)\n @description = v\n end",
"def description=(val)\n self[:description] = val\n end",
"def description=(description)\n if !description.nil? && description.to_s.length > 1024\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 1024.'\n end\n\n @description = description\n end",
"def description=(description)\n if !description.nil? && description.to_s.length > 1024\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 1024.'\n end\n\n @description = description\n end",
"def description=(description)\n if description.to_s.length > 255\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 255.'\n end\n\n @description = description\n end",
"def set_description(description)\n @description = description\n end",
"def description=(description)\n if !description.nil? && description.to_s.length > 512\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 512.'\n end\n\n @description = description\n end",
"def description=(description)\n if !description.nil? && description.to_s.length > 255\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 255.'\n end\n\n @description = description\n end",
"def description=(description)\n if !description.nil? && description.to_s.length > 255\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 255.'\n end\n\n @description = description\n end",
"def description=(description)\n if !description.nil? && description.to_s.length > 255\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 255.'\n end\n\n @description = description\n end",
"def description=(description)\n if !description.nil? && description.to_s.length > 255\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 255.'\n end\n\n @description = description\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def description=(description)\n\n if !description.nil? && description.to_s.length > 100\n fail ArgumentError, \"invalid value for 'description', the character length must be smaller than or equal to 100.\"\n end\n\n @description = description\n end",
"def description=(description)\n if !description.nil? && description.to_s.length > 2000\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 2000.'\n end\n\n @description = description\n end",
"def description=(description)\n if description.nil?\n fail ArgumentError, \"description cannot be nil\"\n end\n\n if description.to_s.length > 100\n fail ArgumentError, \"invalid value for 'description', the character length must be smaller than or equal to 100.\"\n end\n\n @description = description\n end",
"def description=(description)\n if description.nil?\n fail ArgumentError, 'description cannot be nil'\n end\n\n if description.to_s.length > 4096\n fail ArgumentError, 'invalid value for \"description\", the character length must be smaller than or equal to 4096.'\n end\n\n @description = description\n end",
"def description=(str)\n @description = str\n end",
"def description(description)\n @controller.description = description\n end",
"def desc( description )\n @description = description\n end",
"def setDescription(description)\r\n\t\t\t\t\t@description = description\r\n\t\t\t\tend",
"def setDescription(description)\r\n\t\t\t\t\t@description = description\r\n\t\t\t\tend",
"def description=(new_description)\n @description = new_description[0..15_000]\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def set_Description(value)\n set_input(\"Description\", value)\n end",
"def description=(description)\n end",
"def description=(description)\n if !description.nil? && description.to_s.length < 0\n fail ArgumentError, 'invalid value for \"description\", the character length must be great than or equal to 0.'\n end\n\n @description = description\n end",
"def set_description(v)\n Saklient::Util::validate_type(v, 'String')\n @m_description = v\n @n_description = true\n return @m_description\n end",
"def set_description(v)\n Saklient::Util::validate_type(v, 'String')\n @m_description = v\n @n_description = true\n return @m_description\n end",
"def setDescription(description)\n @description = description.to_s\n end",
"def desc(description)\n last_options[:description] = description\n end",
"def description=(description)\r\n\t\t\t`#{BITS::BITSADMIN} /setdescription {#{@id}} \\\"#{description}\\\"`\r\n\t\tend",
"def device_description=(value)\n @device_description = value\n end",
"def description(value)\n @ole.Description = value\n nil\n end",
"def description(value)\n @ole.Description = value\n nil\n end",
"def description=(str)\n @description = str.to_s\n end",
"def set_description(desc)\n @result.description = desc\n end",
"def description(desc = nil)\n @description = desc if desc\n @description\n end",
"def describe(description)\n @description = description\n end",
"def description=(str)\n @description = str\n write_properties\n end",
"def description=(desc)\n zombie_check\n @metadata.update(@name, desc: desc) \n end",
"def description= new_description\n @gapi.update! description: new_description\n end",
"def description= new_description\n patch_gapi! description: new_description\n end",
"def set_description\n @description = Description.find(params[:id])\n end",
"def description(str)\n @description = str\n end",
"def description(description)\n rules.last.description = description\n end",
"def description\n @description = \"Espresso\"\n end",
"def update(description) # :nodoc:\n @description = description\n self\n end",
"def update(description) # :nodoc:\n @description = description\n self\n end",
"def description\n @options[:description] ||= fetch(:description)\n end",
"def set_description\n self.description = \"#{self.manufacturer.code} #{self.manufacturer_model}\" unless self.manufacturer.nil?\n end",
"def description=(new_desc)\n @options[:connection].put(\"/namespaces/#{path}\", :payload => {:description => new_desc})\n @options[:description] = new_desc\n end",
"def description=(value)\n super(\"value\" => value)\n end",
"def description=(value)\n super(\"value\" => value)\n end",
"def description(text = nil)\n @description = text if text\n @description if defined?(@description)\n end",
"def set_description\n\t\t@description = \"Sales by Rails\"\n\tend",
"def description(desc = NO_VALUE)\n if desc == NO_VALUE\n return @description\n else\n @description = desc\n end\n end",
"def desc(description, options = {})\n @last_description = options.merge(description: description)\n end",
"def description(text = nil)\n @description = text if text\n @description if defined?(@description)\n end",
"def description=(description)\n @description = description\n @config_doc.elements[\"/project/description\"].text = description\n @config = @config_doc.to_s\n update\n end",
"def description=(desc)\n @link.Description = desc\n end",
"def desc(text = nil)\n @description = text if text\n @description\n end",
"def add_description (description)\r\n fail \"Missing description.\" if (description == nil)\r\n self.description = description\r\n end",
"def description(val = NULL)\n if null?(val)\n @description\n else\n @description = val\n end\n end",
"def description=(description)\n @description = description\n @config_doc.elements[\"/project/description\"].text = description\n @config = @config_doc.to_s\n update\n end"
] | [
"0.7635762",
"0.7573344",
"0.7453193",
"0.7453193",
"0.7394257",
"0.73810095",
"0.7363546",
"0.73487115",
"0.73487115",
"0.73487115",
"0.73487115",
"0.7323671",
"0.7316302",
"0.73019314",
"0.7264098",
"0.72494096",
"0.7234142",
"0.7222581",
"0.7221341",
"0.71890163",
"0.71890163",
"0.71183294",
"0.71081835",
"0.71081835",
"0.71081835",
"0.71081835",
"0.71081835",
"0.71081835",
"0.71081835",
"0.71081835",
"0.71081835",
"0.71081835",
"0.71081835",
"0.71081835",
"0.7100302",
"0.70667464",
"0.7004204",
"0.7004204",
"0.69678235",
"0.696141",
"0.6961043",
"0.6939836",
"0.69240695",
"0.69240695",
"0.6914848",
"0.6912535",
"0.6902668",
"0.690195",
"0.68932235",
"0.6804916",
"0.6663307",
"0.6636774",
"0.6624097",
"0.6583002",
"0.65671617",
"0.65239316",
"0.6506752",
"0.6506752",
"0.6505847",
"0.6499437",
"0.6493003",
"0.6491367",
"0.6491367",
"0.648583",
"0.6481675",
"0.64781237",
"0.6457447",
"0.64469796",
"0.6445014",
"0.6435805",
"0.64312625",
"0.6431141",
"0.6426191",
"0.64160794"
] | 0.78287834 | 22 |
Gets the disabledByMicrosoftStatus property value. Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). | def disabled_by_microsoft_status
return @disabled_by_microsoft_status
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def disabled_by_microsoft_status=(value)\n @disabled_by_microsoft_status = value\n end",
"def disabled?\n status == 'disabled'\n end",
"def disable_power_policies\n return @disable_power_policies\n end",
"def disabled_warnings\n Dynamic[:disabled_warnings]\n end",
"def is_enabled_for_microsoft_store_for_business\n return @is_enabled_for_microsoft_store_for_business\n end",
"def disabled?\n Support.new(ENV, verbose: verbose).disabled?\n end",
"def windows_enabled\n return @windows_enabled\n end",
"def disabled?\n @disabled ||= (user_configuration_from_key('disabled') || false)\n end",
"def disabled?\n @disabled ||= (user_configuration_from_key('disabled') || false)\n end",
"def disabled?\n\t\t\tuserAccountControl.to_i & UAC_ACCOUNT_DISABLED != 0\n\t\tend",
"def disabled?\n !Agent.config[:agent_enabled]\n end",
"def disabled?\n @disabled\n end",
"def disabled\n @attributes[:disabled]\n end",
"def inactive_status?\n status.type.abbreviation == 'inactive' rescue false\n end",
"def windows_enabled=(value)\n @windows_enabled = value\n end",
"def bypass_inactive_disable\n @attributes[:bypass_inactive_disable]\n end",
"def is_enabled_for_microsoft_store_for_business=(value)\n @is_enabled_for_microsoft_store_for_business = value\n end",
"def disabled?\n \n return ! @enabled\n\n end",
"def disabled?(thing)\n !enabled?(thing)\n end",
"def disabled?\n !enabled?\n end",
"def power_off_blocked\n return @power_off_blocked\n end",
"def disable_power_policies=(value)\n @disable_power_policies = value\n end",
"def managed_app_statuses\n return @managed_app_statuses\n end",
"def miqAlarmSpecDisabled\n alarmSpec = @miqAlarmSpecEnabled.clone\n alarmSpec.enabled = \"false\"\n (alarmSpec)\n end",
"def office_integration_enabled\n @attributes[:office_integration_enabled]\n end",
"def blacklisted_value\n 'blacklisted'\n end",
"def disabled?\n !enabled?\n end",
"def status\n return :not_confirmed unless confirmed?\n return :disabled unless enabled?\n \n :enabled\n end",
"def app_store_blocked\n return @app_store_blocked\n end",
"def disabled?\n self.disabled = !site.incremental? if disabled.nil?\n disabled\n end",
"def inactive?\n (status == INACTIVE)\n end",
"def disabled?\n state == :DISABLED\n end",
"def disabled?\n \n return ! @enabled\n \n end",
"def location_services_blocked\n return @location_services_blocked\n end",
"def disabled\n systems = select do |system|\n next unless system.respond_to?(:enabled?)\n !system.enabled?\n end\n systems.each { |system| yield system } if block_given?\n systems.extend(Collections)\n end",
"def has_disabled?\n options.key?(:disabled) ? options[:disabled] : disabled_by_policy?\n end",
"def is_disabled?\n client = RestClient.where(:api_key => @api_key).first\n return true if client.nil?\n client.is_disabled\n end",
"def inactive?\n self.status == \"Inactive\"\n end",
"def early_launch_anti_malware_driver_enabled\n return @early_launch_anti_malware_driver_enabled\n end",
"def blocked?\n (status == ConfigCenter::User::BLOCKED)\n end",
"def sms_enabled\n if self.user.verified?\n self[:sms_enabled]\n else\n false\n end\n end",
"def enabled\n @ole.Enabled\n end",
"def disabled?\n @disabled == true\n end",
"def revoke_on_unenroll_disabled\n return @revoke_on_unenroll_disabled\n end",
"def android_mobile_application_management_enabled\n return @android_mobile_application_management_enabled\n end",
"def azure_rights_management_services_allowed\n return @azure_rights_management_services_allowed\n end",
"def disabled?\n self.disabled || self.account.blank? || Rails.env.development?\n end",
"def status_value(status)\n if status\n \"Active\"\n else\n \"Disabled\"\n end\n end",
"def ios_mobile_application_management_enabled\n return @ios_mobile_application_management_enabled\n end",
"def disabled_mail\n Accounts.disabled_mail\n end",
"def disabled?\n\n return ! @enabled\n \n end",
"def webs_disabled?\n fw_sig_permission_level == Webs::PermissionLevel[:disabled].to_s\n end",
"def disable_account_manager\n return @disable_account_manager\n end",
"def auto_blocked_status\n 'auto_blocked'\n end",
"def config_disabled(thing)\n check = thing.to_s\n to_check = [Carnivore::Config.get(:fission, :core, :disable)].flatten.compact\n to_check.include?(check)\n end",
"def disabled=(val)\n @@lock.synchronize { @@disabled = val }\n end",
"def apple_news_blocked\n return @apple_news_blocked\n end",
"def disable_edu_policies\n return @disable_edu_policies\n end",
"def disabled?\n state.zero?\n end",
"def wi_fi_blocked\n return @wi_fi_blocked\n end",
"def enabled\n if @property_hash[:enabled].nil?\n :absent\n else\n @property_hash[:enabled]\n end\n end",
"def voice_assistant_blocked\n return @voice_assistant_blocked\n end",
"def enabled?\n status == 'enabled'\n end",
"def inactive_message\n disabled? ? :disabled : super\n end",
"def active_malware_detection_count\n return @active_malware_detection_count\n end",
"def disable_lost_mode()\n return MicrosoftGraph::Users::Item::ManagedDevices::Item::DisableLostMode::DisableLostModeRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def disabled?\n false\n end",
"def windows_device_blocked_on_missing_partner_data\n return @windows_device_blocked_on_missing_partner_data\n end",
"def software_status=(software_status)\n validator = EnumAttributeValidator.new('String', [\"Missing-Os-Driver-Info\", \"Incompatible-Server-With-Component\", \"Incompatible-Processor\", \"Incompatible-Os-Info\", \"Incompatible-Component-Model\", \"Incompatible-Firmware\", \"Incompatible-Driver\", \"Incompatible-Firmware-Driver\", \"Service-Unavailable\", \"Service-Error\", \"Unrecognized-Protocol\", \"Not-Evaluated\", \"Compatible\"])\n unless validator.valid?(software_status)\n fail ArgumentError, \"invalid value for \\\"software_status\\\", must be one of #{validator.allowable_values}.\"\n end\n @software_status = software_status\n end",
"def early_launch_anti_malware_driver_enabled=(value)\n @early_launch_anti_malware_driver_enabled = value\n end",
"def location_services_blocked=(value)\n @location_services_blocked = value\n end",
"def enabled\n select(&:enabled?)\n end",
"def messages_blocked\n return @messages_blocked\n end",
"def invalid_status\n\t\tinvalid = false\n\t\tif self.status_changed?\n\t\t\tinvalid = self.status_was != \"active\"\n\t\tend\n\tend",
"def enabled\n !false?(configuration[:enabled])\n end",
"def managed_app_statuses=(value)\n @managed_app_statuses = value\n end",
"def guests_disabled?\n !AppConfig.check(:enable_guests)\n end",
"def endorsements_blocked?\n current_settings.endorsements_blocked\n end",
"def voice_dialing_blocked\n return @voice_dialing_blocked\n end",
"def voice_dialing_blocked\n return @voice_dialing_blocked\n end",
"def performance_insights_enabled\n data[:performance_insights_enabled]\n end",
"def performance_insights_enabled\n data[:performance_insights_enabled]\n end",
"def media_bypass_enabled\n return @media_bypass_enabled\n end",
"def visuals_enabled(value)\n @ole.VisualsEnabled = value\n nil\n end",
"def enabled\n return @enabled\n end",
"def enabled\n return @enabled\n end",
"def enabled\n return @enabled\n end",
"def is_enabled\n return @is_enabled\n end",
"def is_enabled\n return @is_enabled\n end",
"def is_enabled\n return @is_enabled\n end",
"def is_enabled\n return @is_enabled\n end",
"def is_enabled\n return @is_enabled\n end",
"def is_enabled\n return @is_enabled\n end",
"def is_enabled\n return @is_enabled\n end",
"def disable\n @service.disabled = true\n end",
"def inactive_user?\n self.status == \"Inactive\"\n end",
"def bit_locker_enabled\n return @bit_locker_enabled\n end",
"def disable_polling(reason = nil)\n self.deactivate\n self.deactivation_reason = reason.to_s\n self.deactivated_at = Time.now\n self.save!\n end",
"def site_unavailable\n @attributes[:site_unavailable]\n end",
"def unavailable?\n status.to_s.start_with? Status::UNAVAILABLE\n end"
] | [
"0.75469023",
"0.57852405",
"0.5667111",
"0.5564806",
"0.54903483",
"0.54432434",
"0.5398225",
"0.5366968",
"0.5332331",
"0.52849025",
"0.5185226",
"0.51567644",
"0.5125106",
"0.51179177",
"0.51010317",
"0.5089435",
"0.507776",
"0.50494677",
"0.5042698",
"0.50192",
"0.5018934",
"0.50158197",
"0.50153035",
"0.5011731",
"0.5011196",
"0.5006295",
"0.49983236",
"0.49919716",
"0.49692708",
"0.49681386",
"0.4966628",
"0.4965293",
"0.4955407",
"0.49546716",
"0.49443504",
"0.49268988",
"0.49091798",
"0.49022982",
"0.4901266",
"0.4881495",
"0.48652166",
"0.48336357",
"0.48282814",
"0.4816717",
"0.48137698",
"0.47777858",
"0.4775778",
"0.47587714",
"0.47563034",
"0.47468323",
"0.47376105",
"0.4721168",
"0.471791",
"0.4715997",
"0.47125345",
"0.47097334",
"0.4703703",
"0.47028822",
"0.46974787",
"0.46968785",
"0.467576",
"0.46757492",
"0.4650501",
"0.464863",
"0.463219",
"0.46245402",
"0.4623327",
"0.46209803",
"0.4610952",
"0.46068648",
"0.4602491",
"0.4600554",
"0.45919535",
"0.45911703",
"0.45837116",
"0.45806152",
"0.45798498",
"0.45734757",
"0.45678887",
"0.45678887",
"0.45672238",
"0.45672238",
"0.4559206",
"0.4556882",
"0.45547104",
"0.45547104",
"0.45547104",
"0.4549972",
"0.4549972",
"0.4549972",
"0.4549972",
"0.4549972",
"0.4549972",
"0.4549972",
"0.45366564",
"0.45349294",
"0.45309132",
"0.45238188",
"0.45196638",
"0.45163834"
] | 0.8188594 | 0 |
Sets the disabledByMicrosoftStatus property value. Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). | def disabled_by_microsoft_status=(value)
@disabled_by_microsoft_status = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def disabled_by_microsoft_status\n return @disabled_by_microsoft_status\n end",
"def disable_power_policies=(value)\n @disable_power_policies = value\n end",
"def is_enabled_for_microsoft_store_for_business=(value)\n @is_enabled_for_microsoft_store_for_business = value\n end",
"def set_status(*services, enable, except: nil, include_system: false)\n if enable\n enable(*services, except: except)\n else\n disable(*services, except: except, include_system: include_system)\n end\n end",
"def windows_enabled=(value)\n @windows_enabled = value\n end",
"def software_status=(software_status)\n validator = EnumAttributeValidator.new('String', [\"Missing-Os-Driver-Info\", \"Incompatible-Server-With-Component\", \"Incompatible-Processor\", \"Incompatible-Os-Info\", \"Incompatible-Component-Model\", \"Incompatible-Firmware\", \"Incompatible-Driver\", \"Incompatible-Firmware-Driver\", \"Service-Unavailable\", \"Service-Error\", \"Unrecognized-Protocol\", \"Not-Evaluated\", \"Compatible\"])\n unless validator.valid?(software_status)\n fail ArgumentError, \"invalid value for \\\"software_status\\\", must be one of #{validator.allowable_values}.\"\n end\n @software_status = software_status\n end",
"def disable\n @office = Office.find(params[:id])\n authorize! :update, @office\n \n @office.active_flag = 0\n\n track_event(\"Disabled Listing\");\n\n respond_to do |format|\n if @office.save\n format.html { redirect_to office_path(@office), notice: \"This listing has been successfully disabled.\" }\n format.json { head :no_content }\n else \n flash[:error] = 'Your office could not be disabled. Please contact us at [email protected] for assistance.'\n format.html { redirect_to office_path(@office) }\n format.json { head :no_content }\n end\n end\n end",
"def disable!\n @active = false\n change_status(:disabled)\n end",
"def disable\n @service.disabled = true\n end",
"def disabled?\n status == 'disabled'\n end",
"def disabled=(val)\n @@lock.synchronize { @@disabled = val }\n end",
"def disabled_warnings=(new_disabled_warnings)\n Dynamic[:disabled_warnings] = new_disabled_warnings\n end",
"def early_launch_anti_malware_driver_enabled=(value)\n @early_launch_anti_malware_driver_enabled = value\n end",
"def location_services_blocked=(value)\n @location_services_blocked = value\n end",
"def disabled\n systems = select do |system|\n next unless system.respond_to?(:enabled?)\n !system.enabled?\n end\n systems.each { |system| yield system } if block_given?\n systems.extend(Collections)\n end",
"def enabled(value)\n @ole.Enabled = value\n nil\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', ['enabled', 'disabled'])\n unless validator.valid?(status)\n fail ArgumentError, 'invalid value for \"status\", must be one of #{validator.allowable_values}.'\n end\n @status = status\n end",
"def managed_app_statuses=(value)\n @managed_app_statuses = value\n end",
"def disable_power_policies\n return @disable_power_policies\n end",
"def disable_polling(reason = nil)\n self.deactivate\n self.deactivation_reason = reason.to_s\n self.deactivated_at = Time.now\n self.save!\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', ['INACTIVE', 'DISABLED', 'ENABLED'])\n unless validator.valid?(status)\n fail ArgumentError, 'invalid value for \"status\", must be one of #{validator.allowable_values}.'\n end\n @status = status\n end",
"def visuals_enabled(value)\n @ole.VisualsEnabled = value\n nil\n end",
"def disable(key)\n @status[key] = :disabled\n end",
"def disable_app(app,enable='no')\n results = submit_cmd('update app instance',\"-env #{self.env} -app_instance #{app.name} -new_enabled #{enable}\")\n puts \"Changing enalbed status on #{app.name} from #{app.attributes[:enabled]} to: #{enable}\"\n app.attributes[:enabled] = enable\n end",
"def revoke_on_unenroll_disabled=(value)\n @revoke_on_unenroll_disabled = value\n end",
"def azure_rights_management_services_allowed=(value)\n @azure_rights_management_services_allowed = value\n end",
"def media_bypass_enabled=(value)\n @media_bypass_enabled = value\n end",
"def disabled_warnings\n Dynamic[:disabled_warnings]\n end",
"def disable!\n @disabled = true\n end",
"def ios_mobile_application_management_enabled=(value)\n @ios_mobile_application_management_enabled = value\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', ['available', 'assigned', 'activated', 'deprecated'])\n unless validator.valid?(status)\n fail ArgumentError, 'invalid value for \"status\", must be one of #{validator.allowable_values}.'\n end\n @status = status\n end",
"def set_all(status, except: {})\n @status.transform_values! { |v| v = status unless v == :disabled }\n except[:exceptions].each do |k|\n @status[k] = except[:status] unless @status[k] == :disabled\n end\n end",
"def disable\n @disabled = true\n end",
"def bypass_inactive_disable\n @attributes[:bypass_inactive_disable]\n end",
"def status_light_enabled=(enabled)\n send_device_message('SetLEDState', enabled ? 'On' : 'Off')\n end",
"def disable(*services, except: nil, include_system: false)\n # Automatically excludes system services unless `include_system: true` is passed\n exceptions = [*except]\n exceptions.concat(system_services) unless include_system\n\n set_services_status(false, *services, except: exceptions)\n end",
"def monitoring_enabled=(value)\n if value\n client.monitor_instances(:instance_ids => [id])\n true\n else\n client.unmonitor_instances(:instance_ids => [id])\n false\n end\n end",
"def disable\n if enabled?\n Cratus::LDAP.replace_attribute(\n dn,\n Cratus.config.user_account_control_attribute,\n ['514']\n )\n refresh\n else\n true\n end\n end",
"def disable_lost_mode()\n return MicrosoftGraph::Users::Item::ManagedDevices::Item::DisableLostMode::DisableLostModeRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def app_store_blocked=(value)\n @app_store_blocked = value\n end",
"def make_inactive\n self.status = \"I\"\n end",
"def disable_subject\n enable_disable_subject('Disabled')\n end",
"def miqAlarmSpecDisabled\n alarmSpec = @miqAlarmSpecEnabled.clone\n alarmSpec.enabled = \"false\"\n (alarmSpec)\n end",
"def invalid_status\n\t\tinvalid = false\n\t\tif self.status_changed?\n\t\t\tinvalid = self.status_was != \"active\"\n\t\tend\n\tend",
"def deactivate!\n self.status = 'Inactive'\n nil\n end",
"def inactive!\n self.update_attribute(:status, INACTIVE)\n end",
"def disable_account_manager=(value)\n @disable_account_manager = value\n end",
"def android_mobile_application_management_enabled=(value)\n @android_mobile_application_management_enabled = value\n end",
"def execute_disable_bit=(execute_disable_bit)\n validator = EnumAttributeValidator.new('String', [\"platform-default\", \"enabled\", \"disabled\"])\n unless validator.valid?(execute_disable_bit)\n fail ArgumentError, \"invalid value for \\\"execute_disable_bit\\\", must be one of #{validator.allowable_values}.\"\n end\n @execute_disable_bit = execute_disable_bit\n end",
"def apple_news_blocked=(value)\n @apple_news_blocked = value\n end",
"def disabled=(value)\n `#{@el}.disabled = #{value}`\n end",
"def voice_dialing_blocked=(value)\n @voice_dialing_blocked = value\n end",
"def voice_dialing_blocked=(value)\n @voice_dialing_blocked = value\n end",
"def disabled?\n Support.new(ENV, verbose: verbose).disabled?\n end",
"def is_enabled_for_microsoft_store_for_business\n return @is_enabled_for_microsoft_store_for_business\n end",
"def enable\n @service.disabled = false\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', [\"ACTIVE\", \"INACTIVE\"])\n unless validator.valid?(status)\n fail ArgumentError, \"invalid value for 'status', must be one of #{validator.allowable_values}.\"\n end\n @status = status\n end",
"def partner_unsupported_os_version_blocked=(value)\n @partner_unsupported_os_version_blocked = value\n end",
"def disable\n @enabled = false\n end",
"def power_off_blocked=(value)\n @power_off_blocked = value\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', [\"ACTIVE\", \"INVOICED\", \"LOCKED\"])\n unless validator.valid?(status)\n fail ArgumentError, \"invalid value for \\\"status\\\", must be one of #{validator.allowable_values}.\"\n end\n @status = status\n end",
"def active_malware_detection_count=(value)\n @active_malware_detection_count = value\n end",
"def mfa_status=(mfa_status)\n validator = EnumAttributeValidator.new('String', ['VERIFICATION_NEED', 'DISABLED', 'ENABLED'])\n unless validator.valid?(mfa_status)\n fail ArgumentError, 'invalid value for \"mfa_status\", must be one of #{validator.allowable_values}.'\n end\n @mfa_status = mfa_status\n end",
"def disable\n authorize! @user\n @user.enabled = false\n @user.save\n @user.owned_extensions.update_all(enabled: false)\n redirect_to root_path, notice: t(\"user.disabled\", name: @user.username)\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', ['pending', 'active', 'inactive'])\n unless validator.valid?(status)\n fail ArgumentError, 'invalid value for \"status\", must be one of #{validator.allowable_values}.'\n end\n @status = status\n end",
"def eq_enabled(value)\n @ole.EQEnabled = value\n nil\n end",
"def disable!\n @enabled = false\n end",
"def disable!\n @enabled = false\n end",
"def auto_blocked_status\n 'auto_blocked'\n end",
"def denied\n\t\t# Picked a random lender application and temporary set it's status to denied\n\t\tlender_app \t\t\t= LenderApplication.first\n\t\tlender_app.status \t= 'denied'\n\t\tLenderApplicationsMailer.updated(lender_app)\n\t\n\tend",
"def status=(status)\n validator = EnumAttributeValidator.new('String', ['unknown', 'not-vulnerable', 'vulnerable', 'vulnerable-version', 'vulnerable-potential', 'vulnerable-with-exception-applied', 'vulnerable-version-with-exception-applied', 'vulnerable-potential-with-exception-applied'])\n unless validator.valid?(status)\n fail ArgumentError, 'invalid value for \"status\", must be one of #{validator.allowable_values}.'\n end\n @status = status\n end",
"def voice_assistant_blocked=(value)\n @voice_assistant_blocked = value\n end",
"def disable\n {\n method: \"WebAudio.disable\"\n }\n end",
"def disabled!\n self\n end",
"def model_reference_disable\n if respond_to? :disabled\n disable! force_save: true\n else\n @was_disabled = 'disabled'\n handle_save_triggers if respond_to? :handle_save_triggers\n end\n end",
"def change_to_disable\n @driver.find_element(xpath: @status_option).click\n end",
"def mot_status=(mot_status)\n validator = EnumAttributeValidator.new('String', [\"No details held by DVLA\", \"No results returned\", \"Not valid\", \"Valid\"])\n unless validator.valid?(mot_status)\n fail ArgumentError, \"invalid value for \\\"mot_status\\\", must be one of #{validator.allowable_values}.\"\n end\n @mot_status = mot_status\n end",
"def disable!\n\n @enabled = false\n \n @gems_or_gemsets.each do |this_gem_or_gemset, true_value|\n this_gem_or_gemset.disable!\n end\n \n return self\n \n end",
"def messages_blocked=(value)\n @messages_blocked = value\n end",
"def enabled=(value)\n configuration.enabled = value\n end",
"def disable_school_year\n @active.disable!\n @active.save!\n end",
"def disable(id)\n change_status id, false\n end",
"def disable\n {\n method: \"WebAuthn.disable\"\n }\n end",
"def disable!\n self.enabled = false\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', [\"LIVE\", \"QUARANTINED\", \"REMOVED\"])\n unless validator.valid?(status)\n fail ArgumentError, \"invalid value for 'status', must be one of #{validator.allowable_values}.\"\n end\n @status = status\n end",
"def deactivate\n return false if deactivated?\n self.status = 'deactivated'\n save\n end",
"def enabled_for_model(model, value)\n store[:\"enabled_for_#{model}\"] = value\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', [\"not_activated\", \"done\", \"in_progress\", \"error\", \"paused\", \"stopped_by_system\", \"in_queue\", \"finished_with_warnings\", \"calculating\", \"stopped_by_user\"])\n unless validator.valid?(status)\n fail ArgumentError, \"invalid value for \\\"status\\\", must be one of #{validator.allowable_values}.\"\n end\n @status = status\n end",
"def disabled?(thing)\n !enabled?(thing)\n end",
"def calendar_sync_enabled=(value)\n @calendar_sync_enabled = value\n end",
"def i_books_store_blocked=(value)\n @i_books_store_blocked = value\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', [\"active\", \"paused\", \"ready\", \"delivered\", \"cancelled\", \"reverted\"])\n unless validator.valid?(status)\n fail ArgumentError, \"invalid value for 'status', must be one of #{validator.allowable_values}.\"\n end\n @status = status\n end",
"def disable\n {\n method: \"Performance.disable\"\n }\n end",
"def disabled?\n !Agent.config[:agent_enabled]\n end",
"def google_play_store_blocked=(value)\n @google_play_store_blocked = value\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', ['unknown', 'archived', 'underOffer', 'sold', 'leased', 'newDevelopment', 'recentlyUpdated', 'new', 'live', 'pending'])\n unless validator.valid?(status)\n fail ArgumentError, 'invalid value for \"status\", must be one of #{validator.allowable_values}.'\n end\n @status = status\n end",
"def disable_edu_policies=(value)\n @disable_edu_policies = value\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', [\"Active\", \"ActiveUnderContract (Backup-Offer)\", \"Pending\", \"Hold\", \"Withdrawn\", \"Closed\", \"Expired\", \"Delete\", \"Incomplete\", \"ComingSoon\"])\n unless validator.valid?(status)\n fail ArgumentError, \"invalid value for 'status', must be one of #{validator.allowable_values}.\"\n end\n @status = status\n end",
"def status=(status)\n validator = EnumAttributeValidator.new('String', ['new', 'used', 'expired'])\n unless validator.valid?(status)\n fail ArgumentError, 'invalid value for \"status\", must be one of #{validator.allowable_values}.'\n end\n @status = status\n end",
"def deactivate\n @manage_sieve.set_active(nil)\n end"
] | [
"0.7359937",
"0.5478616",
"0.53884894",
"0.53854424",
"0.53850275",
"0.5343506",
"0.5336192",
"0.5320225",
"0.5294827",
"0.518897",
"0.51866716",
"0.511867",
"0.5067797",
"0.5063684",
"0.50326735",
"0.50197464",
"0.501312",
"0.5010845",
"0.49961004",
"0.49816462",
"0.49660718",
"0.49474975",
"0.4945557",
"0.4930649",
"0.49185732",
"0.49175757",
"0.48515823",
"0.48456126",
"0.48352018",
"0.48318672",
"0.48155355",
"0.48133832",
"0.48125497",
"0.4810183",
"0.48006338",
"0.47995642",
"0.47905245",
"0.47809607",
"0.4777189",
"0.47769436",
"0.47676486",
"0.47623932",
"0.47592738",
"0.4756481",
"0.47508684",
"0.47371712",
"0.47360265",
"0.47244924",
"0.47222033",
"0.4721027",
"0.472032",
"0.47166505",
"0.47166505",
"0.47157693",
"0.4697372",
"0.46856186",
"0.46800613",
"0.46708262",
"0.46502376",
"0.46453983",
"0.4636788",
"0.46252614",
"0.4617759",
"0.46158528",
"0.46107304",
"0.46076792",
"0.45813003",
"0.45776135",
"0.45671737",
"0.4564461",
"0.45614722",
"0.4556278",
"0.4554995",
"0.455295",
"0.4545574",
"0.45336133",
"0.45333102",
"0.4532228",
"0.45244938",
"0.45172435",
"0.4515839",
"0.45136383",
"0.45050403",
"0.45018834",
"0.44986948",
"0.44938204",
"0.44927028",
"0.4491853",
"0.4489402",
"0.44893143",
"0.4489123",
"0.4484425",
"0.44834468",
"0.44827774",
"0.4472956",
"0.44716558",
"0.44611135",
"0.44597167",
"0.44576833",
"0.44499302"
] | 0.815057 | 0 |
Gets the displayName property value. The display name for the application. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. | def display_name
return @display_name
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def display_name\n @json['profile']['displayName'] rescue nil\n end",
"def displayName\n dn = @params['dn']\n if dn\n dn.first\n else\n nil\n end\n end",
"def display_name\n return @poco_data[:display_name] unless @poco_data == nil\n pick_first_node(@poco.xpath('./poco:displayName'))\n end",
"def display_name\n @hash['display_name']\n end",
"def display_name\n @display_name\n end",
"def display_name\n @attributes[:display_name]\n end",
"def displayname\n\t\treturn self[:displayName] ||\n\t\t\t[ self.givenName, self.sn ].compact.join( ' ' )\n\tend",
"def name\n @gapi[\"displayName\"]\n end",
"def display_name\n @data['display_name']\n end",
"def display_name\n return @display_name\n end",
"def name\n @display_name || @name\n end",
"def display_name\n display_name = @current_profile.display_name\n end",
"def display_name\n @name.capitalize.freeze\n end",
"def get_display_name\n @display_name ||= self.user.display_name\n end",
"def display_name\n return @display_name\n end",
"def user_display_name\n @attributes[:user_display_name]\n end",
"def display_name_without_user_filter(name)\n name[:display_name]\n end",
"def display_name\n name\n end",
"def display_name\n @name\n end",
"def display_name\n name\n end",
"def display_name\n name\n end",
"def app_display_name\n return @app_display_name\n end",
"def app_display_name\n return @app_display_name\n end",
"def app_display_name\n return @app_display_name\n end",
"def display_name\n self.class.display_name_for(definition[\"name\"] || name)\n end",
"def app_display_name=(value)\n @app_display_name = value\n end",
"def app_display_name=(value)\n @app_display_name = value\n end",
"def app_display_name=(value)\n @app_display_name = value\n end",
"def display_name\n return attributes['display_name'] unless attributes['display_name'].blank?\n return \"#{attributes['first_name']} #{attributes['last_name']}\" unless attributes['first_name'].blank? && attributes['last_name'].blank?\n return '(unknown)'\n end",
"def user_display_name\n return @user_display_name\n end",
"def user_display_name\n return @user_display_name\n end",
"def user_display_name\n return @user_display_name\n end",
"def display_name\n @name.titlecase\n end",
"def display_name\n NAME\n end",
"def display_name\n NAME\n end",
"def display_name\n @_context[:display_name]\n end",
"def display_name\n return name.humanize if description.blank?\n I18n.t(description['name'], scope: 'element_names', default: description['name'].to_s.humanize)\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end"
] | [
"0.72595704",
"0.71676266",
"0.7003676",
"0.6978795",
"0.6967714",
"0.69401175",
"0.68983126",
"0.6831345",
"0.68028855",
"0.67932636",
"0.6738347",
"0.6681322",
"0.6649069",
"0.66293967",
"0.66087353",
"0.6599271",
"0.6596463",
"0.6592663",
"0.65773267",
"0.64840126",
"0.64840126",
"0.6410698",
"0.6410698",
"0.6410698",
"0.6406877",
"0.6374592",
"0.6374592",
"0.6374592",
"0.63723934",
"0.62993526",
"0.62993526",
"0.62993526",
"0.6263055",
"0.6224252",
"0.6224252",
"0.6224029",
"0.6190176",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539",
"0.617539"
] | 0.68489295 | 39 |
Sets the displayName property value. The display name for the application. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. | def display_name=(value)
@display_name = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def display_name=(value)\n @display_name = value\n end",
"def display_name=(value)\n @display_name = value\n end",
"def app_display_name=(value)\n @app_display_name = value\n end",
"def app_display_name=(value)\n @app_display_name = value\n end",
"def app_display_name=(value)\n @app_display_name = value\n end",
"def display_name=(name)\n @display_name ||= name\n end",
"def display_name(display_name)\n @display_name = display_name\n self\n end",
"def user_display_name=(value)\n @user_display_name = value\n end",
"def user_display_name=(value)\n @user_display_name = value\n end",
"def user_display_name=(value)\n @user_display_name = value\n end",
"def display_name\n @json['profile']['displayName'] rescue nil\n end",
"def device_display_name=(value)\n @device_display_name = value\n end",
"def device_display_name=(value)\n @device_display_name = value\n end",
"def name=(display_name)\r\n\t\t\t`#{BITS::BITSADMIN} /setdisplayname {#{@id}} \\\"#{display_name}\\\"`\r\n\t\tend",
"def display_name\n @display_name\n end",
"def display_name\n @name.capitalize.freeze\n end",
"def display_name=(value)\n @children['display-name'][:value] = value\n end",
"def set_default_display_name\n self['display_name'] = gn if display_name.blank?\n end",
"def display_name=(display_name)\n if !display_name.nil? && display_name.to_s.length > 255\n fail ArgumentError, 'invalid value for \"display_name\", the character length must be smaller than or equal to 255.'\n end\n\n @display_name = display_name\n end",
"def display_name=(display_name)\n if !display_name.nil? && display_name.to_s.length > 255\n fail ArgumentError, 'invalid value for \"display_name\", the character length must be smaller than or equal to 255.'\n end\n\n @display_name = display_name\n end",
"def set_displayname(path,display_name)\n result = $evm.instance_set_display_name(path, display_name)\n return result\n end",
"def name= display_name\n @grpc.display_name = display_name\n end",
"def display_name\n return @poco_data[:display_name] unless @poco_data == nil\n pick_first_node(@poco.xpath('./poco:displayName'))\n end",
"def name\n @display_name || @name\n end",
"def record_display_name=(value)\n @children['record-display-name'][:value] = value\n end",
"def display_name\n display_name = @current_profile.display_name\n end",
"def display_name\n @hash['display_name']\n end",
"def display_name\n @attributes[:display_name]\n end",
"def displayname\n\t\treturn self[:displayName] ||\n\t\t\t[ self.givenName, self.sn ].compact.join( ' ' )\n\tend",
"def display_name_without_user_filter(name)\n name[:display_name]\n end",
"def get_display_name\n @display_name ||= self.user.display_name\n end",
"def displayName\n dn = @params['dn']\n if dn\n dn.first\n else\n nil\n end\n end",
"def display_name=(str)\n unless str.nil? || str.kind_of?(String)\n raise ArgumentError, 'not a string'\n end\n @display_name = str\n @display_name = nil if @display_name == ''\n end",
"def display_name\n self.display_name = self.profile.nickname? ? self.profile.nickname : self.username\n end",
"def display_name\n @data['display_name']\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end",
"def display_name\n return @display_name\n end"
] | [
"0.68276113",
"0.67984176",
"0.6789372",
"0.6789372",
"0.6789372",
"0.66921777",
"0.667881",
"0.644039",
"0.644039",
"0.644039",
"0.6284721",
"0.61687815",
"0.61687815",
"0.6165007",
"0.60929507",
"0.6088271",
"0.60357356",
"0.6026034",
"0.6023351",
"0.6023351",
"0.60210264",
"0.6017559",
"0.60165894",
"0.5999292",
"0.597106",
"0.5963595",
"0.5951966",
"0.59461045",
"0.5933067",
"0.58960694",
"0.58633494",
"0.58609515",
"0.58280015",
"0.5812333",
"0.57601637",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227",
"0.5751227"
] | 0.6894319 | 37 |
Gets the extensionProperties property value. Readonly. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0). | def extension_properties
return @extension_properties
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def extension_properties=(value)\n @extension_properties = value\n end",
"def single_value_extended_properties\n return @single_value_extended_properties\n end",
"def single_value_extended_properties\n return @single_value_extended_properties\n end",
"def single_value_extended_properties\n return @single_value_extended_properties\n end",
"def multi_value_extended_properties\n return @multi_value_extended_properties\n end",
"def multi_value_extended_properties\n return @multi_value_extended_properties\n end",
"def multi_value_extended_properties\n return @multi_value_extended_properties\n end",
"def extprop(io)\n ext_type, cb = io.read(4).unpack('vv')\n prop_data = _ext_prop_d(ext_type)\n\n result = {\n extType: ext_type, # extType (2 bytes): An unsigned integer that specifies the type of the extension.\n extType_d: prop_data[:structure],\n _property: prop_data[:property],\n cb: cb, # cb (2 bytes): An unsigned integer that specifies the size of this ExtProp structure.\n }\n\n ext_prop_data = io.read(cb - 4) # structure size minus ext_type and cb\n parser_method = prop_data[:structure].downcase\n result[:extPropData] = self.send(parser_method, ext_prop_data) # extPropData (variable): This field specifies the extension data.\n\n result\n end",
"def extension_item\n return @children['extension-item'][:value]\n end",
"def extension_attribute7\n return @extension_attribute7\n end",
"def value\n if allows_nil? && properties.values.all?(&:nil?)\n nil\n else\n Hash[properties.map { |key, value| [key, value.value] }]\n end\n end",
"def extension_attribute1\n return @extension_attribute1\n end",
"def extension_attribute9\n return @extension_attribute9\n end",
"def get_properties()\n return @properties\n end",
"def property_properties\n _property_properties\n end",
"def extension_attribute10\n return @extension_attribute10\n end",
"def extension_attribute14\n return @extension_attribute14\n end",
"def properties_get(opts = {})\n data, _status_code, _headers = properties_get_with_http_info(opts)\n return data\n end",
"def extension_fields\n self.class.extension_fields\n end",
"def extension_attribute13\n return @extension_attribute13\n end",
"def extensions\n return @extensions\n end",
"def extensions\n return @extensions\n end",
"def extensions\n return @extensions\n end",
"def ext_attr\n attribute_prop(10)\n end",
"def extension_attribute4\n return @extension_attribute4\n end",
"def extension_attribute11\n return @extension_attribute11\n end",
"def single_value_extended_properties=(value)\n @single_value_extended_properties = value\n end",
"def single_value_extended_properties=(value)\n @single_value_extended_properties = value\n end",
"def single_value_extended_properties=(value)\n @single_value_extended_properties = value\n end",
"def get_value(property)\n if @env_properties.get_value(property)\n return @env_properties.get_value(property)\n end\n @file_properties.get_value(property)\n end",
"def extension_attribute12\n return @extension_attribute12\n end",
"def extension\n return _meta_data['extension'] if _meta_data.has_key? 'extension'\n ext\n end",
"def extension_attribute3\n return @extension_attribute3\n end",
"def extensions\n data.extensions\n end",
"def available_properties\n @properties ||= list.properties\n end",
"def extension_attribute6\n return @extension_attribute6\n end",
"def extensions\n @@extensions\n end",
"def extensions\n @@extensions\n end",
"def supported_extensions\n\t\treturn self.supported_extension_oids.collect {|oid| EXTENSION_NAMES[oid] || oid }\n\tend",
"def multi_value_extended_properties=(value)\n @multi_value_extended_properties = value\n end",
"def multi_value_extended_properties=(value)\n @multi_value_extended_properties = value\n end",
"def multi_value_extended_properties=(value)\n @multi_value_extended_properties = value\n end",
"def extension(key)\r\n return nil unless @extensions.has_key?(key)\r\n return @extensions[key]\r\n end",
"def value\n @property_hash[:value]\n end",
"def extension_attribute8\n return @extension_attribute8\n end",
"def extension_setting(name)\n extension_settings.find{ |setting| setting.key == name.to_s }\n end",
"def extension_attribute15\n return @extension_attribute15\n end",
"def extension_fields\n @extension_fields ||= ExtensionFields.new\n end",
"def prop(name)\n properties.named(name).first.andand.value\n end",
"def extensions\n @config[:extensions]\n end",
"def extensions\n @extensions.to_a\n end",
"def property\n @property\n end",
"def get_raw_property_value(name)\n return @property_values[name]\n end",
"def properties\n return @values['properties'] if @values.key?('properties')\n @values['properties'] = {}\n @values['properties']\n end",
"def extension_attribute2\n return @extension_attribute2\n end",
"def get_extensions\n read_extensions 'storage', @options.model_extensions_dir\n end",
"def extensions\n unless @extensions\n @extensions={}\n cert.extensions.each {|e| @extensions[e.oid]=e.value} if cert.extensions\n end\n @extensions\n end",
"def get_property(ctx,object,propertyName,exception)\n JS::Lib.JSObjectGetProperty(ctx,object,propertyName,exception)\n end",
"def extension\n extensions.last || \"\"\n end",
"def property(name)\n get(\"/session/#{session_id}/element/#{element_id}/property/#{name}\").value\n end",
"def properties\n self.persistent_class.property_iterator.to_a.inject({}) do |h, value|\n if !value.respond_to?(:getRubyValue)\n h[value.name] = value\n end\n h\n end\n end",
"def get_property(key, default_value = nil)\n end",
"def get(key)\n properties[key]\n end",
"def properties(path, ctype=DEFAULT_CTYPE)\n node = metadata(path, ctype, :properties)[:properties]\n node ? node.contents : @metadata_tree.default_data(:properties)\n end",
"def get_property(property)\n get_compound_value(get_value(property))\n end",
"def properties\n return @properties\n end",
"def parse_extended_properties(extended_properties) # :nodoc\n query_parts = []\n ['shared', 'private'].each do |prop_type|\n next unless extended_properties[prop_type]\n query_parts << extended_properties[prop_type].map {|key, value| (prop_type == \"shared\" ? \"sharedExtendedProperty=\" : \"privateExtendedProperty=\") + \"#{key}%3D#{value}\" }.join(\"&\")\n end\n query_parts.join('&')\n end",
"def get_value(property_path)\n element = @tree.select(property_path)[0]\n element.nil? ? nil : element.value\n end",
"def extension_attribute5\n return @extension_attribute5\n end",
"def properties\n @properties\n end",
"def get_property(name, default= \"\")\n\t\treturn @transport.get_path(\"meta\",\"properties\", name) { default }\n\tend",
"def used_properties\n @properties.values.find_all &:used?\n end",
"def get_extensions\n get_siteinfo('extensions')['query']['extensions'].collect { |e| e['name'] }\n end",
"def extension_methods\n @@extension_methods\n end",
"def get_property\n @xml = client.call(url).parsed_response.css('property').first\n @attributes.merge!(parse_xml_to_hash)\n end",
"def extensions\n @extensions ||= []\n end",
"def extensions\n @extensions ||= []\n end",
"def properties\n map(element_type: :hash) { |v| v.properties }\n end",
"def properties_get(id, opts = {})\n data, _status_code, _headers = properties_get_with_http_info(id, opts)\n data\n end",
"def supported_extension_oids\n\t\treturn self.root_dse[:supportedExtension]\n\tend",
"def properties\n $properties ||= Properties.new\n end",
"def extensions\n if wrapper\n (wrapper.extensions + config[:extensions]).uniq\n else\n config[:extensions]\n end\n end",
"def web_properties\n Management::WebProperty.all(self)\n end",
"def [](property_name)\n properties[property_name.to_s].value\n end",
"def properties\n model.properties\n end",
"def get_property property_name\n \n begin\n \n if @filename == \"\"\n raise \"Base file not specified.\"\n end\n \n if property_name == \"\"\n raise \"Property name not specified.\"\n end\n \n str_uri = $productURI + \"/words/\" + @filename + \"/documentProperties/\" + property_name\n signed_str_uri = Common::Utils.sign(str_uri)\n \n response_stream = RestClient.get(signed_str_uri,{:accept=>\"application/json\"})\n \n stream_hash = JSON.parse(response_stream)\n \n if(stream_hash[\"Code\"] == 200)\n return stream_hash[\"DocumentProperty\"]\n else\n return false\n end\n \n rescue Exception=>e\n print e\n end\n \n end",
"def extended_folder_permissions\n @attributes[:extended_folder_permissions]\n end",
"def properties\n @properties ||= {\n size: Integer.new(@value.size),\n length: Integer.new(@value.size),\n empty?: Boolean.new(@value.size.zero?),\n first: @value.first,\n head: @value.first,\n last: @value.last,\n rest: List.new(@value.rest),\n tail: List.new(@value.tail),\n }\n end",
"def extensions\n @extensions ||= []\n end",
"def properties\n @properties\n end",
"def get_property _property\n send_cmd(\"get_property #{_property}\")\n end",
"def extension_strings\n\t\treturn nil if @extensions.empty?\n\t\treturn @extensions.compact.join('; ')\n\tend",
"def extensions=(val)\n set_extensions(val)\n val\n end",
"def extensions\n @extensions ||= Dir[File.join(@ext_dir, '*')]\n end",
"def get_property property_name\n \n begin\n \n if @filename == ''\n raise 'Base file not specified.'\n end\n \n if property_name == ''\n raise 'Property name not specified.'\n end\n \n str_uri = $product_uri + '/slides/' + @filename + '/documentProperties/' + property_name\n signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)\n \n response_stream = RestClient.get(signed_str_uri,{:accept=>'application/json'})\n \n stream_hash = JSON.parse(response_stream)\n \n if(stream_hash['Code'] == 200)\n return stream_hash['DocumentProperty']\n else\n return false\n end\n \n rescue Exception=>e\n print e\n end\n \n end",
"def get_property(name)\n return @properties[name]\n end",
"def get_property(*args)\n return unless alive?\n\n command(\"get_property\", *args)[\"data\"]\n end",
"def get_extensions\n read_extensions 'compute', @options.model_extensions_dir\n end",
"def extensions=(value)\n @extensions = value\n end",
"def extensions=(value)\n @extensions = value\n end"
] | [
"0.65338045",
"0.642669",
"0.642669",
"0.642669",
"0.6342844",
"0.6342844",
"0.6342844",
"0.56859535",
"0.54865223",
"0.5480019",
"0.54084575",
"0.54059273",
"0.53985786",
"0.5390689",
"0.53540415",
"0.53421557",
"0.53415596",
"0.53298354",
"0.5324079",
"0.5281424",
"0.5253935",
"0.5253935",
"0.5253935",
"0.52477866",
"0.5204785",
"0.5200989",
"0.5196802",
"0.5196802",
"0.5196802",
"0.51936954",
"0.51881766",
"0.5166406",
"0.516636",
"0.5164652",
"0.5161003",
"0.51574296",
"0.51522535",
"0.51522535",
"0.514305",
"0.51399714",
"0.51399714",
"0.51399714",
"0.511318",
"0.5096198",
"0.5081185",
"0.50742656",
"0.5059516",
"0.50539434",
"0.5052756",
"0.50441843",
"0.502367",
"0.5017192",
"0.5013652",
"0.50075006",
"0.5004156",
"0.4986318",
"0.49840257",
"0.49666741",
"0.49392143",
"0.49332902",
"0.4925921",
"0.4915077",
"0.49100572",
"0.49038485",
"0.48953527",
"0.48938447",
"0.4887863",
"0.48680165",
"0.48414156",
"0.48403433",
"0.48390487",
"0.48349893",
"0.48327482",
"0.4830578",
"0.48297387",
"0.482477",
"0.482477",
"0.48099178",
"0.48072168",
"0.48065975",
"0.48043367",
"0.48038778",
"0.4803488",
"0.48010808",
"0.47981444",
"0.47974253",
"0.47966084",
"0.47953486",
"0.4794637",
"0.47913033",
"0.47893697",
"0.47788334",
"0.477263",
"0.47670174",
"0.4765085",
"0.47648472",
"0.4764828",
"0.47605026",
"0.4753706",
"0.4753706"
] | 0.73797387 | 0 |
Sets the extensionProperties property value. Readonly. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0). | def extension_properties=(value)
@extension_properties = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def extensions=(value)\n @extensions = value\n end",
"def extensions=(value)\n @extensions = value\n end",
"def extensions=(value)\n @extensions = value\n end",
"def extensions=(val)\n set_extensions(val)\n val\n end",
"def multi_value_extended_properties=(value)\n @multi_value_extended_properties = value\n end",
"def multi_value_extended_properties=(value)\n @multi_value_extended_properties = value\n end",
"def multi_value_extended_properties=(value)\n @multi_value_extended_properties = value\n end",
"def extensions=(extensions)\n @extensions = Array extensions\n end",
"def set_extensions(val)\n @extensions = val\n build_path_query\n @extensions\n end",
"def single_value_extended_properties=(value)\n @single_value_extended_properties = value\n end",
"def single_value_extended_properties=(value)\n @single_value_extended_properties = value\n end",
"def single_value_extended_properties=(value)\n @single_value_extended_properties = value\n end",
"def initialize()\n super\n @odata_type = \"#microsoft.graph.extensionProperty\"\n end",
"def extension=(extension)\n instance_set(:extension, extension)\n end",
"def extensions=(value)\n subtags = Array(value).flatten\n self.extensions_sequence = subtags.empty? ? nil : subtags.join(HYPHEN)\n end",
"def extensions=(extensions); end",
"def extensions_json=(value)\n @extensions_json = value.to_s\n @extensions = JSON.parse( File.read(@extensions_json) ) # Ruby raises it's own generic I/O read errors & JSON parse errors\n \n @extensions = {} unless @extensions.is_a?(Hash)\n \n @extensions_json\n end",
"def extension_properties\n return @extension_properties\n end",
"def extension_attribute7=(value)\n @extension_attribute7 = value\n end",
"def extension_attribute1=(value)\n @extension_attribute1 = value\n end",
"def src_extensions(extensions = nil)\n extensions ? @src_extensions = extensions : get_inherited_attribute(\"@src_extensions\")\n end",
"def extension_attribute9=(value)\n @extension_attribute9 = value\n end",
"def extension=(v) Axlsx::validate_string v; @extension = v end",
"def extension_attribute6=(value)\n @extension_attribute6 = value\n end",
"def extension_attribute14=(value)\n @extension_attribute14 = value\n end",
"def extension_attribute10=(value)\n @extension_attribute10 = value\n end",
"def properties=(value)\n if value == @defaults['properties']\n @values.delete 'properties' if @values.key? 'properties'\n else\n @values['properties'] = value\n end\n end",
"def properties=(value)\n @properties = value\n end",
"def extension_attribute11=(value)\n @extension_attribute11 = value\n end",
"def extension(*extensions)\n if extensions[0].is_a?(Array)\n @_ext = extensions[0]\n else\n @_ext = extensions\n end\n end",
"def office_extension=(office_extension)\n\n if !office_extension.nil? && office_extension.to_s.length > 10\n fail ArgumentError, \"invalid value for 'office_extension', the character length must be smaller than or equal to 10.\"\n end\n\n @office_extension = office_extension\n end",
"def office_extension=(office_extension)\n\n if !office_extension.nil? && office_extension.to_s.length > 10\n fail ArgumentError, \"invalid value for 'office_extension', the character length must be smaller than or equal to 10.\"\n end\n\n @office_extension = office_extension\n end",
"def extension_attribute13=(value)\n @extension_attribute13 = value\n end",
"def set_extension\n @extension = Fonelator::Extension.find(params[:id])\n end",
"def set_version\n if @properties\n @properties.each{|p| p.extend(version_module)}\n else\n @property.extend(version_module)\n end\n end",
"def extension_attribute4=(value)\n @extension_attribute4 = value\n end",
"def smb_auto_encrypted_file_extensions=(value)\n @smb_auto_encrypted_file_extensions = value\n end",
"def extension_attribute3=(value)\n @extension_attribute3 = value\n end",
"def extension_attribute12=(value)\n @extension_attribute12 = value\n end",
"def custom_workflow_extensions=(value)\n @custom_workflow_extensions = value\n end",
"def set_extension\n @extension = Extension.find(params[:id])\n end",
"def set_extension\n @extension = Extension.find(params[:id])\n end",
"def set_extension\n @extension = Extension.find(params[:id])\n end",
"def initialize(extensions: nil)\n @extensions = extensions || {}\n end",
"def extension_attribute15=(value)\n @extension_attribute15 = value\n end",
"def home_extension=(home_extension)\n\n if !home_extension.nil? && home_extension.to_s.length > 10\n fail ArgumentError, \"invalid value for 'home_extension', the character length must be smaller than or equal to 10.\"\n end\n\n @home_extension = home_extension\n end",
"def home_extension=(home_extension)\n\n if !home_extension.nil? && home_extension.to_s.length > 10\n fail ArgumentError, \"invalid value for 'home_extension', the character length must be smaller than or equal to 10.\"\n end\n\n @home_extension = home_extension\n end",
"def custom_extension_stage_settings=(value)\n @custom_extension_stage_settings = value\n end",
"def []=(key, value)\n # be sure that the value is managed when it is a QObject\n value = value.create_wrapper if value.is_a? Wrappable\n value.prefer_managed true if value.is_a? QtObjectBase\n\n # hold referenece because QQmlContext::setContextProperty does not take ownership of objects\n @context_properties[key] = value\n\n @extension.setContextProperty(key, value)\n value\n end",
"def extension_attribute2=(value)\n @extension_attribute2 = value\n end",
"def modified_properties=(value)\n @modified_properties = value\n end",
"def set_PopulateProperties(value)\n set_input(\"PopulateProperties\", value)\n end",
"def set_PopulateProperties(value)\n set_input(\"PopulateProperties\", value)\n end",
"def set_property\n @property = Property.all\n end",
"def mobile_extension=(mobile_extension)\n\n if !mobile_extension.nil? && mobile_extension.to_s.length > 10\n fail ArgumentError, \"invalid value for 'mobile_extension', the character length must be smaller than or equal to 10.\"\n end\n\n @mobile_extension = mobile_extension\n end",
"def mobile_extension=(mobile_extension)\n\n if !mobile_extension.nil? && mobile_extension.to_s.length > 10\n fail ArgumentError, \"invalid value for 'mobile_extension', the character length must be smaller than or equal to 10.\"\n end\n\n @mobile_extension = mobile_extension\n end",
"def extension_attribute8=(value)\n @extension_attribute8 = value\n end",
"def prop(name, value, recurse = false)\n @ctx.propset(name, SvnFixture.svn_prop(value), @clean_path, recurse)\n end",
"def []=(prop, value)\n @prototype.set(prop, value)\n end",
"def extension_attribute5=(value)\n @extension_attribute5 = value\n end",
"def put_properties!(properties = {})\r\n raise WAZ::Blobs::InvalidOperation if self.snapshot_date\r\n self.class.service_instance.set_blob_properties(path, properties)\r\n end",
"def extension_fields\n @extension_fields ||= ExtensionFields.new\n end",
"def excluded_file_extensions_for_sync_app=(value)\n @excluded_file_extensions_for_sync_app = value\n end",
"def set_property(ctx,object,propertyName,value,attributes,exception)\n JS::Lib.JSObjectSetProperty(ctx,object,propertyName,value,attributes,exception)\n end",
"def extensions\n @extensions ||= []\n end",
"def extensions\n unless @extensions\n @extensions={}\n cert.extensions.each {|e| @extensions[e.oid]=e.value} if cert.extensions\n end\n @extensions\n end",
"def extensions\n @extensions ||= []\n end",
"def extensions\n @extensions ||= []\n end",
"def extension_parameters\n @extension_parameters ||= {}\n end",
"def extension_name=(name)\n clear!\n @extension_name = name\n end",
"def set_property\n @property = Property\n .includes(:property_type, {features_properties: [:feature]}, :photos)\n .friendly\n .find(params[:id])\n end",
"def extension_parameters= new_extension_parameters\n if new_extension_parameters.respond_to? :to_hash\n @extension_parameters = new_extension_parameters.to_hash\n else\n raise TypeError,\n \"Expected Hash, got #{new_extension_parameters.class}.\"\n end\n end",
"def extprop(io)\n ext_type, cb = io.read(4).unpack('vv')\n prop_data = _ext_prop_d(ext_type)\n\n result = {\n extType: ext_type, # extType (2 bytes): An unsigned integer that specifies the type of the extension.\n extType_d: prop_data[:structure],\n _property: prop_data[:property],\n cb: cb, # cb (2 bytes): An unsigned integer that specifies the size of this ExtProp structure.\n }\n\n ext_prop_data = io.read(cb - 4) # structure size minus ext_type and cb\n parser_method = prop_data[:structure].downcase\n result[:extPropData] = self.send(parser_method, ext_prop_data) # extPropData (variable): This field specifies the extension data.\n\n result\n end",
"def property_set key, value\n n_file_properties = file_properties.dup\n n_file_properties[key]=value\n self.file_properties= n_file_properties\n end",
"def contact_phone_extension=(contact_phone_extension)\n\n if !contact_phone_extension.nil? && contact_phone_extension.to_s.length > 15\n fail ArgumentError, \"invalid value for 'contact_phone_extension', the character length must be smaller than or equal to 15.\"\n end\n\n @contact_phone_extension = contact_phone_extension\n end",
"def normalize!\n __normalize_method\n \n if @extensions.nil?\n @extensions = { }\n end\n end",
"def extensions\n @extensions ||= Dir[File.join(@ext_dir, '*')]\n end",
"def set_property(name, value)\n # let Resource handle DAV properties\n if name[:ns_href] == DAV_NAMESPACE\n super\n else\n set_custom_props name, value\n end\n end",
"def add_extensions(*extensions)\n self.extensions += extensions\n end",
"def multi_value_extended_properties\n return @multi_value_extended_properties\n end",
"def multi_value_extended_properties\n return @multi_value_extended_properties\n end",
"def multi_value_extended_properties\n return @multi_value_extended_properties\n end",
"def []=(key, value)\n @properties[key] = value\n end",
"def []=(key, value)\n @properties[key] = value\n end",
"def single_value_extended_properties\n return @single_value_extended_properties\n end",
"def single_value_extended_properties\n return @single_value_extended_properties\n end",
"def single_value_extended_properties\n return @single_value_extended_properties\n end",
"def expand_properties\n @properties.each do |key,value|\n value.expand_to_element self\n end\n end",
"def modify_properties(properties_element)\n end",
"def add_properties\n # TODO smart column ordering to ensure always valid by time we get to associations\n save_if_new\n\n property_list = get_each_assoc#current_value.split(Delimiters::multi_assoc_delim)\n\n property_list.each do |pstr|\n\n # Special case, we know we lookup on name so operator is effectively the name to lookup\n find_by_name, find_by_value = get_find_operator_and_rest( pstr )\n\n raise \"Cannot find Property via #{find_by_name} (with value #{find_by_value})\" unless(find_by_name)\n\n property = @@property_klass.find_by_name(find_by_name)\n\n unless property\n property = @@property_klass.create( :name => find_by_name, :presentation => find_by_name.humanize)\n logger.info \"Created New Property #{property.inspect}\"\n end\n\n if(property)\n if(SpreeHelper::version.to_f >= 1.1)\n # Property now protected from mass assignment\n x = @@product_property_klass.new( :value => find_by_value )\n x.property = property\n x.save\n @product.product_properties << x\n logger.info \"Created New ProductProperty #{x.inspect}\"\n else\n @product.product_properties << @@product_property_klass.create( :property => property, :value => find_by_values)\n end\n else\n puts \"WARNING: Property #{find_by_name} NOT found - Not set Product\"\n end\n\n end\n\n end",
"def add_properties\n # TODO smart column ordering to ensure always valid by time we get to associations\n product_load_object.save_if_new\n\n property_list = value.to_s.split(multi_assoc_delim)\n\n property_list.each do |property_string|\n\n # Special case, we know we lookup on name so operator is effectively the name to lookup\n\n # split into usable parts ; size:large or colour:red,green,blue\n find_by_name, find_by_value = property_string.split(name_value_delim)\n\n raise \"Cannot find Property via #{find_by_name} (with value #{find_by_value})\" unless(find_by_name)\n\n property = Spree::Property.where(:name => find_by_name).first\n\n unless property\n property = property_klass.create( :name => find_by_name, :presentation => find_by_name.humanize)\n logger.info \"Created New Property #{property.inspect}\"\n end\n\n if(property)\n # Property now protected from mass assignment\n x = product_property_klass.new( :value => find_by_value )\n x.property = property\n x.save\n @product_load_object.product_properties << x\n logger.info \"Created New ProductProperty #{x.inspect}\"\n else\n puts \"WARNING: Property #{find_by_name} NOT found - Not set Product\"\n end\n\n end\n\n end",
"def extension=(mod)\n mod = Module.new(&mod) if Proc === mod\n @extension = mod\n end",
"def set_app_properties(properties)\n properties.respond_to?(:to_json) ? properties.to_json : properties\n (@session.post 'facebook.admin.setAppProperties', :properties => properties) == '1'\n end",
"def extensions(range)\n @extension_fields = ExtensionFields.new(range)\n end",
"def []=(key, val)\n @properties[key] = val\n end",
"def set_property(propertyName,value,attributes = nil,exception = nil)\n propertyName = JS::String.create_with_utf8cstring(propertyName)\n value = JS::Value.from_ruby(context,value)\n res = super(context,self,propertyName,value,attributes,exception)\n return res\n end",
"def set_app_properties(properties)\n properties = properties.respond_to?(:to_json) ? properties.to_json : properties\n (@session.post 'facebook.admin.setAppProperties', :properties => properties) == '1'\n end",
"def extensions\n @extensions ||= Dir['ext/**/extconf.rb']\n end",
"def []=(prop)\n set_property(prop)\n end",
"def set_property(key, value)\n p=property(key)\n unless p\n p=characteristic_properties.build(:kee => key)\n end\n if (value.is_a?(Fixnum) || value.is_a?(Float))\n p.value=value.to_f\n else\n p.text_value=value.to_s\n end\n p\n end"
] | [
"0.64369947",
"0.64369947",
"0.64369947",
"0.6415627",
"0.6310606",
"0.6310606",
"0.6310606",
"0.62829334",
"0.62083495",
"0.61870617",
"0.61870617",
"0.61870617",
"0.6100614",
"0.60459185",
"0.5842844",
"0.5826262",
"0.58129954",
"0.57676274",
"0.57039106",
"0.5631596",
"0.5558913",
"0.5544556",
"0.549851",
"0.54950804",
"0.5401529",
"0.53968614",
"0.5355049",
"0.5348274",
"0.5347022",
"0.5345041",
"0.5278515",
"0.5278515",
"0.5270801",
"0.5267491",
"0.526336",
"0.52579284",
"0.52131003",
"0.52111965",
"0.5167051",
"0.51555717",
"0.51362073",
"0.51362073",
"0.51362073",
"0.5135208",
"0.50933707",
"0.5093218",
"0.5093218",
"0.5084211",
"0.50828916",
"0.50552183",
"0.5054236",
"0.50445676",
"0.50445676",
"0.5037975",
"0.5036952",
"0.5036952",
"0.4967406",
"0.49460417",
"0.49460202",
"0.49266982",
"0.4918116",
"0.48789638",
"0.4873637",
"0.4865417",
"0.48571318",
"0.48521316",
"0.48422506",
"0.48422506",
"0.4839604",
"0.48201236",
"0.4787702",
"0.47872874",
"0.47607324",
"0.4757194",
"0.47478023",
"0.47401896",
"0.473945",
"0.47278574",
"0.47255227",
"0.46901882",
"0.46901882",
"0.46901882",
"0.46801394",
"0.46801394",
"0.46754792",
"0.46754792",
"0.46754792",
"0.46596056",
"0.46534887",
"0.46505442",
"0.46479478",
"0.46435028",
"0.46413007",
"0.46281388",
"0.46147433",
"0.46124113",
"0.45905393",
"0.4587416",
"0.45843193",
"0.4581498"
] | 0.79725033 | 0 |
Gets the federatedIdentityCredentials property value. Federated identities for applications. Supports $expand and $filter (startsWith, /$count eq 0, /$count ne 0). | def federated_identity_credentials
return @federated_identity_credentials
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def federated_identity_credentials=(value)\n @federated_identity_credentials = value\n end",
"def fetch_credentials\n service = @application.services.find_service FILTER\n service['credentials']\n end",
"def amf_credentials\n if RequestStore.rails_authentication == nil\n return {}\n end\n return RequestStore.rails_authentication\n end",
"def credentials(app_name=nil)\n #bound_app is the name of an app bound to the dat-service and that credentials\n #should be used to access the data-service.\n #for example if an app creates large objects you will need to use\n #the credentials of that app to find the objects.\n app_name ||= @wrapped['director']['bound_app'] if @wrapped['director']\n @credentials ||= VMC::KNIFE.get_credentials(name(), app_name)\n @credentials\n end",
"def credentials\n config.credentials.credentials\n end",
"def credentials\n auth_hash['credentials']\n end",
"def email_credential\n user.credentials.where(name: email).first\n end",
"def custom_authentication_factors\n return @custom_authentication_factors\n end",
"def current_identity\n token_locations = [cookies[:auth_token], ENV['DANGEROUS_AUTH_HACK'], params[:auth_token]]\n token = token_locations.find{|x| !x.blank? }\n if token\n Identity.find_by(token: token)\n else\n nil\n end\n end",
"def rails_credentials\n @_rails_credentials ||= LdapQuery::RailsCredentials.credentials\n end",
"def credentials\n @credentials || self.class.credentials\n end",
"def password_credentials\n return @password_credentials\n end",
"def configured_credentials\n running_config.scan(/(username.*?)$/m).flatten.map(&:strip!)\n end",
"def current_access_token\n client = Restforce.new :username => ENV['SFDC_PUBLIC_USERNAME'],\n :password => ENV['SFDC_PUBLIC_PASSWORD'],\n :client_id => ENV['SFDC_CLIENT_ID'],\n :client_secret => ENV['SFDC_CLIENT_SECRET'],\n :host => ENV['SFDC_HOST']\n client.authenticate!.access_token\n end",
"def current_user\n current_login_credential\n end",
"def current_user\n token_locations = [cookies[:auth_token], ENV['DANGEROUS_AUTH_HACK'], params[:auth_token]]\n token = token_locations.find{|x| !x.blank? }\n if token\n Identity.includes(:person).find_by(token: token).try(:person)\n else\n nil\n end\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n hash = values.first.is_a?(Hash) ? values.first.with_indifferent_access : nil\n self.openid_identifier = hash[:openid_identifier] if !hash.nil? && hash.key?(:openid_identifier)\n end",
"def federation_configurations\n return @federation_configurations\n end",
"def authenticating_authority\n @authenticating_authority ||= []\n end",
"def determine_credentials(credentials = {})\n return credentials if credentials.is_a?(Hash) && !credentials.empty?\n\n rails_credentials\n end",
"def key_credentials\n return @key_credentials\n end",
"def credentials\n @credentials ||= begin\n txt = ::Base64.decode64(header.params || '')\n txt.split(/:/, 2)\n end\n end",
"def authenticate\n authenticate_or_request_with_http_digest(REALM) do |username|\n USERS[username]\n end\n end",
"def credentials\n return nil if username.nil? || password.nil?\n \"#{username}:#{password}\"\n end",
"def credentials\n @credentials ||= params.unpack1('m*').split(':', 2)\n end",
"def authentication\n if @property_hash[:authentication] == 'SERVER' and @resource[:authentication].upcase == 'DCS'\n return @resource[:authentication]\n else\n return @property_hash[:authentication]\n end\n end",
"def get_client_customer_id\n adwords.credential_handler.credentials[:client_customer_id]\n end",
"def service_principal_id\n return @service_principal_id\n end",
"def acid\n return AcidUser.find self._id\n end",
"def sso_cookie_sign_credential_used\n {\n 'myhealthevet' => 'my_healthe_vet',\n 'dslogon' => 'ds_logon',\n 'idme' => 'id_me',\n 'ssoe' => 'ssoe'\n }.fetch(@current_user.identity.sign_in.fetch(:service_name))\n end",
"def authentication provider=:identity\n Authentication.where(user_id: id, provider: provider).all.first\n end",
"def get_auth()\n\t\t\tfind_attributes(\"auth\").first\n\t\tend",
"def access_key_id\n credentials['access_key']\n end",
"def credential\n authorizer.get_credentials('default')\n end",
"def cloud_credential(cloud_credential_id)\n cred = self.cloud_credentials.select { |ca| ca.id.to_s == cloud_credential_id.to_s }.first\n #If openstack, merge the cloud_account's url to cloud_attributes hash\n if ! cred.cloud_account.url.nil?\n cred.cloud_attributes.merge!({\"openstack_auth_url\" => cred.cloud_account.url})\n end\n return cred\n end",
"def cloud_credential\n (self.cloud_credential_id.nil? ? nil : Account.find_cloud_credential(self.cloud_credential_id))\n end",
"def get_credentials\n password = ENV['CARRIER_PRODUCTS_ENCRYPTION_PASSWORD']\n\n encrypted_credentials = self.credentials\n if self.state == CarrierProduct::States::LOCKED_FOR_CONFIGURING\n configured_product = first_unlocked_product_in_owner_chain()\n if configured_product\n return configured_product.get_credentials\n else\n return {}\n end\n\n end\n\n credentials = encrypted_credentials.inject({}) do |hash, (key, value)|\n hash[key] = AESCrypt.decrypt(value, password)\n hash\n end\n\n return credentials\n end",
"def set_app_environment_credential\n @app_environment_credential = AppEnvironmentCredential.find(params[:id])\n end",
"def user_credentials\n keys = %w[nome cognome email password]\n user_params = select_params(params, keys)\n user_params\n end",
"def credentials\n []\n end",
"def credentials\n []\n end",
"def credential_filtered_uri\n URICredentialsFilter.credential_filtered_uri(uri)\n end",
"def authenticated_user\n User.where(email: email_from_headers, password: password_from_headers).first\n end",
"def credentials?\n credentials.values.all?\n end",
"def ec2_credentials(user_id = nil, filter = {})\n # caching\n @ec2_credentials =\n elektron_identity.get(\n \"users/#{user_id}/credentials/OS-EC2\",\n filter,\n ).map_to(\"body.credentials\", &ec2_credential_map)\n return @ec2_credentials if filter[:tenant_id].nil?\n @ec2_credentials.select do |ec2_cred|\n ec2_cred.tenant_id == filter[:tenant_id]\n end\n end",
"def gateway_credentials\n gateway[:credentials]\n end",
"def identity\n data = perform_get(IDENTITY_PATH)\n data || {}\n end",
"def credential\n authorizer.get_credentials('default')\n end",
"def get_credentials(child_app_id, opts = {})\n data, _status_code, _headers = get_credentials_with_http_info(child_app_id, opts)\n data\n end",
"def credentials_for(uri, realm); end",
"def get_credentials_with_http_info(child_app_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.get_credentials ...'\n end\n # verify the required parameter 'child_app_id' is set\n if @api_client.config.client_side_validation && child_app_id.nil?\n fail ArgumentError, \"Missing the required parameter 'child_app_id' when calling ApplicationManagementApi.get_credentials\"\n end\n # resource path\n local_var_path = '/appManagement/{childAppId}/credentials'.sub('{' + 'childAppId' + '}', child_app_id.to_s)\n\n # query parameters\n query_params = {}\n\n # header parameters\n header_params = {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n # HTTP header 'Content-Type'\n header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = nil\n auth_names = ['APP_MANAGEMENT', 'OAUTH']\n data, status_code, headers = @api_client.call_api(:GET, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'CredentialListSchema')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: ApplicationManagementApi#get_credentials\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def read_credentials\n conf = self.configuration\n return nil unless conf[:credentials]\n return [conf[:credentials][:access_key], conf[:credentials][:secret_key]]\n end",
"def read_credentials\n conf = self.configuration\n return nil unless conf[:credentials]\n return [conf[:credentials][:access_key], conf[:credentials][:secret_key]]\n end",
"def curAuth\n current_user.role_ids[0]\n end",
"def active_person_authorization\n return @children['active-person-authorization'][:value]\n end",
"def credential\n @path = \"/services/Cloud\"\n @credential ||= Nephophobia::Resource::Credential.new self\n end",
"def identity()\n\t\t\treturn @metadata.attributes[:identity].to_i\n\t\tend",
"def list_key_credentials_for_application(app_id, options = {})\n get(\"/apps/#{app_id}/credentials/keys\", options)\n end",
"def anonymous_id\n auth_data[\"anonymous\"][\"id\"] if auth_data.present? && auth_data[\"anonymous\"].is_a?(Hash)\n end",
"def access_key\n credentials['access_key']\n end",
"def credentials\n @credentials ||= {}\n end",
"def application_credentials?\n !!application_credentials\n end",
"def username\n credentials.first\n end",
"def get_key_credential_for_application(app_id, key_id, options = {})\n get(\"/apps/#{app_id}/credentials/keys/#{key_id}\", options)\n end",
"def selected_federation_uris\n\n return @selected_federation_uris || []\n\n end",
"def get_credentials\n# send_auth(@user_device)\n get(:get_credentials, id: @lock.id)\n end",
"def credentials_file\n dir['credentials']\n end",
"def device_account_email\n return @device_account_email\n end",
"def credentials\n params.values_at('username', 'password')\n end",
"def credential_get(nuid)\n self.class.get(\"/credential/#{nuid}\")\n end",
"def client_side_current_user\n if session[:user_id]\n User.select([:first_name, :last_name, :email]).find session[:user_id]\n end\n end",
"def custom_authentication_factors=(value)\n @custom_authentication_factors = value\n end",
"def credentials\n @credentials ||= GlobalConstant::Aws::Common.get_credentials_for(@role)\n end",
"def credentials\n @credentials ||= GlobalConstant::Aws::Common.get_credentials_for(@role)\n end",
"def show_service_credential(id, opts = {})\n data, _status_code, _headers = show_service_credential_with_http_info(id, opts)\n data\n end",
"def authenticate()\n\tuser_env = @env[\"Authorization\"] || @env[\"HTTP_AUTHORIZATION\"]\n if user_env\n user = Base64.decode64(user_env[6,user_env.length-6])[/\\w+/]\n\t\treturn user\n else\n \treturn nil\n\tend\nend",
"def user\n @mongodb_uri && @mongodb_uri.credentials[:user]\n end",
"def creds\n\t\tRails.application.secrets.oa_cred[provider]\n\tend",
"def parsed_credentials\n if credentials.is_a?(Resource::JenkinsCredentials)\n credentials.send(:id)\n else\n credentials.to_s\n end\n end",
"def credentials\n if self.authenticating_with_facebook?\n {\n :facebook_cookie => self.raw_cookie\n }\n else\n super\n end\n end",
"def security_credential(devices)\n puts 'There are multiple credentials associated ' \\\n 'with this user. Please select the ' \\\n \"credential you want to use for authentication:\\n\"\n\n device = nil\n while device.nil?\n devices.each_with_index do |dev, index|\n puts \"#{index}: #{dev.name}\"\n end\n\n puts ''\n\n device_index = ask(\n 'Enter the credential number you want to use: '\n )\n\n # https://stackoverflow.com/a/1235990\n next unless /\\A\\d+\\z/ =~ device_index\n\n device = devices[device_index.to_i]\n end\n\n device\n end",
"def email\n connect\n user = self.class.query('CMD_API_SHOW_USER_CONFIG',\n :user => resource[:username]\n )\n return user[\"email\"]\n end",
"def filter_auth_credentials(credentials)\n auth_keys = %i[host port encryption].freeze\n credentials.select { |key, _v| auth_keys.include?(key) }.freeze\n end",
"def digest\n @authenticator\n end",
"def access_key_id\n ENV[\"#{partition&.upcase}_ACCESS_KEY_ID\"] || credentials[\"#{partition}_access_key_id\"]\n end",
"def credentials\n @credentials ||= begin\n request = Rack::Auth::Basic::Request.new(env)\n request.provided? ? request.credentials : []\n end\n end",
"def federation\n Faker::Address.country_code_long\n end",
"def get_stored_credentials(user_id)\n\t raise NotImplementedError, 'get_stored_credentials is not implemented.'\n\tend",
"def to_credential_struct\n @cred_struct\n end",
"def auth_env\n auth_env_as(users(:mati))\n end",
"def get_windows_credentials()\n auth = Authentication.new()\n result = auth.check_credentials_file_exists()\n if result\n credentials = auth.get_stored_windows_credentials()\n else result\n credentials = auth.prompt_for_windows_credentials()\n auth.store_windows_credentials(auth.get_encrypted_windows_credentials(credentials))\n credentials = auth.get_decrypted_windows_credentials(credentials)\n end\n credentials\n end",
"def extract_identity\n @identity = Identity.find_omniauth(omniauth) if omniauth\n end",
"def user_id\n payload = authenticate!(via: :jwt)\n return payload[\"user\"]\n end",
"def credential_authentication_inverso(h)\n [credential(h), authentication(h), inverso(h)].compact.join(\" \")\n end",
"def file_path\n @credentials_file\n end",
"def two_factor_auth_cookie_key\n 'two_factor_auth_credentials'\n end",
"def authentication_token\n object.authentication_token if !current_user || object.id == current_user.id\n end",
"def orcid\n if credential.present?\n sign_in_and_redirect(credential.user, event: :authentication)\n else\n session[\"devise.provider\"] = { \"orcid\" => auth }\n redirect_to new_user_registration_url\n end\n end",
"def service_account\n return @service_account\n end",
"def credentials\n @lock.synchronize do\n @credentials\n end\n end"
] | [
"0.64712614",
"0.5481593",
"0.5417815",
"0.52244824",
"0.48199075",
"0.47429198",
"0.47291657",
"0.470213",
"0.46995538",
"0.46730962",
"0.4668474",
"0.45526695",
"0.45380145",
"0.4520325",
"0.4509671",
"0.44998193",
"0.44967493",
"0.44838315",
"0.44820496",
"0.4478074",
"0.44763324",
"0.44731677",
"0.4471595",
"0.4467015",
"0.4465378",
"0.4461256",
"0.44517818",
"0.44446304",
"0.44413888",
"0.4410302",
"0.44013476",
"0.43795085",
"0.43794757",
"0.43739998",
"0.43683258",
"0.43552676",
"0.43525538",
"0.4351687",
"0.4344425",
"0.43387333",
"0.43387333",
"0.4337136",
"0.43350786",
"0.43304592",
"0.4326329",
"0.43256935",
"0.43233398",
"0.43205157",
"0.42969635",
"0.42916822",
"0.42848417",
"0.42785335",
"0.42785335",
"0.4266493",
"0.4265559",
"0.42638358",
"0.4257572",
"0.42477146",
"0.42443207",
"0.4243615",
"0.4238731",
"0.4234444",
"0.42312914",
"0.4226128",
"0.42238268",
"0.42106378",
"0.4207958",
"0.42015758",
"0.41976002",
"0.4195627",
"0.4191277",
"0.41878226",
"0.41869023",
"0.41869023",
"0.41849107",
"0.41827998",
"0.4173249",
"0.41723967",
"0.41722184",
"0.41711748",
"0.4167852",
"0.41614744",
"0.41516286",
"0.41468042",
"0.4146465",
"0.41433305",
"0.4137613",
"0.41350433",
"0.4130296",
"0.4128104",
"0.412409",
"0.41233906",
"0.4117252",
"0.4114003",
"0.41072476",
"0.4106225",
"0.41022384",
"0.4101096",
"0.4095366",
"0.409114"
] | 0.7010675 | 0 |
Sets the federatedIdentityCredentials property value. Federated identities for applications. Supports $expand and $filter (startsWith, /$count eq 0, /$count ne 0). | def federated_identity_credentials=(value)
@federated_identity_credentials = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_federation\n @federation = Federation.find(params[:id])\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n hash = values.first.is_a?(Hash) ? values.first.with_indifferent_access : nil\n self.openid_identifier = hash[:openid_identifier] if !hash.nil? && hash.key?(:openid_identifier)\n end",
"def federated_identity_credentials\n return @federated_identity_credentials\n end",
"def fed=(fed)\n obj = ICU::Federation.find(fed)\n @fed = obj ? obj.code : nil\n raise \"invalid federation (#{fed})\" if @fed.nil? && fed.to_s.strip.length > 0\n end",
"def set_credentials(credentials)\n @credentials = credentials\n end",
"def configure(credentials)\n credentials.each { |key, val| self.send(\"#{key}=\", val) }\n self\n end",
"def set_app_environment_credential\n @app_environment_credential = AppEnvironmentCredential.find(params[:id])\n end",
"def set_indicator_federation\n @indicator_federation = IndicatorFederation.find(params[:id])\n end",
"def custom_authentication_factors=(value)\n @custom_authentication_factors = value\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n if values.first.is_a?(Hash)\n hash = values.first.with_indifferent_access\n self.facebook_name = hash[:facebook_name]\n self.facebook_username = hash[:facebook_username]\n\n hash\n end\n end",
"def credentials=(credentials)\n if credentials.kind_of?(ApplicationCredentials) || credentials.kind_of?(AccountCredentials)\n @credentials = credentials\n else\n raise 'Invalid credentials object'\n end\n end",
"def setCredentials(service, host, port, userid, password, realm)\n @isblob = false\n @securityblob = nil\n @service = service\n @host = host\n @port = port\n @userid = userid\n @password = password\n @realm = realm\n end",
"def federation_configurations=(value)\n @federation_configurations = value\n end",
"def credentials=(value)\n BaseTask.validate value, \"credentials\", Database::CREDENTIALS\n @credentials = value\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n self.unauthorized_record = values.first if values.first.class < ::ActiveRecord::Base\n end",
"def setCredentials(service, host, port, userid, password, realm)\n\t\t@isblob = false\n\t\t@securityblob = nil\n\t\t@service = service\n\t\t@host = host\n\t\t@port = port\n\t\t@userid = userid\n\t\t@password = password\n\t\t@realm = realm\n\tend",
"def credentials=(target, scheme, username, password)\r\n\t\t\t`#{BITS::BITSADMIN} /setcredentials {#{@id}} #{target} #{scheme} #{username} #{password}`\r\n\t\tend",
"def credentials= (new_credentials)\n @credentials = new_credentials\n refresh_config_for_api_objects!\n @credentials\n end",
"def credentials=(values)\n return if values.blank? || !values.is_a?(Hash)\n values.symbolize_keys!\n values.each do |field, value|\n next if value.blank?\n send(\"#{field}=\", value)\n end\n end",
"def set_credentials(credentials: nil)\n raise StandardError, 'credentials must be a hash' unless credentials.is_a?(Hash)\n\n password = ENV['CARRIER_PRODUCTS_ENCRYPTION_PASSWORD']\n encrypted_credentials = credentials.inject({}) do |hash, (key, value)|\n raise StandardError, \"#{key.to_s.capitalize} must be specified\" if value.blank? && !key.to_s.include?('test')\n\n hash[key] = AESCrypt.encrypt(value, password) if value.present?\n hash\n end\n\n self.credentials = encrypted_credentials\n self.save!\n end",
"def credentials=(credentials)\n @lock.synchronize do\n @credentials = credentials\n end\n end",
"def set_credentials\n @user = User.find(current_user.id)\n end",
"def credential=(value)\n @children['credential'][:value] = value\n end",
"def set_FederalID(value)\n set_input(\"FederalID\", value)\n end",
"def key_credentials=(value)\n @key_credentials = value\n end",
"def apply_credentials\n seeds.each do |node|\n node.credentials = @credentials || {}\n end\n true\n end",
"def selected_federation_uris=(selection)\n\n only_use(selection)\n\n end",
"def impersonate!(credentials = {})\n @tenant = get_tenant(credentials)\n @options[:tenant] = @tenant\n end",
"def set_fuser\n @fuser = Fuser.find(params[:id])\n end",
"def service_principal_id=(value)\n @service_principal_id = value\n end",
"def set(key, value, application_id, username = nil, hostname = nil)\n if username && hostname\n CF.CFPreferencesSetValue(\n key.to_cf,\n arg_to_cf(value),\n application_id.to_cf,\n arg_to_cf(username),\n arg_to_cf(hostname)\n )\n else\n CF.CFPreferencesSetAppValue(\n key.to_cf,\n arg_to_cf(value),\n application_id.to_cf\n )\n end\n CF.CFPreferencesAppSynchronize(application_id.to_cf)\n end",
"def authenticate(session, cookies)\n session['account_id'] = id\n session['organization_id'] = organization_id\n refresh_credentials(cookies)\n self\n end",
"def set_auth_property\n @auth_property = AuthProperty.find(params[:id])\n end",
"def set_identity\n @identity = Identity.find_by uuid: params['uuid']\n end",
"def set_realm(value)\n env[:realm] = value\n end",
"def set_AuthenticationToken(value)\n set_input(\"AuthenticationToken\", value)\n end",
"def set_AuthenticationToken(value)\n set_input(\"AuthenticationToken\", value)\n end",
"def password_credentials=(value)\n @password_credentials = value\n end",
"def set_flickr_account\n @flickr_account = FlickrAccount.find(params[:id])\n end",
"def setforwardingentitypassword(value)\r\n setvalue(SVTags::FORWARDING_ENTITY_PASSWORD, value)\r\n end",
"def set_farm_store_profile\n @farm_store_profile = FarmStoreProfile.find(params[:id])\n end",
"def set_FECID(value)\n set_input(\"FECID\", value)\n end",
"def set_FECID(value)\n set_input(\"FECID\", value)\n end",
"def set_external_credential\n @external_credential = ExternalCredential.find(params[:id])\n end",
"def set_EntityID(value)\n set_input(\"EntityID\", value)\n end",
"def set_salesforce_applicant\n @salesforce_applicant = SalesforceApplicant.find(params[:id])\n end",
"def set_ProviderAccountID(value)\n set_input(\"ProviderAccountID\", value)\n end",
"def set_authentication_authority\n value = ';ShadowHash;HASHLIST:'\n authority = NSMutableArray.new\n if @kernel_version_major >= 12\n value << '<SALTED-SHA512-PBKDF2>'\n elsif @kernel_version_major == 11\n value << '<SALTED-SHA512>'\n else\n value << '<SALTED-SHA1>'\n end\n authority << value\n @user['authentication_authority'] = authority\n end",
"def set_identity\n @identity = Identity.find(params[:id])\n end",
"def set_identity\n @identity = Identity.find(params[:id])\n end",
"def set_identity\n @identity = Identity.find(params[:id])\n end",
"def set_fry_farm\n @fry_farm = FryFarm.find(params[:id])\n end",
"def identity=(value)\n @identity = value\n end",
"def set_client_id_in_property_suite\n self.client_id = self.user.try(:client_id)\n end",
"def set_current_user\n @current_user =\n if session.key? :user_id\n User.active.find_by id: session[:user_id]\n elsif request.env.key? 'fcIdNumber'\n User.active.find_by spire: request.env['fcIdNumber']\n end\n session[:user_id] = @current_user.id if @current_user.present?\n end",
"def set_credential\n # @credential = Credential.find(params[:id])\n end",
"def update_credentials(opts = {})\n opts[:fields] and opts.delete(:fields).each_with_index { |f, i|\n opts[\"fields_attributes[#{i}][name]\"] = f[:name]\n opts[\"fields_attributes[#{i}][value]\"] = f[:value]\n }\n perform_request_with_object(:patch,\n '/api/v1/accounts/update_credentials',\n opts, Mastodon::Account)\n end",
"def set_site_credentials(id, opts = {})\n data, _status_code, _headers = set_site_credentials_with_http_info(id, opts)\n data\n end",
"def set_salesforceuser\n @salesforceuser = Salesforceuser.find(params[:id])\n end",
"def update_photo_identities\n return unless token\n return unless provider_name == \"flickr\"\n return unless ( fi = user.flickr_identity )\n\n fi.token = token\n secret = auth_info.try( :[], \"credentials\" ).try( :[], \"secret\" )\n fi.secret = secret unless secret.blank?\n fi.save\n true\n end",
"def identity_providers=(value)\n @identity_providers = value\n end",
"def identity_providers=(value)\n @identity_providers = value\n end",
"def set_identity\n @identity = Identity.find(params[:id])\n @identity = @identity.user_id == session[:user_id] ? @identity : nil\n end",
"def set_credential\n @credential = Credential.find(params[:id])\n end",
"def set_credential\n @credential = Credential.find(params[:id])\n end",
"def set_invited_fiend\n @invited_fiend = InvitedFiend.find(params[:id])\n end",
"def set_acting_user(email)\n `$.cookie('acting_user', #{email}, { path: '/' })`\n end",
"def service_account=(value)\n @service_account = value\n end",
"def openid_fields=(fields)\n fields.each do |key, value|\n if value.is_a? Array\n value = value.first\n end\n case key.to_s\n when \"email\", \"http://axschema.org/contact/email\"\n self.email = value\n end\n end\n # If user already exists with that email, we just update that user instead\n if user = User.find_by_email(self.email)\n user.update_attribute(:identity_url, self.identity_url)\n # Overtake attributes from existing user, as we can't change self\n self.id = user.id\n else\n # If we are a new user ...\n if self.new_record?\n if self.email.present?\n # Create this user\n self.save!\n else\n # Don't allow this user to be created\n self.email = nil\n end\n end\n end\n end",
"def set_farm_field\n @farm_field = FarmField.find(params[:id])\n end",
"def set_fokey\n @fokey = Fokey.find(params[:id])\n end",
"def friend_kopal_identity= value\n self[:friend_kopal_identity] = value.to_s\n end",
"def set_individual_mf_device\n @individual_mf_device = IndividualMfDevice.find(params[:id])\n end",
"def set_site_credentials(id, opts = {})\n data, _status_code, _headers = set_site_credentials_with_http_info(id, opts)\n return data\n end",
"def set_cookie_value\n cookie_value = User.using_client_shard(client: @client).get_cookie_value(@user.id, @user.password, @browser_user_agent)\n success_with_data({cookie_value: cookie_value, user_token_sale_state: @user.get_token_sale_state_page_name})\n end",
"def refresh_credentials(cookies)\n cookies['dc_logged_in'] = {:value => 'true', :expires => 1.month.from_now, :httponly => true}\n end",
"def setCookies(cookies)\n @fields['cookies'] = cookies\n self\n end",
"def setCookies(cookies)\n @fields['cookies'] = cookies\n self\n end",
"def user_flow_identity_providers=(value)\n @user_flow_identity_providers = value\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_LoginID(value)\n set_input(\"LoginID\", value)\n end",
"def set_creds\n\n creds = Aws::SharedCredentials.new({profile_name: session[:current_profile], correctClockSkew: true})\n Aws.config.update({\n region: 'us-east-1',\n credentials: creds\n })\n\n get_mfa_device\n if !session[:profile_mfa].nil? && !session[:profile_mfa].empty?\n begin\n res = sts.get_session_token(duration_seconds: 3600, serial_number: session[:mfa_device], token_code: session[:profile_mfa])\n\n session[:elevated] = true\n session[session[:current_profile]] = {\n access_key_id: res.credentials['access_key_id'],\n secret_access_key: res.credentials['secret_access_key'],\n session_token: res.credentials['session_token'],\n expiration: res.credentials['expiration'],\n containers: []\n }\n creds = Aws::Credentials.new(\n res.credentials['access_key_id'],\n res.credentials['secret_access_key'],\n res.credentials['session_token']\n )\n Aws.config.update({\n region: 'us-east-1',\n credentials: creds\n })\n\n { err: false }\n rescue Exception => e\n p \"RESCUE----\"\n p e\n session[session[:current_profile]] = {\n containers: []\n }\n session[:profile_mfa] = \"\"\n session[:elevated] = false\n { err: true }\n end\n\n else\n session[session[:current_profile]] = {\n containers: []\n }\n session[:profile_mfa] = \"\"\n session[:elevated] = false\n { err: false}\n end\n\n end",
"def cloud_credential=(cloud_credential)\n self.cloud_credential_id = (cloud_credential.kind_of?(String) ? cloud_credential : cloud_credential.id.to_s)\n end",
"def set_credential_key\n @credential = Credential.find(params[:id])\n end",
"def set_origin_access_identity_config(aws_id, config)\n link = generate_request('PUT', \"origin-access-identity/cloudfront/#{aws_id}/config\", {}, origin_access_identity_config_to_xml(config),\n 'If-Match' => config[:e_tag])\n request_info(link, RightHttp2xxParser.new(:logger => @logger))\n end",
"def set_identity\n @identity = Identity.find(params[:id])\n end",
"def set_cookies_for_user(resource)\n cookies[:c_user] = {value: resource.email, expires: 2.year.from_now}\n end",
"def rails_credentials\n @_rails_credentials ||= LdapQuery::RailsCredentials.credentials\n end",
"def identity=(v)\n @identity = v\n end",
"def sfdcauth\n client = Databasedotcom::Client.new(\"config/databasedotcom.yml\")\n ENV['access_token'] = client.authenticate :username => ENV['sfdc_username'], :password => ENV['sfdc_password']\n render :inline => \"<html><body><b>New access token from salesforce. Saved to session.</b><br>\"+ENV['access_token']+\"</body></html>\"\n end",
"def client_application_tenant_ids=(value)\n @client_application_tenant_ids = value\n end",
"def set_clientlogin_token(auth_token)\n @token = auth_token\n end"
] | [
"0.5634913",
"0.5619688",
"0.54210216",
"0.5244525",
"0.50794685",
"0.502044",
"0.50034255",
"0.49515355",
"0.49202353",
"0.48996773",
"0.48921308",
"0.48899665",
"0.4880244",
"0.48521394",
"0.48449174",
"0.4789488",
"0.47363174",
"0.47192883",
"0.46996412",
"0.46990544",
"0.46977508",
"0.46969464",
"0.46877047",
"0.4686306",
"0.46763194",
"0.46360183",
"0.4632804",
"0.45924056",
"0.45770392",
"0.45474854",
"0.45016742",
"0.44896954",
"0.44696546",
"0.44570172",
"0.44501227",
"0.4424708",
"0.4424708",
"0.4400007",
"0.43943617",
"0.4384613",
"0.43669266",
"0.43459803",
"0.43459803",
"0.43400973",
"0.43318763",
"0.43253955",
"0.43193865",
"0.4293716",
"0.42894483",
"0.42894483",
"0.42894483",
"0.42543092",
"0.42480728",
"0.42439497",
"0.4232848",
"0.42312858",
"0.4225108",
"0.42209283",
"0.42127103",
"0.42087486",
"0.41926667",
"0.41926667",
"0.41890436",
"0.417259",
"0.417259",
"0.41692087",
"0.4160166",
"0.4156608",
"0.41510424",
"0.41438335",
"0.4141129",
"0.41381735",
"0.41356418",
"0.41346994",
"0.4129766",
"0.41287956",
"0.4117281",
"0.4117281",
"0.41141322",
"0.41138363",
"0.41138363",
"0.41138363",
"0.41138363",
"0.41138363",
"0.41138363",
"0.41138363",
"0.41138363",
"0.41138363",
"0.41138363",
"0.4104099",
"0.40989095",
"0.40883338",
"0.40874994",
"0.4086769",
"0.40826285",
"0.40780386",
"0.4076745",
"0.4067887",
"0.40580755",
"0.40544698"
] | 0.7659251 | 0 |
The deserialization information for the current model | def get_field_deserializers()
return super.merge({
"addIns" => lambda {|n| @add_ins = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AddIn.create_from_discriminator_value(pn) }) },
"api" => lambda {|n| @api = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ApiApplication.create_from_discriminator_value(pn) }) },
"appId" => lambda {|n| @app_id = n.get_string_value() },
"appManagementPolicies" => lambda {|n| @app_management_policies = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AppManagementPolicy.create_from_discriminator_value(pn) }) },
"appRoles" => lambda {|n| @app_roles = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AppRole.create_from_discriminator_value(pn) }) },
"applicationTemplateId" => lambda {|n| @application_template_id = n.get_string_value() },
"certification" => lambda {|n| @certification = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Certification.create_from_discriminator_value(pn) }) },
"createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
"createdOnBehalfOf" => lambda {|n| @created_on_behalf_of = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) },
"defaultRedirectUri" => lambda {|n| @default_redirect_uri = n.get_string_value() },
"description" => lambda {|n| @description = n.get_string_value() },
"disabledByMicrosoftStatus" => lambda {|n| @disabled_by_microsoft_status = n.get_string_value() },
"displayName" => lambda {|n| @display_name = n.get_string_value() },
"extensionProperties" => lambda {|n| @extension_properties = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) },
"federatedIdentityCredentials" => lambda {|n| @federated_identity_credentials = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::FederatedIdentityCredential.create_from_discriminator_value(pn) }) },
"groupMembershipClaims" => lambda {|n| @group_membership_claims = n.get_string_value() },
"homeRealmDiscoveryPolicies" => lambda {|n| @home_realm_discovery_policies = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::HomeRealmDiscoveryPolicy.create_from_discriminator_value(pn) }) },
"identifierUris" => lambda {|n| @identifier_uris = n.get_collection_of_primitive_values(String) },
"info" => lambda {|n| @info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::InformationalUrl.create_from_discriminator_value(pn) }) },
"isDeviceOnlyAuthSupported" => lambda {|n| @is_device_only_auth_supported = n.get_boolean_value() },
"isFallbackPublicClient" => lambda {|n| @is_fallback_public_client = n.get_boolean_value() },
"keyCredentials" => lambda {|n| @key_credentials = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::KeyCredential.create_from_discriminator_value(pn) }) },
"logo" => lambda {|n| @logo = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },
"notes" => lambda {|n| @notes = n.get_string_value() },
"oauth2RequirePostResponse" => lambda {|n| @oauth2_require_post_response = n.get_boolean_value() },
"optionalClaims" => lambda {|n| @optional_claims = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::OptionalClaims.create_from_discriminator_value(pn) }) },
"owners" => lambda {|n| @owners = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) },
"parentalControlSettings" => lambda {|n| @parental_control_settings = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ParentalControlSettings.create_from_discriminator_value(pn) }) },
"passwordCredentials" => lambda {|n| @password_credentials = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PasswordCredential.create_from_discriminator_value(pn) }) },
"publicClient" => lambda {|n| @public_client = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PublicClientApplication.create_from_discriminator_value(pn) }) },
"publisherDomain" => lambda {|n| @publisher_domain = n.get_string_value() },
"requestSignatureVerification" => lambda {|n| @request_signature_verification = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::RequestSignatureVerification.create_from_discriminator_value(pn) }) },
"requiredResourceAccess" => lambda {|n| @required_resource_access = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RequiredResourceAccess.create_from_discriminator_value(pn) }) },
"samlMetadataUrl" => lambda {|n| @saml_metadata_url = n.get_string_value() },
"serviceManagementReference" => lambda {|n| @service_management_reference = n.get_string_value() },
"signInAudience" => lambda {|n| @sign_in_audience = n.get_string_value() },
"spa" => lambda {|n| @spa = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SpaApplication.create_from_discriminator_value(pn) }) },
"synchronization" => lambda {|n| @synchronization = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Synchronization.create_from_discriminator_value(pn) }) },
"tags" => lambda {|n| @tags = n.get_collection_of_primitive_values(String) },
"tokenEncryptionKeyId" => lambda {|n| @token_encryption_key_id = n.get_guid_value() },
"tokenIssuancePolicies" => lambda {|n| @token_issuance_policies = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TokenIssuancePolicy.create_from_discriminator_value(pn) }) },
"tokenLifetimePolicies" => lambda {|n| @token_lifetime_policies = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TokenLifetimePolicy.create_from_discriminator_value(pn) }) },
"verifiedPublisher" => lambda {|n| @verified_publisher = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::VerifiedPublisher.create_from_discriminator_value(pn) }) },
"web" => lambda {|n| @web = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WebApplication.create_from_discriminator_value(pn) }) },
})
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deserialized\n @deserialized ||= @serializer.deserialize @serialized_object\n end",
"def get_field_deserializers()\n return super.merge({\n \"detectionStatus\" => lambda {|n| @detection_status = n.get_enum_value(MicrosoftGraph::Models::SecurityDetectionStatus) },\n \"fileDetails\" => lambda {|n| @file_details = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityFileDetails.create_from_discriminator_value(pn) }) },\n \"mdeDeviceId\" => lambda {|n| @mde_device_id = n.get_string_value() },\n })\n end",
"def serialized_attributes\n read_inheritable_attribute(\"attr_serialized\") || { }\n end",
"def get_field_deserializers()\n return super.merge({\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"file\" => lambda {|n| @file = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },\n \"fileHash\" => lambda {|n| @file_hash = n.get_string_value() },\n \"version\" => lambda {|n| @version = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"committedContentVersion\" => lambda {|n| @committed_content_version = n.get_string_value() },\n \"contentVersions\" => lambda {|n| @content_versions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }) },\n \"fileName\" => lambda {|n| @file_name = n.get_string_value() },\n \"size\" => lambda {|n| @size = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return {\n \"attribution\" => lambda {|n| @attribution = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ImageInfo.create_from_discriminator_value(pn) }) },\n \"backgroundColor\" => lambda {|n| @background_color = n.get_string_value() },\n \"content\" => lambda {|n| @content = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },\n \"description\" => lambda {|n| @description = n.get_string_value() },\n \"displayText\" => lambda {|n| @display_text = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"detectionType\" => lambda {|n| @detection_type = n.get_string_value() },\n \"method\" => lambda {|n| @method = n.get_string_value() },\n \"name\" => lambda {|n| @name = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"lastModifiedDateTime\" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },\n \"resource\" => lambda {|n| @resource = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Entity.create_from_discriminator_value(pn) }) },\n \"resourceReference\" => lambda {|n| @resource_reference = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ResourceReference.create_from_discriminator_value(pn) }) },\n \"resourceVisualization\" => lambda {|n| @resource_visualization = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ResourceVisualization.create_from_discriminator_value(pn) }) },\n \"weight\" => lambda {|n| @weight = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return {\n \"isEnabled\" => lambda {|n| @is_enabled = n.get_boolean_value() },\n \"maxImageSize\" => lambda {|n| @max_image_size = n.get_number_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"timeout\" => lambda {|n| @timeout = n.get_duration_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"contentData\" => lambda {|n| @content_data = n.get_string_value() },\n \"fileName\" => lambda {|n| @file_name = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"applicationVersion\" => lambda {|n| @application_version = n.get_string_value() },\n \"headerValue\" => lambda {|n| @header_value = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"callEndSubReason\" => lambda {|n| @call_end_sub_reason = n.get_number_value() },\n \"callType\" => lambda {|n| @call_type = n.get_string_value() },\n \"calleeNumber\" => lambda {|n| @callee_number = n.get_string_value() },\n \"callerNumber\" => lambda {|n| @caller_number = n.get_string_value() },\n \"correlationId\" => lambda {|n| @correlation_id = n.get_string_value() },\n \"duration\" => lambda {|n| @duration = n.get_number_value() },\n \"endDateTime\" => lambda {|n| @end_date_time = n.get_date_time_value() },\n \"failureDateTime\" => lambda {|n| @failure_date_time = n.get_date_time_value() },\n \"finalSipCode\" => lambda {|n| @final_sip_code = n.get_number_value() },\n \"finalSipCodePhrase\" => lambda {|n| @final_sip_code_phrase = n.get_string_value() },\n \"id\" => lambda {|n| @id = n.get_string_value() },\n \"inviteDateTime\" => lambda {|n| @invite_date_time = n.get_date_time_value() },\n \"mediaBypassEnabled\" => lambda {|n| @media_bypass_enabled = n.get_boolean_value() },\n \"mediaPathLocation\" => lambda {|n| @media_path_location = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"signalingLocation\" => lambda {|n| @signaling_location = n.get_string_value() },\n \"startDateTime\" => lambda {|n| @start_date_time = n.get_date_time_value() },\n \"successfulCall\" => lambda {|n| @successful_call = n.get_boolean_value() },\n \"trunkFullyQualifiedDomainName\" => lambda {|n| @trunk_fully_qualified_domain_name = n.get_string_value() },\n \"userDisplayName\" => lambda {|n| @user_display_name = n.get_string_value() },\n \"userId\" => lambda {|n| @user_id = n.get_string_value() },\n \"userPrincipalName\" => lambda {|n| @user_principal_name = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"isCourseActivitySyncEnabled\" => lambda {|n| @is_course_activity_sync_enabled = n.get_boolean_value() },\n \"learningContents\" => lambda {|n| @learning_contents = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::LearningContent.create_from_discriminator_value(pn) }) },\n \"learningCourseActivities\" => lambda {|n| @learning_course_activities = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::LearningCourseActivity.create_from_discriminator_value(pn) }) },\n \"loginWebUrl\" => lambda {|n| @login_web_url = n.get_string_value() },\n \"longLogoWebUrlForDarkTheme\" => lambda {|n| @long_logo_web_url_for_dark_theme = n.get_string_value() },\n \"longLogoWebUrlForLightTheme\" => lambda {|n| @long_logo_web_url_for_light_theme = n.get_string_value() },\n \"squareLogoWebUrlForDarkTheme\" => lambda {|n| @square_logo_web_url_for_dark_theme = n.get_string_value() },\n \"squareLogoWebUrlForLightTheme\" => lambda {|n| @square_logo_web_url_for_light_theme = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"itemId\" => lambda {|n| @item_id = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"title\" => lambda {|n| @title = n.get_string_value() },\n \"versionId\" => lambda {|n| @version_id = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"buildNumber\" => lambda {|n| @build_number = n.get_string_value() },\n \"bundleId\" => lambda {|n| @bundle_id = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"versionNumber\" => lambda {|n| @version_number = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"parentNotebook\" => lambda {|n| @parent_notebook = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Notebook.create_from_discriminator_value(pn) }) },\n \"parentSectionGroup\" => lambda {|n| @parent_section_group = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SectionGroup.create_from_discriminator_value(pn) }) },\n \"sectionGroups\" => lambda {|n| @section_groups = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SectionGroup.create_from_discriminator_value(pn) }) },\n \"sectionGroupsUrl\" => lambda {|n| @section_groups_url = n.get_string_value() },\n \"sections\" => lambda {|n| @sections = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OnenoteSection.create_from_discriminator_value(pn) }) },\n \"sectionsUrl\" => lambda {|n| @sections_url = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"appDisplayName\" => lambda {|n| @app_display_name = n.get_string_value() },\n \"dataType\" => lambda {|n| @data_type = n.get_string_value() },\n \"isSyncedFromOnPremises\" => lambda {|n| @is_synced_from_on_premises = n.get_boolean_value() },\n \"name\" => lambda {|n| @name = n.get_string_value() },\n \"targetObjects\" => lambda {|n| @target_objects = n.get_collection_of_primitive_values(String) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"detectionStatus\" => lambda {|n| @detection_status = n.get_enum_value(MicrosoftGraph::Models::SecurityDetectionStatus) },\n \"imageFile\" => lambda {|n| @image_file = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityFileDetails.create_from_discriminator_value(pn) }) },\n \"mdeDeviceId\" => lambda {|n| @mde_device_id = n.get_string_value() },\n \"parentProcessCreationDateTime\" => lambda {|n| @parent_process_creation_date_time = n.get_date_time_value() },\n \"parentProcessId\" => lambda {|n| @parent_process_id = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"parentProcessImageFile\" => lambda {|n| @parent_process_image_file = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityFileDetails.create_from_discriminator_value(pn) }) },\n \"processCommandLine\" => lambda {|n| @process_command_line = n.get_string_value() },\n \"processCreationDateTime\" => lambda {|n| @process_creation_date_time = n.get_date_time_value() },\n \"processId\" => lambda {|n| @process_id = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"userAccount\" => lambda {|n| @user_account = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityUserAccount.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"clientContext\" => lambda {|n| @client_context = n.get_string_value() },\n \"resultInfo\" => lambda {|n| @result_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ResultInfo.create_from_discriminator_value(pn) }) },\n \"status\" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::OperationStatus) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"completedDateTime\" => lambda {|n| @completed_date_time = n.get_date_time_value() },\n \"progress\" => lambda {|n| @progress = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },\n \"status\" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::DataPolicyOperationStatus) },\n \"storageLocation\" => lambda {|n| @storage_location = n.get_string_value() },\n \"submittedDateTime\" => lambda {|n| @submitted_date_time = n.get_date_time_value() },\n \"userId\" => lambda {|n| @user_id = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"completedUnits\" => lambda {|n| @completed_units = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"progressObservationDateTime\" => lambda {|n| @progress_observation_date_time = n.get_date_time_value() },\n \"totalUnits\" => lambda {|n| @total_units = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"units\" => lambda {|n| @units = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"description\" => lambda {|n| @description = n.get_string_value() },\n \"details\" => lambda {|n| @details = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DetailsInfo.create_from_discriminator_value(pn) }) },\n \"name\" => lambda {|n| @name = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"provisioningStepType\" => lambda {|n| @provisioning_step_type = n.get_enum_value(MicrosoftGraph::Models::ProvisioningStepType) },\n \"status\" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::ProvisioningResult) },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"downloadUri\" => lambda {|n| @download_uri = n.get_string_value() },\n \"expirationDateTime\" => lambda {|n| @expiration_date_time = n.get_date_time_value() },\n \"fulfilledDateTime\" => lambda {|n| @fulfilled_date_time = n.get_date_time_value() },\n \"reviewHistoryPeriodEndDateTime\" => lambda {|n| @review_history_period_end_date_time = n.get_date_time_value() },\n \"reviewHistoryPeriodStartDateTime\" => lambda {|n| @review_history_period_start_date_time = n.get_date_time_value() },\n \"runDateTime\" => lambda {|n| @run_date_time = n.get_date_time_value() },\n \"status\" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::AccessReviewHistoryStatus) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"check32BitOn64System\" => lambda {|n| @check32_bit_on64_system = n.get_boolean_value() },\n \"comparisonValue\" => lambda {|n| @comparison_value = n.get_string_value() },\n \"fileOrFolderName\" => lambda {|n| @file_or_folder_name = n.get_string_value() },\n \"operationType\" => lambda {|n| @operation_type = n.get_enum_value(MicrosoftGraph::Models::Win32LobAppFileSystemOperationType) },\n \"operator\" => lambda {|n| @operator = n.get_enum_value(MicrosoftGraph::Models::Win32LobAppRuleOperator) },\n \"path\" => lambda {|n| @path = n.get_string_value() },\n })\n end",
"def read_object\n if @version == 0\n return amf0_deserialize\n else\n return amf3_deserialize\n end\n end",
"def get_field_deserializers()\n return {\n \"destinationFileName\" => lambda {|n| @destination_file_name = n.get_string_value() },\n \"sourceFile\" => lambda {|n| @source_file = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemReference.create_from_discriminator_value(pn) }) },\n }\n end",
"def get_field_deserializers()\n return {\n \"newText\" => lambda {|n| @new_text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },\n \"numBytes\" => lambda {|n| @num_bytes = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },\n \"oldText\" => lambda {|n| @old_text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },\n \"startNum\" => lambda {|n| @start_num = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"audioDeviceName\" => lambda {|n| @audio_device_name = n.get_string_value() },\n \"bookingType\" => lambda {|n| @booking_type = n.get_enum_value(MicrosoftGraph::Models::BookingType) },\n \"building\" => lambda {|n| @building = n.get_string_value() },\n \"capacity\" => lambda {|n| @capacity = n.get_number_value() },\n \"displayDeviceName\" => lambda {|n| @display_device_name = n.get_string_value() },\n \"emailAddress\" => lambda {|n| @email_address = n.get_string_value() },\n \"floorLabel\" => lambda {|n| @floor_label = n.get_string_value() },\n \"floorNumber\" => lambda {|n| @floor_number = n.get_number_value() },\n \"isWheelChairAccessible\" => lambda {|n| @is_wheel_chair_accessible = n.get_boolean_value() },\n \"label\" => lambda {|n| @label = n.get_string_value() },\n \"nickname\" => lambda {|n| @nickname = n.get_string_value() },\n \"tags\" => lambda {|n| @tags = n.get_collection_of_primitive_values(String) },\n \"videoDeviceName\" => lambda {|n| @video_device_name = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"id\" => lambda {|n| @id = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"targetType\" => lambda {|n| @target_type = n.get_enum_value(MicrosoftGraph::Models::FeatureTargetType) },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"deviceCount\" => lambda {|n| @device_count = n.get_number_value() },\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"managedDevices\" => lambda {|n| @managed_devices = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ManagedDevice.create_from_discriminator_value(pn) }) },\n \"platform\" => lambda {|n| @platform = n.get_enum_value(MicrosoftGraph::Models::DetectedAppPlatformType) },\n \"publisher\" => lambda {|n| @publisher = n.get_string_value() },\n \"sizeInByte\" => lambda {|n| @size_in_byte = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"version\" => lambda {|n| @version = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"activationUrl\" => lambda {|n| @activation_url = n.get_string_value() },\n \"activitySourceHost\" => lambda {|n| @activity_source_host = n.get_string_value() },\n \"appActivityId\" => lambda {|n| @app_activity_id = n.get_string_value() },\n \"appDisplayName\" => lambda {|n| @app_display_name = n.get_string_value() },\n \"contentInfo\" => lambda {|n| @content_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },\n \"contentUrl\" => lambda {|n| @content_url = n.get_string_value() },\n \"createdDateTime\" => lambda {|n| @created_date_time = n.get_date_time_value() },\n \"expirationDateTime\" => lambda {|n| @expiration_date_time = n.get_date_time_value() },\n \"fallbackUrl\" => lambda {|n| @fallback_url = n.get_string_value() },\n \"historyItems\" => lambda {|n| @history_items = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ActivityHistoryItem.create_from_discriminator_value(pn) }) },\n \"lastModifiedDateTime\" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },\n \"status\" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::Status) },\n \"userTimezone\" => lambda {|n| @user_timezone = n.get_string_value() },\n \"visualElements\" => lambda {|n| @visual_elements = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::VisualInfo.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"category\" => lambda {|n| @category = n.get_string_value() },\n \"firstSeenDateTime\" => lambda {|n| @first_seen_date_time = n.get_date_time_value() },\n \"host\" => lambda {|n| @host = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityHost.create_from_discriminator_value(pn) }) },\n \"lastSeenDateTime\" => lambda {|n| @last_seen_date_time = n.get_date_time_value() },\n \"name\" => lambda {|n| @name = n.get_string_value() },\n \"version\" => lambda {|n| @version = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"deviceCount\" => lambda {|n| @device_count = n.get_number_value() },\n \"lastUpdateDateTime\" => lambda {|n| @last_update_date_time = n.get_date_time_value() },\n \"malwareIdentifier\" => lambda {|n| @malware_identifier = n.get_string_value() },\n \"name\" => lambda {|n| @name = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"lastActionDateTime\" => lambda {|n| @last_action_date_time = n.get_date_time_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"operation\" => lambda {|n| @operation = n.get_string_value() },\n \"status\" => lambda {|n| @status = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"details\" => lambda {|n| @details = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DetailsInfo.create_from_discriminator_value(pn) }) },\n \"identityType\" => lambda {|n| @identity_type = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"dataLocationCode\" => lambda {|n| @data_location_code = n.get_string_value() },\n \"hostname\" => lambda {|n| @hostname = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"root\" => lambda {|n| @root = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Root.create_from_discriminator_value(pn) }) },\n }\n end",
"def get_field_deserializers()\n return {\n \"address\" => lambda {|n| @address = n.get_string_value() },\n \"itemId\" => lambda {|n| @item_id = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"relevanceScore\" => lambda {|n| @relevance_score = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },\n \"selectionLikelihood\" => lambda {|n| @selection_likelihood = n.get_enum_value(MicrosoftGraph::Models::SelectionLikelihoodInfo) },\n }\n end",
"def get_field_deserializers()\n return {\n \"hashes\" => lambda {|n| @hashes = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Hashes.create_from_discriminator_value(pn) }) },\n \"mimeType\" => lambda {|n| @mime_type = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"processingMetadata\" => lambda {|n| @processing_metadata = n.get_boolean_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"configurationVersion\" => lambda {|n| @configuration_version = n.get_number_value() },\n \"errorCount\" => lambda {|n| @error_count = n.get_number_value() },\n \"failedCount\" => lambda {|n| @failed_count = n.get_number_value() },\n \"lastUpdateDateTime\" => lambda {|n| @last_update_date_time = n.get_date_time_value() },\n \"notApplicableCount\" => lambda {|n| @not_applicable_count = n.get_number_value() },\n \"pendingCount\" => lambda {|n| @pending_count = n.get_number_value() },\n \"successCount\" => lambda {|n| @success_count = n.get_number_value() },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"format\" => lambda {|n| @format = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookChartDataLabelFormat.create_from_discriminator_value(pn) }) },\n \"position\" => lambda {|n| @position = n.get_string_value() },\n \"separator\" => lambda {|n| @separator = n.get_string_value() },\n \"showBubbleSize\" => lambda {|n| @show_bubble_size = n.get_boolean_value() },\n \"showCategoryName\" => lambda {|n| @show_category_name = n.get_boolean_value() },\n \"showLegendKey\" => lambda {|n| @show_legend_key = n.get_boolean_value() },\n \"showPercentage\" => lambda {|n| @show_percentage = n.get_boolean_value() },\n \"showSeriesName\" => lambda {|n| @show_series_name = n.get_boolean_value() },\n \"showValue\" => lambda {|n| @show_value = n.get_boolean_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"errorDetails\" => lambda {|n| @error_details = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::GenericError.create_from_discriminator_value(pn) }) },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"sourceId\" => lambda {|n| @source_id = n.get_string_value() },\n \"targetId\" => lambda {|n| @target_id = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"contentSource\" => lambda {|n| @content_source = n.get_string_value() },\n \"hitId\" => lambda {|n| @hit_id = n.get_string_value() },\n \"isCollapsed\" => lambda {|n| @is_collapsed = n.get_boolean_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"rank\" => lambda {|n| @rank = n.get_number_value() },\n \"resource\" => lambda {|n| @resource = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Entity.create_from_discriminator_value(pn) }) },\n \"resultTemplateId\" => lambda {|n| @result_template_id = n.get_string_value() },\n \"summary\" => lambda {|n| @summary = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"assignedUserPrincipalName\" => lambda {|n| @assigned_user_principal_name = n.get_string_value() },\n \"groupTag\" => lambda {|n| @group_tag = n.get_string_value() },\n \"hardwareIdentifier\" => lambda {|n| @hardware_identifier = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },\n \"importId\" => lambda {|n| @import_id = n.get_string_value() },\n \"productKey\" => lambda {|n| @product_key = n.get_string_value() },\n \"serialNumber\" => lambda {|n| @serial_number = n.get_string_value() },\n \"state\" => lambda {|n| @state = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ImportedWindowsAutopilotDeviceIdentityState.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"audioRoutingGroups\" => lambda {|n| @audio_routing_groups = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AudioRoutingGroup.create_from_discriminator_value(pn) }) },\n \"callChainId\" => lambda {|n| @call_chain_id = n.get_string_value() },\n \"callOptions\" => lambda {|n| @call_options = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::CallOptions.create_from_discriminator_value(pn) }) },\n \"callRoutes\" => lambda {|n| @call_routes = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CallRoute.create_from_discriminator_value(pn) }) },\n \"callbackUri\" => lambda {|n| @callback_uri = n.get_string_value() },\n \"chatInfo\" => lambda {|n| @chat_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ChatInfo.create_from_discriminator_value(pn) }) },\n \"contentSharingSessions\" => lambda {|n| @content_sharing_sessions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ContentSharingSession.create_from_discriminator_value(pn) }) },\n \"direction\" => lambda {|n| @direction = n.get_enum_value(MicrosoftGraph::Models::CallDirection) },\n \"incomingContext\" => lambda {|n| @incoming_context = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IncomingContext.create_from_discriminator_value(pn) }) },\n \"mediaConfig\" => lambda {|n| @media_config = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::MediaConfig.create_from_discriminator_value(pn) }) },\n \"mediaState\" => lambda {|n| @media_state = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::CallMediaState.create_from_discriminator_value(pn) }) },\n \"meetingInfo\" => lambda {|n| @meeting_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::MeetingInfo.create_from_discriminator_value(pn) }) },\n \"myParticipantId\" => lambda {|n| @my_participant_id = n.get_string_value() },\n \"operations\" => lambda {|n| @operations = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CommsOperation.create_from_discriminator_value(pn) }) },\n \"participants\" => lambda {|n| @participants = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Participant.create_from_discriminator_value(pn) }) },\n \"requestedModalities\" => lambda {|n| @requested_modalities = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Modality.create_from_discriminator_value(pn) }) },\n \"resultInfo\" => lambda {|n| @result_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ResultInfo.create_from_discriminator_value(pn) }) },\n \"source\" => lambda {|n| @source = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ParticipantInfo.create_from_discriminator_value(pn) }) },\n \"state\" => lambda {|n| @state = n.get_enum_value(MicrosoftGraph::Models::CallState) },\n \"subject\" => lambda {|n| @subject = n.get_string_value() },\n \"targets\" => lambda {|n| @targets = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::InvitationParticipantInfo.create_from_discriminator_value(pn) }) },\n \"tenantId\" => lambda {|n| @tenant_id = n.get_string_value() },\n \"toneInfo\" => lambda {|n| @tone_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ToneInfo.create_from_discriminator_value(pn) }) },\n \"transcription\" => lambda {|n| @transcription = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::CallTranscriptionInfo.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return {\n \"externalId\" => lambda {|n| @external_id = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"teacherNumber\" => lambda {|n| @teacher_number = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"customKeyIdentifier\" => lambda {|n| @custom_key_identifier = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"endDateTime\" => lambda {|n| @end_date_time = n.get_date_time_value() },\n \"key\" => lambda {|n| @key = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },\n \"keyId\" => lambda {|n| @key_id = n.get_guid_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"startDateTime\" => lambda {|n| @start_date_time = n.get_date_time_value() },\n \"thumbprint\" => lambda {|n| @thumbprint = n.get_string_value() },\n \"type\" => lambda {|n| @type = n.get_string_value() },\n \"usage\" => lambda {|n| @usage = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"allowMultipleLines\" => lambda {|n| @allow_multiple_lines = n.get_boolean_value() },\n \"appendChangesToExistingText\" => lambda {|n| @append_changes_to_existing_text = n.get_boolean_value() },\n \"linesForEditing\" => lambda {|n| @lines_for_editing = n.get_number_value() },\n \"maxLength\" => lambda {|n| @max_length = n.get_number_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"textType\" => lambda {|n| @text_type = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"assignCategories\" => lambda {|n| @assign_categories = n.get_collection_of_primitive_values(String) },\n \"copyToFolder\" => lambda {|n| @copy_to_folder = n.get_string_value() },\n \"delete\" => lambda {|n| @delete = n.get_boolean_value() },\n \"forwardAsAttachmentTo\" => lambda {|n| @forward_as_attachment_to = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Recipient.create_from_discriminator_value(pn) }) },\n \"forwardTo\" => lambda {|n| @forward_to = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Recipient.create_from_discriminator_value(pn) }) },\n \"markAsRead\" => lambda {|n| @mark_as_read = n.get_boolean_value() },\n \"markImportance\" => lambda {|n| @mark_importance = n.get_enum_value(MicrosoftGraph::Models::Importance) },\n \"moveToFolder\" => lambda {|n| @move_to_folder = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"permanentDelete\" => lambda {|n| @permanent_delete = n.get_boolean_value() },\n \"redirectTo\" => lambda {|n| @redirect_to = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Recipient.create_from_discriminator_value(pn) }) },\n \"stopProcessingRules\" => lambda {|n| @stop_processing_rules = n.get_boolean_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"acceptMappedClaims\" => lambda {|n| @accept_mapped_claims = n.get_boolean_value() },\n \"knownClientApplications\" => lambda {|n| @known_client_applications = n.get_collection_of_primitive_values(UUIDTools::UUID) },\n \"oauth2PermissionScopes\" => lambda {|n| @oauth2_permission_scopes = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PermissionScope.create_from_discriminator_value(pn) }) },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"preAuthorizedApplications\" => lambda {|n| @pre_authorized_applications = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PreAuthorizedApplication.create_from_discriminator_value(pn) }) },\n \"requestedAccessTokenVersion\" => lambda {|n| @requested_access_token_version = n.get_number_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"content\" => lambda {|n| @content = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },\n \"contentUrl\" => lambda {|n| @content_url = n.get_string_value() },\n \"createdByAppId\" => lambda {|n| @created_by_app_id = n.get_string_value() },\n \"lastModifiedDateTime\" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },\n \"level\" => lambda {|n| @level = n.get_number_value() },\n \"links\" => lambda {|n| @links = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PageLinks.create_from_discriminator_value(pn) }) },\n \"order\" => lambda {|n| @order = n.get_number_value() },\n \"parentNotebook\" => lambda {|n| @parent_notebook = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Notebook.create_from_discriminator_value(pn) }) },\n \"parentSection\" => lambda {|n| @parent_section = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::OnenoteSection.create_from_discriminator_value(pn) }) },\n \"title\" => lambda {|n| @title = n.get_string_value() },\n \"userTags\" => lambda {|n| @user_tags = n.get_collection_of_primitive_values(String) },\n })\n end",
"def get_field_deserializers()\n return {\n \"failedRuns\" => lambda {|n| @failed_runs = n.get_number_value() },\n \"failedTasks\" => lambda {|n| @failed_tasks = n.get_number_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"successfulRuns\" => lambda {|n| @successful_runs = n.get_number_value() },\n \"totalRuns\" => lambda {|n| @total_runs = n.get_number_value() },\n \"totalTasks\" => lambda {|n| @total_tasks = n.get_number_value() },\n \"totalUsers\" => lambda {|n| @total_users = n.get_number_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"description\" => lambda {|n| @description = n.get_string_value() },\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"id\" => lambda {|n| @id = n.get_guid_value() },\n \"isEnabled\" => lambda {|n| @is_enabled = n.get_boolean_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"value\" => lambda {|n| @value = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"recommendedActions\" => lambda {|n| @recommended_actions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RecommendedAction.create_from_discriminator_value(pn) }) },\n \"resolvedTargetsCount\" => lambda {|n| @resolved_targets_count = n.get_number_value() },\n \"simulationEventsContent\" => lambda {|n| @simulation_events_content = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SimulationEventsContent.create_from_discriminator_value(pn) }) },\n \"trainingEventsContent\" => lambda {|n| @training_events_content = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TrainingEventsContent.create_from_discriminator_value(pn) }) },\n }\n end",
"def get_field_deserializers()\n return {\n \"customKeyIdentifier\" => lambda {|n| @custom_key_identifier = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"endDateTime\" => lambda {|n| @end_date_time = n.get_date_time_value() },\n \"hint\" => lambda {|n| @hint = n.get_string_value() },\n \"keyId\" => lambda {|n| @key_id = n.get_guid_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"secretText\" => lambda {|n| @secret_text = n.get_string_value() },\n \"startDateTime\" => lambda {|n| @start_date_time = n.get_date_time_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"isRequired\" => lambda {|n| @is_required = n.get_boolean_value() },\n \"locations\" => lambda {|n| @locations = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::LocationConstraintItem.create_from_discriminator_value(pn) }) },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"suggestLocation\" => lambda {|n| @suggest_location = n.get_boolean_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"activityType\" => lambda {|n| @activity_type = n.get_string_value() },\n \"chainId\" => lambda {|n| @chain_id = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"previewText\" => lambda {|n| @preview_text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemBody.create_from_discriminator_value(pn) }) },\n \"recipient\" => lambda {|n| @recipient = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamworkNotificationRecipient.create_from_discriminator_value(pn) }) },\n \"templateParameters\" => lambda {|n| @template_parameters = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::KeyValuePair.create_from_discriminator_value(pn) }) },\n \"topic\" => lambda {|n| @topic = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamworkActivityTopic.create_from_discriminator_value(pn) }) },\n }\n end",
"def metadata\n self.class.metadata\n end",
"def get_field_deserializers()\n return {\n \"activityIdentifier\" => lambda {|n| @activity_identifier = n.get_string_value() },\n \"countEntitled\" => lambda {|n| @count_entitled = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"countEntitledForProvisioning\" => lambda {|n| @count_entitled_for_provisioning = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"countEscrowed\" => lambda {|n| @count_escrowed = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"countEscrowedRaw\" => lambda {|n| @count_escrowed_raw = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"countExported\" => lambda {|n| @count_exported = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"countExports\" => lambda {|n| @count_exports = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"countImported\" => lambda {|n| @count_imported = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"countImportedDeltas\" => lambda {|n| @count_imported_deltas = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"countImportedReferenceDeltas\" => lambda {|n| @count_imported_reference_deltas = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"error\" => lambda {|n| @error = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SynchronizationError.create_from_discriminator_value(pn) }) },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"state\" => lambda {|n| @state = n.get_enum_value(MicrosoftGraph::Models::SynchronizationTaskExecutionResult) },\n \"timeBegan\" => lambda {|n| @time_began = n.get_date_time_value() },\n \"timeEnded\" => lambda {|n| @time_ended = n.get_date_time_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"content\" => lambda {|n| @content = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"transportKey\" => lambda {|n| @transport_key = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"activeDeviceCount\" => lambda {|n| @active_device_count = n.get_number_value() },\n \"deviceManufacturer\" => lambda {|n| @device_manufacturer = n.get_string_value() },\n \"deviceModel\" => lambda {|n| @device_model = n.get_string_value() },\n \"healthStatus\" => lambda {|n| @health_status = n.get_enum_value(MicrosoftGraph::Models::UserExperienceAnalyticsHealthState) },\n \"meanTimeToFailureInMinutes\" => lambda {|n| @mean_time_to_failure_in_minutes = n.get_number_value() },\n \"modelAppHealthScore\" => lambda {|n| @model_app_health_score = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return {\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"resourceAccess\" => lambda {|n| @resource_access = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ResourceAccess.create_from_discriminator_value(pn) }) },\n \"resourceAppId\" => lambda {|n| @resource_app_id = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"createdDateTime\" => lambda {|n| @created_date_time = n.get_date_time_value() },\n \"deviceId\" => lambda {|n| @device_id = n.get_string_value() },\n \"key\" => lambda {|n| @key = n.get_string_value() },\n \"volumeType\" => lambda {|n| @volume_type = n.get_enum_value(MicrosoftGraph::Models::VolumeType) },\n })\n end",
"def get_field_deserializers()\n return {\n \"anchor\" => lambda {|n| @anchor = n.get_boolean_value() },\n \"apiExpressions\" => lambda {|n| @api_expressions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::StringKeyStringValuePair.create_from_discriminator_value(pn) }) },\n \"caseExact\" => lambda {|n| @case_exact = n.get_boolean_value() },\n \"defaultValue\" => lambda {|n| @default_value = n.get_string_value() },\n \"flowNullValues\" => lambda {|n| @flow_null_values = n.get_boolean_value() },\n \"metadata\" => lambda {|n| @metadata = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttributeDefinitionMetadataEntry.create_from_discriminator_value(pn) }) },\n \"multivalued\" => lambda {|n| @multivalued = n.get_boolean_value() },\n \"mutability\" => lambda {|n| @mutability = n.get_enum_value(MicrosoftGraph::Models::Mutability) },\n \"name\" => lambda {|n| @name = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"referencedObjects\" => lambda {|n| @referenced_objects = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ReferencedObject.create_from_discriminator_value(pn) }) },\n \"required\" => lambda {|n| @required = n.get_boolean_value() },\n \"type\" => lambda {|n| @type = n.get_enum_value(MicrosoftGraph::Models::AttributeType) },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"content\" => lambda {|n| @content = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },\n \"expirationDateTime\" => lambda {|n| @expiration_date_time = n.get_date_time_value() },\n \"nextExpectedRanges\" => lambda {|n| @next_expected_ranges = n.get_collection_of_primitive_values(String) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"content\" => lambda {|n| @content = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },\n \"size\" => lambda {|n| @size = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"averageBlueScreens\" => lambda {|n| @average_blue_screens = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },\n \"averageRestarts\" => lambda {|n| @average_restarts = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },\n \"blueScreenCount\" => lambda {|n| @blue_screen_count = n.get_number_value() },\n \"bootScore\" => lambda {|n| @boot_score = n.get_number_value() },\n \"coreBootTimeInMs\" => lambda {|n| @core_boot_time_in_ms = n.get_number_value() },\n \"coreLoginTimeInMs\" => lambda {|n| @core_login_time_in_ms = n.get_number_value() },\n \"deviceCount\" => lambda {|n| @device_count = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },\n \"deviceName\" => lambda {|n| @device_name = n.get_string_value() },\n \"diskType\" => lambda {|n| @disk_type = n.get_enum_value(MicrosoftGraph::Models::DiskType) },\n \"groupPolicyBootTimeInMs\" => lambda {|n| @group_policy_boot_time_in_ms = n.get_number_value() },\n \"groupPolicyLoginTimeInMs\" => lambda {|n| @group_policy_login_time_in_ms = n.get_number_value() },\n \"healthStatus\" => lambda {|n| @health_status = n.get_enum_value(MicrosoftGraph::Models::UserExperienceAnalyticsHealthState) },\n \"loginScore\" => lambda {|n| @login_score = n.get_number_value() },\n \"manufacturer\" => lambda {|n| @manufacturer = n.get_string_value() },\n \"model\" => lambda {|n| @model = n.get_string_value() },\n \"modelStartupPerformanceScore\" => lambda {|n| @model_startup_performance_score = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },\n \"operatingSystemVersion\" => lambda {|n| @operating_system_version = n.get_string_value() },\n \"responsiveDesktopTimeInMs\" => lambda {|n| @responsive_desktop_time_in_ms = n.get_number_value() },\n \"restartCount\" => lambda {|n| @restart_count = n.get_number_value() },\n \"startupPerformanceScore\" => lambda {|n| @startup_performance_score = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return {\n \"connectingIP\" => lambda {|n| @connecting_i_p = n.get_string_value() },\n \"deliveryAction\" => lambda {|n| @delivery_action = n.get_string_value() },\n \"deliveryLocation\" => lambda {|n| @delivery_location = n.get_string_value() },\n \"directionality\" => lambda {|n| @directionality = n.get_string_value() },\n \"internetMessageId\" => lambda {|n| @internet_message_id = n.get_string_value() },\n \"messageFingerprint\" => lambda {|n| @message_fingerprint = n.get_string_value() },\n \"messageReceivedDateTime\" => lambda {|n| @message_received_date_time = n.get_date_time_value() },\n \"messageSubject\" => lambda {|n| @message_subject = n.get_string_value() },\n \"networkMessageId\" => lambda {|n| @network_message_id = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"application\" => lambda {|n| @application = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Identity.create_from_discriminator_value(pn) }) },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"preventsDownload\" => lambda {|n| @prevents_download = n.get_boolean_value() },\n \"scope\" => lambda {|n| @scope = n.get_string_value() },\n \"type\" => lambda {|n| @type = n.get_string_value() },\n \"webHtml\" => lambda {|n| @web_html = n.get_string_value() },\n \"webUrl\" => lambda {|n| @web_url = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"id\" => lambda {|n| @id = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"expirationDateTime\" => lambda {|n| @expiration_date_time = n.get_date_time_value() },\n \"nextExpectedRanges\" => lambda {|n| @next_expected_ranges = n.get_collection_of_primitive_values(String) },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"uploadUrl\" => lambda {|n| @upload_url = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"appCrashCount\" => lambda {|n| @app_crash_count = n.get_number_value() },\n \"appDisplayName\" => lambda {|n| @app_display_name = n.get_string_value() },\n \"appName\" => lambda {|n| @app_name = n.get_string_value() },\n \"appPublisher\" => lambda {|n| @app_publisher = n.get_string_value() },\n \"appVersion\" => lambda {|n| @app_version = n.get_string_value() },\n \"deviceCountWithCrashes\" => lambda {|n| @device_count_with_crashes = n.get_number_value() },\n \"isLatestUsedVersion\" => lambda {|n| @is_latest_used_version = n.get_boolean_value() },\n \"isMostUsedVersion\" => lambda {|n| @is_most_used_version = n.get_boolean_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"attributeMappings\" => lambda {|n| @attribute_mappings = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttributeMapping.create_from_discriminator_value(pn) }) },\n \"enabled\" => lambda {|n| @enabled = n.get_boolean_value() },\n \"flowTypes\" => lambda {|n| @flow_types = n.get_enum_value(MicrosoftGraph::Models::ObjectFlowTypes) },\n \"metadata\" => lambda {|n| @metadata = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ObjectMappingMetadataEntry.create_from_discriminator_value(pn) }) },\n \"name\" => lambda {|n| @name = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"scope\" => lambda {|n| @scope = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Filter.create_from_discriminator_value(pn) }) },\n \"sourceObjectName\" => lambda {|n| @source_object_name = n.get_string_value() },\n \"targetObjectName\" => lambda {|n| @target_object_name = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"isDefault\" => lambda {|n| @is_default = n.get_boolean_value() },\n \"links\" => lambda {|n| @links = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SectionLinks.create_from_discriminator_value(pn) }) },\n \"pages\" => lambda {|n| @pages = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OnenotePage.create_from_discriminator_value(pn) }) },\n \"pagesUrl\" => lambda {|n| @pages_url = n.get_string_value() },\n \"parentNotebook\" => lambda {|n| @parent_notebook = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Notebook.create_from_discriminator_value(pn) }) },\n \"parentSectionGroup\" => lambda {|n| @parent_section_group = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SectionGroup.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"appCrashCount\" => lambda {|n| @app_crash_count = n.get_number_value() },\n \"appHangCount\" => lambda {|n| @app_hang_count = n.get_number_value() },\n \"crashedAppCount\" => lambda {|n| @crashed_app_count = n.get_number_value() },\n \"deviceAppHealthScore\" => lambda {|n| @device_app_health_score = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },\n \"deviceDisplayName\" => lambda {|n| @device_display_name = n.get_string_value() },\n \"deviceId\" => lambda {|n| @device_id = n.get_string_value() },\n \"deviceManufacturer\" => lambda {|n| @device_manufacturer = n.get_string_value() },\n \"deviceModel\" => lambda {|n| @device_model = n.get_string_value() },\n \"healthStatus\" => lambda {|n| @health_status = n.get_enum_value(MicrosoftGraph::Models::UserExperienceAnalyticsHealthState) },\n \"meanTimeToFailureInMinutes\" => lambda {|n| @mean_time_to_failure_in_minutes = n.get_number_value() },\n \"processedDateTime\" => lambda {|n| @processed_date_time = n.get_date_time_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"messageId\" => lambda {|n| @message_id = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"replyChainMessageId\" => lambda {|n| @reply_chain_message_id = n.get_string_value() },\n \"threadId\" => lambda {|n| @thread_id = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"createdDateTime\" => lambda {|n| @created_date_time = n.get_date_time_value() },\n \"isUsable\" => lambda {|n| @is_usable = n.get_boolean_value() },\n \"isUsableOnce\" => lambda {|n| @is_usable_once = n.get_boolean_value() },\n \"lifetimeInMinutes\" => lambda {|n| @lifetime_in_minutes = n.get_number_value() },\n \"methodUsabilityReason\" => lambda {|n| @method_usability_reason = n.get_string_value() },\n \"startDateTime\" => lambda {|n| @start_date_time = n.get_date_time_value() },\n \"temporaryAccessPass\" => lambda {|n| @temporary_access_pass = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"description\" => lambda {|n| @description = n.get_string_value() },\n \"owner\" => lambda {|n| @owner = n.get_string_value() },\n \"properties\" => lambda {|n| @properties = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionSchemaProperty.create_from_discriminator_value(pn) }) },\n \"status\" => lambda {|n| @status = n.get_string_value() },\n \"targetTypes\" => lambda {|n| @target_types = n.get_collection_of_primitive_values(String) },\n })\n end",
"def get_field_deserializers()\n return {\n \"bargeInAllowed\" => lambda {|n| @barge_in_allowed = n.get_boolean_value() },\n \"clientContext\" => lambda {|n| @client_context = n.get_string_value() },\n \"initialSilenceTimeoutInSeconds\" => lambda {|n| @initial_silence_timeout_in_seconds = n.get_number_value() },\n \"maxRecordDurationInSeconds\" => lambda {|n| @max_record_duration_in_seconds = n.get_number_value() },\n \"maxSilenceTimeoutInSeconds\" => lambda {|n| @max_silence_timeout_in_seconds = n.get_number_value() },\n \"playBeep\" => lambda {|n| @play_beep = n.get_boolean_value() },\n \"prompts\" => lambda {|n| @prompts = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Prompt.create_from_discriminator_value(pn) }) },\n \"stopTones\" => lambda {|n| @stop_tones = n.get_collection_of_primitive_values(String) },\n }\n end",
"def get_field_deserializers()\n return {\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"response\" => lambda {|n| @response = n.get_enum_value(MicrosoftGraph::Models::ResponseType) },\n \"time\" => lambda {|n| @time = n.get_date_time_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"driveId\" => lambda {|n| @drive_id = n.get_string_value() },\n \"driveType\" => lambda {|n| @drive_type = n.get_string_value() },\n \"id\" => lambda {|n| @id = n.get_string_value() },\n \"name\" => lambda {|n| @name = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"path\" => lambda {|n| @path = n.get_string_value() },\n \"shareId\" => lambda {|n| @share_id = n.get_string_value() },\n \"sharepointIds\" => lambda {|n| @sharepoint_ids = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SharepointIds.create_from_discriminator_value(pn) }) },\n \"siteId\" => lambda {|n| @site_id = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"appCrashCount\" => lambda {|n| @app_crash_count = n.get_number_value() },\n \"appDisplayName\" => lambda {|n| @app_display_name = n.get_string_value() },\n \"appName\" => lambda {|n| @app_name = n.get_string_value() },\n \"appPublisher\" => lambda {|n| @app_publisher = n.get_string_value() },\n \"appVersion\" => lambda {|n| @app_version = n.get_string_value() },\n \"deviceDisplayName\" => lambda {|n| @device_display_name = n.get_string_value() },\n \"deviceId\" => lambda {|n| @device_id = n.get_string_value() },\n \"processedDateTime\" => lambda {|n| @processed_date_time = n.get_date_time_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"activeMalwareDetectionCount\" => lambda {|n| @active_malware_detection_count = n.get_number_value() },\n \"category\" => lambda {|n| @category = n.get_enum_value(MicrosoftGraph::Models::WindowsMalwareCategory) },\n \"deviceCount\" => lambda {|n| @device_count = n.get_number_value() },\n \"distinctActiveMalwareCount\" => lambda {|n| @distinct_active_malware_count = n.get_number_value() },\n \"lastUpdateDateTime\" => lambda {|n| @last_update_date_time = n.get_date_time_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"content\" => lambda {|n| @content = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },\n \"expirationDateTime\" => lambda {|n| @expiration_date_time = n.get_date_time_value() },\n \"issuer\" => lambda {|n| @issuer = n.get_string_value() },\n \"issuerName\" => lambda {|n| @issuer_name = n.get_string_value() },\n \"status\" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::CertificateStatus) },\n \"subject\" => lambda {|n| @subject = n.get_string_value() },\n \"subjectName\" => lambda {|n| @subject_name = n.get_string_value() },\n \"uploadDateTime\" => lambda {|n| @upload_date_time = n.get_date_time_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"appId\" => lambda {|n| @app_id = n.get_string_value() },\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"servicePrincipalId\" => lambda {|n| @service_principal_id = n.get_string_value() },\n \"servicePrincipalName\" => lambda {|n| @service_principal_name = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"riskDetections\" => lambda {|n| @risk_detections = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RiskDetection.create_from_discriminator_value(pn) }) },\n \"riskyServicePrincipals\" => lambda {|n| @risky_service_principals = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RiskyServicePrincipal.create_from_discriminator_value(pn) }) },\n \"riskyUsers\" => lambda {|n| @risky_users = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RiskyUser.create_from_discriminator_value(pn) }) },\n \"servicePrincipalRiskDetections\" => lambda {|n| @service_principal_risk_detections = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ServicePrincipalRiskDetection.create_from_discriminator_value(pn) }) },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n })\n end",
"def get_field_deserializers()\n return super.merge({\n })\n end",
"def get_field_deserializers()\n return super.merge({\n })\n end",
"def get_field_deserializers()\n return {\n \"failedTasks\" => lambda {|n| @failed_tasks = n.get_number_value() },\n \"failedUsers\" => lambda {|n| @failed_users = n.get_number_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"successfulUsers\" => lambda {|n| @successful_users = n.get_number_value() },\n \"totalTasks\" => lambda {|n| @total_tasks = n.get_number_value() },\n \"totalUsers\" => lambda {|n| @total_users = n.get_number_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"durationInSeconds\" => lambda {|n| @duration_in_seconds = n.get_number_value() },\n \"joinDateTime\" => lambda {|n| @join_date_time = n.get_date_time_value() },\n \"leaveDateTime\" => lambda {|n| @leave_date_time = n.get_date_time_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"applicationId\" => lambda {|n| @application_id = n.get_string_value() },\n \"changeType\" => lambda {|n| @change_type = n.get_string_value() },\n \"clientState\" => lambda {|n| @client_state = n.get_string_value() },\n \"creatorId\" => lambda {|n| @creator_id = n.get_string_value() },\n \"encryptionCertificate\" => lambda {|n| @encryption_certificate = n.get_string_value() },\n \"encryptionCertificateId\" => lambda {|n| @encryption_certificate_id = n.get_string_value() },\n \"expirationDateTime\" => lambda {|n| @expiration_date_time = n.get_date_time_value() },\n \"includeResourceData\" => lambda {|n| @include_resource_data = n.get_boolean_value() },\n \"latestSupportedTlsVersion\" => lambda {|n| @latest_supported_tls_version = n.get_string_value() },\n \"lifecycleNotificationUrl\" => lambda {|n| @lifecycle_notification_url = n.get_string_value() },\n \"notificationQueryOptions\" => lambda {|n| @notification_query_options = n.get_string_value() },\n \"notificationUrl\" => lambda {|n| @notification_url = n.get_string_value() },\n \"notificationUrlAppId\" => lambda {|n| @notification_url_app_id = n.get_string_value() },\n \"resource\" => lambda {|n| @resource = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"entityType\" => lambda {|n| @entity_type = n.get_string_value() },\n \"mailNickname\" => lambda {|n| @mail_nickname = n.get_string_value() },\n \"onBehalfOfUserId\" => lambda {|n| @on_behalf_of_user_id = n.get_guid_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"actionName\" => lambda {|n| @action_name = n.get_string_value() },\n \"actionState\" => lambda {|n| @action_state = n.get_enum_value(MicrosoftGraph::Models::ActionState) },\n \"lastUpdatedDateTime\" => lambda {|n| @last_updated_date_time = n.get_date_time_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"startDateTime\" => lambda {|n| @start_date_time = n.get_date_time_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"accountName\" => lambda {|n| @account_name = n.get_string_value() },\n \"azureAdUserId\" => lambda {|n| @azure_ad_user_id = n.get_string_value() },\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"domainName\" => lambda {|n| @domain_name = n.get_string_value() },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"userPrincipalName\" => lambda {|n| @user_principal_name = n.get_string_value() },\n \"userSid\" => lambda {|n| @user_sid = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return super.merge({\n \"comment\" => lambda {|n| @comment = n.get_string_value() },\n \"createdBy\" => lambda {|n| @created_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) },\n \"createdDateTime\" => lambda {|n| @created_date_time = n.get_date_time_value() },\n \"items\" => lambda {|n| @items = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DocumentSetVersionItem.create_from_discriminator_value(pn) }) },\n \"shouldCaptureMinorVersion\" => lambda {|n| @should_capture_minor_version = n.get_boolean_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"resourceId\" => lambda {|n| @resource_id = n.get_string_value() },\n \"uri\" => lambda {|n| @uri = n.get_string_value() },\n }\n end",
"def get_field_deserializers()\n return {\n \"callChainId\" => lambda {|n| @call_chain_id = n.get_guid_value() },\n \"cloudServiceDeploymentEnvironment\" => lambda {|n| @cloud_service_deployment_environment = n.get_string_value() },\n \"cloudServiceDeploymentId\" => lambda {|n| @cloud_service_deployment_id = n.get_string_value() },\n \"cloudServiceInstanceName\" => lambda {|n| @cloud_service_instance_name = n.get_string_value() },\n \"cloudServiceName\" => lambda {|n| @cloud_service_name = n.get_string_value() },\n \"deviceDescription\" => lambda {|n| @device_description = n.get_string_value() },\n \"deviceName\" => lambda {|n| @device_name = n.get_string_value() },\n \"mediaLegId\" => lambda {|n| @media_leg_id = n.get_guid_value() },\n \"mediaQualityList\" => lambda {|n| @media_quality_list = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TeleconferenceDeviceMediaQuality.create_from_discriminator_value(pn) }) },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"participantId\" => lambda {|n| @participant_id = n.get_guid_value() },\n }\n end",
"def _before_validation\n serialize_deserialized_values\n super\n end",
"def get_field_deserializers()\n return super.merge({\n \"description\" => lambda {|n| @description = n.get_string_value() },\n \"displayName\" => lambda {|n| @display_name = n.get_string_value() },\n \"isBuiltIn\" => lambda {|n| @is_built_in = n.get_boolean_value() },\n \"roleAssignments\" => lambda {|n| @role_assignments = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RoleAssignment.create_from_discriminator_value(pn) }) },\n \"rolePermissions\" => lambda {|n| @role_permissions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RolePermission.create_from_discriminator_value(pn) }) },\n })\n end",
"def get_field_deserializers()\n return super.merge({\n \"firstSeenDateTime\" => lambda {|n| @first_seen_date_time = n.get_date_time_value() },\n \"host\" => lambda {|n| @host = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityHost.create_from_discriminator_value(pn) }) },\n \"kind\" => lambda {|n| @kind = n.get_string_value() },\n \"lastSeenDateTime\" => lambda {|n| @last_seen_date_time = n.get_date_time_value() },\n \"value\" => lambda {|n| @value = n.get_string_value() },\n })\n end",
"def get_field_deserializers()\n return {\n \"color\" => lambda {|n| @color = n.get_string_value() },\n \"criterion1\" => lambda {|n| @criterion1 = n.get_string_value() },\n \"criterion2\" => lambda {|n| @criterion2 = n.get_string_value() },\n \"dynamicCriteria\" => lambda {|n| @dynamic_criteria = n.get_string_value() },\n \"filterOn\" => lambda {|n| @filter_on = n.get_string_value() },\n \"icon\" => lambda {|n| @icon = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookIcon.create_from_discriminator_value(pn) }) },\n \"@odata.type\" => lambda {|n| @odata_type = n.get_string_value() },\n \"operator\" => lambda {|n| @operator = n.get_string_value() },\n \"values\" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },\n }\n end"
] | [
"0.6510734",
"0.63224316",
"0.6322254",
"0.63094735",
"0.62954384",
"0.6238735",
"0.6232461",
"0.62155676",
"0.6200175",
"0.6199403",
"0.6173917",
"0.61733985",
"0.61705345",
"0.61631054",
"0.61620396",
"0.6158031",
"0.6156071",
"0.6142402",
"0.613998",
"0.6138061",
"0.61200523",
"0.6089013",
"0.60869795",
"0.6079146",
"0.60785794",
"0.6070405",
"0.6063533",
"0.60625833",
"0.6061235",
"0.60584134",
"0.6055769",
"0.6051312",
"0.60465735",
"0.6046329",
"0.6031944",
"0.6029311",
"0.6028314",
"0.60255736",
"0.6022033",
"0.60210633",
"0.6009887",
"0.5988654",
"0.59844214",
"0.59793943",
"0.5975247",
"0.5969614",
"0.596824",
"0.5966432",
"0.5965554",
"0.596292",
"0.5951651",
"0.5950895",
"0.59456754",
"0.59448177",
"0.593984",
"0.59362113",
"0.5935833",
"0.59319806",
"0.59312665",
"0.59307545",
"0.5930406",
"0.5926444",
"0.5926136",
"0.59240156",
"0.5922303",
"0.591605",
"0.591336",
"0.5913327",
"0.59130335",
"0.5910617",
"0.5906052",
"0.5906045",
"0.59042066",
"0.5903306",
"0.5902868",
"0.59027255",
"0.5902389",
"0.5902219",
"0.5901496",
"0.58978146",
"0.5891392",
"0.5890228",
"0.5885622",
"0.5885429",
"0.5884738",
"0.5883899",
"0.5883899",
"0.5883899",
"0.58811784",
"0.5878516",
"0.5877111",
"0.5869185",
"0.5844199",
"0.58430207",
"0.58408237",
"0.58383596",
"0.58362466",
"0.5836192",
"0.5835942",
"0.5834559",
"0.583357"
] | 0.0 | -1 |
Gets the groupMembershipClaims property value. Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following valid string values: None, SecurityGroup (for security groups and Azure AD roles), All (this gets all of the security groups, distribution groups, and Azure AD directory roles that the signedin user is a member of). | def group_membership_claims
return @group_membership_claims
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def group_membership_claims=(value)\n @group_membership_claims = value\n end",
"def memberships(refresh = false)\n @memberships = nil if refresh\n @memberships ||= AccessGroupGroupMember.where(member_id: id).includes(:group).map{|v| v.group}.to_a.freeze\n end",
"def memberships(refresh = false)\n @memberships = nil if refresh\n @memberships ||= AccessGroupGroupMember.where(member_id: id).includes(:group).map{|v| v.group}.to_a.freeze\n end",
"def user_groups\n return @user_groups if @user_groups\n\n @user_groups = default_user_groups\n @user_groups |= current_user.groups if current_user and current_user.respond_to? :groups\n @user_groups |= ['registered'] if !current_user.new_record? && current_user.is_osu\n @user_groups\n end",
"def option_group_memberships\n data[:option_group_memberships]\n end",
"def user_groups\n return @user_groups if @user_groups\n\n @user_groups = default_user_groups\n # TODO: necessary to include #hyrax_group_names?\n @user_groups |= current_user.hyrax_group_names if current_user.respond_to? :hyrax_group_names\n @user_groups |= ['registered'] if !current_user.new_record? && current_user.roles.count.positive?\n # OVERRIDE: add the names of all user's roles to the array of user_groups\n @user_groups |= all_user_and_group_roles\n\n @user_groups\n end",
"def user_groups\n return @user_groups if @user_groups\n @user_groups = default_user_groups\n @user_groups += RoleMapper.roles(@user)\n @user_groups\n end",
"def GetMemberships params = {}\n\n params = params.merge(path: 'group_memberships.json')\n APICall(params)\n\n end",
"def rolegroup_list\n @rolegroup_list ||= begin\n group_store.display_rolegroups\n end\n end",
"def group_members\n members(\"Group\")\n end",
"def GetMembership id\n\n APICall(path: \"group_memberships/#{id}.json\")\n\n end",
"def groups\n unless @groups\n @groups = convert_to_objects(cn_groups)\n end\n @groups\n end",
"def groups\n return [] if memberOf.nil?\n @groups ||= Group.find(:all, distinguishedname: @entry.memberOf).delete_if(&:nil?)\n end",
"def groups=(value)\n @groups = value\n end",
"def groups\n FfcrmMailchimp::Group.groups_for(id)\n end",
"def get_groups_with_membership\n filter = Net::LDAP::Filter.eq('objectclass', 'posixGroup')\n attributes = %w(cn memberUid)\n\n results = Tapjoy::LDAP.client.search(attributes, filter)\n end",
"def users_and_groups=(value)\n @users_and_groups = value\n end",
"def security_groups\n data[:security_groups]\n end",
"def group_ids\n @group_ids ||= current_user.group_ids\n end",
"def group_member_ids\n member_ids(\"Group\")\n end",
"def groups\n\t\t\t@groups ||= Group.find(:all, :distinguishedname => @entry.memberOf)\n\t\tend",
"def groups\n return @groups\n end",
"def option_group_memberships\n @dbi.option_group_memberships\n end",
"def option_group_memberships\n @dbi.option_group_memberships\n end",
"def include_memberships(groups)\n groups.joins(groupings: [:assignment, { student_memberships: [:role] }])\n .where('assessments.id': params[:assignment_id])\n .pluck_to_hash(*DEFAULT_FIELDS, :membership_status, :role_id)\n .group_by { |h| h.slice(*DEFAULT_FIELDS) }\n .map { |k, v| k.merge(members: v.map { |h| h.except(*DEFAULT_FIELDS) }) }\n end",
"def list_group_memberships(group_id, opts = {})\n data, _status_code, _headers = list_group_memberships_with_http_info(group_id, opts)\n return data\n end",
"def groups\n @@groups = Group.groups if @@groups.nil? or @@groups.empty?\n @@groups\n end",
"def list_group_memberships_with_http_info(group_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: GroupsApi.list_group_memberships ...\"\n end\n # verify the required parameter 'group_id' is set\n fail ArgumentError, \"Missing the required parameter 'group_id' when calling GroupsApi.list_group_memberships\" if group_id.nil?\n if !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0.0\n fail ArgumentError, 'invalid value for \"opts[:\"skip_count\"]\" when calling GroupsApi.list_group_memberships, must be greater than or equal to 0.0.'\n end\n\n if !opts[:'max_items'].nil? && opts[:'max_items'] < 1.0\n fail ArgumentError, 'invalid value for \"opts[:\"max_items\"]\" when calling GroupsApi.list_group_memberships, must be greater than or equal to 1.0.'\n end\n\n # resource path\n local_var_path = \"/groups/{groupId}/members\".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)\n\n # query parameters\n query_params = {}\n query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil?\n query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?\n query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].nil?\n query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?\n query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n local_header_accept = ['application/json']\n local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result\n\n # HTTP header 'Content-Type'\n local_header_content_type = ['application/json']\n header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = nil\n auth_names = ['basicAuth']\n data, status_code, headers = @api_client.call_api(:GET, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'GroupMemberPaging')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: GroupsApi#list_group_memberships\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def groups\n config.redis_connection.smembers \"#{config.prefix}:groups\"\n end",
"def resource_groups(subscription_id = @subscription_id)\n url = url_with_api_version(@base_url, 'subscriptions', subscription_id, 'resourcegroups')\n resp = rest_get(url)\n JSON.parse(resp.body)[\"value\"]\n end",
"def get_groups()\n return self.groups\n end",
"def groups\n Group.groups(user_name)\n end",
"def role_memberships\n if self.member?\n self.memberships\n else\n self.role_clubs.map{ |c| c.memberships }.flatten\n end\n end",
"def group_members(group_id)\n url = \"/groups/#{group_id}/members/\"\n get(url)\n end",
"def group_users\n DiscussionGroupUser.where(\"discussion_group_id=? AND is_member=?\", self.id, true)\n end",
"def groups\n UserGroups.new(:id => id).get.items\n end",
"def get_changeable_groups\n response = get_current_user_meta('changeablegroups')\n return false unless response\n\n changeablegroups = response['query']['userinfo']['changeablegroups']\n {\n :add => changeablegroups['add'],\n :remove => changeablegroups['remove'],\n :addself => changeablegroups['add-self'],\n :removeself => changeablegroups['add-self']\n }\n end",
"def groups\n return [] if self.group_list.nil?\n self.group_list\n end",
"def section_groups=(value)\n @section_groups = value\n end",
"def get_current_group\n sd = get_security_descriptor\n\n sd&.group\n end",
"def get_user_groups\n user_groups.keys\n end",
"def group_policies\n policies = []\n Group.each do |group|\n group.group_memberships.each do |membership|\n if membership.account_id == _id\n policies.push(group.group_policy)\n end\n end\n end\n return policies\n end",
"def db_cluster_option_group_memberships\n data[:db_cluster_option_group_memberships]\n end",
"def get_member_groups()\n return MicrosoftGraph::Contacts::Item::GetMemberGroups::GetMemberGroupsRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def groups\n return @groups if @groups\n return [] if uid.nil?\n\n codes = [\"student\"]\n res = Group.where(code: codes)\n # add eduPersonAffiliation (e.g. student, faculty, staff) to groups that the user is a member of\n @groups = res + affiliations.map{ |code| Group.new(:code=>code) }\n end",
"def group_ids\n @attributes[:group_ids]\n end",
"def group_ids\n @attributes[:group_ids]\n end",
"def group_ids\n @attributes[:group_ids]\n end",
"def get_membership(group)\n @uri = URI.parse(\"#{@api_url}/group/#{group}/member\")\n body = make_get_request\n doc = Nokogiri::HTML(body)\n members = []\n doc.xpath('//a[@class=\"member\"]').each do |m|\n members << m.text\n end\n members\n end",
"def current_user_group_ids\n @current_user_group_ids ||= Manage::Group.group_ids_for current_user\n end",
"def provision_groups\n @attributes[:provision_groups]\n end",
"def role_groups\n return [] if !subject.respond_to?(role_groups_list_meth) || role_groups_of(subject).blank?\n role_groups_of(subject).flatten\n end",
"def groups\n call(\"UserGroup\", \"get_group_collection_from_role\", \"roleName\" => @name).xpath(\"//spdir:Group\", NS).map do |row|\n attributes = clean_attributes(row.attributes)\n Group.new(@site, attributes[\"Name\"])\n end\n end",
"def groups\r\n @groups ||= fetch_groups\r\n end",
"def groups\n\t\t\t@groups ||= begin\n\t\t\t\tFile.readlines(File.join(@svcdir, 'group')).map { |g| g.strip }\n\t\t\trescue Exception => e\n\t\t\t\t[]\n\t\t\tend\n\t\tend",
"def set_os_groups_membership\n @os_groups_membership = OsGroupsMembership.find(params[:id])\n end",
"def collect_group_details\n return @groups_cache ||= @group_provider.groups unless @group_provider.nil?\n\n []\n end",
"def get_memberships\n return nil unless has_memberships?\n\n parent_css = \"div.profile-list > div:nth-of-type(#{@selector[:index] + 1})\"\n profile_css = @selector[:css]\n membership_css = 'div.dashboard-membership'\n new_selector = \"#{parent_css} #{profile_css} #{membership_css}\"\n\n (0..how_many_memberships? - 1).collect { |index| MemberManagement::Component::DashboardMembership.new(css: new_selector, index: index) }\n end",
"def groups\n # self[:memberof].map { |dn| Group.select_dn(dn) }\n self[:memberof].map { |dn| self.class.group_klass.select_dn(dn) }\n end",
"def groups()\n\t\t\t\tuserlist = users()\n\n\t\t\t\tgrouplist = GroupList.new()\n\t\t\t\tFile.open('/etc/group', File::RDONLY) { |fp|\n\t\t\t\t\tregex = /^([a-zA-Z0-9-]+):[^:]+:([0-9]+):([^:]*)/\n\t\t\t\t\tfp.each_line() { |line|\n\t\t\t\t\t\tmatch = regex.match(line)\n\t\t\t\t\t\tif(match != nil)\n\t\t\t\t\t\t\tgroup = GroupInfo.new()\n\t\t\t\t\t\t\tgroup.groupname = match[1]\n\t\t\t\t\t\t\tgroup.gid = match[2].to_i()\n\t\t\t\t\t\t\tgroup.members = UserList.new()\n\t\t\t\t\t\t\tif(match[3] != nil)\n\t\t\t\t\t\t\t\tusers = match[3].split(/,/)\n\t\t\t\t\t\t\t\tusers.each() { |username|\n\t\t\t\t\t\t\t\t\tif(userlist.has_key?(username))\n\t\t\t\t\t\t\t\t\t\tgroup.members[username] = userlist[username]\n\t\t\t\t\t\t\t\t\tend\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tend\n\t\t\t\t\t\t\tgrouplist[group.groupname] = group\n\t\t\t\t\t\tend\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn(grouplist)\n\t\t\tend",
"def visible_groups\n @visible_groups ||= begin\n filter_visible_groups_for_user(self.current_groups)\n end\n end",
"def os_groups_membership_params\n params.require(:os_groups_membership).permit(:GroupID, :PrincipalID, :SelectedRoleID, :Contribution, :ListInProfile, :AcceptNotices, :AccessToken)\n end",
"def groups\n find_groups if @groups.nil?\n @groups\n end",
"def get_mccgroups(opts = {})\n data, _status_code, _headers = get_mccgroups_with_http_info(opts)\n data\n end",
"def group_for_course(course)\n student = self\n group_memberships = GroupMembership.where{ \n (group_id.in( course.groups.select{id} )) & \n (user_id.eq student.id)\n }\n\n if group_memberships.length == 0 \n return nil\n else\n group_memberships.first.group\n end\n end",
"def member_of?(group)\n cn_groups.include?(group)\n end",
"def groups=(value)\n @children['groups'][:value] = value\n end",
"def groups=(value)\n @children['groups'][:value] = value\n end",
"def resource_group_info(resource_group = @resource_group)\n url = url_with_api_version(@base_url, 'subscriptions', subscription_id, 'resourcegroups', resource_group)\n resp = rest_get(url)\n JSON.parse(resp.body)\n end",
"def list\n rolegroup_subject.rolegroup_list\n end",
"def users_and_groups\n return @users_and_groups\n end",
"def group_members(id)\n get(\"/groups/#{id}/members\")\n end",
"def group_members(group_id, params = {})\n get(\"/v1/groups/#{group_id}/members\", params)\n end",
"def available_groups\n @available_groups ||= begin\n current_user.groups\n .sort_by { |g| g.description.downcase }\n .map { |g| { id: g.id, description: g.description, user_permissions: g.user_permissions(current_user.login) } }\n # :nocov:\n rescue StandardError\n []\n end\n # :nocov:\n end",
"def groups\n if (groups_last_update.blank? || ((Time.now-groups_last_update) > 24*60*60 ))\n return groups!\n end\n return self.group_list.split(\";?;\")\n end",
"def groups\n if (groups_last_update.blank? || ((Time.now-groups_last_update) > 24*60*60 ))\n return groups!\n end\n return self.group_list.split(\";?;\")\n end",
"def UpdateMembership params = {}\n \n APICall(path: 'group_memberships.json',method: 'PUT',payload: params.to_json)\n \n end",
"def provision_group_admin_groups\n @attributes[:provision_group_admin_groups]\n end",
"def groups\n roles\n end",
"def user_groups(deprecated_user=nil, deprecated_session=nil)\n ActiveSupport::Deprecation.warn(\"No need to pass user or session to user_groups, use the instance_variables\", caller()) if deprecated_user || deprecated_session\n\n return @user_groups if @user_groups\n \n @user_groups = default_user_groups\n @user_groups |= current_user.groups if current_user and current_user.respond_to? :groups\n @user_groups |= ['registered'] unless current_user.new_record?\n @user_groups\n end",
"def list()\n\t\t\tkparams = {}\n\t\t\tclient.queue_service_action_call('configurationgroup', 'list', 'KalturaConfigurationGroupListResponse', kparams)\n\t\t\tif (client.is_multirequest)\n\t\t\t\treturn nil\n\t\t\tend\n\t\t\treturn client.do_queue()\n\t\tend",
"def groups()\n\t\t\t\tgroups = GroupList.new()\n\n\t\t\t\t# get the list of users using niutil\n\t\t\t\ttextlist = `niutil -list . /groups`\n\t\t\t\ttextlist.each() { |line|\n\t\t\t\t\tline.strip!()\n\t\t\t\t\tgroup = GroupInfo.new()\n\t\t\t\t\tgroup.groupname = line[/^[0-9]+\\s+(\\S+)$/, 1]\n\t\t\t\t\tgrouplist = `niutil -read . /groups/#{group.groupname}`\n\t\t\t\t\tgrouplist.each() { |subline|\n\t\t\t\t\t\tsubline.strip!()\n\t\t\t\t\t\tcase(subline)\n\t\t\t\t\t\t\twhen(/^gid:/)\n\t\t\t\t\t\t\t\tgroup.gid = subline[/:\\s*(.*)$/, 1].to_i()\n\t\t\t\t\t\tend\n\t\t\t\t\t}\n\n\t\t\t\t\tgroups[group.groupname] = group\n\t\t\t\t}\n\n\t\t\t\treturn(groups)\n\t\t\tend",
"def group_type\n GROUP_TYPE_SECURITY_ENABLED + GROUP_TYPE_ACCOUNT_GROUP\n end",
"def member_of(group)\n current_user.is_member?(group)\n end",
"def groups\n match(/Groups\\s+:\\s+(.+)$/).split rescue []\n end",
"def display_rolegroups\n return [] if !ds_field_value?\n ds_field_value.map{|rolegroup| rolegroup.name.to_sym }\n end",
"def may_read_group_membership?(membership)\n\t\t\tmay_administrate? || is_group_reader?(membership.group) || self == membership.user\n\t\tend",
"def index\n @groups = []\n for member in current_user.members\n @groups << member.group\n end\n end",
"def groups\n group_ids.split(',').inject(Array.new) do |arr,gid|\n arr << Ecore::Group.where(:id => gid).first\n end\n end",
"def get(id)\n\t\t\tkparams = {}\n\t\t\tclient.add_param(kparams, 'id', id)\n\t\t\tclient.queue_service_action_call('configurationgroup', 'get', 'KalturaConfigurationGroup', kparams)\n\t\t\tif (client.is_multirequest)\n\t\t\t\treturn nil\n\t\t\tend\n\t\t\treturn client.do_queue()\n\t\tend",
"def safe_select_group\n return unless user_signed_in? && params[:id]\n @membership = current_user.membership_in(params[:id])\n @group = @membership.group\n end",
"def provision_group_inclusion\n @attributes[:provision_group_inclusion]\n end",
"def get_group_supportedfields()\n @restv9.get_groups_supportedFields()\n end",
"def member?(group)\n memberships.find_by_group_id(group)\n end",
"def allowed_to_create_security_groups=(value)\n @allowed_to_create_security_groups = value\n end",
"def list_groups\n groups = CanvasSpaces.GroupCategory.groups.active.order(:name)\n # filter out non-public groups for non-admins\n groups = groups.where(join_level: 'parent_context_auto_join') unless @current_user.account.site_admin?\n groups_json = Api.paginate(groups, self, api_v1_canvas_spaces_groups_url).map do |g|\n include = @current_user.account.site_admin? || @current_user.id == g.leader_id ? ['users'] : []\n group_formatter(g, { include: include })\n end\n render :json => groups_json\n end",
"def scheduling_group_id=(value)\n @scheduling_group_id = value\n end",
"def get_groups\n\t\tgroup0 = course_groups.find_all_by_group(0).collect(&:user_id)\n\t\tgroup1 = course_groups.find_all_by_group(1).collect(&:user_id)\n\t\t[group0,group1]\n\tend",
"def manage_group\n if new_resource.append\n members_to_be_added = [ ]\n if new_resource.excluded_members && !new_resource.excluded_members.empty?\n # First find out if any member needs to be removed\n members_to_be_removed = [ ]\n new_resource.excluded_members.each do |member|\n members_to_be_removed << member if current_resource.members.include?(member)\n end\n\n unless members_to_be_removed.empty?\n # We are using a magic trick to remove the groups.\n reset_group_membership\n\n # Capture the members we need to add in\n # members_to_be_added to be added later on.\n current_resource.members.each do |member|\n members_to_be_added << member unless members_to_be_removed.include?(member)\n end\n end\n end\n\n if new_resource.members && !new_resource.members.empty?\n new_resource.members.each do |member|\n members_to_be_added << member unless current_resource.members.include?(member)\n end\n end\n\n logger.debug(\"#{new_resource} not changing group members, the group has no members to add\") if members_to_be_added.empty?\n\n add_group_members(members_to_be_added)\n else\n # We are resetting the members of a group so use the same trick\n reset_group_membership\n logger.debug(\"#{new_resource} setting group members to: none\") if new_resource.members.empty?\n add_group_members(new_resource.members)\n end\n end",
"def defined?(group_name)\n @groups.key?(group_name)\n end"
] | [
"0.6811272",
"0.5529802",
"0.54280555",
"0.5279023",
"0.5242139",
"0.5164084",
"0.4986607",
"0.49712747",
"0.48949903",
"0.48887187",
"0.48726645",
"0.4864599",
"0.4864004",
"0.48482183",
"0.48449123",
"0.48239",
"0.4822462",
"0.4806104",
"0.4789052",
"0.47455767",
"0.4707743",
"0.4698731",
"0.46796617",
"0.46796617",
"0.46425095",
"0.46416372",
"0.46396875",
"0.46380866",
"0.46322072",
"0.462456",
"0.46216854",
"0.46157122",
"0.46040478",
"0.4602818",
"0.45719677",
"0.45712885",
"0.45694113",
"0.45517817",
"0.45517367",
"0.45516312",
"0.4547697",
"0.4539705",
"0.4538931",
"0.45365983",
"0.45312583",
"0.45295143",
"0.45295143",
"0.45295143",
"0.4522815",
"0.45217603",
"0.45185465",
"0.45180744",
"0.44936013",
"0.44559366",
"0.4441425",
"0.44283414",
"0.44272012",
"0.44043508",
"0.44040802",
"0.43945706",
"0.43756592",
"0.43553802",
"0.4344069",
"0.43403205",
"0.43394524",
"0.43389383",
"0.4331712",
"0.4331712",
"0.4323061",
"0.43206173",
"0.43175364",
"0.43156907",
"0.43140724",
"0.4307491",
"0.4303107",
"0.4303107",
"0.4279591",
"0.42703092",
"0.4268618",
"0.42608008",
"0.42542577",
"0.42538023",
"0.42492852",
"0.42474124",
"0.4243899",
"0.42342824",
"0.42339557",
"0.42246217",
"0.4218138",
"0.42166972",
"0.42145792",
"0.42115402",
"0.42092776",
"0.4203369",
"0.4194687",
"0.41926664",
"0.41889605",
"0.41832834",
"0.4182852",
"0.41742012"
] | 0.652079 | 1 |
Sets the groupMembershipClaims property value. Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following valid string values: None, SecurityGroup (for security groups and Azure AD roles), All (this gets all of the security groups, distribution groups, and Azure AD directory roles that the signedin user is a member of). | def group_membership_claims=(value)
@group_membership_claims = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UpdateMembership params = {}\n \n APICall(path: 'group_memberships.json',method: 'PUT',payload: params.to_json)\n \n end",
"def group_membership_claims\n return @group_membership_claims\n end",
"def set_os_groups_membership\n @os_groups_membership = OsGroupsMembership.find(params[:id])\n end",
"def groups=(value)\n @groups = value\n end",
"def memberships(refresh = false)\n @memberships = nil if refresh\n @memberships ||= AccessGroupGroupMember.where(member_id: id).includes(:group).map{|v| v.group}.to_a.freeze\n end",
"def users_and_groups=(value)\n @users_and_groups = value\n end",
"def os_groups_membership_params\n params.require(:os_groups_membership).permit(:GroupID, :PrincipalID, :SelectedRoleID, :Contribution, :ListInProfile, :AcceptNotices, :AccessToken)\n end",
"def set_groups(user, grouplist)\n\t\t\tend",
"def memberships(refresh = false)\n @memberships = nil if refresh\n @memberships ||= AccessGroupGroupMember.where(member_id: id).includes(:group).map{|v| v.group}.to_a.freeze\n end",
"def update_membership(organization_id, membership_id, params)\n http.put(\"#{membership_endpoint(organization_id)}/#{membership_id}\", body: params) do |response|\n Rexpense::Entities::Membership.new response.parsed_body\n end\n end",
"def set_research_group_membership\n @research_group_membership = ResearchGroupMembership.find(params[:id])\n end",
"def groups=(value)\n @children['groups'][:value] = value\n end",
"def groups=(value)\n @children['groups'][:value] = value\n end",
"def set_member_group\n @member_group = MemberGroup.find(params[:id])\n end",
"def GetMemberships params = {}\n\n params = params.merge(path: 'group_memberships.json')\n APICall(params)\n\n end",
"def groups=(newgroups)\n groups_to_add = Set.new(newgroups).subtract(@property_hash[:groups]).to_a.map { |name| iam.groups[name] }\n groups_to_remove = Set.new(@property_hash[:groups]).subtract(newgroups).to_a.map { |name| iam.groups[name] }\n groups_to_add.each { |g| @property_hash[:aws_item].groups.add(g) }\n groups_to_remove.each { |g| @property_hash[:aws_item].groups.remove(g) }\n end",
"def set_memberships\n @memberships = Membership.all\n @beerclubs = BeerClub.all\n end",
"def list_group_memberships_with_http_info(group_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: GroupsApi.list_group_memberships ...\"\n end\n # verify the required parameter 'group_id' is set\n fail ArgumentError, \"Missing the required parameter 'group_id' when calling GroupsApi.list_group_memberships\" if group_id.nil?\n if !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0.0\n fail ArgumentError, 'invalid value for \"opts[:\"skip_count\"]\" when calling GroupsApi.list_group_memberships, must be greater than or equal to 0.0.'\n end\n\n if !opts[:'max_items'].nil? && opts[:'max_items'] < 1.0\n fail ArgumentError, 'invalid value for \"opts[:\"max_items\"]\" when calling GroupsApi.list_group_memberships, must be greater than or equal to 1.0.'\n end\n\n # resource path\n local_var_path = \"/groups/{groupId}/members\".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)\n\n # query parameters\n query_params = {}\n query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil?\n query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?\n query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].nil?\n query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?\n query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n local_header_accept = ['application/json']\n local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result\n\n # HTTP header 'Content-Type'\n local_header_content_type = ['application/json']\n header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = nil\n auth_names = ['basicAuth']\n data, status_code, headers = @api_client.call_api(:GET, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'GroupMemberPaging')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: GroupsApi#list_group_memberships\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def section_groups=(value)\n @section_groups = value\n end",
"def set_membership\n @membership = @organization.memberships.find(params[:id])\n end",
"def set_group\n @group = current_user.groups.find(params[:group_id])\n end",
"def set_group\n if is_user_member_of_group? current_user, Group.find(params[:id])\n @group = Group.find(params[:id])\n else\n @group = Group.new\n end\n end",
"def add_members_to_group(id, params = {})\n put(\"/groups/#{id}/members\", params)\n end",
"def update_group_member_set(principal, members)\n end",
"def set_student_group_association\n @student_group_association = StudentGroupAssociation.find(params[:id])\n end",
"def group=(new_group)\n if @group != new_group\n @dacl.reassign!(@group, new_group)\n @group = new_group\n end\n end",
"def feature_group=(value)\n @feature_group = value\n end",
"def update_groups\n unless group_ids.nil?\n self.groups_members.each do |m|\n m.destroy unless group_ids.include?(m.group_id.to_s)\n group_ids.delete(m.group_id.to_s)\n end\n group_ids.each do |g|\n self.groups_members.create(:group_id => g) unless g.blank?\n end\n reload\n self.group_ids = nil\n end\n end",
"def scheduling_group_id=(value)\n @scheduling_group_id = value\n end",
"def configure_membership(*args)\n new_membership = [args[0]].flatten\n\n new_membership.each do |new_m|\n unless @membership.include?(new_m)\n OmfCommon.comm.subscribe(new_m) do |t|\n if t.error?\n warn \"Group #{new_m} disappeared\"\n #EM.next_tick do\n # @membership.delete(m)\n #end\n else\n self.synchronize do\n @membership << new_m\n @membership_topics[new_m] = t\n self.inform(:status, { membership: @membership }, t)\n end\n\n t.on_message(nil, @uid) do |imsg|\n process_omf_message(imsg, t)\n end\n end\n end\n end\n end\n @membership\n end",
"def set_family_group\n @family_group = FamilyGroup.find(params[:id])\n end",
"def GetMembership id\n\n APICall(path: \"group_memberships/#{id}.json\")\n\n end",
"def update\n\t\tparams[:group][:member_ids] = (params[:group][:member_ids] << @group.member_ids).flatten\n\t\t#special method update_attribute only updates explicitly stated attribute\n\t\tif @group.update_attributes(params[:group])\n\t\t\tredirect_to @group\n\t\t\tflash[:success] = \"group updated\"\n\t\tend\n\tend",
"def user_groups\n return @user_groups if @user_groups\n\n @user_groups = default_user_groups\n @user_groups |= current_user.groups if current_user and current_user.respond_to? :groups\n @user_groups |= ['registered'] if !current_user.new_record? && current_user.is_osu\n @user_groups\n end",
"def set_group_member\n @group_member = GroupMember.find(params[:id])\n end",
"def set_group_member\n @group_member = GroupMember.find(params[:id])\n end",
"def manage_group\n if new_resource.append\n members_to_be_added = [ ]\n if new_resource.excluded_members && !new_resource.excluded_members.empty?\n # First find out if any member needs to be removed\n members_to_be_removed = [ ]\n new_resource.excluded_members.each do |member|\n members_to_be_removed << member if current_resource.members.include?(member)\n end\n\n unless members_to_be_removed.empty?\n # We are using a magic trick to remove the groups.\n reset_group_membership\n\n # Capture the members we need to add in\n # members_to_be_added to be added later on.\n current_resource.members.each do |member|\n members_to_be_added << member unless members_to_be_removed.include?(member)\n end\n end\n end\n\n if new_resource.members && !new_resource.members.empty?\n new_resource.members.each do |member|\n members_to_be_added << member unless current_resource.members.include?(member)\n end\n end\n\n logger.debug(\"#{new_resource} not changing group members, the group has no members to add\") if members_to_be_added.empty?\n\n add_group_members(members_to_be_added)\n else\n # We are resetting the members of a group so use the same trick\n reset_group_membership\n logger.debug(\"#{new_resource} setting group members to: none\") if new_resource.members.empty?\n add_group_members(new_resource.members)\n end\n end",
"def set_group_member\n @group_member = GroupMember.find_by(group_id:params[:id])\n end",
"def add_to_group(group)\n self.memberships.create(group_id: group.id)\n end",
"def set_usergroup\n @usergroup = Usergroup.find(params[:id])\n end",
"def set_usergroup\n @usergroup = Usergroup.find(params[:id])\n end",
"def set_usergroup\n @usergroup = Usergroup.find(params[:id])\n end",
"def create_group_membership_with_http_info(group_id, group_membership_body_create, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: GroupsApi.create_group_membership ...\"\n end\n # verify the required parameter 'group_id' is set\n fail ArgumentError, \"Missing the required parameter 'group_id' when calling GroupsApi.create_group_membership\" if group_id.nil?\n # verify the required parameter 'group_membership_body_create' is set\n fail ArgumentError, \"Missing the required parameter 'group_membership_body_create' when calling GroupsApi.create_group_membership\" if group_membership_body_create.nil?\n # resource path\n local_var_path = \"/groups/{groupId}/members\".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s)\n\n # query parameters\n query_params = {}\n query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?\n\n # header parameters\n header_params = {}\n\n # HTTP header 'Accept' (if needed)\n local_header_accept = ['application/json']\n local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result\n\n # HTTP header 'Content-Type'\n local_header_content_type = ['application/json']\n header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(group_membership_body_create)\n auth_names = ['basicAuth']\n data, status_code, headers = @api_client.call_api(:POST, local_var_path,\n :header_params => header_params,\n :query_params => query_params,\n :form_params => form_params,\n :body => post_body,\n :auth_names => auth_names,\n :return_type => 'GroupMemberEntry')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called: GroupsApi#create_group_membership\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n return data, status_code, headers\n end",
"def user_group=(v)\n @user_group = alma_string v\n end",
"def update\n @membership = Membership.find(params[:id])\n if @membership.update_attributes(membership_params)\n flash[:success] = \"Updated membership.\"\n redirect_to group_members_url(@group)\n end\n end",
"def create\n group_id = params[:group_id]\n user = User.find(params[:user_id])\n group = Group.find_by_id(group_id)\n if user.is_admin || group.creator == current_user\n role = Role.find_by_rolename('group_admin')\n else\n role = Role.find_by_rolename('user')\n end\n \n is_authorized = false\n\n if group.private\n if user.is_admin || group.creator == current_user\n is_authorized = true\n end\n else\n is_authorized = true\n end \n\n @membership = Membership.create({:group_id => params[:group_id], \n :user_id => user.id,\n :role_id => role.id,\n :authorized => is_authorized})\n if @membership.save\n respond_to do |format|\n format.html { redirect_to group_path(group_id) }\n format.xml { render :xml => @membership, :status => :created } \n format.json { render :json => @membership, :status => :created } \n end\n else\n respond_to do |format|\n format.html { redirect_to group_path(group_id) }\n format.xml { render :xml => @membership.errors, :status => :unprocessable_entity }\n format.json { render :json => @membership.errors, :status => :unprocessable_entity }\n end\n end\n end",
"def include_memberships(groups)\n groups.joins(groupings: [:assignment, { student_memberships: [:role] }])\n .where('assessments.id': params[:assignment_id])\n .pluck_to_hash(*DEFAULT_FIELDS, :membership_status, :role_id)\n .group_by { |h| h.slice(*DEFAULT_FIELDS) }\n .map { |k, v| k.merge(members: v.map { |h| h.except(*DEFAULT_FIELDS) }) }\n end",
"def option_group_memberships\n data[:option_group_memberships]\n end",
"def list_group_memberships(group_id, opts = {})\n data, _status_code, _headers = list_group_memberships_with_http_info(group_id, opts)\n return data\n end",
"def set_user_group\n @user_group = UserGroup.find(params[:id])\n end",
"def set_group_member\n @groupmember = GroupMember.find(params[:id])\n end",
"def members=(member_a)\n ms = member_a.to_set\n self.group_memberships.each do |m|\n unless ms.delete?(m.o_resource)\n m.destroy # no longer member\n end\n end\n # add remaining, new members\n ms.each do |m| self.contains_resources << m end\n self.contains_resources\n end",
"def set_membership\n @membership = Membership.find(params[:id])\n end",
"def set_membership\n @membership = Membership.find(params[:id])\n end",
"def set_membership\n @membership = Membership.find(params[:id])\n end",
"def set_membership\n @membership = Membership.find(params[:id])\n end",
"def set_membership\n @membership = Membership.find(params[:id])\n end",
"def set_membership\n @membership = Membership.find(params[:id])\n end",
"def set_membership\n @membership = Membership.find(params[:id])\n end",
"def set_membership\n @membership = Membership.find(params[:id])\n end",
"def set_membership\n @membership = Membership.find(params[:id])\n end",
"def set_mygroup\n # retrieve the user name\n group = %x{groups}.chomp.split(/ /)[0]\n raise \"Could not find group to set in @mygroup\" unless group\n @mygroup = group\n end",
"def call(group_id, user_id)\n client.delete(\"/api/rest/v1/groups/#{group_id}/memberships/#{user_id}.json\")\n true\n end",
"def group_members(group_id)\n url = \"/groups/#{group_id}/members/\"\n get(url)\n end",
"def set_perms(data)\n permission = data[:permission] || 2 \n result = @client.api_request(\n :method => \"usergroup.massAdd\", \n :params => {\n :usrgrpids => [data[:usrgrpid]],\n :rights => data[:hostgroupids].map { |t| {:permission => permission, :id => t} }\n }\n )\n result ? result['usrgrpids'][0].to_i : nil\n end",
"def create\n @group = Group.new(params[:group])\n\n #here we add the current user to the membership collection of the group\n @membership = @group.memberships.build(params[:membership])\n @membership.group = @group\n @membership.user = current_user\n @membership.initiator = false\n @membership.membership_status_id = 2\n \n #and here we set the current_user as the owner of the group\n @group_permission = @group.group_permissions.build(params[:group_permission])\n @group_permission.membership = @membership\n @group_permission.group_role = GroupRole.find_by_name('Owner')\n \n @group.metro_area = MetroArea.find(params[:metro_area_id])\n @group.state = (@group.metro_area && @group.metro_area.state) ? @group.metro_area.state : nil\n @group.country = @group.metro_area.country if (@group.metro_area && @group.metro_area.country)\n\n \n #current_user.track_activity(:created_a_group)\n \n# unless @user.is_in_group?(@group)\n# @user.memberships << @group\n# end\n\n respond_to do |format|\n if @group.save\n flash[:notice] = 'Group was successfully created.'\n format.html { redirect_to(@group) }\n format.xml { render :xml => @group, :status => :created, :location => @group }\n else\n format.html { render :action => \"new\" }\n format.xml { render :xml => @group.errors, :status => :unprocessable_entity }\n end\n end\n \n end",
"def user_groups\n return @user_groups if @user_groups\n\n @user_groups = default_user_groups\n # TODO: necessary to include #hyrax_group_names?\n @user_groups |= current_user.hyrax_group_names if current_user.respond_to? :hyrax_group_names\n @user_groups |= ['registered'] if !current_user.new_record? && current_user.roles.count.positive?\n # OVERRIDE: add the names of all user's roles to the array of user_groups\n @user_groups |= all_user_and_group_roles\n\n @user_groups\n end",
"def add_to_group(group_id, users)\n url = \"/groups/#{group_id}/members\"\n body = {\n members: users\n }\n post(url, body)\n end",
"def delete_group_memberships_for_end_users\n self.group_memberships.delete_all if self.end_user?\n end",
"def group(value)\n attributes[:group] = value\n end",
"def create\n @group = Group.new(group_params)\n token = params[:token]\n\n # use the user login instance and match emails to find current user\n @user_login = UserLogin.where(token: token).take\n @current_user = User.where(email: @user_login.email).take\n\n respond_to do |format|\n if @group.save\n\n # create a new group membership for new group w/ current user as admin\n @new_membership = GroupMembership.create(group_id: @group.id, user_id: @current_user.id, is_admin: true)\n\n # associate new membership with the group and the user\n @group.group_memberships << @new_membership\n @current_user.group_memberships << @new_membership\n\n format.html { redirect_to group_path(:id => @group.id), notice: 'Group was successfully created.' }\n format.json { render :show, status: :created, location: @group }\n else\n format.html { render :new }\n format.json { render json: @group.errors, status: :unprocessable_entity }\n end\n end\n end",
"def group=(value)\n @group = value\n end",
"def group=(value)\n @group = value\n end",
"def update_group(group_id, attributes)\n put(\"/v1/groups/#{group_id}\", attributes)\n end",
"def set_user_asset_groups(id, opts = {})\n data, _status_code, _headers = set_user_asset_groups_with_http_info(id, opts)\n data\n end",
"def configure_membership(*args)\n new_membership = [args[0]].flatten\n new_membership.each do |n_m|\n @membership << n_m unless @membership.include?(n_m)\n end\n @membership.each do |m|\n @comm.subscribe(m) do |stanza|\n if stanza.error?\n warn \"Group #{m} disappeared\"\n EM.next_tick do\n @membership.delete(m)\n end\n end\n end\n end\n @membership\n end",
"def groups=(new_groups)\n find(:group).each { |g| g.remove! }\n new_groups.uniq.each { |g| self << XMPPNode.new(:group, g) } if new_groups\n end",
"def user_groups\n return @user_groups if @user_groups\n @user_groups = default_user_groups\n @user_groups += RoleMapper.roles(@user)\n @user_groups\n end",
"def category_filter_groups=(value)\n @category_filter_groups = value\n end",
"def add(group, members)\n @group[group] = members(group) | members\n end",
"def reset_group_membership\n shell_out!(\"group\", \"mod\", \"-n\", \"#{new_resource.group_name}_bak\", new_resource.group_name)\n\n shell_out!(\"group\", \"add\", set_options(overwrite_gid: true))\n\n shell_out!(\"group\", \"del\", \"#{new_resource.group_name}_bak\")\n end",
"def groups=(groups_hash)\n client_principal.groups = Hash[groups_hash.map { |k, v| [k, v.sort] } ]\n end",
"def addUserToGroup(uid, groupId)\r\n uri = sprintf(\"/api/v1/groups/%d/memberships\", groupId)\r\n\t $canvas.post(uri, {'user_id' => uid})\r\nend",
"def addUserToGroup(uid, groupId)\r\n uri = sprintf(\"/api/v1/groups/%d/memberships\", groupId)\r\n\t $canvas.post(uri, {'user_id' => uid})\r\nend",
"def test_group\n \n user = @user_1\n group = 'customer-test'\n \n assert (not @crowd.group_member? user.name, group), \"#{user.name} is already a member of group #{group}\"\n\n @crowd.add_user_to_group user.name, group \n assert (@crowd.group_member? user.name, group) \n\n groups = @crowd.find_group_memberships user.name\n assert (groups.length > 0)\n assert (groups.include? group)\n\n @crowd.remove_user_from_group user.name, group \n assert (not @crowd.group_member? user.name, group)\n\n groups_after_remove = @crowd.find_group_memberships user.name\n\n # ensure the user in one less group \n assert_equal groups.length - 1, groups_after_remove.length\n \n end",
"def members=(value)\n @members = value\n end",
"def members=(value)\n @members = value\n end",
"def members=(value)\n @members = value\n end",
"def members=(value)\n @members = value\n end",
"def may_update_group_membership?(membership)\n\t\t\tmay_administrate? || is_group_moderator?(membership.group)\n\t\tend",
"def set_MembershipType(value)\n set_input(\"MembershipType\", value)\n end",
"def set_user_group\n @user_group = UserGroup.find(params[:id])\n end",
"def set_user_group\n @user_group = UserGroup.find(params[:id])\n end",
"def get_groups_with_membership\n filter = Net::LDAP::Filter.eq('objectclass', 'posixGroup')\n attributes = %w(cn memberUid)\n\n results = Tapjoy::LDAP.client.search(attributes, filter)\n end",
"def add_group_as_member(group)\n self.groups.push group\n end",
"def allowed_to_create_security_groups=(value)\n @allowed_to_create_security_groups = value\n end",
"def DeleteMembership id\n \n APICall(path: \"group_memberships/#{id}.json\",method: 'DELETE')\n \n end",
"def update_team_user_group(team_id, group_id, req_params = {})\n params = { query: [team_id, group_id], req: req_params }\n\n data = endpoint(name: 'TeamUserGroups', params: params).do_put\n\n resource 'TeamUserGroup', data\n end",
"def update\n @user = User.find(params[:id])\n Group.find(:all).each do |group|\n groups = params[:groups].map {|i| i.to_i} rescue []\n membership = Membership.find(:first, :conditions => [\"group_id = ? and user_id = ?\", group.id, @user.id])\n g_checked = groups.include? group.id\n Membership.create(:group => group, :user => @user) if !membership && g_checked\n membership.destroy if membership && !g_checked\n end\n respond_to do |format|\n if @user.update_attributes(params[:user])\n format.html do\n flash[:notice] = \"User #{@user.full_name} was successfully updated.\"\n redirect_to users_url\n end\n format.xml { head :ok }\n else\n format.html { render :action => \"edit\" }\n format.xml { render :xml => @user.errors.to_xml }\n end\n end\n end",
"def CreateMembership params = {}\n \n APICall(path: 'group_memberships.json',method: 'POST',payload: params.to_json)\n \n end"
] | [
"0.5191503",
"0.511439",
"0.5012243",
"0.49101797",
"0.49080253",
"0.49043232",
"0.479399",
"0.47837612",
"0.47713754",
"0.46546578",
"0.46171102",
"0.4564804",
"0.4564804",
"0.45582455",
"0.45564923",
"0.45199874",
"0.45159665",
"0.45011166",
"0.4498132",
"0.44958225",
"0.44821838",
"0.44815025",
"0.4453313",
"0.44488716",
"0.4442848",
"0.4432964",
"0.44118395",
"0.44096276",
"0.43845898",
"0.43831167",
"0.43816835",
"0.4366808",
"0.43245038",
"0.43193373",
"0.43081698",
"0.43081698",
"0.43074098",
"0.4299266",
"0.4296518",
"0.42901585",
"0.42901585",
"0.42901585",
"0.42889884",
"0.42865506",
"0.42865494",
"0.4281473",
"0.42570445",
"0.42552456",
"0.425271",
"0.42484415",
"0.4248308",
"0.4245402",
"0.42199257",
"0.42199257",
"0.42199257",
"0.42199257",
"0.42199257",
"0.42199257",
"0.42199257",
"0.42199257",
"0.42199257",
"0.4200664",
"0.41986096",
"0.41974294",
"0.4196103",
"0.41947573",
"0.4194347",
"0.4184196",
"0.41759408",
"0.41735047",
"0.41617224",
"0.4142586",
"0.4142586",
"0.41355884",
"0.41232404",
"0.41168097",
"0.41120115",
"0.41116774",
"0.41025585",
"0.41015548",
"0.40965375",
"0.4095722",
"0.40878057",
"0.40878057",
"0.40732235",
"0.4071295",
"0.4071295",
"0.4071295",
"0.4071295",
"0.4071066",
"0.40707052",
"0.40631384",
"0.40631384",
"0.40506136",
"0.40435",
"0.40312335",
"0.40264332",
"0.40241316",
"0.4023841",
"0.402026"
] | 0.6966193 | 0 |
Gets the homeRealmDiscoveryPolicies property value. The homeRealmDiscoveryPolicies property | def home_realm_discovery_policies
return @home_realm_discovery_policies
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def home_realm_discovery_policies=(value)\n @home_realm_discovery_policies = value\n end",
"def app_management_policies\n return @app_management_policies\n end",
"def managed_app_policies\n return @managed_app_policies\n end",
"def get_authorization_divisions_home(opts = {})\n data, _status_code, _headers = get_authorization_divisions_home_with_http_info(opts)\n return data\n end",
"def get_authorization_divisions_home(opts = {})\n data, _status_code, _headers = get_authorization_divisions_home_with_http_info(opts)\n return data\n end",
"def auth_policies\n []\n end",
"def policy_classes\n fetch_policies! unless @fetched\n @policy_classes\n end",
"def pre_authorized_applications\n return @pre_authorized_applications\n end",
"def policy_role_policies\n @policy_role_policies ||= Array.new.tap do |uris|\n filters = current_ability.agents.map do |agent|\n \"#{Ddr::Index::Fields::POLICY_ROLE}:\\\"#{agent}\\\"\"\n end.join(\" OR \")\n query = \"#{Ddr::Index::Fields::ACTIVE_FEDORA_MODEL}:Collection AND (#{filters})\"\n results = ActiveFedora::SolrService.query(query, rows: Collection.count, fl: Ddr::Index::Fields::INTERNAL_URI)\n results.each_with_object(uris) { |r, memo| memo << r[Ddr::Index::Fields::INTERNAL_URI] }\n end\n end",
"def policies\n @policies = Policy.all\n end",
"def apps_visibility_list\n return @apps_visibility_list\n end",
"def app_management_policies=(value)\n @app_management_policies = value\n end",
"def list_policies\n nessus_rest_get('policies')['policies']\n end",
"def apps_permissions_scopes_list\n return {} unless is_app_token?\n semaphore.synchronize {\n @apps_permissions_scopes_list ||= (\n r = get('/api/apps.permissions.scopes.list').parsed\n r['scopes'] || {}\n )\n }\n end",
"def policies_with_access\n #### TODO -- Memoize this and put it in the session?\n user_access_filters = []\n user_access_filters += apply_policy_group_permissions(discovery_permissions)\n user_access_filters += apply_policy_user_permissions(discovery_permissions)\n where = user_access_filters.join(' OR ')\n result = policy_class.search_with_conditions(where,\n fl: 'id',\n rows: policy_class.count)\n logger.debug \"get policies: #{result}\\n\\n\"\n result.map { |h| h['id'] }\n end",
"def assignment_policies\n return @assignment_policies\n end",
"def applied_policies\n return @applied_policies\n end",
"def fetch_policies!\n @fetched = true\n @policy_classes = @policies.map do |pol|\n result = case pol\n when String\n Merb::Authorization._policy_from_string(pol)\n when Symbol\n Merb::Authorization._policies_from_scope(pol, scope)\n end\n end\n @policy_classes = @policy_classes.flatten.compact\n end",
"def list_policies\n http_get(:uri=>\"/policies\", :fields=>x_cookie)\n end",
"def managed_app_policies()\n return MicrosoftGraph::DeviceAppManagement::ManagedAppPolicies::ManagedAppPoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def apps_install_allow_list\n return @apps_install_allow_list\n end",
"def protected_apps\n return @protected_apps\n end",
"def kiosk_mode_apps\n return @kiosk_mode_apps\n end",
"def apps\n return @apps\n end",
"def managed_app_policies=(value)\n @managed_app_policies = value\n end",
"def rules\n @rules ||= begin\n @rules = []\n resolve_permissions\n @rules\n end\n end",
"def authorized_gae_applications\n settings[:authorized_gae_applications]\n end",
"def account_manager_policy\n return @account_manager_policy\n end",
"def mac_os_enrollment_assignments\n return @mac_os_enrollment_assignments\n end",
"def client_applications\n return @client_applications\n end",
"def certificate_policies\n extensions[R509::Cert::Extensions::CertificatePolicies]\n end",
"def apps\n @apps.keys\n end",
"def known_client_applications\n return @known_client_applications\n end",
"def have_policy_for?(app_name)\n @policies ||= Vault.sys.policies\n @policies.include?(app_name)\n end",
"def app_roles\n return @app_roles\n end",
"def allowed_online_meeting_providers\n return @allowed_online_meeting_providers\n end",
"def all(*policies)\n clazz = Class.new(Walruz::Policy) do # :nodoc:\n extend PolicyCompositionHelper\n \n def authorized?(actor, subject) # :nodoc:\n acum = [true, self.params || {}]\n self.class.policies.each do |policy|\n break unless acum[0]\n result = policy.new.set_params(acum[1]).safe_authorized?(actor, subject)\n acum[0] &&= result[0]\n acum[1].merge!(result[1])\n end\n acum[0] ? acum : acum[0]\n end\n \n def self.policy_keyword # :nodoc:\n (self.policies.map { |p| p.policy_keyword.to_s[0..-2] }.join('_and_') + \"?\").to_sym\n end\n \n end\n clazz.policies = policies\n clazz\n end",
"def group_policies\r\n GroupPoliciesController.instance\r\n end",
"def compliant_apps_list\n return @compliant_apps_list\n end",
"def compliant_apps_list\n return @compliant_apps_list\n end",
"def token_lifetime_policies\n return @token_lifetime_policies\n end",
"def installed_apps\n return @installed_apps\n end",
"def installed_apps\n return @installed_apps\n end",
"def applications\n return @applications\n end",
"def applications\n return @applications\n end",
"def federation_configurations\n return @federation_configurations\n end",
"def registered_predicates\n properties.values.map { |config| config.predicate }\n end",
"def managed_apps\n return @managed_apps\n end",
"def managed_app_registrations\n return @managed_app_registrations\n end",
"def accessible_appraisals\n if self.role_names.include?('admin')\n Appraisal\n elsif self.role_names.include?('executive') or self.role_names.include?('manager')\n self.authorized_appraisals\n elsif self.role_name.include?('user')\n self.person.appraisals_responsible_for\n end\n end",
"def intended_policies\n return @intended_policies\n end",
"def token_issuance_policies\n return @token_issuance_policies\n end",
"def index\n @permission_policies = PermissionPolicy.all\n end",
"def platform_availability_endpoints\n PlatformAvailabilityEndpointsController.instance\n end",
"def property_predicates\n _property_predicates\n end",
"def dashboard_branding_policies\r\n DashboardBrandingPoliciesController.instance\r\n end",
"def app_definitions\n return @app_definitions\n end",
"def policy_list_hash\n\t\t\tpost= { \"token\" => @token }\n\t\t\tdocxml = nil\n\t\t\tdocxml=nessus_request('scan/list', post)\n\t\t\tif docxml.nil?\n\t\t\t\treturn\n\t\t\tend\n\t\t\tpolicies=Array.new\n\t\t\tdocxml.elements.each('/reply/contents/policies/policies/policy') { |policy|\n\t\t\t\tentry=Hash.new\n\t\t\t\tentry['id']=policy.elements['policyID'].text if policy.elements['policyID']\n\t\t\t\tentry['name']=policy.elements['policyName'].text if policy.elements['policyName']\n\t\t\t\tentry['comment']=policy.elements['policyComments'].text if policy.elements['policyComments']\n\t\t\t\tpolicies.push(entry)\n\t\t\t}\n\t\t\treturn policies\n\t\tend",
"def index\n @user = current_user\n @home = current_user.homes\n # Lists each user's home(s). Available because in our model, I have set it up so that one user can have many homes.\n end",
"def index\n @client_policies = ClientPolicy.all\n end",
"def android_enrollment_assignments\n return @android_enrollment_assignments\n end",
"def index\n @priv_policies = PrivPolicy.all\n end",
"def policy_executables\n Array(settings['external_policy_executable'])\n end",
"def windows_information_protection_policies\n return @windows_information_protection_policies\n end",
"def index\n @bookings = policy_scope(current_user.bookings)\n authorize @bookings\n @experiences = policy_scope(current_user.experiences)\n authorize @experiences\n end",
"def enabled_accounts\n self.padma.try(:enabled_accounts)\n end",
"def configured_hosts\n\t\troutes = self.configured_routes\n\t\treturn Mongrel2::Config::Host.where( id: routes.select(:host_id) )\n\tend",
"def ios_enrollment_assignments\n return @ios_enrollment_assignments\n end",
"def discovery_keys\n @data[:discovery_keys]\n end",
"def primary_approvers\n return @primary_approvers\n end",
"def index\n skip_policy_scope\n @applications = current_user&.oauth_applications\n if @applications&.empty?\n skip_authorization\n else\n @applications&.each do |app|\n authorize app, policy_class: Oauth::ApplicationPolicy\n end\n end\n end",
"def apps_single_app_mode_list\n return @apps_single_app_mode_list\n end",
"def get_user_homes\n # @user_homes = UserHome.where(\"user_id =?\",current_user[:id])\n\n @homes = User.get_user_homes current_user[:id]\n if @homes\n render json:@homes\n else\n render json: @homes.errors\n end\n end",
"def apps\n unless @apps\n load!\n end\n\n @apps\n end",
"def index\n @privacy_policies = PrivacyPolicy.all\n end",
"def secure_score_control_profiles\n return @secure_score_control_profiles\n end",
"def profile_setting_list\n\t\t# find the home address\n\t\t@home_addresses = @profile_setting.addresses.where(address_type: \"home\")\n\tend",
"def group_policies\n policies = []\n Group.each do |group|\n group.group_memberships.each do |membership|\n if membership.account_id == _id\n policies.push(group.group_policy)\n end\n end\n end\n return policies\n end",
"def enterprise_proxied_domains\n return @enterprise_proxied_domains\n end",
"def get_permissions(poll_path, polls = read_polls_data)\n if signed_in?\n @user.permissions(poll_path, polls)\n else\n []\n end\n end",
"def home_players\n game_hash[:home][:players]\nend",
"def discovery_permissions\n @discovery_permissions ||= %w[edit discover read]\n end",
"def app_environments\n @app_environments ||= apps.map { |app| app.app_environments }.flatten\n end",
"def get_all_policies\n @command = :get_all_policies\n raise ProjectHanlon::Error::Slice::SliceCommandParsingFailed,\n \"Unexpected arguments found in command #{@command} -> #{@command_array.inspect}\" if @command_array.length > 0\n # get the policies from the RESTful API (as an array of objects)\n uri = URI.parse @uri_string\n result = hnl_http_get(uri)\n unless result.blank?\n # convert it to a sorted array of objects (from an array of hashes)\n sort_fieldname = 'line_number'\n result = hash_array_to_obj_array(expand_response_with_uris(result), sort_fieldname)\n end\n # and print the result\n print_object_array(result, \"Policies:\", :style => :table)\n end",
"def sharing_allowed_domain_list\n return @sharing_allowed_domain_list\n end",
"def preferred_hosts\n deep_values(\"preferred_hosts\")\n end",
"def work_profile_default_app_permission_policy\n return @work_profile_default_app_permission_policy\n end",
"def allowed_accounts\n return @allowed_accounts\n end",
"def registered_applications\n @registered_applications ||= current_user.registered_applications.all\n end",
"def available_properties\n @properties ||= list.properties\n end",
"def get_kubernetes_addon_policy_list(opts = {})\n data, _status_code, _headers = get_kubernetes_addon_policy_list_with_http_info(opts)\n data\n end",
"def termination_policies\n @group.termination_policies\n end",
"def get_rules\r\n @rules\r\n end",
"def orgs\n return @orgs if defined?(@orgs)\n\n @orgs = []\n orgs_from_annotations.each { |org| @orgs << org unless org_found(@orgs, org) }\n orgs_from_guidance_groups.each { |org| @orgs << org unless org_found(@orgs, org) }\n @orgs\n end",
"def rules\n return @rules\n end",
"def authorization_handlers\n @authorization_handlers ||= begin\n ::Decidim::VerifyWoRegistration::ApplicationHelper.workflow_manifests(component).map do |workflow_manifest|\n Decidim::AuthorizationHandler.handler_for(workflow_manifest.name, handler_params(workflow_manifest.name))\n end\n end\n end",
"def retrieve_policies( resource_name, access_token, realm_uuid, resource_server )\n if resource_name && access_token\n request_policies(\n resource_name,\n access_token,\n realm_uuid,\n resource_server\n )\n else\n nil\n end\n end",
"def apps_permissions_users_list\n return {} unless !skip_info? && is_app_token? && is_not_excluded?\n semaphore.synchronize {\n @apps_permissions_users_list_raw ||= access_token.get('/api/apps.permissions.users.list')\n @apps_permissions_users_list ||= @apps_permissions_users_list_raw.parsed['resources'].inject({}){|h,i| h[i['id']] = i; h}\n }\n end",
"def mobile_app_configurations\n return @mobile_app_configurations\n end",
"def pre_authorized_applications=(value)\n @pre_authorized_applications = value\n end"
] | [
"0.7594608",
"0.5877245",
"0.57575244",
"0.5266318",
"0.5265849",
"0.504827",
"0.5015482",
"0.4993095",
"0.49523392",
"0.4911553",
"0.48988283",
"0.48424086",
"0.47984084",
"0.47815743",
"0.47552264",
"0.47367916",
"0.47265092",
"0.4703537",
"0.46937594",
"0.46680838",
"0.463327",
"0.45995182",
"0.4589507",
"0.4585137",
"0.45766306",
"0.45524403",
"0.449898",
"0.44869116",
"0.44785258",
"0.44782302",
"0.44693416",
"0.44649452",
"0.44365776",
"0.44344062",
"0.44288367",
"0.44235313",
"0.44155416",
"0.4412383",
"0.43882358",
"0.43882358",
"0.438381",
"0.43692464",
"0.43692464",
"0.43676025",
"0.43676025",
"0.4363521",
"0.43634737",
"0.43613246",
"0.4355832",
"0.43474358",
"0.4333917",
"0.43082005",
"0.42741328",
"0.42702654",
"0.4238922",
"0.42134732",
"0.42083967",
"0.42082626",
"0.4201901",
"0.41989002",
"0.41984013",
"0.4197966",
"0.4190361",
"0.418745",
"0.41775578",
"0.4175588",
"0.41742948",
"0.41531757",
"0.41490015",
"0.41488868",
"0.41456115",
"0.41314122",
"0.41255897",
"0.4122438",
"0.41200262",
"0.41184407",
"0.41151917",
"0.40945864",
"0.4094367",
"0.40890154",
"0.40875918",
"0.40827793",
"0.40806195",
"0.40791368",
"0.40759054",
"0.4075307",
"0.40690798",
"0.40644512",
"0.4054203",
"0.40496808",
"0.40492237",
"0.40480468",
"0.40387464",
"0.40312022",
"0.40250212",
"0.4018704",
"0.40132698",
"0.40115407",
"0.4010444",
"0.40067303"
] | 0.8102788 | 0 |
Sets the homeRealmDiscoveryPolicies property value. The homeRealmDiscoveryPolicies property | def home_realm_discovery_policies=(value)
@home_realm_discovery_policies = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def home_realm_discovery_policies\n return @home_realm_discovery_policies\n end",
"def app_management_policies=(value)\n @app_management_policies = value\n end",
"def set_user_homes\n @user_homes = UserHome.find(params[:id])\n end",
"def managed_app_policies=(value)\n @managed_app_policies = value\n end",
"def all(*policies)\n clazz = Class.new(Walruz::Policy) do # :nodoc:\n extend PolicyCompositionHelper\n \n def authorized?(actor, subject) # :nodoc:\n acum = [true, self.params || {}]\n self.class.policies.each do |policy|\n break unless acum[0]\n result = policy.new.set_params(acum[1]).safe_authorized?(actor, subject)\n acum[0] &&= result[0]\n acum[1].merge!(result[1])\n end\n acum[0] ? acum : acum[0]\n end\n \n def self.policy_keyword # :nodoc:\n (self.policies.map { |p| p.policy_keyword.to_s[0..-2] }.join('_and_') + \"?\").to_sym\n end\n \n end\n clazz.policies = policies\n clazz\n end",
"def set_inherited_privileges!\n rules.each do |resource, rule|\n privileges = privileges(resource)\n privileges.each { |k, v| rule.privileges[k] = v if rule.privileges.key?(k) }\n end\n\n self\n end",
"def setPolicies\n=begin\n Util.modifyPolicy(ncaEnclave, '', '\nPolicy DamlBootPolicyNCAServletForRearPolicyAdmin = [\n A user in role RearPolicyAdministration can access a servlet named NCAServlets\n]\n')\n=end\n end",
"def populate_policies(policies)\n @policies = policies.map do |policy|\n config = PolicyConfig.new()\n config.populate(policy)\n config\n end\n end",
"def fetch_policies!\n @fetched = true\n @policy_classes = @policies.map do |pol|\n result = case pol\n when String\n Merb::Authorization._policy_from_string(pol)\n when Symbol\n Merb::Authorization._policies_from_scope(pol, scope)\n end\n end\n @policy_classes = @policy_classes.flatten.compact\n end",
"def pre_authorized_applications=(value)\n @pre_authorized_applications = value\n end",
"def apps_install_allow_list=(value)\n @apps_install_allow_list = value\n end",
"def policy_classes\n fetch_policies! unless @fetched\n @policy_classes\n end",
"def get_authorization_divisions_home(opts = {})\n data, _status_code, _headers = get_authorization_divisions_home_with_http_info(opts)\n return data\n end",
"def get_authorization_divisions_home(opts = {})\n data, _status_code, _headers = get_authorization_divisions_home_with_http_info(opts)\n return data\n end",
"def any(*policies)\n clazz = Class.new(Walruz::Policy) do # :nodoc:\n extend PolicyCompositionHelper\n \n def authorized?(actor, subject) # :nodoc:\n result = nil\n self.class.policies.detect do |policy|\n result = policy.new.set_params(params).safe_authorized?(actor, subject)\n result[0]\n end\n result[0] ? result : result[0]\n end\n \n end\n clazz.policies = policies\n clazz\n end",
"def policies\n @policies = Policy.all\n end",
"def set_public_access(*perms)\n perms.each do |perm_symbol|\n perm = find_permission_object(perm_symbol)\n if perm\n perm.set_as_public_access \n else\n msg = \"Permission not found: #{perm_symbol}\"\n raise Lockdown::InvalidRuleAssignment, msg\n end\n end\n end",
"def assignment_policies=(value)\n @assignment_policies = value\n end",
"def setup_homebases\n # Insert the homebase.created_by values.\n # Since the homebase referrs to the user, and the user referrs to the homebase, we have a circular reference. \n # Created_by can't be set at the time of insert because the user doesn't exist yet. \n Homebase.find(1).update_attribute(:created_by, 1001)\n Homebase.find(2).update_attribute(:created_by, 1003)\n Homebase.find(3).update_attribute(:created_by, 1004)\n Homebase.find(5).update_attribute(:created_by, 1006)\n \n @request.host = \"haiti.crossconnector.com\" if @request\n \n end",
"def app_management_policies\n return @app_management_policies\n end",
"def set_homes_user\n @homes_user = HomesUser.find(params[:id])\n end",
"def policies_with_access\n #### TODO -- Memoize this and put it in the session?\n user_access_filters = []\n user_access_filters += apply_policy_group_permissions(discovery_permissions)\n user_access_filters += apply_policy_user_permissions(discovery_permissions)\n where = user_access_filters.join(' OR ')\n result = policy_class.search_with_conditions(where,\n fl: 'id',\n rows: policy_class.count)\n logger.debug \"get policies: #{result}\\n\\n\"\n result.map { |h| h['id'] }\n end",
"def discovery_permissions\n @discovery_permissions ||= %w[edit discover read]\n end",
"def apps_visibility_list=(value)\n @apps_visibility_list = value\n end",
"def discovery_permissions\n @discovery_permissions ||= [\"edit\",\"discover\",\"read\"]\n end",
"def managed_app_policies()\n return MicrosoftGraph::DeviceAppManagement::ManagedAppPolicies::ManagedAppPoliciesRequestBuilder.new(@path_parameters, @request_adapter)\n end",
"def set_home\n @home = Home.select(\"homes.*\").where('homes.id = ?', params[:id])\n # @room = Room.where(\"home_id = ?\", params[:id])\n #\n # render json: @room.to_a << @home\n # @home = Home.joins(:rooms).select(\"homes.*, rooms.*\").where('homes.id = ?', params[:id])\n render json: @home\n end",
"def set_policy_sub_hedings\n @policy_heding = PolicyHeding.find(params[:policy_heding_id])\n end",
"def set_home_owner\n @home_owner = HomeOwner.find(params[:id])\n end",
"def set_home\n @home = current_user.homes.find(params[:id])\n raise ActiveRecord::RecordNotFound unless @home\n end",
"def discovery_permissions\n @discovery_permissions ||= %w[edit read]\n end",
"def set_route_allowlist(route_allowlist)\n @@route_allowlist = route_allowlist\n end",
"def auth_policies\n []\n end",
"def account_manager_policy=(value)\n @account_manager_policy = value\n end",
"def applied_policies=(value)\n @applied_policies = value\n end",
"def intended_policies=(value)\n @intended_policies = value\n end",
"def populate_policies\n end",
"def apps=(value)\n @apps = value\n end",
"def initialize()\n super\n @odata_type = \"#microsoft.graph.appManagementPolicy\"\n end",
"def declare_access_control_keys( *ack_list )\n self.sg_access_control_keys = ack_list\n end",
"def reset! (*perms)\n if perms.size == 1 and perms.first.respond_to?(:keys)\n perms = perms.first\n elsif perms.size == 0\n perms = {}\n else\n perms = Hash[*perms.map{|p|[p,1]}.flatten]\n end\n\n Role.transaction do\n proxy_owner.allowances.clear\n perms.each do |name, allowance| \n next if allowance.blank?\n proxy_owner.allowances.add(name.to_s, allowance.to_i)\n end\n end\n end",
"def managed_app_policies\n return @managed_app_policies\n end",
"def set_admin_home\n @admin_home = Admin::Home.find(params[:id])\n end",
"def set_admin_home\n @admin_home = Admin::Home.find(params[:id])\n end",
"def index\n skip_policy_scope\n @applications = current_user&.oauth_applications\n if @applications&.empty?\n skip_authorization\n else\n @applications&.each do |app|\n authorize app, policy_class: Oauth::ApplicationPolicy\n end\n end\n end",
"def policy_role_policies\n @policy_role_policies ||= Array.new.tap do |uris|\n filters = current_ability.agents.map do |agent|\n \"#{Ddr::Index::Fields::POLICY_ROLE}:\\\"#{agent}\\\"\"\n end.join(\" OR \")\n query = \"#{Ddr::Index::Fields::ACTIVE_FEDORA_MODEL}:Collection AND (#{filters})\"\n results = ActiveFedora::SolrService.query(query, rows: Collection.count, fl: Ddr::Index::Fields::INTERNAL_URI)\n results.each_with_object(uris) { |r, memo| memo << r[Ddr::Index::Fields::INTERNAL_URI] }\n end\n end",
"def protected_apps=(value)\n @protected_apps = value\n end",
"def application_enforced_restrictions=(value)\n @application_enforced_restrictions = value\n end",
"def scheme_handlers= scheme_handlers\n @agent.scheme_handlers = scheme_handlers\n end",
"def rules\n @rules ||= begin\n @rules = []\n resolve_permissions\n @rules\n end\n end",
"def set_apps(apps_attrs)\n (apps_attrs || []).each do |app|\n AppEnvironment.from_hash(api, {'app' => app, 'environment' => self})\n end\n end",
"def known_client_applications=(value)\n @known_client_applications = value\n end",
"def fix_app_permissions(apps)\n apps.map { |path|\n fix_facl(path, app_acl_template(path))\n }.select { |report| report.updated || report.error }\n end",
"def defender_guarded_folders_allowed_app_paths=(value)\n @defender_guarded_folders_allowed_app_paths = value\n end",
"def apps=(selected_apps)\n filter = ( APPS && selected_apps )\n filter = filter.select{|item| !item.blank?}\n # mark (APPS && selected_apps) != (selected_apps && APPS)\n self.apps_mask = filter.map{|app| 2**APPS.index(app) }.sum\n end",
"def authorize_for_all\n # Clear all authorizations and create an allow-all entry\n ContentAuthorization.transaction do\n update_privacy_level(ContentAuthorization::AuthPublic)\n clear_accessors\n end\n end",
"def set_admin_home\n @admin_home = Card::Home.find(params[:id])\n end",
"def federation_configurations=(value)\n @federation_configurations = value\n end",
"def all\n load_clients\n load_preferences\n end",
"def initialize()\n super\n @odata_type = \"#microsoft.graph.deviceEnrollmentPlatformRestrictionsConfiguration\"\n end",
"def index\n @permission_policies = PermissionPolicy.all\n end",
"def index\n @client_policies = ClientPolicy.all\n end",
"def for(home_people)\n split_instant_owner_groups_from_considerations(home_people)\n include_non_accounted_for_considerations\n return_the_unique_owner_groupings\n end",
"def change_preference_list\n\t\tcheck_if_myself\n\t\tuser = current_user\n\t\tnew_preference_list = user_pref_list_params[:preference_list]\n\t\tif new_preference_list != user.preference_list\n\t\t\tuser.update_attributes(user_pref_list_params)\n\t\t\tuser.save\n\t\t\tRecomputeMeetingParticipationsJob.perform_later (0..6).to_a, user\n\t\tend\n\t\tredirect_to settings_page_path\n\tend",
"def compliant_apps_list=(value)\n @compliant_apps_list = value\n end",
"def compliant_apps_list=(value)\n @compliant_apps_list = value\n end",
"def initialize()\n super\n @odata_type = \"#microsoft.graph.androidWorkProfileCompliancePolicy\"\n end",
"def work_profile_default_app_permission_policy=(value)\n @work_profile_default_app_permission_policy = value\n end",
"def set_perms\n self.perms = Access.for_user(self)\n end",
"def kiosk_mode_apps=(value)\n @kiosk_mode_apps = value\n end",
"def home_score=(score)\n\t\tnormalised_score = hash_values_to_ints(score)\n\t\t# if the above fails, stick in whatever we got, so that errors are correct\n\t\tself[:home_score] = score if normalised_score.nil?\n\t\tself[:home_score] = normalised_score unless normalised_score.nil?\n\tend",
"def set_pages_home\n @pages_home = Pages::Home.find(params[:id])\n end",
"def primary_approvers=(value)\n @primary_approvers = value\n end",
"def apps_permissions_scopes_list\n return {} unless is_app_token?\n semaphore.synchronize {\n @apps_permissions_scopes_list ||= (\n r = get('/api/apps.permissions.scopes.list').parsed\n r['scopes'] || {}\n )\n }\n end",
"def []= instance_port, policy\n\n client.set_load_balancer_policies_for_backend_server(\n :load_balancer_name => load_balancer.name,\n :instance_port => instance_port.to_i,\n :policy_names => [policy_name(policy)].compact)\n\n nil\n\n end",
"def index\n @bookings = policy_scope(current_user.bookings)\n authorize @bookings\n @experiences = policy_scope(current_user.experiences)\n authorize @experiences\n end",
"def permissions=(perms)\n fetched_roles = Hash.new { Set.new }\n fetched_perms = Hash.new { Set.new }\n\n perms.each do |r|\n res = r[:resource]\n role = r[:role]\n\n fetched_roles[res] = fetched_roles[res] << role\n fetched_perms[res] += r[:permissions]\n end\n\n # replace the role and permission caches with the latest data\n @resource_roles = fetched_roles\n @resource_permissions = fetched_perms\n end",
"def update!(**args)\n @agency_associations = args[:agency_associations] if args.key?(:agency_associations)\n end",
"def enforce_configured_scopes\n @config.instance_variable_set(:@enforce_configured_scopes, true)\n end",
"def associations(*associations)\n self._associations = associations\n end",
"def discover_users=(users)\n set_discover_users(users, discover_users)\n end",
"def index\n @priv_policies = PrivPolicy.all\n end",
"def index\n @privacy_policies = PrivacyPolicy.all\n end",
"def scheme_handlers=(scheme_handlers); end",
"def set_users\n @can_change_owner = policy(@run || Run).current_user_allowed_to_crud?\n @users = policy_scope(User).map{|u| [ u.name, u.id ] } if @can_change_owner\n end",
"def pre_authorized_applications\n return @pre_authorized_applications\n end",
"def initialize()\n super\n @odata_type = \"#microsoft.graph.windows10MobileCompliancePolicy\"\n end",
"def setup_collisions\n self.collisions.each { |collision| collision.install_on(environment) }\n end",
"def set_clients\n @clients = Client.all\n end",
"def token_issuance_policies=(value)\n @token_issuance_policies = value\n end",
"def index\n @clients = policy_scope(Client)\n end",
"def conf_acl\n ace = $ts.dut.call(\"mesa_ace_init\", \"MESA_ACE_TYPE_ANY\")\n ace[\"id\"] = 1\n action = ace[\"action\"]\n action[\"port_action\"] = \"MESA_ACL_PORT_ACTION_REDIR\"\n action[\"port_list\"] = \"#{$port_list[0]}\"\n ace[\"port_list\"] = \"#{$port_list[1]}\"\n policy = ace[\"policy\"]\n policy[\"value\"] = 1\n policy[\"mask\"] = 0x3f\n $ts.dut.call(\"mesa_ace_add\", 0, ace)\nend",
"def set_app_restrictions(app_id, restrictions_hash, args = {}, options = {}, &block)\n graph_call(app_id, args.merge(:restrictions => JSON.dump(restrictions_hash)), \"post\", options, &block)\n end",
"def set_homeplace\n @homeplace = Homeplace.find(params[:id])\n end",
"def client_applications=(value)\n @client_applications = value\n end",
"def have_policy_for?(app_name)\n @policies ||= Vault.sys.policies\n @policies.include?(app_name)\n end",
"def index\n @user = current_user\n @home = current_user.homes\n # Lists each user's home(s). Available because in our model, I have set it up so that one user can have many homes.\n end",
"def users=(users_hash)\n client_principal.users = Hash[users_hash.map { |k, v| [k, v.sort] } ]\n end",
"def add_http_permissions_policy\n response.set_header(\n 'Permissions-Policy',\n 'fullscreen=(), geolocation=(), midi=(), ' \\\n 'notifications=(), push=(), sync-xhr=(), microphone=(), ' \\\n 'camera=(), magnetometer=(), gyroscope=(), speaker=(), ' \\\n 'vibrate=(), payment=()'\n )\n # Include the older Feature-Policy header, for older browser versions.\n # We can eventually drop this, but it doesn't hurt to include it for now.\n response.set_header(\n 'Feature-Policy',\n \"fullscreen 'none'; geolocation 'none'; midi 'none';\" \\\n \"notifications 'none'; push 'none'; sync-xhr 'none'; microphone 'none';\" \\\n \"camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none';\" \\\n \"vibrate 'none'; payment 'none'\"\n )\n end",
"def store_definition policies\n # Policies may have been defined by other means. If it's not a hash, stop\n return unless policies.is_a? Hash\n\n base = current_base\n policies.each_pair do |widget, conditions|\n policy = base[widget] || {\n :self => true,\n :params => [],\n :models => {},\n :procs => [],\n :widget_params => true\n }\n add_conditions(policy, conditions)\n base[widget] = policy\n end\n end"
] | [
"0.66333663",
"0.50669366",
"0.476827",
"0.47435424",
"0.47069246",
"0.4645053",
"0.46032798",
"0.45891887",
"0.45887285",
"0.44939795",
"0.44340652",
"0.43737644",
"0.43648154",
"0.43647373",
"0.43087232",
"0.42550147",
"0.42402473",
"0.4232724",
"0.42245358",
"0.42155847",
"0.4210092",
"0.4181062",
"0.4154554",
"0.40805203",
"0.4062034",
"0.40617236",
"0.4052181",
"0.40507135",
"0.40186736",
"0.40076634",
"0.4001654",
"0.40012118",
"0.399654",
"0.39937666",
"0.39935076",
"0.3983367",
"0.39808038",
"0.39795852",
"0.39792696",
"0.39704886",
"0.39652556",
"0.39633664",
"0.39568663",
"0.39568663",
"0.39512143",
"0.39276826",
"0.3927239",
"0.3898799",
"0.38980407",
"0.38893175",
"0.3886635",
"0.38813335",
"0.38757423",
"0.38743156",
"0.38611272",
"0.38520873",
"0.38442716",
"0.3842079",
"0.38267097",
"0.38159716",
"0.38052875",
"0.38000748",
"0.37993917",
"0.37970367",
"0.37948403",
"0.37948403",
"0.37919557",
"0.37908491",
"0.3782413",
"0.37775913",
"0.3775715",
"0.37741935",
"0.3774117",
"0.37738025",
"0.37689462",
"0.3766724",
"0.3757107",
"0.374376",
"0.37409788",
"0.37409127",
"0.3739457",
"0.37324175",
"0.37317473",
"0.37298638",
"0.3722473",
"0.3721405",
"0.37142408",
"0.3712879",
"0.3711942",
"0.3711386",
"0.37088037",
"0.3705008",
"0.3702947",
"0.37018752",
"0.36959112",
"0.36950538",
"0.36936843",
"0.36911434",
"0.3690032",
"0.36900225"
] | 0.7954294 | 0 |
Gets the identifierUris property value. Also known as App ID URI, this value is set when an application is used as a resource app. The identifierUris acts as the prefix for the scopes you'll reference in your API's code, and it must be globally unique. You can use the default value provided, which is in the form api://, or specify a more readable URI like For more information on valid identifierUris patterns and best practices, see Azure AD application registration security best practices. Not nullable. Supports $filter (eq, ne, ge, le, startsWith). | def identifier_uris
return @identifier_uris
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def identifier_uris=(value)\n @identifier_uris = value\n end",
"def federation_uris\n\n ## All unique federations, making sure we include primary\n all_fed_uris = [primary_federation_uri].concat other_federation_uris \n \n return all_fed_uris.uniq\n \n end",
"def uris\n uris = []\n if current_user.admin?\n uris = object.uris\n elsif current_user.lead?\n uris = object.uris.select { |uri| uri.vm.project.users.include?(current_user) }\n else\n uris = object.uris.select { |uri| uri.vm.user.id == current_user.id }\n end\n uris.map { |u| u.id }\n end",
"def name_to_uris\n uri_set('networkUris', OneviewSDK::EthernetNetwork)\n uri_set('fcNetworkUris', OneviewSDK::FCNetwork)\n uri_set('fcoeNetworkUris', OneviewSDK::FCoENetwork)\n end",
"def redirect_uris=(value)\n @redirect_uris = value\n end",
"def identifier_list(*ids, separator: /\\s*,\\s*/, **)\n ids = ids.flat_map { |v| v.is_a?(String) ? v.strip.split(separator) : v }\n ids.map! { |v| v.is_a?(ApplicationRecord) ? v.id : v }\n ids.map! { |v| positive(v) || v }.compact_blank!\n end",
"def uri\n @uri ||= select { |type,value| type == :uri }.map do |(type,value)|\n URI.parse(value)\n end\n end",
"def redirect_uris\n return @redirect_uris\n end",
"def selected_federation_uris\n\n return @selected_federation_uris || []\n\n end",
"def identifiers\n request[:ids]\n end",
"def identifiers\n @r.keys.select { |k| k.to_s.start_with? 'identifier__' }.map do |k|\n {\n scheme: k.to_s.sub('identifier__', ''),\n identifier: @r.delete(k),\n }\n end\n end",
"def identifiers(filter = Set.new)\n list(filter).entities.map { |ent| ent['occi.core.id'] }\n end",
"def find_ids(uris)\n uris.map { |uri| find_id(uri) }\n end",
"def identifier_value\n @value.map do |id|\n if /^https?\\:\\/\\//.match?(id)\n \"<a href='#{id}' alt='#{label}'>#{id}</a>\"\n else\n id\n end\n end\n end",
"def process_uris(element, value, evaluation_context, base, **options)\n return [] if value.to_s.empty?\n add_debug(element) {\"process_uris: #{value}\"}\n value.to_s.split(/\\s+/).map {|v| process_uri(element, v, evaluation_context, base, **options)}.compact\n end",
"def endpoints\n object.endpoints.map { |e| e.id }\n end",
"def redirectUris=(uris)\n self.redirect_url = uris.first\n end",
"def get_uri_seeds()\n return @uri_seeds\n end",
"def autocomplete_known_uri_values\n lookup_predicate\n if params[:term].blank? || params[:term].strip.blank?\n if @predicate && @predicate.has_values?\n @known_uris = @predicate.allowed_values.select{ |ku| ku.visible? }\n else\n @known_uris = []\n end\n else\n @known_uris = search_known_uris_by_name_or_uri(params[:term])\n if @predicate\n @known_uris.delete_if{ |ku| ! @predicate.allowed_values.include?(ku) }\n else\n @known_uris.delete_if{ |ku| ! ku.value? }\n end\n end\n render_autocomplete_results\n end",
"def uri=(value)\n @uris << value\n end",
"def ids\n @ids ||= []\n end",
"def get_report_uris(report_filter)\n return [] if report_filter == NONE_REPORT_FILTER\n\n interpolate_local_report_uris(@config.report_uris)\n end",
"def identifiers\n return [] if __getobj__.blank?\n\n __getobj__.identifier if __getobj__.respond_to?(:identifier)\n end",
"def owner_id_list(resource)\n id_list(resource, owner_request_ids)\n end",
"def client_application_publisher_ids\n return @client_application_publisher_ids\n end",
"def client_application_ids\n return @client_application_ids\n end",
"def ids\n (1..get_item_count).map do |index|\n get_item_identifier index\n end\n end",
"def collection_id\n super.map { |url| URI(url).path.sub('/', '') }\n end",
"def ids\n pluck(:id)\n end",
"def client_application_publisher_ids=(value)\n @client_application_publisher_ids = value\n end",
"def vivo_ids\n vivo_uris.map {|uri| uri.to_s.split('/').last.to_i }\nend",
"def client_application_ids=(value)\n @client_application_ids = value\n end",
"def uri_id\n raise NotImplementedError.new('You must implement uri_id')\n end",
"def identifiers_hash\n @identifiers_hash ||= {:default => [:uuid]}\n end",
"def associated_external_identifiers(not_resource_names: nil)\n nrn = not_resource_names\n eids = ExternalIdentifier.active.pluck(:name)\n\n self.associated_external_identifier_names =\n user_access_controls\n .valid_resources([:table])\n .where(resource_type: :table)\n .select { |a| a.access && a.resource_name.in?(eids) && (nrn.nil? || !a.resource_name.in?(nrn)) }\n .map(&:resource_name)\n .uniq\n\n ExternalIdentifier.active.where(name: associated_external_identifier_names).reorder('').order(id: :asc)\n end",
"def redirect_uri=(uris)\n super(uris.is_a?(Array) ? uris.join(\"\\n\") : uris)\n end",
"def redirect_uri=(uris)\n super(uris.is_a?(Array) ? uris.join(\"\\n\") : uris)\n end",
"def redirect_uri=(uris)\n super(uris.is_a?(Array) ? uris.join(\"\\n\") : uris)\n end",
"def credential_filtered_uri\n URICredentialsFilter.credential_filtered_uri(uri)\n end",
"def constituent_uris\n Array.wrap(constituents).uniq.delete_if(&:empty?)\n end",
"def uri_identifier\n if self.engine_id.present? && self.unique_id.present? && _h.respond_to?(:root_url)\n \"#{_h.root_url.chomp(\"/\")}/bento_search_opaque_id/#{CGI.escape self.engine_id}/#{CGI.escape self.unique_id}\"\n else\n nil\n end\n end",
"def record_ids(opts = {})\n opts = opts.merge(@opts)\n client.list_identifiers(opts).full.lazy.flat_map(&:identifier)\n end",
"def resources\n @resources ||=\n query_service.custom_queries.find_by_property(property: :source_metadata_identifier, value: [], lazy: true).select do |resource|\n id = resource.source_metadata_identifier.first\n next if /99.*3506421/.match?(id)\n next if transform_id(id).length > 18\n RemoteRecord.catalog?(id)\n end.to_a\n end",
"def identifier_list(*ids, **opt)\n cid = current_id.presence\n ids = params.values_at(*id_param_keys) if ids.blank?\n super(ids, **opt).tap do |result|\n result.map! { |v| CURRENT_ID.casecmp?(v) ? cid : v } if cid\n end\n end",
"def endpoints\n endpoints = object.endpoints\n unless current_user.admin?\n endpoints = object.endpoints.select { |ep| ep.project.users.include?(current_user) }\n end\n endpoints.map { |e| e.id }\n end",
"def ids\n storage.keys\n end",
"def selected_federation_uris=(selection)\n\n only_use(selection)\n\n end",
"def user_ids\n UsersRole\n .joins(:role)\n .where(Role.arel_table[:resource_identifier].in(identifiers))\n .pluck(:user_id)\n .uniq\n end",
"def ids\n @ids ||= term.list_ids.sort\n end",
"def parsed_region_ids\n\t region_id = self.area.split(\":\").last.to_i if self.area\n\t return [nil,nil,nil] if region_id == 0 || new_record?\n\t region = Ecstore::Region.find_by_region_id(region_id)\n\t region.region_path.split(',').select{ |x| x.present? }\n \tend",
"def email_ids\n []\n end",
"def extract_id_uri\n @id_uri = @meta.at_xpath('./a:identification/a:FRBRWork/a:FRBRuri', a: NS)['value']\n empty, @country, @nature, date, @num = @id_uri.split('/')\n\n # yyyy-mm-dd\n @year = date.split('-', 2)[0]\n end",
"def account_ids\n user.app_metadata.fetch('account_ids', [])\n end",
"def urls\n @gapi.source_uris\n end",
"def alternative_ids\n return @alternative_ids if @alternative_ids\n\n res = {}\n self.class.alternative_id_fields(access_by: current_user).each { |f| res[f] = alternative_id_value(f) }\n @alternative_ids = res\n end",
"def get_identifiers\n identifiers = publication_identifiers.map{|pi| pi.identifier_value}\n identifiers.push(self.isbn) unless !self.isbn\n identifiers.push(self.issn) unless !self.issn\n identifiers.push(self.eissn) unless !self.eissn\n identifiers.push(self.article_number) unless !self.article_number\n return identifiers\n end",
"def with_identifier(value)\n value = [value] if value.class == String\n t = Identifier.arel_table\n a = t[:cached].eq_any(value)\n self.joins(:identifiers).where(a.to_sql).references(:identifiers)\n end",
"def ids\n options[:id][1..-2].split(\",\").map(&:to_i)\n end",
"def filtered_references\n super.select do |ref|\n ref.candidate_uris.for(class:URI::DOI).nil?\n end\n end",
"def identifier\n @record.uri.to_s\n end",
"def attachment_uris\n Array.wrap(attachments).uniq.delete_if(&:empty?)\n end",
"def gen_atom_feed_uri_for(avalon_id)\n URI.parse(Rails.application.secrets[:avalon_url].gsub('other_identifier_sim:<identifier>&sort=timestamp+<order>&rows=<row_count>&page=<page_count>', \"id:#{avalon_id}\"))\n end",
"def result\n ::RDF::URI.new(value.sub(/^uri-/, ''))\n end",
"def autocomplete_known_uri_predicates\n @known_uris = search_known_uris_by_name_or_uri(params[:term])\n @known_uris.delete_if{ |ku| ku.uri_type_id != UriType.measurement.id || ! EOL::Sparql.connection.all_measurement_type_known_uris.include?(ku) }\n render_autocomplete_results\n end",
"def connection_identifiers\n config.connection_class.call.identifiers\n end",
"def userids\n metadata[\"userids\"]\n end",
"def uri\n\t\t# :scheme,\n\t\t# :host, :port,\n\t\t# :dn,\n\t\t# :attributes,\n\t\t# :scope,\n\t\t# :filter,\n\t\t# :extensions,\n\t\turi = self.branch.uri\n\t\turi.attributes = self.select.join(',')\n\t\turi.scope = SCOPE_NAME[ self.scope ]\n\t\turi.filter = self.filter_string\n\t\t# :TODO: Add extensions? Support extensions in Branchset?\n\n\t\treturn uri\n\tend",
"def ids_reader\n predicate = reflection.options.fetch(:has_member_relation)\n if loaded?\n target.map(&:id)\n else\n owner.resource.query({ predicate: predicate })\n .map { |s| ActiveFedora::Base.uri_to_id(s.object) } | target.map(&:id)\n end\n end",
"def unique_identifiers\n [:name, :path]\n end",
"def path_ids\n ancestor_ids + [id]\n end",
"def path_ids\n ancestor_ids + [id]\n end",
"def to_addressable_uri\n @uri\n end",
"def identities\n User.where(:provider => provider, :uid => uid)\n end",
"def collection_uri\n super + uuid + '/'\n end",
"def id_to_resource_uri\n @id_to_resource_uri ||= lambda { |id, _graph| ActiveFedora::Base.translate_id_to_uri.call(id) }\n end",
"def rpx_identifiers\n [{ :identifier => rpx_identifier, :provider_name => \"Unknown\" }]\n end",
"def author_identities_set\n author_identities.map do |ident|\n normalize_author_identity(ident.first_name, ident.middle_name || 'None',\n ident.last_name, ident.institution || 'None')\n end.to_s\n end",
"def sharepoint_ids=(value)\n @sharepoint_ids = value\n end",
"def references(url, data = nil)\n return [] if data.nil? || data.empty?\n # Enumerate the URIs and add them as keys of a hash to de-duplicate\n enum = Aspire::Enumerator::LinkedDataURIEnumerator.new.enumerator(url, data)\n uris = {}\n enum.each { |_k, hash, _i| uris[hash['value']] = true }\n # Return the list of URIs\n uris.keys\n end",
"def get_all_character_uris\n\t\t\tget_all_character_apis.map { |api| uri(api) }\n end",
"def parsed_region_ids(area_name = \"ship_area\")\n\t\t area_val = self.send(area_name)\n\t\t region_id =area_val.split(\":\").last if area_val\n\t\t return [nil,nil,nil] if region_id.blank? || self.new_record?\n\t\t region = Ecstore::Region.find_by_region_id(region_id)\n\t\t region.region_path.split(',').select{ |x| x.present? }\n\t \tend",
"def extract_uris(uri, uri_content)\n # in our case, no new uri can be extracted from a web resource\n return Array.new()\n end",
"def ead_id\n URI.parse(self.collection_uri).path.split(\"/\").last unless self.collection_uri.nil?\n end",
"def set_uri_seeds(value)\n @uri_seeds = value\n end",
"def valid_identifiers?(value)\n ids = PublicationIdentifier.objects(value)\n ids.present? && ids.all? { |id| id&.valid? }\n end",
"def cannonical_uri_string\n @cannonical_uri_string ||= if resource_collection_uri?\n \"#{@string}/#{UUID.generate}\"\n elsif resource_uri?\n @string\n else\n raise CloudKit::InvalidURIFormat\n end\n end",
"def autocomplete_known_uri_metadata\n lookup_predicate\n if params[:term].strip.blank?\n @known_uris = KnownUri.metadata.select{ |ku| ku.visible? }\n else\n @known_uris = search_known_uris_by_name_or_uri(params[:term])\n @known_uris.delete_if{ |ku| ku.uri_type_id != UriType.metadata.id }\n end\n if @predicate && @predicate.has_units?\n @known_uris.delete(KnownUri.unit_of_measure)\n end\n render_autocomplete_results\n end",
"def identifiers\n {'issn' => @issn, 'eissn' => @eissn, 'isbn' => @isbn, 'eisbn' => @eisbn, 'oclc' => @oclc, 'lccn' => @lccn, 'doi' => @doi,\n 'svc_specific_id_1' => @svc_specific_id_1, 'svc_specific_id_2' => @svc_specific_id_2, 'svc_specific_id_3' => @svc_specific_id_3}\n end",
"def share_point_ids=(value)\n @share_point_ids = value\n end",
"def sharepoint_ids\n return @sharepoint_ids\n end",
"def uri\n \"#{@@config[:base_uri]}#{id}\"\n end",
"def endpoints\n EndpointRegistry[id]\n end",
"def get_language_uri(language_codes)\n language_codes.map{|e| LanguagesService.label(\"http://id.loc.gov/vocabulary/iso639-2/#{e.downcase}\") ?\n \"http://id.loc.gov/vocabulary/iso639-2/#{e.downcase}\" : e}\n end",
"def datastore_ids\n array = Array.new\n\n self.each(\"DATASTORES/ID\") do |id|\n array << id.text.to_i\n end\n\n return array\n end",
"def requester_ids\n @requester_ids ||= []\n end",
"def identifiers_from_params(params_in:)\n # params_in = params_in.to_h.with_indifferent_access\n return [] unless params_in[:org_id].present? &&\n params_in[:org_id].is_a?(String)\n\n hash = org_hash_from_params(params_in: params_in)\n return [] unless hash.present?\n\n OrgSelection::HashToOrgService.to_identifiers(hash: hash)\n end",
"def filtering_ids\n return nil unless current_user\n\n return @filtering_ids if @filtering_ids\n\n @filtering_ids = Rails.cache.read cache_ids_key\n end",
"def client_application_tenant_ids\n return @client_application_tenant_ids\n end",
"def landmark_uri(set_uri, id)\n \"#{set_uri.to_s}/landmark/#{id}\"\n end",
"def path_ids\n @objects.map{|e| e.path_id}\n end"
] | [
"0.74827427",
"0.5640863",
"0.5552725",
"0.53139377",
"0.53011584",
"0.52753067",
"0.5272265",
"0.52344",
"0.52054876",
"0.5113959",
"0.50476176",
"0.49695092",
"0.49579987",
"0.49555147",
"0.49087068",
"0.49037763",
"0.4874877",
"0.48617846",
"0.48596185",
"0.4855374",
"0.48141626",
"0.48064157",
"0.47897872",
"0.47870094",
"0.47693527",
"0.47237676",
"0.47147024",
"0.4668036",
"0.46546966",
"0.46356797",
"0.46221054",
"0.46078283",
"0.45982644",
"0.45978647",
"0.45872065",
"0.45862246",
"0.45862246",
"0.45862246",
"0.45758617",
"0.4556783",
"0.45463812",
"0.45278868",
"0.45188874",
"0.45163438",
"0.4504397",
"0.44984087",
"0.4488015",
"0.44670984",
"0.44663975",
"0.44587618",
"0.44573233",
"0.445467",
"0.44470248",
"0.44456714",
"0.4439129",
"0.44298762",
"0.44271713",
"0.44169343",
"0.44134074",
"0.44120586",
"0.440881",
"0.44086152",
"0.44047323",
"0.43851992",
"0.4383503",
"0.43597457",
"0.4353054",
"0.43525732",
"0.43413177",
"0.4340336",
"0.4340336",
"0.43350312",
"0.43309903",
"0.43283156",
"0.43251637",
"0.4323672",
"0.43174237",
"0.43168294",
"0.43067947",
"0.4305417",
"0.42989084",
"0.42983532",
"0.42858726",
"0.42838287",
"0.42822382",
"0.42801404",
"0.4276754",
"0.4270648",
"0.42695642",
"0.42625025",
"0.42606542",
"0.42596367",
"0.42562738",
"0.42543757",
"0.42536733",
"0.42517802",
"0.42506596",
"0.42483908",
"0.42406568",
"0.42326403"
] | 0.7334208 | 1 |
Sets the identifierUris property value. Also known as App ID URI, this value is set when an application is used as a resource app. The identifierUris acts as the prefix for the scopes you'll reference in your API's code, and it must be globally unique. You can use the default value provided, which is in the form api://, or specify a more readable URI like For more information on valid identifierUris patterns and best practices, see Azure AD application registration security best practices. Not nullable. Supports $filter (eq, ne, ge, le, startsWith). | def identifier_uris=(value)
@identifier_uris = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def identifier_uris\n return @identifier_uris\n end",
"def redirectUris=(uris)\n self.redirect_url = uris.first\n end",
"def uri=(value)\n @uris << value\n end",
"def redirect_uris=(value)\n @redirect_uris = value\n end",
"def set_uri_seeds(value)\n @uri_seeds = value\n end",
"def redirect_uri=(uris)\n super(uris.is_a?(Array) ? uris.join(\"\\n\") : uris)\n end",
"def redirect_uri=(uris)\n super(uris.is_a?(Array) ? uris.join(\"\\n\") : uris)\n end",
"def redirect_uri=(uris)\n super(uris.is_a?(Array) ? uris.join(\"\\n\") : uris)\n end",
"def set_enclosures(enclosures = [])\n enclosureUris = []\n enclosures.each do |enclosure|\n enclosureUris.push(enclosure['uri']) if enclosure['uri'] || enclosure.retrieve!\n raise \"Resource #{enclosure['name']} could not be found!\" unless enclosure['uri']\n end\n\n raise 'EnclosureUris is empty!' if enclosureUris.empty?\n self['enclosureUris'] = enclosureUris unless enclosureUris.empty?\n end",
"def name_to_uris\n uri_set('networkUris', OneviewSDK::EthernetNetwork)\n uri_set('fcNetworkUris', OneviewSDK::FCNetwork)\n uri_set('fcoeNetworkUris', OneviewSDK::FCoENetwork)\n end",
"def selected_federation_uris=(selection)\n\n only_use(selection)\n\n end",
"def set_identifiers\n identifier.tap do |i|\n i.value = user.icn\n i.system = SYSTEM_ID\n i.type = identifier_type\n end\n end",
"def sharepoint_ids=(value)\n @sharepoint_ids = value\n end",
"def uri=(value)\n @uri = value\n end",
"def uri=(value)\n @uri = value\n end",
"def share_point_ids=(value)\n @share_point_ids = value\n end",
"def update!(**args)\n @uris = args[:uris] if args.key?(:uris)\n end",
"def update!(**args)\n @uris = args[:uris] if args.key?(:uris)\n end",
"def client_application_publisher_ids=(value)\n @client_application_publisher_ids = value\n end",
"def client_application_ids=(value)\n @client_application_ids = value\n end",
"def federation_uris\n\n ## All unique federations, making sure we include primary\n all_fed_uris = [primary_federation_uri].concat other_federation_uris \n \n return all_fed_uris.uniq\n \n end",
"def include_uris=(boolean)\n not_a_boolean_error(boolean)\n @include_uris = boolean\n end",
"def rebuild_id_uri\n self.id_uri = build_id_uri\n end",
"def set_rakuten_api_ids\n RakutenWebService.configure do |c|\n c.application_id = ENV[\"APPID\"]\n c.affiliate_id = ENV[\"AFID\"]\n end\n end",
"def find_ids(uris)\n uris.map { |uri| find_id(uri) }\n end",
"def quote_identifiers=(v)\n reset_default_dataset\n @quote_identifiers = v\n end",
"def image_uri_from_id= id\n self.image_uri = Image_URI % id\n end",
"def merge_uri_with! details\n resource_uri = convert_id_to_uri(@resource_id)\n details.merge! :resource_uri => resource_uri\n end",
"def identifier_list(*ids, separator: /\\s*,\\s*/, **)\n ids = ids.flat_map { |v| v.is_a?(String) ? v.strip.split(separator) : v }\n ids.map! { |v| v.is_a?(ApplicationRecord) ? v.id : v }\n ids.map! { |v| positive(v) || v }.compact_blank!\n end",
"def update!(**args)\n @access_uris = args[:access_uris] if args.key?(:access_uris)\n end",
"def process_uris(element, value, evaluation_context, base, **options)\n return [] if value.to_s.empty?\n add_debug(element) {\"process_uris: #{value}\"}\n value.to_s.split(/\\s+/).map {|v| process_uri(element, v, evaluation_context, base, **options)}.compact\n end",
"def initialize(collection)\n @identifiers = collection\n end",
"def landmark_uri(set_uri, id)\n \"#{set_uri.to_s}/landmark/#{id}\"\n end",
"def uri= new_uri\n @uri = self.class.build_uri new_uri\n end",
"def user_ids=(values)\n values ||= []\n values = [ values ] unless values.is_a?(::Array)\n values = values.reject{|v| v.blank?}.map{|v| v.to_i}\n self.users = Incline::User.where(id: values).to_a\n end",
"def uri\n @uri ||= select { |type,value| type == :uri }.map do |(type,value)|\n URI.parse(value)\n end\n end",
"def setAssociateDocumentIds(associateDocumentIds)\r\n\t\t\t\t\t@associateDocumentIds = associateDocumentIds\r\n\t\t\t\tend",
"def set_Residents(value)\n set_input(\"Residents\", value)\n end",
"def initialize(uris=DefaultFile)\n @domain_index ||= {}\n @name_hash ||= {}\n\n update(uris)\n end",
"def initialize()\n super\n @odata_type = \"#microsoft.graph.externalConnectors.itemIdResolver\"\n end",
"def authorization_uri= new_authorization_uri\n @authorization_uri = coerce_uri new_authorization_uri\n end",
"def identifier=(value)\n setId(value)\n end",
"def replace_scopes(*scopes)\n uris = ensure_and_get_uris(scopes.flatten)\n patch('replace', '/scopeUris', uris)\n end",
"def identity_providers=(value)\n @identity_providers = value\n end",
"def identity_providers=(value)\n @identity_providers = value\n end",
"def uri=(val)\n self.title = self.class.id_from_uri(val)\n if self.title\n self.title = self.title.titleize \n end\n self.uri_path = self.class.scope_from_uri(val)\n end",
"def data_uri=(uri)\n assign_data_uri(uri)\n @data_uri = uri\n end",
"def app_identifier=(value)\n @app_identifier = value\n end",
"def uri_id\n raise NotImplementedError.new('You must implement uri_id')\n end",
"def set_FileIDs(value)\n set_input(\"FileIDs\", value)\n end",
"def images=(ids = [])\n @image_ids = ids.reject(&:empty?).map(&:to_i).uniq\n end",
"def set_uri(base, path)\n @uri = \"#{base}/#{path}/#{self.identifier}\"\n end",
"def ids_setter(name, metadata)\n ids_method = \"#{name.to_s.singularize}_ids=\"\n re_define_method(ids_method) do |ids|\n send(metadata.setter, metadata.klass.find(ids.reject(&:blank?)))\n end\n self\n end",
"def set_uriy\n @uriy = Uriy.find(params[:id])\n end",
"def gen_atom_feed_uri_for(avalon_id)\n URI.parse(Rails.application.secrets[:avalon_url].gsub('other_identifier_sim:<identifier>&sort=timestamp+<order>&rows=<row_count>&page=<page_count>', \"id:#{avalon_id}\"))\n end",
"def affiliation_id=(affil_id)\n self.affiliation_ids = affil_id\n end",
"def client_application_tenant_ids=(value)\n @client_application_tenant_ids = value\n end",
"def join(*uris)\n uris[0] = convert_to_uri(uris[0])\n uris.inject :merge\n end",
"def join(*uris)\n uris[0] = convert_to_uri(uris[0])\n uris.inject :merge\n end",
"def autocomplete_known_uri_predicates\n @known_uris = search_known_uris_by_name_or_uri(params[:term])\n @known_uris.delete_if{ |ku| ku.uri_type_id != UriType.measurement.id || ! EOL::Sparql.connection.all_measurement_type_known_uris.include?(ku) }\n render_autocomplete_results\n end",
"def use_uri\n AICType.IntermediateFileSet\n end",
"def update(uris)\n [uris].flatten.each do |uri|\n deserialize_referer_data(read_referer_data(uri), File.extname(uri).downcase)\n end\n\n true\n end",
"def autocomplete_known_uri_values\n lookup_predicate\n if params[:term].blank? || params[:term].strip.blank?\n if @predicate && @predicate.has_values?\n @known_uris = @predicate.allowed_values.select{ |ku| ku.visible? }\n else\n @known_uris = []\n end\n else\n @known_uris = search_known_uris_by_name_or_uri(params[:term])\n if @predicate\n @known_uris.delete_if{ |ku| ! @predicate.allowed_values.include?(ku) }\n else\n @known_uris.delete_if{ |ku| ! ku.value? }\n end\n end\n render_autocomplete_results\n end",
"def set_Identifier(value)\n set_input(\"Identifier\", value)\n end",
"def with_identifier(value)\n value = [value] if value.class == String\n t = Identifier.arel_table\n a = t[:cached].eq_any(value)\n self.joins(:identifiers).where(a.to_sql).references(:identifiers)\n end",
"def api_uri=(api_uri)\n @api_uri = \"#{api_uri}/\" unless api_uri[api_uri.size - 1, 1] == '/'\n @api_uri\n end",
"def collection_uri\n super + uuid + '/'\n end",
"def expand_ids(*ids, **opt)\n opt[:min_id] ||= minimum_id\n opt[:max_id] ||= maximum_id\n # noinspection RubyMismatchedReturnType\n ids.flatten.flat_map { |id|\n id.is_a?(String) ? id.strip.split(/\\s*,\\s*/) : id\n }.flat_map { |id|\n expand_id_range(id, **opt) if id.present?\n }.compact.uniq\n end",
"def id=(ids)\n ids = ids.split(CompositePrimaryKeys::ID_SEP) if ids.is_a?(String)\n ids.flatten!\n unless ids.is_a?(Array) and ids.length == self.class.primary_keys.length\n raise \"#{self.class}.id= requires #{self.class.primary_keys.length} ids\"\n end\n [primary_keys, ids].transpose.each {|key, an_id| write_attribute(key , an_id)}\n id\n end",
"def uris\n uris = []\n if current_user.admin?\n uris = object.uris\n elsif current_user.lead?\n uris = object.uris.select { |uri| uri.vm.project.users.include?(current_user) }\n else\n uris = object.uris.select { |uri| uri.vm.user.id == current_user.id }\n end\n uris.map { |u| u.id }\n end",
"def initialize(*ids)\n @id = ids.join('-')\n end",
"def initialize(*ids)\n @id = ids.join('-')\n end",
"def uri=(uri)\n @uri = uri.to_s.dup.freeze\n update_uri_with_version\n end",
"def change_resource_assignments(add_resources: [], remove_resources: [])\n if !add_resources.empty? || !remove_resources.empty?\n ensure_uri && ensure_client\n add_uris = ensure_and_get_uris(add_resources)\n remove_uris = ensure_and_get_uris(remove_resources)\n body = []\n\n add_uris.each do |uri|\n body << { 'op' => 'add', 'path' => '/addedResourceUris/-', 'value' => uri }\n end\n body << { 'op' => 'replace', 'path' => '/removedResourceUris', 'value' => remove_uris }\n\n response = @client.rest_patch(@data['uri'], { 'Content-Type' => 'application/json-patch+json', 'body' => body }, @api_version)\n @client.response_handler(response)\n end\n self\n end",
"def identifiers\n @r.keys.select { |k| k.to_s.start_with? 'identifier__' }.map do |k|\n {\n scheme: k.to_s.sub('identifier__', ''),\n identifier: @r.delete(k),\n }\n end\n end",
"def value=(val)\n if identifier_scheme.present? &&\n identifier_scheme.identifier_prefix.present? &&\n val.to_s.strip.present? &&\n !val.to_s.start_with?(identifier_scheme.identifier_prefix) &&\n !val.to_s.start_with?('http')\n\n base = identifier_scheme.identifier_prefix\n base += '/' unless base.ends_with?('/')\n super(\"#{base}#{val.to_s.strip}\")\n else\n super(val)\n end\n end",
"def id=(ids)\r\n ids = ids.split(ID_SEP) if ids.is_a?(String)\r\n ids.flatten!\r\n unless ids.is_a?(Array) and ids.length == self.class.primary_keys.length\r\n raise \"#{self.class}.id= requires #{self.class.primary_keys.length} ids\"\r\n end\r\n [primary_keys, ids].transpose.each {|key, an_id| write_attribute(key , an_id)}\r\n id\r\n end",
"def set_Identifier(value)\n set_input(\"Identifier\", value)\n end",
"def selected_federation_uris\n\n return @selected_federation_uris || []\n\n end",
"def set_identifier\n @identifier = Identifier.find(params[:id])\n end",
"def set_identifier\n @identifier = Identifier.find(params[:id])\n end",
"def predicateUrl=(value)\n # SPEC CONFUSION: what's the point of having an array?\n table = self\n table = table.parent while table.parent && table.type != :Table\n self[:predicateUrl] = table && table.id ? table.id.join(value) : RDF::URI(value)\n end",
"def identity_resource_identifier=(value)\n @identity_resource_identifier = value\n end",
"def identifier_list(*ids, **opt)\n cid = current_id.presence\n ids = params.values_at(*id_param_keys) if ids.blank?\n super(ids, **opt).tap do |result|\n result.map! { |v| CURRENT_ID.casecmp?(v) ? cid : v } if cid\n end\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n hash = values.first.is_a?(Hash) ? values.first.with_indifferent_access : nil\n self.openid_identifier = hash[:openid_identifier] if !hash.nil? && hash.key?(:openid_identifier)\n end",
"def names_to_ids\n config['image_id'] = retrieve_image_id\n config['flavor_id'] = retrieve_flavor_id\n config['region_id'] = retrieve_region_id\n unless config['image_id'].nil? \\\n || config['flavor_id'].nil? \\\n || config['region_id'].nil?\n\n self.save\n end\n end",
"def redirect_uris\n return @redirect_uris\n end",
"def add_owner_ids(ids)\r\n return if ids.nil?\r\n \r\n ids = [ids] unless ids.respond_to?(:each)\r\n ids.each do | id |\r\n @request.OwnerIDList.Add(id)\r\n end\r\n end",
"def product_ids=(ids)\n self.products = Product.find(:all, :conditions => [\"id IN (?)\", ids.map(&:to_i)])\n end",
"def product_ids=(ids)\n self.products = Product.find(:all, :conditions => [\"id IN (?)\", ids.map(&:to_i)])\n end",
"def predicate=(uri)\n @predicate = nil\n raise ArgumentError, \"predicate must be a kind of RDF::URI\" unless uri.kind_of?(RDF::URI)\n self[:predicate] = @raptor_uri_list.push(V1_4.raptor_new_uri(uri.to_s)).last\n self[:predicate_type] = RAPTOR_IDENTIFIER_TYPE_RESOURCE\n @predicate = uri\n end",
"def identifiers_hash\n @identifiers_hash ||= {:default => [:uuid]}\n end",
"def uuids=(new_uuids)\n @mutex.synchronize do\n # Set the uuids of running gears\n @uuids = new_uuids\n # Delete any missing gears to free up memory\n @running_apps.select! { |k, v| new_uuids.include?(k) }\n end\n end",
"def setup_uri_path\n self.uri_path = self.class.scope_from_uri(self.uri)\n end",
"def owner_id_list(resource)\n id_list(resource, owner_request_ids)\n end",
"def identifier_value\n @value.map do |id|\n if /^https?\\:\\/\\//.match?(id)\n \"<a href='#{id}' alt='#{label}'>#{id}</a>\"\n else\n id\n end\n end\n end",
"def collection_id\n super.map { |url| URI(url).path.sub('/', '') }\n end",
"def board_manager_urls=(all_urls)\n set_pref(\"boardsmanager.additional.urls\", all_urls.join(\",\"))\n end",
"def cache(*uris)\n uris.each { |uri| @filter.insert(uri) }\n end",
"def aliases=(value)\n @aliases = value\n end"
] | [
"0.61139476",
"0.59235924",
"0.5873112",
"0.57712114",
"0.5642082",
"0.56270194",
"0.56270194",
"0.56270194",
"0.5300028",
"0.52131236",
"0.5184332",
"0.5056655",
"0.50495505",
"0.50135076",
"0.50135076",
"0.50131416",
"0.49948037",
"0.49948037",
"0.4951006",
"0.49433023",
"0.49156305",
"0.48857078",
"0.48756722",
"0.48712733",
"0.4860375",
"0.4802482",
"0.47818455",
"0.47791743",
"0.47565138",
"0.47244015",
"0.46912345",
"0.4678141",
"0.46494073",
"0.4641679",
"0.46414408",
"0.46257702",
"0.46219915",
"0.46012786",
"0.4595894",
"0.4590421",
"0.45876822",
"0.45488495",
"0.45379725",
"0.4536161",
"0.4536161",
"0.453138",
"0.4522999",
"0.45204952",
"0.4480893",
"0.44546556",
"0.44546092",
"0.44480273",
"0.444654",
"0.44366634",
"0.44347066",
"0.44336322",
"0.4432367",
"0.44320434",
"0.44320434",
"0.4407776",
"0.44044414",
"0.4402549",
"0.4395651",
"0.4389599",
"0.43855926",
"0.43830892",
"0.43767738",
"0.43764386",
"0.43764222",
"0.43671954",
"0.43399534",
"0.43399534",
"0.4339313",
"0.43380874",
"0.43297902",
"0.43184757",
"0.43140244",
"0.43040076",
"0.4300111",
"0.42921183",
"0.42921183",
"0.42910388",
"0.4290984",
"0.42887607",
"0.42836708",
"0.42759293",
"0.42684147",
"0.42546383",
"0.42491677",
"0.42491677",
"0.42455757",
"0.4241779",
"0.4240052",
"0.42379382",
"0.4235337",
"0.42237568",
"0.4222584",
"0.42197862",
"0.4219649",
"0.42137155"
] | 0.78332806 | 0 |
Gets the info property value. Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). | def info
return @info
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_profile_information\n # body = {\n # cmd: \"get_profile_information\"\n # }\n\n end",
"def user_info\n @user_info ||= raw_info.nil? ? {} : raw_info['query']['results'][\"profile\"]\n end",
"def raw_info\n @raw_info ||= begin\n access_token.options[:mode] = :query\n access_token.options[:param_name] = 'oauth_token'\n access_token.get('oauth/api/profile').parsed\n end\n end",
"def professional_info\n respond_with_entity(api.get('/api/v1/profile/professional_info'),\n NexaasID::Entities::Profile::ProfessionalInfo)\n end",
"def raw_info\n @raw_info ||= access_token.get('/api/me', :headers => {'Accept' => \"application/json; version=1\" }).parsed['payload']['users'].first || {}\n end",
"def raw_info\n @raw_info ||= JSON.parse(access_token.get(ENV['OAUTH_WEDDINGWIRE_PROFILE_URL']).body)\n rescue ::Errno::ETIMEDOUT\n raise ::Timeout::Error\n end",
"def profile_details\n # Since 15th September 2016 certificates and devices are hidden behind another request\n # see https://github.com/fastlane/fastlane/issues/6137 for more information\n @profile_details ||= client.provisioning_profile_details(provisioning_profile_id: self.id, mac: mac?)\n end",
"def profile\n @property[:profile]\n end",
"def inspect\n values = @properties.map{|k, v| \"#{k}: #{v}\"}.join(\" \")\n \"<Twilio.Oauth.V1.UserInfoInstance #{values}>\"\n end",
"def info()\n get(:session, {:method => \"user.getInfo\"})\n end",
"def raw_info\n @raw_info ||= JSON.load(access_token.get('v2/profile').body)\n rescue ::Errno::ETIMEDOUT\n raise ::Timeout::Error\n end",
"def raw_info\n @raw_info ||= JSON.load(access_token.get('v2/profile').body)\n rescue ::Errno::ETIMEDOUT\n raise ::Timeout::Error\n end",
"def raw_info\n @raw_info ||= access_token.get('/api/v1/me').parsed\n end",
"def account_info(*fields)\n get(\"/me#{field_selector(fields)}\")\n end",
"def user_info\n @user_info ||= raw_info.nil? ? {} : raw_info[\"person\"]\n end",
"def info\n oauth_response = access_token.get \"/api/v1/users/current.json\"\n JSON.parse(oauth_response.body)\n end",
"def info\n @info\n end",
"def details\r\n return @description + \": \" + \". \" + @basic_profile.details\r\n end",
"def info\n @info\n end",
"def info\n @info\n end",
"def show\n @personal_info = current_user.personal_info\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @personal_info }\n end\n end",
"def userinfo\n object.fetch(:userinfo) {\n @object[:userinfo] = (format_userinfo(\"\") if @object[:user])\n }\n end",
"def info\n {\n email: username\n }\n end",
"def extract_info_from_omniauth(omniauth)\n if omniauth.has_key?('extra') && omniauth['extra'].has_key?('user_hash')\n self.info = omniauth['user_info'].merge(omniauth['extra']['user_hash']).symbolize_keys\n else\n self.info = omniauth['user_info'].symbolize_keys\n end\n end",
"def account_info()\n response = @session.do_get build_url(\"/account/info\")\n parse_response(response)\n end",
"def profile\n return nil unless user_loa3\n\n mvi_response&.profile\n end",
"def info\n response = from_server \"api/info.json\"\n response.data\n end",
"def user_info\n auth_hash['user_info']\n end",
"def user_info\n @user_info ||= raw_info\n end",
"def info(refresh = false)\n return @info if @info and not refresh\n\n begin\n cache_info(nil) # reset existing info\n info = @api.get_account_info['user']\n cache_info(info)\n rescue Api::NotAuthorized, Api::InvalidInput\n nil\n end\n end",
"def inspect\n context = @solution.map{|k, v| \"#{k}: #{v}\"}.join(',')\n \"#<Twilio.Oauth.V1.UserInfoContext #{context}>\"\n end",
"def raw_info\n raw_info_url = \"https://kit.snapchat.com/v1/me?query=%7Bme%7BexternalId%2C+displayName%2C+bitmoji%7Bavatar%7D%7D%7D\"\n @raw_info ||= access_token.get(raw_info_url).parsed[\"data\"]\n end",
"def GetProfileData()\n uri = URI(API_URL + 'me')\n\n return PerformRestrictedGet(uri)\n end",
"def show\n response = OpenStruct.new({\n 'id': @current_user.account_uuid,\n 'type': 'mvi_models_mvi_profiles',\n 'gender': @current_user.gender_mpi,\n 'birth_date': @current_user.birth_date_mpi\n })\n handle_errors!(response)\n\n render json: response, serializer: PersonalInformationSerializer\n end",
"def profile\n @profile ||= GATEWAY.get_profile_details(self.profile_id) unless profile_id.nil?\n end",
"def user_info\n @user_info ||= raw_info.nil? ? {} : raw_info\n end",
"def user_info\n @user_info ||= raw_info.nil? ? {} : raw_info\n end",
"def get_profile\n \n profil =\n Excon.get(\n 'https://eastus.api.cognitive.microsoft.com/speaker/identification/v2.0/text-independent/profiles',\n headers: {\n 'Content-Type' => 'application/json',\n 'Ocp-Apim-Subscription-Key' => \"3c43bca9ad884fe39518a5cf3925e707\"\n },\n body: JSON.generate(\"locale\": 'en-us')\n )\n return profil.body\n parsed = JSON.parse(profil.body)\n return parsed['profiles']\n rescue Excon::Error => e\n puts \"Error: #{e}\"\n\n end",
"def get_profile\n\n # Auth\n token = auth\n\n # Get Client info based on fields provided\n client = LinkedIn::Client.new(API_KEY, API_SECRET, token)\n client.profile(:fields => @profile_fields)\n end",
"def me\n # Requires authorization\n raise PutioError::AuthorizationRequired if authentication_required!\n\n make_get_call('/account/info').info\n end",
"def info()\n _params = {}\n return @master.call 'users/info', _params\n end",
"def info(query=nil, options={})\n # options[:number] ||= options.delete(:phone) if options.has_key? :phone\n # options[:endpoint] ||= Mogreet.endpoint(\"user.info\")\n # options[:method] ||= \"user.info\" unless options.has_key? :endpoint\n method = \"user.info\"\n Mogreet::Response::Base.new Mogreet.get_response(method, query, options)\n end",
"def get_user_info\n get(\"/api/v1/oauth_user_info.json\")\n end",
"def get_acc_info\n JSON.parse(curl_get(\"/api2/account/info/\").body_str)\n end",
"def raw_info\n req = access_token.get('/API/v1.1/Rest/ConsoleService.svc/Console/Authentication/Info')\n @raw_info ||= MultiJson.load(req.body)\n end",
"def get_user_info user\n unless user.known_user.nil?\n known_user = user.known_user\n is_me = known_user.is_current_user || false\n return is_me ? \"people/me\" : known_user.person_name\n end\n get_one_of user\nend",
"def show\n user_info = self.info.show\n user_info[:organisation] = self.organisation\n user_info[:organisation_address] = self.organisation_address\n user_info\n end",
"def print_info(profile, options = nil)\n options ||= { :info => true }\n if options[:info]\n keys = [:name, :uuid, :app_id_name, :app_id_prefix, :creation_date, :expiration_date, :ttl, :team_ids, :team_name]\n keys.each do |key|\n @output.puts \"- #{key.to_s}: #{profile.send(key.to_sym)}\"\n end\n @output.puts \"- Entitlements:\"\n @output.puts profile.entitlements.to_s.split(\"\\n\").map { |line| \" #{line}\" }\n end\n\n if options[:info] || options[:certs] \n @output.puts \"- #{profile.developer_certificates.count} Developer Certificates\"\n profile.developer_certificates.each { |cert| @output.puts \" - #{cert.subject}\" } if options[:certs]\n end\n if options[:info] || options[:devices]\n @output.puts \"- #{(profile.provisioned_devices || []).count} Provisioned Devices\"\n profile.provisioned_devices.each { |udid| @output.puts \" - #{udid}\" } if options[:devices]\n @output.puts \"- Provision all devices: #{profile.provisions_all_devices.inspect}\"\n end\n end",
"def inportant_information\n RubyRedtail::Query.run(\"contacts/#{@id}/importantinfo\", @api_hash, \"GET\")\n end",
"def info\n request('getinfo')\n end",
"def show\n @profile = current_user.profile\n\n # ToDo: error message if no profile is found for user\n\n puts 'Got profile='\n pp @profile\n \n\n puts 'got other_names='\n pp @profile.other_names\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @profile }\n format.json { render :json => @profile }\n end\n \n end",
"def personal_profile\n RubyRedtail::Query.run(\"contacts/#{@id}/personalprofile\", @api_hash, \"GET\")\n end",
"def agent_details\n authenticate_request\n if @current_user && !@current_user.is_developer\n details = @current_user.details\n render json: details, status: 200\n end\n end",
"def show\n @personal_info = @user.personal_info\n @user = current_user.id\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @personal_info }\n end\n end",
"def raw_info\n if access_token\n @raw_info ||= ::JSON.parse(access_token.get('/api/v2/users/me').body)\n elsif signed_request\n @raw_info ||= decode(signed_request)\n end\n rescue ::Errno::ETIMEDOUT\n raise ::Timeout::Error\n end",
"def raw_info\n yql = \"select * from social.profile where guid='#{uid}'\"\n request = \"https://query.yahooapis.com/v1/yql?q=#{encode_uri_component(yql)}&format=json\"\n @raw_info ||= MultiJson.decode(access_token.get(request).body)\n rescue ::Errno::ETIMEDOUT\n raise ::Timeout::Error\n end",
"def info\n nil\n end",
"def info\n @info ||= {}\n end",
"def info() \n \treturn self.response.info()\n\tend",
"def get_current_application_information\n response = request(\n :oauth2_applications_me, nil,\n :get,\n \"oauth2/applications/@me\"\n )\n Rapture::OauthApplication.from_json(response.body)\n end",
"def print_info(profile, options = nil)\n options ||= { info: true }\n if options[:info]\n keys = MAIN_PROFILE_KEYS\n keys.each do |key|\n @output.puts \"- #{key}: #{profile.send(key.to_sym)}\"\n end\n @output.puts '- Entitlements:'\n @output.puts(profile.entitlements.to_s.split(\"\\n\").map { |line| \" #{line}\" })\n end\n\n # rubocop:disable Style/GuardClause\n if options[:info] || options[:certs]\n @output.puts \"- #{profile.developer_certificates.count} Developer Certificates\"\n if options[:certs]\n profile.developer_certificates.each do |cert|\n @output.puts \" - #{cert.subject}\"\n @output.puts \" issuer: #{cert.issuer}\"\n @output.puts \" serial: #{cert.serial}\"\n @output.puts \" expires: #{cert.not_after}\"\n end\n end\n end\n\n if options[:info] || options[:devices]\n @output.puts \"- #{(profile.provisioned_devices || []).count} Provisioned Devices\"\n profile.provisioned_devices.each { |udid| @output.puts \" - #{udid}\" } if options[:devices]\n @output.puts \"- Provision all devices: #{profile.provisions_all_devices.inspect}\"\n end\n # rubocop:enable Style/GuardClause\n end",
"def info\n get(\"/api-info\")\n end",
"def user_info\n response = from_server \"api/user.json\"\n response.data\n end",
"def appliance_info\n JSON.parse(RestClient::Resource.new(appliance_info_url).get.body)\n rescue RestClient::ResourceNotFound\n raise Conjur::FeatureNotAvailable.new('Your appliance does not support the /info URL needed by Conjur::API.appliance_info (you need 4.6 or later)')\n end",
"def raw_info\n # This is a public API and does not need signing or authentication\n request = \"/services/rest/?format=json&method=flickr.people.getInfo&nojsoncallback=1&user_id=#{uid}\"\n @raw_info ||= MultiJson.decode(access_token.get(request).body)\n rescue ::Errno::ETIMEDOUT\n raise ::Timeout::Error\n end",
"def developer_details\n authenticate_request('Developer')\n if @current_user && @current_user.is_developer\n details = @current_user.as_json\n details.delete(\"oauth_token\")\n details.delete(\"oauth_expires_at\")\n details.delete(\"password\")\n details.delete(\"password_digest\")\n search_params = { agent_id: @current_user.id } \n api = PropertySearchApi.new(filtered_params: search_params)\n api.modify_filtered_params\n api.apply_filters\n\n ### THIS LIMIT IS THE MAXIMUM. CAN BE BREACHED IN AN EXCEPTIONAL CASE\n #api.query[:size] = 10000\n udprns, status = api.fetch_udprns\n total_count = api.total_count\n details[:properties_count] = total_count\n first_agent = @current_user.branch.assigned_agents.unscope(where: :is_developer).where(is_developer: true).order('id asc').first\n details[:first_agent_invited_agents] = InvitedDeveloper.where(entity_id: first_agent.id).count\n details[:friends_family_count] = InvitedVendor.where(agent_id: @current_user.id).where(source: Vendor::INVITED_FROM_CONST[:family]).count\n render json: details, status: 200\n end\n end",
"def getProfile\n account = current_user.account\n if account.nil?\n render status: 400, json: {error: \"Invalid User\"}\n else\n if current_user.registered && (account.referral_code.nil? || account.referral_code.blank?)\n account.generate_referral_code\n end\n render status: 200, json: {username: current_user.username,\n email: current_user.email,\n firstName: current_user.first_name,\n lastName: current_user.last_name,\n company: current_user.company,\n balance: account.balance,\n registered: current_user.registered,\n referralCode: account.referral_code}\n end\n end",
"def profile\n check_auth :profile\n \n response = connection.post do |req|\n req.url '/user/profile'\n req.body = { :format => @format }\n end\n response.body[0]\n end",
"def get_info\r\n return @infoxml unless @infoxml.nil?\r\n \r\n response = Net::Flickr.instance().request('flickr.people.getInfo', 'user_id' => @id)\r\n \r\n return @infoxml = response.at('person')\r\n end",
"def information\n @information || grab_information_without_download\n end",
"def show\n @profile = Profile.find_by_user_id(current_user.id)\n \n @options = { units: \"metric\", APPID: '58d05a1cb6c05328945b2f9f3de5ff72' }\n #City id or name can be acquirred from a database, i did not\n #have time to do this but once done this is how it would retrieve weather\n @city_id = \"7778677\"\n #@data = OpenWeather::Current.city(\"Dublin, IE\", @options)\n @data = OpenWeather::Current.city_id(@city_id, @options)\n puts @data\n puts @data.keys\n\n @json = JSON.parse(@data.to_json)\n @temp = @json['main']['temp']\n @city = @json['name']\n @description = @json['weather'][0]['description']\n end",
"def get_profile\n begin\n client.profile(fields: PROFILE_FIELDS)\n rescue Exception => e\n logger.error \"Linkedin #get_profile error #{e}\"\n end\n end",
"def account_info(command)\n pp @client.users.info('me')\n end",
"def info\n @info ||= {}\n end",
"def to_s\n '<Twilio.Oauth.V1.UserInfoPage>'\n end",
"def _profile\n @link['profile']\n end",
"def inspect\n @info.inspect\n end",
"def inspect\n @info.inspect\n end",
"def profile; Profile.get(self.profile_id); end",
"def user_information\n { \"username\": @user.username, \"email\": @user.email, \"id\": @user.id }\n end",
"def profile\n raw = client.get @json['user']['links']['self']\n client.factory.create(GoodData::Profile, raw)\n end",
"def info\n return \"My name is #{@name}, I am #{@age} years old, and my callsign is #{@callsign}.\"\n end",
"def info\n kind = (params[:kind] || \"account,locations,offers,usage,messages\").split(/\\s*,\\s*/)\n \n info = {}\n\n # General account info\n if kind.include?(\"account\")\n info[:account] = {\n :domain => current_account.full_domain,\n :venue_name => current_account.venue_name, \n :venue_address => current_account.venue_address, \n :venue_type => current_account.venue_type, \n :venue_type_other => current_account.venue_type_other,\n :on_hold => current_account.on_hold\n }\n end\n \n # Offers\n if kind.include?(\"offers\")\n info[:offers] = current_account.offers.map do |o|\n { :id => o.id,\n :name => o.name,\n :text => o.text,\n :details => o.details }\n end\n end\n \n # Message format\n if kind.include?(\"messages\")\n info[:messages] = {\n :conf_message => current_account.conf_message,\n :conf_prepend_venue => current_account.conf_prepend_venue,\n :page_message => current_account.page_message,\n :page_prepend_venue => current_account.page_prepend_venue,\n :offer_id => current_account.offer_id\n }\n end\n \n if kind.include?(\"locations\")\n info[:locations] = current_account.locations.map do |l|\n { :id => l.id,\n :name => l.name,\n :internal_id => l.internal_id }\n end\n end\n \n if kind.include?(\"usage\")\n info[:usage] = usage_info\n end\n \n render :text => info.to_json\n end",
"def details\r\n return @description + \"; \" + @vPatients + \"; \" + @vProfiles + \": \" + @vAppointments\r\n end",
"def profile\n render_json 0,\"ok\",current_member.as_profile\n end",
"def info\n {\n account_id: @account_id,\n date_taken: @date_taken.iso8601,\n username: @user.nil? ? \"\" : @user.username,\n schema: @schema,\n state: @state,\n files: files\n }\n end",
"def info()\n return nil\n end",
"def full_name\n json[\"entry_data\"][\"ProfilePage\"].first[\"graphql\"][\"user\"][\"full_name\"]\n end",
"def get_info\n end",
"def get_info\n end",
"def get_info\n end",
"def info\n IbmCloudRest.get \"#{@uri}/\"\n end",
"def profile(token, secret)\n self.access_token = self.get_access_token(token, secret)\n req = self.access_token.request(:get, PAL_EPNTS['profile_url']+PAL_EPNTS['profile_fields'],{'x-li-format' => 'json','Content-Type'=>'application/json'})\n req.body\n end",
"def account_info(options = {})\n request :account, :get, 'account', options\n end",
"def display_name\n @json['profile']['displayName'] rescue nil\n end",
"def get_profile(connector, id, options={})\n brief = options.delete :brief || false\n json = connector.prepare_and_invoke_api_call(\n \"profiles/v1/providers/#{id}\" + (brief ? \"/brief\" : \"\"), :method=>:get)\n return self.new(json['profile'])\n end",
"def iam_instance_profile\n data[:iam_instance_profile]\n end",
"def profile\n if @profile\n return @profile\n end\n\n @profile ||= begin\n h = profile_xml_to_hash(@catalog.search @route => @name )\n @new = false\n h\n rescue RestClient::ResourceNotFound\n # The resource is new\n @new = true\n {}\n end.freeze\n end",
"def show_short\n user_info = self.info.show_short\n user_info[:organisation] = self.organisation\n user_info[:organisation_address] = self.organisation_address\n user_info[:id] = self.id\n user_info\n end",
"def profile\n unless @profile\n if associated_profile\n @profile = Profile.new(associated_profile)\n else\n options = {:fields => 'user_id', :includes => 'Profile'}\n options = options.merge(:access_token => token, :access_secret => secret) if (token && secret)\n tmp = User.find(username, options)\n @profile = Profile.new(tmp.associated_profile)\n end\n end\n @profile\n end"
] | [
"0.69802237",
"0.6809005",
"0.64168686",
"0.6371553",
"0.63713014",
"0.63219273",
"0.62606686",
"0.62075883",
"0.6204312",
"0.61994845",
"0.61732024",
"0.61732024",
"0.6126729",
"0.6117835",
"0.6105153",
"0.6080017",
"0.6047333",
"0.60289705",
"0.60151327",
"0.60086083",
"0.59834146",
"0.5971593",
"0.5967796",
"0.5965582",
"0.5964766",
"0.59538275",
"0.5946943",
"0.59364325",
"0.59210455",
"0.589456",
"0.5892698",
"0.58759236",
"0.58578974",
"0.5855532",
"0.585243",
"0.58368415",
"0.58368415",
"0.58203673",
"0.58081657",
"0.5802784",
"0.57973635",
"0.57700396",
"0.5744252",
"0.57343316",
"0.57204044",
"0.5717855",
"0.57177854",
"0.5716996",
"0.56875473",
"0.5670545",
"0.56627357",
"0.56412417",
"0.562075",
"0.56046176",
"0.56043893",
"0.5588862",
"0.5587749",
"0.5581259",
"0.5579805",
"0.5554153",
"0.5552831",
"0.5549482",
"0.55440074",
"0.55381936",
"0.5537242",
"0.5525388",
"0.5513471",
"0.54887325",
"0.54849833",
"0.5484218",
"0.5484202",
"0.54831165",
"0.54787433",
"0.5471839",
"0.54672253",
"0.54614383",
"0.5461127",
"0.5461127",
"0.5455731",
"0.5455036",
"0.5452943",
"0.54445803",
"0.5444502",
"0.54412866",
"0.5436226",
"0.5421128",
"0.54176533",
"0.5416619",
"0.54078394",
"0.54078394",
"0.54078394",
"0.5403049",
"0.5397122",
"0.53780633",
"0.5377103",
"0.53615695",
"0.53566474",
"0.53538144",
"0.5348923",
"0.5347885"
] | 0.5951843 | 26 |
Sets the info property value. Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). | def info=(value)
@info = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def info=(info)\n if info.nil?\n fail ArgumentError, 'invalid value for \"info\", info cannot be nil.'\n end\n @info = info\n end",
"def update_account_info(info)\n self.name = info['name']\n self.email = info['email']\n self.nickname = info['nickname']\n self.image = info['image']\n self.email = info['email']\n self.website = nil # Override to define\n end",
"def set_info\n @info = Info.first\n end",
"def update_profile_info\n info = provider_class.profile_info\n self.update_attributes(info)\n end",
"def set_info\n @info = Info.find(params[:id])\n end",
"def set_info\n @info = Info.find(params[:id])\n end",
"def set_info\n @info = Info.find(params[:id])\n end",
"def set_info\n @info = Info.find(params[:id])\n end",
"def user_info\n @user_info ||= raw_info.nil? ? {} : raw_info['query']['results'][\"profile\"]\n end",
"def info=(info)\n check_is_a!(info, ::Dopp::Section::Info)\n @attributes[:Info] = info.ref\n end",
"def info=(list)\n @info = list\n end",
"def update_info(uid, info)\n object(\"#{uid}.info\").put(body: info.to_json)\n end",
"def set_profiledetail\n @profiledetail = current_user.profiledetail\n end",
"def professional_info\n respond_with_entity(api.get('/api/v1/profile/professional_info'),\n NexaasID::Entities::Profile::ProfessionalInfo)\n end",
"def userinfo\n object.fetch(:userinfo) {\n @object[:userinfo] = (format_userinfo(\"\") if @object[:user])\n }\n end",
"def set_facebook_info omni\n info = omni['info']\n self.email = info['email']\n self.first_name = info['first_name']\n self.last_name = info['last_name']\n\n # Get the large size image. Omniauth returns 'square' by default and thats\n # too small to use.\n if info['image'].present?\n self.remote_profile_image_url = info['image'].gsub(\"square\", \"large\")\n end\n end",
"def get_profile_information\n # body = {\n # cmd: \"get_profile_information\"\n # }\n\n end",
"def userinfo=(userinfo)\n if userinfo.nil?\n return nil\n end\n check_userinfo(*userinfo)\n set_userinfo(*userinfo)\n # returns userinfo\n end",
"def set_owner_info\n property.owner_email = '[email protected]'\n country_info = {\n 'AU' => ['Australia', '1800 442586'],\n 'AT' => ['Austria', '0800 296669'],\n 'BE' => ['Belgium', '(+32) 03 808 09 54'],\n 'CA' => ['Canada', '1800 4045160'],\n 'DK' => ['Denmark', '8088 7970'],\n 'FR' => ['France', '0800 905 849'],\n 'DE' => ['Germany', '0800 1826013'],\n 'IE' => ['Ireland', '1800 552175'],\n 'IT' => ['Italy', '800 871005'],\n 'LU' => ['Luxembourg', '8002 6106'],\n 'NL' => ['Netherlands', '(+31) 088 202 12 12'],\n 'NO' => ['Norway', '800 19321'],\n 'PL' => ['Poland', '(+48) 22 3988048'],\n 'PT' => ['Portugal', '8008 31532'],\n 'ES' => ['Spain', '900 983103'],\n 'SE' => ['Sweden', '020 794849'],\n 'CH' => ['Switzerland', '0800 561913'],\n 'GB' => ['United Kingdom', '0800 0516731'],\n 'US' => ['United States', '1 800 7197573']\n }\n info = meta_data['BasicInformationV3']\n if country_info.has_key?(info['Country'])\n property.owner_city, property.owner_phone_number = country_info[info['Country']]\n end\n end",
"def show\n user_info = self.info.show\n user_info[:organisation] = self.organisation\n user_info[:organisation_address] = self.organisation_address\n user_info\n end",
"def set_user_info\n @user_info = UserInfo.find(params[:id])\n end",
"def set_personal_info\n @personal_info = PersonalInfo.find_by(users_id: session[:user_id])\n end",
"def raw_info\n @raw_info ||= begin\n access_token.options[:mode] = :query\n access_token.options[:param_name] = 'oauth_token'\n access_token.get('oauth/api/profile').parsed\n end\n end",
"def extract_info_from_omniauth(omniauth)\n if omniauth.has_key?('extra') && omniauth['extra'].has_key?('user_hash')\n self.info = omniauth['user_info'].merge(omniauth['extra']['user_hash']).symbolize_keys\n else\n self.info = omniauth['user_info'].symbolize_keys\n end\n end",
"def user_info\n @user_info ||= raw_info.nil? ? {} : raw_info[\"person\"]\n end",
"def show\n response = OpenStruct.new({\n 'id': @current_user.account_uuid,\n 'type': 'mvi_models_mvi_profiles',\n 'gender': @current_user.gender_mpi,\n 'birth_date': @current_user.birth_date_mpi\n })\n handle_errors!(response)\n\n render json: response, serializer: PersonalInformationSerializer\n end",
"def inspect\n values = @properties.map{|k, v| \"#{k}: #{v}\"}.join(\" \")\n \"<Twilio.Oauth.V1.UserInfoInstance #{values}>\"\n end",
"def set_info_self_care\n @info_self_care = current_user.info_self_cares.find(params[:id])\n end",
"def user_info\n @user_info ||= raw_info\n end",
"def set_profile\n if params[:site_identifier]\n @profile = Profile.where(:site_identifier => params[:site_identifier]).first\n else\n @profile = Profile.find(params[:id])\n end\n\n if @profile.nil?\n headers['Content-Type'] = 'application/json; charset=utf-8'\n head :not_found and return false\n end\n end",
"def add_info(info)\n self.info.push info\n end",
"def information=(info)\n self[:information] = info.force_encoding('UTF-8')\n end",
"def show\n @personal_info = current_user.personal_info\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @personal_info }\n end\n end",
"def profile_details\n # Since 15th September 2016 certificates and devices are hidden behind another request\n # see https://github.com/fastlane/fastlane/issues/6137 for more information\n @profile_details ||= client.provisioning_profile_details(provisioning_profile_id: self.id, mac: mac?)\n end",
"def user_info\n @user_info ||= raw_info.nil? ? {} : raw_info\n end",
"def user_info\n @user_info ||= raw_info.nil? ? {} : raw_info\n end",
"def set_access_info(opts)\n opts = check_params(opts,[:access_info])\n super(opts)\n end",
"def set_profile\n @profile = current_user.profile\n end",
"def set_profile\n @profile = current_user.profile\n end",
"def set_profile\n @profile = current_user.profile\n end",
"def set_profile\n @profile = current_user.profile\n end",
"def set_information_personal\n @information_personal = InformationPersonal.find(params[:id])\n end",
"def update!(**args)\n @limited_profile_settings = args[:limited_profile_settings] if args.key?(:limited_profile_settings)\n @metadata = args[:metadata] if args.key?(:metadata)\n end",
"def set_profile\n if current_user.nil?\n redirect_to :home, notice: t( 'profiles.notice.pls_signon') \n else\n @person = Person.find( current_user.person_id )\n @user_id = current_user.id\n set_final_breadcrumb( action_name )\n end\n self.feature_help_file = :profile\n end",
"def set_profile\n\t\t@profile = current_user.profile\n\tend",
"def set_user_info\n @user_info = UserInfo.find(params[:id])\n authorize @user_info\n end",
"def raw_info\n @raw_info ||= access_token.get('/api/me', :headers => {'Accept' => \"application/json; version=1\" }).parsed['payload']['users'].first || {}\n end",
"def update_with_meetup(auth)\n self.name = auth[\"user_info\"][\"name\"]\n self.location = auth[\"user_info\"][\"location\"]\n self.image_url = auth[\"user_info\"][\"image\"]\n self.profile_url = auth[\"user_info\"][\"urls\"][\"profile\"]\n end",
"def update!(**args)\n @user_info = args[:user_info] if args.key?(:user_info)\n end",
"def set_userinfo\n @userinfo = Userinfo.find(params[:id])\n end",
"def set_personalinfo\n @personalinfo = Personalinfo.find(params[:id])\n end",
"def set_home_info\n @home_info = HomeInfo.find(params[:id])\n end",
"def info() @info = Info.new end",
"def set_profile\n if user_signed_in?\n @profile = Profile.find(current_user.profile.id)\n end\n end",
"def set_user_info\n @user_info = UserInfo.find_by_user_id(session[:user_id])\n if (@user_info == nil)\n @user_info = UserInfo.new(:user_id =>session[:user_id]).save\n end\n end",
"def set_name(info)\n # Do NOT override the value if it's returned from the CAS server\n return info['name'] if info['name']\n info['name'] = case options.name_format\n when :cn\n info['common_name']\n when :full_name\n info['full_name']\n when :first_last_name\n \"#{info['first_name']} #{info['last_name']}\"\n end\n info['name'] ||= info['common_name'] || info['full_name'] ||\n \"#{info['first_name']} #{info['last_name']}\"\n end",
"def set_connected_user_info(info)\n session[:sos_note_usr_info] = info\n end",
"def set_profile\n @profile = Profile.find_by(user_id: current_user.id)\n end",
"def set_user_personal_information\n @user_personal_information = User::PersonalInformation.find(params[:id])\n end",
"def set_profile\n @profile = current_owner.profile\n end",
"def set_twitter_info omni\n info = omni['info']\n \n # Get profile image from twitter. Remove _normal to return normal size\n # (weird, right?)\n if info['image'].present?\n self.remote_profile_image_url = info['image'].gsub(\"_normal\", \"\")\n end\n end",
"def cache_info(info)\n @info = info\n end",
"def update!(**args)\n @info = args[:info] if args.key?(:info)\n end",
"def set_information\n @information = Information.find(params[:id])\n end",
"def set_information\n @information = Information.find(params[:id])\n end",
"def set_information\n @information = Information.find(params[:id])\n end",
"def set_information\n @information = Information.find(params[:id])\n end",
"def set_information\n @information = Information.find(params[:id])\n end",
"def set_information\n @information = Information.find(params[:id])\n end",
"def set_information\n @information = Information.find(params[:id])\n end",
"def set_info\n @page_header = 'Insight Engine'\n @page_secondary = 'Let\\'s get a view at 10,000 feet.'\n @page_title = 'LeadAccount | Insight Engine'\n @page_icon = 'lightbulb'\n end",
"def update_user_info(opts)\n opts[:birthday] = format_date(opts[:birthday]) if opts[:birthday]\n post(\"/user/#{@user_id}/profile.json\", opts)\n end",
"def set_profile\n end",
"def inspect\n context = @solution.map{|k, v| \"#{k}: #{v}\"}.join(',')\n \"#<Twilio.Oauth.V1.UserInfoContext #{context}>\"\n end",
"def update_profile(options = {}) \n # query profile info\n response = HTTP.auth('Bearer ' + Asca::Tools::Token.new_token).get(URI_PROFILES, :params => { 'filter[name]' => options[:name] })\n if response.status.success?\n responseObj = JSON.parse(response.body)\n queried_profile_list = responseObj[\"data\"]\n if queried_profile_list.length() > 0\n profile = queried_profile_list[0]\n end\n else\n Asca::Tools::Log.error(response.body)\n return\n end\n \n if !profile\n Asca::Tools::Log.error(\"No profile named #{options[:name]} found\")\n return\n end\n # create new profile\n profile_type = profile[\"attributes\"][\"profileType\"]\n \n # get bundle id\n response = HTTP.auth('Bearer ' + Asca::Tools::Token.new_token).get(profile[\"relationships\"][\"bundleId\"][\"links\"][\"self\"])\n bundle_id = JSON.parse(response.body)[\"data\"][\"id\"]\n response = HTTP.auth('Bearer ' + Asca::Tools::Token.new_token).get(profile[\"relationships\"][\"certificates\"][\"links\"][\"self\"])\n certificate_ids = JSON.parse(response.body)[\"data\"].map { |cer| cer[\"id\"] }\n \n # get all device ids\n device_ids = Asca::REST::Provisioning::Devices.list_devices.map { |device|\n device[\"id\"]\n }\n \n # delete old prifile\n delete_profile :name => options[:name]\n \n if profile_type.include? 'APP_STORE'\n create_new_profile :name => options[:name], :type => profile_type, :bundle_id => bundle_id, :certificate_ids => certificate_ids\n else\n create_new_profile :name => options[:name], :type => profile_type, :bundle_id => bundle_id, :device_ids => device_ids, :certificate_ids => certificate_ids\n end\n \n return true\n end",
"def assign_twitter_account_info(auth)\n user = auth.extra.raw_info\n self.twitter_id = user.id\n self.name = user.name\n self.screen_name = user.screen_name\n self.location = user.location\n self.description = user.description\n self.url = user.url\n self.profile_image_url = user.profile_image_url_https\n self\n end",
"def update_info(uid, info)\n files_collection.update_one({filename: uid}, {\"$set\" => {metadata: info}})\n end",
"def update!(**args)\n @app_info = args[:app_info] if args.key?(:app_info)\n end",
"def info\n {\n email: username\n }\n end",
"def information_url=(value)\n @information_url = value\n end",
"def information_url=(value)\n @information_url = value\n end",
"def set_profile\n @profile = current_user.profiles.find(params[:id])\n end",
"def set_info_request\n @info_request = InfoRequest.find(params[:id])\n end",
"def show\n profile = Profile.where(\"account_id = ?\", @friend.friend_account_id).first\n \n # Copy details to friend attr_accessor\n @friend.first_name = profile.first_name\n @friend.last_name = profile.last_name\n @friend.photo = profile.photo\n end",
"def profile\n raw = client.get @json['user']['links']['self']\n client.factory.create(GoodData::Profile, raw)\n end",
"def inportant_information\n RubyRedtail::Query.run(\"contacts/#{@id}/importantinfo\", @api_hash, \"GET\")\n end",
"def edit_info(info)\n puts Paint[\"Editing the info about: #{publisher.namespace}\", :blue]\n\n listing = Google::Apis::AndroidpublisherV2::Listing.new\n listing.full_description = info['full_description']\n listing.short_description = info['short_description']\n listing.title = info['title']\n listing.language = info['language']\n\n publisher.edit_info(listing)\n\n puts Paint['Alterações realizadas :)', :green]\n end",
"def print_info(profile, options = nil)\n options ||= { :info => true }\n if options[:info]\n keys = [:name, :uuid, :app_id_name, :app_id_prefix, :creation_date, :expiration_date, :ttl, :team_ids, :team_name]\n keys.each do |key|\n @output.puts \"- #{key.to_s}: #{profile.send(key.to_sym)}\"\n end\n @output.puts \"- Entitlements:\"\n @output.puts profile.entitlements.to_s.split(\"\\n\").map { |line| \" #{line}\" }\n end\n\n if options[:info] || options[:certs] \n @output.puts \"- #{profile.developer_certificates.count} Developer Certificates\"\n profile.developer_certificates.each { |cert| @output.puts \" - #{cert.subject}\" } if options[:certs]\n end\n if options[:info] || options[:devices]\n @output.puts \"- #{(profile.provisioned_devices || []).count} Provisioned Devices\"\n profile.provisioned_devices.each { |udid| @output.puts \" - #{udid}\" } if options[:devices]\n @output.puts \"- Provision all devices: #{profile.provisions_all_devices.inspect}\"\n end\n end",
"def set_profile\n @profile = @user.profile\n end",
"def show\n @personal_info = @user.personal_info\n @user = current_user.id\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @personal_info }\n end\n end",
"def raw_info\n @raw_info ||= access_token.get('/api/v1/me').parsed\n end",
"def set_profile_detail\n @profile_detail = ProfileDetail.find(params[:id])\n end",
"def set_profile\n @profile = Profile.where(user_id: current_user).first\n end",
"def set_admin_profile\n @admin_profile = Profile.find(params[:id])\n @commonplace_id = City.find(session[:current_city_id]).commonplace.id\n @is_major = @admin_profile.is_major\n @name_alias = @is_major ? 'Sindaco' : 'Giunta Comunale'\n end",
"def set_profile\n if params[:id]\n # A particular person’s profile page\n # e.g. /users/5\n @profile = Profile.find_by!(user_id: params[:id])\n else\n # The signed in user’s profile page\n # /profile\n @profile = Profile.find_by(user: current_user)\n end\n end",
"def show_short\n user_info = self.info.show_short\n user_info[:organisation] = self.organisation\n user_info[:organisation_address] = self.organisation_address\n user_info[:id] = self.id\n user_info\n end",
"def set_profile\n @user = current_user\n @profile = @user.profile\n end",
"def userinfo_set(userinfo)\n rebuild_uri :userinfo => userinfo\n end",
"def personal_profile\n RubyRedtail::Query.run(\"contacts/#{@id}/personalprofile\", @api_hash, \"GET\")\n end",
"def set_professional_info\n @professional_info = ProfessionalInfo.find(params[:id])\n end"
] | [
"0.6367489",
"0.6210766",
"0.6066226",
"0.6020833",
"0.60146683",
"0.60146683",
"0.60146683",
"0.60146683",
"0.5906288",
"0.58989644",
"0.58420515",
"0.5826533",
"0.58156633",
"0.5767955",
"0.5758939",
"0.5733836",
"0.57319593",
"0.5699065",
"0.56985897",
"0.5642445",
"0.563152",
"0.55924577",
"0.55922556",
"0.5570899",
"0.55320793",
"0.55140144",
"0.550674",
"0.55044705",
"0.5501045",
"0.5462363",
"0.54578364",
"0.5449316",
"0.5445128",
"0.5420986",
"0.5410902",
"0.5410902",
"0.53794205",
"0.5365978",
"0.5365978",
"0.5365978",
"0.5365978",
"0.53641754",
"0.53567",
"0.53523326",
"0.5351007",
"0.53496754",
"0.5342309",
"0.53372985",
"0.5321635",
"0.5311103",
"0.5310453",
"0.5309876",
"0.5303471",
"0.5303069",
"0.5296683",
"0.5294571",
"0.52930766",
"0.5291254",
"0.52822334",
"0.5280733",
"0.5272073",
"0.5270266",
"0.5262409",
"0.5262259",
"0.5262259",
"0.5262259",
"0.5262259",
"0.5262259",
"0.5262259",
"0.5262259",
"0.52380073",
"0.5237398",
"0.52361745",
"0.52350134",
"0.52244467",
"0.5222872",
"0.5210948",
"0.520906",
"0.5207134",
"0.5205569",
"0.5205569",
"0.5203559",
"0.52024245",
"0.5201867",
"0.51982796",
"0.5197296",
"0.5197159",
"0.5195038",
"0.51868635",
"0.5166524",
"0.5162329",
"0.51604384",
"0.51598585",
"0.5157782",
"0.51552504",
"0.5150398",
"0.514864",
"0.5146525",
"0.51399356",
"0.5138394"
] | 0.672426 | 0 |
Gets the isDeviceOnlyAuthSupported property value. Specifies whether this application supports device authentication without a user. The default is false. | def is_device_only_auth_supported
return @is_device_only_auth_supported
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_device_only_auth_supported=(value)\n @is_device_only_auth_supported = value\n end",
"def device_threat_protection_enabled\n return @device_threat_protection_enabled\n end",
"def supports_device_licensing\n return @supports_device_licensing\n end",
"def device_sharing_allowed\n return @device_sharing_allowed\n end",
"def is_per_device_acceptance_required\n return @is_per_device_acceptance_required\n end",
"def authenticated?\n warden.user ? true : false\n end",
"def auth_enabled?\n if @auth_enabled.nil?\n @auth_enabled = begin\n basic_client.use(:admin).command(getCmdLineOpts: 1).first[\"argv\"].include?(\"--auth\")\n rescue => e\n e.message =~ /(not authorized)|(unauthorized)|(no users authenticated)|(requires authentication)/\n end\n end\n @auth_enabled\n end",
"def auth_enabled?\n if @auth_enabled.nil?\n @auth_enabled = begin\n basic_client.use(:admin).command(getCmdLineOpts: 1).first[\"argv\"].include?(\"--auth\")\n rescue => e\n e.message =~ /(not authorized)|(unauthorized)|(no users authenticated)|(requires authentication)/\n end\n end\n @auth_enabled\n end",
"def use_device_licensing\n return @use_device_licensing\n end",
"def authentication?\n APP_CONFIG[\"ldap\"][\"authentication\"] && APP_CONFIG[\"ldap\"][\"authentication\"][\"enabled\"]\n end",
"def kiosk_mode_allow_touchscreen\n return @kiosk_mode_allow_touchscreen\n end",
"def supports_device_licensing=(value)\n @supports_device_licensing = value\n end",
"def authentication?\n @capabilities and @capabilities.include? 'auth'\n end",
"def two_factor_auth_enabled?\n self.class.authlogic_ext_config[:two_factor_auth]\n end",
"def authentication?\n !!@authentication\n end",
"def device_allowed?(user_id, dev_id)\n data = DB[:Token].select(:DeviceID).where(UserID: user_id).all\n data.each do |item|\n return true if item[:DeviceID] == dev_id\n end\n false\n end",
"def auth?\n false\n end",
"def android_enabled\n return @android_enabled\n end",
"def disabled?\n @disabled ||= (user_configuration_from_key('disabled') || false)\n end",
"def disabled?\n @disabled ||= (user_configuration_from_key('disabled') || false)\n end",
"def is_legacy_auth_protocols_enabled\n return @is_legacy_auth_protocols_enabled\n end",
"def supports_user_licensing\n return @supports_user_licensing\n end",
"def storage_require_device_encryption\n return @storage_require_device_encryption\n end",
"def kiosk_mode_allow_screen_rotation\n return @kiosk_mode_allow_screen_rotation\n end",
"def authenticate?\n @api_options.has_key?(:authenticate?) ? @api_options[:authenticate?] : !Fleakr.token.blank?\n end",
"def ios_enabled\n return @ios_enabled\n end",
"def authenticate?\n @authentication_required\n end",
"def active_for_authentication? \n super && (self.is_disabled == 0)\n end",
"def authenticated?\n false\n end",
"def authenticated?\n @authenticated || false\n end",
"def has_physical_device\n return @has_physical_device\n end",
"def authenticated_user?\n warden.authenticated?\n end",
"def active_for_authentication?\n super && !disabled?\n end",
"def has_physical_device\n return @has_physical_device\n end",
"def active_for_authentication?\n super && !self.is_disabled\n end",
"def active_for_authentication?\n super and self.enabled?\n end",
"def is_office_phone_allowed\n return @is_office_phone_allowed\n end",
"def application_authenticated?\n !!application_authentication\n end",
"def active_for_authentication?\n super and !self.disabled?\n end",
"def use_device_context\n return @use_device_context\n end",
"def auth?\n true\n end",
"def device_locked?\n @bridge.device_locked?\n end",
"def has_auth?\n !current_person.nil?\n end",
"def active_for_authentication?\n super && !disabled?\n end",
"def active_for_authentication?\n super && self.enabled? && self.is_allowed_in?\n end",
"def check_authorization\n render json: { error: 'unauthorized: device has been terminated' }, status: :internal_server_error unless @device.disabled_at == nil\n end",
"def http_auth?\n if request.xhr?\n Devise.http_authenticatable_on_xhr\n else\n !(request_format && is_navigational_format?)\n end\n end",
"def active_for_authentication?\n super && !delete_flag?\n end",
"def user_authenticated?\n basic_authenticated? || token_authenticated?\n end",
"def has_otp_device?\n !yubico_identity.nil?\n end",
"def active_for_authentication?\n \tsuper && !delete_flag\n end",
"def authenticated?\n not @access_token.nil?\n end",
"def active_for_authentication?\n super && !disabled\n end",
"def is_permission_controlled\n return @is_permission_controlled\n end",
"def security_require_safety_net_attestation_certified_device\n return @security_require_safety_net_attestation_certified_device\n end",
"def kiosk_mode_require_voice_over\n return @kiosk_mode_require_voice_over\n end",
"def authenticated?\n authentication.values.all?\n end",
"def authenticated?\n authentication.values.all?\n end",
"def authenticated?\n authentication.values.all?\n end",
"def enable_ldap_auth?\r\n enable_ldap_auth.to_s.to_i != 0\r\n end",
"def application_guard_enabled\n return @application_guard_enabled\n end",
"def enabled?\n APP_CONFIG.enabled?(\"ldap\") && APP_CONFIG.enabled?(\"ldap.group_sync\")\n end",
"def resource_active_for_authentication?\n [email protected]_to?(:active_for_authentication?) || @resource.active_for_authentication?\n end",
"def token_authenticated?\n !!access_token\n end",
"def authenticated?\n\t\treturn @authenticated ? true : false\n\tend",
"def kiosk_mode_require_assistive_touch\n return @kiosk_mode_require_assistive_touch\n end",
"def enabled?\n @metadata.fetch(:enabled, true)\n end",
"def authenticated?\n @auth_token =~ /^.*$/\n end",
"def password_rotation_enabled\n return @password_rotation_enabled\n end",
"def active_for_authentication?\n super && !delete_flag\n end",
"def device_threat_protection_enabled=(value)\n @device_threat_protection_enabled = value\n end",
"def kiosk_mode_allow_voice_over_settings\n return @kiosk_mode_allow_voice_over_settings\n end",
"def media_bypass_enabled\n return @media_bypass_enabled\n end",
"def token_authenticated?\n !!@access_token\n end",
"def token_authenticated?\n !!@access_token\n end",
"def allowed_device_count\n return @allowed_device_count\n end",
"def authen_method_none?()\n return true if (@authen_method == TAC_PLUS_AUTHEN_METH_NONE)\n return false\n end",
"def ios_mobile_application_management_enabled\n return @ios_mobile_application_management_enabled\n end",
"def secure_boot_enabled\n return @secure_boot_enabled\n end",
"def authenticated?\n @access_token != nil and @access_token.length > 0\n end",
"def disabled?\n\t\t\tuserAccountControl.to_i & UAC_ACCOUNT_DISABLED != 0\n\t\tend",
"def session_enabled?\n @session_enabled\n end",
"def userauth_method_supported?(user, method)\n userauth_methods(user).include? method\n end",
"def enabled?\n cmd = \"osascript -e 'tell application \\\"System Events\\\" to get \" \\\n \"the name of the login item \\\"Fantastical 2\\\"' || true\"\n shell_out(cmd).stdout.strip.empty? ? false : true\n end",
"def skip_authentication?\n devise_controller? ||\n (%w[update_cart empty_cart terms_of_service]\n .include?(params[:action]) && !guests_disabled?)\n end",
"def active_for_authentication?\n super && !deleted_at && self.enabled?\n end",
"def device_threat_protection_required_security_level\n return @device_threat_protection_required_security_level\n end",
"def enabled?\n @enabled || false\n end",
"def application_authenticated?\n !!application_authentication\n end",
"def authenticated?\n doorkeeper_token.present? ? doorkeeper_authorize!.nil? : false\n end",
"def device?\n type == :device\n end",
"def device_sharing_allowed=(value)\n @device_sharing_allowed = value\n end",
"def android_mobile_application_management_enabled\n return @android_mobile_application_management_enabled\n end",
"def authen_method_enable?()\n return true if (@authen_method == TAC_PLUS_AUTHEN_METH_ENABLE)\n return false\n end",
"def token_authenticatable?\n mapping.to.http_authenticatable?(:token_options)\n end",
"def kiosk_mode_allow_assistive_touch_settings\n return @kiosk_mode_allow_assistive_touch_settings\n end",
"def webs_disabled?\n fw_sig_permission_level == Webs::PermissionLevel[:disabled].to_s\n end",
"def is_enabled\n return @is_enabled\n end",
"def is_enabled\n return @is_enabled\n end",
"def is_enabled\n return @is_enabled\n end"
] | [
"0.82091016",
"0.5794838",
"0.5704228",
"0.5637044",
"0.5500508",
"0.52928233",
"0.52656937",
"0.52656937",
"0.52483326",
"0.5235992",
"0.52298135",
"0.5204883",
"0.5185415",
"0.51731735",
"0.5142125",
"0.51267195",
"0.50930846",
"0.50804585",
"0.5058978",
"0.5052673",
"0.50450563",
"0.50284153",
"0.5016535",
"0.5007412",
"0.5006024",
"0.49987262",
"0.4987201",
"0.49767417",
"0.4972461",
"0.4959939",
"0.4950852",
"0.4945356",
"0.49450597",
"0.49376065",
"0.48929408",
"0.48903793",
"0.48770556",
"0.48753354",
"0.48669127",
"0.4849059",
"0.48457068",
"0.4834885",
"0.48203218",
"0.48143643",
"0.48107716",
"0.48051018",
"0.48049682",
"0.4802625",
"0.47984806",
"0.47966272",
"0.4795773",
"0.4795103",
"0.47949797",
"0.47828543",
"0.4781167",
"0.4779954",
"0.47756618",
"0.47756618",
"0.47756618",
"0.47632834",
"0.4763105",
"0.4758288",
"0.47582024",
"0.4751341",
"0.4747348",
"0.47457513",
"0.4743635",
"0.47433394",
"0.47393286",
"0.47246855",
"0.47186425",
"0.47119924",
"0.470617",
"0.47010484",
"0.47010484",
"0.4696993",
"0.46965724",
"0.4684855",
"0.4684135",
"0.46775943",
"0.4676522",
"0.46764097",
"0.46703973",
"0.46626356",
"0.46616516",
"0.4658023",
"0.46579295",
"0.4651594",
"0.46463698",
"0.46454465",
"0.46376246",
"0.4628206",
"0.46255141",
"0.46249315",
"0.4623934",
"0.46235988",
"0.46235368",
"0.46175402",
"0.46175402",
"0.46175402"
] | 0.85079896 | 0 |
Sets the isDeviceOnlyAuthSupported property value. Specifies whether this application supports device authentication without a user. The default is false. | def is_device_only_auth_supported=(value)
@is_device_only_auth_supported = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_device_only_auth_supported\n return @is_device_only_auth_supported\n end",
"def supports_device_licensing=(value)\n @supports_device_licensing = value\n end",
"def device_threat_protection_enabled=(value)\n @device_threat_protection_enabled = value\n end",
"def device_sharing_allowed=(value)\n @device_sharing_allowed = value\n end",
"def use_device_licensing=(value)\n @use_device_licensing = value\n end",
"def supports_user_licensing=(value)\n @supports_user_licensing = value\n end",
"def authenticated_as_user_device\n set_device_and_current_user\n redirect_to device_app_url unless @device and current_user\n end",
"def is_per_device_acceptance_required=(value)\n @is_per_device_acceptance_required = value\n end",
"def kiosk_mode_allow_touchscreen=(value)\n @kiosk_mode_allow_touchscreen = value\n end",
"def supports_device_licensing\n return @supports_device_licensing\n end",
"def kiosk_mode_require_assistive_touch=(value)\n @kiosk_mode_require_assistive_touch = value\n end",
"def is_legacy_auth_protocols_enabled=(value)\n @is_legacy_auth_protocols_enabled = value\n end",
"def security_require_safety_net_attestation_certified_device=(value)\n @security_require_safety_net_attestation_certified_device = value\n end",
"def device_sharing_allowed\n return @device_sharing_allowed\n end",
"def disable_app_encryption_if_device_encryption_is_enabled=(value)\n @disable_app_encryption_if_device_encryption_is_enabled = value\n end",
"def use_device_context=(value)\n @use_device_context = value\n end",
"def device_threat_protection_enabled\n return @device_threat_protection_enabled\n end",
"def use_device_licensing\n return @use_device_licensing\n end",
"def kiosk_mode_allow_screen_rotation=(value)\n @kiosk_mode_allow_screen_rotation = value\n end",
"def kiosk_mode_allow_assistive_touch_settings=(value)\n @kiosk_mode_allow_assistive_touch_settings = value\n end",
"def require_no_authentication\n assert_is_devise_resource!\n return unless is_navigational_format?\n no_input = devise_mapping.no_input_strategies\n\n authenticated = if no_input.present?\n args = no_input.dup.push :scope => resource_name\n warden.authenticate?(*args)\n else\n warden.authenticated?(resource_name)\n end\n\n if authenticated && warden.user(resource_name)\n render json: { \n success: false,\n error: \"You already logged as #{ current_user.email }\"\n }\n end\n end",
"def is_per_device_acceptance_required\n return @is_per_device_acceptance_required\n end",
"def require_no_authentication_or_app_jwt\n assert_is_devise_resource!\n return unless is_navigational_format?\n\n no_input = devise_mapping.no_input_strategies\n\n authenticated = if no_input.present?\n args = no_input.dup.push scope: resource_name\n warden.authenticate?( *args )\n else\n warden.authenticated?( resource_name )\n end\n\n if authenticated &&\n ( resource = warden.user( resource_name ) ) &&\n # This is the only different bit\n !resource&.anonymous?\n set_flash_message( :alert, \"already_authenticated\", scope: \"devise.failure\" )\n redirect_to after_sign_in_path_for( resource )\n end\n end",
"def media_bypass_enabled=(value)\n @media_bypass_enabled = value\n end",
"def device_allowed?(user_id, dev_id)\n data = DB[:Token].select(:DeviceID).where(UserID: user_id).all\n data.each do |item|\n return true if item[:DeviceID] == dev_id\n end\n false\n end",
"def require_no_authentication\n assert_is_devise_resource!\n return unless is_navigational_format?\n no_input = devise_mapping.no_input_strategies\n\n authenticated = if no_input.present?\n args = no_input.dup.push scope: resource_name\n warden.authenticate?(*args)\n else\n warden.authenticated?(resource_name)\n end\n\n if authenticated && resource = warden.user(resource_name)\n set_flash_message(:alert, 'already_authenticated', scope: 'devise.failure')\n redirect_to after_sign_in_path_for(resource)\n end\n end",
"def active_for_authentication? \n super && (self.is_disabled == 0)\n end",
"def kiosk_mode_allow_voice_over_settings=(value)\n @kiosk_mode_allow_voice_over_settings = value\n end",
"def check_authorization\n render json: { error: 'unauthorized: device has been terminated' }, status: :internal_server_error unless @device.disabled_at == nil\n end",
"def ios_enabled=(value)\n @ios_enabled = value\n end",
"def uninstall_on_device_removal=(value)\n @uninstall_on_device_removal = value\n end",
"def has_physical_device=(value)\n @has_physical_device = value\n end",
"def has_physical_device=(value)\n @has_physical_device = value\n end",
"def storage_require_device_encryption=(value)\n @storage_require_device_encryption = value\n end",
"def make_device_non_bootable=(make_device_non_bootable)\n validator = EnumAttributeValidator.new('String', [\"platform-default\", \"enabled\", \"disabled\"])\n unless validator.valid?(make_device_non_bootable)\n fail ArgumentError, \"invalid value for \\\"make_device_non_bootable\\\", must be one of #{validator.allowable_values}.\"\n end\n @make_device_non_bootable = make_device_non_bootable\n end",
"def active_for_authentication?\n super && !delete_flag\n end",
"def auth_enabled?\n if @auth_enabled.nil?\n @auth_enabled = begin\n basic_client.use(:admin).command(getCmdLineOpts: 1).first[\"argv\"].include?(\"--auth\")\n rescue => e\n e.message =~ /(not authorized)|(unauthorized)|(no users authenticated)|(requires authentication)/\n end\n end\n @auth_enabled\n end",
"def auth_enabled?\n if @auth_enabled.nil?\n @auth_enabled = begin\n basic_client.use(:admin).command(getCmdLineOpts: 1).first[\"argv\"].include?(\"--auth\")\n rescue => e\n e.message =~ /(not authorized)|(unauthorized)|(no users authenticated)|(requires authentication)/\n end\n end\n @auth_enabled\n end",
"def active_for_authentication?\n \tsuper && !delete_flag\n end",
"def authenticate?\n @api_options.has_key?(:authenticate?) ? @api_options[:authenticate?] : !Fleakr.token.blank?\n end",
"def kiosk_mode_require_voice_over=(value)\n @kiosk_mode_require_voice_over = value\n end",
"def active_for_authentication?\n super && !delete_flag?\n end",
"def android_enabled=(value)\n @android_enabled = value\n end",
"def applicable_device_types=(value)\n @applicable_device_types = value\n end",
"def active_for_authentication?\n super and !self.disabled?\n end",
"def auth?\n false\n end",
"def active_for_authentication?\n super && !self.is_disabled\n end",
"def no_digest_auth\n\n (not o(opts, :digest_authentication))\n end",
"def require_no_authentication\n assert_is_devise_resource!\n return unless is_navigational_format?\n no_input = devise_mapping.no_input_strategies\n\n authenticated = if no_input.present?\n args = no_input.dup.push scope: resource_name\n warden.authenticate?(*args)\n else\n warden.authenticated?(resource_name)\n end\n\n if authenticated && resource = warden.user(resource_name)\n p \"user already signed in: \", warden.user\n p \"params: #{params}\"\n flash[:alert] = I18n.t(\"devise.failure.already_authenticated\")\n end\n end",
"def kiosk_mode_allow_touchscreen\n return @kiosk_mode_allow_touchscreen\n end",
"def require_no_authentication\n require_no_authentication_or_app_jwt\n end",
"def kiosk_mode_require_assistive_touch\n return @kiosk_mode_require_assistive_touch\n end",
"def allowed_device_count=(value)\n @allowed_device_count = value\n end",
"def active_for_authentication?\n super && !disabled\n end",
"def active_for_authentication?\n super && !disabled?\n end",
"def is_usable_for_sign_in=(value)\n @is_usable_for_sign_in = value\n end",
"def validate_only=(value)\n @credential_handler.validate_only = value\n end",
"def active_for_authentication?\n super and self.enabled?\n end",
"def is_unmanaged_sync_app_for_tenant_restricted=(value)\n @is_unmanaged_sync_app_for_tenant_restricted = value\n end",
"def ios_mobile_application_management_enabled=(value)\n @ios_mobile_application_management_enabled = value\n end",
"def disable_authentication_controls(prepare_only=false)\n Rails.logger.debug(\" #{self.class.name}.#{__method__}(#{name}) Token=#{person_authentication_key}\")\n return self if prepare_only\n self.last_access = Time.zone.now\n delete_storage_object(person_authentication_key.to_sym)\n proxy_u.save!\n true\n end",
"def kiosk_mode_allow_assistive_touch_settings\n return @kiosk_mode_allow_assistive_touch_settings\n end",
"def is_office_phone_allowed=(value)\n @is_office_phone_allowed = value\n end",
"def set?\n @auth_default || @auth.any?\n end",
"def supports_user_licensing\n return @supports_user_licensing\n end",
"def kiosk_mode_allow_voice_over_settings\n return @kiosk_mode_allow_voice_over_settings\n end",
"def application_guard_enabled=(value)\n @application_guard_enabled = value\n end",
"def two_factor_auth_enabled?\n self.class.authlogic_ext_config[:two_factor_auth]\n end",
"def active_for_authentication?\n super && !disabled?\n end",
"def authen_method_none!()\n @authen_method = TAC_PLUS_AUTHEN_METH_NONE\n end",
"def is_mac_sync_app_enabled=(value)\n @is_mac_sync_app_enabled = value\n end",
"def userauth_method_supported?(user, method)\n userauth_methods(user).include? method\n end",
"def clear_device_orientation_override\n {\n method: \"DeviceOrientation.clearDeviceOrientationOverride\"\n }\n end",
"def kiosk_mode_allow_screen_rotation\n return @kiosk_mode_allow_screen_rotation\n end",
"def is_permission_controlled=(value)\n @is_permission_controlled = value\n end",
"def allowed_to_read_bitlocker_keys_for_owned_device=(value)\n @allowed_to_read_bitlocker_keys_for_owned_device = value\n end",
"def set_no_auth\n FHIR.logger.info 'Configuring the client to use no authentication.'\n @use_oauth2_auth = false\n @use_basic_auth = false\n @security_headers = {}\n @client = RestClient\n @client.proxy = proxy unless proxy.nil?\n @client\n end",
"def authen_method_none?()\n return true if (@authen_method == TAC_PLUS_AUTHEN_METH_NONE)\n return false\n end",
"def authenticated?\n false\n end",
"def disable_two_factor_authentication\n if current_user.otp_module_disabled!\n render json: {status: 200, message: \"Two factor authentication disabled successfully.\"}\n else\n render json: {status: 500, message: \"Error.\"}\n end\n end",
"def force_authn?\n force_authn == true\n end",
"def kiosk_mode_allow_ringer_switch=(value)\n @kiosk_mode_allow_ringer_switch = value\n end",
"def disable_app_encryption_if_device_encryption_is_enabled\n return @disable_app_encryption_if_device_encryption_is_enabled\n end",
"def microsoft_defender_for_endpoint_attach_enabled=(value)\n @microsoft_defender_for_endpoint_attach_enabled = value\n end",
"def user_enabled\n redirected = false\n if ((producer_signed_in? && current_producer.enabled == false) || (customer_signed_in? && current_customer.enabled==false)) && redirected == false\n redirected = true\n render 'producers/not_allowed'\n end\n false\n end",
"def password_rotation_enabled=(value)\n @password_rotation_enabled = value\n end",
"def require_no_authentication\n result = handle_crossdomain_devise\n super if result && result.action == :noop\n end",
"def set_touch_emulation_enabled(enabled:, max_touch_points: nil)\n {\n method: \"Emulation.setTouchEmulationEnabled\",\n params: { enabled: enabled, maxTouchPoints: max_touch_points }.compact\n }\n end",
"def secure_boot_enabled=(value)\n @secure_boot_enabled = value\n end",
"def disabled?\n @disabled ||= (user_configuration_from_key('disabled') || false)\n end",
"def set_touch_emulation_enabled(enabled:, configuration: nil)\n {\n method: \"Page.setTouchEmulationEnabled\",\n params: { enabled: enabled, configuration: configuration }.compact\n }\n end",
"def android_mobile_application_management_enabled=(value)\n @android_mobile_application_management_enabled = value\n end",
"def has_allowed_notifications\n if user_agent[\"iPhone\"] && !@current_user.device_token\n head status: 424\n end\n end",
"def skip_authentication?\n devise_controller? ||\n (%w[update_cart empty_cart terms_of_service]\n .include?(params[:action]) && !guests_disabled?)\n end",
"def authenticate?\n @authentication_required\n end",
"def active_for_authentication?\n super && self.enabled? && self.is_allowed_in?\n end",
"def disabled?\n @disabled ||= (user_configuration_from_key('disabled') || false)\n end",
"def security_require_safety_net_attestation_certified_device\n return @security_require_safety_net_attestation_certified_device\n end",
"def authentication?\n @capabilities and @capabilities.include? 'auth'\n end",
"def is_office_phone_allowed\n return @is_office_phone_allowed\n end"
] | [
"0.7534763",
"0.55774003",
"0.5065041",
"0.5044795",
"0.50420743",
"0.49137604",
"0.4900414",
"0.48477423",
"0.4697836",
"0.4681772",
"0.4673466",
"0.46607378",
"0.46447477",
"0.46379107",
"0.46277136",
"0.46119782",
"0.46113938",
"0.46104023",
"0.45974845",
"0.45503598",
"0.45491713",
"0.4494412",
"0.44939864",
"0.447372",
"0.44647026",
"0.4463665",
"0.4440629",
"0.44230095",
"0.44179872",
"0.44056788",
"0.4400337",
"0.4397996",
"0.4390664",
"0.43903953",
"0.43889746",
"0.43546233",
"0.43508974",
"0.43508974",
"0.434917",
"0.43431002",
"0.43345243",
"0.4332334",
"0.4318354",
"0.4318326",
"0.43077555",
"0.43030986",
"0.42914715",
"0.4285885",
"0.42810944",
"0.42809197",
"0.42757645",
"0.42659998",
"0.42586237",
"0.42464337",
"0.42460904",
"0.42425638",
"0.42425483",
"0.42320293",
"0.42302927",
"0.422598",
"0.4224594",
"0.42154557",
"0.42049614",
"0.42036265",
"0.41981012",
"0.41900077",
"0.41853347",
"0.41838396",
"0.418368",
"0.417926",
"0.41742635",
"0.41681108",
"0.41584727",
"0.41561052",
"0.41371047",
"0.41219902",
"0.4119942",
"0.41165394",
"0.411277",
"0.41070914",
"0.41024074",
"0.409987",
"0.40989742",
"0.4097148",
"0.40970477",
"0.40918487",
"0.40861917",
"0.40853563",
"0.40750444",
"0.40708676",
"0.40650025",
"0.40649208",
"0.4063641",
"0.4057059",
"0.4047764",
"0.40476036",
"0.40441874",
"0.40420938",
"0.4035407",
"0.40291497"
] | 0.85721374 | 0 |
Gets the isFallbackPublicClient property value. Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false which means the fallback application type is confidential client such as a web app. There are certain scenarios where Azure AD cannot determine the client application type. For example, the ROPC flow where it is configured without specifying a redirect URI. In those cases Azure AD interprets the application type based on the value of this property. | def is_fallback_public_client
return @is_fallback_public_client
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_fallback_public_client=(value)\n @is_fallback_public_client = value\n end",
"def known_client?(client_public_key)\n encoded_key = z85_encode(client_public_key)\n if @known_clients.empty?\n store_known_client(encoded_key)\n true\n else\n @known_clients.include?(encoded_key)\n end\n end",
"def public_client\n return @public_client\n end",
"def public_client=(value)\n @public_client = value\n end",
"def client?\r\n @connect_type == :client\r\n end",
"def preferred\n return !!@discovery_document['preferred']\n end",
"def is_client?\n client ? true : false\n end",
"def client?\n !!@client\n end",
"def client?\n !!@client\n end",
"def public?\n @public\n end",
"def client_applications_from_verified_publisher_only\n return @client_applications_from_verified_publisher_only\n end",
"def requested_public_url?\n request.env['PATH_INFO'].ends_with?('/desktop_client/version')\n end",
"def client_public_key\n return ENV[\"MCOLLECTIVE_SSL_PUBLIC\"] if ENV.include?(\"MCOLLECTIVE_SSL_PUBLIC\")\n\n raise(\"No plugin.ssl_client_public configuration option specified\") unless @config.pluginconf.include?(\"ssl_client_public\")\n\n return @config.pluginconf[\"ssl_client_public\"]\n end",
"def is_cloudfront?\n type.downcase == \"cloudfront\"\n end",
"def requires_client_authorization\n to_bool description['RequiresClientAuthorization']\n end",
"def client_app_types\n return @client_app_types\n end",
"def client?\n return @mode == :client\n end",
"def is_public?\n is_public == true && requires_login == false\n end",
"def public?\n return true unless @public_key.nil?\n \n load_public_key\n !@public_key.nil?\n end",
"def from_client?\n @origin == :client\n end",
"def client_applications_from_verified_publisher_only=(value)\n @client_applications_from_verified_publisher_only = value\n end",
"def public?\n !development_environments.include?(environment_name)\n end",
"def public?\n return true if @public_key\n \n load_public_key\n !@public_key.nil?\n end",
"def required_for_external?\n true\n end",
"def required_for_external?\n false\n end",
"def required_for_external?\n false\n end",
"def required_for_external?\n false\n end",
"def public?\n !foreign? && !facility_code.nil? && facility_code[0] == \"1\"\n end",
"def fallback_primary_approvers\n return @fallback_primary_approvers\n end",
"def external?\n @external\n end",
"def native_client?(type)\n if @native_clients[type]\n return @native_clients[type]\n end\n @native_clients[type] = create_native_client(type, @connection_opts)\n end",
"def on_client?\n @render_on != :server_only\n end",
"def known_client_applications\n return @known_client_applications\n end",
"def known_client_applications=(value)\n @known_client_applications = value\n end",
"def is_cloudfront_alias?\n !@alias_target.nil? and @alias_target.is_cloudfront?\n end",
"def public?\n self.mode == PUBLIC\n end",
"def frontend?\n self.display_on != \"back_end\" && !none?\n end",
"def fallback_primary_approvers=(value)\n @fallback_primary_approvers = value\n end",
"def is_ms_client?\n [%r{microsoft-webdav}i, %r{microsoft office}i].any? do |regexp| \n (request.respond_to?(:user_agent) ? request.user_agent : request.env['HTTP_USER_AGENT']).to_s =~ regexp\n end\n end",
"def has_public_profile?\n is_visible? && (show_profile == Visibility::PUBLIC)\n end",
"def frontend?\n self.display_on != \"back_end\"\n end",
"def client?() false; end",
"def primary?\n @type == \"primary\"\n end",
"def public?\n self.privacy == PUBLIC\n end",
"def is_public?\n @status == \"public\"\n end",
"def is_public?\n @status == \"public\"\n end",
"def is_client_manager_property\n 'is_client_manager'\n end",
"def preferred_representation?\n InboundRelationships.new(self).preferred_representation.present?\n end",
"def site_enable?\n self[:type] == \"CompanyZ\" && !self.layout.architecture_type.nil?\n end",
"def public?\n parsed {\n @status == 'Public'\n }\n end",
"def on_azure?\n azure != nil\n end",
"def on_azure?\n azure != nil\n end",
"def public_https_enabled?\n get('beef.http.public.https') || false\n end",
"def public?\n !private?\n end",
"def client_active?\n @automation_client\n end",
"def has_deaf_client?\n !self.deaf_client.nil?\n end",
"def public?\n status == Status::PUBLIC\n end",
"def public\n (cloud.nil? ? nil : cloud.public)\n end",
"def is_public?\n self.is_public\n end",
"def is_user_owner_client_app\n get(\"/api/v1/oauth_is_user_owner_client_app.json\")\n end",
"def client_verified?\n @client = client_class.find_by_consumer_key(request.consumer_key)\n request.verify_signature(@client)\n end",
"def public_requested?\r\n return (self.public_status == PUBLIC_STATUS_REQUESTED) ? true : false\r\n end",
"def application_authenticated?\n !!(@client_id && @client_secret)\n end",
"def public_user?\n \tcurrent_user.username.eql? \"public_user\"\n end",
"def client?\n roles.count == 1 && has_role?('client')\n end",
"def internal_site?\n Site::RESERVED.include? site_subdomain\n end",
"def client_app_types=(value)\n @client_app_types = value\n end",
"def valid_client?(request)\n (request.env[\"HTTP_X_FORWARDED_FOR\"] == \"127.0.0.1\") ||\n (request.env[\"HTTP_X_CLIENT_IDENTIFIER\"] == \"<< Client Identifier Here >>\") &&\n (request.env[\"HTTP_X_CLIENT_SECRET_KEY\"] == \"<< Secret Token Here >>\")\n end",
"def is_public?\n true\n end",
"def external?\n !internal?\n end",
"def preferred?\n self.preferred\n end",
"def public?\n !self.public_folders.empty?\n end",
"def client_application\n @client_application ||= new_client_application\n end",
"def public_is_false\n return if public_domain.present?\n self.public_domain = false\n true\n end",
"def public_is_false\n return if public_domain.present?\n self.public_domain = false\n true\n end",
"def root_public?\n self.root.public?\n end",
"def default_tenancy?\n @vpc.instance_tenancy == 'default'\n end",
"def public?\n Imgrb::PngMethods::chunk_type_public?(type)\n end",
"def public?\n Imgrb::PngMethods::chunk_type_public?(type)\n end",
"def is_master?\n client = RestClient.where(:api_key =>@api_key).first\n return false if client.nil?\n client.is_master\n end",
"def is_preferred\n attributes.fetch(:isPreferred)\n end",
"def public?\r\n is_live and !priv? and !draft?\r\n end",
"def use_ms_compat_creationdate?\n if(@options[:compat_ms_mangled_creationdate] || @options[:compat_all])\n is_ms_client?\n end\n end",
"def universal_visibility?\n self.visibility == :universal\n end",
"def is_externally_visible\n return @is_externally_visible\n end",
"def client?\n role == 'client'\n end",
"def client_applications\n return @client_applications\n end",
"def client?\n return (server == false)\n end",
"def app_type\n @app_type || @detected_app_type\n end",
"def server?\r\n @connect_type == :server\r\n end",
"def external?\n !internal?\n end",
"def open_to_public?\n allow_external_students? || allow_external_volunteers?\n end",
"def webs_sitebuilder?\n fw_sig_is_admin == '1'\n end",
"def is_primary?\n !is_regional?\n end",
"def is_publicly_visible?\n return false if visibility.nil?\n return( visibility == Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC )\n end",
"def with_public_ip_on_launch?\n @subnet.map_public_ip_on_launch\n end",
"def firewall_profile_public\n return @firewall_profile_public\n end",
"def is_hybrid?\n false\n end",
"def fallbacks?\n return true if options[:fallbacks].nil?\n !!options[:fallbacks]\n end",
"def requires_master?\n return app_type unless item_class.respond_to?(:no_master_association)\n\n app_type && !item_class.no_master_association\n end"
] | [
"0.78852165",
"0.5916438",
"0.5819653",
"0.5703212",
"0.5690255",
"0.56710577",
"0.559365",
"0.54416186",
"0.54416186",
"0.5393162",
"0.5381004",
"0.5342113",
"0.53158593",
"0.5306093",
"0.52745324",
"0.52589536",
"0.5236056",
"0.52211154",
"0.51847464",
"0.51534474",
"0.50998664",
"0.50885326",
"0.50856906",
"0.50849044",
"0.505934",
"0.505934",
"0.505934",
"0.50345546",
"0.5018082",
"0.50137997",
"0.50026447",
"0.49819684",
"0.49726456",
"0.49520624",
"0.49204153",
"0.4907399",
"0.4905228",
"0.4904656",
"0.49009883",
"0.48960167",
"0.48935178",
"0.48754564",
"0.48646373",
"0.48589015",
"0.48570913",
"0.48570913",
"0.4855631",
"0.4854937",
"0.48332",
"0.48259702",
"0.48243076",
"0.48243076",
"0.48160404",
"0.48134238",
"0.48055997",
"0.47823006",
"0.47781786",
"0.4772382",
"0.47708774",
"0.47692904",
"0.47573853",
"0.47560823",
"0.47319013",
"0.47220835",
"0.47155276",
"0.47141594",
"0.46875864",
"0.46799043",
"0.46761665",
"0.4668716",
"0.46592695",
"0.46568537",
"0.46497878",
"0.46429965",
"0.46429965",
"0.46429962",
"0.4629558",
"0.4629428",
"0.4629428",
"0.46233022",
"0.46161023",
"0.46150422",
"0.46129128",
"0.46072474",
"0.46037826",
"0.4597084",
"0.45941275",
"0.4591816",
"0.458744",
"0.45820203",
"0.45814186",
"0.45641878",
"0.45501375",
"0.45484185",
"0.4543761",
"0.45431414",
"0.45338115",
"0.45277834",
"0.45205647",
"0.45108742"
] | 0.80042475 | 0 |
Sets the isFallbackPublicClient property value. Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false which means the fallback application type is confidential client such as a web app. There are certain scenarios where Azure AD cannot determine the client application type. For example, the ROPC flow where it is configured without specifying a redirect URI. In those cases Azure AD interprets the application type based on the value of this property. | def is_fallback_public_client=(value)
@is_fallback_public_client = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_fallback_public_client\n return @is_fallback_public_client\n end",
"def public_client=(value)\n @public_client = value\n end",
"def known_client?(client_public_key)\n encoded_key = z85_encode(client_public_key)\n if @known_clients.empty?\n store_known_client(encoded_key)\n true\n else\n @known_clients.include?(encoded_key)\n end\n end",
"def fallback_primary_approvers=(value)\n @fallback_primary_approvers = value\n end",
"def client_applications_from_verified_publisher_only=(value)\n @client_applications_from_verified_publisher_only = value\n end",
"def set_IsPublic(value)\n set_input(\"IsPublic\", value)\n end",
"def set_IsPublic(value)\n set_input(\"IsPublic\", value)\n end",
"def public_client\n return @public_client\n end",
"def known_client_applications=(value)\n @known_client_applications = value\n end",
"def default_client=(client)\n @default_client = get_client(client)\n end",
"def is_client?\n client ? true : false\n end",
"def preferred\n return !!@discovery_document['preferred']\n end",
"def requires_client_authorization\n to_bool description['RequiresClientAuthorization']\n end",
"def client_app_types=(value)\n @client_app_types = value\n end",
"def setApiClient(client)\n\t\t\t@api_client = client\n\t\tend",
"def client?\r\n @connect_type == :client\r\n end",
"def public?\n @public\n end",
"def required_for_external?\n false\n end",
"def required_for_external?\n false\n end",
"def required_for_external?\n false\n end",
"def is_public?\n is_public == true && requires_login == false\n end",
"def required_for_external?\n true\n end",
"def native_client?(type)\n if @native_clients[type]\n return @native_clients[type]\n end\n @native_clients[type] = create_native_client(type, @connection_opts)\n end",
"def client_applications=(value)\n @client_applications = value\n end",
"def is_cloudfront?\n type.downcase == \"cloudfront\"\n end",
"def firewall_profile_public=(value)\n @firewall_profile_public = value\n end",
"def client_public_key\n return ENV[\"MCOLLECTIVE_SSL_PUBLIC\"] if ENV.include?(\"MCOLLECTIVE_SSL_PUBLIC\")\n\n raise(\"No plugin.ssl_client_public configuration option specified\") unless @config.pluginconf.include?(\"ssl_client_public\")\n\n return @config.pluginconf[\"ssl_client_public\"]\n end",
"def client?\n !!@client\n end",
"def client?\n !!@client\n end",
"def set_client(client_data)\n @client = CompanyApi::Response::Entity::Client.new(client_data)\n end",
"def public?\n return true unless @public_key.nil?\n \n load_public_key\n !@public_key.nil?\n end",
"def set_clients_setting\n @clients = current_client\n end",
"def setAsAdmin\n self.clientType = CLIENT_TYPES[:administrator]\n end",
"def public_is_false\n return if public_domain.present?\n self.public_domain = false\n true\n end",
"def public_is_false\n return if public_domain.present?\n self.public_domain = false\n true\n end",
"def client_applications_from_verified_publisher_only\n return @client_applications_from_verified_publisher_only\n end",
"def fallback_primary_approvers\n return @fallback_primary_approvers\n end",
"def rest_client=(value)\n raise Amfetamine::ConfigurationInvalid, 'Invalid value for rest_client' if ![:get,:put,:delete,:post].all? { |m| value.respond_to?(m) }\n @rest_client = value\n end",
"def set_or_create_clients(options)\n client = options[:client]\n @key_vault_client = if options[:key_vault_client]\n options[:key_vault_client]\n elsif client.options[:max_pool_size] == 0\n client\n else\n internal_client(client)\n end\n\n @metadata_client = if options[:bypass_auto_encryption]\n nil\n elsif client.options[:max_pool_size] == 0\n client\n else\n internal_client(client)\n end\n end",
"def public?\n !foreign? && !facility_code.nil? && facility_code[0] == \"1\"\n end",
"def requested_public_url?\n request.env['PATH_INFO'].ends_with?('/desktop_client/version')\n end",
"def public?\n return true if @public_key\n \n load_public_key\n !@public_key.nil?\n end",
"def set_default_external!(options)\n options.reverse_merge!('external' => !current_controller.request.xhr?)\n end",
"def from_client?\n @origin == :client\n end",
"def initialize(client = nil, preview: false)\n super()\n @client = client\n @preview = preview\n end",
"def client_application\n @client_application ||= new_client_application\n end",
"def is_cloudfront_alias?\n !@alias_target.nil? and @alias_target.is_cloudfront?\n end",
"def set_homepage_type\n @homepage_type = \"default\"\n end",
"def use_ms_compat_creationdate?\n if(@options[:compat_ms_mangled_creationdate] || @options[:compat_all])\n is_ms_client?\n end\n end",
"def is_externally_visible=(value)\n @is_externally_visible = value\n end",
"def set_client\n @client = Client.find(params[:client_id]) if params[:client_id].present?\n end",
"def client_configuration=(value)\n @client_configuration = value\n end",
"def on_client?\n @render_on != :server_only\n end",
"def set_client_application\n @client_application = ClientApplication.find(params[:id])\n end",
"def set_client\n @client = Client.find(current_user.client_id)\n end",
"def set_client\n if current_user.try(:admin?)\n @client = Client.friendly.find(params[:id])\n else\n @client = current_user.clients.first\n end\n end",
"def public?\n !development_environments.include?(environment_name)\n end",
"def ensure_external_not_nil\n if external.nil?\n self.external = false\n end\n end",
"def fallback_url=(value)\n @fallback_url = value\n end",
"def with_public_ip_on_launch?\n @subnet.map_public_ip_on_launch\n end",
"def open_to_public?\n allow_external_students? || allow_external_volunteers?\n end",
"def set_client\n @client = Auth::Client.find(params[:id])\n if @client.nil?\n puts \"--------------COULD NOT FIND A CLIENT------------------\"\n render :nothing => true, :status => 404\n else\n return\n end\n end",
"def frontend?\n self.display_on != \"back_end\" && !none?\n end",
"def authenticate_client_access!\n return if api_key_from_params.nil?\n\n return require_api_client if access_from_localhost?\n return require_api_client if access_from_preview_hosting? && restricted_api_access_mode?\n return require_api_client if access_from_production_hosting?\n return require_api_client if access_from_public_hosting?\n\n true # Do not halt otherwise\n end",
"def set_online\n if @_config_service\n @_config_service.set_online\n else\n @log.warn(3202, \"Client is configured to use the `LOCAL_ONLY` override behavior, thus `set_online()` has no effect.\")\n end\n end",
"def frontend?\n self.display_on != \"back_end\"\n end",
"def update_client(client)\n raise ArgumentError, 'Cannot update without id' if client.id.nil?\n resp = put \"#{CLIENT_API_PATH}/#{client.id}\", params: client.as_json\n process_response(resp)\n true\n rescue Errors::UnprocessableEntity\n false\n end",
"def set_client_app_initializers\n return unless request.format == 'html'\n @initializers = { soundcloud: { client_id: ENV['SOUND_CLOUD_CLIENT_ID'] } }\n end",
"def is_public=( f )\n self.update_item_flag = ( is_public != f )\n write_attribute( :is_public, f ) if self.update_item_flag\n end",
"def public?\n !private?\n end",
"def client?\n return @mode == :client\n end",
"def unsupported_client\n\n end",
"def set_client\n if current_user && current_user.is_event_admin?\n @client = Client.find(current_user.client_id)\n elsif current_user && current_user.is_crew?\n @client = Client.find(current_user.client_id)\n else\n redirect_to home_pages_home_path\n end\n end",
"def make_public\n update_attribute( :is_public, true )\n end",
"def set_client\n SoftLayer::Client.default_client = @softlayer_client = SoftLayer::Client.new(\n :username => current_user.ibm_id, # enter your username here\n :api_key => current_user.ibm_key, # enter your api key here\n :endpoint_URL => @API_PUBLIC_ENDPOINT\n )\n end",
"def has_public_profile?\n is_visible? && (show_profile == Visibility::PUBLIC)\n end",
"def public?\n self.mode == PUBLIC\n end",
"def on_azure?\n azure != nil\n end",
"def on_azure?\n azure != nil\n end",
"def adapter=(client)\n case client\n when :curb\n require 'curb'\n when :synchrony\n require 'em-synchrony'\n require 'em-synchrony/em-http'\n when :net_http\n require 'net/http'\n else\n raise ArgumentError, \":#{client} is not a valid HTTP client\"\n end\n\n @adapter = client\n end",
"def use_ms_compat_creationdate?\n if(@options[:compat_ms_mangled_creationdate] || @options[:compat_all])\n request.is_ms_client?\n end\n end",
"def set_applicationclient\n @applicationclient = Applicationclient.find(params[:id])\n end",
"def is_public?\n true\n end",
"def public\n (cloud.nil? ? nil : cloud.public)\n end",
"def internal_client(client)\n @internal_client ||= client.with(\n auto_encryption_options: nil,\n min_pool_size: 0,\n monitoring: client.send(:monitoring),\n )\n end",
"def set_client\n @client = ApiClient.find(params[:code])\n end",
"def initialize (client = nil)\n @softlayer_client = client || Client.default_client\n raise \"#{__method__} requires a client but none was given and Client::default_client is not set\" if !@softlayer_client\n end",
"def client_app_types\n return @client_app_types\n end",
"def talker=(value)\n\t\t\tclient_is_talker = value\n\t\tend",
"def is_public?\n @status == \"public\"\n end",
"def is_public?\n @status == \"public\"\n end",
"def set_cleaning_client(client)\n @client = client\n end",
"def set_client\n @client = Client.find(current_user.client_id)\n end",
"def set_client\n @client = ::Client.find(params[:id])\n end",
"def client=(client)\n @client = client\n end",
"def client=(client)\n @client = client\n end",
"def public?\n self.privacy == PUBLIC\n end",
"def internal\n @internal||=ServerClient.new(server,client_options.merge(:internal => true))\n end",
"def is_resharing_by_external_users_enabled=(value)\n @is_resharing_by_external_users_enabled = value\n end",
"def kiosk=(on)\n @peer.setKiosk(on)\n end"
] | [
"0.7367495",
"0.62073845",
"0.5408701",
"0.54066086",
"0.52906847",
"0.5076319",
"0.5076319",
"0.50392914",
"0.49926624",
"0.4936968",
"0.4923463",
"0.4816072",
"0.47869697",
"0.47417474",
"0.47376898",
"0.47048894",
"0.46996167",
"0.46898264",
"0.46898264",
"0.46898264",
"0.46885648",
"0.46588334",
"0.46476123",
"0.46409246",
"0.46296296",
"0.46123037",
"0.46039495",
"0.45852476",
"0.45852476",
"0.45843187",
"0.4580073",
"0.4579916",
"0.4528452",
"0.45026854",
"0.45026854",
"0.45001176",
"0.44997537",
"0.44510746",
"0.4447865",
"0.44422665",
"0.4433828",
"0.4427322",
"0.4402217",
"0.44015524",
"0.43689764",
"0.43682626",
"0.43620402",
"0.4360635",
"0.4345291",
"0.43446502",
"0.43377978",
"0.43356103",
"0.4324939",
"0.4319901",
"0.43098485",
"0.4309369",
"0.43093565",
"0.43028668",
"0.43021658",
"0.43017042",
"0.4301072",
"0.42962962",
"0.4291922",
"0.42852938",
"0.4275581",
"0.42754614",
"0.4273525",
"0.42719597",
"0.4270174",
"0.4242372",
"0.42412102",
"0.42407084",
"0.42390338",
"0.4234535",
"0.4226004",
"0.42106023",
"0.42102537",
"0.41920292",
"0.41920292",
"0.4190043",
"0.4189564",
"0.41881743",
"0.4184299",
"0.41826898",
"0.4169973",
"0.416432",
"0.4157626",
"0.41563097",
"0.41516176",
"0.41474733",
"0.41474733",
"0.41467652",
"0.41425794",
"0.41331545",
"0.41212967",
"0.41212967",
"0.41190985",
"0.41151989",
"0.41126376",
"0.4112452"
] | 0.82420105 | 0 |
Gets the keyCredentials property value. The collection of key credentials associated with the application. Not nullable. Supports $filter (eq, not, ge, le). | def key_credentials
return @key_credentials
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def key_credentials=(value)\n @key_credentials = value\n end",
"def list_key_credentials_for_application(app_id, options = {})\n get(\"/apps/#{app_id}/credentials/keys\", options)\n end",
"def credential_keys\n %w(seal certificate) & valid_keys\n end",
"def credentials(app_name=nil)\n #bound_app is the name of an app bound to the dat-service and that credentials\n #should be used to access the data-service.\n #for example if an app creates large objects you will need to use\n #the credentials of that app to find the objects.\n app_name ||= @wrapped['director']['bound_app'] if @wrapped['director']\n @credentials ||= VMC::KNIFE.get_credentials(name(), app_name)\n @credentials\n end",
"def credentials\n []\n end",
"def credentials\n []\n end",
"def index\n @credential_keys = CredentialKey.all\n end",
"def filter_auth_credentials(credentials)\n auth_keys = %i[host port encryption].freeze\n credentials.select { |key, _v| auth_keys.include?(key) }.freeze\n end",
"def read_credentials\n conf = self.configuration\n return nil unless conf[:credentials]\n return [conf[:credentials][:access_key], conf[:credentials][:secret_key]]\n end",
"def read_credentials\n conf = self.configuration\n return nil unless conf[:credentials]\n return [conf[:credentials][:access_key], conf[:credentials][:secret_key]]\n end",
"def credentials\n auth_hash['credentials']\n end",
"def get_key_credential_for_application(app_id, key_id, options = {})\n get(\"/apps/#{app_id}/credentials/keys/#{key_id}\", options)\n end",
"def credentials\n @credentials ||= begin\n request = Rack::Auth::Basic::Request.new(env)\n request.provided? ? request.credentials : []\n end\n end",
"def fetch_credentials\n service = @application.services.find_service FILTER\n service['credentials']\n end",
"def credentials\n config.credentials.credentials\n end",
"def authentication_keys\n @authentication_keys ||= User.authentication_keys\n end",
"def credentials?\n credentials.values.all?\n end",
"def credentials\n @credentials ||= {}\n end",
"def encrypted_keys\n Array(config[:encrypted_keys]).concat(\n Array(Chef::Config[:knife][:secure_data_bag][:encrypted_keys])\n ).uniq\n end",
"def password_credentials\n return @password_credentials\n end",
"def authentication_keys\n @authentication_keys ||= [mapping.to.token_authentication_key]\n end",
"def encrypted_keys\n @encrypted_keys ||= encrypted_attributes.keys\n end",
"def keys\n @key\n end",
"def keys\n @keys ||= LicenseField.all.map(&:key)\n end",
"def get_credentials\n password = ENV['CARRIER_PRODUCTS_ENCRYPTION_PASSWORD']\n\n encrypted_credentials = self.credentials\n if self.state == CarrierProduct::States::LOCKED_FOR_CONFIGURING\n configured_product = first_unlocked_product_in_owner_chain()\n if configured_product\n return configured_product.get_credentials\n else\n return {}\n end\n\n end\n\n credentials = encrypted_credentials.inject({}) do |hash, (key, value)|\n hash[key] = AESCrypt.decrypt(value, password)\n hash\n end\n\n return credentials\n end",
"def credentials\n params.values_at('username', 'password')\n end",
"def credentials\n @credentials || self.class.credentials\n end",
"def authorized_keys\n get \"/setup/api/settings/authorized-keys\", password_hash\n end",
"def credentials(rack_env)\n Credentials.from_rack_env(rack_env)\n end",
"def credentials\n @lock.synchronize do\n @credentials\n end\n end",
"def credential(h)\n k = key_value(h[:k])[0].downcase.to_sym\n global_credential_hsh[k]\n end",
"def keys\n authorized_keys = []\n if team.present?\n log \"Got Github Team '#{team.name}' for Org '#{@org}'\"\n\n members = team_members(team.id)\n\n members.each do |member|\n log(\"Getting Member...#{member.login}\")\n\n keys = keys_for(member.login)\n\n # Can't get the real email address without logging in as that user\n email = \"#{member.login}@github.com\"\n\n keys.each do |key|\n authorized_keys << [key[:key], email]\n end\n end\n else\n log(\"No '#{@team_name}' team for '#{@org}' found\")\n log(teams.inspect)\n end\n authorized_keys\n end",
"def access_key\n credentials['access_key']\n end",
"def list\n @keychain.keys\n end",
"def credentials\n @credentials ||= params.unpack1('m*').split(':', 2)\n end",
"def get_keys(user=nil) \n\t\tuser = Account.current_account if !user\n\t\tKey.all(:account_id => user.id, :project_id => self.id)\n\tend",
"def keys\n doc = JSON.parse get('/api/v1/ssh_keys')\n doc[\"ssh_keys\"]\n end",
"def get_ssh_keys\n get(\"tenants/#{tenant}\")[\"sshKeys\"]\n end",
"def secret_key\n credentials['secret_key']\n end",
"def secret_key\n credentials['secret_key']\n end",
"def keys\n JSON.parse get('/users/ssh_keys', :accept => 'json').to_s\n end",
"def credentials\n { :user => @user, :password => @password }\n end",
"def keys\n IbmCloudRest.get \"#{@uri}/keys\"\n end",
"def credentials\n @credentials ||= begin\n txt = ::Base64.decode64(header.params || '')\n txt.split(/:/, 2)\n end\n end",
"def get_key_list\n read(Common::KEY) || Hash.new\n end",
"def filtered_by_key(key)\n where(key: key)\n end",
"def access_key_id\n credentials['access_key']\n end",
"def sshkeys\n sshkeys = object.sshkeys.select do |sshk|\n !current_user ||\n current_user.id == sshk.user.id ||\n current_user.lead?\n end\n sshkeys.map { |s| s.id }\n end",
"def find_keys(filter)\n @collection.find(filter).to_a\n end",
"def get_keys\n @encryption_io.get_keys\n end",
"def keys\n return self.keySet.to_a\n end",
"def radius_credentials(authentication_hash)\n key = self.authentication_keys.first\n value = authentication_hash[key]\n value.downcase! if (self.case_insensitive_keys || []).include?(key)\n\n [value, authentication_hash[:password]]\n end",
"def credentials\n @credentials ||= GlobalConstant::Aws::Common.get_credentials_for(@role)\n end",
"def credentials\n @credentials ||= GlobalConstant::Aws::Common.get_credentials_for(@role)\n end",
"def list_keys\n @keys.keys\n end",
"def credentials\n {\n \"username\" => self.username,\n \"password\" => self.password\n }\n end",
"def auth_credentials\n auth = Rack::Auth::Basic::Request.new(request.env)\n auth.provided? && auth.basic? ? auth.credentials : [nil,nil]\n end",
"def credentials\n {\n :provider => 'vsphere',\n :vsphere_username => new_resource.user,\n :vsphere_password => new_resource.password,\n :vsphere_server => new_resource.host,\n :vsphere_ssl => true,\n :vsphere_expected_pubkey_hash => new_resource.pubkey_hash\n }\nend",
"def list_keys\n @keydict.keys\n end",
"def private_key\n @key\n end",
"def creds\n Hash[\"customer_id\" => customer_id, \"customer_secret\" => customer_secret]\n end",
"def credentials\n R10K::Git::Rugged::Credentials.new(self)\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n self.unauthorized_record = values.first if values.first.class < ::ActiveRecord::Base\n end",
"def determine_credentials(credentials = {})\n return credentials if credentials.is_a?(Hash) && !credentials.empty?\n\n rails_credentials\n end",
"def sensitive_properties\n properties.values.empty? ? [] : properties.values.select(&:sensitive?)\n end",
"def credential\n authorizer.get_credentials('default')\n end",
"def credential_key_params\n params.require(:credential_key).permit(:credential_id, :key, :value)\n end",
"def key_field\n 'key'\n end",
"def keys_for(username)\n @api.client.users.keys.list(user: username).body\n end",
"def property_keys\n headers = { 'Accept' => 'application/json; charset=UTF-8' }\n get_request 'propertykeys', headers\n end",
"def keys\n ::M2X::Client::Key.list(@client, params.merge(device: self[\"id\"]))\n end",
"def credential_filtered_uri\n URICredentialsFilter.credential_filtered_uri(uri)\n end",
"def key_ids\n @keys.keys\n end",
"def keys\n @params.keys\n end",
"def permitted_keys\n @permitted_keys ||= properties.map(&:to_sym)\n end",
"def keys\n @service_points.keys\n end",
"def keys; @caesars_properties.keys; end",
"def claimed_keys\n [key]\n end",
"def credential\n authorizer.get_credentials('default')\n end",
"def key_options\n case key_type\n when :select\n return Concerto::Application.config.field_configs[key.to_sym][:values]\n else\n return nil\n end\n end",
"def keys\n raise \"Must implement #{self.class.name}#keys method to return lookup key\"\n end",
"def values(key)\n Array.wrap(self[key]).compact\n end",
"def credentials\n { :username => @email, :password => @password }\n end",
"def credentials\n {\n client_id: client_id,\n client_secret: client_secret\n }\n end",
"def rails_credentials\n @_rails_credentials ||= LdapQuery::RailsCredentials.credentials\n end",
"def user_keys\n self.whitelists.map{|whitelist| whitelist.user_key}.uniq\n end",
"def select_keypair\n compute.key_pairs.map { |k| [k.name, k.name] }\n end",
"def defined_credentials_files\n \"#{credential_directory}/#{@credentials_file_name}\"\n end",
"def get_keys()\n\t\t\treturn @config.keys\n\t\tend",
"def keys\n # Lock for thread safety\n # Only one thread can write to the hash at a time and prevent partial keys from being returned.\n @thread_lock.synchronize do\n if @keys.nil?\n @keys = {}\n @user_keys.each_pair do |name, rsa_keys|\n # Use the sha256 of the user name as the internal name\n # This is to both avoid naming problems when uploading and to obfuscate the key name\n keys_key = BackupEngine::Checksums::Engines::SHA256.new.block(name.to_s)\n raise('Key name sha collission') if @keys.key?(keys_key)\n\n @keys[keys_key] = rsa_keys.merge(name: name)\n end\n end\n end\n\n raise('No encryption keys') if @keys.empty?\n\n return @keys\n end",
"def credentials\n @credentials ||= WebCredentials.new(self.config['user'], self.config['password'], self.config['domain'])\n end",
"def creds\n\t\tRails.application.secrets.oa_cred[provider]\n\tend",
"def keys\n configuration.keys\n end",
"def api_keys\n ::Syncano::QueryBuilder.new(self, ::Syncano::Resources::ApiKey)\n end",
"def keys_from_hash\n if @keys.find_index(@option.value)\n return @keys.find_index(@option.value)\n else\n return @keys.first\n end\n end",
"def ec2_credentials(user_id = nil, filter = {})\n # caching\n @ec2_credentials =\n elektron_identity.get(\n \"users/#{user_id}/credentials/OS-EC2\",\n filter,\n ).map_to(\"body.credentials\", &ec2_credential_map)\n return @ec2_credentials if filter[:tenant_id].nil?\n @ec2_credentials.select do |ec2_cred|\n ec2_cred.tenant_id == filter[:tenant_id]\n end\n end",
"def keys\n DoesKeyValue::State.instance.keys[self.to_s]\n end",
"def credentials\n Trackerific.config[name]\n end",
"def index\n # @credentials = Credential.all\n end",
"def env_keys\n mapping.values\n end"
] | [
"0.64408237",
"0.63653445",
"0.6296331",
"0.5992108",
"0.5985357",
"0.5985357",
"0.5977728",
"0.5957623",
"0.58800143",
"0.58800143",
"0.58774936",
"0.58592206",
"0.57703036",
"0.5761351",
"0.57095504",
"0.56924593",
"0.5679762",
"0.5666132",
"0.5586043",
"0.558327",
"0.55757076",
"0.5545547",
"0.5545307",
"0.5536897",
"0.5504872",
"0.5472217",
"0.54557276",
"0.54255605",
"0.5414169",
"0.5411916",
"0.5348657",
"0.533869",
"0.53355",
"0.53227717",
"0.5318691",
"0.5313904",
"0.5281731",
"0.52619374",
"0.5259813",
"0.5259813",
"0.52547896",
"0.5250509",
"0.5209601",
"0.5202594",
"0.51970285",
"0.517586",
"0.516812",
"0.5167509",
"0.5147033",
"0.5141814",
"0.5136923",
"0.51303774",
"0.51293284",
"0.51293284",
"0.5118167",
"0.51097107",
"0.5100238",
"0.5082914",
"0.5072204",
"0.5054687",
"0.50462455",
"0.50442815",
"0.5043866",
"0.50410557",
"0.50368506",
"0.5035156",
"0.5027075",
"0.5021117",
"0.50193334",
"0.50119185",
"0.50087565",
"0.5008281",
"0.49955973",
"0.49950543",
"0.49923277",
"0.4992069",
"0.49820283",
"0.4981723",
"0.4977142",
"0.4967172",
"0.495787",
"0.49551934",
"0.49449068",
"0.49320474",
"0.49138305",
"0.49015963",
"0.48973483",
"0.4895192",
"0.4894349",
"0.48892716",
"0.487859",
"0.48776975",
"0.48680183",
"0.48606887",
"0.48603648",
"0.4855526",
"0.4845461",
"0.48421526",
"0.483955",
"0.4833531"
] | 0.75020885 | 0 |
Sets the keyCredentials property value. The collection of key credentials associated with the application. Not nullable. Supports $filter (eq, not, ge, le). | def key_credentials=(value)
@key_credentials = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n self.unauthorized_record = values.first if values.first.class < ::ActiveRecord::Base\n end",
"def credentials=(values)\n return if values.blank? || !values.is_a?(Hash)\n values.symbolize_keys!\n values.each do |field, value|\n next if value.blank?\n send(\"#{field}=\", value)\n end\n end",
"def set_credentials(credentials: nil)\n raise StandardError, 'credentials must be a hash' unless credentials.is_a?(Hash)\n\n password = ENV['CARRIER_PRODUCTS_ENCRYPTION_PASSWORD']\n encrypted_credentials = credentials.inject({}) do |hash, (key, value)|\n raise StandardError, \"#{key.to_s.capitalize} must be specified\" if value.blank? && !key.to_s.include?('test')\n\n hash[key] = AESCrypt.encrypt(value, password) if value.present?\n hash\n end\n\n self.credentials = encrypted_credentials\n self.save!\n end",
"def credentials= (new_credentials)\n @credentials = new_credentials\n refresh_config_for_api_objects!\n @credentials\n end",
"def set_credential_key\n @credential_key = CredentialKey.find(params[:id])\n end",
"def key_credentials\n return @key_credentials\n end",
"def filter_auth_credentials(credentials)\n auth_keys = %i[host port encryption].freeze\n credentials.select { |key, _v| auth_keys.include?(key) }.freeze\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n hash = values.first.is_a?(Hash) ? values.first.with_indifferent_access : nil\n self.openid_identifier = hash[:openid_identifier] if !hash.nil? && hash.key?(:openid_identifier)\n end",
"def credentials=(credentials)\n if credentials.kind_of?(ApplicationCredentials) || credentials.kind_of?(AccountCredentials)\n @credentials = credentials\n else\n raise 'Invalid credentials object'\n end\n end",
"def credential_key_params\n params.require(:credential_key).permit(:credential_id, :key, :value)\n end",
"def credentials=(credentials)\n @lock.synchronize do\n @credentials = credentials\n end\n end",
"def credential_keys\n %w(seal certificate) & valid_keys\n end",
"def credentials=(value)\n BaseTask.validate value, \"credentials\", Database::CREDENTIALS\n @credentials = value\n end",
"def configure(credentials)\n credentials.each { |key, val| self.send(\"#{key}=\", val) }\n self\n end",
"def set_credential_key\n @credential = Credential.find(params[:id])\n end",
"def password_credentials=(value)\n @password_credentials = value\n end",
"def set_keylist\n @keylist = Keylist.find(params[:id])\n end",
"def set_credentials(credentials)\n @credentials = credentials\n end",
"def index\n @credential_keys = CredentialKey.all\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n self.priority_record = values.second if values.second.class < ::ActiveRecord::Base\n end",
"def key=(value)\r\n resources.each do |klass| \r\n klass.headers['X-BillomatApiKey'] = value\r\n klass.headers['Accept'] = 'application/json' # hack :-(\r\n end\r\n @key = value\r\n @email = nil\r\n @password = nil\r\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n hash = values.first.is_a?(Hash) ? values.first.with_indifferent_access : nil\n self.record = hash[:priority_record] if !hash.nil? && hash.key?(:priority_record)\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n hash = values.first.is_a?(Hash) ? values.first.with_indifferent_access : nil\n self.record = hash[:priority_record] if !hash.nil? && hash.key?(:priority_record)\n end",
"def set_key_set\n @key_set = KeySet.find(params[:id])\n end",
"def credentials\n @credentials ||= {}\n end",
"def encrypted_keys\n Array(config[:encrypted_keys]).concat(\n Array(Chef::Config[:knife][:secure_data_bag][:encrypted_keys])\n ).uniq\n end",
"def key=(key)\n options[:key] = key\n end",
"def authentication_keys\n @authentication_keys ||= User.authentication_keys\n end",
"def list_key_credentials_for_application(app_id, options = {})\n get(\"/apps/#{app_id}/credentials/keys\", options)\n end",
"def response_keys= value\n @response_keys = value\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n if values.first.is_a?(Hash)\n hash = values.first.with_indifferent_access\n self.facebook_name = hash[:facebook_name]\n self.facebook_username = hash[:facebook_username]\n\n hash\n end\n end",
"def authentication_keys\n @authentication_keys ||= [mapping.to.token_authentication_key]\n end",
"def initialize(creds)\n @creds = creds.select { |k, _| FIELDS.include?(k) }\n end",
"def credentials(app_name=nil)\n #bound_app is the name of an app bound to the dat-service and that credentials\n #should be used to access the data-service.\n #for example if an app creates large objects you will need to use\n #the credentials of that app to find the objects.\n app_name ||= @wrapped['director']['bound_app'] if @wrapped['director']\n @credentials ||= VMC::KNIFE.get_credentials(name(), app_name)\n @credentials\n end",
"def authorized_keys\n get \"/setup/api/settings/authorized-keys\", password_hash\n end",
"def allow_keys(keys)\n @allow_keys = keys\n end",
"def keypasswd=(value)\n Curl.set_option(:keypasswd, value_for(value, :string), handle)\n end",
"def credentials\n []\n end",
"def credentials\n []\n end",
"def credentials\n {\n :provider => 'vsphere',\n :vsphere_username => new_resource.user,\n :vsphere_password => new_resource.password,\n :vsphere_server => new_resource.host,\n :vsphere_ssl => true,\n :vsphere_expected_pubkey_hash => new_resource.pubkey_hash\n }\nend",
"def where(key, value = nil)\n\t\t\[email protected](key, value)\n\t\t\treturn self\n\t\tend",
"def encryptionKey=(value)\n\t\t\t@encryptionKey = value\n\t\tend",
"def []=(key, value)\n field_set key, value\n end",
"def <<(key)\n key_to_hashes(key).each { |hash| filter.set!(hash) }\n self\n end",
"def encrypted_keys\n @encrypted_keys ||= encrypted_attributes.keys\n end",
"def set_ClientKey(value)\n set_input(\"ClientKey\", value)\n end",
"def set_ClientKey(value)\n set_input(\"ClientKey\", value)\n end",
"def set_ClientKey(value)\n set_input(\"ClientKey\", value)\n end",
"def set_ClientKey(value)\n set_input(\"ClientKey\", value)\n end",
"def set_ClientKey(value)\n set_input(\"ClientKey\", value)\n end",
"def set_ClientKey(value)\n set_input(\"ClientKey\", value)\n end",
"def collection_key(key)\n @_collection_key = key.to_sym\n end",
"def credential=(value)\n @children['credential'][:value] = value\n end",
"def key=(new_key)\n @key = new_key\n end",
"def set_ssl_client_key(opts)\n opts = check_params(opts,[:keys])\n super(opts)\n end",
"def user_key=(key)\n @user_key = key\n self.user ||= ::User.find_by(user_key: key)\n user&.user_key = key\n end",
"def federated_identity_credentials=(value)\n @federated_identity_credentials = value\n end",
"def client_credentials(*methods)\n @config.instance_variable_set(:@client_credentials_methods, methods)\n end",
"def users=(users_hash)\n client_principal.users = Hash[users_hash.map { |k, v| [k, v.sort] } ]\n end",
"def auth_key_pairs\n project_key_pairs.each do |ssh_key|\n persister.auth_key_pairs.build(\n :name => ssh_key[:name],\n :fingerprint => ssh_key[:fingerprint]\n )\n end\n end",
"def credentials\n @lock.synchronize do\n @credentials\n end\n end",
"def key=(value)\n @key = value\n end",
"def key=(value)\n @key = value\n end",
"def credentials(rack_env)\n Credentials.from_rack_env(rack_env)\n end",
"def store_credentials(credentials)\n conf = configuration\n conf[:credentials] = {}\n conf[:credentials][:access_key], conf[:credentials][:secret_key] = credentials[0], credentials[1]\n store_configuration(conf)\n end",
"def permit(keys, key=nil, options={})\n filter! keys, (key.nil? ? params : params[key]), options if keys.any?\n self\n end",
"def key=(value)\n attributes['key'] = value\n end",
"def credentials\n @credentials ||= begin\n request = Rack::Auth::Basic::Request.new(env)\n request.provided? ? request.credentials : []\n end\n end",
"def session_keys=(keys) #:nodoc:\n @@session_keys=keys\n end",
"def private_key=(k)\n return self.authentication.private_key = k\n end",
"def private_key=(k)\n return self.authentication.private_key = k\n end",
"def ssl_key=(key)\n set_option(:sslkey, key)\n end",
"def set_ssh_key\n @ssh_key = current_user.ssh_keys.find(params[:id])\n end",
"def key(key)\n raise \"key must be a boolean.\" unless is_bool? key\n raise \"Only Edm.String fields can be keys.\" unless @type == \"Edm.String\"\n @key = key\n self\n end",
"def permitted_keys\n @permitted_keys ||= properties.map(&:to_sym)\n end",
"def set_scope(key)\n response_filters << lambda do |data|\n fetch_path(data, *key)\n end\n end",
"def []=(*key_list, value)\n store_with_init(Array(key_list).flatten, value)\n end",
"def initialize( key )\n @key = Kernel.Array(key)\n end",
"def risky_service_principals=(value)\n @risky_service_principals = value\n end",
"def filtered_by_key(key)\n where(key: key)\n end",
"def set_keyvalue\n @keyvalue = Keyvalue.find(params[:id])\n end",
"def key_id=(value)\n @key_id = value\n end",
"def key_id=(value)\n @key_id = value\n end",
"def key_id=(value)\n @key_id = value\n end",
"def keys=(keys_array)\n\t\t\tif keys_array.is_a?(Array)\n\t\t\t\t@lookup = []\n\t\t\t\tdial!(*keys_array)\n\t\t\telse\n\t\t\t\traise ArgumentError, 'Key list must be set to an array.'\n\t\t\tend\n\t\tend",
"def add_authorized_key(key)\n queries = password_hash\n case key\n when String\n if File.exist?(key)\n key = File.open(key, \"r\")\n content = key.read.strip\n key.close\n else\n content = key\n end\n when File\n content = key.read.strip\n key.close\n end\n\n queries[:query][:authorized_key] = content\n post \"/setup/api/settings/authorized-keys\", queries\n end",
"def store_credentials user_id, credentials\n json = MultiJson.dump(\n client_id: credentials.client_id,\n access_token: credentials.access_token,\n refresh_token: credentials.refresh_token,\n scope: credentials.scope,\n expiration_time_millis: credentials.expires_at.to_i * 1000\n )\n @token_store.store user_id, json\n credentials\n end",
"def new_input_set()\n return VerifyCredentialsInputSet.new()\n end",
"def update_credentials(opts = {})\n opts[:fields] and opts.delete(:fields).each_with_index { |f, i|\n opts[\"fields_attributes[#{i}][name]\"] = f[:name]\n opts[\"fields_attributes[#{i}][value]\"] = f[:value]\n }\n perform_request_with_object(:patch,\n '/api/v1/accounts/update_credentials',\n opts, Mastodon::Account)\n end",
"def credentials_obj\n @credentials_obj ||= Aws::Credentials.new(\n access_key,\n secret_key\n )\n end",
"def defined_credentials_files\n \"#{credential_directory}/#{@credentials_file_name}\"\n end",
"def key_set_params\n params.require(:key_set).permit(:name, :vocation_id, key_assignments_attributes: [:id, :key_sequence, :action_type, :action_object])\n end",
"def credentials\n @credentials ||= params.unpack1('m*').split(':', 2)\n end",
"def set_client_cert_and_key (cert_file, key_file = nil, key_passwd = nil)\n return fail_response(13001, \"NaServer::set_client_cert_and_key: certificate file not specified\") unless(cert_file)\n @cert_file = cert_file\n @key_file = key_file\n if key_passwd\n @key_passwd = key_passwd\n else\n @key_passwd = \"\"\n end\n end",
"def set_key_map(key_map)\n @key_map = key_map\n end",
"def set_key_map(key_map)\n @key_map = key_map\n end",
"def attribute_keys=(keys)\n @attribute_keys = keys\n attr_accessor *keys\n end",
"def apply_credentials\n seeds.each do |node|\n node.credentials = @credentials || {}\n end\n true\n end",
"def credentials\n authenticating_with_api? ? {:api_key => api_key} : super\n end",
"def set_user_key\n @user_key = UserKey.find(params[:id])\n end"
] | [
"0.61287",
"0.583167",
"0.5787238",
"0.5775042",
"0.5744556",
"0.57397985",
"0.5704203",
"0.56662357",
"0.56281596",
"0.5616786",
"0.5615978",
"0.5610388",
"0.55678725",
"0.5423186",
"0.5421683",
"0.5351078",
"0.5304345",
"0.53013194",
"0.5266042",
"0.5262708",
"0.5210179",
"0.52072835",
"0.52072835",
"0.51947445",
"0.50602174",
"0.50211084",
"0.4982519",
"0.4979419",
"0.49771428",
"0.49735227",
"0.49695742",
"0.49661362",
"0.49066293",
"0.4898852",
"0.48966005",
"0.4878684",
"0.48751977",
"0.4809006",
"0.4809006",
"0.48020065",
"0.47934324",
"0.4790053",
"0.47754225",
"0.4761817",
"0.4759854",
"0.4759509",
"0.4759509",
"0.4759509",
"0.4759509",
"0.4759509",
"0.4759509",
"0.4751494",
"0.47434723",
"0.47414973",
"0.4741278",
"0.47135267",
"0.4709531",
"0.47049293",
"0.46995518",
"0.46919253",
"0.46747482",
"0.46740538",
"0.46740538",
"0.46426767",
"0.46212286",
"0.46188805",
"0.46150327",
"0.46065733",
"0.4603504",
"0.46025443",
"0.46025443",
"0.45849085",
"0.4579408",
"0.45706886",
"0.45689613",
"0.45679712",
"0.45677423",
"0.45663804",
"0.4550871",
"0.45416552",
"0.45409182",
"0.454044",
"0.454044",
"0.454044",
"0.45371127",
"0.45365626",
"0.4530294",
"0.45239767",
"0.45068672",
"0.45029122",
"0.45021307",
"0.44979262",
"0.44954997",
"0.4494314",
"0.4487877",
"0.4487877",
"0.44804314",
"0.44784617",
"0.44762507",
"0.44725642"
] | 0.7661783 | 0 |
Gets the logo property value. The main logo for the application. Not nullable. | def logo
return @logo
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def logo\n get_attribute(Yoti::Attribute::APPLICATION_LOGO)\n end",
"def logo=(value)\n @logo = value\n end",
"def get_logo\n Oneclick::Application.config.ui_logo\n end",
"def logo_url\n @attributes[:logo_url]\n end",
"def logo\n raw_team['team_logo']\n end",
"def application_logo=(value)\n @children['application-logo'][:value] = value\n end",
"def settings_logo\n @page_title = _('Logo_settings')\n @logo = Confline.get_value(\"Logo_Picture\")\n end",
"def sp_logo\n sp.logo || DEFAULT_LOGO\n end",
"def logo=(v)\n @logo = v ? URI.parse(v) : nil\n end",
"def logo_builder\n ManifestBuilder::LogoBuilder\n end",
"def logo\n\t\ts = image_tag('rails.png', :alt => \"Online Orders Application\")\n\t\treturn s\n\tend",
"def company_customization_primary_logo\n @company && @company.customizations&.primary_header_logo\n end",
"def get_logo_display\n\t\tif !logged_in?\n\t\t\treturn \"City Produce\"\n\t\tend\n\t\tif current_user.admin?\n\t\t\treturn \"Admin\"\n\t\tend\n\t\treturn \"Home\"\n\tend",
"def logo_url\n @shop.dig('logo_url','url')\n end",
"def set_logo\n @logo = Logo.find(@company.logo_id) # NOTE: this raises a 404 if there's no logo,\n # which is what we want here.\n end",
"def logo\r\n \tlogo = image_tag(\"logo.png\", :alt => \"mens fashion today\", :class => \"round\")\r\n end",
"def logo\n\t\timage_tag(\"logo.png\", :alt => \"jobradar\", :class => \"round\")\n\tend",
"def organisation_logo\n session[:organisation][:name]\n end",
"def logo\n content_tag(:span, \"HASTINGS FINE HOMES\", class: \"logo\")\n end",
"def logo_url\n logo? ? h.image_tag(logo.thumb_medium, alt: 'Logo', width: 90) :\n h.content_tag(:span, initial, class: 'brand_img_holder', style: 'width:43px; height:43px;')\n end",
"def logo_url\n logo? ? logo.url : profile_img\n end",
"def logo\n logo = image_tag(\"background.png\", :alt => \"background\")\n end",
"def logo\n image_tag(\"logo.png\", :alt => \"Sample App\", :class => \"round\")\n end",
"def logo\n image_tag(\"logo.png\", :alt => \"Sample App\", :class => \"round\")\n end",
"def logo_path\n root_path\n end",
"def logo_path\n root_path\n end",
"def logo_path\n root_path\n end",
"def set_logo\n @logo = Logo.find(params[:id])\n end",
"def get_logo_for_season_type\n if object.season_type && object.season_type.code =~ /CSI/i\n h.image_tag( 'logo_csi.png', size: '25x16' )\n elsif object.season_type && object.season_type.code =~ /FIN/i\n h.image_tag( 'logo_fin.png', size: '40x16' )\n elsif object.season_type && object.season_type.code =~ /UISP/i\n h.image_tag( 'logo_uisp.png', size: '40x16' )\n elsif object.season\n object.season.get_season_type\n else\n ''\n end\n end",
"def logo_url style = :original\n logo.url(style, timestamp: false)\n end",
"def logo\n rand_num = rand(1..13)\n \"https://pigment.github.io/fake-logos/logos/medium/color/#{rand_num}.png\"\n end",
"def logo\n \"This is a cool logo !\"\n end",
"def beer_logo_path\n self.logo_path.url(:medium)\n end",
"def logo_url\n if user_signed_in?\n current_user\n elsif admin_signed_in?\n current_admin_user\n else\n root_url\n end\n end",
"def logo\n image_tag('rubyLogo.png', alt: 'Ruby on Rails Sample App', class: 'round', height: \"50px\")\n end",
"def logo_path(ngo)\n if ngo.image.attached?\n Rails.application.routes.url_helpers.rails_blob_path(ngo.image, only_path: true)\n else\n ActionController::Base.helpers.image_path('image_not_found.png')\n end\n end",
"def get_team_logo(team) \n doc = getHTML(\"http://espn.go.com/mens-college-basketball/team/_/id/#{team.webExt}\") \n logo = doc.xpath(\"//meta[@property='og:image']/@content\").text\n team.update(logo: logo)\n end",
"def logo_link\n root_path\n end",
"def logo(options={})\n @logo ||= (\n if file = output.glob_relative('**/logo.*').first\n file #.relative_path_from(output)\n else\n keyword = options[:keyword]\n directory = options[:directory]\n keyword ||= (metadata.search || metadata.title || metadata.name)\n logo_search(keyword, directory)\n end\n )\n end",
"def interchange_logo\n q = []\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (default)]\"\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (large)]\"\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (medium)]\"\n q << \"[#{image_path(\"#{website.folder}/logo-sm.png\")}, (only screen and (max-width: 720px))]\"\n\n image_tag('', #\"#{website.folder}/logo.png\",\n class: \"no-resize no-resize-for-small\",\n alt: Setting.site_name(website),\n data: { interchange: q.join(\", \") })\n end",
"def interchange_logo\n q = []\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (default)]\"\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (large)]\"\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (medium)]\"\n q << \"[#{image_path(\"#{website.folder}/logo-sm.png\")}, (only screen and (max-width: 720px))]\"\n\n image_tag('', #\"#{website.folder}/logo.png\",\n class: \"no-resize no-resize-for-small\",\n alt: Setting.site_name(website),\n data: { interchange: q.join(\", \") })\n end",
"def logo\n rand_num = Random.rand(76) + 1\n \"http://www.biz-logo.com/examples/#{ rand_num < 10 ? \"00\" : \"0\" }#{rand_num}.gif\"\n end",
"def set_logo\n @logo = Logo.find(params[:id])\n end",
"def set_logo\n @logo = Logo.find(params[:id])\n end",
"def get_thumb\n (self.logo.present?)? self.logo.thumb : 'assets/logo.png'\n end",
"def display_course_logo(course)\n content_tag(:span, class: ['image']) do\n image_tag(course.logo.medium.url || 'course_default_logo.svg')\n end\n end",
"def logo\n logo=image_tag(\"rails.png\" , :alt=>\"Sample app\" ,:class=>\"round\")\n end",
"def og_image\n if @user && @user.image?\n @user.image.url\n elsif @person && @person.image?\n @person.image\n else\n root_url.chomp('/') + image_path('logo.png')\n end\n end",
"def logo; end",
"def logo; end",
"def casein_config_logo\n \t'/images/logo_ss.jpg'\n end",
"def default_image\n if instance.platform.name =~ /^(.*)-([^-]*)$/\n \"#{$1}:#{$2}\"\n else\n instance.platform.name\n end\n end",
"def logo_base_64\n 'data:image/png;base64, ' + Base64.encode64(File.open(\"#{Rails.root}/app/assets/images/logo_orgao.png\", 'rb').read).to_s\n end",
"def get_logo_route\n\t\tif !logged_in?\n\t\t\treturn root_path\n\t\tend\n\t\tif current_user.admin?\n\t\t\treturn admin_path\n\t\tend\n\t\treturn current_user\n\tend",
"def user_logo(user)\n image_tag(user.avatar_url)\n end",
"def nav_logo_stamp\n nav_logo.blob.created_at.to_i if nav_logo.attached?\n end",
"def build_logo\n if @logo && [email protected]?\n bottom = @document.note.empty? ? 75 : (75 + note_height)\n @pdf.image(@logo, at: [0, bottom], fit: [x(200), y(50)])\n end\n end",
"def application_logo(classes)\n if cookies[:layout] == 'application' || cookies[:layout].nil?\n image_tag(asset_pack_path('media/images/duszek-awesome.svg'), class:\"#{classes}\")\n else\n image_tag(asset_pack_path('media/images/duszki.png'), class:\"#{classes}\")\n end\n end",
"def casein_config_logo\n 'casein/casein.png'\n end",
"def logo_tag\n image_tag \"rails.png\", :alt => @page_title\n end",
"def image\n [:MANAGED_MAP, :UNMANAGED_MAP].each do |map|\n unless self.class.const_defined?(map)\n raise MapUndefined, \"Const #{map} is undefined; maps appear unbuilt\"\n end\n end\n\n map = @managed ? self.class::MANAGED_MAP : self.class::UNMANAGED_MAP\n distro = @distro.downcase.to_sym\n\n unless map[distro].nil?\n return map[distro][@version] unless map[distro][@version].nil?\n return map[distro][\"*\"] unless map[distro][\"*\"].nil?\n end\n\n nil\n end",
"def g_home_logo(page_title)\n if page_title.empty?\n '<a href=\"#\"><img class=\"brand\" width=\"26\" src=\"/assets/botflip-logo.svg\"></a><a href=\"#\" class=\"brand\">Miniflip</a>'.html_safe\n # link_to \"MiniFeed\", \"#\", class: \"brand\"\n else\n '<a href=\"/\"><img class=\"brand\" width=\"26\" src=\"/assets/botflip-logo.svg\"></a><a href=\"/\" class=\"brand\">Miniflip</a>'.html_safe\n end\n end",
"def show_logo\n\tcompany = company_from_subdomain\n\tclient = Customer.find(params[:id], :conditions => [\"company_id = ?\", company.id])\n\n unless client.logo?\n render :nothing => true\n return\n end\n\n image = Magick::Image.read( client.logo_path ).first\n if image\n send_file client.logo_path, :filename => \"logo\", :type => image.mime_type, :disposition => 'inline'\n else\n render :nothing => true\n end\n image = nil\n GC.start\n end",
"def select_logo_title\n\t\tdefine_area\n\t\tif @area == 'model'\n\t\t\tlogo_title = t('layouts.main_filters.collection')\n\t\telsif @area == 'creation'\n\t\t\tlogo_title = t('layouts.main_filters.creation')\n\t\telsif @area == 'accessory' || @area == 'fabric' || @area == 'workshop'\n\t\t\tlogo_title = t('layouts.main_filters.shop')\n\t\tend\n\tend",
"def one_logo\n if self.class_type == 'logo' && Multimedium.find_all_by_class_type('logo').count > 0\n self.errors.add(:base, \"This store already has one logo\")\n false\n end\n end",
"def logo\n image_tag(\"boulder.png\", :width => \"100\", \n :height => \"75\",\n :alt => \"Learning RoR\", \n :class => \"round\")\n end",
"def logo_dimensions_string\n \"#{LOGO_WIDTH}x#{LOGO_HEIGHT}\"\n end",
"def logo_link\n link_to(logo_img, view_context.root_path)\n end",
"def image\n meta_og_image || meta_twitter_image\n end",
"def get_logo_for_season_type( season_type_code )\r\n if season_type_code =~ /CSI/i\r\n h.image_tag( 'logo_csi.png', size: '20x16' )\r\n elsif season_type_code =~ /FIN/i\r\n h.image_tag( 'logo_fin.png', size: '40x16' )\r\n elsif season_type_code =~ /UISP/i\r\n h.image_tag( 'logo_uisp.png', size: '40x16' )\r\n else\r\n season_type_code\r\n end\r\n end",
"def getLogoData(data)\n data && data['asset_id'] && data['width'] && data['height'] or return nil\n return { url: \"/assets/#{data['asset_id']}\", width: data['width'], height: data['height'] }\nend",
"def image\n meta_og_image\n end",
"def process_donor_logo(donor_url)\n logo_url = nil\n\n page_html = get_page_html donor_url\n if page_html\n logo_node = page_html.at_css('link[rel=\"image_src\"]')\n logo_url = URI.parse(logo_node[:href]) unless logo_node.nil?\n end\n\n logo_url\n end",
"def html_branding\n @attributes[:html_branding]\n end",
"def resize_logo\n logo = params[:airline][:logo]\n return if logo.nil?\n\n begin\n logo = MiniMagick::Image.new(logo.tempfile.path)\n logo.resize '150x25'\n rescue MiniMagick::Error\n # errors here will be caught in model validation\n end\n end",
"def logo=(_arg0); end",
"def link_to_root_logo\n link_to(content_tag(:span, '', { class: 'navbarLogo', alt: 'Sky Logo' }), root_path, class: 'navbar-brand')\n end",
"def image\n meta['og:image'] || meta['twitter:image']\n end",
"def flow_get_jumbo_image\n if !params[:page] && request.path == '/'\n '/jumbo/home.jpg'\n else\n return nil unless @taxon\n image = @taxon.icon(:original)\n image.include?('default_taxon.png') ? nil : image\n end\n end",
"def image\n 'gh.png'\n end",
"def logo \n logo = @@doc.xpath(\"//div[contains(@id, 'logo')]\")\n logo += @@doc.xpath(\"//div[contains(@class, 'logo')]\")\n # najdenie href = .... skript\n logo_href = logo.xpath(\".//a//@href\")\n logo_src = logo.xpath(\".//img//@src\")\n\n lg = @@doc.at_xpath(\"//*[contains(@src, 'logo')]\")\n #lg += @@doc.xpath(\"//*[contains(@style, 'logo')]\")\n\n # checking if any logo was found\n if logo_src.size != 0\n template_logo = Hash.new\n template_logo[:written] = false\n if logo_href.size != 0 \n template_logo[:href] = logo_href.to_s\n template_logo[:href_sign] = true\n end\n template_logo[:src] = @@name + logo_src.to_s\n template_logo[:image] = true\n else \n template_logo = Hash.new\n template_logo[:image] = false\n end\n\n if lg != nil\n template_logo = Hash.new\n template_logo[:written] = false\n link = lg.parent\n \n template_logo[:href] = link.xpath('.//@href').to_s\n template_logo[:href_sign] = true\n\n template_logo[:src] = @@name + link.xpath('.//@src').to_s\n template_logo[:image] = true\n end\n\n # if no logo was found then make home with domain name \n if template_logo[:image] == false && lg == nil\n template_logo[:written] = true\n template_logo[:name] = @@name\n template_logo[:src] = @@page_name.capitalize\n end\n\n # sending logo info into template\n template_logo\n end",
"def long_logo_web_url_for_light_theme\n return @long_logo_web_url_for_light_theme\n end",
"def repository_name\n config['image']\n end",
"def resize_image\n unless logo.nil?\n if logo.height != 100\n self.logo = logo.thumb('x100') # resize height and maintain aspect ratio\n end\n end\n end",
"def tier_logo_path(tier, options={})\n version = options.delete(:name)\n source = options.delete(:source)\n return source if source\n tier.logo.url(\"normal\") if tier.logo.file?\n end",
"def image\n return @children['image'][:value]\n end",
"def getLogo( a, b, c, d)\n params = Hash.new\n params['a'] = a\n params['b'] = b\n params['c'] = c\n params['d'] = d\n return doCurl(\"get\",\"/logo\",params)\n end",
"def logo_path=(logo_path)\n\n if !logo_path.nil? && logo_path.to_s.length > 200\n fail ArgumentError, \"invalid value for 'logo_path', the character length must be smaller than or equal to 200.\"\n end\n\n @logo_path = logo_path\n end",
"def long_logo_web_url_for_dark_theme\n return @long_logo_web_url_for_dark_theme\n end",
"def crop_logo\n logo.recreate_versions! if crop_logo_x.present?\n end",
"def get_current_user_profile_image\n if ProfileImage.find_by(user_id: get_current_user.id).image_base64 != \"\"\n return ProfileImage.find_by(user_id: get_current_user.id)\n else\n return \"/img/logo/small-logo.png\"\n end\n end",
"def footer_gi_logo_link\n $tracer.trace(__method__)\n return ToolTag.new(nav.className(\"logo\"), __method__)\n end",
"def image_name\n @image_name || image_bundle.image_name\n end",
"def square_logo_web_url_for_light_theme\n return @square_logo_web_url_for_light_theme\n end",
"def get_title\n base_title = get_name_or_logo\n @title.nil? ? base_title : \"#{base_title} | #{@title}\"\n end",
"def logo_geometry(style = :original)\n @geometry ||= {}\n @geometry[style] ||= Paperclip::Geometry.from_file logo.path(style)\n end",
"def create_logo(text)\n tag = 'h1' if item.identifier == '/'\n tag ||= 'div'\n\n \"<\" + tag + \" id=\\\"logo\\\"><a href=\\\"/\\\">\" + text + \"</a></\" + tag + \">\"\n end",
"def mobile_badge_image\n badge_type.image_url + year.to_s + \"mobile.png\"\n end",
"def os_value\n if @value_os.nil?\n @value_os = get_os_value\n end\n @value_os\n end",
"def os\n return @os if @os\n raw_os = RbConfig::CONFIG['target_os']\n match = raw_os.match(/([a-z]+)/)\n if match\n @os = match[1]\n else\n @os = raw_os\n end\n end"
] | [
"0.8399021",
"0.76958764",
"0.76397866",
"0.74798477",
"0.74062383",
"0.73338646",
"0.7333163",
"0.7309223",
"0.7069844",
"0.705755",
"0.7018784",
"0.68977016",
"0.6812993",
"0.6805986",
"0.6795919",
"0.65749174",
"0.6571583",
"0.6544517",
"0.6536687",
"0.650472",
"0.6412267",
"0.6411037",
"0.6345775",
"0.6345775",
"0.6330812",
"0.6330812",
"0.6330812",
"0.6321848",
"0.63166684",
"0.63111985",
"0.62882847",
"0.6285999",
"0.62859666",
"0.6266396",
"0.62443894",
"0.62044775",
"0.6198976",
"0.6179712",
"0.617264",
"0.6163876",
"0.6163876",
"0.6122419",
"0.61006933",
"0.61006933",
"0.6076171",
"0.6045537",
"0.6041223",
"0.6027675",
"0.6024367",
"0.6024367",
"0.59805155",
"0.5975562",
"0.59725714",
"0.5963061",
"0.59608126",
"0.5954529",
"0.59175324",
"0.58410007",
"0.5829325",
"0.5807667",
"0.5802524",
"0.57894933",
"0.5782044",
"0.57753587",
"0.5697947",
"0.5696027",
"0.56864876",
"0.56658626",
"0.5579148",
"0.55706006",
"0.55625296",
"0.5557153",
"0.55397695",
"0.553389",
"0.55279887",
"0.5482286",
"0.54533994",
"0.5444794",
"0.54446816",
"0.54163396",
"0.5413934",
"0.5408945",
"0.5365205",
"0.53649056",
"0.5357703",
"0.5354856",
"0.53404737",
"0.5329194",
"0.53117216",
"0.5310102",
"0.5301158",
"0.52989453",
"0.52774084",
"0.52572495",
"0.52337056",
"0.5228943",
"0.52130103",
"0.5211577",
"0.51968974",
"0.5181891"
] | 0.8241193 | 1 |
Sets the logo property value. The main logo for the application. Not nullable. | def logo=(value)
@logo = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def application_logo=(value)\n @children['application-logo'][:value] = value\n end",
"def set_logo\n @logo = Logo.find(@company.logo_id) # NOTE: this raises a 404 if there's no logo,\n # which is what we want here.\n end",
"def logo=(v)\n @logo = v ? URI.parse(v) : nil\n end",
"def settings_logo\n @page_title = _('Logo_settings')\n @logo = Confline.get_value(\"Logo_Picture\")\n end",
"def set_logo\n @logo = Logo.find(params[:id])\n end",
"def logo\n get_attribute(Yoti::Attribute::APPLICATION_LOGO)\n end",
"def set_logo\n @logo = Logo.find(params[:id])\n end",
"def set_logo\n @logo = Logo.find(params[:id])\n end",
"def logo_path=(logo_path)\n\n if !logo_path.nil? && logo_path.to_s.length > 200\n fail ArgumentError, \"invalid value for 'logo_path', the character length must be smaller than or equal to 200.\"\n end\n\n @logo_path = logo_path\n end",
"def logo_builder\n ManifestBuilder::LogoBuilder\n end",
"def sp_logo\n sp.logo || DEFAULT_LOGO\n end",
"def logo\n return @logo\n end",
"def get_logo\n Oneclick::Application.config.ui_logo\n end",
"def logo\r\n \tlogo = image_tag(\"logo.png\", :alt => \"mens fashion today\", :class => \"round\")\r\n end",
"def logo\n\t\timage_tag(\"logo.png\", :alt => \"jobradar\", :class => \"round\")\n\tend",
"def logo_url\n @attributes[:logo_url]\n end",
"def logo\n image_tag(\"logo.png\", :alt => \"Sample App\", :class => \"round\")\n end",
"def logo\n image_tag(\"logo.png\", :alt => \"Sample App\", :class => \"round\")\n end",
"def logo\n content_tag(:span, \"HASTINGS FINE HOMES\", class: \"logo\")\n end",
"def logo\n image_tag('rubyLogo.png', alt: 'Ruby on Rails Sample App', class: 'round', height: \"50px\")\n end",
"def set_upload_logo\n @upload_logo = UploadLogo.find(params[:id])\n end",
"def logo; end",
"def logo; end",
"def interchange_logo\n q = []\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (default)]\"\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (large)]\"\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (medium)]\"\n q << \"[#{image_path(\"#{website.folder}/logo-sm.png\")}, (only screen and (max-width: 720px))]\"\n\n image_tag('', #\"#{website.folder}/logo.png\",\n class: \"no-resize no-resize-for-small\",\n alt: Setting.site_name(website),\n data: { interchange: q.join(\", \") })\n end",
"def interchange_logo\n q = []\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (default)]\"\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (large)]\"\n q << \"[#{image_path(\"#{website.folder}/logo.png\")}, (medium)]\"\n q << \"[#{image_path(\"#{website.folder}/logo-sm.png\")}, (only screen and (max-width: 720px))]\"\n\n image_tag('', #\"#{website.folder}/logo.png\",\n class: \"no-resize no-resize-for-small\",\n alt: Setting.site_name(website),\n data: { interchange: q.join(\", \") })\n end",
"def resize_image\n unless logo.nil?\n if logo.height != 100\n self.logo = logo.thumb('x100') # resize height and maintain aspect ratio\n end\n end\n end",
"def logo\n logo = image_tag(\"background.png\", :alt => \"background\")\n end",
"def logo\n raw_team['team_logo']\n end",
"def resize_logo\n logo = params[:airline][:logo]\n return if logo.nil?\n\n begin\n logo = MiniMagick::Image.new(logo.tempfile.path)\n logo.resize '150x25'\n rescue MiniMagick::Error\n # errors here will be caught in model validation\n end\n end",
"def configure_logo\n actual_path = \"app/javascript/svgs/logo.svg\"\n favicon_fallback_path = \"app/assets/images/perlmutterapp.svg\"\n favicon_path = \"app/assets/images/favicon.svg\"\n apple_icon_path = \"app/assets/images/favicon.png\"\n webpack_path = \"media/svgs/logo.svg\"\n if @args.empty?\n while @config[\"config\"][\"logo_path\"].nil?\n File.delete(actual_path) if File.exist?(actual_path)\n File.delete(favicon_path) if File.exist?(favicon_path)\n begin\n case @prompt.select(prompt_box(\"You may optionally provide your organization's logo in SVG format to use for branding. Please select an option to provide an SVG, or select from our presets:\"), %W[URL Filepath Presets Skip])\n when \"URL\"\n TTY::File.download_file(@prompt.ask(prompt_box(\"What is the URL for the SVG?\"), required: true), actual_path)\n TTY::File.copy_file(actual_path, favicon_path)\n @config[\"config\"][\"logo_path\"] = webpack_path\n when \"Filepath\"\n TTY::File.copy_file(@prompt.ask(prompt_box(\"What is the filepath for the SVG?\"), required: true), actual_path)\n TTY::File.copy_file(actual_path, favicon_path)\n @config[\"config\"][\"logo_path\"] = webpack_path\n when \"Presets\"\n emoji_map = JSON.parse(File.open(\"emoji.json\", \"rb\").read).to_h { |h| [h[\"name\"], h[\"codes\"].gsub(' ', '-').downcase] }\n code = @prompt.select(prompt_box(\"Select from online presets to be your logo! If unavailable, try another:\"), emoji_map, filter: true, required: true)\n TTY::File.download_file(\"https://twemoji.maxcdn.com/svg/#{code}.svg\", actual_path)\n TTY::File.copy_file(actual_path, favicon_path)\n @config[\"config\"][\"logo_path\"] = webpack_path\n else\n success_prompt(\"Setting logo skipped.\")\n TTY::File.copy_file(favicon_fallback_path, favicon_path)\n break\n end\n unless @config[\"config\"][\"logo_path\"].nil?\n success_prompt(\"Logo set.\")\n end\n rescue StandardError\n error_box(\"Setting logo failed. Please try again. If this persists, please reach out to the developers.\")\n end\n end\n else\n File.delete(actual_path) if File.exist?(actual_path)\n File.delete(favicon_path) if File.exist?(favicon_path)\n logo = get_argument_value(\"logo\", false, nil)\n option = get_argument_value(\"logo_option\", false, nil)\n if !logo.nil? && !option.nil?\n begin\n case option\n when \"url\"\n TTY::File.download_file(logo, actual_path)\n else\n TTY::File.copy_file(logo, actual_path)\n end\n TTY::File.copy_file(actual_path, favicon_path)\n @config[\"config\"][\"logo_path\"] = webpack_path\n success_prompt(\"Logo set.\")\n rescue StandardError\n error_box(\"Setting logo failed.\")\n raise ArgumentError\n end\n else\n success_prompt(\"Setting logo skipped.\")\n TTY::File.copy_file(favicon_fallback_path, favicon_path)\n end\n end\n write_png_from_svg(favicon_path, apple_icon_path, 180, 180)\nend",
"def build_logo\n if @logo && [email protected]?\n bottom = @document.note.empty? ? 75 : (75 + note_height)\n @pdf.image(@logo, at: [0, bottom], fit: [x(200), y(50)])\n end\n end",
"def logo\n\t\ts = image_tag('rails.png', :alt => \"Online Orders Application\")\n\t\treturn s\n\tend",
"def set_color_logo\n @color_logo = ColorLogo.find(params[:id])\n end",
"def logo_path\n root_path\n end",
"def logo_path\n root_path\n end",
"def logo_path\n root_path\n end",
"def logo_url\n logo? ? h.image_tag(logo.thumb_medium, alt: 'Logo', width: 90) :\n h.content_tag(:span, initial, class: 'brand_img_holder', style: 'width:43px; height:43px;')\n end",
"def logo\n logo=image_tag(\"rails.png\" , :alt=>\"Sample app\" ,:class=>\"round\")\n end",
"def logo\n rand_num = rand(1..13)\n \"https://pigment.github.io/fake-logos/logos/medium/color/#{rand_num}.png\"\n end",
"def company_customization_primary_logo\n @company && @company.customizations&.primary_header_logo\n end",
"def logo_url style = :original\n logo.url(style, timestamp: false)\n end",
"def logo_link\n root_path\n end",
"def casein_config_logo\n \t'/images/logo_ss.jpg'\n end",
"def logo_link\n link_to(logo_img, view_context.root_path)\n end",
"def logo_params\n params.require(:logo).permit(:name, :svg_url, :png_url, :jpg_url)\n end",
"def logo(options={})\n @logo ||= (\n if file = output.glob_relative('**/logo.*').first\n file #.relative_path_from(output)\n else\n keyword = options[:keyword]\n directory = options[:directory]\n keyword ||= (metadata.search || metadata.title || metadata.name)\n logo_search(keyword, directory)\n end\n )\n end",
"def logo=(_arg0); end",
"def application_logo(classes)\n if cookies[:layout] == 'application' || cookies[:layout].nil?\n image_tag(asset_pack_path('media/images/duszek-awesome.svg'), class:\"#{classes}\")\n else\n image_tag(asset_pack_path('media/images/duszki.png'), class:\"#{classes}\")\n end\n end",
"def get_team_logo(team) \n doc = getHTML(\"http://espn.go.com/mens-college-basketball/team/_/id/#{team.webExt}\") \n logo = doc.xpath(\"//meta[@property='og:image']/@content\").text\n team.update(logo: logo)\n end",
"def logo\n \"This is a cool logo !\"\n end",
"def logo_url\n logo? ? logo.url : profile_img\n end",
"def select_logo_title\n\t\tdefine_area\n\t\tif @area == 'model'\n\t\t\tlogo_title = t('layouts.main_filters.collection')\n\t\telsif @area == 'creation'\n\t\t\tlogo_title = t('layouts.main_filters.creation')\n\t\telsif @area == 'accessory' || @area == 'fabric' || @area == 'workshop'\n\t\t\tlogo_title = t('layouts.main_filters.shop')\n\t\tend\n\tend",
"def attach_logo(image_name)\n path = File.join(Rails.root.to_s, '/app/assets/images/', image_name)\n attachments.inline['logo.png'] = File.read(path)\n end",
"def logo\n rand_num = Random.rand(76) + 1\n \"http://www.biz-logo.com/examples/#{ rand_num < 10 ? \"00\" : \"0\" }#{rand_num}.gif\"\n end",
"def logo\n image_tag(\"boulder.png\", :width => \"100\", \n :height => \"75\",\n :alt => \"Learning RoR\", \n :class => \"round\")\n end",
"def g_home_logo(page_title)\n if page_title.empty?\n '<a href=\"#\"><img class=\"brand\" width=\"26\" src=\"/assets/botflip-logo.svg\"></a><a href=\"#\" class=\"brand\">Miniflip</a>'.html_safe\n # link_to \"MiniFeed\", \"#\", class: \"brand\"\n else\n '<a href=\"/\"><img class=\"brand\" width=\"26\" src=\"/assets/botflip-logo.svg\"></a><a href=\"/\" class=\"brand\">Miniflip</a>'.html_safe\n end\n end",
"def beer_logo_path\n self.logo_path.url(:medium)\n end",
"def base64_logo=(data)\n io = Base64FileUpload.new(data)\n self.logo = io\n end",
"def logo_tag\n image_tag \"rails.png\", :alt => @page_title\n end",
"def show_logo\n\tcompany = company_from_subdomain\n\tclient = Customer.find(params[:id], :conditions => [\"company_id = ?\", company.id])\n\n unless client.logo?\n render :nothing => true\n return\n end\n\n image = Magick::Image.read( client.logo_path ).first\n if image\n send_file client.logo_path, :filename => \"logo\", :type => image.mime_type, :disposition => 'inline'\n else\n render :nothing => true\n end\n image = nil\n GC.start\n end",
"def display_course_logo(course)\n content_tag(:span, class: ['image']) do\n image_tag(course.logo.medium.url || 'course_default_logo.svg')\n end\n end",
"def casein_config_logo\n 'casein/casein.png'\n end",
"def putLogo( a)\n params = Hash.new\n params['a'] = a\n return doCurl(\"put\",\"/logo\",params)\n end",
"def link_to_root_logo\n link_to(content_tag(:span, '', { class: 'navbarLogo', alt: 'Sky Logo' }), root_path, class: 'navbar-brand')\n end",
"def upload_logo_params\n params.require(:upload_logo).permit(:logo)\n end",
"def logo_url\n @shop.dig('logo_url','url')\n end",
"def crop_logo\n logo.recreate_versions! if crop_logo_x.present?\n end",
"def one_logo\n if self.class_type == 'logo' && Multimedium.find_all_by_class_type('logo').count > 0\n self.errors.add(:base, \"This store already has one logo\")\n false\n end\n end",
"def get_logo_display\n\t\tif !logged_in?\n\t\t\treturn \"City Produce\"\n\t\tend\n\t\tif current_user.admin?\n\t\t\treturn \"Admin\"\n\t\tend\n\t\treturn \"Home\"\n\tend",
"def update\n respond_to do |format|\n if @logo.update(logo_params)\n format.html { redirect_to @logo, notice: 'Logo was successfully updated.' }\n format.json { render :show, status: :ok, location: @logo }\n else\n format.html { render :edit }\n format.json { render json: @logo.errors, status: :unprocessable_entity }\n end\n end\n end",
"def update\n respond_to do |format|\n if @logo.update(logo_params)\n format.html { redirect_to @logo, notice: 'Logo was successfully updated.' }\n format.json { render :show, status: :ok, location: @logo }\n else\n format.html { render :edit, alert: 'Error updating logo' }\n format.json { render json: @logo.errors, status: :unprocessable_entity }\n end\n end\n end",
"def create_logo(text)\n tag = 'h1' if item.identifier == '/'\n tag ||= 'div'\n\n \"<\" + tag + \" id=\\\"logo\\\"><a href=\\\"/\\\">\" + text + \"</a></\" + tag + \">\"\n end",
"def add_logo file_path\n params = init_params\n request_url = UrlGenerator.url_for(\"account\", \"upload-logo\")\n asgn = SignatureGenerator.signature_for(http_verb: 'POST', url: request_url, params: params)\n\n res = self.post(request_url,\n query: params.merge!(\n {\n asgn: asgn,\n logo: File.new(file_path)\n }\n )\n )\n if res[\"status\"] == \"SUCCESS\"\n return res\n else\n return error_response_for(res)\n end\n end",
"def user_logo(user)\n image_tag(user.avatar_url)\n end",
"def logo_url\n if user_signed_in?\n current_user\n elsif admin_signed_in?\n current_admin_user\n else\n root_url\n end\n end",
"def add_subdomain_logo\n @donor.logo = process_donor_logo @donor.url\n @donor.save\n end",
"def delete_logo\n @company = Company.find(params[:id])\n @company.logo = nil\n\n if @company.save\n respond_with @company\n else\n respond_with @company, status: :unprocessable_entity\n end\n end",
"def logo_params\n params.require(:logo).permit(:image, :campaign_id, :user_id)\n end",
"def create\n @logo = Logo.new(logo_params)\n\n respond_to do |format|\n if @logo.save\n format.html { redirect_to @logo, notice: 'Logo was successfully created.' }\n format.json { render :show, status: :created, location: @logo }\n else\n format.html { render :new }\n format.json { render json: @logo.errors, status: :unprocessable_entity }\n end\n end\n end",
"def edit_logo_path \n # check if not a new vendor\n if Vendor.exists?(self.id)\n begin\n # previous vendor logo's extension in the db\n @last_extension = Vendor.find_by_id(self.id)\n # vendor_logo.url from paperclip (no image attached error message), self.logo from vendors/_form.html (no image selected to be uploaded)\n if self.vendor_logo.url().split('?')[0] == \"/vendor_logos/original/missing.png\" && self.logo == \"vendorlogos/logo.jpg\"\n # if there was no image selected at edit take the previous extension from db\n self.logo = @last_extension.logo\n # if there was a single/multiple value update then use the previous extension from db (for future implementations if need be)\n elsif self.vendor_logo.url().split('?')[0] == \"/vendor_logos/original/missing.png\" && self.logo == \"jpg\"\n self.logo = @last_extension.logo\n elsif self.vendor_logo.url().split('?')[0] == \"/vendor_logos/original/missing.png\" && self.logo == \"png\"\n self.logo = @last_extension.logo\n elsif self.vendor_logo.url().split('?')[0] == \"/vendor_logos/original/missing.png\" && self.logo == \"jpeg\"\n self.logo = @last_extension.logo\n else\n # if no image selected at vendor creation\n if self.logo != \"none\"\n # if there was an extension change\n @test = self.vendor_logo_file_name\n # if filename is purely non-latin then get the extension of the original filename manually\n if @test.scan(/^[a-zA-Z]/)\n self.logo = @test.split(\".\")[1]\n else\n self.logo = self.vendor_logo.url().split('?')[0].split('.')[1]\n end\n end \n end\n end\n # if it is a new vendor\n # set logo attribute to something, doesn't matter what if no picture is uploaded, if picture is uploaded then picture's extension\n else\n if self.vendor_logo.url().split('?')[0] == \"/vendor_logos/original/missing.png\" && self.logo == \"vendorlogos/logo.jpg\"\n self.logo = \"none\"\n else\n @test = self.vendor_logo_file_name\n # if filename is purely non-latin then get the extension of the original filename manually\n if @test.scan(/^[a-zA-Z]/)\n self.logo = @test.split(\".\")[1]\n else\n self.logo = self.vendor_logo.url().split('?')[0].split('.')[1]\n end\n end\n end\n end",
"def create\n @logo = Logo.new(logo_params)\n\n respond_to do |format|\n if @logo.save\n format.html { redirect_to @logo, notice: 'Logo was successfully created.' }\n format.json { render :show, status: :created, location: @logo }\n else\n format.html { render :new, alert: 'Error creating logo' }\n format.json { render json: @logo.errors, status: :unprocessable_entity }\n end\n end\n end",
"def header_logo_position=(header_logo_position)\n validator = EnumAttributeValidator.new('String', [\"LeftSide\", \"RightSide\", \"Center\"])\n unless validator.valid?(header_logo_position)\n fail ArgumentError, \"invalid value for 'header_logo_position', must be one of #{validator.allowable_values}.\"\n end\n @header_logo_position = header_logo_position\n end",
"def organisation_logo\n session[:organisation][:name]\n end",
"def logo_base_64\n 'data:image/png;base64, ' + Base64.encode64(File.open(\"#{Rails.root}/app/assets/images/logo_orgao.png\", 'rb').read).to_s\n end",
"def set_agency_logoable\n unless params[:context_type].nil?\n @agency_logoable = context_object( :include => :agency_logos )\n end\n end",
"def os=(value)\n if value == @defaults['os']\n @values.delete 'os' if @values.key? 'os'\n else\n @values['os'] = value\n end\n end",
"def os_version=(value)\n if value == @defaults['ai.device.osVersion']\n @values.delete 'ai.device.osVersion' if @values.key? 'ai.device.osVersion'\n else\n @values['ai.device.osVersion'] = value\n end\n end",
"def get_logo_for_season_type\n if object.season_type && object.season_type.code =~ /CSI/i\n h.image_tag( 'logo_csi.png', size: '25x16' )\n elsif object.season_type && object.season_type.code =~ /FIN/i\n h.image_tag( 'logo_fin.png', size: '40x16' )\n elsif object.season_type && object.season_type.code =~ /UISP/i\n h.image_tag( 'logo_uisp.png', size: '40x16' )\n elsif object.season\n object.season.get_season_type\n else\n ''\n end\n end",
"def logo \n logo = @@doc.xpath(\"//div[contains(@id, 'logo')]\")\n logo += @@doc.xpath(\"//div[contains(@class, 'logo')]\")\n # najdenie href = .... skript\n logo_href = logo.xpath(\".//a//@href\")\n logo_src = logo.xpath(\".//img//@src\")\n\n lg = @@doc.at_xpath(\"//*[contains(@src, 'logo')]\")\n #lg += @@doc.xpath(\"//*[contains(@style, 'logo')]\")\n\n # checking if any logo was found\n if logo_src.size != 0\n template_logo = Hash.new\n template_logo[:written] = false\n if logo_href.size != 0 \n template_logo[:href] = logo_href.to_s\n template_logo[:href_sign] = true\n end\n template_logo[:src] = @@name + logo_src.to_s\n template_logo[:image] = true\n else \n template_logo = Hash.new\n template_logo[:image] = false\n end\n\n if lg != nil\n template_logo = Hash.new\n template_logo[:written] = false\n link = lg.parent\n \n template_logo[:href] = link.xpath('.//@href').to_s\n template_logo[:href_sign] = true\n\n template_logo[:src] = @@name + link.xpath('.//@src').to_s\n template_logo[:image] = true\n end\n\n # if no logo was found then make home with domain name \n if template_logo[:image] == false && lg == nil\n template_logo[:written] = true\n template_logo[:name] = @@name\n template_logo[:src] = @@page_name.capitalize\n end\n\n # sending logo info into template\n template_logo\n end",
"def os=(value)\n if value == @defaults['ai.device.os']\n @values.delete 'ai.device.os' if @values.key? 'ai.device.os'\n else\n @values['ai.device.os'] = value\n end\n end",
"def os_ver=(value)\n if value == @defaults['osVer']\n @values.delete 'osVer' if @values.key? 'osVer'\n else\n @values['osVer'] = value\n end\n end",
"def default_image\n if instance.platform.name =~ /^(.*)-([^-]*)$/\n \"#{$1}:#{$2}\"\n else\n instance.platform.name\n end\n end",
"def set_img\n\n end",
"def set_order_logo\n count = Modules::Partner.count\n self.order_logo = count + 1\n end",
"def logo_params\n params.require(:logo).permit(:name,:user_id)\n end",
"def update\n respond_to do |format|\n if @upload_logo.update(upload_logo_params)\n format.html { redirect_to @upload_logo, notice: 'Upload logo was successfully updated.' }\n format.json { render :show, status: :ok, location: @upload_logo }\n else\n format.html { render :edit }\n format.json { render json: @upload_logo.errors, status: :unprocessable_entity }\n end\n end\n end",
"def remove_logo_confirmed\n @empresa.remove_logo!\n @empresa.save!\n end",
"def header\n\t\tlogo_path = Rails.root.join('app','assets','images','longbourn_logo.png')\n\t\timage logo_path, :width => 70, :height => 45\n\t\tdraw_text \"Informe de Desempeño de Alumnos\", :at => [100,25], size:12\n\t\tdraw_text \"Longbourn Institute\", :at => [100,10], size:12\n\tend",
"def color_logo_params\n params.require(:color_logo).permit(:name, :font_set, :theme, :primary_color, :secondary_color, :gallery_logo, :email_logo).merge(brand_id: current_brand.id)\n end",
"def og_image\n if @user && @user.image?\n @user.image.url\n elsif @person && @person.image?\n @person.image\n else\n root_url.chomp('/') + image_path('logo.png')\n end\n end"
] | [
"0.81188166",
"0.79651934",
"0.7922105",
"0.7590469",
"0.74548113",
"0.72697484",
"0.71743387",
"0.71743387",
"0.6668737",
"0.6615796",
"0.6579161",
"0.6576527",
"0.6492738",
"0.6410677",
"0.6339705",
"0.6334189",
"0.6295445",
"0.6295445",
"0.61755216",
"0.6102047",
"0.609333",
"0.60736614",
"0.60736614",
"0.6066318",
"0.6066318",
"0.60316706",
"0.5982868",
"0.5976733",
"0.5964024",
"0.5949723",
"0.5947018",
"0.5939689",
"0.5885032",
"0.5871525",
"0.5871525",
"0.5871525",
"0.5827625",
"0.58236295",
"0.5774469",
"0.57622623",
"0.573728",
"0.5731919",
"0.5722435",
"0.5711424",
"0.5665538",
"0.5649122",
"0.56439894",
"0.5642469",
"0.5627384",
"0.562537",
"0.56228507",
"0.5614536",
"0.5608206",
"0.56023127",
"0.5582923",
"0.5560023",
"0.5554093",
"0.55387825",
"0.5511489",
"0.55094445",
"0.5506821",
"0.5504184",
"0.5489983",
"0.54713345",
"0.5466912",
"0.5453065",
"0.5439872",
"0.5435883",
"0.54138756",
"0.5408895",
"0.5395371",
"0.52807146",
"0.52750766",
"0.52638495",
"0.5262771",
"0.52540374",
"0.52092475",
"0.5175527",
"0.51710856",
"0.5158746",
"0.5141082",
"0.51369566",
"0.51313925",
"0.5106886",
"0.5105497",
"0.50758547",
"0.5064075",
"0.50591415",
"0.505708",
"0.502581",
"0.5014896",
"0.49885595",
"0.49835768",
"0.4979934",
"0.4962978",
"0.49317986",
"0.48960087",
"0.48936486",
"0.48912218",
"0.48864838"
] | 0.8703266 | 0 |
Gets the notes property value. Notes relevant for the management of the application. | def notes
return @notes
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def notes\n @notes\n end",
"def notes\n @attributes[:notes]\n end",
"def notes\n @attributes[:notes]\n end",
"def notes=(value)\n @notes = value\n end",
"def notes=(value)\n @notes = value\n end",
"def notes=(value)\n @notes = value\n end",
"def notes=(value)\n @notes = value\n end",
"def notes\n @data[:notes]\n end",
"def notes\n @default_options.fetch(:notes, nil)\n end",
"def note\n @attributes[:note]\n end",
"def notes\n run(helm('get', 'notes', name))\n end",
"def notes=(v)\n Axlsx.validate_int v\n @notes = v\n end",
"def notes\n Notes.new(self)\n end",
"def get_notes(opts = {})\n data, status_code, headers = get_notes_with_http_info(opts)\n return data\n end",
"def note\n DBC.require( bu?, \"Vin non bu: La note n'est pas definie\" )\n\n @note\n end",
"def notes\n return Note.find(:all, :conditions => [\"type_id = ? AND owner = ?\", self.id, :property ])\n end",
"def note_content\n\t\tif self.note.present?\n\t\t\tself.note.content\n\t\telse\n\t\t\t\"-\"\n\t\tend\n\tend",
"def notes(wspace=workspace)\n\t\twspace.notes\n\tend",
"def notes=(notes)\n self.service.editObject({ \"notes\" => notes.to_s })\n self.refresh_details()\n end",
"def note\n return @poco_data[:note] unless @poco_data == nil\n pick_first_node(@poco.xpath('./poco:note'))\n end",
"def notes\n notes_range.to_a.map(&:to_s)\n end",
"def condition_note\r\n self.notes\r\n end",
"def notes params=nil\n @nimble.get \"contact/#{self.id}/notes\", params\n end",
"def note\n query_root_node(\"lgdp:note/text()\", @@NAMESPACES).to_s\n end",
"def get\n return @note unless @note.nil?\n filter = ::Evernote::EDAM::NoteStore::NoteFilter.new\n filter.order = ::Evernote::EDAM::Type::NoteSortOrder::CREATED\n filter.notebookGuid = @notebook.guid\n filter.timeZone = \"Asia/Tokyo\"\n filter.ascending = false # descending\n note_list = @auth_store.note_store.findNotes(@auth_store.auth_token, filter, 0, 1)\n if note_list.notes.empty?\n Log4r::Logger.log_internal { \"Note not found at #{@notebook.guid}\" }\n @note = ::Evernote::EDAM::Type::Note.new\n else\n @note = note_list.notes[0]\n end\n @note\n end",
"def body\n @note.content\n end",
"def note=(value)\n @children['note'][:value] = value\n end",
"def get_note\n note = queued_email_note\n note ? note.value.to_s : nil\n end",
"def get_receipt_notes\n result = ''\n result << self.additional_notes unless self.additional_notes.blank?\n result << \"\\n\\n\" if self.additional_notes && self.is_payed?\n result << I18n.t(:payed, {:scope=>[:receipt]}).upcase if self.is_payed?\n result\n end",
"def content\n return @content_ unless @content_.nil?\n @note.nil? and get\n @content_ = [email protected]? && [email protected]? ? @auth_store.note_store.getNoteContent(@auth_store.auth_token, @note.guid) : \"\"\n end",
"def all_notes\n self.has_notes? ? self.annotations.map {|n| n.body }.join(' ') : '' \n end",
"def _notes\n @_notes ||= Hash.new do |h, k|\n h[k] = {}\n end\n end",
"def notes\n\t\tNote.find(:all)\n\tend",
"def note_contents\n self.notes.map(&:content)\n end",
"def note_contents\n self.notes.map(&:content)\n end",
"def note_contents\n self.notes.collect do |note|\n note.content\n end\n end",
"def note_contents\n self.notes.collect {|note| note.content }\n end",
"def notes=(notes)\n if !notes.nil? && notes.to_s.length > 255\n fail ArgumentError, 'invalid value for \"notes\", the character length must be smaller than or equal to 255.'\n end\n\n if !notes.nil? && notes.to_s.length < 0\n fail ArgumentError, 'invalid value for \"notes\", the character length must be great than or equal to 0.'\n end\n\n @notes = notes\n end",
"def note(name, note=nil)\n if note.nil?\n details(name).rule_notes\n else\n @driver.setRuleNotes([name], [note])\n end\n\n end",
"def title\n @note.title\n end",
"def get_note(note_id)\n @notes[note_id]\n end",
"def get_note(note_id)\n @notes[note_id]\n end",
"def set_Note(value)\n set_input(\"Note\", value)\n end",
"def log_notes\n session[:log_notes]||[]\n end",
"def notes; end",
"def notes; end",
"def notes; end",
"def note_name\n note_info(self[:note]).pitch_class\n end",
"def notes(opts)\n return \"\"\n end",
"def show_notes\n info \"showing notes\"\n res = run(\"git notes --ref #{refname} show\")\n if res[:val] == 0\n info \"existing note: #{res[:out].strip}\"\n else\n info \"no existing note\"\n end\n end",
"def set_Note(value)\n set_input(\"Note\", value)\n end",
"def notes\n @reason_structure[@num]\n end",
"def note_contents\n self.notes.each.map{|note| note.content}\n end",
"def note_contents=(notes)\n notes.each do |content|\n if content.strip != ''\n self.notes.build(content: content)\n end\n end\n end",
"def maker_note\n @maker_note ||= MakerNote.new(EXIF.exif_data_get_mnote_data(self))\n end",
"def payment_notes_label_and_value(notes = '')\n display_text = notes.blank? ? t('none_plur') : notes\n\n field_or_none(\"#{t('activerecord.attributes.payment.notes')}\",\n display_text, tag: :div)\n end",
"def _Notes\n while true\n\n _save1 = self.pos\n while true # choice\n _tmp = apply(:_Note)\n break if _tmp\n self.pos = _save1\n _tmp = apply(:_SkipBlock)\n break if _tmp\n self.pos = _save1\n break\n end # end choice\n\n break unless _tmp\n end\n _tmp = true\n set_failed_rule :_Notes unless _tmp\n return _tmp\n end",
"def new_notes=(note)\n\t\tif !note.blank? then\n\t\t\ttime = Time.now.strftime(\"%m-%d-%y %I:%M %p\")\n\t\t\tnew_note = \"<p>#{note}<br/>\"\n\t\t\tnew_note << \"<span class=\\\"info\\\">\"\n\t\t\tnew_note << \"[#{time}]\"\n\t\t\tnew_note << \"</span></p>\"\n\t\t\tif self.notes.blank? then\n\t\t\t\tself.notes = new_note\n\t\t\telse\n\t\t\t\tself.notes << new_note\n\t\t\tend\n\t\tend\n\tend",
"def notes\n data_series.find_all { |ds| ds.options[:note].present? }\n .map { |ds| { ds_name: ds.name, body: ds.options[:note] }}\n end",
"def other_notes_key\n Observation.other_notes_key\n end",
"def notes\n\t\tall.map do |tone|\n\t\t\tKey.from_index(tone.tone, tone.letter_index).name\n\t\tend.extend(NoteSequence)\n\tend",
"def collection\n return @client.api_helper.collection(\"notes\")\n end",
"def get_key_note()\n if @metadata[:key_note] == nil\n if @metadata[:key_type] == nil\n # There is no key type specified, nor key note, so pick one at random.\n self.key_note([:cb, :b, :c, :cs, :db, :d, :ds, :eb, :e, :f, :fs, :gb, :g, :gs, :ab, :a, :as, :bb].choose)\n elsif @metadata[:key_type] == :major\n # The note picked must be compatible with the key type: major.\n self.key_note([:c, :g, :d, :a, :e, :b, :cb, :fs, :gb, :db, :cs, :ab, :eb, :bb, :f].choose)\n elsif @metadata[:key_type] == :minor\n # The note picked must be compatible with the key type: minor.\n self.key_note([:a, :e, :b, :fs, :cs, :gs, :ab, :ds, :eb, :bb, :as, :f, :c, :g, :d].choose)\n else\n raise \"Invalid key type: #{ @metadata[:key_type] }\"\n end\n end\n return @metadata[:key_note]\n end",
"def notes=(v) Axlsx.validate_int v; @notes = v; end",
"def population_notes\n query_root_node(\"fao:populationNotes/text()\", @@NAMESPACES).to_s\n end",
"def comments\n @properties[\"C\"]\n end",
"def journal_notes\n css = \"Relationship[@Name='Incident has Notes']\" +\n \" BusinessObject[@Name=JournalNote]\"\n return @dom.css(css).map do |element|\n JournalNote.new(element.to_xml)\n end\n end",
"def evernote_note_titles\n Rails.cache.fetch(\"#{cache_key}/evernote_note_titles\", expires_in: 12.hours) do\n Evernote::NoteStoreExplorer.new(self).app_notes.map {|n| n.title}\n end\n end",
"def note?\n return true unless Settings.note.blank?\n return false\n end",
"def note_contents\n self.notes.collect {|note| note.content}\n end",
"def all_notes\n result = {}\n self.class.all_note_fields.each do |field|\n value = send(field).to_s\n result[field] = value.presence\n end\n result\n end",
"def note(note)\n\t\t@note = note\n\tend",
"def set_notes\n user_notes = current_user.notes\n @notes = user_notes.where.not(id: nil)\n @new_note = action_name != 'create' ? user_notes.build : user_notes.build(note_params)\n end",
"def notes( params={} )\n notes = get_connections(\"notes\", params)\n return map_connections notes, :to => Facebook::Graph::Note\n end",
"def get_notes(id, opts = {})\n data, status_code, headers = get_notes_with_http_info(id, opts)\n return data\n end",
"def get_notes(id, opts = {})\n data, status_code, headers = get_notes_with_http_info(id, opts)\n return data\n end",
"def membership_payment_notes\n payment_notes(THIS_PAYMENT_TYPE)\n end",
"def notes=(val)\n @reason_structure[@num] = val.to_s\n end",
"def note(notebook)\n @note = Note.new(notebook, @@auth_store) if @note.nil?\n @note\n end",
"def note_contents=(notes)\n notes.each do |content|\n if content.strip != '' # => ignores blank notes\n self.notes.build(content: content) \n end\n end\n end",
"def note_params\n params[:note]\n end",
"def note\n comment_list = []\n return @notes if [email protected]?\n for page in @pages\n next if !page || !page.list || page.list.size <= 0\n note_page = page.list.dup\n \n note_page.each do |item|\n next unless item && (item.code == 108 || item.code == 408)\n comment_list.push(item.parameters[0])\n end\n end\n @notes = comment_list.join(\"\\r\\n\")\n return @notes\n end",
"def created\n @note.created\n end",
"def list_notes(identifier, opts = {})\n data, _status_code, _headers = list_notes_with_http_info(identifier, opts)\n return data\n end",
"def index\n @property_notes = PropertyNote.all\n end",
"def note(*note_names)\n midi_values = note_names.map { |name| Midishark::Notes.note(name) }\n @notes << midi_values\n\n midi_values\n end",
"def notes(blog_name, post_id=nil, options = {})\n validate_options([:id, :before_timestamp, :mode], options)\n options[:id] ||= post_id\n get(blog_path(blog_name, 'notes'), options)\n end",
"def land_area_notes\n query_root_node(\"fao:landAreaNotes/text()\", @@NAMESPACES).to_s\n end",
"def rip_notes()\n if @version >= IOS_VERSION_9\n @database.execute(\"SELECT ZICNOTEDATA.ZNOTE FROM ZICNOTEDATA\") do |row|\n self.rip_note(row[\"ZNOTE\"])\n end\n end\n\n if @version == IOS_LEGACY_VERSION\n @database.execute(\"SELECT ZNOTE.Z_PK FROM ZNOTE\") do |row|\n self.rip_note(row[\"Z_PK\"])\n end\n end\n end",
"def set_note\n @note = current_user.notes.find(params[:id])\n end",
"def notes?\n result = false\n self.class.all_note_fields.each do |field|\n result = send(field).to_s.match(/\\S/)\n break if result\n end\n result\n end",
"def notes(params = {})\n @notes ||= MailchimpAPI::Note.find(:all, params: { member_id: id }.deep_merge(prefix_options).deep_merge(params))\n end",
"def all_notes=(notes)\n self.class.all_note_fields.each do |field|\n send(\"#{field}=\", notes[field])\n end\n end",
"def notebook\n @note.notebookGuid\n end",
"def starred_notes\n fetch_notes_for nil, true\n end",
"def notes_show_formatted\n Observation.show_formatted(notes)\n end",
"def get_note_list\n note = queued_email_note\n note ? note.value.to_s.split(\",\") : nil\n end"
] | [
"0.7818876",
"0.77337897",
"0.77337897",
"0.756268",
"0.756268",
"0.756268",
"0.756268",
"0.7554823",
"0.7129449",
"0.7068823",
"0.68051517",
"0.6730072",
"0.66614723",
"0.6489704",
"0.64825076",
"0.6463735",
"0.6454054",
"0.64469033",
"0.6415561",
"0.6355015",
"0.63356125",
"0.6301293",
"0.6265545",
"0.62238437",
"0.6130591",
"0.6128379",
"0.6101455",
"0.6100087",
"0.6060448",
"0.60501724",
"0.6028225",
"0.60174596",
"0.6011953",
"0.59909934",
"0.59909934",
"0.59816",
"0.597087",
"0.59490055",
"0.5895699",
"0.5884244",
"0.5881921",
"0.5881921",
"0.58246577",
"0.57807356",
"0.5772523",
"0.5772523",
"0.5772523",
"0.5771902",
"0.5764872",
"0.57540303",
"0.5753052",
"0.5747787",
"0.57455754",
"0.56789744",
"0.56726927",
"0.5659177",
"0.564335",
"0.56189984",
"0.56180227",
"0.55927545",
"0.5586096",
"0.55754524",
"0.5546928",
"0.5543191",
"0.55400455",
"0.5539879",
"0.5528963",
"0.5527262",
"0.552448",
"0.55187476",
"0.5500795",
"0.5489849",
"0.54889715",
"0.54889286",
"0.54730797",
"0.54730797",
"0.54681635",
"0.5463374",
"0.54427254",
"0.5433665",
"0.5431861",
"0.5429769",
"0.54211867",
"0.54202807",
"0.5413033",
"0.54128337",
"0.54092336",
"0.5389563",
"0.5379368",
"0.53748727",
"0.5373347",
"0.5367939",
"0.5365544",
"0.53563845",
"0.5350803",
"0.53375584",
"0.53315586"
] | 0.76053286 | 6 |
Sets the notes property value. Notes relevant for the management of the application. | def notes=(value)
@notes = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def notes=(notes)\n self.service.editObject({ \"notes\" => notes.to_s })\n self.refresh_details()\n end",
"def notes=(v)\n Axlsx.validate_int v\n @notes = v\n end",
"def set_Note(value)\n set_input(\"Note\", value)\n end",
"def set_Note(value)\n set_input(\"Note\", value)\n end",
"def notes=(notes)\n if !notes.nil? && notes.to_s.length > 255\n fail ArgumentError, 'invalid value for \"notes\", the character length must be smaller than or equal to 255.'\n end\n\n if !notes.nil? && notes.to_s.length < 0\n fail ArgumentError, 'invalid value for \"notes\", the character length must be great than or equal to 0.'\n end\n\n @notes = notes\n end",
"def set_notes\n user_notes = current_user.notes\n @notes = user_notes.where.not(id: nil)\n @new_note = action_name != 'create' ? user_notes.build : user_notes.build(note_params)\n end",
"def note=(value)\n @children['note'][:value] = value\n end",
"def note_contents=(notes)\n notes.each do |content|\n if content.strip != ''\n self.notes.build(content: content)\n end\n end\n end",
"def notes\n @default_options.fetch(:notes, nil)\n end",
"def song_notes=(notes)\n notes.each do |note|\n self.notes.build(content: note)\n end\n end",
"def song_notes=(notes)\n notes.each do |note|\n self.notes.build(content: note)\n end\n end",
"def note_contents=(notes)\n notes.each do |note|\n if note != \"\"\n self.notes << Note.find_or_create_by(content: note)\n end\n end\n\n end",
"def note_contents=(notes)\n notes.each do |content|\n if content.strip != '' # => ignores blank notes\n self.notes.build(content: content) \n end\n end\n end",
"def note_contents=(notes)\n \tnotes.each do |content|\n \t\tself.notes << Note.find_or_create_by(content: content) unless content == \"\"\n \tend\n end",
"def note_contents=(notes)\n notes.each do |note|\n if note.strip != \"\"\n content = self.notes.build(content: note)\n content.save\n end\n end\n end",
"def all_notes=(notes)\n self.class.all_note_fields.each do |field|\n send(\"#{field}=\", notes[field])\n end\n end",
"def set_note\n @note = current_user.notes.find(params[:id])\n end",
"def notes\n run(helm('get', 'notes', name))\n end",
"def new_notes=(note)\n\t\tif !note.blank? then\n\t\t\ttime = Time.now.strftime(\"%m-%d-%y %I:%M %p\")\n\t\t\tnew_note = \"<p>#{note}<br/>\"\n\t\t\tnew_note << \"<span class=\\\"info\\\">\"\n\t\t\tnew_note << \"[#{time}]\"\n\t\t\tnew_note << \"</span></p>\"\n\t\t\tif self.notes.blank? then\n\t\t\t\tself.notes = new_note\n\t\t\telse\n\t\t\t\tself.notes << new_note\n\t\t\tend\n\t\tend\n\tend",
"def notes_attributes=(notes)\n notes.each do |note|\n song_note = self.notes.build(content: note)\n song_note.save\n end\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note(n)\n @note = 0\n end",
"def set_notes_service(password = nil)\n @notes_id_password = password\n @service = Service::NOTES\n end",
"def notes\n @notes\n end",
"def set_notes_list\n @notes_list = @note.notes_lists.find(params[:id])\n end",
"def note(note)\n\t\t@note = note\n\tend",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def notes=(val)\n @reason_structure[@num] = val.to_s\n end",
"def set_note\n\t\t@note = Note.find(params[:id])\n\tend",
"def notes=(v) Axlsx.validate_int v; @notes = v; end",
"def set_note\n #prevent from searching note from different user\n @note = current_user.notes.find(params[:id])\n end",
"def update!(notes)\n fetch_notes\n show_notes\n push_notes(notes)\n end",
"def notes\n Notes.new(self)\n end",
"def note(*note_names)\n midi_values = note_names.map { |name| Midishark::Notes.note(name) }\n @notes << midi_values\n\n midi_values\n end",
"def note=(new_note)\n @note = new_note[0..25_000]\n end",
"def add_note(note)\n self.notes = notes.present? ? \"\\n\\n#{note}\" : note\n save\n end",
"def set_textnote\n @textnote = Textnote.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n @description = @note.overview\n end",
"def note_contents=(contents)\n contents.each do |content|\n # next if content == ''\n if !content.empty?\n note = self.notes.build(content: content)\n # note = Note.find_or_create_by(content: content)\n # self.notes << note\n end\n end\n end",
"def set_note\r\n @note = Note.find(params[:id])\r\n end",
"def set_notebook_note\n @notebook_note = Notebook::Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def set_note\n @note = Note.find(params[:id])\n end",
"def notes\n @attributes[:notes]\n end",
"def notes\n @attributes[:notes]\n end",
"def set_property_note\n @property_note = PropertyNote.find(params[:id])\n end",
"def set_note\n @note = Note.friendly.find(params[:id])\n\n end",
"def note_contents=(array)\n array.each do |i|\n if !i.empty?\n note = Note.find_or_create_by(content: i)\n self.notes << note\n end\n end\n end",
"def set_output_notes(notes)\n @out_notes.clear\n notes.each do |note|\n dup_note = set_added_note_attrs note\n @out_notes << dup_note\n end\n @current_start = notes.last.start + notes.last.duration if not notes.nil? && notes.length > 0\n self\n end",
"def set_note\n set_cookie_defaults unless cookies[:demo_note].present?\n params[:note] ||= JSON.parse(cookies[:demo_note])\n title = params[:note].try(:[], \"title\") ? html_clean(params[:note][:title]) : t(\"note.sample.title\")\n content = params[:note].try(:[], \"content\") ? html_clean(params[:note][:content]) : t(\"note.sample.content\")\n\n @note = Note.new(title: title, content: content)\n unless @note.has_minimum_number_of_concepts?\n @note.content = t(\"note.sample.content\")\n flash[:not_enough_pairs] = true\n end\n @note.prepare_inputs\n cookies.permanent[:demo_note] = @note.attributes.slice(\"title\", \"content\").to_json\n end",
"def notes params=nil\n @nimble.get \"contact/#{self.id}/notes\", params\n end",
"def set_order_note\n @order_note = OrderNote.find(params[:id])\n end",
"def _notes\n @_notes ||= Hash.new do |h, k|\n h[k] = {}\n end\n end",
"def set_to_do_note\n @to_do_note = ToDoNote.find(params[:id])\n end",
"def set_note(value)\n note = queued_email_note\n unless note\n note = QueuedEmailNote.new\n note.queued_email_id = id\n end\n note.value = value\n note.save\n self.queued_email_note = note\n end",
"def notes\n return @notes\n end",
"def notes\n return @notes\n end"
] | [
"0.8099334",
"0.76059145",
"0.75253016",
"0.74528295",
"0.7438469",
"0.73540175",
"0.69978106",
"0.69937116",
"0.6835985",
"0.6820149",
"0.6820149",
"0.6760869",
"0.6668474",
"0.66541296",
"0.66436833",
"0.66384596",
"0.6605097",
"0.660212",
"0.65988207",
"0.65647656",
"0.6514524",
"0.6514524",
"0.64800626",
"0.6457398",
"0.6442412",
"0.6440883",
"0.6432445",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.64068276",
"0.63767016",
"0.633451",
"0.6259039",
"0.6238584",
"0.6210068",
"0.6196042",
"0.6174601",
"0.60779136",
"0.6056369",
"0.6047741",
"0.6026127",
"0.6024605",
"0.6024414",
"0.5994777",
"0.5980499",
"0.5980499",
"0.5980499",
"0.5980499",
"0.5980499",
"0.5980499",
"0.5980499",
"0.5978622",
"0.5978622",
"0.5949468",
"0.5946609",
"0.5942251",
"0.5938404",
"0.59161067",
"0.583784",
"0.5834069",
"0.58212286",
"0.5813834",
"0.57847536",
"0.57708126",
"0.57708126"
] | 0.85654 | 3 |
Gets the oauth2RequirePostResponse property value. The oauth2RequirePostResponse property | def oauth2_require_post_response
return @oauth2_require_post_response
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oauth2_require_post_response=(value)\n @oauth2_require_post_response = value\n end",
"def get_response()\n if has_errors?\n return get_error_response()\n end\n @values[\"RESPONSE\"]\n end",
"def get_response_status\n @response_status\n end",
"def response_status\n @response[:status]\n end",
"def oauth_response?\n !oauth_response.nil? && auth_session? && auth_session[:auth_request_class] == self.class.name && auth_session[:auth_method] == \"oauth\"\n end",
"def status\n @response && @response.status\n end",
"def auth_response\n @auth_response ||= self.authenticate\n end",
"def is_approval_request\n return @is_approval_request\n end",
"def is_approval_required_for_update\n return @is_approval_required_for_update\n end",
"def response\n @response ||= JSON.parse(request.feedback.body).deep_symbolize_keys if valid_body?\n end",
"def response\n @response\n end",
"def request_approval_settings\n return @request_approval_settings\n end",
"def response\n @_response\n end",
"def http_response\n return @http_response\n end",
"def token_request_response\n @tr_response\n end",
"def response_code\n @response.code\n end",
"def oauth_required\n invalid_oauth_response and return false unless current_token\n end",
"def response\n @response ||= begin\n if self.class.http_method == :post\n self.class.post path, :body => post_data\n else\n self.class.send self.class.http_method, path\n end\n end\n end",
"def outcome_post_successful?\n @outcome_response && @outcome_response.success?\n end",
"def response\n _options.fetch(:response)\n end",
"def response\r\n @response\r\n end",
"def response\n @response\n end",
"def is_approval_required_for_add\n return @is_approval_required_for_add\n end",
"def response_status\n fetch_response.status\n end",
"def auth_token\n self.auth_response[:auth_token]\n end",
"def password_reset_required\n data.password_reset_required\n end",
"def api_response\n @response\n end",
"def getRedirectUrl\n raise ArgumentError, \"Response body doesnot exist\" if @_responseBody.nil? || @_responseBody.empty?\n resObj = toObject\n return false if resObj.redirect_url.nil? || resObj.redirect_url.empty?\n resObj.redirect_url\n end",
"def response\n @response || perform and @response\n end",
"def response?\n @type == :response\n end",
"def response\n @response\n end",
"def response\n @response\n end",
"def oauth_token\n read_attribute(oauth_token_field)\n end",
"def success?(response)\n response[:response_code].to_i == APPROVED\n end",
"def success?(response)\n response[:response_code].to_i == APPROVED\n end",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def oauth_token\n @json['oauthToken']\n end",
"def token\n _response_word.fetch(\"token\", nil)\n end",
"def response\n @@response\n end",
"def response?(params)\n params.key?('responseStatusCode') || params.key?('responseErrorReason')\n end",
"def verified?\n response[\"verified\"]\n end",
"def response?\n done? ? @grpc_op.result == :response : false\n end",
"def is_meeting_response\n return @is_meeting_response\n end",
"def authorization_status\n @json_body['authorization_status']\n end",
"def requested_access_token_version\n return @requested_access_token_version\n end",
"def last_response\n @response\n end",
"def response\n @response ||= request!(true)\n end",
"def performed?\n response_body\n end",
"def response?\n\t\treturn ((self.type == PACKET_TYPE_RESPONSE) ||\n\t\t (self.type == PACKET_TYPE_PLAIN_RESPONSE))\n\tend",
"def response?\n\t\treturn ((self.type == PACKET_TYPE_RESPONSE) ||\n\t\t (self.type == PACKET_TYPE_PLAIN_RESPONSE))\n\tend",
"def get_OAuthTokenSecret()\n \t return @outputs[\"OAuthTokenSecret\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend",
"def get_Response()\n \t return @outputs[\"Response\"]\n \tend"
] | [
"0.77776873",
"0.542151",
"0.5420377",
"0.52322245",
"0.5204135",
"0.5042564",
"0.5040334",
"0.5021963",
"0.5020192",
"0.5019103",
"0.49834907",
"0.4940665",
"0.49222797",
"0.49032372",
"0.49025312",
"0.4891973",
"0.488825",
"0.4849503",
"0.48309827",
"0.4822635",
"0.48196617",
"0.48023623",
"0.4800799",
"0.47995675",
"0.478341",
"0.47796085",
"0.47788787",
"0.47694048",
"0.4767565",
"0.47449276",
"0.47421563",
"0.47421563",
"0.47350907",
"0.47248912",
"0.47248912",
"0.47230673",
"0.47230673",
"0.47230673",
"0.47230673",
"0.47230673",
"0.47230673",
"0.47230673",
"0.47230673",
"0.47230673",
"0.4722416",
"0.4692704",
"0.4675706",
"0.46641517",
"0.466098",
"0.46471658",
"0.4642291",
"0.46411812",
"0.46383458",
"0.46244758",
"0.4616537",
"0.4613226",
"0.46078396",
"0.46078396",
"0.46015316",
"0.45858344",
"0.45858344",
"0.45858344",
"0.45858344",
"0.45858344",
"0.45858064",
"0.45858064",
"0.45858064",
"0.45858064",
"0.45858064",
"0.45858064",
"0.45858064",
"0.45858064",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224",
"0.45857224"
] | 0.82434875 | 0 |
Sets the oauth2RequirePostResponse property value. The oauth2RequirePostResponse property | def oauth2_require_post_response=(value)
@oauth2_require_post_response = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oauth2_require_post_response\n return @oauth2_require_post_response\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def set_ResponseType(value)\n set_input(\"ResponseType\", value)\n end",
"def is_approval_required_for_update=(value)\n @is_approval_required_for_update = value\n end",
"def set_http_response(response, skip_body=false)\n @data[:response][:instance] = HTTPResponse.new(\n response.code,\n skip_body ? nil : response.body,\n response.to_hash,\n response\n )\n nil\n end",
"def response=(value)\n @response_before_type_cast = value\n self.textual_response = value\n end",
"def is_tallying_responses=(value)\n @is_tallying_responses = value\n end",
"def is_meeting_response=(value)\n @is_meeting_response = value\n end",
"def set_response!\n get_responding_methods\n self.responding_object = @responding_object\n if successful?\n self.status_message ||= (@success_message || \"Status: successful\")\n else\n self.status_message ||= (@failure_message || \"Status: unsuccessful\")\n end\n return true\n end",
"def response_params\n params.require(:response).permit(:body, :post_id, :user_id)\n end",
"def httppost=(value)\n Curl.set_option(:httppost, value_for(value, :string), handle)\n end",
"def redirection_after_post=(redirection_after_post)\n validator = EnumAttributeValidator.new('String', [\"platform-default\", \"Always Enable\", \"Bootloader\"])\n unless validator.valid?(redirection_after_post)\n fail ArgumentError, \"invalid value for \\\"redirection_after_post\\\", must be one of #{validator.allowable_values}.\"\n end\n @redirection_after_post = redirection_after_post\n end",
"def auth_exception_response(auth_exception_response=nil)\n return @auth_exception_response unless auth_exception_response\n @auth_exception_response = auth_exception_response\n end",
"def oauth_response?\n !oauth_response.nil? && auth_session? && auth_session[:auth_request_class] == self.class.name && auth_session[:auth_method] == \"oauth\"\n end",
"def oauth_required\n invalid_oauth_response and return false unless current_token\n end",
"def set_response(response, body, status = 200)\n raise NotImplementedError\n end",
"def set_response(response, body, status = 200)\n raise NotImplementedError\n end",
"def set_ResponseFlags(value)\n set_input(\"ResponseFlags\", value)\n end",
"def set_ResponseFlags(value)\n set_input(\"ResponseFlags\", value)\n end",
"def is_approval_required_for_add=(value)\n @is_approval_required_for_add = value\n end",
"def request_approval_settings=(value)\n @request_approval_settings = value\n end",
"def response=(response); @response = response end",
"def not_final\n @resp[:expectUserResponse] = true\n end",
"def is_approval_request=(value)\n @is_approval_request = value\n end",
"def post_and_run(options)\n options[:eval_response] = true\n\n self.post options\n end",
"def set_response\n @response_survey = @survey.responses.find(params[:id])\n render 'shared/not_found', :status => 404 unless @response_survey\n end",
"def valid_response?\n if self.required? && !self.has_response? then\n false\n else\n # other validations\n true\n end\n end",
"def allows_response_by(responder)\n self.allows_response?(responder)\n end",
"def set_submission_response\n @submission_response = SubmissionResponse.find(params[:id])\n end",
"def response=(response)\n self.success = response.success?\n self.authorization = response.authorization\n self.message = response.message\n self.params = response.params\n rescue ActiveMerchant::ActiveMerchantError => e\n self.success = false\n self.authorization = nil\n self.message = e.message\n self.params = {}\n end",
"def set_response_body_stub options = {}\n OAuth2::Response.any_instance.stubs(:body => @default_response_body.merge(options).to_json)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end",
"def set_ResponseFormat(value)\n set_input(\"ResponseFormat\", value)\n end"
] | [
"0.7384578",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.49561697",
"0.48549655",
"0.48052233",
"0.47593302",
"0.4755951",
"0.47549295",
"0.47147712",
"0.47095925",
"0.46776247",
"0.46474385",
"0.4597393",
"0.45911664",
"0.4574963",
"0.45514244",
"0.45514244",
"0.4531194",
"0.4531194",
"0.45108452",
"0.444739",
"0.44279617",
"0.44246015",
"0.43797347",
"0.43712834",
"0.4362802",
"0.43590692",
"0.4347112",
"0.43375164",
"0.43360147",
"0.43279055",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422",
"0.43139422"
] | 0.9044024 | 0 |
Gets the optionalClaims property value. Application developers can configure optional claims in their Azure AD applications to specify the claims that are sent to their application by the Microsoft security token service. For more information, see How to: Provide optional claims to your app. | def optional_claims
return @optional_claims
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def optional_claims=(value)\n @optional_claims = value\n end",
"def claims\n JWT.decode(jwt_token_from_request, Rails.application.secrets.secret_key_base, true)\n rescue\n nil\n end",
"def required_claims; end",
"def required_claims; end",
"def auth0_claims(verify_signature: true)\n @auth0_claims ||= JWT.decode(auth0_id_token,\n ENV['AUTH0_CLIENT_SECRET'],\n verify_signature,\n verify_iat: true,\n algorithm: 'HS256').first.with_indifferent_access\n rescue JWT::ExpiredSignature\n {}\n rescue JWT::DecodeError\n {}\n end",
"def fetch_aud\n Settings.oidc.isolated_audience.claims\n end",
"def fetch_aud\n Settings.oidc.isolated_audience.claims\n end",
"def accept_mapped_claims\n return @accept_mapped_claims\n end",
"def openid_optional_fields(value = nil)\n rw_config(:openid_optional_fields, value, [])\n end",
"def default_claim_set\n default_claims = []\n default_claims << claim_pair(:issuer, self.issuer) if(self.issuer)\n default_claims << claim_pair(:audience, self.audience) if(self.audience)\n default_claims << claim_pair(:expires_on, Time.now.to_i + self.expiration) \n return default_claims\n end",
"def get_claim(id:)\n get(\"claims/#{id}\")\n end",
"def optional?\n instance_variable_defined?(\"@optional\") ? @optional : false\n end",
"def group_membership_claims\n return @group_membership_claims\n end",
"def optional?\n return config[:optional]\n end",
"def claims(params = {})\n scope 'default'\n post('claims/', params)\n end",
"def claimed?\n ! @claim.nil?\n end",
"def additional_identity?\n secondary_identity? && participant_profiles.blank?\n end",
"def user_from_claims\n user = Auth0::UserStruct.new\n user.sub = auth0_claims[:sub]\n user.email = auth0_claims[:email]\n user.email_verified = auth0_claims[:email_verified]\n user.picture = auth0_claims[:picture]\n user.user_metadata = (auth0_claims[:user_metadata] || {}).with_indifferent_access\n user.app_metadata = (auth0_claims[:app_metadata] || {}).with_indifferent_access\n user.exp = auth0_claims[:exp]\n user.iat = auth0_claims[:iat]\n user.iss = auth0_claims[:iss]\n user.aud = auth0_claims[:aud]\n user\n end",
"def claim\n if expiration_time\n CLAIM_EXPIRATION_TIME\n elsif not_before_time\n CLAIM_NOT_BEFORE_TIME\n end\n end",
"def required_claims=(_arg0); end",
"def required_claims=(_arg0); end",
"def optional?\n @optional\n end",
"def list_optional\n @optional ||= []\n end",
"def accept_mapped_claims=(value)\n @accept_mapped_claims = value\n end",
"def s_optional\n SegmentReqs::Optional\n end",
"def decoded\n public_key = OpenSSL::PKey::RSA.new(options.public_key.to_s.gsub('\\n', \"\\n\"))\n @decoded ||= (JWT.decode request.params['jwt'], public_key, true, { :algorithm => 'RS256' }).first\n\n # check whether token has expiration time and is not expired\n raise ClaimInvalid.new(\"Token has expired.\") unless Time.now.to_i < @decoded.fetch('exp', 0)\n\n # check whether token contains unique identifier\n raise ClaimInvalid.new(\"Missing required jti claim.\") unless @decoded.key?('jti')\n\n # check for required claims\n (options.required_claims || []).each do |field|\n raise ClaimInvalid.new(\"Missing required '#{field}' claim.\") unless @decoded.key?(field.to_s)\n end\n\n @decoded\n end",
"def group_membership_claims=(value)\n @group_membership_claims = value\n end",
"def claim_number\n @eob.claim_number.to_s\n end",
"def claims\n get_all_roles\n end",
"def claims\n get_all_roles\n end",
"def optional?\n !!options[:optional]\n end",
"def is_organizer_optional\n return @is_organizer_optional\n end",
"def scim_oauth_access_token_expires_at\n @attributes[:scim_oauth_access_token_expires_at]\n end",
"def current_jwt_auth\n #\n @jwt_auth ||= (defined? session and session[:jwt_auth]) ? JwtToken.where(id: session[:jwt_auth]).first : nil\n end",
"def claim_level_eob?\n eob.category.upcase == \"CLAIM\"\n end",
"def decoded_jwt\n JwtWrapper.decode(\n Base64.decode64(\n Oj.load(\n Base64.decode64(params[\"token\"].split(\"--\").first)\n )[\"_rails\"][\"message\"]\n ).delete_prefix('\"').delete_suffix('\"')\n )[\"value\"]\n rescue\n nil\n end",
"def sign_in_audience\n return @sign_in_audience\n end",
"def phone_configuration\n MfaContext.new(current_user).phone_configurations.first\n end",
"def gender_for(val, optional: false)\n return nil if val.nil? && optional\n\n val.to_s.split('.').last\n end",
"def get_mandatory\n @mandatory\n end",
"def optional_fields(value = nil)\n config(:optional_fields, value, [])\n end",
"def claimed?\n !claimant.nil?\n end",
"def token\r\n bearer = request.headers[\"HTTP_AUTHORIZATION\"]\r\n\r\n # allows our tests to pass\r\n bearer ||= request.headers[\"rack.session\"].try(:[], 'Authorization')\r\n\r\n if bearer.present?\r\n bearer.split.last\r\n else\r\n nil\r\n end\r\n end",
"def claimant\n params['claimant']\n end",
"def get_jwt_from_session(session)\n return nil if session.nil?\n return nil if session[:jwt].nil?\n\n session[:jwt]\n end",
"def identity_otp \n data = get_otp_auth(IDENTITY_OTP_PATH, {})\n data || {}\n end",
"def optionals\r\n %w[\r\n participant\r\n token\r\n ]\r\n end",
"def access_token_expires\n return nil unless (temp_access_token_expires = read_attribute(:access_token_expires))\n # logger.debug2 \"temp_access_token_expires = #{temp_access_token_expires}\"\n encrypt_remove_pre_and_postfix(temp_access_token_expires, 'access_token_expires', 44).to_i\n end",
"def access_token_expires\n return nil unless (temp_access_token_expires = read_attribute(:access_token_expires))\n # logger.debug2 \"temp_access_token_expires = #{temp_access_token_expires}\"\n encrypt_remove_pre_and_postfix(temp_access_token_expires, 'access_token_expires', 44).to_i\n end",
"def mandatory_case_details?\n claim.court && claim.case_number && claim.external_user\n end",
"def token\n bearer = request.headers[\"HTTP_AUTHORIZATION\"]\n\n # allows our tests to pass\n bearer ||= request.headers[\"rack.session\"].try(:[], 'Authorization')\n\n if bearer.present?\n bearer.split.last\n else\n nil\n end\n end",
"def token\n bearer = request.headers[\"HTTP_AUTHORIZATION\"]\n\n # allows our tests to pass\n bearer ||= request.headers[\"rack.session\"].try(:[], 'Authorization')\n\n if bearer.present?\n bearer.split.last\n else\n nil\n end\n end",
"def validity(options = {})\n options[:for_api] ? jwt_config['validity_for_api'] : jwt_config['validity']\n end",
"def token\n JWT.encode(claims, rsa_key, 'RS512')\n end",
"def custom_authentication_factors\n return @custom_authentication_factors\n end",
"def get_current_muser\n return if !bearer_token\n decoded_jwt = decode_token(bearer_token)\n Muser.find(decoded_jwt[0][\"user\"][\"id\"])\n end",
"def managed_app_policies\n return @managed_app_policies\n end",
"def current_jwt_token\n @jwt_auth ||= session[:jwt_auth] ? JwtToken.where(id: session[:jwt_auth]).first : nil\n end",
"def optional_attributes\n fail NotImplementedError 'Please define #optional_attributes as a list of the '\\\n 'attributes on this resource that may not be present and thus should return nil' \\\n 'instead of raising a NoMethodError.'\n end",
"def claim_number\n str = eob.check_information.check_number.to_s if eob.check_information\n (str += '_' + eob.claim_number) if !eob.claim_number.blank?\n str\n end",
"def resourceType\n 'Claim'\n end",
"def optional?\n @rule == :optional\n end",
"def jwt_auth_token( secret )\n\n # expire in 5 minutes\n exp = Time.now.to_i + 5 * 60\n\n # just a standard claim\n exp_payload = { exp: exp }\n\n return JWT.encode exp_payload, secret, 'HS256'\n\n end",
"def auth_policies\n []\n end",
"def scim_oauth_access_token\n @attributes[:scim_oauth_access_token]\n end",
"def jwt_subject\n auth0_id_string\n end",
"def fcm_active?\n fcm_token.present?\n end",
"def custom_data\n token[AtomicLti::Definitions::CUSTOM_CLAIM]&.reject { |_, s| s.to_s.start_with?(\"$Canvas\") } || {}\n end",
"def verify_claim!(jwks)\n legitimate_payload, _legitimate_header = decode_without_verification(@legitimate_id_token)\n\n options = {\n algorithm: ID_TOKEN_DECRYPTION_ALGORITHM,\n jwks: jwks,\n iss: legitimate_payload[:iss],\n verify_iss: true,\n aud: legitimate_payload[:aud],\n verify_aud: true,\n sub: legitimate_payload[:sub],\n verify_sub: true,\n }\n\n # The next method provides validation for *iss*, *aud*, *exp*, *sub* and *jwt_signature*.\n claimed_payload, _claimed_header = JWT.decode(@claimed_id_token, nil, true, options).first.with_indifferent_access\n\n # We assume that non standard jwt keys would be an End-User specific key.\n # Ref: https://openid.net/specs/openid-connect-core-1_0.html#HybridIDToken2\n # > If either ID Token contains Claims about the End-User,\n # > any that are present in both SHOULD have the same values in both.\n claimed_payload.each do |k, v|\n if STANDARD_JWT_KEYS.exclude?(k) && legitimate_payload.key?(k)\n unless v == legitimate_payload[k]\n raise SignInWithAppleErrors::EndUserClaimMismatch, \"End-User claim mismatch detected. Mismatched key: #{k}, Claimed value: #{v}, Apple's value: #{legitimate_payload[k]}.\"\n end\n end\n end\n\n # Check for replay attacks\n unless claimed_payload[:nonce] == legitimate_payload[:nonce]\n raise SignInWithAppleErrors::NonceMismatch, \"Nonce mismatch detected. Claimed nonce: #{claimed_payload[:nonce]}, Apple's nonce: #{legitimate_payload[:nonce]}.\"\n end\n\n claimed_payload\n rescue JWT::InvalidIssuerError\n raise SignInWithAppleErrors::InvalidIssuer, \"Issuer mismatch detected. Claimed iss: #{decode_without_verification(@claimed_id_token)[:iss]}, Apple's iss: #{decode_without_verification(@legitimate_id_token)[:iss]}.\"\n rescue JWT::InvalidAudError\n raise SignInWithAppleErrors::AudienceMismatch, \"Audience mismatch detected. Claimed aud: #{decode_without_verification(@claimed_id_token)[:aud]}, Apple's aud: #{decode_without_verification(@legitimate_id_token)[:aud]}.\"\n rescue JWT::InvalidSubError\n raise SignInWithAppleErrors::SubjectMismatch, \"Subject mismatch detected. Claimed sub: #{decode_without_verification(@claimed_id_token)[:sub]}, Apple's sub: #{decode_without_verification(@legitimate_id_token)[:sub]}.\"\n rescue JWT::ExpiredSignature\n raise SignInWithAppleErrors::ExpiredToken, \"The claimed id token has been expired.\"\n rescue JWT::VerificationError\n raise SignInWithAppleErrors::InvalidSignature, \"JWT Signature is incorrect.\"\n end",
"def _optional\n @optional & [*@opts[:extra_fields]].map(&:to_sym)\n end",
"def claim\n put :claim\n end",
"def app_management_policies\n return @app_management_policies\n end",
"def optional?\n @default || (@default.nil? && @optional)\n end",
"def token_lifetime_policies\n return @token_lifetime_policies\n end",
"def openid_registration_options\n {:optional => [:fullname, :email]}\n end",
"def optional?\n !@required\n end",
"def optional=(optional)\n @optional = optional.collect do |field|\n field.intern\n end\n end",
"def get_mfa_session_value(admin_secret_id, last_login_time)\n \"#{self.id}:#{self.token}:#{self.last_mfa_time}:#{last_login_time}:#{admin_secret_id}\"\n end",
"def optional\n @optional = true\n end",
"def current_user\n token_locations = [cookies[:auth_token], ENV['DANGEROUS_AUTH_HACK'], params[:auth_token]]\n token = token_locations.find{|x| !x.blank? }\n if token\n Identity.includes(:person).find_by(token: token).try(:person)\n else\n nil\n end\n end",
"def optional?\n not required\n end",
"def expires_at\n read_attribute(:expires_at).try(:to_f)\n end",
"def user_from_session\n user = user_from_claims\n return user unless session[:auth0_json]\n raw = JSON.parse(session[:auth0_json] || '{}').with_indifferent_access.fetch(:extra, {}).fetch(:raw_info, {})\n user.email = raw.fetch(:email, user.email)\n user.picture = raw.fetch(:picture, user.picture)\n user.user_metadata = raw.fetch(:user_metadata, user.user_metadata)\n user\n end",
"def get_persist_security_info_option(value)\n return value.nil? ? nil : \"Persist Security Info=#{value ? \"True\" : \"False\"}\"\n end",
"def decoded_token\n if token_from_cookie\n token= token_from_cookie\n # byebug\n begin\n JWT.decode(token, Rails.application.credentials.jwt_token, true, algorithm: \"HS256\")\n # JWT.decode => [{ \"user_id\"=>\"2\" }, { \"alg\"=>\"HS256\" }]\n rescue JWT::DecodeError\n nil\n end\n end\n end",
"def claimed_at\n params['claimed_at']\n end",
"def service_prov_identification\n code, qual = nil, nil\n claim = eob.claim_information\n\n if (claim && !claim.provider_npi.blank?)\n code = claim.provider_npi\n qual = 'XX'\n Output835.log.info \"Provider NPI from the 837 is chosen\"\n elsif (claim && !claim.provider_ein.blank?)\n code = claim.provider_ein\n qual = 'FI'\n Output835.log.info \"Provider TIN from 837 is chosen\"\n elsif !facility.facility_npi.blank?\n code = facility.facility_npi\n qual = 'XX'\n Output835.log.info \"facility NPI from FC is chosen\"\n elsif !facility.facility_tin.blank?\n code = facility.facility_tin\n qual = 'FI'\n Output835.log.info \"facility TIN from FC is chosen\"\n end\n\n return code, qual\n end",
"def auth_oauth_custom\n @attributes[:auth_oauth_custom]\n end",
"def nullable\n self['nullable']\n end",
"def optionalize\n without_values(nil)\n end",
"def access_token\n devices.general.any? ? devices.general.first.access_token : \"\"\n end",
"def e_optional\n ElementReqs::Optional\n end",
"def as_jwt_payload\n options = SolidusJwt::Config.jwt_options\n claims = { sub: id }\n\n as_json(options)\n .merge(claims)\n .as_json\n end",
"def get_role_or_nil\n if user_type == \"UserControl\"\n \"UserControl\"\n elsif user_signed_in?\n current_user.role.name\n else\n nil\n end\n end",
"def get_user_m_f_a_info(optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'GetUserMFAInfo'\n\t\targs[:region] = optional[:_region] if (optional.key? :_region)\n\t\targs[:scheme] = 'https'\n\t\tif optional.key? :_method\n\t\t\traise ArgumentError, '_method must be GET|POST' unless 'GET|POST'.split('|').include? optional[:_method]\n\t\t\targs[:method] = optional[:_method]\n\t\tend\n\t\tif optional.key? :user_name\n\t\t\targs[:query]['UserName'] = optional[:user_name]\n\t\tend\n\t\tself.run(args)\n\tend",
"def automatic_user_consent_settings\n return @automatic_user_consent_settings\n end",
"def agency_io_id\n agency.present? ? agency.io_id : nil\n end",
"def claim_public?\n @current_user.nil?\n end",
"def optional_authenticate\n if request.env['HTTP_AUTHORIZATION']\n admin_authenticate\n end\n end",
"def gender\n\n if self.providers.size == 0\n return self.gender_custom\n end\n\n if self.gender_custom != \"none\"\n return self.gender_custom\n end\n\n return nil if self.providers.size == 0\n genders = self.providers.map(&:gender).compact\n return genders.first if !genders.empty?\n nil \n end"
] | [
"0.7396028",
"0.596783",
"0.52862704",
"0.52862704",
"0.5194788",
"0.5169623",
"0.5169623",
"0.48873812",
"0.48788294",
"0.48529157",
"0.47418407",
"0.47317505",
"0.47170284",
"0.47038212",
"0.4681351",
"0.467386",
"0.46588647",
"0.461625",
"0.46112427",
"0.44994858",
"0.44994858",
"0.44374627",
"0.44061783",
"0.43990374",
"0.43775684",
"0.43677473",
"0.43305728",
"0.43271565",
"0.42955643",
"0.42955643",
"0.42907023",
"0.42658493",
"0.42596298",
"0.42545283",
"0.42385533",
"0.42294312",
"0.42146575",
"0.4195377",
"0.41883323",
"0.41680798",
"0.41675934",
"0.4131878",
"0.41268137",
"0.41161767",
"0.41137165",
"0.41085446",
"0.40937802",
"0.40793827",
"0.40793827",
"0.40792263",
"0.4072701",
"0.4072701",
"0.40617505",
"0.40474206",
"0.40472758",
"0.40407354",
"0.4038267",
"0.40367007",
"0.4025291",
"0.40142822",
"0.40139386",
"0.401181",
"0.40099752",
"0.40071204",
"0.40064022",
"0.39953172",
"0.39909852",
"0.39832023",
"0.39818424",
"0.3969683",
"0.3969641",
"0.39676023",
"0.39570892",
"0.39540076",
"0.3953422",
"0.3952638",
"0.39464343",
"0.39440855",
"0.3933956",
"0.39306742",
"0.39272577",
"0.3923984",
"0.39208636",
"0.39208245",
"0.39200372",
"0.39172032",
"0.38923946",
"0.38856038",
"0.38840902",
"0.3875895",
"0.38717684",
"0.3870041",
"0.3869359",
"0.38693228",
"0.3860353",
"0.38567656",
"0.38536024",
"0.38457996",
"0.3836903",
"0.3834237"
] | 0.7954696 | 0 |
Sets the optionalClaims property value. Application developers can configure optional claims in their Azure AD applications to specify the claims that are sent to their application by the Microsoft security token service. For more information, see How to: Provide optional claims to your app. | def optional_claims=(value)
@optional_claims = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def optional_claims\n return @optional_claims\n end",
"def accept_mapped_claims=(value)\n @accept_mapped_claims = value\n end",
"def optional=(optional)\n @optional = optional.collect do |field|\n field.intern\n end\n end",
"def set_claim\n @claim = Claim.new(claim_params)\n end",
"def openid_optional_fields(value = nil)\n rw_config(:openid_optional_fields, value, [])\n end",
"def set_custom_claims(uid, claims)\n payload = {\n localId: validate_uid(uid),\n customAttributes: claims.to_json\n }.compact\n res = @client.post(with_path(\"accounts:update\"), payload).body\n uid = res&.fetch(\"localId\")\n raise CreateUserError, \"failed to set claims for user #{res}\" if uid.nil?\n get_user_by(uid: uid)\n end",
"def is_optional=(value)\n @children['is-optional'][:value] = value\n end",
"def required_claims=(_arg0); end",
"def required_claims=(_arg0); end",
"def required_claims; end",
"def required_claims; end",
"def group_membership_claims=(value)\n @group_membership_claims = value\n end",
"def claim\n put :claim\n end",
"def claims(params = {})\n scope 'default'\n post('claims/', params)\n end",
"def is_organizer_optional=(value)\n @is_organizer_optional = value\n end",
"def force_claim_profile\n\t\t@force_claim_profile = true\n\t\tclaim_profile\n\tend",
"def optional\n @optional = true\n end",
"def claim(token, options = {})\n with_hooks(:claim, token, options) do\n set_claimant(token)\n log(:claim)\n end\n end",
"def initialize(claims)\n claims.each { |k, v| instance_variable_set(\"@#{k}\", v) }\n @unique_id = oid || sub || unique_id\n @displayable_id = upn || email\n end",
"def default_claim_set\n default_claims = []\n default_claims << claim_pair(:issuer, self.issuer) if(self.issuer)\n default_claims << claim_pair(:audience, self.audience) if(self.audience)\n default_claims << claim_pair(:expires_on, Time.now.to_i + self.expiration) \n return default_claims\n end",
"def optional(*fields)\n self._optional_fields = fields\n end",
"def update!(**args)\n @third_party_claims = args[:third_party_claims] if args.key?(:third_party_claims)\n end",
"def claim\n if expiration_time\n CLAIM_EXPIRATION_TIME\n elsif not_before_time\n CLAIM_NOT_BEFORE_TIME\n end\n end",
"def optional_fields(value = nil)\n config(:optional_fields, value, [])\n end",
"def set_claimauthorization\n @claimauthorization = Claimauthorization.find(params[:id])\n end",
"def openid_registration_options\n {:optional => [:fullname, :email]}\n end",
"def auth0_claims(verify_signature: true)\n @auth0_claims ||= JWT.decode(auth0_id_token,\n ENV['AUTH0_CLIENT_SECRET'],\n verify_signature,\n verify_iat: true,\n algorithm: 'HS256').first.with_indifferent_access\n rescue JWT::ExpiredSignature\n {}\n rescue JWT::DecodeError\n {}\n end",
"def optional_scopes(*scopes)\n @config.instance_variable_set(:@optional_scopes, OAuth::Scopes.from_array(scopes))\n end",
"def optional\n @type = :optional\n end",
"def claims\n JWT.decode(jwt_token_from_request, Rails.application.secrets.secret_key_base, true)\n rescue\n nil\n end",
"def optional(*params)\n @optional = params unless params.empty?\n @optional ||= []\n end",
"def claimed?\n ! @claim.nil?\n end",
"def optional?\n instance_variable_defined?(\"@optional\") ? @optional : false\n end",
"def _add_expires_option(value)\n if value.has_key?(:max_age) && !value.has_key?(:expires)\n { expires: (Time.now + value[:max_age]) }\n else\n {}\n end\n end",
"def _add_expires_option(value)\n if value.key?(:max_age) && !value.key?(:expires)\n {expires: (Time.now + value[:max_age])}\n else\n {}\n end\n end",
"def claim!(claim_id)\n claims[claim_id] or raise NotFound.new\n end",
"def token_lifetime_policies=(value)\n @token_lifetime_policies = value\n end",
"def claim_profile\n\t\tif current_user.has_persisted_profile? && !@force_claim_profile\n\t\t\tset_flash_message :alert, :already_has_profile\n\t\t\tredirect_to confirm_claim_profile_url(claim_profile_tracking_parameter.merge claim_token: params[:token])\n\t\telsif current_user.claim_profile(params[:token], @force_claim_profile)\n\t\t\t# set_flash_message :notice, :profile_claimed\n\t\t\tredirect_to my_profile_url claim_profile_tracking_parameter\n\t\telse\n\t\t\tset_flash_message :alert, :profile_claim_error\n\t\t\tredirect_to root_url claim_profile_tracking_parameter\n\t\tend\n\tend",
"def accept_mapped_claims\n return @accept_mapped_claims\n end",
"def create\n @claim = current_insurer.claims.build(claim_params)\n\n respond_to do |format|\n if @claim.save\n format.html { redirect_to addService_insurer_claim_path(id: @claim.id), notice: 'Claim was successfully created.' }\n format.json \n else\n format.html { render :new }\n format.json \n end\n end\n end",
"def set_expires_at\n self[:expires_at] = case self.expiry_option \n when :in then Time.now.utc + (self.expiry_days || 3).days\n when :on then self[:expires_at]\n else self[:expires_at]\n end\n end",
"def set_expires_at\n self[:expires_at] = case self.expiry_option \n when :in then Time.now.utc + (self.expiry_days || DEFAULT_EXPIRY_DAYS).days\n when :on then self[:expires_at]\n else self[:expires_at]\n end\n end",
"def link_claim(claim)\n if !self.claims.include? claim\n self.claims << claim\n end\n self.save\n end",
"def sign_in_audience=(value)\n @sign_in_audience = value\n end",
"def claim_params\n params.require(:claim).permit(:restaurant_id, :user_id, :first_name, :last_name, :email, \n :tel, :address, :locality, :region, :zipcode, :active)\n end",
"def list_optional\n @optional ||= []\n end",
"def default_expires=(value)\n @default_expires = value\n end",
"def is_expiration_required=(value)\n @is_expiration_required = value\n end",
"def token_issuance_policies=(value)\n @token_issuance_policies = value\n end",
"def set_claim_and_email\n @claim = Claim.find(params[:claim_id])\n @email = @claim.emails.find(params[:id]) unless params[:id].nil?\n end",
"def expires_at=(time)\n self.expiry_option = :on\n self[:expires_at] = time\n end",
"def openid_options(value = nil)\n rw_config(:openid_options, value, {})\n end",
"def managed_app_policies=(value)\n @managed_app_policies = value\n end",
"def manually_set_cookie(value, expire_in)\n expire_date = expire_in.from_now.gmtime.strftime('%a, %d %b %Y %H:%M:%S GMT')\n response['Set-Cookie'] =\n \"cookiePermissions=#{value}; Expires=#{expire_date}; Path=/; SameSite=Lax\"\n end",
"def expires=(value)\n @expires = value\n @expires_in = nil\n end",
"def app_management_policies=(value)\n @app_management_policies = value\n end",
"def update\n claim = @repo.claims.new(user: current_user)\n if claim.save\n redirect_to :back, notice: \"Your request has been sent to owner\"\n else\n flash[:error] = claim.errors.full_messages.join('\\n')\n redirect_to :back\n end\n end",
"def auth_expires=(value)\n @children['auth-expires'][:value] = value\n end",
"def set_security_preference(optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'SetSecurityPreference'\n\t\targs[:region] = optional[:_region] if (optional.key? :_region)\n\t\targs[:scheme] = 'https'\n\t\tif optional.key? :_method\n\t\t\traise ArgumentError, '_method must be GET|POST' unless 'GET|POST'.split('|').include? optional[:_method]\n\t\t\targs[:method] = optional[:_method]\n\t\tend\n\t\tif optional.key? :enable_save_m_f_a_ticket\n\t\t\targs[:query]['EnableSaveMFATicket'] = optional[:enable_save_m_f_a_ticket]\n\t\tend\n\t\tself.run(args)\n\tend",
"def expires_at=(value)\n self[:expires_at] = value\n end",
"def set_claim_type\n @claim_type = ClaimType.find(params[:id])\n end",
"def intended_policies=(value)\n @intended_policies = value\n end",
"def automatic_user_consent_settings=(value)\n @automatic_user_consent_settings = value\n end",
"def allow_partner_to_collect_i_o_s_personal_application_metadata=(value)\n @allow_partner_to_collect_i_o_s_personal_application_metadata = value\n end",
"def required\n @optional = false\n end",
"def current_jwt_auth=(jwt_auth)\n session[:jwt_auth] = jwt_auth.nil? ? nil : jwt_auth.id\n @jwt_auth = jwt_auth\n end",
"def set_claim\n @claim = @company.claims.find(params[:id])\n end",
"def optional?\n !!options[:optional]\n end",
"def openid_oauth(value = nil)\n rw_config(:openid_oauth, value, false)\n end",
"def current_jwt_token=(jwt_auth)\n session[:jwt_auth] = jwt_auth.nil? ? nil : jwt_auth.id\n @jwt_auth = jwt_auth\n end",
"def expires_in= new_expires_in\n if !new_expires_in.nil?\n @issued_at = Time.now\n @expires_at = @issued_at + new_expires_in.to_i\n else\n @expires_at = nil\n @issued_at = nil\n end\n end",
"def add_property_to_user_profile_schema(options = {})\n post('/meta/schemas/user/default', options)\n end",
"def optional_attributes\n fail NotImplementedError 'Please define #optional_attributes as a list of the '\\\n 'attributes on this resource that may not be present and thus should return nil' \\\n 'instead of raising a NoMethodError.'\n end",
"def mandated_advocate_id=(value)\n if value\n if value.to_s =~ /^(none|unlisted)/i\n self.mandated_person_id = nil\n self.mandated = \"unlisted\"\n self.mandate_given_action = \"external\"\n @mandate_given = \"yes\"\n else \n self.mandated_person_id = value\n self.mandate_given_action = \"internal\"\n self.mandated = \"listed\"\n @mandate_given = \"yes\"\n end\n else\n self.mandated_person_id = nil\n self.mandated = nil\n self.mandate_given_action = nil\n end\n end",
"def custom_authentication_factors=(value)\n @custom_authentication_factors = value\n end",
"def mandated_advocate=(value)\n if value\n @mandate_given = \"yes\"\n self.mandated = \"listed\"\n self.mandate_given_action = \"internal\"\n end\n self.mandated_person = value\n end",
"def init_optional_attributes\n self.doi ||= record.doi if record.doi.present?\n self.pmid ||= record.pmid if record.pmid.present?\n end",
"def nullable=(val)\n self['nullable'] = val\n end",
"def customer_signoff_text=(customer_signoff_text)\n\n if !customer_signoff_text.nil? && customer_signoff_text.to_s.length > 4000\n fail ArgumentError, \"invalid value for 'customer_signoff_text', the character length must be smaller than or equal to 4000.\"\n end\n\n @customer_signoff_text = customer_signoff_text\n end",
"def _optional\n @optional & [*@opts[:extra_fields]].map(&:to_sym)\n end",
"def date_auth_expires=(value)\n @children['date-auth-expires'][:value] = value\n end",
"def populate_claim(claim, data)\n # grab name\n claimant = /.*CLAIM\\sOF\\s(\\w+\\s+\\w+)\\.\\W*\\(Record\\sNo\\.\\s\\d+,\\sof\\s1863\\.\\).*/.match(data)\n if claimant\n claim.people << Person.create(:name => claimant[1].name_caps, :role => \"claimant\")\n end\n # populate claim data via regex on hocr_layer\n\n claim.save\n end",
"def current_jwt_user=(jwt_user)\n session[:jwt_user] = jwt_user.nil? ? nil : jwt_user.id\n @jwt_user = jwt_user\n end",
"def set_omniauth(opts = {})\n default = {\n :provider => :facebook,\n :uuid => \"1234\",\n :facebook => {\n :email => \"[email protected]\",\n :gender => \"Male\",\n :first_name => \"foo\",\n :last_name => \"bar\"\n }\n }\n\n credentials = default.merge(opts)\n provider = credentials[:provider]\n user_hash = credentials[provider]\n\n OmniAuth.config.test_mode = true\n\n OmniAuth.config.mock_auth[provider] = {\n 'provider' => credentials[:provider],\n 'uid' => credentials[:uuid],\n \"extra\" => {\n \"user_hash\" => {\n \"email\" => user_hash[:email],\n \"first_name\" => user_hash[:first_name],\n \"last_name\" => user_hash[:last_name],\n \"gender\" => user_hash[:gender]\n }\n }\n }\nend",
"def update_token! options = {}\n # Normalize all keys to symbols to allow indifferent access internally\n options = deep_hash_normalize options\n\n self.expires_in = options[:expires] if options.key? :expires\n self.expires_in = options[:expires_in] if options.key? :expires_in\n self.expires_at = options[:expires_at] if options.key? :expires_at\n\n # By default, the token is issued at `Time.now` when `expires_in` is\n # set, but this can be used to supply a more precise time.\n self.issued_at = options[:issued_at] if options.key? :issued_at\n\n # Special case where we want expires_at to be relative to issued_at\n if options.key?(:issued_at) && options.key?(:expires_in)\n set_relative_expires_at options[:issued_at], options[:expires_in]\n end\n\n self.access_token = options[:access_token] if options.key? :access_token\n self.refresh_token = options[:refresh_token] if options.key? :refresh_token\n self.id_token = options[:id_token] if options.key? :id_token\n\n self\n end",
"def remove_property_from_user_profile_schema(options = {})\n post('/meta/schemas/user/default', options)\n end",
"def create\n @claim = Claim.new(claim_params)\n\n respond_to do |format|\n if @claim.save\n format.html { redirect_to @claim, notice: 'Claim was successfully created.' }\n format.json { render action: 'show', status: :created, location: @claim }\n else\n format.html { render action: 'new' }\n format.json { render json: @claim.errors, status: :unprocessable_entity }\n end\n end\n end",
"def user_from_claims\n user = Auth0::UserStruct.new\n user.sub = auth0_claims[:sub]\n user.email = auth0_claims[:email]\n user.email_verified = auth0_claims[:email_verified]\n user.picture = auth0_claims[:picture]\n user.user_metadata = (auth0_claims[:user_metadata] || {}).with_indifferent_access\n user.app_metadata = (auth0_claims[:app_metadata] || {}).with_indifferent_access\n user.exp = auth0_claims[:exp]\n user.iat = auth0_claims[:iat]\n user.iss = auth0_claims[:iss]\n user.aud = auth0_claims[:aud]\n user\n end",
"def setup_expiration\n self.expires_at = Time.now.utc + ::Simple::OAuth2.config.authorization_code_lifetime if expires_at.nil?\n end",
"def kiosk_mode_allow_assistive_speak=(value)\n @kiosk_mode_allow_assistive_speak = value\n end",
"def set_token_expires_at\n self.token_expires_at = 3600.seconds.from_now\n end",
"def expires_in=(value)\n @expires_in = value\n @expires = nil\n end",
"def allow_partner_to_collect_i_o_s_application_metadata=(value)\n @allow_partner_to_collect_i_o_s_application_metadata = value\n end",
"def mock_omniauth(provider, test_mode=true)\n\n # call method with mock values and attributes for given provider\n params_provider = send(\"params_#{provider}\")\n\n # deactivate test_mode\n OmniAuth.config.test_mode = test_mode ? true : false\n\n #deliver omniauth mock credentials\n OmniAuth.config.add_mock(provider.to_sym, params_provider)\n end",
"def user_flow_identity_providers=(value)\n @user_flow_identity_providers = value\n end",
"def amend_customer\n # we should have a current customer.\n cust = current_customer\n if (cust)\n auth = request.env[\"omniauth.auth\"]\n # We should only have one of these.\n oauths = Authentication.where(:provider => auth[\"provider\"],\n :uid => auth[\"uid\"],\n :customer_id.ne => nil,\n :master => nil).order(\"created_at desc\").all\n oauth = nil\n oauths.each do |oa|\n if oa.customer == cust\n if oauth.nil?\n oauth = oa\n else\n # Be proactive resilience here and get rid of this one. We should not have multiples\n logger.error(\"sessions#ammend_customer: getting rid of multiple customer authentications.\")\n oa.destroy()\n end\n else\n redirect_to edit_customer_registration_path(cust), :alert => \"This authentication belongs to different customer.\"\n return\n end\n end\n if oauth\n # Already added\n redirect_to edit_customer_registration_path(cust), :notice => \"This authentication already exists\"\n else\n oauth = Authentication.create_with_omniauth(auth)\n cust.authentications << oauth\n cust.save\n # We do not change the current_customer_authentication.\n redirect_to edit_customer_registration_path(cust), :notice => \"Authentication Added.\"\n end\n else\n redirect_to customer_sign_in_path, :notice => \"Need to sign in first.\"\n end\n end",
"def set_EmailOptOut(value)\n set_input(\"EmailOptOut\", value)\n end",
"def set_defaults\n self.verified = true\n end",
"def apply_omniauth(omniauth)\n self.email = omniauth['user_info']['email'] if email.blank?\n\n if nick.blank?\n self.nick = (omniauth['user_info']['first_name'] || omniauth['user_info']['nickname'] ||\n omniauth['user_info']['name'] ||omniauth['user_info']['email'])\n end\n\n self.email_alert = false\n self.sms_alert = false\n self.weekend = false\n\n authentications.build(:provider => omniauth['provider'], :uid => omniauth['uid'])\n end",
"def email_optional?\n false\n end"
] | [
"0.63222647",
"0.54106754",
"0.53149456",
"0.52546626",
"0.5131562",
"0.5029853",
"0.4723227",
"0.47098303",
"0.47098303",
"0.45939302",
"0.45939302",
"0.45491263",
"0.45301858",
"0.45133772",
"0.4494983",
"0.448874",
"0.44808885",
"0.44661134",
"0.44386283",
"0.44060832",
"0.4362302",
"0.43168026",
"0.4295388",
"0.42842868",
"0.4229466",
"0.42102414",
"0.4187257",
"0.41837722",
"0.41281417",
"0.4098476",
"0.40743724",
"0.40720248",
"0.40293568",
"0.40180343",
"0.40140182",
"0.4009052",
"0.40062046",
"0.40026358",
"0.3992091",
"0.39910457",
"0.39817396",
"0.39612317",
"0.39586928",
"0.39557213",
"0.3951627",
"0.39470345",
"0.39251244",
"0.39108965",
"0.39071155",
"0.39032704",
"0.3902771",
"0.39006677",
"0.3892299",
"0.38901427",
"0.38897428",
"0.38872793",
"0.38767162",
"0.38635224",
"0.38626838",
"0.38577646",
"0.3853143",
"0.38506177",
"0.38449237",
"0.38308132",
"0.38278335",
"0.3826691",
"0.38208663",
"0.38077518",
"0.38075647",
"0.38036463",
"0.37923643",
"0.37886414",
"0.37883216",
"0.378604",
"0.37859112",
"0.378296",
"0.37790927",
"0.3771825",
"0.37650284",
"0.37574878",
"0.37507498",
"0.37490007",
"0.37391588",
"0.3736363",
"0.37346768",
"0.3733783",
"0.37161276",
"0.37111446",
"0.3710294",
"0.37087464",
"0.37083298",
"0.37078485",
"0.3702913",
"0.36895588",
"0.36892694",
"0.36828294",
"0.36824578",
"0.3675027",
"0.3674086",
"0.3666571"
] | 0.82529134 | 0 |
Gets the owners property value. Directory objects that are owners of the application. Readonly. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. | def owners
return @owners
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def owners\n @obj['owners']\n end",
"def getOwners\r\n\t\t\t\t\treturn @owners\r\n\t\t\t\tend",
"def owners=(value)\n @owners = value\n end",
"def owners\n @data['owners']\n end",
"def get_owners\n return make_request(\"#{self.endpoint}/list/owners\")\n end",
"def owners_contents\n files = applicable_owners_files\n\n return [] if files.nil?\n\n puts \"f: #{files.inspect}\"\n files.map { |f| f[:owners] }\n end",
"def owners_count\n return @owners_count\n end",
"def owners\n get_user_with_role(:owner)\n end",
"def owners\n # set @owners instance variable by\n # 1) grabbing all Ownerships containing this panlist\n # 2) converting each Ownership into an Owner\n @owners ||= Ownership.where(list_id: self.id).map do |ownership|\n Owner.find_by_netid(ownership.owner_id)\n end\n end",
"def owners\n self.authors.collect(&:user)\n end",
"def owners_by_key\n @owners_by_key ||= owners.group_by do |owner|\n key = owner[owner_key_name]\n key && key.to_s\n end\n end",
"def owner_names\n self.pets.map {|p| p.owner}.pluck(:name).uniq\n end",
"def filter_owners(path, unknown_owners)\n owners = { clients: [], users: [] }\n unknown_owners.each do |entity|\n if path[0] == \"organizations\" && path.length > 2\n begin\n data.get([\"organizations\", path[1], \"clients\", entity])\n owners[:clients] |= [ entity ]\n rescue\n owners[:users] |= [ entity ]\n end\n else\n owners[:users] |= [ entity ]\n end\n end\n owners\n end",
"def owners\n self.cars.map{|car_instance| car_instance.owner}.uniq\n end",
"def owners_count=(value)\n @owners_count = value\n end",
"def app_owners_for_select\n User.real.map { |u| [u.select_text, u.id] if u.org }.compact\n end",
"def get_owner(owner)\n # Looks like a path to follow:\n if owner[0,1] == \"/\"\n return get(owner)\n end\n\n # Otherwise, assume owner key was given:\n get(\"/owners/#{owner}\")\n end",
"def index\n @owner = current_owner_user.owner\n end",
"def user_owners\n User.where(id: owners.keys).to_a.map do |_user|\n _user.anonymous_time_verification = owners[_user.id.to_s]\n _user\n end\n end",
"def projects_owned\n Project.all.select {|project| project.owner == self}\n end",
"def owner?\n # exists? ? `ls -al #{path} | grep '[0-9] \\.$'`.split[2] : false\n proprieties[:owner]\n end",
"def find_owner_appointments\n owner_appointments = Appointment.all.select { |appointment| appointment.owners.include?(self) || appointment.owner_id == id } \n if !owner_appointments.empty?\n owner_appointments\n else\n nil\n end\n end",
"def group_owners_only\n where('group_owner_id.null': true)\n end",
"def owners_name\n if self.owner.is_a?(Person) && self.owner.user\n self.owner.user.login\n elsif self.owner.respond_to?(:name)\n self.owner.name\n else\n \"disclosed\".t\n end\n end",
"def owner_chains\n if owners == []\n [[self.id]]\n else\n owners.map(&:c).map(&:owner_chains).reduce(:+).map{|i| [self.id]+i}\n end\n end",
"def list_owners\n Owner.all.each_with_index do |owner, i|\n puts \"\\n#{i + 1}. #{owner.name} \\nAddress: #{owner.address}\"\n puts \"Food provided: #{owner.food_provided.capitalize}\"\n puts \"Has a cat? #{owner.cat_already.to_s.capitalize} | Has a dog? #{owner.dog.to_s.capitalize}\"\n puts \"Lives in #{owner.neighborhood.name}\"\n all_cats = Cat.all.select { |x| x.owner_id == owner.id}\n cats_list = all_cats.map{ |x| x.name }.join(\", \")\n puts \"#{owner.name}'s cat(s): #{cats_list}\"\n puts \"\\n----------------------------------------------------------------------------\"\n end\n end",
"def index\n @object_owners = ObjectOwner.all\n end",
"def index\n @property_owners = PropertyOwner.all\n end",
"def get_owner_info(owner)\n get(\"/owners/#{owner}/info\")\n end",
"def owner\n permission = self.permissions(level: 'owner')[0]\n if permission\n permission.user\n else\n nil\n end\n end",
"def owner\n if params[:owner].blank?\n raise Errors::NotFoundError.new('Owner not found.')\n end\n\n login = params[:owner].downcase\n Owner.find_by!(\"LOWER(login) = ?\", login)\n end",
"def show_all\n @owners = Owner.all\n end",
"def owner\n @attributes[:owner]\n end",
"def number_of_owners\n (additional_owners || []).length + 1\n end",
"def owners\n self.car.map do |car| car.owner.uniq\nend\n\n\n\nend",
"def read_owners(config, org_guid)\n user_setup_obj = UsersSetup.new(config)\n\n users_list = []\n users = @client.organization(org_guid).managers\n\n users.each do |user|\n user_guid = user.guid\n username = user_setup_obj.get_username_from_guid(user_guid)\n users_list << Users::User.new(username, 'owner', false, user_guid)\n end\n\n users_list\n end",
"def index\n @owner_properties = @owner.ownerProperties\n end",
"def index\n @owners = Owner.all\n end",
"def index\n @owners = Owner.all\n end",
"def owner\n @owner ||= User.find(owner_user_id)\n end",
"def owners\n entities.map{|e| (e.investment.company.id if e.investment)}.reject{|i| i == nil}\n end",
"def owner\n collaborators.where(role: \"owner\").first.user\n end",
"def ownerships(opts = {})\n log(\"Calculating ownerships for #{opts.inspect}\", opts)\n patowns = pattern_owners(codeowners_data(opts), opts)\n if opts[:no_git]\n files = files_to_own(opts)\n ownerships_by_ruby(patowns, files, opts)\n else\n ownerships_by_gitignore(patowns, opts)\n end\n end",
"def owner_and_coowners\n vals = Role.access_values_for(:creator).concat(Role.access_values_for(:administrator))\n User.joins(:roles).where(\"roles.plan_id = ? AND roles.access IN (?)\", self.id, vals)\n end",
"def owner\r\n\t\t\t`#{BITS::BITSADMIN} /getowner {#{@id}}`\r\n\t\tend",
"def owner_name\n read_attribute(:owner_name).presence || owner.try(:name) || cert.try(:owner_name)\n end",
"def owner_name\n payload['repository']['owner']['name']\n end",
"def owner\n if object.owner && (current_user.lead? || object.owner.id == current_user.id)\n object.owner.id\n else\n nil\n end\n end",
"def get_owner\n owner_id = nil\n owners = Bank::Owner.create_owners(\"./support/owners.csv\")\n CSV.foreach(\"./support/account_owners.csv\") do |line|\n if line[0].to_i == @id\n owner_id = line[1].to_i\n end\n end\n Bank::Owner.find(owner_id)\n end",
"def owner_id\n data.owner_id\n end",
"def owners_included; end",
"def owner_id\n data[:owner_id]\n end",
"def owner_id\n data[:owner_id]\n end",
"def compute_owner_private\n pmr_owner = pmr.owner\n # A blank owner is a bad dog.\n if pmr_owner.nil? || pmr_owner.signon.blank?\n return [ \"wag-wag\", \"Owner should not be blank\", true ]\n end\n return [ \"normal\", \"PMR Owner assumed valid\", true]\n end",
"def owner()\n sql = \"SELECT * FROM owners\n WHERE id = $1\"\n values = [@owner_id]\n owner_data = SqlRunner.run( sql, values ).first\n result = Owner.new(owner_data)\n end",
"def owner \n Owner.new(attributes['owner'])\n end",
"def owner\n {owner_id: self.object.user.id, \n owner_account: self.object.user.email}\n end",
"def owner\n @owner ||= User.new(connection, :login => @attributes[:owner])\n end",
"def owner\n value = Facter.value(:tpm2)['tpm2_getcap']['properties-variable']['TPM_PT_PERSISTENT']['ownerAuthSet']\n if value.nil?\n @property_current[:owner] = :unknown\n else\n @property_current[:owner] = value.to_sym\n end\n @property_current[:owner]\n end",
"def setOwners(owners)\r\n\t\t\t\t\t@owners = owners\r\n\t\t\t\tend",
"def item_owner\n items.first.owner\n end",
"def name\n @owner\n end",
"def owner\n get_user owner_id\n end",
"def project_owner\n user_id = project.namespace.owner.id\n access_level = Gitlab::Access::OWNER\n\n Member\n .from(generate_from_statement([[user_id, access_level]])) # rubocop: disable CodeReuse/ActiveRecord\n .limit(1)\n end",
"def list_of_owners\n @owners = Owner.find(:all, :order=>\"state,city\")\n @report_name = \"List of Owners\"\n end",
"def owners_of_cars_serviced\n self.personal_mechanic_of.map{|owner_obj| owner_obj.name}\nend",
"def recursive_owner\n recursive_owner_context.owner\n end",
"def owner\n User.find_by(id: user_id)\n end",
"def possible_owners_files(dir)\n return [OwnersFileName] if dir == '.' || dir == '';\n\n [File.join([dir, OwnersFileName])] +\n possible_owners_files(File.dirname(dir))\n end",
"def owner?(user)\n user == owner || owners.include?(user)\n end",
"def cats\n Cat.all.select do |cat|\n cat.owner == self\n end\n end",
"def index\n @owners = Owner.all\n render json: @owners, include: [], adapter: :json\n end",
"def cats\n Cat.all.select { |cats| cats.owner == self }\n end",
"def get_owner\n return self.project.get_owner\n end",
"def owner\n user_id\n end",
"def owner=(value)\n @owner = value\n end",
"def owner=(value)\n @owner = value\n end",
"def owner=(value)\n @owner = value\n end",
"def owner=(value)\n @owner = value\n end",
"def owner=(value)\n @owner = value\n end",
"def owner_display_name\n owner unless @owner_display_name\n @owner_display_name\n end",
"def owner_name\n self.parsed_fullname\n end",
"def owner\n @principal_uri\n end",
"def owner\n @principal_uri\n end",
"def ous\n unless @ous\n @ous = []\n @ldap_object.dn.split(/,/).each do |entry|\n @ous.push Adauth::AdObjects::OU.where('name', entry.gsub(/OU=/, '')).first if entry =~ /OU=/\n end\n end\n @ous\n end",
"def owner\n @owner\n end",
"def minimal_owners_to_approve\n owners = owners_contents.map { |o| o & allowed_approvers }\n\n return [] if owners.empty?\n\n # If there's only one OWNERS file that applies, just return it\n # since the magic cartesian product screws it up\n if owners.length == 1\n return owners.first.map { |o| [o] }\n end\n\n owners.inject do |oldSoln, nextSet|\n oldSoln.minimum_length_cartesian_terms(nextSet)\n end\n end",
"def cats\n Cat.all.select {|cat| cat.owner == self}\n end",
"def consumer_ids_for_owners\n consumer_ids = self.owners.map do |doc_owner|\n if doc_owner.owner_type == \"GroupUser\"\n doc_owner.owner.group.owner.id\n elsif %w[User Consumer].include?(doc_owner.owner_type)\n doc_owner.owner.id\n else\n nil\n end\n end\n consumer_ids << self.consumer_id # always include uploader/creator of standard_base_document\n consumer_ids.uniq.reject(&:blank?)\n end",
"def owner\n return @owner\n end",
"def owner\n return @owner\n end",
"def owner\n return @owner\n end",
"def owner\n return @owner\n end",
"def owner\n return @owner\n end",
"def owned_groups\n @owned_groups = Group.where(\"owner_id = ?\", current_user)\n end",
"def owner\n @restaurant.owner\n end",
"def owned_repositories_with_user(user)\n repos = self.owned_repositories.publics\n repos = repos.or(user.membered_repositories.where(user_id: self.id)) if user\n repos\n end",
"def eligible_owners\n User.where('users.id != ?', @cookbook.user_id)\n end",
"def index\n @product_owners = ProductOwner.all\n end",
"def owner_name\n return 'N/A' if anonymous? || user.nil?\n return user.name if user.name?\n user.email\n end"
] | [
"0.72949517",
"0.7074225",
"0.69925416",
"0.69843423",
"0.69398755",
"0.6883774",
"0.67830276",
"0.6722997",
"0.65761966",
"0.6449256",
"0.64116615",
"0.6206068",
"0.6134959",
"0.6108935",
"0.6107539",
"0.59783596",
"0.58679074",
"0.5864923",
"0.58454347",
"0.5829305",
"0.58240867",
"0.5822953",
"0.58223796",
"0.580651",
"0.58055395",
"0.57834",
"0.5746392",
"0.5736239",
"0.5726479",
"0.5723556",
"0.572186",
"0.5699786",
"0.5689562",
"0.56722444",
"0.5660866",
"0.56443155",
"0.5622461",
"0.56000555",
"0.56000555",
"0.55829835",
"0.5572526",
"0.5541296",
"0.55276",
"0.55274844",
"0.55227727",
"0.5517326",
"0.5514068",
"0.5492816",
"0.5482634",
"0.54555553",
"0.5452872",
"0.5441889",
"0.5441889",
"0.5429633",
"0.54231805",
"0.5419107",
"0.54150057",
"0.54089814",
"0.5396791",
"0.53791326",
"0.5377312",
"0.5345117",
"0.5334195",
"0.5321299",
"0.52948666",
"0.5291174",
"0.52610064",
"0.5256465",
"0.5228702",
"0.5218624",
"0.52041715",
"0.5197631",
"0.5172477",
"0.51648104",
"0.51645756",
"0.5160157",
"0.5160157",
"0.5160157",
"0.5160157",
"0.5160157",
"0.51516855",
"0.5139556",
"0.51246977",
"0.51246977",
"0.51093286",
"0.5105683",
"0.5102577",
"0.5101017",
"0.507707",
"0.50769234",
"0.50769234",
"0.50769234",
"0.50769234",
"0.50769234",
"0.506604",
"0.50631124",
"0.50484234",
"0.5042993",
"0.5042148",
"0.5036288"
] | 0.71533287 | 1 |
Sets the owners property value. Directory objects that are owners of the application. Readonly. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. | def owners=(value)
@owners = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setOwners(owners)\r\n\t\t\t\t\t@owners = owners\r\n\t\t\t\tend",
"def owners_count=(value)\n @owners_count = value\n end",
"def owners\n @obj['owners']\n end",
"def owners\n return @owners\n end",
"def owners\n # set @owners instance variable by\n # 1) grabbing all Ownerships containing this panlist\n # 2) converting each Ownership into an Owner\n @owners ||= Ownership.where(list_id: self.id).map do |ownership|\n Owner.find_by_netid(ownership.owner_id)\n end\n end",
"def getOwners\r\n\t\t\t\t\treturn @owners\r\n\t\t\t\tend",
"def owners_count\n return @owners_count\n end",
"def filter_owners(path, unknown_owners)\n owners = { clients: [], users: [] }\n unknown_owners.each do |entity|\n if path[0] == \"organizations\" && path.length > 2\n begin\n data.get([\"organizations\", path[1], \"clients\", entity])\n owners[:clients] |= [ entity ]\n rescue\n owners[:users] |= [ entity ]\n end\n else\n owners[:users] |= [ entity ]\n end\n end\n owners\n end",
"def owners_contents\n files = applicable_owners_files\n\n return [] if files.nil?\n\n puts \"f: #{files.inspect}\"\n files.map { |f| f[:owners] }\n end",
"def get_owners\n return make_request(\"#{self.endpoint}/list/owners\")\n end",
"def owner=(value)\n @owner = value\n end",
"def owner=(value)\n @owner = value\n end",
"def owner=(value)\n @owner = value\n end",
"def owner=(value)\n @owner = value\n end",
"def owner=(value)\n @owner = value\n end",
"def owners\n @data['owners']\n end",
"def set_owner(ownername)\n @result.owner = ownername\n end",
"def owner=(v) self['Owner'] = v end",
"def owners_by_key\n @owners_by_key ||= owners.group_by do |owner|\n key = owner[owner_key_name]\n key && key.to_s\n end\n end",
"def owners\n self.authors.collect(&:user)\n end",
"def owners\n get_user_with_role(:owner)\n end",
"def owner_chains\n if owners == []\n [[self.id]]\n else\n owners.map(&:c).map(&:owner_chains).reduce(:+).map{|i| [self.id]+i}\n end\n end",
"def user_owners\n User.where(id: owners.keys).to_a.map do |_user|\n _user.anonymous_time_verification = owners[_user.id.to_s]\n _user\n end\n end",
"def set_owner_member\n self.organizations << self.owner\n end",
"def select_owner(*owners)\n owner_select.click\n wait_for_owner_options\n owners.each do |owner|\n owner_options(text: /\\A#{owner}\\Z/).first.click\n end\n page.find(\"body\").click\n wait_until_owner_options_invisible\n end",
"def show_all\n @owners = Owner.all\n end",
"def set_owner\n @owner = Owner.find_by_owner_user_id(current_owner_user.id)\n end",
"def index\n @object_owners = ObjectOwner.all\n end",
"def index\n @property_owners = PropertyOwner.all\n end",
"def group_owners_only\n where('group_owner_id.null': true)\n end",
"def set_owner\n @owner = Owner.find_by(name: params[:owner_name])\n unless @owner.present?\n head 404 and return\n end\n end",
"def set_owner(owner)\n self.__owner__ = owner if owner\n self\n end",
"def index\n @owners = Owner.all\n end",
"def index\n @owners = Owner.all\n end",
"def add_owner_ids\n\t\tself.owner_ids << self.payable_from_organization_id \n\t\tself.owner_ids << self.payable_to_organization_id\n\t\tself.owner_ids << self.payable_from_patient_id\n\t\tself.owner_ids.compact!\n\t\tself.owner_ids.uniq!\n\tend",
"def number_of_owners\n (additional_owners || []).length + 1\n end",
"def set_owner(id)\n self.owner_id = id\n end",
"def set_owner_property\n @owner_property = OwnerProperty.find(params[:id])\n end",
"def owner=(owner)\n set_visible(owner.visible?, owner.id)\n super\n end",
"def set_owner\n @owner = Owner.find(params[:id])\n end",
"def set_owner\n @owner = Owner.find(params[:id])\n end",
"def set_owner\n @owner = Owner.find(params[:id])\n end",
"def set_owner\n @owner = Owner.find(params[:id])\n end",
"def set_owner\n @owner = Owner.find(params[:id])\n end",
"def set_owner\n @owner = Owner.find(params[:id])\n end",
"def set_owner\n @owner = Owner.find(params[:id])\n end",
"def list_owners\n Owner.all.each_with_index do |owner, i|\n puts \"\\n#{i + 1}. #{owner.name} \\nAddress: #{owner.address}\"\n puts \"Food provided: #{owner.food_provided.capitalize}\"\n puts \"Has a cat? #{owner.cat_already.to_s.capitalize} | Has a dog? #{owner.dog.to_s.capitalize}\"\n puts \"Lives in #{owner.neighborhood.name}\"\n all_cats = Cat.all.select { |x| x.owner_id == owner.id}\n cats_list = all_cats.map{ |x| x.name }.join(\", \")\n puts \"#{owner.name}'s cat(s): #{cats_list}\"\n puts \"\\n----------------------------------------------------------------------------\"\n end\n end",
"def ownerships(opts = {})\n log(\"Calculating ownerships for #{opts.inspect}\", opts)\n patowns = pattern_owners(codeowners_data(opts), opts)\n if opts[:no_git]\n files = files_to_own(opts)\n ownerships_by_ruby(patowns, files, opts)\n else\n ownerships_by_gitignore(patowns, opts)\n end\n end",
"def owner=(new_owner)\n if @owner != new_owner\n @dacl.reassign!(@owner, new_owner)\n @owner = new_owner\n end\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def set_OwnerId(value)\n set_input(\"OwnerId\", value)\n end",
"def owner=(attributes)\n @owner = User.new(attributes)\n end",
"def owner=(attributes)\n @owner = User.new(attributes)\n end",
"def owner=(owner)\n validator = EnumAttributeValidator.new('String', [\"user\", \"application\"])\n unless validator.valid?(owner)\n fail ArgumentError, \"invalid value for 'owner', must be one of #{validator.allowable_values}.\"\n end\n @owner = owner\n end",
"def index\n @owner = current_owner_user.owner\n end",
"def owners\n self.cars.map{|car_instance| car_instance.owner}.uniq\n end",
"def app_owners_for_select\n User.real.map { |u| [u.select_text, u.id] if u.org }.compact\n end",
"def set_Ownership(value)\n set_input(\"Ownership\", value)\n end",
"def populate_owners\n ENV['PT_PROJECTS'].split(', ').each do |id|\n\n ownersDatum = make_call_parsed(\"#{pivotal_url}/#{id}/memberships\", pivotal_headers)\n\n ownersDatum.each do |ownerData|\n\n unless Owner.find_by_poid(ownerData['person']['id'])\n\n Owner.create( poid: ownerData['person']['id'],\n initials: ownerData['person']['initials'],\n name: ownerData['person']['name'])\n end\n end\n end\n end",
"def set_owner\n @owner = Owner.find(params[:owner_id])\n end",
"def owner\n @owner ||= User.find(owner_user_id)\n end",
"def __owner__= owner\n @__owner = owner\n end",
"def owner=(value)\n self.person = value if a_person\n end",
"def add_owner(owner_ID)\n if @owners[0] == nil\n @owners = [owner_ID]\n else\n @owners << owner_ID\n end\n end",
"def add_owner(owner_ID)\n if @owners[0] == nil\n @owners = [owner_ID]\n else\n @owners << owner_ID\n end\n end",
"def owners_included; end",
"def owner=(new_owner)\n if new_owner\n attributes[:owner] = {\n :display_name => new_owner['DisplayName'],\n :id => new_owner['ID']\n }\n end\n end",
"def set_owner #:doc:\n self.owner_class.owner= get_current_owner\n end",
"def owner_names\n self.pets.map {|p| p.owner}.pluck(:name).uniq\n end",
"def autoset_owner\n bypass_auth do\n if accessor\n self.owner_id ||= accessor.id\n end\n end\n\n true # this is very important!\n end",
"def list_of_owners\n @owners = Owner.find(:all, :order=>\"state,city\")\n @report_name = \"List of Owners\"\n end",
"def group_members_of_owner_ids_only(owner_ids)\n owner_ids.present? ? where('group_owner_id.in': owner_ids) : none\n end",
"def owner\n @owner ||= User.new(connection, :login => @attributes[:owner])\n end",
"def possible_owners_files(dir)\n return [OwnersFileName] if dir == '.' || dir == '';\n\n [File.join([dir, OwnersFileName])] +\n possible_owners_files(File.dirname(dir))\n end",
"def owner?(user)\n user == owner || owners.include?(user)\n end",
"def find_owner_appointments\n owner_appointments = Appointment.all.select { |appointment| appointment.owners.include?(self) || appointment.owner_id == id } \n if !owner_appointments.empty?\n owner_appointments\n else\n nil\n end\n end",
"def owner \n Owner.new(attributes['owner'])\n end",
"def index\n @owner_properties = @owner.ownerProperties\n end",
"def activities_by_owners(owners)\n acts = @activities.select { |act| owners.include? act.owner}\n unless acts.nil?\n self.sort_activities acts\n end\n end",
"def owner\n if params[:owner].blank?\n raise Errors::NotFoundError.new('Owner not found.')\n end\n\n login = params[:owner].downcase\n Owner.find_by!(\"LOWER(login) = ?\", login)\n end",
"def minimal_owners_to_approve\n owners = owners_contents.map { |o| o & allowed_approvers }\n\n return [] if owners.empty?\n\n # If there's only one OWNERS file that applies, just return it\n # since the magic cartesian product screws it up\n if owners.length == 1\n return owners.first.map { |o| [o] }\n end\n\n owners.inject do |oldSoln, nextSet|\n oldSoln.minimum_length_cartesian_terms(nextSet)\n end\n end",
"def projects_owned\n Project.all.select {|project| project.owner == self}\n end",
"def add_owner_ids(ids)\r\n return if ids.nil?\r\n \r\n ids = [ids] unless ids.respond_to?(:each)\r\n ids.each do | id |\r\n @request.OwnerIDList.Add(id)\r\n end\r\n end",
"def read_owners(config, org_guid)\n user_setup_obj = UsersSetup.new(config)\n\n users_list = []\n users = @client.organization(org_guid).managers\n\n users.each do |user|\n user_guid = user.guid\n username = user_setup_obj.get_username_from_guid(user_guid)\n users_list << Users::User.new(username, 'owner', false, user_guid)\n end\n\n users_list\n end",
"def set_users\n @can_change_owner = policy(@run || Run).current_user_allowed_to_crud?\n @users = policy_scope(User).map{|u| [ u.name, u.id ] } if @can_change_owner\n end",
"def set_FilterToOwnedLists(value)\n set_input(\"FilterToOwnedLists\", value)\n end",
"def owners\n self.car.map do |car| car.owner.uniq\nend\n\n\n\nend",
"def owner?\n # exists? ? `ls -al #{path} | grep '[0-9] \\.$'`.split[2] : false\n proprieties[:owner]\n end",
"def index\n @owners = Owner.all\n render json: @owners, include: [], adapter: :json\n end",
"def connected_organizations=(value)\n @connected_organizations = value\n end"
] | [
"0.7155632",
"0.68630964",
"0.66506684",
"0.6472411",
"0.64438546",
"0.6364202",
"0.63176644",
"0.6296354",
"0.6206105",
"0.6189801",
"0.6110934",
"0.6110934",
"0.6110934",
"0.6110934",
"0.6110934",
"0.6078986",
"0.60420275",
"0.6039663",
"0.6014798",
"0.5925908",
"0.5899629",
"0.5864686",
"0.5864371",
"0.5858897",
"0.58262205",
"0.5759861",
"0.5729866",
"0.57035327",
"0.56847143",
"0.5611778",
"0.5610222",
"0.5600451",
"0.5599662",
"0.5599662",
"0.5557202",
"0.5548251",
"0.5525482",
"0.55045927",
"0.54867595",
"0.54705626",
"0.54705626",
"0.54705626",
"0.54705626",
"0.54705626",
"0.54705626",
"0.54705626",
"0.5470546",
"0.5467368",
"0.54655665",
"0.5464948",
"0.5464948",
"0.5464948",
"0.5464948",
"0.5464948",
"0.54645896",
"0.54645896",
"0.54645896",
"0.54645896",
"0.54645896",
"0.54645896",
"0.5463972",
"0.54621",
"0.54621",
"0.545874",
"0.5441642",
"0.5435943",
"0.5416944",
"0.54129046",
"0.53989905",
"0.5389136",
"0.53813106",
"0.53768337",
"0.53753644",
"0.53732675",
"0.53732675",
"0.53715175",
"0.5368197",
"0.53612787",
"0.5344206",
"0.53301936",
"0.53029317",
"0.5288215",
"0.52768946",
"0.5265951",
"0.52595073",
"0.5227709",
"0.52084816",
"0.5204574",
"0.51981324",
"0.5172747",
"0.51588976",
"0.5148396",
"0.51454824",
"0.5135794",
"0.5133284",
"0.51152647",
"0.5115148",
"0.50470066",
"0.5040294",
"0.50191414"
] | 0.8092823 | 0 |
Gets the parentalControlSettings property value. Specifies parental control settings for an application. | def parental_control_settings
return @parental_control_settings
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parental_control_settings=(value)\n @parental_control_settings = value\n end",
"def inheritable_settings\n return @inheritable_settings\n end",
"def parent\n @controller.instance_variable_get(:\"@#{parent_name}\")\n end",
"def parent\n if @resource[:parent] =~ /^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$/\n gindex = $ngs.index { |i| i['id'] == @resource[:parent] }\n $ngs[gindex]['id']\n else\n @property_hash[:parent]\n end\n end",
"def parent_id\n return @values['ai.operation.parentId'] if @values.key?('ai.operation.parentId')\n @defaults['ai.operation.parentId']\n end",
"def Parent()\r\n ret = _getproperty(1610743808, [], [])\r\n @lastargs = WIN32OLE::ARGV\r\n ret\r\n end",
"def Parent()\r\n ret = _getproperty(1610743808, [], [])\r\n @lastargs = WIN32OLE::ARGV\r\n ret\r\n end",
"def Parent()\r\n ret = _getproperty(1610743808, [], [])\r\n @lastargs = WIN32OLE::ARGV\r\n ret\r\n end",
"def Parent()\r\n ret = _getproperty(1610743808, [], [])\r\n @lastargs = WIN32OLE::ARGV\r\n ret\r\n end",
"def Parent()\r\n ret = _getproperty(1610743808, [], [])\r\n @lastargs = WIN32OLE::ARGV\r\n ret\r\n end",
"def Parent()\r\n ret = _getproperty(1610743808, [], [])\r\n @lastargs = WIN32OLE::ARGV\r\n ret\r\n end",
"def top_level_setting\n @top_level_setting ||= build_top_level_setting\n end",
"def parent\n o = Object.const_get(parent_model) rescue nil\n o && o.get(parent_id)\n end",
"def parent; @options[:parent]; end",
"def parent\n return @parent\n end",
"def parent_process_id\n return @parent_process_id\n end",
"def parent_id=(value)\n if value == @defaults['ai.operation.parentId']\n @values.delete 'ai.operation.parentId' if @values.key? 'ai.operation.parentId'\n else\n @values['ai.operation.parentId'] = value\n end\n end",
"def parent_id=(value)\n if value == @defaults['ai.operation.parentId']\n @values.delete 'ai.operation.parentId' if @values.key? 'ai.operation.parentId'\n else\n @values['ai.operation.parentId'] = value\n end\n end",
"def parent_style\n return '' if parent.nil?\n\n Style.new(parent[:style]).to_s\n end",
"def polymorph_parent(parent=nil)\n\t\t@parent ||= parent\n\t\treturn @parent\n\tend",
"def parent_section\n return @parent_section\n end",
"def parent\n @parent\n end",
"def parent\n @parent\n end",
"def parent\n @parent\n end",
"def parent\n @parent\n end",
"def getConfigPanel(iParent, iController)\n return nil\n end",
"def appl_settings\n @appl_settings\n end",
"def parent=(value)\n @parent = value\n end",
"def parent\n if parent_id.blank? then nil else unscoped_find(parent_id) end\n end",
"def parent_id\n data[:parent_id]\n end",
"def parent_id\n object[\"parent_id\"]\n end",
"def parent_folder_id\n return @parent_folder_id\n end",
"def app_locker_application_control\n return @app_locker_application_control\n end",
"def get_parent_id()\r\n result = nil\r\n if @coll_id #if coll_id is false, than collection_service is used by environment so no parent\r\n info = Transformer::KeyBuilder.collection_info(@env_id, @coll_id)\r\n result = @db_interface.get_hash_value(info, Transformer::KeyBuilder::PARENT_ID_KEY)\r\n end\r\n return result\r\n end",
"def get_parent\n return nil\n end",
"def current_parent\n\t Parent.where(id: session[\"parent_id\"]).first\n\tend",
"def parent_menu_item_name\n menu_options[:parent]\n end",
"def set_Parent(value)\n set_input(\"Parent\", value)\n end",
"def parent_key\n return @parent_key if defined?(@parent_key)\n\n repository_name = parent_repository_name || child_repository_name\n properties = parent_model.properties(repository_name)\n\n @parent_key = if @parent_properties\n parent_key = properties.values_at(*@parent_properties)\n properties.class.new(parent_key).freeze\n else\n properties.key\n end\n end",
"def parent_id\r\n return nil unless ar_object\r\n ar_object[ar_p]\r\n end",
"def parent_id\n self.parent._id.to_s\n end",
"def parent\n @parent\n end",
"def parent\n @parent\n end",
"def parent_section\n self.parent_sections[0]\n end",
"def settings\n self.class.settings\n end",
"def inheritable_setting\n @inheritable_setting ||= Grape::Util::InheritableSetting.new.tap { |new_settings| new_settings.inherit_from top_level_setting }\n end",
"def parent_process_id=(value)\n @parent_process_id = value\n end",
"def parent\n _parent\n end",
"def parent_handle\n self.parent ? self.parent.handle : @parent_handle\n end",
"def parent\n return @links[:parent]\n end",
"def parent parent\n @menu.parent parent\n end",
"def parent_controller\n (@parent_controller || \"ApplicationController\").to_s.constantize\n end",
"def value\n\n configuration_value = nil\n \n matching_parent = match_parent_configuration do |this_parent_configuration|\n this_parent_configuration.has_value? ? true: false\n end\n\n if matching_parent\n configuration_value = matching_parent.local_value\n end\n \n return configuration_value\n \n end",
"def parent=(instance)\n @controller.instance_variable_set(:\"@#{parent_name}\", instance)\n end",
"def enforced_settings\n return @enforced_settings\n end",
"def parent_type\n @parent_type ||= parent_type_from_params || parent_type_from_request\n end",
"def parent\n owner\n end",
"def parent\n @parent ||= resource.decorate.parent\n end",
"def parent_id\n @values.fetch('ai.operation.parentId') { \n @values['ai.operation.parentId'] = nil\n }\n end",
"def parent\n tree.parent_for(parent_id).first\n end",
"def parent_field\n return '' unless @field_config[:parent_field]\n\n \"[#{@field_config[:parent_field]}]\"\n end",
"def setting\n return @setting\n end",
"def parent_section=(value)\n @parent_section = value\n end",
"def parent_type\n @parent_type ||= parent_type_from_params || parent_type_from_request\n end",
"def get_parent_resource\n instance_variable_get(\"@#{parent_resource_name}\")\n end",
"def parent_object\n @parent_object ||= parent? && !parent_singleton? ? parent_model.find(parent_param) : nil\n end",
"def settings\n return @settings\n end",
"def settings\n return @settings\n end",
"def build_top_level_setting\n Grape::Util::InheritableSetting.new.tap do |setting|\n # Doesn't try to inherit settings from +Grape::API::Instance+ which also responds to\n # +inheritable_setting+, however, it doesn't contain any user-defined settings.\n # Otherwise, it would lead to an extra instance of +Grape::Util::InheritableSetting+\n # in the chain for every endpoint.\n setting.inherit_from superclass.inheritable_setting if defined?(superclass) && superclass.respond_to?(:inheritable_setting) && superclass != Grape::API::Instance\n end\n end",
"def get_parent_notification\n\t\tAuth.configuration.notification_class.constantize.find(self.parent_notification_id)\n\tend",
"def parent_notebook\n return @parent_notebook\n end",
"def parent_notebook\n return @parent_notebook\n end",
"def parent_notebook\n return @parent_notebook\n end",
"def [](symbol_or_name)\n setting = find_setting(symbol_or_name).try(:value)\n if setting.nil? && has_parent?\n return parent.__send__(:[], symbol_or_name)\n else\n return setting\n end\n end",
"def parent_name\n parent_info && parent_info.name\n end",
"def parent_id\n self[self.nested_set_options[:parent_column]]\n end",
"def class_settings\n if controller.controller_name == 'settings'\n \"current\"\n end\n end",
"def set_parent_app\n @parent_app = ParentApp.find(params[:id])\n end",
"def parent_object\n # hack by sean to allow permalink parents\n parent? && !parent_singleton? ? parent_model_find(parent_param) : nil\n end",
"def parent_class_name\n options[:parent] || determine_default_parent_class\n end",
"def app_state\n if parent\n parent.app_state\n else\n # If there isn't a parent, just track within the resource.\n @local_app_state ||= Mash.new\n end\n end",
"def client_webhook_setting\n @client_webhook_setting ||= ClientWebhookSetting.is_active.where(id: @client_webhook_setting_id).first\n end",
"def app_locker_application_control=(value)\n @app_locker_application_control = value\n end",
"def root_parent\n if parent\n parent.root_parent\n else\n self\n end\n end",
"def parent\n\t\treturn parent_of @current_node\n\tend",
"def parent\n \tif self.parent_id == -1\n \t\treturn nil\n \telse\n \t\treturn Category.find(self.parent_id)\n \tend\n end",
"def parent_folder_id=(value)\n @parent_folder_id = value\n end",
"def get_parent_id()\n self.account_id\n end",
"def inheritable_settings=(value)\n @inheritable_settings = value\n end",
"def parent_section_group\n return @parent_section_group\n end",
"def parent_section_group\n return @parent_section_group\n end",
"def parent_notebook=(value)\n @parent_notebook = value\n end",
"def parent_notebook=(value)\n @parent_notebook = value\n end",
"def parent_notebook=(value)\n @parent_notebook = value\n end",
"def parent?\n if defined?(@parent_cookie_class) && defined?(@parent_cookie_key)\n true\n else\n false\n end\n end",
"def getConfig(data)\n settings = data['pdf'].is_a?(Hash) ? data['pdf'] : {}\n layout = @site.layouts[data['layout']].data.clone if data['layout'] != nil\n\n # No parent layout found - return settings hash\n return settings if layout == nil\n\n # Merge settings with parent layout settings\n layout['pdf'] ||= {}\n Jekyll::Utils.deep_merge_hashes!(layout['pdf'], settings)\n\n return self.getConfig(layout)\n end",
"def parent\n @parent ||= begin\n parent_id = data[\"parentId\"]\n client.categories.find(parent_id) if parent_id\n end\n end",
"def parent\n\t\tpardn = self.parent_dn or return nil\n\t\treturn self.class.new( self.directory, pardn )\n\tend",
"def settings\r\n @@settings\r\n end",
"def configuration\n return @children['configuration'][:value]\n end"
] | [
"0.80329704",
"0.5724647",
"0.5723721",
"0.56595904",
"0.5657176",
"0.5656643",
"0.5656643",
"0.5656643",
"0.5656643",
"0.5656643",
"0.5656643",
"0.565416",
"0.5499744",
"0.5497065",
"0.5466594",
"0.5429247",
"0.5390112",
"0.5390112",
"0.5372572",
"0.53541476",
"0.5343191",
"0.53398764",
"0.53398764",
"0.53398764",
"0.53398764",
"0.5334392",
"0.53321177",
"0.53202564",
"0.53196186",
"0.53053445",
"0.5304947",
"0.5295286",
"0.5263624",
"0.5262001",
"0.5257881",
"0.52544963",
"0.52475476",
"0.52277714",
"0.52251095",
"0.52180904",
"0.5215632",
"0.52095157",
"0.52095157",
"0.5196334",
"0.5191177",
"0.51900333",
"0.5156596",
"0.51473194",
"0.5138977",
"0.5138334",
"0.5134197",
"0.51331156",
"0.5127468",
"0.51148194",
"0.511266",
"0.5107597",
"0.5107048",
"0.5102508",
"0.5102475",
"0.50937945",
"0.5093434",
"0.5092625",
"0.5085188",
"0.5077334",
"0.5076477",
"0.5054866",
"0.5053545",
"0.5053545",
"0.5048324",
"0.5045714",
"0.5044866",
"0.5044866",
"0.5044866",
"0.50386363",
"0.5027633",
"0.5018751",
"0.5011678",
"0.5000042",
"0.49812928",
"0.4980342",
"0.49716568",
"0.49678415",
"0.49652922",
"0.49363315",
"0.49342334",
"0.49284828",
"0.4925701",
"0.4918987",
"0.4915486",
"0.4914088",
"0.4914088",
"0.49106997",
"0.49106997",
"0.49106997",
"0.4907856",
"0.49019957",
"0.49011192",
"0.49006146",
"0.49004334",
"0.48998564"
] | 0.8493172 | 0 |
Sets the parentalControlSettings property value. Specifies parental control settings for an application. | def parental_control_settings=(value)
@parental_control_settings = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parental_control_settings\n return @parental_control_settings\n end",
"def set_Parent(value)\n set_input(\"Parent\", value)\n end",
"def set_parent(parent)\n @parent = parent\n end",
"def set_parent(parent)\n @parent = parent\n end",
"def parent=(value)\n @parent = value\n end",
"def set_parent(parent)\n @parent = parent\n\n self\n end",
"def parent=(instance)\n @controller.instance_variable_set(:\"@#{parent_name}\", instance)\n end",
"def set_parent(parent)\n @parent = parent\n end",
"def set_NewParent(value)\n set_input(\"NewParent\", value)\n end",
"def set_ParentID(value)\n set_input(\"ParentID\", value)\n end",
"def parent=(parent)\n @parent = parent\n end",
"def set_parent(parent_node)\n @parent = parent_node\n end",
"def parent=(parent)\n @parent = parent\n end",
"def parent=(parent)\n @parent = parent\n end",
"def parent_section=(value)\n @parent_section = value\n end",
"def set_parent\n @parent = Parent.find(session[:parent_id])\n end",
"def set_ParentID(value)\n set_input(\"ParentID\", value)\n end",
"def set_ParentID(value)\n set_input(\"ParentID\", value)\n end",
"def set_ParentID(value)\n set_input(\"ParentID\", value)\n end",
"def set_parent_app\n @parent_app = ParentApp.find(params[:id])\n end",
"def new_parent=(a_parent)\n @new_parent = a_parent\n end",
"def setParent(parent)\n oldParent = @parent\n @parent = parent\n\n if parent.nil?\n # Remove from parent\n onDetach() if oldParent and oldParent.isAttached\n elsif parent.isAttached\n onAttach()\n end\n end",
"def parent=(p)\n @parent = p\n end",
"def set_cparent\n @cparent = Cparent.find(params[:id])\n end",
"def parent_id=(value)\n self[self.nested_set_options[:parent_column]] = value\n end",
"def parent=(other)\n raise 'Cannot set parent of root namespace' if root?\n @parent = other\n @registry = nil\n end",
"def inheritable_settings=(value)\n @inheritable_settings = value\n end",
"def parent_id=(value)\n if value == @defaults['ai.operation.parentId']\n @values.delete 'ai.operation.parentId' if @values.key? 'ai.operation.parentId'\n else\n @values['ai.operation.parentId'] = value\n end\n end",
"def parent_id=(value)\n if value == @defaults['ai.operation.parentId']\n @values.delete 'ai.operation.parentId' if @values.key? 'ai.operation.parentId'\n else\n @values['ai.operation.parentId'] = value\n end\n end",
"def set_parent\n @parent = Parent.find(params[:id])\n end",
"def set_parent\n @parent = Parent.find(params[:id])\n end",
"def set_parent\n @parent = Parent.find(params[:id])\n end",
"def set_parent\n @parent = Parent.find(params[:id])\n end",
"def set_parent\n @parent = Parent.find(params[:id])\n end",
"def set_parent\n @parent = Parent.find(params[:id])\n end",
"def parent=(resource)\n @parent = resource\n end",
"def parent_process_id=(value)\n @parent_process_id = value\n end",
"def parent_notebook=(value)\n @parent_notebook = value\n end",
"def parent_notebook=(value)\n @parent_notebook = value\n end",
"def parent_notebook=(value)\n @parent_notebook = value\n end",
"def set_parent_path\n @parent_resource = \"/\"\n @parent_path = \"\"\n end",
"def app_settings=(value)\n @children['app-settings'][:value] = value\n end",
"def app_settings=(value)\n @children['app-settings'][:value] = value\n end",
"def parent=(a_parent)\n if parent \n parent.children.delete(self)\n end \n \n if a_parent.nil? \n @parent = a_parent\n return\n else\n a_parent.children << self unless a_parent.children.include?(self)\n @parent = a_parent\n end \n end",
"def _UNDO_setParent(iParentTag)\n @Parent = iParentTag\n end",
"def parent=(parent_node)\n parent_node.add_child(self)\n parent_node\n end",
"def parent=(value)\n raise UnsupportedOperationError\n end",
"def set_parent_info\n @parent_info = ParentInfo.find(params[:id])\n end",
"def parent=(parent)\n raise UnmutableParentError unless parent.is_a? RDF::Mutable\n raise UnmutableParentError unless parent.mutable?\n @parent = parent\n end",
"def parent=(operator)\n @options[:parent]= operator\n end",
"def set_parent_resource(resource = nil)\n resource ||= parent_resource_class.find_by_uid(parent_params)\n instance_variable_set(\"@#{parent_resource_name}\", resource)\n end",
"def set_parent_of\n @parent_of = ParentOf.find(params[:id])\n end",
"def app_locker_application_control=(value)\n @app_locker_application_control = value\n end",
"def parent_section_group=(value)\n @parent_section_group = value\n end",
"def parent_section_group=(value)\n @parent_section_group = value\n end",
"def set_ParentPost(value)\n set_input(\"ParentPost\", value)\n end",
"def set_ParentPost(value)\n set_input(\"ParentPost\", value)\n end",
"def set_parent(parent: required(\"parent\"), insert_after: nil, insert_before: nil, options: {}, **data)\n with_params = data.merge(parent: parent, insert_after: insert_after, insert_before: insert_before).reject { |_,v| v.nil? || Array(v).empty? }\n client.post(\"/tasks/#{gid}/setParent\", body: with_params, options: options) && true\n end",
"def parent=(parent)\n raise NilParentError if parent.nil?\n raise UnmutableParentError unless parent.is_a? RDF::Mutable\n raise UnmutableParentError unless parent.mutable?\n\n @parent = parent\n reload\n end",
"def parent=(parent)\n if @parent\n @parent.remove_child(self)\n end\n\n @parent = parent\n\n if @parent\n @parent.children << self\n @parent.add_observer self\n set_depth @parent.depth + 1\n else\n set_depth 0\n end\n\n self\n end",
"def set_yaml\n if @parent\n @yaml.has_key?(@parent) ? set(defaults.recursive_merge(@yaml[@parent])) : raise(Configarrr::OptionError, \"Please provide a valid parent value. #{@parent} does not exist.\")\n else\n set defaults.recursive_merge(@yaml)\n end\n end",
"def set_parent\n @parent_obligation = ParentObligation.where(user_id: params[:id], school_class_id: params[:school_class_id]).take\n end",
"def parent_folder_id=(value)\n @parent_folder_id = value\n end",
"def parent=(new_parent_node)\n orphan_me\n @parent = new_parent_node\n unless @parent.nil?\n siblings = @parent.children\n siblings << self unless siblings.include?(self)\n end\n end",
"def set_parent(pa)\n self.parent = pa\n pa.children ||= []\n pa.children << self\n end",
"def parent=(new_parent)\n #Reset old parent\n @parent.children.delete(self) if @parent != nil\n\n if new_parent != nil && !new_parent.children.include?(self)\n new_parent.children << self\n end\n @parent = new_parent\n end",
"def parent=(parent)\n\t\t\treturn if @parent.equal?(parent)\n\t\t\t\n\t\t\tif @parent\n\t\t\t\[email protected]_child(self)\n\t\t\t\t@parent = nil\n\t\t\tend\n\t\t\t\n\t\t\tif parent\n\t\t\t\tparent.add_child(self)\n\t\t\tend\n\t\t\t\n\t\t\treturn self\n\t\tend",
"def set_parent_site\n self.site_id = parent_item.site_id if parent_item.present?\n self.site_id = parent.site_id if parent.present?\n end",
"def parent=(scp)\n @parent = scp\n scp.children << self if scp\n end",
"def set_parent_type\n @parent_type = ParentType.find(params[:id])\n end",
"def revert_to_parent!\n if self.parent\n self.invalidate!\n self.parent.activate!\n self.parent.controller = self.controller\n self.parent.set_cookie!\n self.parent\n else\n raise NoParentSessionForRevert, \"Session does not have a parent therefore cannot be reverted.\"\n end\n end",
"def kiosk_mode_allow_voice_over_settings=(value)\n @kiosk_mode_allow_voice_over_settings = value\n end",
"def parent_route=(route)\n @parent_route = route\n routes.each{|r| r.parent_route = route}\n end",
"def parent= parent_node\n parent_node.add_child(self)\n parent_node\n end",
"def parent(resource)\n if @resource_config[:parent]\n raise DefinitionError, \"parent already declared in #{self}\"\n end\n @resource_config[:parent] = resource\n end",
"def top_level_setting\n @top_level_setting ||= build_top_level_setting\n end",
"def setCategoryChain()\n @parentCategory = getParentCategory\n \n if (@parentCategory != false)\n @parentCategory.subparent = self\n superParent = @parentCategory.setCategoryChain \n elsif\n superParent = self\n end\n \n return superParent\nend",
"def define_popup_parent(view, component, model, transfer)\n p :define_popup_parent\n view.parent_component = @main_view_component\n end",
"def load_parent_assoc\n @parent_model = nil\n raise 'Sovrascrivi funzione \"load_parent_assoc\" nei figli la definizione di questa variabile: @parent_model'\n end",
"def set_allowed_parent!(p)\n unless p.nil? || p.is_a?(Warehouse)\n if p.to_s.blank?\n p = nil\n else\n p = Warehouse.find_by_id(p)\n return false unless p\n end\n end\n if p.nil?\n if !new_record? && allowed_parents.empty?\n return false\n end\n elsif !allowed_parents.include?(p)\n return false\n end\n set_parent!(p)\n end",
"def parent=(new_parent)\n if new_parent == nil\n @parent.children.delete(self) if self.parent != nil # remove self as a child from its parent\n @parent = nil\n return\n end\n\n if self.parent != nil # If self already has a parent\n @parent.children.delete(self)\n end\n \n @parent = new_parent\n @parent.children << self\n end",
"def set_parent_profile\n @parent_profile = ParentProfile.find(params[:id])\n end",
"def parent; @options[:parent]; end",
"def settings=(value)\n @settings = value\n end",
"def settings=(value)\n @settings = value\n end",
"def parent=(parent_node); end",
"def parent=(parent_node); end",
"def enforced_settings=(value)\n @enforced_settings = value\n end",
"def polymorph_parent(parent=nil)\n\t\t@parent ||= parent\n\t\treturn @parent\n\tend",
"def set_parent(new_parent)\n if new_parent.is_a? Activity\n old_parent = self.parent\n if !self.rep_parent.nil?\n return self.rep_parent.set_parent(new_parent)\n end\n new_parent.children << self # add to children\n self.parent_id = new_parent.id\n self.is_root = false\n self.save!\n new_parent.is_complete?\n \n if old_parent != nil\n old_parent.children.delete(self)# delete from old parent\n old_parent.is_complete? # in case depends on \n end\n return true\n else\n return false\n end\n end",
"def parent\n @controller.instance_variable_get(:\"@#{parent_name}\")\n end",
"def parent=(root)\n \n if self.parent != nil\n self.parent.children.select! {|child| child!=self }\n end\n @parent = root\n unless root.nil?\n root.children << self\n end\n end",
"def build_top_level_setting\n Grape::Util::InheritableSetting.new.tap do |setting|\n # Doesn't try to inherit settings from +Grape::API::Instance+ which also responds to\n # +inheritable_setting+, however, it doesn't contain any user-defined settings.\n # Otherwise, it would lead to an extra instance of +Grape::Util::InheritableSetting+\n # in the chain for every endpoint.\n setting.inherit_from superclass.inheritable_setting if defined?(superclass) && superclass.respond_to?(:inheritable_setting) && superclass != Grape::API::Instance\n end\n end",
"def set_config_value!(config_parent, key, value)\n #find the configuration\n configuration = config_parent.configurations.find_by(class_name: self.class.to_s, key: key)\n if !configuration.nil?\n configuration.create_or_update_config(self, value)\n end\n end",
"def set_parent\n tbc = self.class.preceding_key_column\n if tbc && self.respond_to?(tbc)\n write_attribute(tbc, @_before_to_new_record_values[:id])\n end\n end",
"def update_for_parent_set( parent_array, parent_index, object )\n \n parent_local_map = @cascade_controller.parent_local_map( parent_array )\n \n if @cascade_controller.parent_controls_parent_index?( parent_array, parent_index, parent_local_map ) or\n parent_index >= parent_local_map.size\n local_index = @cascade_controller.parent_set( parent_array, parent_index )\n undecorated_set( local_index, nil )\n @children.each { |this_array| this_array.update_for_parent_set( local_index, object ) }\n end\n \n return self\n\n end",
"def inheritable_setting\n @inheritable_setting ||= Grape::Util::InheritableSetting.new.tap { |new_settings| new_settings.inherit_from top_level_setting }\n end",
"def evaluate_parent(parent_symbol, parent_config, chain = nil) #:nodoc:\n get_parent_ivar(parent_config[:instance_name]) ||\n set_parent_instance(parent_config, chain)\n end",
"def parent_controls_parent_index?( parent_array, parent_index, \n parent_local_map = parent_local_map( parent_array ), \n local_parent_map = local_parent_map( parent_array ) )\n \n parent_controls_parent_index = false\n \n # when local takes control of a parent index, parent => local index mapping does not cease\n # instead, we track where it moves so that we can insert at precisely that point later if needed \n if @local_index_to_parent_map and\n local_index = parent_local_map[ parent_index ] and\n @local_index_to_parent_map[ local_index ].equal?( parent_array ) and\n parent_index == local_parent_map[ local_index ]\n\n parent_controls_parent_index = true\n\n end\n \n return parent_controls_parent_index\n \n end",
"def parent=(other); end"
] | [
"0.6853858",
"0.63454",
"0.62270117",
"0.62270117",
"0.6162204",
"0.6107152",
"0.6106573",
"0.60845697",
"0.5985315",
"0.58939797",
"0.5869653",
"0.5780242",
"0.57718503",
"0.57718503",
"0.5759621",
"0.5759465",
"0.57488924",
"0.57488924",
"0.57488924",
"0.57259315",
"0.5713006",
"0.57096046",
"0.567163",
"0.56045973",
"0.5512359",
"0.549626",
"0.548559",
"0.5447462",
"0.5447462",
"0.54090756",
"0.54090756",
"0.54090756",
"0.54090756",
"0.54090756",
"0.54090756",
"0.54020256",
"0.5393376",
"0.5383901",
"0.5383901",
"0.5383901",
"0.5358922",
"0.5323165",
"0.5323165",
"0.53105277",
"0.530135",
"0.5297962",
"0.52969724",
"0.5250497",
"0.5245906",
"0.52115273",
"0.5209309",
"0.5207948",
"0.5199242",
"0.51967883",
"0.51967883",
"0.5173541",
"0.5173541",
"0.51537055",
"0.5146976",
"0.5122151",
"0.51173836",
"0.5115176",
"0.5113916",
"0.5109564",
"0.50916624",
"0.50771964",
"0.5052757",
"0.5044581",
"0.50383097",
"0.4971581",
"0.49664068",
"0.49599454",
"0.49495682",
"0.49488106",
"0.4943034",
"0.4923862",
"0.49027783",
"0.48769647",
"0.4874794",
"0.4861853",
"0.48542622",
"0.48536056",
"0.48386902",
"0.48341265",
"0.48341265",
"0.482246",
"0.482246",
"0.48029858",
"0.47840288",
"0.47747213",
"0.47653958",
"0.4763458",
"0.4762974",
"0.47491613",
"0.47425386",
"0.47420117",
"0.47326168",
"0.47325456",
"0.4732028",
"0.4728476"
] | 0.86249256 | 0 |
Gets the passwordCredentials property value. The collection of password credentials associated with the application. Not nullable. | def password_credentials
return @password_credentials
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def password_credentials=(value)\n @password_credentials = value\n end",
"def password_credential\n user.credentials.find { |c| c.is_a? Credentials::Password }\n end",
"def password\n open(@credentials_file, 'r').readlines.last.strip if valid_file?(@credentials_file)\n end",
"def credentials\n []\n end",
"def credentials\n []\n end",
"def password\n credentials.last\n end",
"def passwords\n @users.each_value.to_a\n end",
"def credentials\n config.credentials.credentials\n end",
"def get_credentials\n password = ENV['CARRIER_PRODUCTS_ENCRYPTION_PASSWORD']\n\n encrypted_credentials = self.credentials\n if self.state == CarrierProduct::States::LOCKED_FOR_CONFIGURING\n configured_product = first_unlocked_product_in_owner_chain()\n if configured_product\n return configured_product.get_credentials\n else\n return {}\n end\n\n end\n\n credentials = encrypted_credentials.inject({}) do |hash, (key, value)|\n hash[key] = AESCrypt.decrypt(value, password)\n hash\n end\n\n return credentials\n end",
"def read_credentials\n conf = self.configuration\n return nil unless conf[:credentials]\n return [conf[:credentials][:access_key], conf[:credentials][:secret_key]]\n end",
"def read_credentials\n conf = self.configuration\n return nil unless conf[:credentials]\n return [conf[:credentials][:access_key], conf[:credentials][:secret_key]]\n end",
"def credentials\n @credentials || self.class.credentials\n end",
"def credentials\n auth_hash['credentials']\n end",
"def password_methods\n return @password_methods\n end",
"def credentials\n @credentials ||= begin\n request = Rack::Auth::Basic::Request.new(env)\n request.provided? ? request.credentials : []\n end\n end",
"def password\n @retain_user_connection_parameters.password\n end",
"def credentials\n @lock.synchronize do\n @credentials\n end\n end",
"def credentials\n params.values_at('username', 'password')\n end",
"def credentials\n { :user => @user, :password => @password }\n end",
"def password\n Password.find(password_id)\n end",
"def credentials\n @credentials ||= params.unpack1('m*').split(':', 2)\n end",
"def password\n return @password\n end",
"def key_credentials\n return @key_credentials\n end",
"def password\n return @password\n end",
"def credentials\n @credentials ||= {}\n end",
"def password\n return nil unless @password\n @password.password\n end",
"def password\n @password || raise(Communicator::MissingCredentials.new(\"No Password specified for HTTP AUTH. Please configure using Communicator.password='xyz'\"))\n end",
"def credentials(app_name=nil)\n #bound_app is the name of an app bound to the dat-service and that credentials\n #should be used to access the data-service.\n #for example if an app creates large objects you will need to use\n #the credentials of that app to find the objects.\n app_name ||= @wrapped['director']['bound_app'] if @wrapped['director']\n @credentials ||= VMC::KNIFE.get_credentials(name(), app_name)\n @credentials\n end",
"def get_credentials(provided_user = nil, provided_pw = nil)\n if provided_user && provided_pw\n return [provided_user, provided_pw]\n end\n\n @credential_getters.each do |c|\n begin\n user, pw = c.get_credentials(provided_user, provided_pw)\n if user && pw\n return [user, pw]\n end\n rescue Exception => e\n # ignore errors, try our best to get creds. maybe highline missing?\n end\n end\n # no credentials found, try anonymous\n return [\"\", \"\"]\n end",
"def password\n begin\n password = ::BCrypt::Password.new(self.encrypted_password)\n rescue\n password = nil\n end\n password\n end",
"def credentials\n @credentials ||= WebCredentials.new(self.config['user'], self.config['password'], self.config['domain'])\n end",
"def index\n @passwords = current_user.passwords\n end",
"def passwords_file\n dir['passwords']\n end",
"def password\n @password\n end",
"def password\n @password\n end",
"def password\n @attributes[:password]\n end",
"def password\n @attributes[:password]\n end",
"def password\n if !@password_insync && resource[:api_admin] == :true\n update_admin_pass_with_rake\n end\n return resource[:password] if @password_insync\n return nil\n end",
"def fetch_credentials\n service = @application.services.find_service FILTER\n service['credentials']\n end",
"def encrypted_password\n BCrypt::Password.new( self['encrypted_password_store'] || '' )\n end",
"def password\n @password\n end",
"def password\n @password\n end",
"def credentials\n YAML.load_file('config/secrets.yml')['admins']\n end",
"def credentials\n {\n \"username\" => self.username,\n \"password\" => self.password\n }\n end",
"def password\n [@password, @security_token].join('')\n end",
"def list_service_credentials(opts = {})\n data, _status_code, _headers = list_service_credentials_with_http_info(opts)\n data\n end",
"def password\n\t\t# We expect that the default OpenMRS interface is used to create users\n\t\t#self.password = encrypt(self.plain_password, self.salt) if self.plain_password\n\t\t#raise @password.to_yaml\n\t\tself[:password]\n\tend",
"def password\n if current_user.present?\n if object.password.present? \n if current_user.super_admin?\n object.password\n else\n nil\n end\n else\n object.password\n end\n else\n nil\n end\n end",
"def credentials?\n credentials.values.all?\n end",
"def to_a\n [username, password]\n end",
"def user_password\n @password\n end",
"def password\n\t\tPassword.new( attribute_get(:password) )\n\tend",
"def password_object\n Password.new(password_hash)\n end",
"def getpassword()\r\n return getvalue(SVTags::PASSWORD)\r\n end",
"def credentials\n { :username => @email, :password => @password }\n end",
"def password\n @password\n end",
"def get_credentials(child_app_id, opts = {})\n data, _status_code, _headers = get_credentials_with_http_info(child_app_id, opts)\n data\n end",
"def password\n @password ||= BCrypt::Password.new(encrypted_password) if encrypted_password\n end",
"def password\n @password||=@options['password']\n end",
"def getPassword()\n return @password\n\tend",
"def password\n raw_password = read_attribute(:password)\n raw_password.blank? ? nil : crypt.decrypt(raw_password)\n end",
"def password\n @crypted_password\n \n end",
"def password\n @password ||= opts.fetch(:password, parsed_opt('password'))\n end",
"def crowd_app_password(password=nil)\r\n rw_config(:crowd_app_password, password, nil)\r\n end",
"def password\n if password_digest\n @password ||= BCrypt::Password.new(password_digest)\n else\n nil\n end\n end",
"def credentials\n @credentials ||= begin\n txt = ::Base64.decode64(header.params || '')\n txt.split(/:/, 2)\n end\n end",
"def password\n password = Base64.decode64(@config.fetch(:password, nil))\n if password\n cipher.decrypt_string(password).gsub(\"\\0\", \"\")\n else\n password\n end\n end",
"def credentials\n return unless configuration\n {\n host: configuration[\"host\"],\n user: configuration[\"username\"],\n database: configuration[\"database\"],\n password: configuration[\"password\"],\n socket: configuration[\"socket\"]\n }\n end",
"def password\n connect\n password = self.class.query('CMD_API_VERIFY_PASSWORD',\n :user => resource[:username],\n :passwd => resource[:password]\n )\n if password[\"valid\"] == \"1\"\n return resource[:password]\n else\n return \"********\"\n end\n end",
"def password\n @password ||= Password.new(self.hashed_password)\n end",
"def password\n @password ||= BCrypt::Password.new(@password_hash)\n end",
"def password\n BCrypt::Password.new(self.password_digest)\n end",
"def auth_credentials\n auth = Rack::Auth::Basic::Request.new(request.env)\n auth.provided? && auth.basic? ? auth.credentials : [nil,nil]\n end",
"def configured_credentials\n running_config.scan(/(username.*?)$/m).flatten.map(&:strip!)\n end",
"def password(db_connection)\n sql = 'SELECT password FROM user_logins WHERE user_id=$1;'\n db_connection.exec_params(sql, [ id ]).first['password']\n end",
"def password\n ENV['DESK_PASSWORD']\n end",
"def encrypted_password\n read_attribute(:password)\n end",
"def password\n @password ||= BCrypt::Password.new(password_hash)\n end",
"def password\n @password ||= BCrypt::Password.new(password_hash)\n end",
"def password\n @password ||= BCrypt::Password.new(password_hash)\n end",
"def password\n @password ||= BCrypt::Password.new(password_hash)\n end",
"def password\n @password ||= BCrypt::Password.new(password_hash)\n end",
"def list_key_credentials_for_application(app_id, options = {})\n get(\"/apps/#{app_id}/credentials/keys\", options)\n end",
"def credentials\n @credentials ||= GlobalConstant::Aws::Common.get_credentials_for(@role)\n end",
"def credentials\n @credentials ||= GlobalConstant::Aws::Common.get_credentials_for(@role)\n end",
"def rails_credentials\n @_rails_credentials ||= LdapQuery::RailsCredentials.credentials\n end",
"def credentials\n @credentials ||= Rugged::Credentials::UserPassword.new({\n :username => \"x-oauth-basic\",\n :password => ENV[\"GITHUB_TOKEN\"]\n })\n end",
"def credentials\n return nil if username.nil? || password.nil?\n \"#{username}:#{password}\"\n end",
"def password(password_name)\n pwd = Security::GenericPassword.find(l: password_name)\n pwd = Security::InternetPassword.find(l: password_name) if !pwd\n raise \"A password named '#{password_name}' does not exist in the default keychain\" if !pwd\n pwd.password\n end",
"def password\n @password ||= ::BCrypt::Password.new(password_digest)\n end",
"def password\n @password ||= BCrypt::Password.new(h_password)\n end",
"def credentials(rack_env)\n Credentials.from_rack_env(rack_env)\n end",
"def credentials=(value)\n BaseTask.validate value, \"credentials\", Database::CREDENTIALS\n @credentials = value\n end",
"def password(id)\n profile_element = profile(id)\n if profile_element\n enc_passwd = profile_element['password']\n return decrypt(enc_passwd) if enc_passwd\n end\n end",
"def password\n @password\n end",
"def password\n @password\n end",
"def password\n @password\n end",
"def password\n @password\n end",
"def password\n @password\n end",
"def password\n @password\n end"
] | [
"0.7119479",
"0.6806089",
"0.67128956",
"0.6679504",
"0.6679504",
"0.66720736",
"0.6517355",
"0.65137565",
"0.64301246",
"0.63769174",
"0.63769174",
"0.63548845",
"0.62736934",
"0.62723315",
"0.62545973",
"0.6221573",
"0.6199996",
"0.6189869",
"0.6167288",
"0.61444056",
"0.6131092",
"0.60964334",
"0.6053549",
"0.60487413",
"0.60416067",
"0.6030454",
"0.59833455",
"0.5981648",
"0.5963311",
"0.5952139",
"0.5949993",
"0.5928635",
"0.5917972",
"0.5916604",
"0.5916604",
"0.5912636",
"0.5912636",
"0.5875546",
"0.5862649",
"0.58545035",
"0.585206",
"0.585206",
"0.58046526",
"0.57858175",
"0.57825994",
"0.5760923",
"0.57424486",
"0.5735321",
"0.57244086",
"0.5721385",
"0.57195514",
"0.5705571",
"0.56678414",
"0.56662816",
"0.5650259",
"0.5648432",
"0.5642663",
"0.56425494",
"0.5632208",
"0.56175834",
"0.56112",
"0.56030256",
"0.559737",
"0.55927736",
"0.5581705",
"0.55774224",
"0.5575521",
"0.5573289",
"0.55682343",
"0.55665857",
"0.5555068",
"0.5541363",
"0.5532936",
"0.5528556",
"0.55240256",
"0.55215913",
"0.5507578",
"0.54860175",
"0.54860175",
"0.54860175",
"0.54860175",
"0.54860175",
"0.548468",
"0.5479499",
"0.5479499",
"0.5472084",
"0.54685825",
"0.5463396",
"0.54623187",
"0.54617536",
"0.5445036",
"0.5444452",
"0.5439734",
"0.54389876",
"0.5432607",
"0.5432607",
"0.5432607",
"0.5432607",
"0.5432607",
"0.5432607"
] | 0.80666035 | 0 |
Sets the passwordCredentials property value. The collection of password credentials associated with the application. Not nullable. | def password_credentials=(value)
@password_credentials = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def credentials=(value)\n BaseTask.validate value, \"credentials\", Database::CREDENTIALS\n @credentials = value\n end",
"def credentials=(credentials)\n if credentials.kind_of?(ApplicationCredentials) || credentials.kind_of?(AccountCredentials)\n @credentials = credentials\n else\n raise 'Invalid credentials object'\n end\n end",
"def credentials=(credentials)\n @lock.synchronize do\n @credentials = credentials\n end\n end",
"def password_credentials\n return @password_credentials\n end",
"def password=(value)\n\t\t\t@password = value\n\t\tend",
"def set_credentials(credentials: nil)\n raise StandardError, 'credentials must be a hash' unless credentials.is_a?(Hash)\n\n password = ENV['CARRIER_PRODUCTS_ENCRYPTION_PASSWORD']\n encrypted_credentials = credentials.inject({}) do |hash, (key, value)|\n raise StandardError, \"#{key.to_s.capitalize} must be specified\" if value.blank? && !key.to_s.include?('test')\n\n hash[key] = AESCrypt.encrypt(value, password) if value.present?\n hash\n end\n\n self.credentials = encrypted_credentials\n self.save!\n end",
"def password=(password)\n validate_options(password: password)\n @password = password\n end",
"def set_credentials(credentials)\n @credentials = credentials\n end",
"def password=(value)\n @password = value\n end",
"def credentials=(value)\n super\n values = value.is_a?(Array) ? value : [value]\n self.unauthorized_record = values.first if values.first.class < ::ActiveRecord::Base\n end",
"def password(password)\n @options[:password] = password\n end",
"def credentials= (new_credentials)\n @credentials = new_credentials\n refresh_config_for_api_objects!\n @credentials\n end",
"def password_set(password)\n self.password.set password\n self.passwordconfirm.set password\n end",
"def password_methods=(value)\n @password_methods = value\n end",
"def credentials=(values)\n return if values.blank? || !values.is_a?(Hash)\n values.symbolize_keys!\n values.each do |field, value|\n next if value.blank?\n send(\"#{field}=\", value)\n end\n end",
"def setUserPassword(password)\n @fields['user_password'] = password\n self\n end",
"def setUserPassword(password)\n @fields['user_password'] = password\n self\n end",
"def setUserPassword(password)\n @fields['user_password'] = password\n self\n end",
"def set_password\n @password = Password.last\n @new_password = Password.new\n end",
"def password(&blk)\n @authentication_methods ||= {}\n @authentication_methods[:password] = blk\n self\n end",
"def password=(value)\n conf['api']['password'] = value\n end",
"def password(value)\n @config[:password] = value\n end",
"def password=(password)\n @connection = nil\n @password = password\n end",
"def password=(value)\n if value.to_s.blank?\n @password = nil\n @password_updated = false\n else\n @password = value\n @password_updated = true\n end\n end",
"def configure(credentials)\n credentials.each { |key, val| self.send(\"#{key}=\", val) }\n self\n end",
"def password=(new_password)\n @password = new_password\n end",
"def setup_password_credentials\n config_key = credential_config_key\n\n if config(\"#{config_key}.user\") && config(\"#{config_key}.password\")\n $stderr.puts \"Password credentials already configured for API Provider #{api_url}\"\n unless yes?('Would you like to reconfigure the password for this provider?')\n $stderr.puts 'Nothing to do.'\n exit 1\n end\n end\n\n username, password, response = _auth_loop_request(\"#{api_url}/user\") { |url|\n Net::HTTP::Head.new(url.path)\n }\n\n case response\n when Net::HTTPOK\n $stdout.puts \"Storing username/password credentials for API Provider #{api_url} with key #{config_key}\"\n store_config_credentials(username, :password => password)\n else\n $stderr.puts \"Failed to acquire credentials: #{response.code}: #{response.message}\"\n end\n nil\n end",
"def password=(password)\n check_password(password)\n set_password(password)\n # returns password\n end",
"def password=(password)\n write_local(:crypted_password, Shield::Password.encrypt(password))\n\n @password = password\n end",
"def password\n @password || raise(Communicator::MissingCredentials.new(\"No Password specified for HTTP AUTH. Please configure using Communicator.password='xyz'\"))\n end",
"def credentials=(target, scheme, username, password)\r\n\t\t\t`#{BITS::BITSADMIN} /setcredentials {#{@id}} #{target} #{scheme} #{username} #{password}`\r\n\t\tend",
"def password=(value)\n reset_agent\n @password = value\n end",
"def password=(value)\n reset_agent\n @password = value\n end",
"def password=(value)\n reset_agent\n @password = value\n end",
"def password=(new_password)\n @password = Password.create(new_password)\n self.encrypted_password = @password\n end",
"def password=(password)\n raise ArgumentError, \"The new password cannot be nil\" unless password\n raise ArgumentError, \"The new password cannot be empty\" if password.empty?\n\n self.service.editObject({ \"password\" => password.to_s })\n self.refresh_details()\n end",
"def password=(password)\n raise ArgumentError, \"The new password cannot be nil\" unless password\n raise ArgumentError, \"The new password cannot be empty\" if password.empty?\n\n self.service.editObject({ \"password\" => password.to_s })\n self.refresh_details()\n end",
"def password=(password)\n unless @raw_data.nil? then\n @file_data = nil\n end\n @password = password\n end",
"def password=(new_password)\n self.encrypted_password = new_password\n @password = new_password\n end",
"def add_password(password)\n if password.is_a?(Array)\n password.each do |p|\n self.add_password(p)\n end\n return @passwords\n end\n if password.is_a?(String)\n @passwords.push(password)\n return @passwords\n end\n raise RuntimeError, \"Invalid password: #{password}\"\n end",
"def password\n open(@credentials_file, 'r').readlines.last.strip if valid_file?(@credentials_file)\n end",
"def key_credentials=(value)\n @key_credentials = value\n end",
"def update_credential_password(username, password)\n raise ArgumentError, \"The new password cannot be nil\" unless password\n raise ArgumentError, \"The new username cannot be nil\" unless username\n raise ArgumentError, \"The new password cannot be empty\" if password.empty?\n raise ArgumentError, \"The new username cannot be empty\" if username.empty?\n\n self.service.editCredential(username.to_s, password.to_s)\n\n @credentials = nil\n end",
"def password_credential\n user.credentials.find { |c| c.is_a? Credentials::Password }\n end",
"def password=(pwd) # define password = pwd(arg)?\n # set password_digest column to encrypted version of user's pwd.\n self.password_digest = BCrypt::Password.create(pwd)\n end",
"def password=(password)\r\n encryption = PasswordEncryptor.encrypt(password)\r\n\r\n self.password_salt = encryption[:salt]\r\n self.password_hash = encryption[:hash]\r\n\r\n @password = password\r\n end",
"def password=(password)\n salt, hash = PasswordEncryptor.encrypt(password)\n self.password_salt = salt\n self.password_hash = hash\n @password = password\n end",
"def password=(password)\n self.password_digest = BCrypt::Password.create(password)\n @password = password\n end",
"def password=(password)\n self.password_digest = BCrypt::Password.create(password)\n @password = password\n end",
"def password=(s)\n if s\n replace_element_text('password', s)\n else\n delete_elements('password')\n end\n end",
"def password=(password)\n @password = password\n end",
"def setClientCertificatePassword(password)\n @fields['client_certificate_password'] = password\n self\n end",
"def setClientCertificatePassword(password)\n @fields['client_certificate_password'] = password\n self\n end",
"def password=(new_password)\n @password = Password.create(new_password)\n self.password_hash = @password\n end",
"def password=(new_password)\n @password = Password.create(new_password)\n self.password_hash = @password\n end",
"def set_password(v)\n @password = v\n # returns v\n end",
"def password=(password)\n\t\t@password = password\n\t\tself.password_digest = BCrypt::Password.create(password)\n\tend",
"def password=(password)\n\t\t@password = password\n\t\tself.password_digest = BCrypt::Password.create(password)\n\tend",
"def password=(password)\n\t\t@password = password\n\t\tself.password_digest = BCrypt::Password.create(password)\n\tend",
"def password=(password)\n\t\t@password = password\n\t\tself.password_digest = BCrypt::Password.create(password)\n\tend",
"def service_password( password )\n\t\t\tself.password_digest = Digest::SHA2.hexdigest( password )\n\t\t\tDRbService.log.debug \"Setting encrypted password for %p to \"\n\t\tend",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def set_password(id, password)\n salt = MPW.password(length: Random.rand(4..9))\n password = \"$#{salt}::#{password}\"\n\n @passwords[id] = encrypt(password)\n end",
"def password=(value)\n value.blank? ? nil : write_attribute(:password, crypt.encrypt(value))\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n @password = password\n self.password_digest = BCrypt::Password.create(password)\n end",
"def set_password(password)\n @password = Base64.encode64(password)\n end",
"def password=(new_pw)\n @password = Password.create(new_pw)\n self.password_hash = @password\n end",
"def credentials\n @lock.synchronize do\n @credentials\n end\n end",
"def password=(password)\n if !password.nil? && password.to_s.length > 255\n fail ArgumentError, 'invalid value for \"password\", the character length must be smaller than or equal to 255.'\n end\n\n if !password.nil? && password.to_s.length < 0\n fail ArgumentError, 'invalid value for \"password\", the character length must be great than or equal to 0.'\n end\n\n @password = password\n end",
"def password=(new_password)\n password = new_password.blank? ? nil : ::BCrypt::Password.create(new_password)\n self.encrypted_password = password\n end",
"def credentials\n []\n end",
"def credentials\n []\n end",
"def password=(new_password)\n @password = new_password if validate_password(new_password)\n end",
"def password=(new_password)\n @password = new_password if validate_password(new_password)\n end",
"def setHttpAuthPassword(password)\n @fields['http_auth_password'] = password\n self\n end",
"def setHttpAuthPassword(password)\n @fields['http_auth_password'] = password\n self\n end",
"def password= new_password\n @password = new_password\n end",
"def password=(password)\n self.password_digest = BCrypt::Password.create(password)\n @password = password \n end",
"def change_password!(password)\n json = JSON.generate(:changePassword => { :adminPass => password })\n @compute.connection.req('POST', \"/servers/#{@id}/action\", :data => json)\n @adminPass = password\n end",
"def pass=(new_password)\n self.password = Password.create(new_password)\n end",
"def set_bind_password(opts)\n opts = check_params(opts,[:bind_passwords])\n super(opts)\n end",
"def password=(password)\n\t\tself.password_digest = BCrypt::Password.create(password)\n\tend",
"def crowd_app_password(password=nil)\r\n rw_config(:crowd_app_password, password, nil)\r\n end",
"def password=(pwd)\n self.password_digest = BCrypt::Password.create(pwd)\n end",
"def password=(new_password)\n if validate_password(new_password)\n @password = new_password\n end\n end",
"def password=(password)\n self.password_digest = BCrypt::Password.create(password)\n end",
"def password=(password)\n self.password_digest = BCrypt::Password.create(password)\n end",
"def set_password\n @password = Password.find(params[:id])\n end"
] | [
"0.63876194",
"0.6378463",
"0.61338764",
"0.6058141",
"0.6042147",
"0.6025427",
"0.5961973",
"0.59074754",
"0.5899096",
"0.5874709",
"0.58639336",
"0.5816453",
"0.5768799",
"0.5766279",
"0.5731916",
"0.57288784",
"0.57288784",
"0.57288784",
"0.5663424",
"0.56625056",
"0.5575824",
"0.5575504",
"0.5574024",
"0.55293626",
"0.54820585",
"0.5479287",
"0.54744595",
"0.5465717",
"0.5455969",
"0.5451561",
"0.54273725",
"0.5402487",
"0.5402487",
"0.5402487",
"0.5388431",
"0.53861016",
"0.53861016",
"0.5385888",
"0.53822005",
"0.53741866",
"0.53720844",
"0.5365321",
"0.536331",
"0.53225714",
"0.5322038",
"0.53174126",
"0.531042",
"0.5301367",
"0.5301367",
"0.5291163",
"0.5289833",
"0.5283159",
"0.5283159",
"0.5266826",
"0.5266826",
"0.5266121",
"0.526103",
"0.526103",
"0.526103",
"0.526103",
"0.525382",
"0.5250804",
"0.5250804",
"0.52498937",
"0.5245932",
"0.52347916",
"0.52347916",
"0.52347916",
"0.52347916",
"0.52347916",
"0.52347916",
"0.52347916",
"0.52347916",
"0.52347916",
"0.52347916",
"0.52347916",
"0.52347916",
"0.5224906",
"0.5199115",
"0.51962596",
"0.5195924",
"0.5195589",
"0.5194135",
"0.5194135",
"0.51932335",
"0.51932335",
"0.51915663",
"0.51915663",
"0.5188433",
"0.5187447",
"0.51869917",
"0.5184681",
"0.51842767",
"0.518169",
"0.5177258",
"0.5175843",
"0.5173895",
"0.51680845",
"0.51680845",
"0.5163671"
] | 0.7700806 | 0 |
Gets the publicClient property value. Specifies settings for installed clients such as desktop or mobile devices. | def public_client
return @public_client
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def public_client=(value)\n @public_client = value\n end",
"def is_fallback_public_client=(value)\n @is_fallback_public_client = value\n end",
"def client_public_key\n return ENV[\"MCOLLECTIVE_SSL_PUBLIC\"] if ENV.include?(\"MCOLLECTIVE_SSL_PUBLIC\")\n\n raise(\"No plugin.ssl_client_public configuration option specified\") unless @config.pluginconf.include?(\"ssl_client_public\")\n\n return @config.pluginconf[\"ssl_client_public\"]\n end",
"def current_client_settings\n client.symbolize_keys.reverse_merge(CLIENT.dup)\n end",
"def get_client\n @client\n end",
"def getclient\n return @client\n end",
"def get_client_id\n @client_id\n end",
"def client\n @config.send(\"#{config_prefix}_client\")\n end",
"def is_fallback_public_client\n return @is_fallback_public_client\n end",
"def client_version\n ClientVersion\n end",
"def get_client_settings\n cp = ClientPlan.get_client_plan_from_memcache(@client_id)\n pepo_campaign = ClientPepoCampaignDetail.get_from_memcache(@client_id)\n web_host = ClientWebHostDetail.get_from_memcache_by_client_id(@client_id)\n token_sale_detail = ClientTokenSaleDetail.get_from_memcache(@client_id)\n kyc_config_detail = @client.client_kyc_config_detail\n super_admins = Admin.where(default_client_id: @client_id, role: GlobalConstant::Admin.super_admin_role).not_deleted.all\n\n super_admins_data = super_admins.map {|x|\n {\n email: x.email,\n password: SecureRandom.hex,\n name: x.name\n }\n }\n\n @client_setting = {\n client_plan: {\n add_ons: cp.add_ons_array,\n kyc_submissions_count: cp.kyc_submissions_count\n },\n super_admins: super_admins_data,\n double_opt_in: @client.is_verify_page_active_for_client?,\n client_name: @client.name,\n pepo_campaign: {\n api_key: pepo_campaign.api_key,\n api_secret: decrypted_value(pepo_campaign.api_secret)\n },\n token_sale_details: {\n token_name: token_sale_detail.token_name,\n token_symbol: token_sale_detail.token_symbol,\n sale_start_timestamp: token_sale_detail.sale_start_timestamp,\n registration_end_timestamp: token_sale_detail.registration_end_timestamp,\n sale_end_timestamp: token_sale_detail.sale_end_timestamp,\n },\n kyc_config: {\n kyc_fields: kyc_config_detail.kyc_fields_array,\n residency_proof_nationalities: kyc_config_detail.residency_proof_nationalities,\n blacklisted_countries: kyc_config_detail.blacklisted_countries,\n auto_send_kyc_emails: kyc_config_detail.auto_send_kyc_emails_array\n }\n }\n\n if web_host.present?\n @client_setting[:web_host] = {\n domain: web_host.domain\n }\n\n r = SandboxManagement::CmsConfigurator::GetPublishedDraft.new(\n {decoded_token_data: {uuid: @uuid}}).perform\n return r unless r.success?\n\n @client_setting[:entity_type_and_data_hash] = r.data[:entity_type_and_data_hash]\n end\n\n success\n\n end",
"def set_clients_setting\n @clients = current_client\n end",
"def client_properties\n end",
"def client_id\n @client_id\n end",
"def client_id\n @client_id\n end",
"def client_configuration\n return @client_configuration\n end",
"def client_id\n return @client_id\n end",
"def client_configuration=(value)\n @client_configuration = value\n end",
"def client\n @client ||= self.class.client\n end",
"def get_client\n config.client.new(self)\n end",
"def client_info\n self.class.client_info\n end",
"def client_setting(name, default = nil, opts = {})\n setting(name, default, opts)\n client_settings << name.to_sym\n end",
"def default_client=(client)\n @default_client = get_client(client)\n end",
"def client\n @client\n end",
"def client\n @client\n end",
"def client_id\n me.client.id\n end",
"def client_id\n me.client.id\n end",
"def client\n @client ||= Client.current\n end",
"def client\n @client\n end",
"def client\n @client\n end",
"def client\n @client\n end",
"def client\n\t\treturn @client\n\tend",
"def connection_status_client_setting; end",
"def clientid\n @obj['clientid']\n end",
"def selected_config\n config[client_name]\n end",
"def client\n if !@client || @client.hash != options.hash\n @client = Croudia::Client.new\n end\n @client\n end",
"def client_version\n self.class.client_version\n end",
"def client_name\n me.client.name\n end",
"def client_id\n ENV['WICKET_CLIENT_ID']\n end",
"def client\n @client ||= Client.new\n end",
"def default_client_settings(settings = nil)\n if default_client.nil?\n raise ArgumentError, 'default_client must be set before setting default_client_settings'\n end\n\n default_client.settings.merge!(settings) if settings\n default_client.settings\n end",
"def client_mechanisms\n mechanisms :client\n end",
"def client\n @client ||= platform_klass::Client.new(@options)\n end",
"def client_id\n @client_id ||= Staccato.build_client_id\n end",
"def default_client_id\n \"1B47512E-9743-11E2-8092-7F654762BE04\"\n end",
"def client_webhook_settings\n @client_webhook_settings ||= ClientWebhookSetting.get_active_from_memcache(@client_id)\n end",
"def set_client\n if current_user.try(:admin?)\n @client = Client.friendly.find(params[:id])\n else\n @client = current_user.clients.first\n end\n end",
"def internal_client(client)\n @internal_client ||= client.with(\n auto_encryption_options: nil,\n min_pool_size: 0,\n monitoring: client.send(:monitoring),\n )\n end",
"def client_port\n host_settings['client_port']\nend",
"def client\n self.class.client\n end",
"def client\n self.class.client\n end",
"def client\n @parent.instance_variable_get(:@client)\n end",
"def client\n @@client\n end",
"def client\n query[\"client_id\"]\n end",
"def client_webhook_setting\n @client_webhook_setting ||= ClientWebhookSetting.is_active.where(id: @client_webhook_setting_id).first\n end",
"def client_name\n client.name\n end",
"def set_client_id_in_property_suite\n self.client_id = self.user.try(:client_id)\n end",
"def known_client?(client_public_key)\n encoded_key = z85_encode(client_public_key)\n if @known_clients.empty?\n store_known_client(encoded_key)\n true\n else\n @known_clients.include?(encoded_key)\n end\n end",
"def get_current_client\n get_current_hub&.current_client\n end",
"def client_guid\n client_id\n end",
"def client\n @client ||= Client.new(configuration)\n end",
"def set_client_property\n @client_property = ClientProperty.find(params[:id])\n end",
"def client\n self.class.client\n end",
"def client\n Hsquare.application(@application).admin_client\n end",
"def client=(client)\n @client = client\n end",
"def client=(client)\n @client = client\n end",
"def client_id=(value)\n @client_id = value\n end",
"def set_client\n @client = Client.find(current_user.client_id)\n end",
"def is_client?\n client ? true : false\n end",
"def client_name\n __evaluate__(storage_options[:client])\n end",
"def client_channel\n \"#{access_key}-client\"\n end",
"def client=(client)\n @client = client\n end",
"def client=(client)\n @client = client\n end",
"def client=(client)\n @client = client\n end",
"def client=(client)\n @client = client\n end",
"def get_clients\n @clients\n end",
"def get_clients\n @clients\n end",
"def client_name\n return @client_name\nend",
"def set_client\n @client = Client.find(current_user.client_id)\n end",
"def client=(client)\n client(client)\n end",
"def get_client_by_id client_id\n @clients[client_id]\n end",
"def is_client_manager_property\n 'is_client_manager'\n end",
"def client\n @client || Client.connection\n end",
"def server_public_key\n raise(\"No ssl_server_public configuration option specified\") unless @config.pluginconf.include?(\"ssl_server_public\")\n return @config.pluginconf[\"ssl_server_public\"]\n end",
"def show_current_client\n return \"\" unless logged_in? && current_client \n \"Client: #{current_client.client_name}\"\n end",
"def gateway_client\n @gateway_client ||= get_gateway_client({client_id: @client_id, gateway_type: gateway_type})\n end",
"def settings\n {\n name: @client.self.name,\n team: @client.team.name,\n domain: @client.team.domain\n }\n end",
"def public\n (cloud.nil? ? nil : cloud.public)\n end",
"def client\n @client ||= Utils::Box::Client.new\n end",
"def set_client(user_agent_string)\n user_agent = AgentOrange::UserAgent.new(user_agent_string)\n device = user_agent.device\n if device.is_mobile?\n self.client = device.platform\n self.version = device.platform.version\n else device.is_computer?\n self.client = device.engine.browser.name\n self.version = device.engine.browser.version\n end\n end",
"def admin_client\n @admin_client ||= Class.new(Hsquare::Client::Admin).tap do |klass|\n klass.base_uri(base_uri) if base_uri\n klass.admin_key = admin_key if admin_key\n end\n end",
"def public_mg_client\n @public_mg_client ||= Mailgun::Client.new ENV['PUBLIC_MAILGUN_API_KEY']\n end",
"def client\n @client ||= NPS::Client.new\n end",
"def client_state\n return @client_state\n end",
"def client_id\n ENV['KONTENA_CLIENT_ID'] || CLIENT_ID\n end",
"def client=(value)\n Thread.current[:riak_client] = value\n end",
"def client_name; end",
"def current_client\n @current_client ||= Replica.user_model.find(session[:user])\n @current_client\n end",
"def client_info\n \"5.0.0\"\n end",
"def web_client\n client.web_client\n end"
] | [
"0.7838182",
"0.6843642",
"0.6757797",
"0.6535707",
"0.6383084",
"0.63417524",
"0.6334549",
"0.6305104",
"0.6276977",
"0.6195283",
"0.6184884",
"0.61810046",
"0.6166321",
"0.61521626",
"0.61521626",
"0.6117435",
"0.61082697",
"0.6069252",
"0.6041265",
"0.6015501",
"0.6008772",
"0.5991577",
"0.59902275",
"0.5985199",
"0.5985199",
"0.59693134",
"0.59693134",
"0.5934048",
"0.5891652",
"0.5891652",
"0.5891652",
"0.5877933",
"0.5875166",
"0.5872938",
"0.586331",
"0.5852516",
"0.5843491",
"0.58415055",
"0.5836148",
"0.5830098",
"0.5826446",
"0.5802102",
"0.58000845",
"0.5785983",
"0.57858384",
"0.5778044",
"0.57747364",
"0.5773859",
"0.5770943",
"0.57342213",
"0.57342213",
"0.57066935",
"0.5703823",
"0.5701964",
"0.56816006",
"0.56722975",
"0.56502354",
"0.5642922",
"0.5629131",
"0.5625395",
"0.56227916",
"0.56218714",
"0.5610529",
"0.55891705",
"0.5588756",
"0.5588756",
"0.558508",
"0.55783087",
"0.5577484",
"0.5570779",
"0.5568525",
"0.55656254",
"0.55656254",
"0.55656254",
"0.55656254",
"0.5559217",
"0.5559217",
"0.55482036",
"0.5547467",
"0.55350816",
"0.55280447",
"0.552407",
"0.5513387",
"0.5507316",
"0.5486372",
"0.5484161",
"0.5465857",
"0.5463916",
"0.54450727",
"0.54353446",
"0.542911",
"0.54246885",
"0.5424453",
"0.54134625",
"0.54065245",
"0.54058576",
"0.54016113",
"0.5378978",
"0.5378044",
"0.53768384"
] | 0.7698064 | 1 |
Sets the publicClient property value. Specifies settings for installed clients such as desktop or mobile devices. | def public_client=(value)
@public_client = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_fallback_public_client=(value)\n @is_fallback_public_client = value\n end",
"def set_clients_setting\n @clients = current_client\n end",
"def client=(client)\n client(client)\n end",
"def set_client\n @client = Client.find(current_user.client_id)\n end",
"def public_client\n return @public_client\n end",
"def client=(client)\n @client = client\n end",
"def client=(client)\n @client = client\n end",
"def default_client=(client)\n @default_client = get_client(client)\n end",
"def client=(client)\n @client = client\n end",
"def client=(client)\n @client = client\n end",
"def client=(client)\n @client = client\n end",
"def client=(client)\n @client = client\n end",
"def set_client\n @client = Client.find(current_user.client_id)\n end",
"def client_configuration=(value)\n @client_configuration = value\n end",
"def set_client_id_in_property_suite\n self.client_id = self.user.try(:client_id)\n end",
"def set_client_property\n @client_property = ClientProperty.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:client_id]) if params[:client_id].present?\n end",
"def set_client\n @client = ::Client.find(params[:id])\n end",
"def set_client\n if current_user.try(:admin?)\n @client = Client.friendly.find(params[:id])\n else\n @client = current_user.clients.first\n end\n end",
"def set_client\n\t\t\t@client = Client.find(params[:id])\n\t\tend",
"def set_client\n @client = Client.find(params[:client_id])\n end",
"def set_client\n @client = current_user.clients.find(params[:client_id])\n end",
"def client=(value)\n Thread.current[:riak_client] = value\n end",
"def set_client_id\n\t\t\t@client = Client.find(session[:CLIENT_ID])\n\t\tend",
"def set_IsPublic(value)\n set_input(\"IsPublic\", value)\n end",
"def set_IsPublic(value)\n set_input(\"IsPublic\", value)\n end",
"def setAsAdmin\n self.clientType = CLIENT_TYPES[:administrator]\n end",
"def client_setting(name, default = nil, opts = {})\n setting(name, default, opts)\n client_settings << name.to_sym\n end",
"def set_client\n if current_user && current_user.is_event_admin?\n @client = Client.find(current_user.client_id)\n elsif current_user && current_user.is_crew?\n @client = Client.find(current_user.client_id)\n else\n redirect_to home_pages_home_path\n end\n end",
"def set_client\n\t @client = Client.find(params[:id])\n\t end",
"def set_client_pid(pid)\n @client.window_pid = pid\n end",
"def set_client\n @client = Client.find(params[:id])\n \n end",
"def internal_client(client)\n @internal_client ||= client.with(\n auto_encryption_options: nil,\n min_pool_size: 0,\n monitoring: client.send(:monitoring),\n )\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def client_id=(value)\n @client_id = value\n end",
"def initialize(client)\n @client = client\n\n @id = \"\"\n @project = nil\n @gateway = nil\n @enabled = false\n @public_keys = Hash.new\n \n end",
"def rest_client=(value)\n raise Amfetamine::ConfigurationInvalid, 'Invalid value for rest_client' if ![:get,:put,:delete,:post].all? { |m| value.respond_to?(m) }\n @rest_client = value\n end",
"def client_id= new_client_id\n @client_id = new_client_id\n end",
"def set_client\n @client = Client.find(params[:id])\n session[:client] = @client.id\n \n end",
"def set_client\n SoftLayer::Client.default_client = @softlayer_client = SoftLayer::Client.new(\n :username => current_user.ibm_id, # enter your username here\n :api_key => current_user.ibm_key, # enter your api key here\n :endpoint_URL => @API_PUBLIC_ENDPOINT\n )\n end",
"def set_WithPublicId(value)\n set_input(\"WithPublicId\", value)\n end",
"def set_client\n @client = Client.find_by(id: params[:id], user_id: current_user.co_ids)\n end",
"def client_public_key\n return ENV[\"MCOLLECTIVE_SSL_PUBLIC\"] if ENV.include?(\"MCOLLECTIVE_SSL_PUBLIC\")\n\n raise(\"No plugin.ssl_client_public configuration option specified\") unless @config.pluginconf.include?(\"ssl_client_public\")\n\n return @config.pluginconf[\"ssl_client_public\"]\n end",
"def setApiClient(client)\n\t\t\t@api_client = client\n\t\tend",
"def set_client\r\n @client = Client.find(params[:id])\r\n end",
"def set_client\n\t @client = Client.find(params[:id])\n\tend",
"def client_options=(value)\n @client_options = value\n @kms_client = nil\n end",
"def client_id=(client_id); end",
"def client_id=(client_id); end",
"def firewall_profile_public=(value)\n @firewall_profile_public = value\n end",
"def set_client\r\n @client = Client.find(params[:id])\r\n end",
"def set_client\n @client = Client.find(params[:id])\n end",
"def riak_client=(value)\n Thread.current[:riak_client] = value\n end",
"def set_client\n @client = Client.find(params[:id] || params[:client_id])\n end",
"def set_cleaning_client(client)\n @client = client\n end",
"def set_client(user_agent_string)\n user_agent = AgentOrange::UserAgent.new(user_agent_string)\n device = user_agent.device\n if device.is_mobile?\n self.client = device.platform\n self.version = device.platform.version\n else device.is_computer?\n self.client = device.engine.browser.name\n self.version = device.engine.browser.version\n end\n end",
"def set_client\n \t@client = Client.find(params[:id])\n end",
"def set_potential_client\n @potential_client = PotentialClient.find(params[:id])\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end",
"def set_ClientID(value)\n set_input(\"ClientID\", value)\n end"
] | [
"0.7295949",
"0.69142056",
"0.6553209",
"0.6495483",
"0.6487151",
"0.6382972",
"0.6382972",
"0.63554376",
"0.6341161",
"0.6341161",
"0.6341161",
"0.6341161",
"0.6339986",
"0.62884796",
"0.62324154",
"0.6158043",
"0.61209714",
"0.6072964",
"0.6006947",
"0.60025346",
"0.5999023",
"0.5975032",
"0.59689325",
"0.5927247",
"0.5922339",
"0.5922339",
"0.5913808",
"0.5909184",
"0.5901243",
"0.5875345",
"0.58706826",
"0.585996",
"0.5859823",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58427656",
"0.58162594",
"0.57820266",
"0.57819086",
"0.57727885",
"0.57390386",
"0.5738988",
"0.5737901",
"0.5737669",
"0.5724263",
"0.57097906",
"0.5703265",
"0.568957",
"0.5686246",
"0.5657047",
"0.5657047",
"0.5642629",
"0.5620632",
"0.56052935",
"0.55874145",
"0.55676806",
"0.5550693",
"0.5541856",
"0.55327433",
"0.55307955",
"0.5510457",
"0.5510457",
"0.5510229",
"0.5510229",
"0.5510229",
"0.5510229",
"0.5510229",
"0.5510229",
"0.5510229",
"0.5510229",
"0.5510229",
"0.5510229",
"0.5510229"
] | 0.85617185 | 0 |
Gets the publisherDomain property value. The verified publisher domain for the application. Readonly. For more information, see How to: Configure an application's publisher domain. Supports $filter (eq, ne, ge, le, startsWith). | def publisher_domain
return @publisher_domain
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def publisher_domain=(value)\n @publisher_domain = value\n end",
"def domain\n return @domain if defined? @domain\n\n @domain = begin\n PublicSuffix.parse(normalized_domain, default_rule: nil)\n rescue PublicSuffix::DomainInvalid, PublicSuffix::DomainNotAllowed\n nil\n end\n end",
"def getDomain\n @domain\n end",
"def get_domain\n @domain\n end",
"def domain\n return nil if @domain.empty?\n @domain\n end",
"def domain\n @domain\n end",
"def domain\n @domain\n end",
"def publisher\n return @publisher\n end",
"def publisher\n return @publisher\n end",
"def publisher\n return @publisher\n end",
"def publisher\n return @publisher\n end",
"def domain\n @options['domain']\n end",
"def publisher_name\n return @publisher_name\n end",
"def domain\n @attributes[:domain]\n end",
"def domain\n @attributes[:domain]\n end",
"def domain\n @domain ||= PublicSuffix.parse(@fqdn).domain\n end",
"def verified_publisher\n return @verified_publisher\n end",
"def enterprise_domain\n return @enterprise_domain\n end",
"def domain_name\n return @domain_name\n end",
"def domain_name\n return @domain_name\n end",
"def public_domain\n lambda do |record, accumulator, _context|\n accumulator << 'Public Domain' if record[PUBLIC_DOMAIN]\n accumulator << 'Not Public Domain' unless record[PUBLIC_DOMAIN]\n end\n end",
"def domain\n @uri[:domain]\n end",
"def domain\n @domain ||= self.domain_id ? Domain.find_by_id(self.domain_id) : nil\n end",
"def domain\n @domain ||= self.domain_id ? Domain.find_by_id(self.domain_id) : nil\n end",
"def email_domain\n self.organization.email_domain\n end",
"def domain\n unless @domain\n if defined? ActiveSupport::CoreExtensions::String::Inflections\n @domain = name.tableize\n else\n @domain = name.downcase\n end\n end\n @domain\n end",
"def ldap_domain\n @attributes[:ldap_domain]\n end",
"def publisher=(value)\n @publisher = value\n end",
"def publisher=(value)\n @publisher = value\n end",
"def publisher=(value)\n @publisher = value\n end",
"def publisher=(value)\n @publisher = value\n end",
"def domain\n try_opt(:domain)\n end",
"def app_publisher\n return @app_publisher\n end",
"def app_publisher\n return @app_publisher\n end",
"def publisher_id\n @@publisher_id\n end",
"def domain\n settings.service.domain \n end",
"def verified_publisher=(value)\n @verified_publisher = value\n end",
"def domain\n Domain.new((address.split('@')[1] || '').strip)\n end",
"def bitly_pro_domain(domain)\n response = get(:bitly_pro_domain, :domain => domain)\n return response['bitly_pro_domain']\n end",
"def email_domain\n if !self[:email].blank?\n split_host = URI.parse(\"#{self[:email]}\").path.split('@')\n \"#{split_host.last}\" if 2 == split_host.size\n else\n self.organization.site_domain if self.organization\n end\n rescue URI::InvalidURIError\n nil\n end",
"def domain\n Domain.find_by_id(domain_id)\n end",
"def bitly_pro_domain(domain)\n response = get('/bitly_pro_domain', :query => { :domain => domain })\n return response['data']['bitly_pro_domain']\n end",
"def domains\n @domains\n end",
"def domain=(v)\n @domain = v.to_s\n if USE_STRINGPREP\n @domain = IDN::Stringprep.nodeprep(@domain)\n end\n end",
"def enterprise_domain=(value)\n @enterprise_domain = value\n end",
"def domain_info\n @domain = normalized_email.split('@').last\n domain\n end",
"def pubsub(domain)\n host = @vhosts.values.find {|host| host.pubsub?(domain) }\n host.pubsubs[domain.to_s] if host\n end",
"def domain_value\n field.domain_value(html_value)\n end",
"def publisher_name\n if self.publishers.length > 0\n self.publishers.map{|p| p.name}.join(\" / \")\n end\n end",
"def normalized_domain\n if @text.empty?\n nil\n elsif parsed_domain\n parsed_domain.host\n end\n end",
"def domain_type\n config[:domain_type]\n end",
"def recipient_domain\n self.rcpt_to ? self.rcpt_to.split('@').last : nil\n end",
"def recipient_domain\n self.rcpt_to ? self.rcpt_to.split('@').last : nil\n end",
"def publisher_name=(value)\n @publisher_name = value\n end",
"def domain\n components = rdns.map {|rdn| rdn[:dc]}.compact\n components.join('.') unless components.empty?\n end",
"def return_email_domain \n return \"@\" + self.email.split('@')[1]\n end",
"def domain(arg=nil)\n set_or_return(\n :domain,\n arg,\n :kind_of => String,\n :required => true\n )\n end",
"def email_domain\n user.email_domain\n end",
"def domain_owner(domain)\n params = {\n \"domain\" => domain\n }\n\n response = request(:post, \"/CMD_API_DOMAIN_OWNERS\", params)\n\n if response.has_key?(domain)\n response[domain]\n end\n end",
"def domains\n raw_data['domains']\n end",
"def normalize_domain(domain)\n return domain.downcase.gsub(/\\.$/,'')\n end",
"def host_or_domain\n return @host_or_domain\n end",
"def app_publisher=(value)\n @app_publisher = value\n end",
"def app_publisher=(value)\n @app_publisher = value\n end",
"def publisher=(publisher_name)\n record.publisher = Publisher.find_by_name(publisher_name)\n @publisher = record.publisher || publisher_name\n end",
"def domains\n connection.list_domains[:domains]\n end",
"def publisher\n @publisher ||= Publisher.new(self)\n end",
"def domain\n\t\treturn @dmn\n\tend",
"def get_domain()\n\t\tdomain = \"\"\n\t\tbegin\n\t\t\tsubkey = \"HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Group Policy\\\\History\"\n\t\t\tv_name = \"DCName\"\n\t\t\tdomain_dc = registry_getvaldata(subkey, v_name)\n\t\t\tdom_info = domain_dc.split('.')\n\t\t\tdomain = dom_info[1].upcase\n\t\trescue\n\t\t\tprint_error(\"This host is not part of a domain.\")\n\t\tend\n\t\treturn domain\n\tend",
"def get_domain()\n\t\tdomain = \"\"\n\t\tbegin\n\t\t\tsubkey = \"HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Group Policy\\\\History\"\n\t\t\tv_name = \"DCName\"\n\t\t\tdomain_dc = registry_getvaldata(subkey, v_name)\n\t\t\tdom_info = domain_dc.split('.')\n\t\t\tdomain = dom_info[1].upcase\n\t\trescue\n\t\t\tprint_error(\"This host is not part of a domain.\")\n\t\tend\n\t\treturn domain\n\tend",
"def domain_name\n @domain_name ||= default_name\n end",
"def domain\n Entity.new(connection, jid.domain)\n end",
"def domains\n get()[\"app\"][\"domains\"]\n end",
"def publisher_id=(pub_id)\n @@publisher_id = pub_id\n end",
"def publisher_name=(v)\n @publisher_name = v\n end",
"def domain=(str)\n @domain = str\n end",
"def domain(domain)\n get(\"/dns/domain/#{domain}\")\n end",
"def to_domain\n domain = @uri.domain\n domain ? Wgit::Url.new(domain) : nil\n end",
"def to_domain\n domain = @uri.domain\n domain ? Wgit::Url.new(domain) : nil\n end",
"def to_pubsub_domain?\n stream.config.pubsub?(validate_to)\n end",
"def domain \n @node[\"domain\"]\n end",
"def new_domain\n domain || tag('Domain') || local_domain_name\n end",
"def domain\n URI.parse(@config.split('<')[0].split('->')[0])\n end",
"def lexical_domain\n\t\treturn self.class.lexdomain_table[ self.lexdomainid ][ :lexdomainname ]\n\tend",
"def domain\n children[1]\n end",
"def domain\n children[1]\n end",
"def user_domain\n @user_domain ||= if (parts = new_resource.user.match(/(?<domain>.*)\\\\(?<account>.*)/))\n parts[:domain]\n end\n end",
"def default_domain_name\n return @default_domain_name\n end",
"def default_domain_name\n return @default_domain_name\n end",
"def split_email_domain\n return self.email.split('@')[1]\n end",
"def domain\n email.split(\"@\")[1]\n end",
"def domains\n collect { |a| a.domain }\n end",
"def get_domain\n domain = nil\n begin\n subkey = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\History'\n v_name = 'DCName'\n domain_dc = registry_getvaldata(subkey, v_name)\n rescue\n print_error 'Could not determine if the host is part of a domain.'\n return nil\n end\n if !domain_dc.nil?\n # lets parse the information\n dom_info = domain_dc.split('.').drop(1)\n domain = dom_info.join('.')\n else\n print_status 'Host is not part of a domain.'\n end\n domain\n end",
"def runasdomain?\n @resource[:runasdomain]\n end",
"def domain=(domain)\n @domain = if domain.nil? or domain == ''\n\t\t nil\n\t\telse\n raise ArgumentError unless domain.kind_of?(String)\n\t\t domain.strip\n\t\tend\n end",
"def domain_is_custom(book)\n if book.domain.nil? || book.domain.empty?\n # Domain is not custom.\n false\n else\n # Domain is custom.\n true\n end\n end",
"def domains\n @domains ||= ldap.search_domains.map { |base| ldap.domain(base) }\n end",
"def domains\n @domains ||= ldap.search_domains.map { |base| ldap.domain(base) }\n end",
"def publisher_url=(v)\n @publisher_url = v ? URI.parse(v) : nil\n end",
"def server_domain\n url = get_configuration 'server_domain', @work_type_config.dig('hydra_endpoint'), @config\n URI.parse(url.gsub(/\\/$/, ''))\n end"
] | [
"0.77706516",
"0.66552216",
"0.6425162",
"0.62295306",
"0.6194823",
"0.604487",
"0.604487",
"0.59891844",
"0.59891844",
"0.59891844",
"0.59891844",
"0.5984639",
"0.59587914",
"0.59452784",
"0.59452784",
"0.59019005",
"0.58875155",
"0.58871067",
"0.5860357",
"0.5860357",
"0.58359766",
"0.58076584",
"0.58041644",
"0.58041644",
"0.5730027",
"0.5701665",
"0.5698209",
"0.56709003",
"0.56709003",
"0.56709003",
"0.56709003",
"0.5648661",
"0.56144845",
"0.56144845",
"0.56069195",
"0.55818963",
"0.5570706",
"0.5545382",
"0.55212986",
"0.55205995",
"0.5512387",
"0.55115056",
"0.54517984",
"0.5396595",
"0.5391805",
"0.53307515",
"0.53259313",
"0.53253686",
"0.5315378",
"0.53067386",
"0.5305075",
"0.5296709",
"0.5296709",
"0.52826446",
"0.5282475",
"0.52805144",
"0.52785814",
"0.52733016",
"0.52618843",
"0.5259129",
"0.52446574",
"0.5211656",
"0.5203087",
"0.5203087",
"0.51934713",
"0.5180328",
"0.5155414",
"0.5141108",
"0.5140805",
"0.5140805",
"0.51368934",
"0.5130484",
"0.5129471",
"0.51178634",
"0.5115888",
"0.5101184",
"0.5098094",
"0.50975305",
"0.50975305",
"0.5080557",
"0.5019676",
"0.5018149",
"0.501466",
"0.5007168",
"0.5006568",
"0.5006568",
"0.5002356",
"0.50001466",
"0.50001466",
"0.49872437",
"0.4979916",
"0.49727577",
"0.49669716",
"0.49606422",
"0.49434528",
"0.49248558",
"0.48978168",
"0.48978168",
"0.4888427",
"0.4886326"
] | 0.805611 | 0 |
Sets the publisherDomain property value. The verified publisher domain for the application. Readonly. For more information, see How to: Configure an application's publisher domain. Supports $filter (eq, ne, ge, le, startsWith). | def publisher_domain=(value)
@publisher_domain = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def publisher_domain\n return @publisher_domain\n end",
"def publisher=(value)\n @publisher = value\n end",
"def publisher=(value)\n @publisher = value\n end",
"def publisher=(value)\n @publisher = value\n end",
"def publisher=(value)\n @publisher = value\n end",
"def set_domain(domain=@settings['default_domain'])\n @domain = domain\n end",
"def set_domain( domain )\n if StringOption.domain_ok?( domain )\n @domain = domain\n else\n @domain = nil\n raise \"invalid domain: #{ domain.to_s }\"\n end \n end",
"def publisher=(publisher_name)\n record.publisher = Publisher.find_by_name(publisher_name)\n @publisher = record.publisher || publisher_name\n end",
"def verified_publisher=(value)\n @verified_publisher = value\n end",
"def domain=(v)\n @domain = v.to_s\n if USE_STRINGPREP\n @domain = IDN::Stringprep.nodeprep(@domain)\n end\n end",
"def set_domain_name(domain)\n @domain = domain.to_s\n end",
"def domain=(str)\n @domain = str\n end",
"def set_domain(domain)\n @domain = domain\n\n reload if domain\n end",
"def set_domain(domain)\n @domain = domain\n\n reload if domain\n end",
"def publisher_id=(pub_id)\n @@publisher_id = pub_id\n end",
"def app_publisher=(value)\n @app_publisher = value\n end",
"def app_publisher=(value)\n @app_publisher = value\n end",
"def enterprise_domain=(value)\n @enterprise_domain = value\n end",
"def domain=(domain)\n @domain = if domain.nil? or domain == ''\n\t\t nil\n\t\telse\n raise ArgumentError unless domain.kind_of?(String)\n\t\t domain.strip\n\t\tend\n end",
"def publisher_name=(v)\n @publisher_name = v\n end",
"def book_publisher=(book_publisher)\n if !book_publisher.nil? && book_publisher.to_s.length > 50\n fail ArgumentError, 'invalid value for \"book_publisher\", the character length must be smaller than or equal to 50.'\n end\n\n @book_publisher = book_publisher\n end",
"def publisher=(new_publisher)\n if new_publisher.respond_to?(:name) &&\n new_publisher.respond_to?(:email) &&\n new_publisher.respond_to?(:url)\n # It's a complete Author object, just set it.\n @publisher = new_publisher\n else\n # We're not looking at an Author object, this is probably a string,\n # default to setting the publisher's name.\n if @publisher.nil?\n @publisher = FeedTools::Author.new\n end\n @publisher.name = new_publisher\n end\n end",
"def domain\n return @domain if defined? @domain\n\n @domain = begin\n PublicSuffix.parse(normalized_domain, default_rule: nil)\n rescue PublicSuffix::DomainInvalid, PublicSuffix::DomainNotAllowed\n nil\n end\n end",
"def set_publisher\n\t\t\t@publisher = Publisher.find(params[:id])\n\t\tend",
"def publisher_name=(value)\n @publisher_name = value\n end",
"def domain=(domain)\n if domain.nil?\n fail ArgumentError, 'domain cannot be nil'\n end\n\n if domain.to_s.length > 64\n fail ArgumentError, 'invalid value for \"domain\", the character length must be smaller than or equal to 64.'\n end\n\n @domain = domain\n end",
"def set_domain\n if check_fields_google_domain? # google domain\n @domain.push(:Google)\n elsif check_fields_nas_domain? # NAS domain\n @domain.push(:NAS)\n else \n @domain.push(:Cross)\n end\n notify \"DOMAIN : #{@domain}\"\n end",
"def set_publisher\n @publisher = Publisher.find(params[:id])\n end",
"def set_publisher\n @publisher = Publisher.find(params[:id])\n end",
"def publisher_url=(v)\n @publisher_url = v ? URI.parse(v) : nil\n end",
"def domain=( newdomain )\n\t\tif newdomain.nil?\n\t\t\t@domain = nil\n\t\telse\n\t\t\tnewdomain = newdomain.dup\n\t\t\tnewdomain.slice!( 0 ) while newdomain.start_with?( '.' )\n\t\t\t@domain = newdomain\n\t\tend\n\tend",
"def set_publisher\n @publisher = Publisher.cached_find(params[:publisher_id])\n end",
"def domain=(domain)\n if DomainName === domain\n @domain_name = domain\n else\n domain = check_string_type(domain) or\n raise TypeError, \"#{domain.class} is not a String\"\n if domain.start_with?('.')\n @for_domain = true\n domain = domain[1..-1]\n end\n # Do we really need to support this?\n if domain.match(/\\A([^:]+):[0-9]+\\z/)\n domain = $1\n end\n @domain_name = DomainName.new(domain)\n end\n @domain = @domain_name.hostname\n end",
"def set_domain\n @domain = Domain.find(params[:id])\n end",
"def set_domain\n @domain = Domain.find(params[:id])\n end",
"def host_or_domain=(value)\n @host_or_domain = value\n end",
"def set_ad_domain\n @ad_domain = AdDomain.find(params[:id])\n end",
"def domain_name=(d)\n @domain_name = d\n end",
"def enterprise_proxied_domains=(value)\n @enterprise_proxied_domains = value\n end",
"def domain=(domain)\n @proxy.actor << ['DOMAIN', @side, domain]\n @proxy.actor.wait\n end",
"def domain_name=(value)\n @domain_name = value\n end",
"def domain_name=(value)\n @domain_name = value\n end",
"def domain(arg=nil)\n set_or_return(\n :domain,\n arg,\n :kind_of => String,\n :required => true\n )\n end",
"def config_domain(domain, *_args)\n domain ||= ''\n domain.downcase!\n config[:domain].push(domain) unless domain.nil? || domain.empty?\n end",
"def public_domain\n lambda do |record, accumulator, _context|\n accumulator << 'Public Domain' if record[PUBLIC_DOMAIN]\n accumulator << 'Not Public Domain' unless record[PUBLIC_DOMAIN]\n end\n end",
"def set_publisher\n @publisher = Publisher.includes(:circulations).where(:id => params[:id], :admin_id => @current_user.id).first\n end",
"def set_publisher\n @publisher = Publisher.find(params[:id])\n end",
"def set_admin_domain_distributor\n @domain_distributor = DomainDistributor.find(params[:id])\n end",
"def set_domain\n if params[:domain]\n session[:domain] = params[:domain]\n end\n end",
"def domain\n @options['domain']\n end",
"def zap_domain=(domain)\n raise ArgumentError, 'domain too long' if domain.bytesize > 254\n\n Zsock.set_zap_domain(@zocket, domain)\n end",
"def update!(**args)\n @domain = args[:domain] if args.key?(:domain)\n end",
"def update!(**args)\n @domain = args[:domain] if args.key?(:domain)\n end",
"def normalize_domain(domain)\n return domain.downcase.gsub(/\\.$/,'')\n end",
"def client_applications_from_verified_publisher_only=(value)\n @client_applications_from_verified_publisher_only = value\n end",
"def enterprise_protected_domain_names=(value)\n @enterprise_protected_domain_names = value\n end",
"def publisher\n @publisher ||= Publisher.new(self)\n end",
"def initialize\n self.domain = Howitzer.mailgun_domain\n end",
"def initialize(domain); @domain = domain; end",
"def domain=(domain)\n\t\t# {{{\n\t\tunless domain.class == String || domain == nil\n\t\t\traise TypeError, \"The domain of a cookie must be a String or nil.\", caller\n\t\tend\n\t\t@domain = domain\n\t\t# }}}\n\tend",
"def getDomain\n @domain\n end",
"def set_domain\n\t\tfname= \"#{self.class.name}.#{__method__}\"\n\t\tLOG.debug(fname) {\">>>>\"}\n\t\tif params[:domain]\n\t\t\tsession[:domain] = params[:domain]\n\t\tend\n\t\tLOG.debug(fname) {\"<<<<session[:domain]=#{session[:domain]}\"}\n\tend",
"def add_domain(domain)\n put :add_domain!, {:domain => domain}\n end",
"def subdomain=(val)\n write_attribute(:subdomain, val.downcase.split(\" \").join)\n end",
"def set_subdomain\n @subdomain = current_domain\n end",
"def domain\n @domain\n end",
"def domain\n @domain\n end",
"def set_publisher\n @publisher = Publisher.friendly.find(params[:slug])\n end",
"def domain(d)\n Traits.domains.key?(d) and\n fail(ArgumentError, \"Domain binding redefinition: #{Traits.domains[d]}\")\n\n Traits.domains[d] = self\n end",
"def domain_ns_set(domain, ns_list)\n call('domain_ns_set', domain, ns_list)\n end",
"def domain\n @domain ||= PublicSuffix.parse(@fqdn).domain\n end",
"def domain\n return nil if @domain.empty?\n @domain\n end",
"def cleanse_domain(domain)\n domain.downcase!\n domain = domain.sub(/^https?\\:\\/\\//, '').sub(/^www./,'')\n domain = domain.split(\"/\").first\n domain = domain.split(\"@\").last\n\n domain = PublicSuffix.parse(domain)\n domain = \"#{domain.sld}.#{domain.tld}\"\n domain\n end",
"def new_domain\n domain || tag('Domain') || local_domain_name\n end",
"def enterprise_network_domain_names=(value)\n @enterprise_network_domain_names = value\n end",
"def default_domain_name=(value)\n @default_domain_name = value\n end",
"def default_domain_name=(value)\n @default_domain_name = value\n end",
"def publisher_id\n @@publisher_id\n end",
"def level_var_domain=(level_var_domain)\n\n if !level_var_domain.nil? && level_var_domain.to_s.length > 100\n fail ArgumentError, \"invalid value for 'level_var_domain', the character length must be smaller than or equal to 100.\"\n end\n\n @level_var_domain = level_var_domain\n end",
"def get_domain\n @domain\n end",
"def client_application_publisher_ids=(value)\n @client_application_publisher_ids = value\n end",
"def domain\n try_opt(:domain)\n end",
"def set_time_domain(time_domain:)\n {\n method: \"Performance.setTimeDomain\",\n params: { timeDomain: time_domain }.compact\n }\n end",
"def set_default_domain\n if GlobalPreference.get(:domain).blank?\n GlobalPreference.set!(:domain, request.host_with_port)\n end\n end",
"def domain\n unless @domain\n if defined? ActiveSupport::CoreExtensions::String::Inflections\n @domain = name.tableize\n else\n @domain = name.downcase\n end\n end\n @domain\n end",
"def set_domain\n unless @domain = Domain.friendly.find(params[:id])\n flash[:alert] = 'Domain not found.'\n redirect_to domains_url\n end\n end",
"def publisher_name\n return @publisher_name\n end",
"def ignore_domain_alias!\n @domain = @domain.sub(/^#{AliasDomains.join('|')}$/, AliasDomains.first)\n end",
"def sharing_allowed_domain_list=(value)\n @sharing_allowed_domain_list = value\n end",
"def publisher_params\n params.require(:publisher).permit(:email, :name, \n :domain, :password, :verified, \n :blog_name, :category_id, :logo,\n :free_demographics, :questions_active)\n end",
"def resolve_domain\n domain = prompt(\"example.com\", \"Add domain where app will run (will be used in nginx configuration)\\n\")\n @app_config.write(\"domain\", domain)\n end",
"def publisher\n return @publisher\n end",
"def publisher\n return @publisher\n end",
"def publisher\n return @publisher\n end",
"def publisher\n return @publisher\n end",
"def domain\n @domain ||= self.domain_id ? Domain.find_by_id(self.domain_id) : nil\n end",
"def domain\n @domain ||= self.domain_id ? Domain.find_by_id(self.domain_id) : nil\n end",
"def domain\n Domain.new((address.split('@')[1] || '').strip)\n end",
"def update(domain, options = {})\n fail(ParameterError, 'No domain given to add on Mailgun', caller) unless domain\n @client.put(\"domains/#{domain}\", options).to_h\n end",
"def set_publisher\n # something is causing the application to turn :delete /signout requests to :get requests\n # here's minor patch to fix it when that happens\n if params[:id] == \"sign_out\"\n flash[:error] = \"There was a connection error while signing out. Please try again.\"\n redirect_to root_path and return \n end\n @publisher = Publisher.find(params[:id])\n end"
] | [
"0.6821155",
"0.6486566",
"0.6486566",
"0.6486566",
"0.6486566",
"0.63376206",
"0.63104427",
"0.6292557",
"0.6188771",
"0.612234",
"0.6076492",
"0.6068785",
"0.60293996",
"0.60293996",
"0.6021942",
"0.5934014",
"0.5934014",
"0.5917424",
"0.5877267",
"0.5788985",
"0.5749994",
"0.5746661",
"0.57368284",
"0.5729321",
"0.57077754",
"0.5692018",
"0.567423",
"0.56716347",
"0.56716347",
"0.56589925",
"0.56288177",
"0.5615344",
"0.55905986",
"0.55119187",
"0.55119187",
"0.54770476",
"0.5453929",
"0.54259294",
"0.5385077",
"0.534984",
"0.5322898",
"0.5322898",
"0.5314711",
"0.52849233",
"0.52426505",
"0.5228581",
"0.5217504",
"0.52077466",
"0.5196354",
"0.5188428",
"0.51582974",
"0.51504534",
"0.51504534",
"0.5139293",
"0.51376957",
"0.50912154",
"0.5080161",
"0.50746953",
"0.50701565",
"0.5065396",
"0.50613976",
"0.50459296",
"0.5031429",
"0.49948415",
"0.49677348",
"0.49533343",
"0.49533343",
"0.49450567",
"0.49427718",
"0.49394357",
"0.4938288",
"0.49262786",
"0.49222672",
"0.49134567",
"0.4908932",
"0.48981416",
"0.48981416",
"0.4893319",
"0.4882686",
"0.48801094",
"0.48776102",
"0.48447412",
"0.4832143",
"0.48265734",
"0.48254833",
"0.48214176",
"0.4813417",
"0.47813627",
"0.47768044",
"0.47514296",
"0.4750952",
"0.47498885",
"0.47498885",
"0.47498885",
"0.47498885",
"0.4739396",
"0.4739396",
"0.47250915",
"0.4718684",
"0.47147626"
] | 0.8446686 | 0 |
Gets the requestSignatureVerification property value. Specifies whether this application requires Azure AD to verify the signed authentication requests. | def request_signature_verification
return @request_signature_verification
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def request_signature_verification=(value)\n @request_signature_verification = value\n end",
"def is_signed\n return @is_signed\n end",
"def signed?\n # Fail immediately if the request is not signed at all\n return false unless oauth_request? and authenticating_client\n # mash and compare with given signature\n self.signature == build_signature\n end",
"def has_signature?\n auth_info.include? \"signature\"\n end",
"def client_verified?\n @client = client_class.find_by_consumer_key(request.consumer_key)\n request.verify_signature(@client)\n end",
"def verified?\n response[\"verified\"]\n end",
"def signed?\n !signature.nil?\n end",
"def verified?\n (@verified_key ||= verify_api_key) != :false\n end",
"def valid_signature?\n Rack::Utils.secure_compare(signature, signature_for(body))\n end",
"def verify_signature\n @req.verify(public_key)\n end",
"def certificate_signing_request\n return @certificate_signing_request\n end",
"def verified?\n @verified\n end",
"def verified_request?\n !protect_against_forgery? ||\n request.method == :get ||\n !verifiable_request_format? ||\n form_authenticity_token == params[request_forgery_protection_token]\n end",
"def verify_signatures_with_http_info(request)\n raise ArgumentError, 'Incorrect request type' unless request.is_a? VerifySignaturesRequest\n\n @api_client.config.logger.debug 'Calling API: SignApi.verify_signatures ...' if @api_client.config.debugging\n # verify the required parameter 'verify_settings' is set\n raise ArgumentError, 'Missing the required parameter verify_settings when calling SignApi.verify_signatures' if @api_client.config.client_side_validation && request.verify_settings.nil?\n # resource path\n local_var_path = '/signature/verify'\n\n # query parameters\n query_params = {}\n\n # header parameters\n header_params = {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n # HTTP header 'Content-Type'\n header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(request.verify_settings)\n data, status_code, headers = @api_client.call_api(:POST, local_var_path,\n header_params: header_params,\n query_params: query_params,\n form_params: form_params,\n body: post_body,\n access_token: get_access_token,\n return_type: 'VerifyResult')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called:\n SignApi#verify_signatures\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n [data, status_code, headers]\n end",
"def verified_request?\n\t\t!protect_against_forgery? || request.get? ||\n\t\t\tform_authenticity_token == params[request_forgery_protection_token] || form_authenticity_token == request.headers['X-CSRF-Token'] ||\n\t\t\trequest.headers['X-XSRF-Token'] && form_authenticity_token == request.headers['X-XSRF-Token'].gsub!(/\\A\"|\"\\Z/, '')\n\tend",
"def validate_signed_request\n if request_parameter = request.params[\"signed_request\"]\n encoded_signature, encoded_data = request_parameter.split(\".\")\n decoded_signature = base64_url_decode(encoded_signature)\n digested = OpenSSL::HMAC.digest(\"sha256\", fb_app.secret, encoded_data)\n if valid = (digested == decoded_signature)\n Rails.logger.info \" Facebook Signed Request Valid.\"\n else\n Rails.logger.info \" Facebook Signed Request is not Valid. Ensure request is from Facebook and correct Facebook app has been selected.\"\n raise DoesFacebook::RequestSignatureInvalidError.new()\n end\n end\n end",
"def verified_request?\n !protect_against_forgery? ||\n request.method == :get ||\n request.xhr? ||\n !verifiable_request_format? ||\n form_authenticity_token == params[request_forgery_protection_token]\n end",
"def is_verified?\n verified\n end",
"def verify_signature\n begin\n signature = OAuth::Signature.build(request) do |token, consumer_key|\n self.current_application = find_application_by_key(consumer_key)\n self.current_token = find_token(token)\n\n token_secret = self.current_token ? self.current_token.secret : nil\n app_secret = self.current_application ? self.current_application.secret : nil\n \n self.oauth_logger.debug \"Signature build: application-secret: #{app_secret}; token-secret: #{token_secret}\"\n \n [token_secret, app_secret]\n end\n # Rescue requests made with unacceptable signature methods. \n # OAuth::Signature.available_methods holds a Hash of acceptable\n # signature methods. Provide a sane error message to the Consumer.\n rescue OAuth::Signature::UnknownSignatureMethod => e\n throw :halt, render(\"Unknown Signature Method: #{e.message}. Accepts: #{OAuth::Signature.available_methods.keys.join(', ')}\", :status => 401, :layout => false)\n end\n \n if signature.verify\n remember_request(signature)\n else\n self.oauth_logger.debug(\"Signature verify fail: Base: #{signature.signature_base_string}. Signature: #{signature.signature}\")\n \n throw :halt, render(\"Invalid OAuth Request. Signature could not be verified. Base: #{signature.signature_base_string}. Signature: #{signature.signature}\", :status => 401, :layout => false)\n end\n end",
"def verified?\n verification_code.nil?\n end",
"def verified_request?; end",
"def verified?\n (@verified_key ||= verify_api_key) != :false\n end",
"def verified?\n verification_token.blank? && verified_at.present?\n end",
"def verified_request?\n\t\tsuper || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n\tend",
"def is_validate_signature\n signature = request.headers[\"X-LINE-Signature\"]\n http_request_body = request.raw_post\n hash = OpenSSL::HMAC::digest(OpenSSL::Digest::SHA256.new, CHANNEL_SECRET, http_request_body)\n signature_answer = Base64.strict_encode64(hash)\n signature == signature_answer\n end",
"def is_validate_signature\n signature = request.headers[\"X-LINE-Signature\"]\n http_request_body = request.raw_post\n hash = OpenSSL::HMAC::digest(OpenSSL::Digest::SHA256.new, CHANNEL_SECRET, http_request_body)\n signature_answer = Base64.strict_encode64(hash)\n signature == signature_answer\n end",
"def has_valid_signature?\n Adyen::HPP::Signature.verify(params, shared_secret)\n end",
"def signature_is_valid?(env)\n return true if html_request?(env)\n\n # grab and compute the X-AUTH-SIG\n signature_sent = env[\"HTTP_X_AUTH_SIG\"]\n actual_signature = compute_signature(env)\n\n # are they the same?\n signature_sent.to_s == actual_signature.to_s\n end",
"def correct_signature?\n client = RestClient.where(:api_key => @api_key).first\n sign=client.nil? ? \"\" : client.secret + @request_uri.gsub(/\\?.*/,\"\")+@timestamp\n calculated_sign= (Digest::SHA256.new << sign).to_s\n Digest::SHA1.hexdigest(@signature)==Digest::SHA1.hexdigest(calculated_sign)\n end",
"def signed?\n @signed\n end",
"def signature_valid?\n hmac.validate_url_signature(request.url, secret)\n end",
"def signature_is_valid?\n validate_signature(doc, certificate, :normal)\n end",
"def verified_request?\n !protect_against_forgery? || request.get? ||\n form_authenticity_token == params[request_forgery_protection_token] ||\n form_authenticity_token == request.headers['X-XSRF-Token']\n end",
"def verified_request?\n !protect_against_forgery? || request.get? ||\n form_authenticity_token == params[request_forgery_protection_token] ||\n form_authenticity_token == request.headers['X-XSRF-Token']\n end",
"def verified_request?\n !protect_against_forgery? || request.get? ||\n form_authenticity_token == params[request_forgery_protection_token] ||\n form_authenticity_token == request.headers['X-XSRF-Token']\n end",
"def signature?\n SIGNATURES.include?(@simplified.downcase)\n end",
"def _verify\n unless (@_headers['x-allopass-response-signature'] || []).include?(@_signature)\n raise Allorails::ApiFalseResponseSignatureError\n end\n end",
"def signature\n @request.env['HTTP_X_HUB_SIGNATURE'.freeze].to_s\n end",
"def verify_signature\n return_code, response = send_command(\"verify_signature\", token)\n return_code == \"200\"\n end",
"def signature\n @signature ||= Current.request.headers['X-Slack-Signature']\n end",
"def verify_signed_request(request)\n\n begin\n authenticator = Mixlib::Authentication::SignatureVerification.new(request)\n username = authenticator.user_id\n user_key_file = \"#{EdmundsChefRailsProxy::Application.config.user_keys_dir}/#{username}.pem\"\n user_key = OpenSSL::PKey::RSA.new( ::File.read( user_key_file ) )\n authenticator.authenticate_request(user_key)\n\n rescue Mixlib::Authentication::MissingAuthenticationHeader => e\n logger.debug \" verify_signed_request: MissingAuthenticationHeader\"\n logger.debug \"Authentication failed: #{e.class.name}: #{e.message}\"\n #logger.debug \"#{e.backtrace.join(\"\\n\")}\"\n return false\n\n rescue StandardError => se\n logger.debug \" verify_signed_request: StandardError\"\n logger.debug \"Authentication failed: #{se}\"\n #logger.debug \"#{se.backtrace.join(\"\\n\")}\"\n return false\n\n end\n\n logger.debug \" verify_signed_request: OK\"\n return true\n\nend",
"def verified_request?\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n end",
"def verified_request?\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n end",
"def verified_request?\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n end",
"def verified_request?\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n end",
"def verify_signatures(request)\n data, _status_code, _headers = verify_signatures_with_http_info(request)\n data\n end",
"def is_approval_request\n return @is_approval_request\n end",
"def verified_request?\r\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\r\n end",
"def verified_request?\n\t\tsuper || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n\tend",
"def active_signature\n attributes.fetch(:activeSignature)\n end",
"def verified?\n\t\t\t@verified\n\t\tend",
"def signature_verification_state\n super\n end",
"def signatures_match?\n expected_signature == api_signature\n end",
"def has_verified_akismet_key?()\n return @verifiedKey\n end",
"def signatures?\n @signatures ? true : false\n end",
"def verify_request(request)\n verify_signature(\n # url without query string\n request.protocol + request.host_with_port + request.path,\n # raw parameters\n request.get? ? request.query_string : request.raw_post\n )\n end",
"def text_representation\n self.signed_request[:signature].to_s\n end",
"def text_representation\n self.signed_request[:signature].to_s\n end",
"def secure?\n self.generated_signature == self.signature\n end",
"def valid_signature?\n params['verifier'] == Digest::MD5.hexdigest([ params['id'], params['snuid'], params['currency'], Offerpal.secret_key ].join(':'))\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_request?\n super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])\n end",
"def verified_publisher\n return @verified_publisher\n end",
"def signature_is_valid?\n node = @ar.at_css('xmlns|SignedInfo',\n 'xmlns' => 'http://www.w3.org/2000/09/xmldsig#')\n\n node = node.canonicalize\n\n signature = @ar.at_css(\n 'xmlns|SignatureValue',\n 'xmlns' => 'http://www.w3.org/2000/09/xmldsig#'\n ).content\n\n signature = Base64.decode64(signature)\n\n certificate.public_key.verify(OpenSSL::Digest::SHA1.new, signature, node)\n end",
"def verify_request(verb, path, params, key, signature_param = nil)\n params ||= {}\n _path = path.dup\n _params = params.dup\n sign_request(verb, _path, _params, key, signature_param)\n return (path == _path and params == _params)\n end",
"def allowed_signature_methods\n SignableRequest::SIGNATURE_METHODS.keys\n end",
"def security_require_verify_apps\n return @security_require_verify_apps\n end",
"def security_require_verify_apps\n return @security_require_verify_apps\n end",
"def security_require_verify_apps\n return @security_require_verify_apps\n end",
"def signature_ok?\n generate_md5 == vps_signature\n end",
"def verify_signature(params = {})\n version = params[:version]\n webhook_secret = params[:webhook_secret]\n stringified_data = params[:stringified_data]\n request_timestamp = params[:request_timestamp]\n signature = params[:signature]\n\n signature_params = \"#{request_timestamp}.#{version}.#{stringified_data}\"\n digest = OpenSSL::Digest.new('sha256')\n signature_to_be_verified = OpenSSL::HMAC.hexdigest(digest, webhook_secret, signature_params)\n\n signature == signature_to_be_verified\n\n end",
"def verify_signature\n #puts \"sing in params: #{@params[\"sign\"]}\" unless @params[\"sign\"] == Alipay.generate_signature(@params, @key)\n #puts Alipay.generate_signature(@params, @key)\n @params[\"sign\"] == Alipay.generate_signature(@params, @key)\n end",
"def server_cert_verification_enabled?\n @enable_server_cert_verification\n end",
"def check_for_signature\n if signature_file_name_changed?\n sign if signature.present?\n end\n true\n end",
"def verify_authenticity_token\n verified_request? || raise(ActionController::InvalidAuthenticityToken)\n end",
"def verified\n object.is_verified?\n end",
"def verified?\n certificate = IdealGateway.certificate_for_fingerprint(fingerprint)\n return false unless certificate\n IdealGateway.ideal_certificate = certificate\n old_verified?\n end",
"def verified?\n true\n end",
"def verify_signatures?; end",
"def validrequest?(req)\n message = req[:body]\n signature = req[:hash]\n\n Log.debug(\"Validating request from #{req[:callerid]}\")\n\n if verify(public_key_file(req[:callerid]), signature, message.to_s)\n @stats.validated\n return true\n else\n @stats.unvalidated\n raise(SecurityValidationFailed, \"Received an invalid signature in message\")\n end\n end",
"def callsite_signature\n @attributes.callsite_signature\n end",
"def verified?\n (status == VERIFIED)\n end",
"def verified_handler\n @verified_handler\n end",
"def identity_verified?\n govuk_verify_fields.any?\n end",
"def verify_signature(data)\n Signature.valid?(data.merge('api_key' => api_key))\n end",
"def verification?\n configuration.secret.nil? == false\n end"
] | [
"0.72317904",
"0.633704",
"0.63020915",
"0.6228427",
"0.60170025",
"0.59874153",
"0.5975003",
"0.5904157",
"0.58997923",
"0.58445406",
"0.58042586",
"0.579837",
"0.5791491",
"0.57603616",
"0.5743311",
"0.5729621",
"0.57295996",
"0.5712599",
"0.5705116",
"0.5699106",
"0.5696055",
"0.56922907",
"0.56741995",
"0.56671333",
"0.5655615",
"0.5655615",
"0.5654244",
"0.5650262",
"0.56489164",
"0.5632305",
"0.56297886",
"0.56216896",
"0.5604393",
"0.5604393",
"0.5604393",
"0.5597785",
"0.55951685",
"0.5585113",
"0.55749404",
"0.55554533",
"0.55218995",
"0.5518658",
"0.5518658",
"0.5518658",
"0.5518658",
"0.551285",
"0.55058205",
"0.5496953",
"0.54955107",
"0.5490758",
"0.54858226",
"0.5478356",
"0.54733557",
"0.5455716",
"0.5451622",
"0.54394805",
"0.54161876",
"0.54161876",
"0.53994524",
"0.5398562",
"0.5384902",
"0.5384902",
"0.5384902",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.53506815",
"0.5348746",
"0.5338489",
"0.53302175",
"0.53242755",
"0.5313764",
"0.5313764",
"0.5313764",
"0.53063196",
"0.52565426",
"0.5255527",
"0.5253619",
"0.5248879",
"0.52365226",
"0.52246004",
"0.5223522",
"0.5212539",
"0.5204467",
"0.52024937",
"0.5201476",
"0.5186203",
"0.51813567",
"0.5160319",
"0.5146555",
"0.5127875"
] | 0.8100473 | 0 |
Sets the requestSignatureVerification property value. Specifies whether this application requires Azure AD to verify the signed authentication requests. | def request_signature_verification=(value)
@request_signature_verification = value
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def request_signature_verification\n return @request_signature_verification\n end",
"def set_verification\n if provider_class.require_verify?\n self.require_verify = true\n self.verified = false\n end\n end",
"def verify_signatures_with_http_info(request)\n raise ArgumentError, 'Incorrect request type' unless request.is_a? VerifySignaturesRequest\n\n @api_client.config.logger.debug 'Calling API: SignApi.verify_signatures ...' if @api_client.config.debugging\n # verify the required parameter 'verify_settings' is set\n raise ArgumentError, 'Missing the required parameter verify_settings when calling SignApi.verify_signatures' if @api_client.config.client_side_validation && request.verify_settings.nil?\n # resource path\n local_var_path = '/signature/verify'\n\n # query parameters\n query_params = {}\n\n # header parameters\n header_params = {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n # HTTP header 'Content-Type'\n header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(request.verify_settings)\n data, status_code, headers = @api_client.call_api(:POST, local_var_path,\n header_params: header_params,\n query_params: query_params,\n form_params: form_params,\n body: post_body,\n access_token: get_access_token,\n return_type: 'VerifyResult')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called:\n SignApi#verify_signatures\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n [data, status_code, headers]\n end",
"def enable_ssl_verification=(_value)\n self.properties = properties.except('enable_ssl_verification') # Remove unused key\n end",
"def certificate_signing_request=(value)\n @certificate_signing_request = value\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def set_Signature(value)\n set_input(\"Signature\", value)\n end",
"def signature_verification_state\n super\n end",
"def security_require_verify_apps=(value)\n @security_require_verify_apps = value\n end",
"def security_require_verify_apps=(value)\n @security_require_verify_apps = value\n end",
"def security_require_verify_apps=(value)\n @security_require_verify_apps = value\n end",
"def verify_signature\n @req.verify(public_key)\n end",
"def signed?\n # Fail immediately if the request is not signed at all\n return false unless oauth_request? and authenticating_client\n # mash and compare with given signature\n self.signature == build_signature\n end",
"def verify_signatures(request)\n data, _status_code, _headers = verify_signatures_with_http_info(request)\n data\n end",
"def is_signed=(value)\n @is_signed = value\n end",
"def _verify\n unless (@_headers['x-allopass-response-signature'] || []).include?(@_signature)\n raise Allorails::ApiFalseResponseSignatureError\n end\n end",
"def has_signature?\n auth_info.include? \"signature\"\n end",
"def verify_signed_request(request)\n\n begin\n authenticator = Mixlib::Authentication::SignatureVerification.new(request)\n username = authenticator.user_id\n user_key_file = \"#{EdmundsChefRailsProxy::Application.config.user_keys_dir}/#{username}.pem\"\n user_key = OpenSSL::PKey::RSA.new( ::File.read( user_key_file ) )\n authenticator.authenticate_request(user_key)\n\n rescue Mixlib::Authentication::MissingAuthenticationHeader => e\n logger.debug \" verify_signed_request: MissingAuthenticationHeader\"\n logger.debug \"Authentication failed: #{e.class.name}: #{e.message}\"\n #logger.debug \"#{e.backtrace.join(\"\\n\")}\"\n return false\n\n rescue StandardError => se\n logger.debug \" verify_signed_request: StandardError\"\n logger.debug \"Authentication failed: #{se}\"\n #logger.debug \"#{se.backtrace.join(\"\\n\")}\"\n return false\n\n end\n\n logger.debug \" verify_signed_request: OK\"\n return true\n\nend",
"def enable_ssl_verification\n true\n end",
"def verify_signature\n begin\n signature = OAuth::Signature.build(request) do |token, consumer_key|\n self.current_application = find_application_by_key(consumer_key)\n self.current_token = find_token(token)\n\n token_secret = self.current_token ? self.current_token.secret : nil\n app_secret = self.current_application ? self.current_application.secret : nil\n \n self.oauth_logger.debug \"Signature build: application-secret: #{app_secret}; token-secret: #{token_secret}\"\n \n [token_secret, app_secret]\n end\n # Rescue requests made with unacceptable signature methods. \n # OAuth::Signature.available_methods holds a Hash of acceptable\n # signature methods. Provide a sane error message to the Consumer.\n rescue OAuth::Signature::UnknownSignatureMethod => e\n throw :halt, render(\"Unknown Signature Method: #{e.message}. Accepts: #{OAuth::Signature.available_methods.keys.join(', ')}\", :status => 401, :layout => false)\n end\n \n if signature.verify\n remember_request(signature)\n else\n self.oauth_logger.debug(\"Signature verify fail: Base: #{signature.signature_base_string}. Signature: #{signature.signature}\")\n \n throw :halt, render(\"Invalid OAuth Request. Signature could not be verified. Base: #{signature.signature_base_string}. Signature: #{signature.signature}\", :status => 401, :layout => false)\n end\n end",
"def verify!\n verify\n rescue InvalidDigest, InvalidSignedValue => e\n raise InvalidSignature, e.message\n end",
"def verify!\n verify\n rescue InvalidDigest, InvalidSignedValue => e\n raise InvalidSignature, e.message\n end",
"def verify_signatures?; end",
"def verified_request?; end",
"def validate_signed_request\n if request_parameter = request.params[\"signed_request\"]\n encoded_signature, encoded_data = request_parameter.split(\".\")\n decoded_signature = base64_url_decode(encoded_signature)\n digested = OpenSSL::HMAC.digest(\"sha256\", fb_app.secret, encoded_data)\n if valid = (digested == decoded_signature)\n Rails.logger.info \" Facebook Signed Request Valid.\"\n else\n Rails.logger.info \" Facebook Signed Request is not Valid. Ensure request is from Facebook and correct Facebook app has been selected.\"\n raise DoesFacebook::RequestSignatureInvalidError.new()\n end\n end\n end",
"def signature=(v)\n @signature = v\n end",
"def client_verified?\n @client = client_class.find_by_consumer_key(request.consumer_key)\n request.verify_signature(@client)\n end",
"def verify_request(request)\n verify_signature(\n # url without query string\n request.protocol + request.host_with_port + request.path,\n # raw parameters\n request.get? ? request.query_string : request.raw_post\n )\n end",
"def api_signature_param(value = nil)\n rw_config(:api_signature_param, value, 'signature')\n end",
"def verified?\n (@verified_key ||= verify_api_key) != :false\n end",
"def is_approval_request=(value)\n @is_approval_request = value\n end",
"def verify_request(verb, path, params, key, signature_param = nil)\n params ||= {}\n _path = path.dup\n _params = params.dup\n sign_request(verb, _path, _params, key, signature_param)\n return (path == _path and params == _params)\n end",
"def verified_publisher=(value)\n @verified_publisher = value\n end",
"def correct_signature?\n client = RestClient.where(:api_key => @api_key).first\n sign=client.nil? ? \"\" : client.secret + @request_uri.gsub(/\\?.*/,\"\")+@timestamp\n calculated_sign= (Digest::SHA256.new << sign).to_s\n Digest::SHA1.hexdigest(@signature)==Digest::SHA1.hexdigest(calculated_sign)\n end",
"def signed_id_verifier=(verifier)\n @signed_id_verifier = verifier\n end",
"def set_verification_request\n @verification_request = VerificationRequest.find(params[:id])\n end",
"def verify_signature\n #puts \"sing in params: #{@params[\"sign\"]}\" unless @params[\"sign\"] == Alipay.generate_signature(@params, @key)\n #puts Alipay.generate_signature(@params, @key)\n @params[\"sign\"] == Alipay.generate_signature(@params, @key)\n end",
"def mark_signed!\n @signed = true\n end",
"def set_signature_verification_state(opts)\n opts = check_params(opts,[:states])\n super(opts)\n end",
"def set_verifier\n\t\tself.verified_on = Time.now\n\t\tself.verified_by_uid = current_user.try(:uid)||''\n\tend",
"def set_verifier\n\t\tself.verified_on = Time.now\n\t\tself.verified_by_uid = current_user.try(:uid)||''\n\tend",
"def allowed_signature_methods\n SignableRequest::SIGNATURE_METHODS.keys\n end",
"def signed?\n !signature.nil?\n end",
"def enable_email_verification?\n false\n end",
"def verify(*args, **options)\n verified(*args, **options) || raise(InvalidSignature)\n end",
"def set_ssl_verify(ssl_verify)\n if ssl_verify == false\n @ssl_verify = false\n else\n @ssl_verify = true\n end\n end",
"def verify_signature\n return_code, response = send_command(\"verify_signature\", token)\n return_code == \"200\"\n end",
"def verified_request?\n\t\tsuper || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n\tend",
"def check_for_signature\n if signature_file_name_changed?\n sign if signature.present?\n end\n true\n end",
"def valid_signature?\n Rack::Utils.secure_compare(signature, signature_for(body))\n end",
"def is_signed\n return @is_signed\n end",
"def verify_signature\n #puts \"sing in params: #{@params[\"sign\"]}\" unless @params[\"sign\"] == Alipay.generate_signature(@params, @key)\n #puts Alipay.generate_signature(@params, @key)\n @params[\"sign\"] == Tenpay.generate_signature(@params, @key) #.tap{|sig| puts \"Generated sig #{sig}\"}\n end",
"def verify\r\n self.verified = true\r\n end",
"def ssl_verify\n @ssl_verify || true\n end",
"def verified?\n (@verified_key ||= verify_api_key) != :false\n end",
"def verified?\n verification_code.nil?\n end",
"def signature_is_valid?\n validate_signature(doc, certificate, :normal)\n end",
"def signature?\n SIGNATURES.include?(@simplified.downcase)\n end",
"def marked_for_same_origin_verification?; end",
"def signatures_match?\n expected_signature == api_signature\n end",
"def handle_unverified_request\n true\n end",
"def handle_unverified_request\n true\n end",
"def is_validate_signature\n signature = request.headers[\"X-LINE-Signature\"]\n http_request_body = request.raw_post\n hash = OpenSSL::HMAC::digest(OpenSSL::Digest::SHA256.new, CHANNEL_SECRET, http_request_body)\n signature_answer = Base64.strict_encode64(hash)\n signature == signature_answer\n end",
"def is_validate_signature\n signature = request.headers[\"X-LINE-Signature\"]\n http_request_body = request.raw_post\n hash = OpenSSL::HMAC::digest(OpenSSL::Digest::SHA256.new, CHANNEL_SECRET, http_request_body)\n signature_answer = Base64.strict_encode64(hash)\n signature == signature_answer\n end",
"def signature_valid?; end",
"def setVerifySslCertificates(value)\n @fields['verify_ssl_certificates'] = value\n self\n end",
"def setVerifySslCertificates(value)\n @fields['verify_ssl_certificates'] = value\n self\n end",
"def set_signing_information(opts)\n opts = check_params(opts,[:signers])\n super(opts)\n end",
"def request_signer\n @_request_signer ||= RequestSigner.new(self.crypto)\n end",
"def update_signatures_with_http_info(request)\n raise ArgumentError, 'Incorrect request type' unless request.is_a? UpdateSignaturesRequest\n\n @api_client.config.logger.debug 'Calling API: SignApi.update_signatures ...' if @api_client.config.debugging\n # verify the required parameter 'update_settings' is set\n raise ArgumentError, 'Missing the required parameter update_settings when calling SignApi.update_signatures' if @api_client.config.client_side_validation && request.update_settings.nil?\n # resource path\n local_var_path = '/signature/update'\n\n # query parameters\n query_params = {}\n\n # header parameters\n header_params = {}\n # HTTP header 'Accept' (if needed)\n header_params['Accept'] = @api_client.select_header_accept(['application/json'])\n # HTTP header 'Content-Type'\n header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])\n\n # form parameters\n form_params = {}\n\n # http body (model)\n post_body = @api_client.object_to_http_body(request.update_settings)\n data, status_code, headers = @api_client.call_api(:POST, local_var_path,\n header_params: header_params,\n query_params: query_params,\n form_params: form_params,\n body: post_body,\n access_token: get_access_token,\n return_type: 'UpdateResult')\n if @api_client.config.debugging\n @api_client.config.logger.debug \"API called:\n SignApi#update_signatures\\nData: #{data.inspect}\\nStatus code: #{status_code}\\nHeaders: #{headers}\"\n end\n [data, status_code, headers]\n end",
"def is_verified?\n verified\n end",
"def verified_request?\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n end",
"def verified_request?\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n end",
"def verified_request?\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n end",
"def verified_request?\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\n end",
"def verify!(config, params)\n sent_signature = params.find { |key, _value| key.to_s.casecmp('BRQ_SIGNATURE').zero? }&.last\n generated_signature = Signature.generate(config, params)\n\n if sent_signature.nil? || generated_signature.nil? || !safe_equals?(sent_signature, generated_signature)\n raise SignatureException.new(sent_signature, generated_signature)\n end\n end",
"def valid_signature?\n params['verifier'] == Digest::MD5.hexdigest([ params['id'], params['snuid'], params['currency'], Offerpal.secret_key ].join(':'))\n end",
"def verified?\n @verified\n end",
"def verify_callback= verify_callback\n @agent.verify_callback = verify_callback\n end",
"def signature_valid?\n hmac.validate_url_signature(request.url, secret)\n end",
"def has_valid_signature?\n Adyen::HPP::Signature.verify(params, shared_secret)\n end",
"def verified_request?\r\n super || form_authenticity_token == request.headers['X-XSRF-TOKEN']\r\n end",
"def verified?\n verification_token.blank? && verified_at.present?\n end"
] | [
"0.6594554",
"0.61609375",
"0.59841347",
"0.57135916",
"0.55595595",
"0.55354446",
"0.55354446",
"0.55349576",
"0.55349576",
"0.55349576",
"0.55349576",
"0.55349576",
"0.55349576",
"0.54901147",
"0.54901147",
"0.54901147",
"0.54896307",
"0.54896307",
"0.54896307",
"0.54896307",
"0.54896307",
"0.54896307",
"0.54896307",
"0.54896307",
"0.5469302",
"0.5401993",
"0.5401993",
"0.5401993",
"0.53688216",
"0.5347409",
"0.5318489",
"0.5313204",
"0.53043294",
"0.5291133",
"0.5248611",
"0.5226864",
"0.52207625",
"0.5199029",
"0.5199029",
"0.5182058",
"0.5159976",
"0.5154087",
"0.5130704",
"0.5120692",
"0.51173913",
"0.5064716",
"0.50482315",
"0.5043941",
"0.50359505",
"0.50353754",
"0.50340754",
"0.5027971",
"0.50114596",
"0.50002164",
"0.49886551",
"0.49825674",
"0.49763963",
"0.49763963",
"0.49665433",
"0.495965",
"0.49363235",
"0.49311432",
"0.4922643",
"0.49184483",
"0.49123973",
"0.49094218",
"0.49082902",
"0.48861608",
"0.48811498",
"0.48796955",
"0.48691913",
"0.48667434",
"0.48664957",
"0.48631087",
"0.4842699",
"0.48411185",
"0.48369443",
"0.48339105",
"0.48339105",
"0.48285747",
"0.48285747",
"0.48257157",
"0.48130447",
"0.48130447",
"0.4799999",
"0.47992927",
"0.47961214",
"0.47941244",
"0.47798568",
"0.47798568",
"0.47798568",
"0.47798568",
"0.47769237",
"0.477605",
"0.47646618",
"0.4762638",
"0.47574356",
"0.47564033",
"0.47556934",
"0.4747366"
] | 0.7772493 | 0 |
Gets the requiredResourceAccess property value. Specifies the resources that the application needs to access. This property also specifies the set of delegated permissions and application roles that it needs for each of those resources. This configuration of access to the required resources drives the consent experience. No more than 50 resource services (APIs) can be configured. Beginning midOctober 2021, the total number of required permissions must not exceed 400. For more information, see Limits on requested permissions per app. Not nullable. Supports $filter (eq, not, ge, le). | def required_resource_access
return @required_resource_access
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def required_resource_access=(value)\n @required_resource_access = value\n end",
"def resource_access\n return @resource_access\n end",
"def resource_access\n return @resource_access\n end",
"def permissions\n @resource_permissions\n end",
"def allowed_resource_actions\n return @allowed_resource_actions\n end",
"def resource_access=(value)\n @resource_access = value\n end",
"def resource_access=(value)\n @resource_access = value\n end",
"def required_permission\n #\n # return the permission record if we have the Permission model\n #\n @required_permission ||= defined?(Permission) ? wulin_permits_required_permission : OpenStruct.new(name: [controller_name, action_name].join(\"#\"))\n end",
"def allowed_resources\n %w( )\n end",
"def has_resource_permission()\n resource = resource().find(params[:id])\n unless (current_user.admin? or current_user == resource.user)\n render 'shared/403', :status => 403\n return false\n end\n return true\n end",
"def can_read?(resource)\n scope_name = resource.class.to_s.downcase.pluralize\n self.send(\"readable_#{scope_name}\").where(\"`permissions`.resource_type = ? AND `permissions`.resource_id = ?\", resource.class.to_s, resource.id).exists?\n end",
"def permission_resources\n %w{roles sites employees classrooms students gapps_org_units}\n end",
"def resource_scopes\n return @resource_scopes\n end",
"def resource_scopes\n return @resource_scopes\n end",
"def has_permissions?(resource_permissions)\n resource_permissions.any? do |res, perm|\n @resource_permissions[res].include? Definition::PERMISSIONS[perm]\n end\n end",
"def resource_role_scopes\n return @resource_role_scopes\n end",
"def can_edit?(required_role)\n \n perm = current_user.permissions.select { |p| p.role.name == required_role}[0]\n \n @readonly= perm.nil? ? false : perm.readOnly?\n \n end",
"def read_access_check\n resource_check('read')\n end",
"def read_access_check\n resource_check('read')\n end",
"def read_access_check\n resource_check('read')\n end",
"def restapi_permission\n @attributes[:restapi_permission]\n end",
"def check_api_access\n current_resource_owner&.can_use_api?\n end",
"def resource_requests\n return @resource_requests\n end",
"def can_access?(profile, options)\n \n can_access_resource = options.include?(attribute_get(:permission_modifier_all)) \n \n if profile and not can_access_resource\n superuser_access = profile.is_superuser?\n can_access_group = (options.include?(attribute_get(:permission_modifier_group)) and profile.usergroups.map{|item| item.group }.include?(attribute_get(:permission_group))) \n can_access_owner = (options.include?(attribute_get(:permission_modifier_owner)) and profile.username == attribute_get(:permission_owner))\n \n can_access_resource = (superuser_access or can_access_group or can_access_owner)\n end\n \n return can_access_resource\n \n end",
"def perms_required_for( request )\n\t\tself.log.debug \"Gathering required perms for: %s %s\" % [ request.verb, request.app_path ]\n\n\t\t# Return the empty set if any negative auth criteria match\n\t\treturn [] if self.negative_perms_criteria_match?( request )\n\n\t\t# If there aren't any positive criteria, default to requiring authorization with\n\t\t# the app's ID as the permission\n\t\tif self.class.positive_perms_criteria.empty?\n\t\t\treturn [ self.default_permission ]\n\t\tend\n\n\t\t# Apply positive auth criteria\n\t\treturn self.union_positive_perms_criteria( request )\n\tend",
"def can_admin?(resource)\n scope_name = resource.class.to_s.downcase.pluralize\n self.send(\"adminable_#{scope_name}\").where(\"`permissions`.resource_type = ? AND `permissions`.resource_id = ?\", resource.class.to_s, resource.id).exists?\n end",
"def authorized?(resource)\n return false unless self.active\n # return true if role_authorized?('superuser') \n #OPTIMIZE: DO WE WANT THIS? It causes you to have access to all departments in all controllers, no matter what your permissions are.\n \n # return permission_strings.include?(resource) #reduced performance\n return permission_strings_cached.include?(resource) #causes caching bug\n end",
"def permissions\n attribute_prop(5)\n end",
"def permission\n Ricer::Irc::Permission.by_permission(self.permissions, authenticated?)\n end",
"def accountant_allow_read(permission)\n return accountant_right(permission) > 0\n end",
"def authorization_required\n authorized? || authorization_denied\n end",
"def grant_permission\n @attributes[:grant_permission]\n end",
"def has_permission?(required_permission)\n return true if self.is_admin\n load_permissions unless self.loaded_permissions.present?\n\n if self.loaded_permissions.include?(required_permission.upcase)\n return true\n else\n return false\n end\n end",
"def allowed_resource_actions=(value)\n @allowed_resource_actions = value\n end",
"def permissions\n read_attribute(:permissions) || {}\n end",
"def authorize_resource\n EffectiveResources.authorize!(self, action_name.to_sym, resource)\n end",
"def able_to_any?(*required_permissions)\n perms = required_permissions.map(&:to_sym)\n permissions.any? do |p| \n perms.include?(p.name.to_sym) \n end\n end",
"def get_current_permissions()\n\t\t\tkparams = {}\n\t\t\tclient.queue_service_action_call('permission', 'getCurrentPermissions', kparams);\n\t\t\tif (client.is_multirequest)\n\t\t\t\treturn nil;\n\t\t\tend\n\t\t\treturn client.do_queue();\n\t\tend",
"def permissions\n objects_from_response(Code42::Permission, :get, 'permission')\n end",
"def permitted?(resource, privilege, options = {})\n resource = cast(resource, :resourceid)\n # NOTE: in previous versions there was 'kind' passed separately. Now it is part of id\n self[\"?check&resource_id=#{query_escape resource}&privilege=#{query_escape privilege}\"].get(options)\n true\n rescue RestClient::ResourceNotFound\n false\n end",
"def can_manage?(*resources)\n self.is_superuser? or (allowed_resources & resources) == resources\n end",
"def has_access?(required_roles)\n (self.roles.collect { |r| r.name } & required_roles).size > 0\n end",
"def resources_permitted? kind, identifiers, privilege\n options = {\n privilege: privilege,\n identifiers: identifiers\n }\n resp = RestClient::Resource.new(Conjur::Authz::API.host, credentials)[\"#{Conjur.account}/resources/#{kind}?check=true\"].post(options)\n if resp.code == 204\n [true, []]\n else\n [false, JSON.parse(resp.body)]\n end\n end",
"def has_permission?\n return true if administrator?\n \n # Load the Model based on the controller name\n klass = self.controller_name.classify.constantize\n \n # Load the possible parent requested\n @parents = (klass.has_parent?) ? get_parents_from_request_params(klass, params) : nil\n \n # Load the resource requested\n if params[:id]\n if [\"index\", \"destroy\", \"update\"].include?(params[:action]) && klass.respond_to?(:in_set)\n @resource = klass.in_set(params[:id])\n @resource = @resource.first if @resource.size == 1\n else\n @resource = klass.find(params[:id])\n end\n end\n \n # Let's let the Model decide what is acceptable\n # NOTE: It is still the concrete controller's job to filter inaccessible resources (accessed via the index)!\n # This presumably happens in the with_parent named scope\n \n authorized = case params[:action]\n when \"edit\", \"update\"\n if [email protected]_a?(Array)\n return @resource.updatable_by?(current_user, @parents) # this is 'returned' to authorized\n end\n \n verify_set_accessablility(@resource, :updatable_by?) do |unauthorized_ids|\n permission_denied(\n :status => :conflict,\n :message => \"#{unauthorized_ids.to_a.join(',')} is not available for update.\"\n ) if unauthorized_ids.size > 0\n end\n true # if it gets past verification, authorized is true\n \n when \"destroy\" \n if [email protected]_a?(Array)\n return @resource.deletable_by?(current_user, @parents)\n end\n \n verify_set_accessablility(@resource, :deletable_by?) do |unauthorized_ids|\n permission_denied(\n :status => :conflict,\n :message => \"#{unauthorized_ids.to_a.join(',')} is not available for deletion.\"\n ) if unauthorized_ids.size > 0\n end\n true # if it gets past verification, authorized is true\n \n when \"index\" then klass.indexable_by?(current_user, @parents)\n when \"new\", \"create\" then klass.creatable_by?(current_user, @parents)\n when \"show\" then @resource.readable_by?(current_user, @parents)\n else check_non_restful_route(current_user, klass, @resource, @parents)\n end\n \n permission_denied unless authorized\n \n #rescue NoMethodError => e\n # Misconfiguration: A RESTful_ACL specific method is missing.\n #raise_error(klass, e)\n #rescue\n # Failsafe: If any funny business is going on, log and redirect\n #routing_error\n #end\n end",
"def have_access?(resource)\n # Master User always have access to all\n return true if self.master?\n # cache the acl hash\n @have_access ||= {}\n # add some caching...\n @have_access[resource.to_s] ||= begin\n res = Resource.find_by_resource(resource)\n res.nil? || resource_ids.include?(res.id) || roles.any? { |r| r.resource_ids.include?(res.id) }\n end\n end",
"def authorize(required = nil, options)\n if options.key? :through\n name = options[:through].to_s.singularize.to_sym\n elsif options.key? :with\n name = options[:with].to_s.singularize.to_sym\n else\n raise ArgumentError, 'find_and_authorize must be called with either '\\\n ':through or :with option. The resource referenced by the value '\\\n 'of this option should be an instance of a class that includes '\\\n 'Roleable.'\n end\n\n record = instance_variable_get(\"@#{name}\")\n\n if record.nil? # must be devise scope\n record = send(\"current_#{name}\")\n send \"authenticate_#{name}!\"\n end\n\n role_attr = record.class.role_attribute_name\n actual = record.send(role_attr)\n\n required ||= options[role_attr]\n required = [required] unless Array === required\n\n # actual roles must have at least\n # one required role (array intersection)\n ((required & actual).size > 0).tap do |res|\n raise Denied.new(role_attr, required, actual) unless res\n end\n end",
"def has_permissions?(*required_permissions)\n return true if self.is_admin\n load_permissions unless self.loaded_permissions.present?\n\n required_permissions.each do |r|\n return false unless self.loaded_permissions.include?(r.upcase)\n end\n return true\n end",
"def has_resource_permission()\n resource = resource().find(params[:id])\n unless (current_user.admin? or current_user == resource)\n redirect_to(user_path(current_user), :alert => t(:permission_denied))\n end\n return true\n end",
"def read_permitted?\n return (acting_user.administrator? || true)\n end",
"def permitted? privilege, role: nil\n url_for(:resources_check, credentials, id, privilege, role)\n true\n rescue RestClient::Forbidden\n false\n rescue RestClient::ResourceNotFound\n false\n end",
"def additional_advanced_permissions_included resource,scope\n if resource.respond_to?(:policy) && resource.policy && (resource.policy.sharing_scope == scope) && resource.has_advanced_permissions?\n \"<span class='additional_permissions'>there are also additional Advanced Permissions defined below</span>\"\n end\n end",
"def access_to_resources?(record)\n @normalized_resources.include?(record.resource)\n end",
"def permissions\n @attributes[:permissions]\n end",
"def permissions\n @attributes[:permissions]\n end",
"def read_permitted?\n true\n end",
"def requires_client_authorization\n to_bool description['RequiresClientAuthorization']\n end",
"def permission_grants\n return @permission_grants\n end",
"def get_permissions_by_resource resource_uuid\n resource_uuid = resource_uuid.uuid if resource_uuid.is_a?(Resource)\n \n @permissions.find_all{|per|per.resource_uuid == resource_uuid}\n end",
"def assert_read_granted(resource, principal)\n @read_priv.assert_granted(resource, principal) unless @read_priv.nil?\n end",
"def restrict_access\n authenticate_or_request_with_http_token do |token, options|\n ApiKey.exists?(access_token: token)\n end\n end",
"def restrict_access\n authenticate_or_request_with_http_token do |token, options|\n ApiKey.exists?(access_token: token)\n end\n end",
"def can_review_plans?\n perms.include? Perm.review_plans\n end",
"def authorize (permission_name)\n self.allowances.detect {|a| a.permission.name == permission_name.to_s}\n end",
"def can?(key)\n resolved_permissions['permissions'].collect(&:key).include? key \n end",
"def required\n return @required\n end",
"def available?\n restrictions.all? {|restriction| restriction.permitted?}\n end",
"def restricted_attributes\n if model.respond_to?(:restricted_alchemy_resource_attributes)\n model.restricted_alchemy_resource_attributes\n else\n []\n end\n end",
"def permissions\n return @permissions\n end",
"def restrict_access\n authenticate_or_request_with_http_token do |token, options|\n ApiKey.exists?(access_token: token)\n end\n end",
"def reseller_allow_read(permission)\n return reseller_right(permission) > 0\n end",
"def has_permissions?(resource_permissions)\n fetch_permissions! resource_permissions.keys unless @fetched_all\n super\n end",
"def authorized?(resource)\n match=false\n permission_strings.each do |p|\n r = Regexp.new(p)\n match = match || ((r =~ resource) != nil)\n end\n return match\n end",
"def retrieve_policies( resource_name, access_token, realm_uuid, resource_server )\n if resource_name && access_token\n request_policies(\n resource_name,\n access_token,\n realm_uuid,\n resource_server\n )\n else\n nil\n end\n end",
"def can_access?\n allows_current_user_access_to? :access\n end",
"def billing_permission\n @attributes[:billing_permission]\n end",
"def lookup_required_resources\n \n # Marketplace admin user - required to administer users, and store\n # application-level properties\n unless session['marketplace_admin_user_name']\n marketeer_user = User.where(role: 'marketeer').first\n session['marketplace_admin_user_name'] = marketeer_user ? marketeer_user.name : nil\n end\n \n # Determine whether any required resources are missing.\n session['required_resources_present'] = !session['marketplace_admin_user_name'].nil?\n \n unless session['required_resources_present']\n \n # An action is being invoked before all the required resources have\n # been initialized. Redirect the user back to the landing page, unless\n # the user has initiated an \"/init_XYZ\" request to create a resource.\n # redirect_to root_url\n end\n end",
"def permits_read_acccess_for(user)\n end",
"def can?(auth, resource_type = :general)\n has_access_to? :access, resource_type, auth\n end",
"def resource_base\n @resource_base ||= model_of_controller.respond_to?(:authorized) ?\n model_of_controller.authorized(current_permission) :\n model_of_controller.scoped\n end",
"def permitted?(model_name, requested_flags = 0)\n return false if self.kind != Kind::ROLE\n return true if admin?\n\n p = self.model_permissions.find_by_model(model_name)\n if requested_flags == 0\n p\n else\n p && p.permitted?(requested_flags)\n end\n end",
"def resource_limits; end",
"def resource_limits; end",
"def check_resource?(resource_name, resource_type)\n check_resource(resource_name, resource_type)['status'] == 'Allowed'\n end",
"def access\n @user = User.find_by_user(params[:id])\n @datasetID, @fileID = params[:resource].split '/'\n\n is_restricted = AccessLevel.dataset_is_restricted(@datasetID)\n category = is_restricted ? :b : :a\n\n permissions = @user.permissions_for_dataset(category, @datasetID, @fileID)\n\n pv = permissions\n .reject { |e| e.permissionvalue == 0 }\n .inject(0) { |a, e| a == 0 ? e.permissionvalue : a * e.permissionvalue }\n\n # # General datasets have analyse and download permissions if browse access is granted\n # if !is_restricted\n # pv *= UserPermissionB::PERMISSION_VALUES[:analyse] * UserPermissionB::PERMISSION_VALUES[:download]\n # end\n\n # result = {:browse => pv > 0 && pv % UserPermissionB::PERMISSION_VALUES[:browse] == 0,\n # :analyse => pv > 0 && pv % UserPermissionB::PERMISSION_VALUES[:analyse] == 0,\n # :download => pv > 0 && pv % UserPermissionB::PERMISSION_VALUES[:download] == 0}\n\n if is_restricted\n result = {\n :browse => pv > 0 && pv % UserPermissionB::PERMISSION_VALUES[:browse] == 0,\n :analyse => pv > 0 && pv % UserPermissionB::PERMISSION_VALUES[:analyse] == 0,\n :download => pv > 0 && pv % UserPermissionB::PERMISSION_VALUES[:download] == 0 }\n else\n result = {\n :browse => true,\n :analyse => true,\n :download => pv > 0 }\n end\n\n render :json => result\n end",
"def read_capacity\n options[:read_capacity] || Dynamoid::Config.read_capacity\n end",
"def read_capacity\n options[:read_capacity] || Dynamoid::Config.read_capacity\n end",
"def permissions\n if @prm\n @prm\n else\n @maximum_prms\n end\n end",
"def minimum_role(action, resource_config, property=nil)\n if property.nil?\n p = resource_config[:permission]\n raise Error, \"undefined #{action.inspect} permission\" unless p\n p[action]\n else\n hash = resource_config[:properties][property]\n hash ? hash[to_r_or_w(action)] : :nobody\n end || :anonymous\n end",
"def can_use_api?\n perms.include? Perm.use_api\n end",
"def can_use_api?\n perms.include? Perm.use_api\n end",
"def global_privilege_permitted? privilege\n resource(GLOBAL_PRIVILEGE_RESOURCE).permitted? privilege\n end",
"def resource_roles\n return @resource_roles\n end",
"def access\n if self.read_users.present?\n \"limited\"\n elsif self.read_groups.empty?\n \"private\"\n elsif self.read_groups.include? \"public\"\n \"public\"\n elsif self.read_groups.include? \"registered\"\n \"restricted\" \n else \n \"limited\"\n end\n end",
"def can?(permission, resource)\n Rails.cache.fetch([\"permission\", resource, permission], expires_in: 10.minutes) do\n sleep(BASE_PERMISSION_SLEEP_VALUE * rand)\n\n [true, false].sample\n end\n end",
"def can_grant_permissions?\n perms.include? Perm.grant_permissions\n end",
"def can_grant_permissions?\n perms.include? Perm.grant_permissions\n end",
"def calendar_permissions\n return @calendar_permissions\n end",
"def authorized?(resource)\n if resource.respond_to? \"each\" and !resource.is_a? String\n return resource.collect{ |r| authorized?(r)}.inject { |sum, e| sum ||= e }\n end\n \n permission_strings.each do |p|\n r = Regexp.new(p)\n \n if((r =~ resource) != nil)\n return true;\n end\n end\n\n return false;\n end",
"def include_resource_data\n return @include_resource_data\n end",
"def resource_role_scopes=(value)\n @resource_role_scopes = value\n end"
] | [
"0.74570864",
"0.65478575",
"0.65478575",
"0.6391297",
"0.6012648",
"0.5969611",
"0.5969611",
"0.5854961",
"0.56717896",
"0.5643114",
"0.5580377",
"0.54848945",
"0.54761815",
"0.54761815",
"0.5430401",
"0.54301953",
"0.54181594",
"0.53932554",
"0.53932554",
"0.53932554",
"0.53823584",
"0.5376967",
"0.53340435",
"0.53290457",
"0.5299062",
"0.52780724",
"0.5269546",
"0.5248372",
"0.5246223",
"0.52178556",
"0.51949584",
"0.51569796",
"0.51506925",
"0.51465833",
"0.5143022",
"0.5131971",
"0.51313037",
"0.5127884",
"0.511884",
"0.50898796",
"0.507794",
"0.5073305",
"0.5072651",
"0.50721717",
"0.506547",
"0.5056447",
"0.505022",
"0.5044789",
"0.5039834",
"0.5033045",
"0.50315696",
"0.5027824",
"0.4991971",
"0.4991971",
"0.49858412",
"0.4983603",
"0.49745727",
"0.49678427",
"0.49618292",
"0.4954736",
"0.4954736",
"0.49347237",
"0.49319342",
"0.49295974",
"0.4927111",
"0.49128908",
"0.4908988",
"0.49078494",
"0.49075374",
"0.49058634",
"0.4903425",
"0.48984927",
"0.48976254",
"0.48889458",
"0.4875993",
"0.4867359",
"0.4866584",
"0.48650464",
"0.48607722",
"0.48603058",
"0.48542133",
"0.48542133",
"0.48533255",
"0.48498544",
"0.48369706",
"0.48369706",
"0.48319808",
"0.48240826",
"0.48225147",
"0.48225147",
"0.48201108",
"0.48169813",
"0.4814633",
"0.4808674",
"0.48059496",
"0.48059496",
"0.4803171",
"0.47980356",
"0.47958222",
"0.47941744"
] | 0.75706017 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.