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.
= PoxPaginate 0.2.5
PoxPaginate is an extension to WillPaginate and ActiveResource that makes it possible to transparently paginate over a collection of XML serialised resources.
This gem is based on our experience building largish distributed systems consisting of multiple Rails apps integrated over POX (Plain Old XML). Yes, it is in production. No, unfortunately we aren't allowed to talk about it.
== Installation
PoxPaginate is available as a gem. In your Gemfile add gem 'pox_paginate', '~> 0.2.0' # Please check for the latest version
We also strongly recommend you use Ruby LibXML or Nokogiri rather than the standard REXML for deserialisation. While PoxPaginate supports all three, REXML is simply too slow for use in production. To switch to using either gem:
gem 'nokogiri', '> 1.4.3.1'
or
gem 'libxml-ruby', '> 1.1.4'
After this, you need to instruct Rails to use them. In application.rb, do ActiveSupport::XmlMini.backend = 'LibXML' or ActiveSupport::XmlMini.backend = 'Nokogiri'
JDOM is supported as a backend on JRuby ActiveSupport::XmlMini.backend = 'JDOM'
== Usage
When constructing the xml serialised form of a resource in a controller, add pagination - like so: class ProductsController < ApplicationController
# GET /products
# GET /products.xml
def index
@products = Product.paginate :page => params[:page], :per_page => params[:per_page]
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @products }
end
end
...
...
...
end
PoxPaginate extends WillPaginate::Collection to add 'current_page,' 'per_page' and 'total_entries' as attributes on the root node of the collection xml.
On the client, you do the usual: class Product < ActiveResource::Base self.site = 'http://oogabooga.in' end
Now whenever you do Product.find(:all, :params => {:page => 2, :per_page => 5})
PoxPaginate will kick in if pagination related attributes are present on the root node, and will result in the creation of a PoxPaginate::RemoteCollection, which is a subclass of WillPaginate::Collection and so behaves in exactly the same manner.
=== Note
== Continuous Itegration
You can find the link to the pox_paginate CI build over at the C42 Engineering {open source}[http://c42.in/open_source] page.
== How to contribute
If your patch is accepted, we will add you to the 'Contributors' section of the README.
== Contributors
FAQs
Unknown package
We found that pox_paginate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.