From 36215fbd81b1ce3e8fcbf58dd5e4743d76ff6a50 Mon Sep 17 00:00:00 2001 From: Alessio Signorini Date: Tue, 14 Jan 2020 09:41:06 -0800 Subject: [PATCH] updated README.md --- .travis.yml | 13 --------- LICENSE.txt | 7 ----- README.md | 53 +++++++------------------------------ huginn_fitbit_agent.gemspec | 2 +- 4 files changed, 11 insertions(+), 64 deletions(-) delete mode 100644 .travis.yml delete mode 100644 LICENSE.txt diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2ffea26..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -sudo: false -language: ruby -env: - global: - - APP_SECRET_TOKEN=b2724973fd81c2f4ac0f92ac48eb3f0152c4a11824c122bcf783419a4c51d8b9bba81c8ba6a66c7de599677c7f486242cf819775c433908e77c739c5c8ae118d - matrix: - - DATABASE_ADAPTER=mysql2 - - DATABASE_ADAPTER=postgresql DATABASE_USERNAME=postgres -rvm: -- 2.2.2 -- 2.3.0 -cache: bundler -script: bundle exec rake diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 6889edb..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2019 Alessio Signorini - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 3ab7d60..2388be8 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,14 @@ -# FitbitAgent +# Create events from Fitbit activities -Welcome to your new agent gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/huginn_fitbit_agent`. To experiment with that code, run `bin/console` for an interactive prompt. +OAUTHv2 client and secret can be specified in the configuration of the + agent or globally using `ENV['FITBIT_OAUTH2_CLIENT']` and + `ENV['FITBIT_OAUTH2_SECRET']`. -TODO: Delete this and the text above, and describe your gem +The agent will remember some (`loopback`=50) activities so it can update + them instead of creating new ones. -## Installation +Refer to [this page](https://dev.fitbit.com/build/reference/web-api/activity/#get-activity-logs-list) + for a list of properties of the events created. -This gem is run as part of the [Huginn](https://github.com/huginn/huginn) project. If you haven't already, follow the [Getting Started](https://github.com/huginn/huginn#getting-started) instructions there. - -Add this string to your Huginn's .env `ADDITIONAL_GEMS` configuration: - -```ruby -huginn_fitbit_agent -# when only using this agent gem it should look like this: -ADDITIONAL_GEMS=huginn_fitbit_agent -``` - -And then execute: - - $ bundle - -## Usage - -TODO: Write usage instructions here - -## Development - -Running `rake` will clone and set up Huginn in `spec/huginn` to run the specs of the Gem in Huginn as if they would be build-in Agents. The desired Huginn repository and branch can be modified in the `Rakefile`: - -```ruby -HuginnAgent.load_tasks(branch: '', remote: 'https://github.com//huginn.git') -``` - -Make sure to delete the `spec/huginn` directory and re-run `rake` after changing the `remote` to update the Huginn source code. - -After the setup is done `rake spec` will only run the tests, without cloning the Huginn source again. - -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). - -## Contributing - -1. Fork it ( https://github.com/[my-github-username]/huginn_fitbit_agent/fork ) -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create a new Pull Request +After the agent is created go into its description to complete the OAUTHv2 + flow and authorize it to read your Fitbit data. diff --git a/huginn_fitbit_agent.gemspec b/huginn_fitbit_agent.gemspec index fbfbd0e..4b6ff1e 100644 --- a/huginn_fitbit_agent.gemspec +++ b/huginn_fitbit_agent.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |spec| spec.name = "huginn_fitbit_agent" - spec.version = '1.0.3' + spec.version = '1.0.4' spec.authors = ["Alessio Signorini"] spec.email = ["alessio@signorini.us"]