mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Merge pull request #2047 from albertsun/update-google-api-client
Update google-api-client and Google agents
This commit is contained in:
commit
cec6ce1a56
11 changed files with 481 additions and 829 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
| DateOfChange | Changes |
|
||||
|----------------|--------------------------------------------------------------------------------------------------------------|
|
||||
| Jul 10, 2017 | Update Google API Client. May break backwards compatibility for GoogleCalendarPublishAgent. [2047](https://github.com/huginn/huginn/pull/2047) |
|
||||
| Oct 17, 2016 | Normalize URL in `to_uri` and `uri_expand` liquid filters. |
|
||||
| Oct 06, 2016 | `RssAgent` is reimplemented migrating its underlying feed parser from FeedNormalizer to Feedjira. [1564](https://github.com/cantino/huginn/pull/1564) |
|
||||
| Oct 05, 2016 | Migrate to Rails 5. [1688](https://github.com/cantino/huginn/pull/1688) |
|
||||
|
|
12
Gemfile
12
Gemfile
|
@ -44,11 +44,12 @@ gem 'slack-notifier', '~> 1.0.0' # SlackAgent
|
|||
gem 'hypdf', '~> 1.0.10' # PDFInfoAgent
|
||||
|
||||
# Weibo Agents
|
||||
# FIXME needs to loosen omniauth dependency
|
||||
gem 'weibo_2', github: 'dsander/weibo_2', branch: 'master'
|
||||
# FIXME needs to loosen omniauth dependency, add rest-client
|
||||
gem 'weibo_2', github: 'albertsun/weibo_2', branch: 'master'
|
||||
|
||||
# GoogleCalendarPublishAgent and GoogleTranslateAgent
|
||||
gem 'google-api-client', '~> 0.7.1', require: 'google/api_client'
|
||||
gem 'google-api-client', '~> 0.13'
|
||||
gem 'google-cloud-translate', '~> 1.0.0', require: 'google/cloud/translate'
|
||||
|
||||
# Twitter Agents
|
||||
gem 'twitter', github: 'sferik/twitter' # Must to be loaded before cantino-twitter-stream.
|
||||
|
@ -56,7 +57,8 @@ gem 'twitter-stream', github: 'cantino/twitter-stream', branch: 'huginn'
|
|||
gem 'omniauth-twitter', '~> 1.3.0'
|
||||
|
||||
# Tumblr Agents
|
||||
gem 'tumblr_client', github: 'tumblr/tumblr_client', branch: 'master', ref: '0c59b04e49f2a8c89860613b18cf4e8f978d8dc7' # '>= 0.8.5'
|
||||
# until merge of https://github.com/tumblr/tumblr_client/pull/61
|
||||
gem 'tumblr_client', github: 'albertsun/tumblr_client', branch: 'master', ref: 'e046fe6e39291c173add0a49081630c7b60a36c7'
|
||||
gem 'omniauth-tumblr', '~> 1.2'
|
||||
|
||||
# Dropbox Agents
|
||||
|
@ -147,7 +149,7 @@ group :development do
|
|||
end
|
||||
|
||||
group :test do
|
||||
gem 'coveralls', '~> 0.7.4', require: false
|
||||
gem 'coveralls', '~> 0.8.12', require: false
|
||||
gem 'capybara', '~> 2.13.0'
|
||||
gem 'capybara-screenshot'
|
||||
gem 'capybara-select2', require: false
|
||||
|
|
175
Gemfile.lock
175
Gemfile.lock
|
@ -1,3 +1,28 @@
|
|||
GIT
|
||||
remote: https://github.com/albertsun/tumblr_client.git
|
||||
revision: e046fe6e39291c173add0a49081630c7b60a36c7
|
||||
ref: e046fe6e39291c173add0a49081630c7b60a36c7
|
||||
branch: master
|
||||
specs:
|
||||
tumblr_client (0.8.5)
|
||||
faraday (<= 1.0.0)
|
||||
faraday_middleware (<= 1.0.0)
|
||||
json
|
||||
mime-types
|
||||
oauth
|
||||
simple_oauth
|
||||
|
||||
GIT
|
||||
remote: https://github.com/albertsun/weibo_2.git
|
||||
revision: ac38d04434747c4b88e86c5337cd436d00c34349
|
||||
branch: master
|
||||
specs:
|
||||
weibo_2 (0.1.7)
|
||||
hashie (~> 3)
|
||||
multi_json (~> 1)
|
||||
oauth2 (~> 1)
|
||||
rest-client (>= 2.0)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/amatsuda/kaminari.git
|
||||
revision: abbf93d557208ee1d0b612c612cd079f86ed54f4
|
||||
|
@ -35,17 +60,6 @@ GIT
|
|||
activerecord (>= 3.0, < 5.2)
|
||||
delayed_job (>= 3.0, < 5)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/dsander/weibo_2.git
|
||||
revision: e5b77f21a7e9a666b582c48e16b1e96fca198cf8
|
||||
branch: master
|
||||
specs:
|
||||
weibo_2 (0.1.7)
|
||||
hashie (~> 3)
|
||||
multi_json (~> 1)
|
||||
oauth2 (~> 1)
|
||||
rest-client (~> 1.8)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/lostisland/faraday_middleware.git
|
||||
revision: 59088da02940d0ee2010b2e3156343346767c31e
|
||||
|
@ -70,20 +84,6 @@ GIT
|
|||
naught (~> 1.0)
|
||||
simple_oauth (~> 0.3.0)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/tumblr/tumblr_client.git
|
||||
revision: 0c59b04e49f2a8c89860613b18cf4e8f978d8dc7
|
||||
ref: 0c59b04e49f2a8c89860613b18cf4e8f978d8dc7
|
||||
branch: master
|
||||
specs:
|
||||
tumblr_client (0.8.5)
|
||||
faraday (~> 0.9.0)
|
||||
faraday_middleware (~> 0.9)
|
||||
json
|
||||
mime-types
|
||||
oauth
|
||||
simple_oauth
|
||||
|
||||
PATH
|
||||
remote: vendor/gems/dotenv-2.0.1
|
||||
specs:
|
||||
|
@ -135,10 +135,6 @@ GEM
|
|||
addressable (2.5.1)
|
||||
public_suffix (~> 2.0, >= 2.0.2)
|
||||
arel (8.0.0)
|
||||
autoparse (0.3.3)
|
||||
addressable (>= 2.3.1)
|
||||
extlib (>= 0.9.15)
|
||||
multi_json (>= 1.0.0)
|
||||
aws-sdk-core (2.2.15)
|
||||
jmespath (~> 1.0)
|
||||
bcrypt (3.1.11)
|
||||
|
@ -189,16 +185,18 @@ GEM
|
|||
colorize (0.7.7)
|
||||
concurrent-ruby (1.0.5)
|
||||
cookiejar (0.3.2)
|
||||
coveralls (0.7.12)
|
||||
multi_json (~> 1.10)
|
||||
rest-client (>= 1.6.8, < 2)
|
||||
simplecov (~> 0.9.1)
|
||||
coveralls (0.8.21)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov (~> 0.14.1)
|
||||
term-ansicolor (~> 1.3)
|
||||
thor (~> 0.19.1)
|
||||
thor (~> 0.19.4)
|
||||
tins (~> 1.6)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
daemons (1.1.9)
|
||||
debug_inspector (0.0.2)
|
||||
declarative (0.0.9)
|
||||
declarative-option (0.1.0)
|
||||
delorean (2.1.0)
|
||||
chronic
|
||||
devise (4.3.0)
|
||||
|
@ -209,7 +207,7 @@ GEM
|
|||
warden (~> 1.2.3)
|
||||
diff-lcs (1.3)
|
||||
docile (1.1.5)
|
||||
domain_name (0.5.24)
|
||||
domain_name (0.5.20170404)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
dropbox-api (0.4.2)
|
||||
hashie
|
||||
|
@ -239,8 +237,7 @@ GEM
|
|||
evernote-thrift
|
||||
oauth (>= 0.4.1)
|
||||
execjs (2.6.0)
|
||||
extlib (0.9.16)
|
||||
faraday (0.9.2)
|
||||
faraday (0.12.1)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
feedjira (2.1.0)
|
||||
faraday (>= 0.9)
|
||||
|
@ -265,17 +262,29 @@ GEM
|
|||
rails (>= 3.0)
|
||||
globalid (0.4.0)
|
||||
activesupport (>= 4.2.0)
|
||||
google-api-client (0.7.1)
|
||||
addressable (>= 2.3.2)
|
||||
autoparse (>= 0.3.3)
|
||||
extlib (>= 0.9.15)
|
||||
faraday (>= 0.9.0)
|
||||
jwt (>= 0.1.5)
|
||||
launchy (>= 2.1.1)
|
||||
multi_json (>= 1.0.0)
|
||||
retriable (>= 1.4)
|
||||
signet (>= 0.5.0)
|
||||
uuidtools (>= 2.1.0)
|
||||
google-api-client (0.13.0)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
googleauth (~> 0.5)
|
||||
httpclient (>= 2.8.1, < 3.0)
|
||||
mime-types (~> 3.0)
|
||||
representable (~> 3.0)
|
||||
retriable (>= 2.0, < 4.0)
|
||||
google-cloud-core (1.0.0)
|
||||
google-cloud-env (~> 1.0)
|
||||
googleauth (~> 0.5.1)
|
||||
google-cloud-env (1.0.0)
|
||||
faraday (~> 0.11)
|
||||
google-cloud-translate (1.0.0)
|
||||
google-cloud-core (~> 1.0)
|
||||
googleauth (~> 0.5.1)
|
||||
googleauth (0.5.1)
|
||||
faraday (~> 0.9)
|
||||
jwt (~> 1.4)
|
||||
logging (~> 2.0)
|
||||
memoist (~> 0.12)
|
||||
multi_json (~> 1.11)
|
||||
os (~> 0.9)
|
||||
signet (~> 0.7)
|
||||
guard (2.13.0)
|
||||
formatador (>= 0.2.4)
|
||||
listen (>= 2.7, <= 4.0)
|
||||
|
@ -296,7 +305,7 @@ GEM
|
|||
guard-compat (~> 1.1)
|
||||
rspec (>= 2.99.0, < 4.0)
|
||||
hashdiff (0.3.2)
|
||||
hashie (3.4.6)
|
||||
hashie (3.5.5)
|
||||
haversine (0.3.0)
|
||||
hipchat (1.2.0)
|
||||
httparty
|
||||
|
@ -309,12 +318,13 @@ GEM
|
|||
http-cookie (~> 1.0)
|
||||
http-form_data (~> 1.0.1)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
http-cookie (1.0.2)
|
||||
http-cookie (1.0.3)
|
||||
domain_name (~> 0.5)
|
||||
http-form_data (1.0.1)
|
||||
http_parser.rb (0.6.0)
|
||||
httparty (0.14.0)
|
||||
multi_xml (>= 0.5.2)
|
||||
httpclient (2.8.3)
|
||||
huginn_agent (0.4.0)
|
||||
thor
|
||||
hypdf (1.0.10)
|
||||
|
@ -329,7 +339,7 @@ GEM
|
|||
json (1.8.6)
|
||||
jsonpath (0.8.3)
|
||||
multi_json
|
||||
jwt (1.4.1)
|
||||
jwt (1.5.6)
|
||||
kgio (2.10.0)
|
||||
kramdown (1.3.3)
|
||||
launchy (2.4.2)
|
||||
|
@ -345,6 +355,10 @@ GEM
|
|||
listen (3.0.5)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
little-plugger (1.1.4)
|
||||
logging (2.2.2)
|
||||
little-plugger (~> 1.1)
|
||||
multi_json (~> 1.10)
|
||||
loofah (2.0.3)
|
||||
nokogiri (>= 1.5.9)
|
||||
lumberjack (1.0.10)
|
||||
|
@ -352,17 +366,20 @@ GEM
|
|||
systemu (~> 2.6.2)
|
||||
mail (2.6.5)
|
||||
mime-types (>= 1.16, < 4)
|
||||
memoist (0.16.0)
|
||||
memoizable (0.4.2)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
method_source (0.8.2)
|
||||
mime-types (2.99.3)
|
||||
mime-types (3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2016.0521)
|
||||
mimemagic (0.3.1)
|
||||
mini_magick (4.2.3)
|
||||
mini_portile2 (2.1.0)
|
||||
minitest (5.10.2)
|
||||
mqtt (0.3.1)
|
||||
multi_json (1.12.1)
|
||||
multi_xml (0.5.5)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.0.0)
|
||||
mysql2 (0.4.8)
|
||||
naught (1.1.0)
|
||||
|
@ -371,7 +388,7 @@ GEM
|
|||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (3.0.2)
|
||||
netrc (0.10.3)
|
||||
netrc (0.11.0)
|
||||
nio4r (2.0.0)
|
||||
nokogiri (1.7.2)
|
||||
mini_portile2 (~> 2.1.0)
|
||||
|
@ -379,8 +396,8 @@ GEM
|
|||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
oauth (0.4.7)
|
||||
oauth2 (1.2.0)
|
||||
faraday (>= 0.8, < 0.10)
|
||||
oauth2 (1.4.0)
|
||||
faraday (>= 0.8, < 0.13)
|
||||
jwt (~> 1.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
|
@ -413,6 +430,7 @@ GEM
|
|||
omniauth (~> 1.0)
|
||||
omniauth-oauth2 (~> 1.1)
|
||||
orm_adapter (0.5.0)
|
||||
os (0.9.6)
|
||||
pg (0.18.3)
|
||||
poltergeist (1.8.1)
|
||||
capybara (~> 2.1)
|
||||
|
@ -430,7 +448,7 @@ GEM
|
|||
pry-rails (0.3.4)
|
||||
pry (>= 0.9.10)
|
||||
public_suffix (2.0.5)
|
||||
rack (2.0.2)
|
||||
rack (2.0.3)
|
||||
rack-livereload (0.3.16)
|
||||
rack
|
||||
rack-test (0.6.3)
|
||||
|
@ -470,14 +488,18 @@ GEM
|
|||
rb-kqueue (0.2.4)
|
||||
ffi (>= 0.5.0)
|
||||
ref (2.0.0)
|
||||
representable (3.0.4)
|
||||
declarative (< 0.1.0)
|
||||
declarative-option (< 0.2.0)
|
||||
uber (< 0.2.0)
|
||||
responders (2.4.0)
|
||||
actionpack (>= 4.2.0, < 5.3)
|
||||
railties (>= 4.2.0, < 5.3)
|
||||
rest-client (1.8.0)
|
||||
rest-client (2.0.2)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 3.0)
|
||||
netrc (~> 0.7)
|
||||
retriable (2.0.2)
|
||||
mime-types (>= 1.16, < 4.0)
|
||||
netrc (~> 0.8)
|
||||
retriable (3.0.2)
|
||||
rr (1.1.2)
|
||||
rspec (3.5.0)
|
||||
rspec-core (~> 3.5.0)
|
||||
|
@ -527,17 +549,17 @@ GEM
|
|||
shellany (0.0.1)
|
||||
shoulda-matchers (3.0.0)
|
||||
activesupport (>= 4.0.0)
|
||||
signet (0.5.1)
|
||||
addressable (>= 2.2.3)
|
||||
faraday (>= 0.9.0.rc5)
|
||||
jwt (>= 0.1.5)
|
||||
multi_json (>= 1.0.0)
|
||||
signet (0.7.3)
|
||||
addressable (~> 2.3)
|
||||
faraday (~> 0.9)
|
||||
jwt (~> 1.5)
|
||||
multi_json (~> 1.10)
|
||||
simple_oauth (0.3.1)
|
||||
simplecov (0.9.2)
|
||||
simplecov (0.14.1)
|
||||
docile (~> 1.1.0)
|
||||
multi_json (~> 1.0)
|
||||
simplecov-html (~> 0.9.0)
|
||||
simplecov-html (0.9.0)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.1)
|
||||
slack-notifier (1.0.0)
|
||||
slop (3.6.0)
|
||||
spectrum-rails (1.3.4)
|
||||
|
@ -560,7 +582,7 @@ GEM
|
|||
net-scp (>= 1.1.2)
|
||||
net-ssh (>= 2.8.0)
|
||||
systemu (2.6.4)
|
||||
term-ansicolor (1.3.2)
|
||||
term-ansicolor (1.6.0)
|
||||
tins (~> 1.0)
|
||||
therubyracer (0.12.3)
|
||||
libv8 (~> 3.16.14.15)
|
||||
|
@ -568,7 +590,7 @@ GEM
|
|||
thor (0.19.4)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.7)
|
||||
tins (1.10.1)
|
||||
tins (1.15.0)
|
||||
treetop (1.5.3)
|
||||
polyglot (~> 0.3)
|
||||
twilio-ruby (3.11.6)
|
||||
|
@ -579,18 +601,18 @@ GEM
|
|||
ethon (>= 0.7.1)
|
||||
tzinfo (1.2.3)
|
||||
thread_safe (~> 0.1)
|
||||
uber (0.1.0)
|
||||
uglifier (2.7.2)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.3)
|
||||
unf_ext (0.0.7.4)
|
||||
unicorn (5.1.0)
|
||||
kgio (~> 2.6)
|
||||
raindrops (~> 0.7)
|
||||
uuid (2.3.7)
|
||||
macaddr (~> 1.0)
|
||||
uuidtools (2.1.5)
|
||||
vcr (3.0.3)
|
||||
warden (1.2.7)
|
||||
rack (>= 1.0)
|
||||
|
@ -631,7 +653,7 @@ DEPENDENCIES
|
|||
capybara-screenshot
|
||||
capybara-select2
|
||||
coffee-rails (~> 4.2)
|
||||
coveralls (~> 0.7.4)
|
||||
coveralls (~> 0.8.12)
|
||||
daemons (~> 1.1.9)
|
||||
delayed_job!
|
||||
delayed_job_active_record!
|
||||
|
@ -651,7 +673,8 @@ DEPENDENCIES
|
|||
foreman (~> 0.63.0)
|
||||
geokit (~> 1.8.4)
|
||||
geokit-rails (~> 2.2.0)
|
||||
google-api-client (~> 0.7.1)
|
||||
google-api-client (~> 0.13)
|
||||
google-cloud-translate (~> 1.0.0)
|
||||
guard (~> 2.13.0)
|
||||
guard-livereload (~> 2.5.1)
|
||||
guard-rspec (~> 4.6.4)
|
||||
|
|
|
@ -33,6 +33,7 @@ class ApplicationController < ActionController::Base
|
|||
twitter_oauth_check
|
||||
basecamp_auth_check
|
||||
outdated_docker_image_namespace_check
|
||||
outdated_google_auth_check
|
||||
end
|
||||
|
||||
def filtered_agent_return_link(options = {})
|
||||
|
@ -70,6 +71,12 @@ class ApplicationController < ActionController::Base
|
|||
@outdated_docker_image_namespace = ENV['OUTDATED_DOCKER_IMAGE_NAMESPACE'] == 'true'
|
||||
end
|
||||
|
||||
def outdated_google_auth_check
|
||||
@outdated_google_cal_agents = current_user.agents.of_type('Agents::GoogleCalendarPublishAgent').select do |agent|
|
||||
agent.options['google']['key_secret'].present?
|
||||
end
|
||||
end
|
||||
|
||||
def agent_params
|
||||
return {} unless params[:agent]
|
||||
@agent_params ||= begin
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
require 'json'
|
||||
require 'google/apis/calendar_v3'
|
||||
|
||||
module Agents
|
||||
class GoogleCalendarPublishAgent < Agent
|
||||
cannot_be_scheduled!
|
||||
no_bulk_receive!
|
||||
|
||||
gem_dependency_check { defined?(Google) && defined?(Google::APIClient) }
|
||||
gem_dependency_check { defined?(Google) && defined?(Google::Apis::CalendarV3) }
|
||||
|
||||
description <<-MD
|
||||
The Google Calendar Publish Agent creates events on your Google Calendar.
|
||||
|
@ -20,9 +21,23 @@ module Agents
|
|||
2. New project -> Huginn
|
||||
3. APIs & Auth -> Enable google calendar
|
||||
4. Credentials -> Create new Client ID -> Service Account
|
||||
5. Persist the generated private key to a path, ie: `/home/huginn/a822ccdefac89fac6330f95039c492dfa3ce6843.p12`
|
||||
5. Download the JSON keyfile and save it to a path, ie: `/home/huginn/Huginn-5d12345678cd.json`. Or open that file and copy the `private_key`.
|
||||
6. Grant access via google calendar UI to the service account email address for each calendar you wish to manage. For a whole google apps domain, you can [delegate authority](https://developers.google.com/+/domains/authentication/delegation)
|
||||
|
||||
An earlier version of Huginn used PKCS12 key files to authenticate. This will no longer work, you should generate a new JSON format keyfile, that will look something like:
|
||||
<pre><code>{
|
||||
"type": "service_account",
|
||||
"project_id": "huginn-123123",
|
||||
"private_key_id": "6d6b476fc6ccdb31e0f171991e5528bb396ffbe4",
|
||||
"private_key": "-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n",
|
||||
"client_email": "huginn-calendar@huginn-123123.iam.gserviceaccount.com",
|
||||
"client_id": "123123...123123",
|
||||
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
||||
"token_uri": "https://accounts.google.com/o/oauth2/token",
|
||||
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
||||
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/huginn-calendar%40huginn-123123.iam.gserviceaccount.com"
|
||||
}</code></pre>
|
||||
|
||||
|
||||
Agent Configuration:
|
||||
|
||||
|
@ -30,12 +45,9 @@ module Agents
|
|||
|
||||
`google` A hash of configuration options for the agent.
|
||||
|
||||
`google` `service_account_email` - The authorised service account.
|
||||
|
||||
`google` `key_file` OR `google` `key` - The path to the key file or the key itself. [Liquid](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) formatting is supported if you want to use a Credential. (E.g., `{% credential google_key %}`)
|
||||
|
||||
`google` `key_secret` - The secret for the key, typically 'notasecret'
|
||||
`google` `service_account_email` - The authorised service account email address.
|
||||
|
||||
`google` `key_file` OR `google` `key` - The path to the JSON key file above, or the key itself (the value of `private_key`). [Liquid](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) formatting is supported if you want to use a Credential. (E.g., `{% credential google_key %}`)
|
||||
|
||||
Set `expected_update_period_in_days` to the maximum amount of time that you'd expect to pass between Events being created by this Agent.
|
||||
|
||||
|
@ -43,6 +55,8 @@ module Agents
|
|||
|
||||
A hash of event details. See the [Google Calendar API docs](https://developers.google.com/google-apps/calendar/v3/reference/events/insert)
|
||||
|
||||
The prior version Google's API expected keys like `dateTime` but in the latest version they expect snake case keys like `date_time`.
|
||||
|
||||
Example payload for trigger agent:
|
||||
<pre><code>{
|
||||
"message": {
|
||||
|
@ -50,10 +64,10 @@ module Agents
|
|||
"summary": "Awesome event",
|
||||
"description": "An example event with text. Pro tip: DateTimes are in RFC3339",
|
||||
"start": {
|
||||
"dateTime": "2014-10-02T10:00:00-05:00"
|
||||
"date_time": "2017-06-30T17:00:00-05:00"
|
||||
},
|
||||
"end": {
|
||||
"dateTime": "2014-10-02T11:00:00-05:00"
|
||||
"date_time": "2017-06-30T18:00:00-05:00"
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
|
@ -84,7 +98,7 @@ module Agents
|
|||
'calendar_id' => 'you@email.com',
|
||||
'google' => {
|
||||
'key_file' => '/path/to/private.key',
|
||||
'key_secret' => 'notasecret',
|
||||
'key' => '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n',
|
||||
'service_account_email' => ''
|
||||
}
|
||||
}
|
||||
|
@ -93,16 +107,28 @@ module Agents
|
|||
def receive(incoming_events)
|
||||
require 'google_calendar'
|
||||
incoming_events.each do |event|
|
||||
calendar = GoogleCalendar.new(interpolate_options(options, event), Rails.logger)
|
||||
GoogleCalendar.open(interpolate_options(options, event), Rails.logger) do |calendar|
|
||||
|
||||
calendar_event = JSON.parse(calendar.publish_as(interpolated(event)['calendar_id'], event.payload["message"]).response.body)
|
||||
cal_message = event.payload["message"]
|
||||
if cal_message["start"].present? && cal_message["start"]["dateTime"].present? && !cal_message["start"]["date_time"].present?
|
||||
cal_message["start"]["date_time"] = cal_message["start"].delete "dateTime"
|
||||
end
|
||||
if cal_message["end"].present? && cal_message["end"]["dateTime"].present? && !cal_message["end"]["date_time"].present?
|
||||
cal_message["end"]["date_time"] = cal_message["end"].delete "dateTime"
|
||||
end
|
||||
|
||||
create_event :payload => {
|
||||
'success' => true,
|
||||
'published_calendar_event' => calendar_event,
|
||||
'agent_id' => event.agent_id,
|
||||
'event_id' => event.id
|
||||
}
|
||||
calendar_event = calendar.publish_as(
|
||||
interpolated(event)['calendar_id'],
|
||||
cal_message
|
||||
)
|
||||
|
||||
create_event :payload => {
|
||||
'success' => true,
|
||||
'published_calendar_event' => calendar_event,
|
||||
'agent_id' => event.agent_id,
|
||||
'event_id' => event.id
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ module Agents
|
|||
class GoogleTranslationAgent < Agent
|
||||
cannot_be_scheduled!
|
||||
|
||||
gem_dependency_check { defined?(Google) && defined?(Google::APIClient) }
|
||||
gem_dependency_check { defined?(Google) && defined?(Google::Cloud::Translate) }
|
||||
|
||||
description <<-MD
|
||||
The Translation Agent will attempt to translate text between natural languages.
|
||||
|
@ -12,6 +12,8 @@ module Agents
|
|||
Services are provided using Google Translate. You can [sign up](https://cloud.google.com/translate/) to get `google_api_key` which is required to use this agent.
|
||||
The service is **not free**.
|
||||
|
||||
To use credentials for the `google_api_key` use the liquid `credential` tag like so `{% credential google-api-key %}`
|
||||
|
||||
`to` must be filled with a [translator language code](https://cloud.google.com/translate/docs/languages).
|
||||
|
||||
`from` is the language translated from. If it's not specified, the API will attempt to detect the source language automatically and return it within the response.
|
||||
|
@ -56,7 +58,7 @@ module Agents
|
|||
opts = interpolated(event)
|
||||
opts['content'].each_pair do |key, value|
|
||||
result = translate(value)
|
||||
translated_event[key] = result.data.translations.last.translated_text
|
||||
translated_event[key] = result.text
|
||||
end
|
||||
create_event payload: translated_event
|
||||
end
|
||||
|
@ -77,16 +79,22 @@ module Agents
|
|||
@translate_service ||= google_client.discovered_api('translate','v2')
|
||||
end
|
||||
|
||||
def cloud_translate_service
|
||||
# https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-translate/lib/google-cloud-translate.rb#L130
|
||||
@google_client ||= Google::Cloud::Translate.new(key: interpolated['google_api_key'])
|
||||
end
|
||||
|
||||
def translate(value)
|
||||
google_client.execute(
|
||||
api_method: translate_service.translations.list,
|
||||
parameters: {
|
||||
format: 'text',
|
||||
source: translate_from,
|
||||
target: options["to"],
|
||||
q: value
|
||||
}
|
||||
)
|
||||
# google_client.execute(
|
||||
# api_method: translate_service.translations.list,
|
||||
# parameters: {
|
||||
# format: 'text',
|
||||
# source: translate_from,
|
||||
# target: options["to"],
|
||||
# q: value
|
||||
# }
|
||||
# )
|
||||
cloud_translate_service.translate(value, to: interpolated["to"], from: translate_from, format: "text")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,6 +24,27 @@ TWITTER_OAUTH_SECRET=<%= @twitter_oauth_secret %>
|
|||
<% end %>
|
||||
</div>
|
||||
<% end -%>
|
||||
<% if @outdated_google_cal_agents && @outdated_google_cal_agents.length > 0 %>
|
||||
<dir class="container">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<p>
|
||||
<b>Warning!</b> Your <b>Google Calendar Publish Agents</b> are using an outdated version of Google Auth. You need to update the agent configuration, possibly with a new keyfile from Google for it to continue to work.
|
||||
<br/>
|
||||
PKCS12 key files (`.p12`) are no longer supported. Instead use RSA private keys. Edit the agents to see the updated instructions. The `google.key_secret` option is no longer needed, please remove it.
|
||||
<br/>
|
||||
The format of parameters in events passed to the agent have also changed. Parameters now are expected in underscore_case instead of camelCase (to match Ruby convention). Please update upstream agents that send events to the calendar agent.
|
||||
</p>
|
||||
<p>
|
||||
Outdated agents:
|
||||
<ul>
|
||||
<% @outdated_google_cal_agents.each do |agent| -%>
|
||||
<li><%= link_to(agent.name, edit_agent_path(agent)) %></li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</dir>
|
||||
<% end -%>
|
||||
<% if @outdated_docker_image_namespace %>
|
||||
<dir class="container">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
|
|
|
@ -1,33 +1,44 @@
|
|||
require 'googleauth'
|
||||
require 'google/apis/calendar_v3'
|
||||
|
||||
class GoogleCalendar
|
||||
def initialize(config, logger)
|
||||
@config = config
|
||||
|
||||
if @config['google']['key'].present?
|
||||
@key = OpenSSL::PKCS12.new(@config['google']['key'], @config['google']['key_secret']).key
|
||||
else
|
||||
@key = Google::APIClient::PKCS12.load_key(@config['google']['key_file'], @config['google']['key_secret'])
|
||||
# https://github.com/google/google-auth-library-ruby/issues/65
|
||||
# https://github.com/google/google-api-ruby-client/issues/370
|
||||
ENV['GOOGLE_PRIVATE_KEY'] = @config['google']['key']
|
||||
ENV['GOOGLE_CLIENT_EMAIL'] = @config['google']['service_account_email']
|
||||
ENV['GOOGLE_ACCOUNT_TYPE'] = 'service_account'
|
||||
elsif @config['google']['key_file'].present?
|
||||
ENV['GOOGLE_APPLICATION_CREDENTIALS'] = @config['google']['key_file']
|
||||
end
|
||||
|
||||
@client = Google::APIClient.new(application_name: "Huginn", application_version: "0.0.1")
|
||||
@client.retries = 2
|
||||
@logger ||= logger
|
||||
|
||||
@calendar = @client.discovered_api('calendar','v3')
|
||||
# https://github.com/google/google-api-ruby-client/blob/master/MIGRATING.md
|
||||
@calendar = Google::Apis::CalendarV3::CalendarService.new
|
||||
|
||||
# https://developers.google.com/api-client-library/ruby/auth/service-accounts
|
||||
# https://developers.google.com/identity/protocols/application-default-credentials
|
||||
scopes = [Google::Apis::CalendarV3::AUTH_CALENDAR]
|
||||
@authorization = Google::Auth.get_application_default(scopes)
|
||||
|
||||
@logger.info("Setup")
|
||||
@logger.debug @calendar.inspect
|
||||
end
|
||||
|
||||
def auth_as
|
||||
@client.authorization = Signet::OAuth2::Client.new({
|
||||
token_credential_uri: 'https://accounts.google.com/o/oauth2/token',
|
||||
audience: 'https://accounts.google.com/o/oauth2/token',
|
||||
scope: 'https://www.googleapis.com/auth/calendar',
|
||||
issuer: @config['google']['service_account_email'],
|
||||
signing_key: @key
|
||||
});
|
||||
def self.open(*args, &block)
|
||||
instance = new(*args)
|
||||
block.call(instance)
|
||||
ensure
|
||||
instance.cleanup!
|
||||
end
|
||||
|
||||
@client.authorization.fetch_access_token!
|
||||
def auth_as
|
||||
@authorization.fetch_access_token!
|
||||
@calendar.authorization = @authorization
|
||||
end
|
||||
|
||||
# who - String: email of user to add event
|
||||
|
@ -38,14 +49,15 @@ class GoogleCalendar
|
|||
@logger.info("Attempting to create event for " + who)
|
||||
@logger.debug details.to_yaml
|
||||
|
||||
ret = @client.execute(
|
||||
api_method: @calendar.events.insert,
|
||||
parameters: {'calendarId' => who, 'sendNotifications' => true},
|
||||
body: details.to_json,
|
||||
headers: {'Content-Type' => 'application/json'}
|
||||
)
|
||||
event = Google::Apis::CalendarV3::Event.new(details.deep_symbolize_keys)
|
||||
ret = @calendar.insert_event(
|
||||
who,
|
||||
event,
|
||||
send_notifications: true
|
||||
)
|
||||
|
||||
@logger.debug ret.to_yaml
|
||||
ret
|
||||
ret.to_h
|
||||
end
|
||||
|
||||
def events_as(who, date)
|
||||
|
@ -56,14 +68,18 @@ class GoogleCalendar
|
|||
@logger.info("Attempting to receive events for "+who)
|
||||
@logger.debug details.to_yaml
|
||||
|
||||
ret = @client.execute(
|
||||
api_method: @calendar.events.list,
|
||||
parameters: {'calendarId' => who, 'sendNotifications' => true},
|
||||
body: details.to_json,
|
||||
headers: {'Content-Type' => 'application/json'}
|
||||
)
|
||||
ret = @calendar.list_events(
|
||||
who
|
||||
)
|
||||
|
||||
@logger.debug ret.to_yaml
|
||||
ret
|
||||
ret.to_h
|
||||
end
|
||||
|
||||
def cleanup!
|
||||
ENV.delete('GOOGLE_PRIVATE_KEY')
|
||||
ENV.delete('GOOGLE_CLIENT_EMAIL')
|
||||
ENV.delete('GOOGLE_ACCOUNT_TYPE')
|
||||
ENV.delete('GOOGLE_APPLICATION_CREDENTIALS')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,435 +0,0 @@
|
|||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: get
|
||||
uri: https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ''
|
||||
headers:
|
||||
User-Agent:
|
||||
- |-
|
||||
Huginn/0.0.1 google-api-ruby-client/0.7.1 Linux/3.13.0-29-generic
|
||||
(gzip)
|
||||
Accept-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- ''
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Expires:
|
||||
- Sat, 28 Jun 2014 17:21:12 GMT
|
||||
Date:
|
||||
- Sat, 28 Jun 2014 17:16:12 GMT
|
||||
Etag:
|
||||
- '"C11OM5Qtr9122-scy_WeqND9D3o/icy_kevyvyjgCKjN6s1gb_9TUZs"'
|
||||
Content-Type:
|
||||
- application/json; charset=UTF-8
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
Content-Length:
|
||||
- '11266'
|
||||
Server:
|
||||
- GSE
|
||||
Age:
|
||||
- '195'
|
||||
Cache-Control:
|
||||
- public, max-age=300, must-revalidate, no-transform
|
||||
Alternate-Protocol:
|
||||
- 443:quic
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: !binary |-
|
||||
H4sIAAAAAAAAAO19a3PbRrbgd/+KLs1W2a6lKD8yU5Ns7QdFljOqtROvHpO7
|
||||
cz01BQItEmMQQNCgKE4q/33POf1AA2iAAEjRUoJbtyYy0Y/T3afP+5z+9Rk7
|
||||
+hLGwdF37CgIhZ/c8Wzzp4yL/B0XfhameZjERxNoxXNvjq0+H529fv3Txz//
|
||||
3zz79vWbN8fC3/zrZ/7Lj+++ffc2OQnhX1/43eZu8+/52f/5949/Ea/ns399
|
||||
e33zD/H5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WbpMNBcxDnrIE9TZ8Km
|
||||
ga9RtWY0vCp1eUzYpxzX7UX8DFY5y/jV0GoHZAKWaJ+oMN5fXAt6FH2ym2Gb
|
||||
bTj2AA4jxdEHeYxeo/dHSeo9XEZFn0O5jJ6Aw2A0TWjTxOd4VIOHqME9RIgr
|
||||
TdUeE/HuLD12C0wyBN4dmlQXHPYajqR3uHtA0kjbR9o+0vaRtnej7aO1YYC1
|
||||
4Rn8/2/P/j8y14+toGwBAA==
|
||||
http_version:
|
||||
recorded_at: Sat, 28 Jun 2014 17:19:27 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://accounts.google.com/o/oauth2/token
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiIxMDI5OTM2OTY2MzI2LW5jamQ3Nzc2cGNzcGM5OGhzZzgyZ3NiNTZ0MzIxN2VmQGRldmVsb3Blci5nc2VydmljZWFjY291bnQuY29tIiwic2NvcGUiOiJodHRwczovL3d3dy5nb29nbGVhcGlzLmNvbS9hdXRoL2NhbGVuZGFyIiwiYXVkIjoiaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tL28vb2F1dGgyL3Rva2VuIiwiZXhwIjoxNDAzOTc2MDI3LCJpYXQiOjE0MDM5NzU5MDd9.G2t_IqQofzzXKJAySGu4MulAybOp3BjptAk_tra7-ALy2pWu0jKw8XblP4T0YPgyMcbhcSJ_OhYl7Inmkxc3xhWsN-ZQDtacIyLv9roIRbvm5zCFKceJRISu2nZuIUTGTeoVuotPh6KRRvXIk1RW_Rc7L0eLeGTWn1USqdNwlfU
|
||||
headers:
|
||||
Cache-Control:
|
||||
- no-store
|
||||
Content-Type:
|
||||
- application/x-www-form-urlencoded
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
User-Agent:
|
||||
- Ruby
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Cache-Control:
|
||||
- no-cache, no-store, max-age=0, must-revalidate
|
||||
Pragma:
|
||||
- no-cache
|
||||
Expires:
|
||||
- Fri, 01 Jan 1990 00:00:00 GMT
|
||||
Date:
|
||||
- Sat, 28 Jun 2014 17:19:28 GMT
|
||||
Content-Disposition:
|
||||
- attachment; filename="json.txt"; filename*=UTF-8''json.txt
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
Server:
|
||||
- GSE
|
||||
Alternate-Protocol:
|
||||
- 443:quic
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: |-
|
||||
{
|
||||
"access_token" : "ya29.MgBhhNLHjzGOZBoAAADoyvaDO5G6GHmaxIYqa5EGZ5t8kL-unXKywIRYoYgQxw",
|
||||
"token_type" : "Bearer",
|
||||
"expires_in" : 3600
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Sat, 28 Jun 2014 17:19:28 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://www.googleapis.com/calendar/v3/calendars/sqv39gj35tc837gdns1g4d81cg@group.calendar.google.com/events?sendNotifications=true
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: '{"visibility":"default","summary":"Awesome event","description":"An
|
||||
example event with text. Pro tip: DateTimes are in RFC3339","end":{"dateTime":"2014-10-02T11:00:00-05:00"},"start":{"dateTime":"2014-10-02T10:00:00-05:00"}}'
|
||||
headers:
|
||||
User-Agent:
|
||||
- |-
|
||||
Huginn/0.0.1 google-api-ruby-client/0.7.1 Linux/3.13.0-29-generic
|
||||
(gzip)
|
||||
Content-Type:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip
|
||||
Authorization:
|
||||
- Bearer ya29.MgBhhNLHjzGOZBoAAADoyvaDO5G6GHmaxIYqa5EGZ5t8kL-unXKywIRYoYgQxw
|
||||
Cache-Control:
|
||||
- no-store
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Cache-Control:
|
||||
- no-cache, no-store, max-age=0, must-revalidate
|
||||
Pragma:
|
||||
- no-cache
|
||||
Expires:
|
||||
- Fri, 01 Jan 1990 00:00:00 GMT
|
||||
Date:
|
||||
- Sat, 28 Jun 2014 17:19:31 GMT
|
||||
Etag:
|
||||
- '"BZUCgRsJHN1b3Y4VmmLXiJzEzGI/MjgwNzk1MTk0MTk3MjAwMA"'
|
||||
Content-Type:
|
||||
- application/json; charset=UTF-8
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
Server:
|
||||
- GSE
|
||||
Alternate-Protocol:
|
||||
- 443:quic
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: !binary |-
|
||||
H4sIAAAAAAAAAH1T0U7bMBR971dY3ePW1IlLmlSaRkdXRkWqCZUxKl6Mfeu6
|
||||
iZ1gOw0E8e9LAh2btvFgKc49Pufce+zHHuqnUvP+BPUZzUBzat7BHrTrf2hK
|
||||
4KhoSzf9z+vLE3FhF1+X/i25Hn1X6vyHXNRf6tOzYbIT1bJO/WSV4maRZDet
|
||||
kulNv6OQHbfd850RocF7mpa3dp9FjJfW5zLtQNZRV9rORK430ijg3f+tU9m5
|
||||
1Glb2TpX2MlwWFWVJ/JcZOCxXA0Proed608g+UdG1inVC73UZxVXc8OvFjVX
|
||||
1eg6uPBZPU/plRWMzIOkzjTdJT4/TUZJzfX69KhOrhhez8T9dcCn66ozwQxQ
|
||||
B10bAfZHAxwOgmjljyd+PAliD2O87nBlwf+LI9iLo/AZZ0ulqHlocdMKbK4A
|
||||
vU6cg2VGFk7mugNoBPdUFdkLBlXSbZGDe+ehbyZHThYTNGtkV1KBRdQAkhpd
|
||||
zE8IIfGr+9w0ZI891CSqqMxaZh8HcUzCOAxJEA402/HxeBwWzBYsjrZWRIGw
|
||||
t0ehI4E/hs0xb+SzvADjCQtmLxlQxvJSuzaEfg89tVq5EVTLGv5Ws3d7Eosd
|
||||
OXIsImPBtfXFiEc+E8fC5GXhHWL8LdrWfjMQaYuMPiypgpboaymk1ug8Z7Sd
|
||||
UfMhnnEWsk0DcKaEFzfNpTLu4IS/zOhXOj4eYLLCuIlmgvF73GZ06AO6B/Hm
|
||||
Of9f5+QJzS7PZm9f+OM/O2yM35WgWauA270B1TxIMPZgobQwgw0tM/faX++p
|
||||
9xPxx2cruwMAAA==
|
||||
http_version:
|
||||
recorded_at: Sat, 28 Jun 2014 17:19:31 GMT
|
||||
recorded_with: VCR 2.9.2
|
|
@ -1,20 +1,22 @@
|
|||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: get
|
||||
uri: https://www.googleapis.com/discovery/v1/apis/translate/v2/rest?key=some_api_key
|
||||
method: post
|
||||
uri: https://translation.googleapis.com/language/translate/v2?key=some_api_key
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ''
|
||||
string: '{"q":["hey what are you doing"],"target":"sv","source":"en","format":"text"}'
|
||||
headers:
|
||||
User-Agent:
|
||||
- |-
|
||||
Huginn/0.0.1 google-api-ruby-client/0.7.1 Mac OS X/10.11.6
|
||||
(gzip)
|
||||
Accept-Encoding:
|
||||
- gzip
|
||||
- gcloud-ruby/1.0.0
|
||||
Google-Cloud-Resource-Prefix:
|
||||
- projects/
|
||||
Content-Type:
|
||||
- ''
|
||||
- application/json
|
||||
X-Goog-Api-Client:
|
||||
- gl-ruby/2.3.4 gccl/1.0.0
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
|
@ -22,154 +24,53 @@ http_interactions:
|
|||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Expires:
|
||||
- Tue, 25 Apr 2017 10:49:56 GMT
|
||||
Date:
|
||||
- Tue, 25 Apr 2017 10:44:56 GMT
|
||||
Etag:
|
||||
- '"YWOzh2SDasdU84ArJnpYek-OMdg/6s__cFeA5l1i01rONlu3TmUQEHs"'
|
||||
Vary:
|
||||
- Origin
|
||||
- X-Origin
|
||||
Content-Type:
|
||||
- application/json; charset=UTF-8
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
Content-Length:
|
||||
- '1870'
|
||||
Server:
|
||||
- GSE
|
||||
Cache-Control:
|
||||
- public, max-age=300, must-revalidate, no-transform
|
||||
Age:
|
||||
- '0'
|
||||
Alt-Svc:
|
||||
- quic=":443"; ma=2592000; v="37,36,35"
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: !binary |-
|
||||
H4sIAAAAAAAAAK1YUXPbNgx+z6/geXtM5MTtsl3fck23Zpc2WeOs11t7OVqi
|
||||
bTaUqJCUHbeX/z6ApCjJlhzL7UsbkyAAAh8+gPp+QAb3PEsGr8gg4TqWC6ZW
|
||||
vyimzTnTseK54TIbHIIUM3SGUp8Hnz5efZuPbs6pTm7/eHmm/s7yT+z+6Opd
|
||||
Mhue6ru7+E929ps44ccn6uq9KF6M09t/3rzVnwdWT7DyL1MalYPOxYnd4tYN
|
||||
o2imBTXs1WJklzOassaGXV3Ujjs5xRa8XBodn5wen45+txuGG2E1jEsN5Oz6
|
||||
wnlTu2VdQBPDHg2ZKpkSmTEiaDYr6IwRIwnNpJkzFVkFcpkxdS5Tyq2CmZQz
|
||||
waJYptXue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al02fjVRUAmAKD5Q/vzRP
|
||||
tn71tLs3vpm5Bw/P8sIOt1ANb8fvLuv6uyVzQbkbJgp4e/sotHiyQwh/nPTb
|
||||
k/rzeD+42hxsevu7Pm60p30HP36ADsebjxHIJwSxYkIb1or8qhlnl/D+lO65
|
||||
ftEe3bRzPG9nVZiwDp4O/gfEQdY3CBwAAA==
|
||||
http_version:
|
||||
recorded_at: Tue, 25 Apr 2017 10:44:56 GMT
|
||||
- request:
|
||||
method: get
|
||||
uri: https://www.googleapis.com/language/translate/v2?format=text&key=some_api_key&q=hey%20what%20are%20you%20doing&source=en&target=sv
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ''
|
||||
headers:
|
||||
User-Agent:
|
||||
- |-
|
||||
Huginn/0.0.1 google-api-ruby-client/0.7.1 Mac OS X/10.11.6
|
||||
(gzip)
|
||||
Accept-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- ''
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Expires:
|
||||
- Tue, 25 Apr 2017 10:44:56 GMT
|
||||
Date:
|
||||
- Tue, 25 Apr 2017 10:44:56 GMT
|
||||
Cache-Control:
|
||||
- private, max-age=0, must-revalidate, no-transform
|
||||
Etag:
|
||||
- '"0Etagq2wejMpn1NuD3Ltqh3qHnw/XGWNxMh7tDHIjrW_w-Ffgk19QCg"'
|
||||
Vary:
|
||||
- Origin
|
||||
- Referer
|
||||
- X-Origin
|
||||
Content-Type:
|
||||
- application/json; charset=UTF-8
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
Date:
|
||||
- Fri, 30 Jun 2017 14:54:18 GMT
|
||||
Server:
|
||||
- ESF
|
||||
Cache-Control:
|
||||
- private
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
Server:
|
||||
- GSE
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
Alt-Svc:
|
||||
- quic=":443"; ma=2592000; v="37,36,35"
|
||||
- quic=":443"; ma=2592000; v="39,38,37,36,35"
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: !binary |-
|
||||
H4sIAAAAAAAAAKvmUlBKSSxJVLJSqOZSUFAqKUrMK85JLMnMzysGikUDxcAS
|
||||
SFKpKSGpFSVASSWP1CyFssQUhfTD24oUUkqVQOpqgUQsF5Cq5QIA9kBPzVwA
|
||||
AAA=
|
||||
http_version:
|
||||
recorded_at: Tue, 25 Apr 2017 10:44:56 GMT
|
||||
ewogICJkYXRhIjogewogICAgInRyYW5zbGF0aW9ucyI6IFsKICAgICAgewog
|
||||
ICAgICAgICJ0cmFuc2xhdGVkVGV4dCI6ICJIZWogdmFkIGfDtnIgZHUiCiAg
|
||||
ICAgIH0KICAgIF0KICB9Cn0K
|
||||
http_version:
|
||||
recorded_at: Fri, 30 Jun 2017 14:54:18 GMT
|
||||
- request:
|
||||
method: get
|
||||
uri: https://www.googleapis.com/language/translate/v2?format=text&key=some_api_key&q=do%20tell%20more&source=en&target=sv
|
||||
method: post
|
||||
uri: https://translation.googleapis.com/language/translate/v2?key=some_api_key
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ''
|
||||
string: '{"q":["do tell more"],"target":"sv","source":"en","format":"text"}'
|
||||
headers:
|
||||
User-Agent:
|
||||
- |-
|
||||
Huginn/0.0.1 google-api-ruby-client/0.7.1 Mac OS X/10.11.6
|
||||
(gzip)
|
||||
Accept-Encoding:
|
||||
- gzip
|
||||
- gcloud-ruby/1.0.0
|
||||
Google-Cloud-Resource-Prefix:
|
||||
- projects/
|
||||
Content-Type:
|
||||
- ''
|
||||
- application/json
|
||||
X-Goog-Api-Client:
|
||||
- gl-ruby/2.3.4 gccl/1.0.0
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
|
@ -177,55 +78,53 @@ http_interactions:
|
|||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Expires:
|
||||
- Tue, 25 Apr 2017 10:44:56 GMT
|
||||
Date:
|
||||
- Tue, 25 Apr 2017 10:44:56 GMT
|
||||
Cache-Control:
|
||||
- private, max-age=0, must-revalidate, no-transform
|
||||
Etag:
|
||||
- '"0Etagq2wejMpn1NuD3Ltqh3qHnw/ojPXc7YpC7RgGxSvk9qvHc7p0bM"'
|
||||
Vary:
|
||||
- Origin
|
||||
- X-Origin
|
||||
Content-Type:
|
||||
- application/json; charset=UTF-8
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
Vary:
|
||||
- Origin
|
||||
- Referer
|
||||
- X-Origin
|
||||
Date:
|
||||
- Fri, 30 Jun 2017 14:54:19 GMT
|
||||
Server:
|
||||
- ESF
|
||||
Cache-Control:
|
||||
- private
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
Server:
|
||||
- GSE
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
Alt-Svc:
|
||||
- quic=":443"; ma=2592000; v="37,36,35"
|
||||
- quic=":443"; ma=2592000; v="39,38,37,36,35"
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: !binary |-
|
||||
H4sIAAAAAAAAAKvmUlBKSSxJVLJSqOZSUFAqKUrMK85JLMnMzysGikUDxcAS
|
||||
SFKpKSGpFSVASaWk1KLDS0pKEhVyU4uUQIpqgUQsF5Cq5QIAoYw0jVkAAAA=
|
||||
http_version:
|
||||
recorded_at: Tue, 25 Apr 2017 10:44:56 GMT
|
||||
ewogICJkYXRhIjogewogICAgInRyYW5zbGF0aW9ucyI6IFsKICAgICAgewog
|
||||
ICAgICAgICJ0cmFuc2xhdGVkVGV4dCI6ICJCZXLDpHR0YSBtZXIiCiAgICAg
|
||||
IH0KICAgIF0KICB9Cn0K
|
||||
http_version:
|
||||
recorded_at: Fri, 30 Jun 2017 14:54:19 GMT
|
||||
- request:
|
||||
method: get
|
||||
uri: https://www.googleapis.com/language/translate/v2?format=text&key=some_api_key&q=value2&source=en&target=sv
|
||||
method: post
|
||||
uri: https://translation.googleapis.com/language/translate/v2?key=some_api_key
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ''
|
||||
string: '{"q":["value2"],"target":"sv","source":"en","format":"text"}'
|
||||
headers:
|
||||
User-Agent:
|
||||
- |-
|
||||
Huginn/0.0.1 google-api-ruby-client/0.7.1 Mac OS X/10.11.6
|
||||
(gzip)
|
||||
Accept-Encoding:
|
||||
- gzip
|
||||
- gcloud-ruby/1.0.0
|
||||
Google-Cloud-Resource-Prefix:
|
||||
- projects/
|
||||
Content-Type:
|
||||
- ''
|
||||
- application/json
|
||||
X-Goog-Api-Client:
|
||||
- gl-ruby/2.3.4 gccl/1.0.0
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
|
@ -233,55 +132,53 @@ http_interactions:
|
|||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Expires:
|
||||
- Tue, 25 Apr 2017 10:44:56 GMT
|
||||
Date:
|
||||
- Tue, 25 Apr 2017 10:44:56 GMT
|
||||
Cache-Control:
|
||||
- private, max-age=0, must-revalidate, no-transform
|
||||
Etag:
|
||||
- '"0Etagq2wejMpn1NuD3Ltqh3qHnw/2iNW9phusbWGkf6jtxwOLwZpsUA"'
|
||||
Vary:
|
||||
- Origin
|
||||
- X-Origin
|
||||
Content-Type:
|
||||
- application/json; charset=UTF-8
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
Vary:
|
||||
- Origin
|
||||
- Referer
|
||||
- X-Origin
|
||||
Date:
|
||||
- Fri, 30 Jun 2017 14:54:19 GMT
|
||||
Server:
|
||||
- ESF
|
||||
Cache-Control:
|
||||
- private
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
Server:
|
||||
- GSE
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
Alt-Svc:
|
||||
- quic=":443"; ma=2592000; v="37,36,35"
|
||||
- quic=":443"; ma=2592000; v="39,38,37,36,35"
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: !binary |-
|
||||
H4sIAAAAAAAAAKvmUlBKSSxJVLJSqOZSUFAqKUrMK85JLMnMzysGikUDxcAS
|
||||
SFKpKSGpFSVASaWyw0uKUlKNlEDytUAilgtI1XIBACGegeVUAAAA
|
||||
http_version:
|
||||
recorded_at: Tue, 25 Apr 2017 10:44:56 GMT
|
||||
ewogICJkYXRhIjogewogICAgInRyYW5zbGF0aW9ucyI6IFsKICAgICAgewog
|
||||
ICAgICAgICJ0cmFuc2xhdGVkVGV4dCI6ICJ2w6RyZGUyIgogICAgICB9CiAg
|
||||
ICBdCiAgfQp9Cg==
|
||||
http_version:
|
||||
recorded_at: Fri, 30 Jun 2017 14:54:19 GMT
|
||||
- request:
|
||||
method: get
|
||||
uri: https://www.googleapis.com/language/translate/v2?format=text&key=some_api_key&q=value1&source=en&target=sv
|
||||
method: post
|
||||
uri: https://translation.googleapis.com/language/translate/v2?key=some_api_key
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: ''
|
||||
string: '{"q":["value1"],"target":"sv","source":"en","format":"text"}'
|
||||
headers:
|
||||
User-Agent:
|
||||
- |-
|
||||
Huginn/0.0.1 google-api-ruby-client/0.7.1 Mac OS X/10.11.6
|
||||
(gzip)
|
||||
Accept-Encoding:
|
||||
- gzip
|
||||
- gcloud-ruby/1.0.0
|
||||
Google-Cloud-Resource-Prefix:
|
||||
- projects/
|
||||
Content-Type:
|
||||
- ''
|
||||
- application/json
|
||||
X-Goog-Api-Client:
|
||||
- gl-ruby/2.3.4 gccl/1.0.0
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
|
@ -289,38 +186,40 @@ http_interactions:
|
|||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Expires:
|
||||
- Tue, 25 Apr 2017 10:44:56 GMT
|
||||
Date:
|
||||
- Tue, 25 Apr 2017 10:44:56 GMT
|
||||
Cache-Control:
|
||||
- private, max-age=0, must-revalidate, no-transform
|
||||
Etag:
|
||||
- '"0Etagq2wejMpn1NuD3Ltqh3qHnw/nFM5Az6_LFcl8SfedeFzG_gVr5Y"'
|
||||
Vary:
|
||||
- Origin
|
||||
- X-Origin
|
||||
Content-Type:
|
||||
- application/json; charset=UTF-8
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
Vary:
|
||||
- Origin
|
||||
- Referer
|
||||
- X-Origin
|
||||
Date:
|
||||
- Fri, 30 Jun 2017 14:54:19 GMT
|
||||
Server:
|
||||
- ESF
|
||||
Cache-Control:
|
||||
- private
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
Server:
|
||||
- GSE
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
Alt-Svc:
|
||||
- quic=":443"; ma=2592000; v="37,36,35"
|
||||
- quic=":443"; ma=2592000; v="39,38,37,36,35"
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
body:
|
||||
encoding: ASCII-8BIT
|
||||
string: !binary |-
|
||||
H4sIAAAAAAAAAKvmUlBKSSxJVLJSqOZSUFAqKUrMK85JLMnMzysGikUDxcAS
|
||||
SFKpKSGpFSVASaWyxJzSVEMlkHQtkIjlAlK1XAC9QY+aUwAAAA==
|
||||
http_version:
|
||||
recorded_at: Tue, 25 Apr 2017 10:44:56 GMT
|
||||
recorded_with: VCR 2.9.2
|
||||
string: |
|
||||
{
|
||||
"data": {
|
||||
"translations": [
|
||||
{
|
||||
"translatedText": "value1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
http_version:
|
||||
recorded_at: Fri, 30 Jun 2017 14:54:19 GMT
|
||||
recorded_with: VCR 3.0.3
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe Agents::GoogleCalendarPublishAgent, :vcr do
|
||||
describe Agents::GoogleCalendarPublishAgent do
|
||||
let(:valid_params) do
|
||||
{
|
||||
'expected_update_period_in_days' => "10",
|
||||
|
@ -21,6 +21,20 @@ describe Agents::GoogleCalendarPublishAgent, :vcr do
|
|||
end
|
||||
|
||||
describe '#receive' do
|
||||
let(:message) do
|
||||
{
|
||||
'visibility' => 'default',
|
||||
'summary' => "Awesome event",
|
||||
'description' => "An example event with text. Pro tip: DateTimes are in RFC3339",
|
||||
'end' => {
|
||||
'date_time' => '2014-10-02T11:00:00-05:00'
|
||||
},
|
||||
'start' => {
|
||||
'date_time' => '2014-10-02T10:00:00-05:00'
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
let(:event) do
|
||||
_event = Event.new
|
||||
_event.agent = agents(:bob_manual_event_agent)
|
||||
|
@ -30,25 +44,13 @@ describe Agents::GoogleCalendarPublishAgent, :vcr do
|
|||
end
|
||||
|
||||
let(:calendar_id) { 'sqv39gj35tc837gdns1g4d81cg@group.calendar.google.com' }
|
||||
let(:message) do
|
||||
{
|
||||
'visibility' => 'default',
|
||||
'summary' => "Awesome event",
|
||||
'description' => "An example event with text. Pro tip: DateTimes are in RFC3339",
|
||||
'end' => {
|
||||
'dateTime' => '2014-10-02T11:00:00-05:00'
|
||||
},
|
||||
'start' => {
|
||||
'dateTime' => '2014-10-02T10:00:00-05:00'
|
||||
}
|
||||
}
|
||||
end
|
||||
let(:response_body) do
|
||||
|
||||
let(:response_hash) do
|
||||
{"kind"=>"calendar#event",
|
||||
"etag"=>"\"2908684044040000\"",
|
||||
"id"=>"baz",
|
||||
"status"=>"confirmed",
|
||||
"htmlLink"=>
|
||||
"html_link"=>
|
||||
"https://calendar.google.com/calendar/event?eid=foobar",
|
||||
"created"=>"2016-02-01T15:53:41.000Z",
|
||||
"updated"=>"2016-02-01T15:53:42.020Z",
|
||||
|
@ -60,20 +62,21 @@ describe Agents::GoogleCalendarPublishAgent, :vcr do
|
|||
"blah-foobar@developer.gserviceaccount.com"},
|
||||
"organizer"=>
|
||||
{"email"=>calendar_id,
|
||||
"displayName"=>"Huginn Location Log",
|
||||
"display_name"=>"Huginn Location Log",
|
||||
"self"=>true},
|
||||
"start"=>{"dateTime"=>"2014-10-03T00:30:00+09:30"},
|
||||
"end"=>{"dateTime"=>"2014-10-03T01:30:00+09:30"},
|
||||
"iCalUID"=>"blah@google.com",
|
||||
"start"=>{"date_time"=>"2014-10-03T00:30:00+09:30"},
|
||||
"end"=>{"date_time"=>"2014-10-03T01:30:00+09:30"},
|
||||
"i_cal_uid"=>"blah@google.com",
|
||||
"sequence"=>0,
|
||||
"reminders"=>{"useDefault"=>true}
|
||||
}.to_json
|
||||
"reminders"=>{"use_default"=>true}
|
||||
}
|
||||
end
|
||||
|
||||
def setup_mock!
|
||||
fake_interface = Object.new
|
||||
mock(GoogleCalendar).new(agent.interpolate_options(agent.options), Rails.logger) { fake_interface }
|
||||
mock(fake_interface).publish_as(calendar_id, message) { stub!.response.stub!.body { response_body } }
|
||||
mock(fake_interface).publish_as(calendar_id, message) { response_hash }
|
||||
mock(fake_interface).cleanup!
|
||||
end
|
||||
|
||||
describe 'when the calendar_id is in the options' do
|
||||
|
@ -84,7 +87,7 @@ describe Agents::GoogleCalendarPublishAgent, :vcr do
|
|||
agent.receive([event])
|
||||
}.to change { agent.events.count }.by(1)
|
||||
|
||||
expect(agent.events.last.payload).to eq({ "success" => true, "published_calendar_event" => JSON.parse(response_body), "agent_id" => event.agent_id, "event_id" => event.id })
|
||||
expect(agent.events.last.payload).to eq({ "success" => true, "published_calendar_event" => response_hash, "agent_id" => event.agent_id, "event_id" => event.id })
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -101,7 +104,7 @@ describe Agents::GoogleCalendarPublishAgent, :vcr do
|
|||
agent.receive([event])
|
||||
|
||||
expect(agent.events.count).to eq(1)
|
||||
expect(agent.events.last.payload).to eq({ "success" => true, "published_calendar_event" => JSON.parse(response_body), "agent_id" => event.agent_id, "event_id" => event.id })
|
||||
expect(agent.events.last.payload).to eq({ "success" => true, "published_calendar_event" => response_hash, "agent_id" => event.agent_id, "event_id" => event.id })
|
||||
end
|
||||
|
||||
it 'should allow Liquid in the key' do
|
||||
|
@ -121,4 +124,85 @@ describe Agents::GoogleCalendarPublishAgent, :vcr do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#receive old style event' do
|
||||
let(:event) do
|
||||
_event = Event.new
|
||||
_event.agent = agents(:bob_manual_event_agent)
|
||||
_event.payload = { 'message' => {
|
||||
'visibility' => 'default',
|
||||
'summary' => "Awesome event",
|
||||
'description' => "An example event with text. Pro tip: DateTimes are in RFC3339",
|
||||
'end' => {
|
||||
'dateTime' => '2014-10-02T11:00:00-05:00'
|
||||
},
|
||||
'start' => {
|
||||
'dateTime' => '2014-10-02T10:00:00-05:00'
|
||||
}
|
||||
} }
|
||||
_event.save!
|
||||
_event
|
||||
end
|
||||
|
||||
let(:calendar_id) { 'sqv39gj35tc837gdns1g4d81cg@group.calendar.google.com' }
|
||||
let(:message) do
|
||||
{
|
||||
'visibility' => 'default',
|
||||
'summary' => "Awesome event",
|
||||
'description' => "An example event with text. Pro tip: DateTimes are in RFC3339",
|
||||
'end' => {
|
||||
'date_time' => '2014-10-02T11:00:00-05:00'
|
||||
},
|
||||
'start' => {
|
||||
'date_time' => '2014-10-02T10:00:00-05:00'
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
let(:response_hash) do
|
||||
{"kind"=>"calendar#event",
|
||||
"etag"=>"\"2908684044040000\"",
|
||||
"id"=>"baz",
|
||||
"status"=>"confirmed",
|
||||
"html_link"=>
|
||||
"https://calendar.google.com/calendar/event?eid=foobar",
|
||||
"created"=>"2016-02-01T15:53:41.000Z",
|
||||
"updated"=>"2016-02-01T15:53:42.020Z",
|
||||
"summary"=>"Awesome event",
|
||||
"description"=>
|
||||
"An example event with text. Pro tip: DateTimes are in RFC3339",
|
||||
"creator"=>
|
||||
{"email"=>
|
||||
"blah-foobar@developer.gserviceaccount.com"},
|
||||
"organizer"=>
|
||||
{"email"=>calendar_id,
|
||||
"display_name"=>"Huginn Location Log",
|
||||
"self"=>true},
|
||||
"start"=>{"date_time"=>"2014-10-03T00:30:00+09:30"},
|
||||
"end"=>{"date_time"=>"2014-10-03T01:30:00+09:30"},
|
||||
"i_cal_uid"=>"blah@google.com",
|
||||
"sequence"=>0,
|
||||
"reminders"=>{"use_default"=>true}
|
||||
}
|
||||
end
|
||||
|
||||
def setup_mock!
|
||||
fake_interface = Object.new
|
||||
mock(GoogleCalendar).new(agent.interpolate_options(agent.options), Rails.logger) { fake_interface }
|
||||
mock(fake_interface).publish_as(calendar_id, message) { response_hash }
|
||||
mock(fake_interface).cleanup!
|
||||
end
|
||||
|
||||
describe 'when the calendar_id is in the options' do
|
||||
it 'should publish old style payload it receives' do
|
||||
setup_mock!
|
||||
|
||||
expect {
|
||||
agent.receive([event])
|
||||
}.to change { agent.events.count }.by(1)
|
||||
|
||||
expect(agent.events.last.payload).to eq({ "success" => true, "published_calendar_event" => response_hash, "agent_id" => event.agent_id, "event_id" => event.id })
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue