Skip to content

Commit c7f1a72

Browse files
authored
Merge pull request #8 from dblock/use-erb
Use ERB instead of a static HTML page.
2 parents 8c6c995 + 709a02a commit c7f1a72

File tree

16 files changed

+140
-109
lines changed

16 files changed

+140
-109
lines changed

.rubocop_todo.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2018-05-10 19:56:31 -0400 using RuboCop version 0.55.0.
3+
# on 2018-05-10 22:32:30 -0400 using RuboCop version 0.55.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -10,7 +10,7 @@
1010
Metrics/AbcSize:
1111
Max: 33
1212

13-
# Offense count: 13
13+
# Offense count: 14
1414
# Configuration parameters: CountComments, ExcludedMethods.
1515
Metrics/BlockLength:
1616
Max: 108
@@ -43,7 +43,7 @@ Naming/HeredocDelimiterNaming:
4343
- 'slack-api-explorer/commands/help.rb'
4444
- 'slack-api-explorer/info.rb'
4545

46-
# Offense count: 60
46+
# Offense count: 63
4747
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
4848
# URISchemes: http, https
4949
Metrics/LineLength:

.travis.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1-
services:
2-
- mongodb
3-
41
rvm:
52
- 2.3.1
63

4+
language: ruby
5+
76
cache: bundler
87

8+
services:
9+
- mongodb
10+
11+
addons:
12+
firefox: 54.0
13+
14+
before_install:
15+
- export DISPLAY=:99.0
16+
- sh -e /etc/init.d/xvfb start
17+
- wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz
18+
- mkdir geckodriver
19+
- tar -xzf geckodriver-v0.18.0-linux64.tar.gz -C geckodriver
20+
- export PATH=$PATH:$PWD/geckodriver

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source 'http://rubygems.org'
44
ruby '2.3.1'
55

66
gem 'giphy'
7-
gem 'jsonpath'
7+
gem 'jsonpath', '~> 0.5.8'
88
gem 'kaminari-grape'
99
gem 'mongoid'
1010
gem 'mongoid-scroll'
@@ -26,12 +26,14 @@ group :development do
2626
end
2727

2828
group :test do
29+
gem 'capybara'
2930
gem 'database_cleaner'
3031
gem 'fabrication'
3132
gem 'faker'
3233
gem 'hyperclient'
3334
gem 'rack-test'
3435
gem 'rspec'
36+
gem 'selenium-webdriver'
3537
gem 'vcr'
3638
gem 'webmock'
3739
end

Gemfile.lock

Lines changed: 65 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,22 @@ GEM
88
i18n (>= 0.7, < 2)
99
minitest (~> 5.1)
1010
tzinfo (~> 1.1)
11-
addressable (2.5.0)
12-
public_suffix (~> 2.0, >= 2.0.2)
11+
addressable (2.5.2)
12+
public_suffix (>= 2.0.2, < 4.0)
1313
ast (2.4.0)
1414
axiom-types (0.1.1)
1515
descendants_tracker (~> 0.0.4)
1616
ice_nine (~> 0.11.0)
1717
thread_safe (~> 0.3, >= 0.3.1)
1818
bson (4.3.0)
1919
builder (3.2.3)
20+
capybara (3.1.0)
21+
addressable
22+
mini_mime (>= 0.1.3)
23+
nokogiri (~> 1.8)
24+
rack (>= 1.6.0)
25+
rack-test (>= 0.6.3)
26+
xpath (~> 3.0)
2027
celluloid (0.17.3)
2128
celluloid-essentials
2229
celluloid-extras
@@ -38,38 +45,40 @@ GEM
3845
timers (>= 4.1.1)
3946
celluloid-supervision (0.20.6)
4047
timers (>= 4.1.1)
48+
childprocess (0.9.0)
49+
ffi (~> 1.0, >= 1.0.11)
4150
coercible (1.0.0)
4251
descendants_tracker (~> 0.0.1)
4352
concurrent-ruby (1.0.5)
4453
crack (0.4.3)
4554
safe_yaml (~> 1.0.0)
46-
database_cleaner (1.5.3)
55+
database_cleaner (1.7.0)
4756
declarative (0.0.10)
4857
declarative-option (0.1.0)
4958
descendants_tracker (0.0.4)
5059
thread_safe (~> 0.3, >= 0.3.1)
5160
diff-lcs (1.3)
5261
equalizer (0.0.11)
53-
excon (0.55.0)
54-
fabrication (2.16.1)
55-
faker (1.7.3)
56-
i18n (~> 0.5)
57-
faraday (0.9.2)
62+
excon (0.62.0)
63+
fabrication (2.20.1)
64+
faker (1.8.7)
65+
i18n (>= 0.7)
66+
faraday (0.15.1)
5867
multipart-post (>= 1.2, < 3)
59-
faraday-digestauth (0.2.1)
68+
faraday-digestauth (0.3.0)
6069
faraday (~> 0.7)
6170
net-http-digest_auth (~> 1.4)
62-
faraday_hal_middleware (0.0.1)
63-
faraday_middleware (>= 0.9, < 0.10)
64-
faraday_middleware (0.9.2)
65-
faraday (>= 0.7.4, < 0.10)
66-
faraday_middleware-parse_oj (0.3.1)
71+
faraday_hal_middleware (0.1.0)
72+
faraday_middleware (~> 0.9)
73+
faraday_middleware (0.12.2)
74+
faraday (>= 0.7.4, < 1.0)
75+
faraday_middleware-parse_oj (0.3.2)
6776
faraday (~> 0.9)
6877
faraday_middleware (>= 0.9.1, < 1.0)
69-
oj (~> 2.0)
78+
oj (>= 2.0, < 4.0)
79+
ffi (1.9.23)
7080
foreman (0.84.0)
7181
thor (~> 0.19.1)
72-
futuroscope (0.1.11)
7382
giphy (3.0.0)
7483
faraday (~> 0.9)
7584
faraday_middleware (~> 0.9)
@@ -89,9 +98,9 @@ GEM
8998
roar (~> 1.1.0)
9099
grape-swagger (0.28.0)
91100
grape (>= 0.16.2)
92-
hashdiff (0.3.2)
101+
hashdiff (0.3.7)
93102
hashie (3.5.7)
94-
heroku (3.43.9999)
103+
heroku (3.99.1)
95104
heroku-api (= 0.4.2)
96105
launchy (= 2.4.3)
97106
multi_json (= 1.11.2)
@@ -104,15 +113,14 @@ GEM
104113
excon (~> 0.45)
105114
multi_json (~> 1.8)
106115
hitimes (1.2.6)
107-
hyperclient (0.8.2)
108-
faraday
116+
hyperclient (0.9.0)
117+
faraday (>= 0.9.0)
109118
faraday-digestauth
110119
faraday_hal_middleware
111120
faraday_middleware
112-
futuroscope
113121
net-http-digest_auth
114122
uri_template
115-
i18n (0.9.5)
123+
i18n (1.0.1)
116124
concurrent-ruby (~> 1.0)
117125
ice_nine (0.11.2)
118126
jsonpath (0.5.8)
@@ -125,6 +133,8 @@ GEM
125133
launchy (2.4.3)
126134
addressable (~> 2.3)
127135
mime-types (1.25.1)
136+
mini_mime (1.0.0)
137+
mini_portile2 (2.3.0)
128138
minitest (5.11.3)
129139
mongo (2.5.3)
130140
bson (>= 4.3.0, < 5.0.0)
@@ -152,17 +162,19 @@ GEM
152162
net-ssh-gateway (1.2.0)
153163
net-ssh (>= 2.6.5)
154164
netrc (0.10.3)
155-
newrelic-slack-ruby-bot (0.1.0)
165+
newrelic-slack-ruby-bot (0.2.1)
156166
newrelic_rpm
157-
slack-ruby-bot
158-
newrelic_rpm (3.18.1.330)
167+
slack-ruby-bot (>= 0.10.5)
168+
newrelic_rpm (5.1.0.344)
159169
nio4r (2.3.1)
160-
oj (2.18.3)
170+
nokogiri (1.8.2)
171+
mini_portile2 (~> 2.3.0)
172+
oj (3.6.0)
161173
parallel (1.12.1)
162174
parser (2.5.1.0)
163175
ast (~> 2.4.0)
164176
powerpack (0.1.1)
165-
public_suffix (2.0.5)
177+
public_suffix (3.0.2)
166178
rack (2.0.5)
167179
rack-accept (0.4.5)
168180
rack (>= 0.4)
@@ -172,12 +184,12 @@ GEM
172184
rack
173185
rack-server-pages (0.1.0)
174186
rack
175-
rack-test (0.6.3)
176-
rack (>= 1.0)
187+
rack-test (1.0.0)
188+
rack (>= 1.0, < 3)
177189
rainbow (3.0.0)
178190
raindrops (0.19.0)
179-
rake (12.0.0)
180-
rdoc (5.1.0)
191+
rake (12.3.1)
192+
rdoc (6.0.4)
181193
representable (3.0.4)
182194
declarative (< 0.1.0)
183195
declarative-option (< 0.2.0)
@@ -187,19 +199,19 @@ GEM
187199
rdoc (>= 2.4.2)
188200
roar (1.1.0)
189201
representable (~> 3.0.0)
190-
rspec (3.5.0)
191-
rspec-core (~> 3.5.0)
192-
rspec-expectations (~> 3.5.0)
193-
rspec-mocks (~> 3.5.0)
194-
rspec-core (3.5.4)
195-
rspec-support (~> 3.5.0)
196-
rspec-expectations (3.5.0)
202+
rspec (3.7.0)
203+
rspec-core (~> 3.7.0)
204+
rspec-expectations (~> 3.7.0)
205+
rspec-mocks (~> 3.7.0)
206+
rspec-core (3.7.1)
207+
rspec-support (~> 3.7.0)
208+
rspec-expectations (3.7.0)
197209
diff-lcs (>= 1.2.0, < 2.0)
198-
rspec-support (~> 3.5.0)
199-
rspec-mocks (3.5.0)
210+
rspec-support (~> 3.7.0)
211+
rspec-mocks (3.7.0)
200212
diff-lcs (>= 1.2.0, < 2.0)
201-
rspec-support (~> 3.5.0)
202-
rspec-support (3.5.0)
213+
rspec-support (~> 3.7.0)
214+
rspec-support (3.7.1)
203215
rubocop (0.55.0)
204216
parallel (~> 1.10)
205217
parser (>= 2.5)
@@ -210,6 +222,9 @@ GEM
210222
ruby-progressbar (1.9.0)
211223
rubyzip (1.1.7)
212224
safe_yaml (1.0.4)
225+
selenium-webdriver (3.8.0)
226+
childprocess (~> 0.5)
227+
rubyzip (~> 1.0)
213228
slack-ruby-bot (0.11.1)
214229
hashie
215230
slack-ruby-client (>= 0.6.0)
@@ -244,32 +259,35 @@ GEM
244259
kgio (~> 2.6)
245260
raindrops (~> 0.7)
246261
uri_template (0.7.0)
247-
vcr (3.0.3)
262+
vcr (4.0.0)
248263
virtus (1.0.5)
249264
axiom-types (~> 0.1)
250265
coercible (~> 1.0)
251266
descendants_tracker (~> 0.0, >= 0.0.3)
252267
equalizer (~> 0.0, >= 0.0.9)
253-
webmock (2.3.2)
268+
webmock (3.4.1)
254269
addressable (>= 2.3.6)
255270
crack (>= 0.3.2)
256271
hashdiff
257272
websocket-driver (0.7.0)
258273
websocket-extensions (>= 0.1.0)
259274
websocket-extensions (0.1.3)
275+
xpath (3.0.0)
276+
nokogiri (~> 1.8)
260277

