
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
rxer-api
Advanced tools
It is not in my mind to ask questions that cannot be answered.
That is the soul standing upon the crossroad of vacillation.
You search for wisdom, but achieve only a stasis of will.
This is a simple client for REST API of Reindexer
REST API fully described here
Add these line to your application's Gemfile:
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'rxer-api', github: 'etspring/rxer-api'
And then execute:
$ bundle install
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem specific_install https://github.com/etspring/rxer-api.git
require 'rxer/api'
# Initialize client
client = Rxer::Api::Client.new(url: 'http://localhost:9088/')
# Drop db
client.drop_db(db_name: 'my_test_db')
# Create db
client.create_db(db_name: 'my_test_db')
# Define namespace confiuration
ns_config = {
"name": "my_test_namespace",
"storage": {
"enabled": false
},
"indexes": {
"name": "id",
"json_paths": [
"id"
],
"field_type": "string",
"index_type": "hash"
...
}
}
# Create NS with defined config
client.create_namespace(db_name: 'my_test_db', namespace: ns_config)
# Truncate NS
client.truncate_namespace(db_name: 'my_test_db', namespace: 'my_test_namespace')
# Drop NS
client.drop_namespace(db_name: 'my_test_db', namespace: 'my_test_namespace')
# Insert items
items = [{id: "100", title: "Remember"}, {id: "101", title: "Cadia"}].map(&:to_json).join("\n")
client.create_items(db_name: 'my_test_db', ns_name: 'my_test_namespace', payload: items)
# Get items
q = { filter: "id = 'my_id_1' OR id = 'my_id_2'", format: 'json' }
client.get_items(db_name: 'my_test_db', ns_name: 'my_test_namespace', payload: q)
# Drop items
items = [{id: "100", title: "Remember"}, {id: "101", title: "Cadia"}].map { |x| x.slice(:id) }.map(&:to_json)
client.drop_items(db_name: 'my_test_db', ns_name: 'my_test_namespace', payload: items)
# Transactions
# Begin tx
tx_id = client.create_tx(db_name: 'my_test_db', ns_name: 'my_test_namespace').body["tx_id"]
# Create items with tx
client.create_items_tx(db_name: 'my_test_db', tx_id: tx_id, payload: items)
# Upser items with tx
client.upsert_items_tx(db_name: 'my_test_db', tx_id: tx_id, payload: items)
# Drop items with tx
items = [{id: "100", title: "Remember"}, {id: "101", title: "Cadia"}].map { |x| x.slice(:id) }.map(&:to_json)
client.drop_items_tx(db_name: 'my_test_db', tx_id: tx_id, payload: items)
# Commit tx
client.commit_tx(db_name: 'my_test_db', tx_id: tx_id)
# Rollback tx
client.rollback_tx(db_name: 'my_test_db', tx_id: tx_id)
Bug reports and pull requests are welcome on GitHub at https://github.com/etspring/rxer-api.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that rxer-api 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.