README.md in octoauth-1.0.2 vs README.md in octoauth-1.1.0
- old
+ new
@@ -33,9 +33,15 @@
other_auth = Octoauth.new note: 'other_nice_app', file: '~/.other_app_config.yml'
puts "The other token is #{other_auth.token}"
other_auth.save
```
+Multiple files can be specified, and it will try them in order looking for a valid token. If this fails, it will use the first file listed for any future saving of tokens:
+
+```
+auth = Octoauth.new note: 'my_app', files: ['./.octoauth.yml', '/etc/octoauth', :default]
+```
+
The above examples get us the basic scope, which means some read-only public access. For other scopes, specify them when creating the token:
```
auth = Octoauth.new note: 'my_app', scopes: ['gist', 'delete_repo']
```