Project

panda_core

0.0
The project is in a healthy, maintained state
Shared development tools, configurations, and utilities for Panda CMS and its related projects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Project Readme

Panda Core

Core functionality shared between Panda Software gems:

Installation

Add this line to your application's Gemfile:

gem 'panda_core'

And then execute:

bundle install

Setup

1. Run the Install Generator

This will:

  • Add required gem dependencies
  • Create an initializer
  • Mount the engine in your routes
rails generate panda_core:install

2. Install Configuration Templates

Panda Core provides standard configuration files that can be used across all Panda gems to ensure consistency.

rails generate panda_core:templates

This will copy the following configuration files to your project:

  • .github/workflows/ci.yml - GitHub Actions CI workflow
  • .github/dependabot.yml - Dependabot configuration
  • .erb_lint.yml - ERB linting rules
  • .eslintrc.js - ESLint configuration
  • .gitattributes - Git file handling rules
  • .gitignore - Standard git ignore rules
  • .lefthook.yml - Git hooks configuration
  • .rspec - RSpec configuration
  • .standard.yml - Ruby Standard configuration

3. Configure Dependencies

The following gems will be added to your Gemfile:

  • panda_core

Make sure to follow the setup instructions for each of these gems.

Development

After checking out the repo:

  1. Run setup:
bin/setup
  1. Run the test suite:
bundle exec rspec
  1. Run the linter:
bundle exec standardrb

Testing

The gem includes several types of tests:

  • Generator tests for installation and template copying
  • System tests using Capybara
  • Unit tests for core functionality

To run specific test types:

# Run all tests
bundle exec rspec
# Run only generator tests
bundle exec rspec spec/generators
# Run only system tests
bundle exec rspec spec/system

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-new-feature)
  5. Create new Pull Request

Bug reports and pull requests are welcome on GitHub at https://github.com/tastybamboo/panda_core.

License

The gem is available as open source under the terms of the BSD 3-Clause License.