From 6b08e8c89d26225786736ad69ba335b275a1a048 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 4 Jul 2016 21:26:46 +0200 Subject: [doc] update install documentation --- doc/DEPLOY.md | 9 +++++++-- doc/DEVELOP.md | 27 +++++++++++++++++---------- doc/TROUBLESHOOT.md | 14 ++++++++++---- 3 files changed, 34 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/DEPLOY.md b/doc/DEPLOY.md index 33d5598..4d59701 100644 --- a/doc/DEPLOY.md +++ b/doc/DEPLOY.md @@ -1,5 +1,10 @@ # Deployment # +LEAP Web is provisioned and run as part of the overall [LEAP platform](https://leap.se/en/docs/platform). +We strongly recomment using the whole Platform and following its instructions. +If you want to directly deploy the webapp never the less these instructions are +for you. + These instructions are targeting a Debian GNU/Linux system. You might need to change the commands to match your own needs. @@ -10,9 +15,9 @@ change the commands to match your own needs. The following packages need to be installed: * git -* ruby1.9 -* rubygems1.9 +* ruby (2.1.5) * couchdb (if you want to use a local couch) +* bundler ### Setup Capistrano ### diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index cdd0867..e0c07d6 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -7,17 +7,24 @@ control checks. This is handy for local development. However, there is the risk that running tests with Couch in Admin Party yields false results. -You have two options: +We recommend keeping the default CouchDB configuration locally and testing +the more complex setup with access control in Continuous Integration. -1) Use Admin Party and accept the risk -2) Stop Admin Party by creating user accounts & security docs by running the -following script: +Please see .travis.yml for the configuration of our CI runs. - test/travis/setup_couch.sh +In order to prepare you local couch for development run +``` +bin/rake db:rotate +bin/rake db:migrate +``` -### Database configuration +### Customized database configuration (advanced) + +If you want to stop Admin Party mode you need to create user accounts & +security docs. You can use the following script as a guideline: + test/travis/setup_couch.sh -Copy & adapt the default database configuration: +Afterwards copy & adapt the default database configuration: ``` mv config/couchdb.example.yml config/couchdb.yml @@ -37,14 +44,14 @@ Some tips on modifying the views: ## Engines ## -Leap Web contains some. They live in their own subdirectory and are included through bundler via their path. This way changes to the engines immediately affect the server as if they were in the main `app` directory. +We use engines to separate optional functionality from the core. They live in their own subdirectory and are included through bundler via their path. This way changes to the engines immediately affect the server as if they were in the main `app` directory. Currently Leap Web includes 2 Engines: * [support](https://github.com/leapcode/leap_web/blob/master/engines/support) - Help ticket management * [billing](https://github.com/leapcode/leap_web/blob/master/engines/billing) - Billing System -## Creating a new engine ## +## Creating a new engine (advanced) ## If you want to add functionality to the webapp but keep it easy to remove you might consider adding an engine. This only makes sense if your engine really is a plugin - so no other pieces of code depend on it. @@ -99,7 +106,7 @@ For example: visit robot_path(@robot, :locale => nil) end -## Debugging +## Debugging Production (advanced) Sometimes bugs only show up when deployed to the live production server. Debugging can be tricky, because the open source mod_passenger does not support debugger. You can't just run diff --git a/doc/TROUBLESHOOT.md b/doc/TROUBLESHOOT.md index f3db006..0e2957d 100644 --- a/doc/TROUBLESHOOT.md +++ b/doc/TROUBLESHOOT.md @@ -13,15 +13,19 @@ Here are some less common issues you might run into when installing Leap Web. Make sure bundler is installed. `gem list bundler` should list `bundler`. You also need to be able to access the `bundler` executable in your PATH. -## Outdated version of rubygems ## +## Incompatible ruby version ## -### Error Messages ### +### Detecting the problem ### +The rubyversion we use for development and testing is noted in the file + + .ruby-version -`bundler requires rubygems >= 1.3.6` +It should match what `ruby --version` prints. ### Solution ### -`gem update --system` will install the latest rubygems +Install the matching ruby version. For some operation systems this may require +the use of rbenv or rvm. ## Missing development tools ## @@ -42,5 +46,7 @@ Some gem dependencies might not compile because they lack the needed c libraries ### Solution ### Install the libraries in question including their development files. +Usually the missing library is mentioned in the error message. Searching the +internet for similar errors is a good starting point aswell. -- cgit v1.2.3 From 78d1b0daae8b7d667c8cb5a8da0b1efba029801f Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 4 Jul 2016 22:02:05 +0200 Subject: [doc] make sure to mention develop branch in dev docs --- doc/DEVELOP.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index e0c07d6..97ecd25 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -1,5 +1,19 @@ # Development # +## Branches + +We use the 'master' branch to hold the version currently deployed to the +production servers. Only hotfixes are applied here. + +Most of development happens based upon the 'develop' branch. So unless +you are investigating a specific issue that occured in production you +probably want to base your changes on 'develop': +``` +git checkout origin/develop -b my-new-feature +``` +This will create a new branch called 'my-new-feature' based on the develop +branch from the origin remote. + ## Setting up the local CouchDB CouchDB operates in Admin Party by default, meaning there are no access -- cgit v1.2.3 From 45abd9751e3e7d5428bad81a433b85feae328a04 Mon Sep 17 00:00:00 2001 From: luca-marie Date: Tue, 13 Sep 2016 15:16:20 +0200 Subject: Restructuring README and documentation in doc file --- doc/TWITTER_FEED.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 doc/TWITTER_FEED.md (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md new file mode 100644 index 0000000..12dc1be --- /dev/null +++ b/doc/TWITTER_FEED.md @@ -0,0 +1,36 @@ +Display of status updates from twitter on main view (access to tweets via Twitter API) +--------------------------- + +This is a feature to include status updates that displays most recent tweets +of a (determined) twitter account (accessed via Twitter API). +If you chose to use it, the feature gets included in `home/index` of +LEAP web app (as part of the main view). + +## How to use it ## + +* Create Twitter Application on https://apps.twitter.com/ + * Visit https://apps.twitter.com/ and log in with the twitter account you want to use + * Make sure you have a mobile phone number registered with your account to be able to proceed + * Choose the option to `Create New App` + * Fill in Application Details and Developer Agreement and `Create your Twitter application` + * Choose the section "Keys and Access Tokens" to get your consumer key and consumer secret + * Optional: Go to section "Permissions" and change the "Access" from `Read and Write` (by default) to `Read only` + * Have your consumer key and secret by hand for one of the next steps + +* Activate the feature within your local LEAP Web Application + * If not already existing create a secrets-file in /config with the name secrets.yml (`/config/secrets.yml`) + * Secrets-file should contain the following, make sure its in YAML: {"development"=> {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}, "test"=>{"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}} + * To have your bearer token created, run script in terminal being in the file of leap_web: `script/generate_bearer_token` + * To have the script run properly you have to add before running: `--key your_consumerkey --secret your_consumersecret` + * Add also `--projectroot your_projectroot --twitterhandle your_twitterhandle` as well to not have manually put the data in your secrets-file + * The full command looks like this: `script/generate_bearer_token --key your_consumerkey --secret your_consumersecret --projectroot your_projectroot --twitterhandle your_twitterhandle` + * If you didn't give all your information to the script, had a typo or want to change anything else, please do so by finding the secrets-file at `/config/secrets.yml` + * Make sure that the correct twitterhandle and bearer-token is included + +* Deactivate your bearer token + * To deactivate your generated bearer token you can run script/invalidate_bearer_token + * The full command looks like this: script/invalidate_bearer_token --key your_consumerkey --secret your_consumersecret --token your_bearer_token + +### Default avatar image ### + +This feature uses by default the the twitter bird as avatar picture (Twitter_Logo_Blue.png). By using the Twitter trademarks in these Brand Guidelines, you agree to follow these Twitter Trademark Guidelines (the “Guidelines”) as well as our Terms of Service and all other Twitter rules and policies. Find more details here: https://brand.twitter.com/. -- cgit v1.2.3 From b19280e9937276d908d90be5da7c65cdfbb64be1 Mon Sep 17 00:00:00 2001 From: luca-marie Date: Tue, 13 Sep 2016 15:21:12 +0200 Subject: Fixed typo --- doc/TWITTER_FEED.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md index 12dc1be..bfe2a1d 100644 --- a/doc/TWITTER_FEED.md +++ b/doc/TWITTER_FEED.md @@ -1,4 +1,4 @@ -Display of status updates from twitter on main view (access to tweets via Twitter API) +# Display of status updates from twitter on main view # --------------------------- This is a feature to include status updates that displays most recent tweets @@ -33,4 +33,4 @@ LEAP web app (as part of the main view). ### Default avatar image ### -This feature uses by default the the twitter bird as avatar picture (Twitter_Logo_Blue.png). By using the Twitter trademarks in these Brand Guidelines, you agree to follow these Twitter Trademark Guidelines (the “Guidelines”) as well as our Terms of Service and all other Twitter rules and policies. Find more details here: https://brand.twitter.com/. +This feature uses by default the twitter bird as avatar picture (Twitter_Logo_Blue.png). By using the Twitter trademarks in these Brand Guidelines, you agree to follow these Twitter Trademark Guidelines (the “Guidelines”) as well as our Terms of Service and all other Twitter rules and policies. Please find more details here: https://brand.twitter.com/. -- cgit v1.2.3 From 8a9c46dd6bd2538bf9f126ec6901d4ce3ebd2758 Mon Sep 17 00:00:00 2001 From: luca-marie Date: Tue, 13 Sep 2016 15:23:11 +0200 Subject: Fixed typo --- doc/TWITTER_FEED.md | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md index bfe2a1d..218bc26 100644 --- a/doc/TWITTER_FEED.md +++ b/doc/TWITTER_FEED.md @@ -1,5 +1,4 @@ # Display of status updates from twitter on main view # ---------------------------- This is a feature to include status updates that displays most recent tweets of a (determined) twitter account (accessed via Twitter API). -- cgit v1.2.3 From e768e50cce83cf3e1ff3f5ac7b1b58f73368daef Mon Sep 17 00:00:00 2001 From: luca-marie Date: Tue, 13 Sep 2016 15:41:42 +0200 Subject: added twitter guidelines for usage of twitter image --- doc/TWITTER_FEED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md index 218bc26..972e683 100644 --- a/doc/TWITTER_FEED.md +++ b/doc/TWITTER_FEED.md @@ -32,4 +32,4 @@ LEAP web app (as part of the main view). ### Default avatar image ### -This feature uses by default the twitter bird as avatar picture (Twitter_Logo_Blue.png). By using the Twitter trademarks in these Brand Guidelines, you agree to follow these Twitter Trademark Guidelines (the “Guidelines”) as well as our Terms of Service and all other Twitter rules and policies. Please find more details here: https://brand.twitter.com/. +This feature uses by default the twitter bird as avatar picture (Twitter_Logo_Blue.png). By using the Twitter trademarks, you agree to follow these Twitter Trademark Guidelines (the “Guidelines”) as well as Twitter's Terms of Service and all other Twitter rules and policies. Please find more details here: https://brand.twitter.com/. -- cgit v1.2.3 From b66eb2b7af58cd4354f0c5262a7061e3d20e317c Mon Sep 17 00:00:00 2001 From: luca-marie Date: Tue, 13 Sep 2016 15:46:45 +0200 Subject: Clarifying on how to use twitter brand logo --- doc/TWITTER_FEED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md index 972e683..dd3954c 100644 --- a/doc/TWITTER_FEED.md +++ b/doc/TWITTER_FEED.md @@ -32,4 +32,4 @@ LEAP web app (as part of the main view). ### Default avatar image ### -This feature uses by default the twitter bird as avatar picture (Twitter_Logo_Blue.png). By using the Twitter trademarks, you agree to follow these Twitter Trademark Guidelines (the “Guidelines”) as well as Twitter's Terms of Service and all other Twitter rules and policies. Please find more details here: https://brand.twitter.com/. +This feature uses by default the twitter bird as avatar picture (Twitter_Logo_Blue.png). By using the Twitter trademarks, you agree to follow the Twitter Trademark Guidelines as well as Twitter's Terms of Service and all other Twitter rules and policies. Please find more details here: https://brand.twitter.com/. -- cgit v1.2.3 From 6a8afd2f69a13f62841a3fe909beaad96928fadb Mon Sep 17 00:00:00 2001 From: thea Date: Thu, 15 Sep 2016 12:23:14 +0200 Subject: twitter readme now contains github markup to show secrets-file content --- doc/TWITTER_FEED.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md index dd3954c..221c334 100644 --- a/doc/TWITTER_FEED.md +++ b/doc/TWITTER_FEED.md @@ -19,6 +19,18 @@ LEAP web app (as part of the main view). * Activate the feature within your local LEAP Web Application * If not already existing create a secrets-file in /config with the name secrets.yml (`/config/secrets.yml`) * Secrets-file should contain the following, make sure its in YAML: {"development"=> {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}, "test"=>{"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}} +``` +development: + twitter: + enabled: false # set to true for usage + twitter_handle: XXXXX #put your twitter handle here + bearer_token: XXXXX #put your bearer token here +test: + twitter: + enabled: false # set to true for usage + twitter_handle: XXXXX #put your twitter handle here + bearer_token: XXXXX #put your bearer token here +``` * To have your bearer token created, run script in terminal being in the file of leap_web: `script/generate_bearer_token` * To have the script run properly you have to add before running: `--key your_consumerkey --secret your_consumersecret` * Add also `--projectroot your_projectroot --twitterhandle your_twitterhandle` as well to not have manually put the data in your secrets-file -- cgit v1.2.3 From 94a5b32a58f5f4fb63eaf677a91af63e1fe3e325 Mon Sep 17 00:00:00 2001 From: thea Date: Thu, 15 Sep 2016 15:29:10 +0200 Subject: included production for readme & secrets --- doc/TWITTER_FEED.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md index 221c334..592cd38 100644 --- a/doc/TWITTER_FEED.md +++ b/doc/TWITTER_FEED.md @@ -30,6 +30,11 @@ test: enabled: false # set to true for usage twitter_handle: XXXXX #put your twitter handle here bearer_token: XXXXX #put your bearer token here +production: + twitter: + enabled: false # set to true for usage + twitter_handle: XXXXX #put your twitter handle here + bearer_token: XXXXX #put your bearer token here ``` * To have your bearer token created, run script in terminal being in the file of leap_web: `script/generate_bearer_token` * To have the script run properly you have to add before running: `--key your_consumerkey --secret your_consumersecret` -- cgit v1.2.3 From d44fc9292637ed6d1a4a7e04883e8b3b88dc3c15 Mon Sep 17 00:00:00 2001 From: theaamanda Date: Wed, 21 Sep 2016 23:34:53 +0200 Subject: finished error-handling with different error-messages for different errors. added info that the account has to be public in Twitter-Doc --- doc/TWITTER_FEED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md index 592cd38..94de8c1 100644 --- a/doc/TWITTER_FEED.md +++ b/doc/TWITTER_FEED.md @@ -41,7 +41,7 @@ production: * Add also `--projectroot your_projectroot --twitterhandle your_twitterhandle` as well to not have manually put the data in your secrets-file * The full command looks like this: `script/generate_bearer_token --key your_consumerkey --secret your_consumersecret --projectroot your_projectroot --twitterhandle your_twitterhandle` * If you didn't give all your information to the script, had a typo or want to change anything else, please do so by finding the secrets-file at `/config/secrets.yml` - * Make sure that the correct twitterhandle and bearer-token is included + * Make sure that the correct twitterhandle and bearer-token is included. The twitter-account you want to have shown (the twitterhandle) is a public account! * Deactivate your bearer token * To deactivate your generated bearer token you can run script/invalidate_bearer_token -- cgit v1.2.3 From 4ffa776d2c760618b17bd76a9a023f7fe762babd Mon Sep 17 00:00:00 2001 From: luca-marie Date: Fri, 23 Sep 2016 11:52:46 +0200 Subject: Doc updated on how to customize avatar picture in twitter feature; update error response messages; added 'config/customization/images' + link in 'config/initializer/customization.rb' --- doc/TWITTER_FEED.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md index dd3954c..3e54a4d 100644 --- a/doc/TWITTER_FEED.md +++ b/doc/TWITTER_FEED.md @@ -24,7 +24,7 @@ LEAP web app (as part of the main view). * Add also `--projectroot your_projectroot --twitterhandle your_twitterhandle` as well to not have manually put the data in your secrets-file * The full command looks like this: `script/generate_bearer_token --key your_consumerkey --secret your_consumersecret --projectroot your_projectroot --twitterhandle your_twitterhandle` * If you didn't give all your information to the script, had a typo or want to change anything else, please do so by finding the secrets-file at `/config/secrets.yml` - * Make sure that the correct twitterhandle and bearer-token is included + * Make sure that the correct twitter handle and bearer token is included * Deactivate your bearer token * To deactivate your generated bearer token you can run script/invalidate_bearer_token @@ -32,4 +32,5 @@ LEAP web app (as part of the main view). ### Default avatar image ### -This feature uses by default the twitter bird as avatar picture (Twitter_Logo_Blue.png). By using the Twitter trademarks, you agree to follow the Twitter Trademark Guidelines as well as Twitter's Terms of Service and all other Twitter rules and policies. Please find more details here: https://brand.twitter.com/. +This feature uses by default the twitter bird as avatar picture, you can find here (app/assets/images/Avatar_Pic.png). For customization you can upload your own avatar picture to 'config/customization/images' naming the image file 'Avatar_Pic.png'. This will replace the default image file. +By using the Twitter trademarks, you agree to follow the Twitter Trademark Guidelines as well as Twitter's Terms of Service and all other Twitter rules and policies. Please find more details here: https://brand.twitter.com/. -- cgit v1.2.3 From 69b182b1bf811e1d09c734debf0f71f8412dd6b7 Mon Sep 17 00:00:00 2001 From: luca-marie Date: Fri, 23 Sep 2016 16:56:58 +0200 Subject: Adapted description to use case 'tweets are protected' --- doc/TWITTER_FEED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/TWITTER_FEED.md b/doc/TWITTER_FEED.md index 552dc54..6deb432 100644 --- a/doc/TWITTER_FEED.md +++ b/doc/TWITTER_FEED.md @@ -41,7 +41,7 @@ production: * Add also `--projectroot your_projectroot --twitterhandle your_twitterhandle` as well to not have manually put the data in your secrets-file * The full command looks like this: `script/generate_bearer_token --key your_consumerkey --secret your_consumersecret --projectroot your_projectroot --twitterhandle your_twitterhandle` * If you didn't give all your information to the script, had a typo or want to change anything else, please do so by finding the secrets-file at `/config/secrets.yml` - * Make sure that the correct twitter-handle and bearer-token is included. The tweets of the twitter-account you want to have shown have to be public! + * Make sure that the correct twitter-handle and bearer-token is included. The account's tweets must not be protected, otherwise they cannot be displayed. * Deactivate your bearer token * To deactivate your generated bearer token you can run script/invalidate_bearer_token -- cgit v1.2.3