
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
D3Maps Ruby Gem is a gem that simplifies the process of creating maps of the United States and assigning data values to each location.
Add this line to your application's Gemfile:
gem 'd3_maps'
And then execute:
$ bundle
Or install it yourself as:
$ gem install d3_maps
In app/assets/javascripts/application.js, include
//= require d3_maps
Create the database needed to store the information for your project. The database consist of a States table with information on number, code, and name. Number must be included. Code and name are optional values to display.
rails generate model States number:integer code:string name:string
rake db:migrate
In the seeds.rb file
require 'csv'
tsv_text = File.read(Rails.root.join('assets', 'tsv', 'us_states', 'us-state-names.tsv'))
tsv = CSV.parse(tsv_text, :headers => true, :col_sep => "\t")
tsv.each do |row|
s = State.new
s.number = row['id']
s.code = row['code']
s.name = row['name']
s.save
end
puts "There are now #{State.count} in the states table"
Seed your database.
rake db:seed
Or reset your database
rake db:reset
Host the data as a json file as part of your application
rails generate controller States index
Replace the States/states_controller.rb and states/index.html.erb files with the same files in d3maps.
The map for United states is located in views/welcome/index.html.erb The map for the world is located in views/welcome/about.html.erb
To generate the world map, repeat the process and seed your database with data located at at app/tsv/world/world-countries-names.tsv
FAQs
Unknown package
We found that d3_maps 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.