Skip to content

Commit ee3bde4

Browse files
committed
Drop BasecampAgent
This was written in the Basecamp Classic age and its authentication has been seemingly broken since the introduction of Basecamp 2 or 3.
1 parent 2e3c74e commit ee3bde4

File tree

22 files changed

+42
-375
lines changed

22 files changed

+42
-375
lines changed

Gemfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ gem 'aws-sdk-core', '~> 2.2.15'
8181
gem 'omniauth-google-oauth2', '>= 0.8.0'
8282
gem 'gmail_xoauth' # support for Gmail using OAuth
8383

84-
# Optional Services.
85-
gem 'omniauth-37signals' # BasecampAgent
86-
8784
# Bundler <1.5 does not recognize :x64_mingw as a valid platform name.
8885
# Unfortunately, it can't self-update because it errors when encountering :x64_mingw.
8986
unless Gem::Version.new(Bundler::VERSION) >= Gem::Version.new('1.5.0')

Gemfile.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,6 @@ GEM
479479
omniauth (1.9.1)
480480
hashie (>= 3.4.6)
481481
rack (>= 1.6.2, < 3)
482-
omniauth-37signals (1.0.5)
483-
omniauth (~> 1.0)
484-
omniauth-oauth2 (~> 1.0)
485482
omniauth-evernote (1.2.1)
486483
evernote-thrift
487484
multi_json (~> 1.0)
@@ -786,7 +783,6 @@ DEPENDENCIES
786783
net-ftp-list (~> 3.2.8)
787784
nokogiri (>= 1.10.8)
788785
omniauth
789-
omniauth-37signals
790786
omniauth-dropbox-oauth2!
791787
omniauth-evernote
792788
omniauth-google-oauth2 (>= 0.8.0)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Huginn is a system for building agents that perform automated tasks for you onli
1515
* Watch for air travel or shopping deals
1616
* Follow your project names on Twitter and get updates when people mention them
1717
* Scrape websites and receive email when they change
18-
* Connect to Adioso, HipChat, Basecamp, Growl, FTP, IMAP, Jabber, JIRA, MQTT, nextbus, Pushbullet, Pushover, RSS, Bash, Slack, StubHub, translation APIs, Twilio, Twitter, Wunderground, and Weibo, to name a few.
18+
* Connect to Adioso, HipChat, Growl, FTP, IMAP, Jabber, JIRA, MQTT, nextbus, Pushbullet, Pushover, RSS, Bash, Slack, StubHub, translation APIs, Twilio, Twitter, and Weibo, to name a few.
1919
* Send digest email with things that you care about at specific times during the day
2020
* Track counts of high frequency events and send an SMS within moments when they spike, such as the term "san francisco emergency"
2121
* Send and receive WebHooks

app/assets/stylesheets/application.scss.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ h2 .scenario, a span.label.scenario {
276276

277277
$service-colors: (
278278
twitter: #55acee,
279-
37signals: #8fc857,
280279
github: #444444,
281280
tumblr: #2c4762,
282281
dropbox: #007EE5,

app/controllers/application_controller.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def authenticate_admin!
2929
def upgrade_warning
3030
return unless current_user
3131
twitter_oauth_check
32-
basecamp_auth_check
3332
outdated_google_auth_check
3433
end
3534

@@ -58,12 +57,6 @@ def twitter_oauth_check
5857
end
5958
end
6059

61-
def basecamp_auth_check
62-
unless Devise.omniauth_providers.include?(:'37signals')
63-
@basecamp_agent = current_user.agents.where(type: 'Agents::BasecampAgent').first
64-
end
65-
end
66-
6760
def outdated_google_auth_check
6861
@outdated_google_cal_agents = current_user.agents.of_type('Agents::GoogleCalendarPublishAgent').select do |agent|
6962
agent.options['google']['key_secret'].present?

app/models/agents/basecamp_agent.rb

Lines changed: 0 additions & 98 deletions
This file was deleted.

app/models/service.rb

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,12 @@ def prepare_request
3232
end
3333

3434
def refresh_token_parameters
35-
case provider
36-
when '37signals'
37-
{
38-
type: 'refresh',
39-
client_id: oauth_key,
40-
client_secret: oauth_secret,
41-
refresh_token: refresh_token
42-
}
43-
else
44-
# Paramters required by standard compliant OAuth2 providers,
45-
# including Google
46-
{
47-
grant_type: 'refresh_token',
48-
client_id: oauth_key,
49-
client_secret: oauth_secret,
50-
refresh_token: refresh_token
51-
}
52-
end
35+
{
36+
grant_type: 'refresh_token',
37+
client_id: oauth_key,
38+
client_secret: oauth_secret,
39+
refresh_token: refresh_token
40+
}
5341
end
5442

5543
def refresh_token!
@@ -100,10 +88,6 @@ def self.get_options(omniauth)
10088
{name: omniauth['info']['nickname'] || omniauth['info']['name']}
10189
end
10290

103-
register_options_provider('37signals') do |omniauth|
104-
{user_id: omniauth['extra']['accounts'][0]['id'], name: omniauth['info']['name']}
105-
end
106-
10791
register_options_provider('google') do |omniauth|
10892
{
10993
email: omniauth['info']['email'],

app/views/application/_upgrade_warning.html.erb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<% if @twitter_agent || @basecamp_agent %>
1+
<% if @twitter_agent %>
22
<div class="alert alert-danger" role="alert">
33
<p>
44
<b>Warning!</b> You need to update your Huginn configuration, so your agents continue to work with the new OAuth services.
@@ -16,12 +16,6 @@ TWITTER_OAUTH_SECRET=<%= @twitter_oauth_secret %>
1616

1717
</p>
1818
<% end %>
19-
<% if @basecamp_agent %>
20-
<p>
21-
Your <b>Basecamp</b> agents could not be migrated automatically. You need to manually register an application with 37signals and authenticate Huginn to use it.<br/>
22-
Have a look at the <%= link_to 'Wiki', 'https://github.com/huginn/huginn/wiki/Configuring-OAuth-applications', target: '_blank' %> if you need help.
23-
</p>
24-
<% end %>
2519
</div>
2620
<% end -%>
2721
<% if @outdated_google_cal_agents && @outdated_google_cal_agents.length > 0 %>

config/initializers/devise.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,6 @@
247247
config.omniauth :'tumblr', key, secret
248248
end
249249

250-
if defined?(OmniAuth::Strategies::ThirtySevenSignals) &&
251-
(key = ENV["THIRTY_SEVEN_SIGNALS_OAUTH_KEY"]).present? &&
252-
(secret = ENV["THIRTY_SEVEN_SIGNALS_OAUTH_SECRET"]).present?
253-
config.omniauth :'37signals', key, secret
254-
end
255-
256250
if defined?(OmniAuth::Strategies::DropboxOauth2) &&
257251
(key = ENV["DROPBOX_OAUTH_KEY"]).present? &&
258252
(secret = ENV["DROPBOX_OAUTH_SECRET"]).present?

config/locales/devise.en.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ en:
3030
twitter: "Twitter"
3131
tumblr: "Tumblr"
3232
github: "GitHub"
33-
37signals: "37Signals (Basecamp)"
3433
dropbox: "Dropbox"
3534
dropbox_oauth2: "Dropbox"
3635
evernote: "Evernote"

0 commit comments

Comments
 (0)