
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
A simple Ruby client for the nifty cloud mobile backend REST API. This is developer preview.
NCMB.initialize application_key: application_key, client_key: client_key
@todo = NCMB::DataStore.new 'Todo'
@todo = @todo.limit(20)
@todo.each do |item|
puts item[:String]
puts " #{item[:Array]} -> #{item[:Array].class}"
end
@todo = NCMB::Object.new 'Todo'
@todo.set('String', 'Test String')
@todo.set('Integer', 100)
@todo.set('Boolean', true)
@todo.set('Array', [1, 2, 3, "Orange", "Tomato"])
@todo.set('Object', {test1: 'a', test2: 'b'})
@todo.set('Location', NCMB::GeoPoint.new(50, 30))
@todo.set('MultipleLine', "test\ntest\n")
@todo.set('Increment', NCMB::Increment.new(2))
@todo.set('Date', Time.new(2016, 2, 24, 12, 30, 45))
@todo.save
NCMB.initialize application_key: application_key, client_key: client_key
@push = NCMB::Push.new
@push.immediateDeliveryFlag = true
@push.target = ['ios']
@push.message = "This is test message"
@push.deliveryExpirationTime = "3 day"
if @push.save
puts "Push save successful."
else
puts "Push save faild."
end
bundle install
setting_default.yml
to setting.yml
and then fill you application_key
, client_key
Run spec
task:
rake spec
Run examples
task:
rake examples
Or you can run every single example
ruby examples/example_file_name.rb
Before run examples/script.rb
, you should upload the below script files to Script function on the Console screen.
module.exports = function(req, res) {
res.send('{"msg":"Hello World!"}');
}
module.exports = function(req, res) {
if (req.query.name) {
res.send('{"msg":"Hello ' + req.query.name +'!"}');
} else {
res.send('{"msg":"Hello World!"}');
}
}
(Don't forget to change YOUR-APPLICATION-KEY
and YOUR-CLIENT-KEY
to your value before upload.)
function saveData(req, res) {
// POSTのデータを取得
var email = req.body.email;
var message = req.body.body;
var NCMB = require('ncmb');
var ncmb = new NCMB('YOUR-APPLICATION-KEY', 'YOUR-CLIENT-KEY');
// データを保存する
var Item = ncmb.DataStore('Item');
var item = new Item();
item.set("email", email)
.set("message", message)
.save()
.then(function(item){
// 成功
res.send('{"msg":"POST data successfully!"}');
})
.catch(function(err){
// 失敗
res.send('{"msg":"' + err + '"}');
});
}
module.exports = saveData;
MIT.
FAQs
Unknown package
We found that ncmb-ruby-client 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.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.