Compare commits
No commits in common. "9f2b6236a6a39bea641c4350f8c9654b821dba04" and "7eafdcab0e04c42ae5c75eacd721e681279604ca" have entirely different histories.
9f2b6236a6
...
7eafdcab0e
104
README.md
104
README.md
@ -82,10 +82,10 @@ Tell Walter where to insert its generated JavaScript in `app/views/layouts/appli
|
|||||||
|
|
||||||
## Defining your tours
|
## Defining your tours
|
||||||
|
|
||||||
Define your tours in the `app/tours` directory corresponding to the views defined in your application. Its directory structure mirrors your application's controllers, and the tour files mirror your actions/views. (As of version 2.4.0, Walter respects controllers organized into modules.)
|
Define your tours in the `config/tours` directory corresponding to the views defined in your application. Its directory structure mirrors your application's controllers, and the tour files mirror your actions/views. (As of version 2.4.0, Walter respects controllers organized into modules.)
|
||||||
|
|
||||||
```
|
```
|
||||||
app/
|
config/
|
||||||
└── tours/
|
└── tours/
|
||||||
├── admin/
|
├── admin/
|
||||||
│ └── articles/
|
│ └── articles/
|
||||||
@ -132,7 +132,7 @@ intro:
|
|||||||
Walter takes care of which buttons should appear with each step:
|
Walter takes care of which buttons should appear with each step:
|
||||||
|
|
||||||
* "Later" and "Continue" buttons on the first step
|
* "Later" and "Continue" buttons on the first step
|
||||||
* "Exit", "Back" and "Continue" buttons on intermediate steps
|
* "Exit" and "Next" buttons on intermediate steps
|
||||||
* "Done" button on the last step
|
* "Done" button on the last step
|
||||||
|
|
||||||
When you specify an `attachTo` element, use the `placement` option to choose where the callout should appear relative to that element:
|
When you specify an `attachTo` element, use the `placement` option to choose where the callout should appear relative to that element:
|
||||||
@ -197,3 +197,101 @@ Rails.application.configure do
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Full example
|
||||||
|
|
||||||
|
We provide a [small example app](https://github.com/actmd/walter-example) that implements Walter, so you can see it in action.
|
||||||
|
|
||||||
|
## Upgrading
|
||||||
|
|
||||||
|
### From version 2.3.0 or earlier
|
||||||
|
|
||||||
|
Walter 2.4.0 introduced an updated initializer that supports controllers organized into modules.
|
||||||
|
Rerun the generator with these options to replace the old initializer:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rails generate walter:install --skip-migration --skip-config
|
||||||
|
```
|
||||||
|
|
||||||
|
### From version 1
|
||||||
|
|
||||||
|
Walter v1 was built using Shepherd 1.8, v2 now uses Shepherd 6 – quite a jump, yes.
|
||||||
|
|
||||||
|
If you were using Walter v1, you'll want to take the following steps to upgrade:
|
||||||
|
|
||||||
|
1. Update your gem to the latest version
|
||||||
|
1. Fix your yarn dependencies to use the right versions
|
||||||
|
1. Shepherd no longer provides a set of themes. Walter maintains two of the legacy themes: default and dark. You'll want to choose one of those or migrate your theme to the new Shepherd structure.
|
||||||
|
1. Walter now exposes the entire Shepherd configuration object, so your `walter.yml` file should now fully define the `tour_options` value instead of `default_theme`
|
||||||
|
1. There's been a slight change to `initializers/walter.rb`. Replace yours with [the latest](https://github.com/actmd/walter/blob/master/lib/generators/walter/templates/initializer.rb).
|
||||||
|
|
||||||
|
If you have any trouble at all, please [submit an issue](https://github.com/actmd/walter/issues) for assistance!
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Contributions are welcome!
|
||||||
|
|
||||||
|
Create a feature branch (using git-flow) and submit as a pull request (with a base branch of `develop`).
|
||||||
|
|
||||||
|
Everyone interacting in Walter's codebase, issue tracker, etc. is expected to follow the [Contributor Covenent Code of Conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct).
|
||||||
|
|
||||||
|
### Getting started with the source code
|
||||||
|
|
||||||
|
Walter uses `rvm` with a gemset to ensure the appropriate version of Ruby and its dependencies. Make sure that's installed before you get started.
|
||||||
|
|
||||||
|
```
|
||||||
|
~ git clone git@github.com:actmd/walter.git
|
||||||
|
Cloning into 'walter'...
|
||||||
|
~ cd walter
|
||||||
|
ruby-2.5.3 - #gemset created /Users/jon/.rvm/gems/ruby-2.5.3@walter
|
||||||
|
ruby-2.5.3 - #generating walter wrappers - please wait
|
||||||
|
~ bundle install
|
||||||
|
Bundle complete! 13 Gemfile dependencies, 73 gems now installed.
|
||||||
|
Use `bundle info [gemname]` to see where a bundled gem is installed.
|
||||||
|
~ yarn install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
|
||||||
|
#### Testing locally
|
||||||
|
|
||||||
|
This Rails engine contains a test app called `dummy` with controller and system tests. They'll all get run with `rails t`.
|
||||||
|
|
||||||
|
Please note that if you change anything in the `lib/generators` folder (i.e. configuration, intializer, migration) you'll need to migrate the `dummy` app accordingly.
|
||||||
|
|
||||||
|
Final testing should be done in a standalone Rails app, following the README instructions.
|
||||||
|
|
||||||
|
To install the `walter` gem with a local path:
|
||||||
|
|
||||||
|
```
|
||||||
|
gem 'walter', path: '~/Workspace/walter'
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Automated testing
|
||||||
|
|
||||||
|
We use GitHub Actions to automatically test this engine with Rails 5.2, 6.0, and 6.1.
|
||||||
|
|
||||||
|
### Releasing
|
||||||
|
|
||||||
|
Create a git-flow release:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git flow release start VERSION_NUMBER
|
||||||
|
```
|
||||||
|
|
||||||
|
Edit `lib/walter/version.rb` and increase the version number.
|
||||||
|
|
||||||
|
Build the gem and push to Rubygems:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ rake build
|
||||||
|
$ gem push pkg/walter-VERSION_NUMBER.gem
|
||||||
|
```
|
||||||
|
|
||||||
|
Finish the git-flow release and push to GitHub:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git flow release finish
|
||||||
|
$ git push origin develop
|
||||||
|
$ git push origin master
|
||||||
|
$ git push --tags
|
||||||
|
```
|
||||||
|
@ -47,9 +47,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
buttons: [
|
buttons: [
|
||||||
<% if index == steps.size - 1 %>
|
<% if index == steps.size - 1 %>
|
||||||
<% if steps.size > 1 %>
|
|
||||||
{ text: '<%= t('walter.back') %>', action: Walter.tours["<%= tour_name %>"].back, classes: 'shepherd-button-secondary' },
|
|
||||||
<% end %>
|
|
||||||
{ text: '<%= t('walter.done') %>', action: Walter.tours["<%= tour_name %>"].complete },
|
{ text: '<%= t('walter.done') %>', action: Walter.tours["<%= tour_name %>"].complete },
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if index == 0 %>
|
<% if index == 0 %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user