Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
= acts_as_cleo
Acts As Cleo now has support for Redis backed asynchronous operations.
Optional parameters are: queue: "my_queue_to_process"
queue defaults to "cleo"
To enable Redis, change your cleo.yml to include async: true
async defaults to false
To disable auto flushing of indexer queue auto_flush: false
By default, auto indexer flushing is enabled
To enable auto processing of the Redis queue append auto_enable_queue: true
to any environment you wish to have the queue auto added to your ENV['QUEUE']
=== Usage
Cleo.find(int) # Find Cleo entry by Cleo native id Cleo.update(Cleo::Result) # Pass any acts_as_cleo object to this method to have it update the Cleo entry Cleo.delete(int) # Delete by Cleo id, also accepts any acts_as_cleo object or Cleo::Result Cleo.create(obj) # Creates new entry on Cleo index. Accepts any acts_as_cleo object or Cleo::Result Cleo.query(string) # Takes string search param and returns array of Cleo::Result objects
To enable on an ActiveRecord::Base model:
class MyObject < ActiveRecord::Base acts_as_cleo end
Or add optional parameters acts_as_cleo :terms => %w{terms to be stored} acts_as_cleo :except => %w{columns to be ignored} acts_as_cleo :score=> "method or column to be used" acts_as_cleo :terms => %w{name value other}, :score => "my_score_method"
Default functionality takes all column_names and uses them as terms for Cleo search.
To specify terms to be stored in Cleo, pass :terms => [] with the column and/or method names to be stored
acts_as_cleo ignores updated_at, created_at, id by default.
You can specify more columns to ignore by passing :except => [] with column names.
By default, acts_as_cleo uses the column "name" from your model as the Cleo search name. To specify the name in Cleo, pass :name => "my_attribute_name"
To specify a Cleo score, pass :score => "name of column or function"
ActiveRecord::Base objects with acts_as_cleo get three callback functions:
set_cleo_id, create_cleo, update_cleo, and remove_from_cleo
All three of these callbacks respect the async option on cleo.yml configuration.
= WARNING This gem is still in beta.
= Installing
Add acts_as_cleo to your Gemfile gem 'acts_as_cleo'
After running bundle install execute the generate script to install acts_as_cleo rails g acts_as_cleo:install
This generate command will install the following files:
=== Background Job Processors
=== Configuration and Initialization files
=== Database migration
Verify server settings in config/cleo.yml
Run migrations rake db:migrate
Feel free to use this gem and provide feedback / patch requests.
Acts As Cleo is a Rails gem that allows for easy integration with Linked In's Open Source type ahead manager.
Verify that you have downloaded and installed cleo locally.
== Contributing to acts_as_cleo
== To test
== Copyright
Copyright (c) 2012 Robert R. Meyer. See LICENSE.txt for further details.
FAQs
Unknown package
We found that acts_as_cleo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.