
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
A very simple Ruby Wrapper for the Formhub API
Add this line to your application's Gemfile:
gem 'formhub_ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install formhub_ruby
This gem is a very simple API wrapper for the JSON API of Formhub application. More details on their JSON API can be foud on their wiki page.
Create a connection like so:
connection = FormhubRuby::ApiConnector.new(username: 'fake_username', password: 'fake_password', formnamne: 'my_form_name' )
You can also pass authentification configuration arguments in a block (e.g. in a initializer file, etc...):
FormhubRuby.configure do |config|
config.username = 'fake_username'
config.password = 'fake_password'
end
To get the actual data from the api call, call the fetch method on it:
connection.fetch
You should then be able to retrieve an array of hashes by using the data method
the_result = connection.data
the_result.first.name
# => Loic
If only want the actual count of rows is needed, use the count method:
connection.count
# => 4
Before fetching, a more refined query can be created by using a hash of queries:
connection.query = {age: 12}
You can set a start and limit for the rows returned
connection.start = 2
connection.limit = 2
and select the fields to be retrieved:
connection.fields = [:age, :name]
Finally you can also sort the results: 1 denotes an ascending sort while -1 denotes a descending sort:
connection.sort = {name: -1} # Descending by name
connection.sort = {name: 1} # Ascending by name
As far as I could tell though, the integers seem to be stored as strings in the Formhub database, so the sorting of these would be quite irrelevant.
Also consequently added: a parameter to cast integers types:
connection.cast_integers = true # false by default
Be aware that this will also cast float values to integer values.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that formhub_ruby 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.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.