Unpoly enables fast and flexible frontends with minimal changes to your server-side code.
This repository is home to both the Unpoly JavaScript code and its (optional) bindings for Ruby on Rails (unpoly-rails gem).
- See unpoly.com for more information and JavaScript API documentation.
- See
CHANGELOG.mdfor notable changes. - See
README_RAILS.mddocumentation of the Rails bindings.
Overview:
- This currently requires Ruby
- There's a Rails app in
spec_app - Jasmine tests for Unpoly live in
spec_app/spec/javascripts - RSpec tests for the
unpoly-railsgem live inspec_app/spec/controllers
Install dependencies for tests:
- Install Ruby 2.1.2
- Install Bundler by running
gem install bundler cdintospec_app- Install dependencies by running
bundle install
To run Jasmine tests for Unpoly:
cdintospec_app- Start the Rails server by running
rails server - Access
http://localhost:3000/specsto see the Jasmine test runner
To run RSpec tests for the unpoly-rails gem:
cdintospec_app- Run
rspec
We are currently feeding four release channels:
- Manual download from GitHub
- npm
- Bower (which is based on Git and version tags)
- Rubygems (as the
unpoly-railsgem)
We always release to all channel simultaneously.
To prepare a new version:
- Edit
lib/unpoly/rails/version.rband bump the version number. Use semantic versioning. - Add an entry to
CHANGELOG.md - Commit and push the version bump and
CHANGELOG.md
Now we can release a new version. This requires your to be logged into Rubygems and npm:
- From the project root, type
rake publish:build. This will output minified JS and CSS files to thedistfolder. It also updates thepackage.jsonfor npm. - Commit and push the generated files. There is a rake task
rake publish:committhat helps with this. - From the project root, type
rake publish:release. This will publish a new gem version to Rubygems.org. - It will also push a tag for this version, which Bower requires for its own versioning scheme. Finally it publishes to npm.
Always remember to build, commit and push build artifacts before calling rake publish:release so the Git tag points to the correct commit.
If you have done this process a few times and know what you're doing, you can call rake publish:all to run all these steps in sequence.
After you have published all release channels, remember to:
- Update unpoly.com so users see the new version, CDN link and CHANGELOG.
- Send a message to the E-mail group with the title "Unpoly X.Y.Z released". You can copy the relevant CHANGELOG part from here.
- Henning Koch from makandra (@triskweline on Twitter)