261278
PLATFORMS
262279
ruby
263280

264281
DEPENDENCIES
282+
capybara
265283
database_cleaner
266284
fabrication
267285
faker
268286
foreman
269287
giphy
270288
heroku
271289
hyperclient
272-
jsonpath
290+
jsonpath (~> 0.5.8)
273291
kaminari-grape
274292
mongoid
275293
mongoid-scroll
@@ -282,6 +300,7 @@ DEPENDENCIES
282300
rake
283301
rspec
284302
rubocop
303+
selenium-webdriver
285304
slack-ruby-bot-server
286305
vcr
287306
webmock
@@ -290,4 +309,4 @@ RUBY VERSION
290309
ruby 2.3.1p112
291310

292311
BUNDLED WITH
293-
1.16.0
312+
1.16.1

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ unless ENV['RACK_ENV'] == 'production'
88
require 'rspec/core/rake_task'
99

1010
RSpec::Core::RakeTask.new(:spec) do |spec|
11-
spec.pattern = FileList['spec/**/*_spec.rb']
11+
spec.pattern = 'spec/**/*_spec.rb'
1212
end
1313

1414
require 'rubocop/rake_task'

config.ru

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@ Bundler.require :default, ENV['RACK_ENV']
88
require 'slack-ruby-bot-server'
99
require 'slack-api-explorer'
1010

11-
if ENV['RACK_ENV'] == 'development'
12-
puts 'Loading NewRelic in developer mode ...'
13-
require 'new_relic/rack/developer_mode'
14-
use NewRelic::Rack::DeveloperMode
15-
end
16-
17-
NewRelic::Agent.manual_start
18-
1911
SlackApiExplorer::App.instance.prepare!
2012

2113
Thread.abort_on_exception = true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h3>Whoa, an API explorer for the Slack Web API.</h3>
1515
</p>
1616
<p id='messages' />
1717
<p id='register'>
18-
<a href="https://slack.com/oauth/authorize?scope=bot&client_id=4657200833.17789106022"><img alt="Add to Slack" height="40" width="139" src="https://platform.slack-edge.com/img/add_to_slack.png" srcset="https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/[email protected] 2x"></a>
18+
<a href="https://slack.com/oauth/authorize?scope=bot&client_id=<%= ENV['SLACK_CLIENT_ID'] %>"><img alt="Add to Slack" height="40" width="139" src="https://platform.slack-edge.com/img/add_to_slack.png" srcset="https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/[email protected] 2x"></a>
1919
</p>
2020
<p id='active_teams_count'>&nbsp;</p>
2121
<p>

0 commit comments

Comments
 (0)