rack-user_agent 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/release.yml +46 -0
- data/.github/workflows/test.yml +32 -0
- data/.github_changelog_generator +2 -0
- data/CHANGELOG.md +35 -2
- data/README.md +4 -1
- data/lib/rack/user_agent/version.rb +1 -1
- data/rack-user_agent.gemspec +4 -2
- data/spec/lib/rack/user_agent/detector_spec.rb +5 -1
- metadata +13 -76
- data/.travis.yml +0 -13
- data/rails_sample/.gitignore +0 -16
- data/rails_sample/Gemfile +0 -15
- data/rails_sample/Gemfile.lock +0 -142
- data/rails_sample/README.rdoc +0 -28
- data/rails_sample/Rakefile +0 -6
- data/rails_sample/app/assets/images/.keep +0 -0
- data/rails_sample/app/assets/javascripts/application.js +0 -16
- data/rails_sample/app/assets/stylesheets/application.css +0 -15
- data/rails_sample/app/controllers/application_controller.rb +0 -15
- data/rails_sample/app/controllers/concerns/.keep +0 -0
- data/rails_sample/app/helpers/application_helper.rb +0 -2
- data/rails_sample/app/mailers/.keep +0 -0
- data/rails_sample/app/models/.keep +0 -0
- data/rails_sample/app/models/concerns/.keep +0 -0
- data/rails_sample/app/views/application/index.html.erb +0 -4
- data/rails_sample/app/views/layouts/application.html.erb +0 -14
- data/rails_sample/bin/bundle +0 -3
- data/rails_sample/bin/rails +0 -8
- data/rails_sample/bin/rake +0 -8
- data/rails_sample/bin/spring +0 -18
- data/rails_sample/config/application.rb +0 -24
- data/rails_sample/config/boot.rb +0 -4
- data/rails_sample/config/database.yml +0 -25
- data/rails_sample/config/environment.rb +0 -5
- data/rails_sample/config/environments/development.rb +0 -37
- data/rails_sample/config/environments/production.rb +0 -82
- data/rails_sample/config/environments/test.rb +0 -39
- data/rails_sample/config/initializers/assets.rb +0 -8
- data/rails_sample/config/initializers/backtrace_silencers.rb +0 -7
- data/rails_sample/config/initializers/cookies_serializer.rb +0 -3
- data/rails_sample/config/initializers/filter_parameter_logging.rb +0 -4
- data/rails_sample/config/initializers/inflections.rb +0 -16
- data/rails_sample/config/initializers/mime_types.rb +0 -4
- data/rails_sample/config/initializers/session_store.rb +0 -3
- data/rails_sample/config/initializers/wrap_parameters.rb +0 -14
- data/rails_sample/config/locales/en.yml +0 -23
- data/rails_sample/config/routes.rb +0 -3
- data/rails_sample/config/secrets.yml +0 -22
- data/rails_sample/config.ru +0 -4
- data/rails_sample/db/seeds.rb +0 -7
- data/rails_sample/lib/assets/.keep +0 -0
- data/rails_sample/lib/tasks/.keep +0 -0
- data/rails_sample/log/.keep +0 -0
- data/rails_sample/public/404.html +0 -67
- data/rails_sample/public/422.html +0 -67
- data/rails_sample/public/500.html +0 -66
- data/rails_sample/public/favicon.ico +0 -0
- data/rails_sample/public/robots.txt +0 -5
- data/rails_sample/test/controllers/.keep +0 -0
- data/rails_sample/test/fixtures/.keep +0 -0
- data/rails_sample/test/helpers/.keep +0 -0
- data/rails_sample/test/integration/.keep +0 -0
- data/rails_sample/test/mailers/.keep +0 -0
- data/rails_sample/test/models/.keep +0 -0
- data/rails_sample/test/test_helper.rb +0 -10
- data/rails_sample/vendor/assets/javascripts/.keep +0 -0
- data/rails_sample/vendor/assets/stylesheets/.keep +0 -0
- data/sinatra_sample/Gemfile +0 -5
- data/sinatra_sample/Gemfile.lock +0 -34
- data/sinatra_sample/app.rb +0 -16
- data/sinatra_sample/config.ru +0 -3
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
-
<style>
|
|
7
|
-
body {
|
|
8
|
-
background-color: #EFEFEF;
|
|
9
|
-
color: #2E2F30;
|
|
10
|
-
text-align: center;
|
|
11
|
-
font-family: arial, sans-serif;
|
|
12
|
-
margin: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
div.dialog {
|
|
16
|
-
width: 95%;
|
|
17
|
-
max-width: 33em;
|
|
18
|
-
margin: 4em auto 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
div.dialog > div {
|
|
22
|
-
border: 1px solid #CCC;
|
|
23
|
-
border-right-color: #999;
|
|
24
|
-
border-left-color: #999;
|
|
25
|
-
border-bottom-color: #BBB;
|
|
26
|
-
border-top: #B00100 solid 4px;
|
|
27
|
-
border-top-left-radius: 9px;
|
|
28
|
-
border-top-right-radius: 9px;
|
|
29
|
-
background-color: white;
|
|
30
|
-
padding: 7px 12% 0;
|
|
31
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
h1 {
|
|
35
|
-
font-size: 100%;
|
|
36
|
-
color: #730E15;
|
|
37
|
-
line-height: 1.5em;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
div.dialog > p {
|
|
41
|
-
margin: 0 0 1em;
|
|
42
|
-
padding: 1em;
|
|
43
|
-
background-color: #F7F7F7;
|
|
44
|
-
border: 1px solid #CCC;
|
|
45
|
-
border-right-color: #999;
|
|
46
|
-
border-left-color: #999;
|
|
47
|
-
border-bottom-color: #999;
|
|
48
|
-
border-bottom-left-radius: 4px;
|
|
49
|
-
border-bottom-right-radius: 4px;
|
|
50
|
-
border-top-color: #DADADA;
|
|
51
|
-
color: #666;
|
|
52
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
|
53
|
-
}
|
|
54
|
-
</style>
|
|
55
|
-
</head>
|
|
56
|
-
|
|
57
|
-
<body>
|
|
58
|
-
<!-- This file lives in public/500.html -->
|
|
59
|
-
<div class="dialog">
|
|
60
|
-
<div>
|
|
61
|
-
<h1>We're sorry, but something went wrong.</h1>
|
|
62
|
-
</div>
|
|
63
|
-
<p>If you are the application owner check the logs for more information.</p>
|
|
64
|
-
</div>
|
|
65
|
-
</body>
|
|
66
|
-
</html>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
ENV['RAILS_ENV'] ||= 'test'
|
|
2
|
-
require File.expand_path('../../config/environment', __FILE__)
|
|
3
|
-
require 'rails/test_help'
|
|
4
|
-
|
|
5
|
-
class ActiveSupport::TestCase
|
|
6
|
-
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
|
7
|
-
fixtures :all
|
|
8
|
-
|
|
9
|
-
# Add more helper methods to be used by all tests here...
|
|
10
|
-
end
|
|
File without changes
|
|
File without changes
|
data/sinatra_sample/Gemfile
DELETED
data/sinatra_sample/Gemfile.lock
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ..
|
|
3
|
-
specs:
|
|
4
|
-
rack-user_agent (0.2.1)
|
|
5
|
-
rack (~> 1.5)
|
|
6
|
-
woothee (~> 1.0.0)
|
|
7
|
-
|
|
8
|
-
GEM
|
|
9
|
-
remote: https://rubygems.org/
|
|
10
|
-
specs:
|
|
11
|
-
coderay (1.1.0)
|
|
12
|
-
method_source (0.8.2)
|
|
13
|
-
pry (0.10.0)
|
|
14
|
-
coderay (~> 1.1.0)
|
|
15
|
-
method_source (~> 0.8.1)
|
|
16
|
-
slop (~> 3.4)
|
|
17
|
-
rack (1.5.2)
|
|
18
|
-
rack-protection (1.5.3)
|
|
19
|
-
rack
|
|
20
|
-
sinatra (1.4.5)
|
|
21
|
-
rack (~> 1.4)
|
|
22
|
-
rack-protection (~> 1.4)
|
|
23
|
-
tilt (~> 1.3, >= 1.3.4)
|
|
24
|
-
slop (3.6.0)
|
|
25
|
-
tilt (1.4.1)
|
|
26
|
-
woothee (1.0.0)
|
|
27
|
-
|
|
28
|
-
PLATFORMS
|
|
29
|
-
ruby
|
|
30
|
-
|
|
31
|
-
DEPENDENCIES
|
|
32
|
-
pry
|
|
33
|
-
rack-user_agent!
|
|
34
|
-
sinatra
|
data/sinatra_sample/app.rb
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
require "sinatra"
|
|
2
|
-
require "pry"
|
|
3
|
-
require "rack/user_agent"
|
|
4
|
-
|
|
5
|
-
configure do
|
|
6
|
-
use Rack::UserAgent
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
get "/" do
|
|
10
|
-
methods = %i[
|
|
11
|
-
device_type os os_version smartphone_version browser browser_version browser_vendor
|
|
12
|
-
from_pc? from_smartphone? from_mobilephone? from_appliance? from_crawler?
|
|
13
|
-
from_iphone? from_ipad? from_android? from_android_tablet? from_windows_phone?
|
|
14
|
-
]
|
|
15
|
-
methods.map { |m| "#{m}: #{request.send(m)}" }.join("<br>")
|
|
16
|
-
end
|
data/sinatra_sample/config.ru
DELETED