
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
A low level calendar engine.
Add this line to your application's Gemfile:
gem 'cal'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cal
Cal is a simple calendar structure. It does not render a calendar. It does not handle events.
See the Rails app https://github.com/austinthecoder/cal-app for an example.
calendar = Cal::MonthlyCalendar.new 2012, 11, :start_week_on => :monday
calendar.month # a Cal::Month
calendar.first_day # a Cal::Day representing the first day on the calendar, might be in the previous month
calendar.last_day # a Cal::Day representing the last day on the calendar, might be in the next month
calendar.days # a Range of Cal::Day's from the first day to the last
calendar.weeks # an Array of Cal::Day Arrays
calendar.previous # the calendar for the previous month
calendar.next # the calendar for the next month
calendar.day_names # an Array of the day names, e.g. ['Sunday', 'Monday', ...], depends on the `:start_week_on` option
# routes
match 'calendar/:month', :to => 'calendars#show'
# controller
calendar = Cal::MonthlyCalendar.from_param params[:month], :start_week_on => :monday
# view
%h3
= link_to 'Previous month', calendar_path(calendar.previous)
|
= "#{calendar.month.to_s "%B"} #{calendar.year}"
|
= link_to 'Next month', calendar_path(calendar.next)
%table
%thead
%tr
- calendar.day_names.each do |name|
%th= name
%tbody
- calendar.weeks.each do |week|
%tr
- week.each do |day|
%td{:class => ('today' if day.today?)}
= day.number
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that cal 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.