Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into bootstrap3-tweeks
Browse files Browse the repository at this point in the history
  • Loading branch information
cantino committed May 5, 2014
2 parents 41533e7 + db0b90c commit 85b1652
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -46,13 +46,15 @@ And now, some example screenshots. Below them are instructions to get you start

### Quick Start

If you just want to play around, you can simply clone this repository, then perform the following steps:
If you just want to play around, you can simply fork this repository, then perform the following steps:

* Run `git remote add upstream https://github.com/cantino/huginn.git` to add the main repository as a remote for your fork.
* Copy `.env.example` to `.env` (`cp .env.example .env`) and edit `.env`, at least updating the `APP_SECRET_TOKEN` variable.
* Run `rake db:create`, `rake db:migrate`, and then `rake db:seed` to create a development MySQL database with some example Agents.
* Run `foreman start`, visit [http://localhost:3000/][localhost], and login with the username of `admin` and the password of `password`.
* Setup some Agents!
* Read the [wiki][wiki] for usage examples and to get started making new Agents.
* Periodically run `git fetch upstream` and then `git checkout master && git merge upstream/master` to merge in the newest version of Huginn.

Note: by default, emails are not sent in the `development` Rails environment, which is what you just setup. If you'd like to enable emails when playing with Huginn locally, edit `config.action_mailer.perform_deliveries` in `config/environments/development.rb`.

Expand Down
13 changes: 4 additions & 9 deletions lib/capistrano/sync.rb
Expand Up @@ -91,25 +91,20 @@
end

# Used by database_config and remote_database_config to parse database configs that depend on .env files. Depends on the dotenv-rails gem.
class EnvLoader < Dotenv::Environment
class EnvLoader
def initialize(data)
@data = data
load
@env = Dotenv::Parser.call(data)
end

def with_loaded_env
begin
saved_env = ENV.to_hash.dup
ENV.update(self)
ENV.update(@env)
yield
ensure
ENV.replace(saved_env)
end
end

def read
@data.split("\n")
end
end

#
Expand Down Expand Up @@ -167,4 +162,4 @@ def purge_old_backups(base)
run "rm #{delete_backups}"
end
end
end
end

0 comments on commit 85b1652

Please sign in to comment.