Skip to content

Commit

Permalink
Merge f243c56 into 390c958
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Aug 23, 2019
2 parents 390c958 + f243c56 commit 57ec2bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -36,6 +36,7 @@ gem 'forecast_io', '~> 2.0.0' # WeatherAgent
gem 'rturk', '~> 2.12.1' # HumanTaskAgent
gem 'erector', github: 'dsander/erector', branch: 'fix-fixnum-warning'
gem 'hipchat', '~> 1.2.0' # HipchatAgent
gem 'mini_racer', '~> 0.2.4' # JavaScriptAgent
gem 'xmpp4r', '~> 0.5.6' # JabberAgent
gem 'mqtt' # MQTTAgent
gem 'slack-notifier', '~> 1.0.0' # SlackAgent
Expand Down Expand Up @@ -124,7 +125,6 @@ gem 'rufus-scheduler', '~> 3.4.2', require: false
gem 'sass-rails', '~> 5.0'
gem 'select2-rails', '~> 3.5.4'
gem 'spectrum-rails'
gem 'mini_racer', '~> 0.2.4'
gem 'execjs', '~> 2.7.0'
gem 'typhoeus', '~> 0.6.3'
gem 'uglifier', '~> 2.7.2'
Expand Down
4 changes: 4 additions & 0 deletions app/models/agents/java_script_agent.rb
Expand Up @@ -9,9 +9,13 @@ class JavaScriptAgent < Agent

default_schedule "never"

gem_dependency_check { defined?(MiniRacer) }

description <<-MD
The JavaScript Agent allows you to write code in JavaScript that can create and receive events. If other Agents aren't meeting your needs, try this one!
#{'## Include `mini_racer` in your Gemfile to use this Agent!' if dependencies_missing?}
You can put code in the `code` option, or put your code in a Credential and reference it from `code` with `credential:<name>` (recommended).
You can implement `Agent.check` and `Agent.receive` as you see fit. The following methods will be available on Agent in the JavaScript environment:
Expand Down

0 comments on commit 57ec2bf

Please sign in to comment.