rack-disable_css_animations 0.2.0 → 0.4.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/.gitignore +2 -0
- data/README.md +1 -13
- data/bin/setup +8 -0
- data/lib/rack/disable_css_animations/version.rb +1 -1
- data/lib/rack/disable_css_animations.rb +11 -10
- data/lib/rack-disable_css_animations.rb +1 -0
- data/rack-disable_css_animations.gemspec +1 -1
- metadata +11 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3f4f052828fc1eef129c74f3265617450794ee647433a6be7e1a424ede568d6e
|
4
|
+
data.tar.gz: 550bc940c02d553d40d4864b44750f924073b135d73e4aac7379d8d46350361d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cccb5748d6830a131c60f0d8d350ca8fe3d388e97b07cbe94819dbfea2bc14cf684b39530709c5f5adc2ddfd83919b6c062231942793894b3804b6a835932a71
|
7
|
+
data.tar.gz: 51f0f41134048e3fc32865eab28dcf2492b5b09cfe9576fb31bef165a21e8ac109fa063f8028d534e2fff8543f691849d5031c06c8f0de7b8413b396b755cb55
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -8,21 +8,9 @@ Add this line to your application's Gemfile:
|
|
8
8
|
|
9
9
|
gem 'rack-disable_css_animations'
|
10
10
|
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install rack-disable_css_animations
|
18
|
-
|
19
11
|
## Usage
|
20
12
|
|
21
|
-
If using Rails,
|
22
|
-
|
23
|
-
```ruby
|
24
|
-
config.middleware.use Rack::DisableCSSAnimations
|
25
|
-
```
|
13
|
+
If using Rails, this will be automatically added to your middleware stack when required after Rails, so only require it in the environments you want it in.
|
26
14
|
|
27
15
|
## Contributing
|
28
16
|
|
data/bin/setup
ADDED
@@ -2,6 +2,12 @@ require "rack/disable_css_animations/version"
|
|
2
2
|
|
3
3
|
module Rack
|
4
4
|
class DisableCSSAnimations
|
5
|
+
if defined?(Rails)
|
6
|
+
class Rails < Rails::Railtie
|
7
|
+
config.app_middleware.use DisableCSSAnimations
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
5
11
|
def initialize app
|
6
12
|
@app = app
|
7
13
|
end
|
@@ -29,20 +35,15 @@ module Rack
|
|
29
35
|
markup = <<-CSS
|
30
36
|
<style>
|
31
37
|
* {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
38
|
+
animation-delay: 0s !important;
|
39
|
+
animation-duration: 0.01s !important;
|
40
|
+
transition-delay: 0s !important;
|
41
|
+
transition-duration: 0.01s !important;
|
42
|
+
scroll-behavior: auto !important;
|
36
43
|
}
|
37
44
|
</style>
|
38
45
|
CSS
|
39
46
|
response.gsub(%r{</head>}, "#{markup}</head>")
|
40
47
|
end
|
41
|
-
|
42
|
-
def with_prefixes rule, prefixes = ["", "-webkit-", "-moz-", "-o-"]
|
43
|
-
prefixes.map do |prefix|
|
44
|
-
prefix + rule
|
45
|
-
end.join("\n")
|
46
|
-
end
|
47
48
|
end
|
48
49
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require "rack/disable_css_animations"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-disable_css_animations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,7 +56,8 @@ description: Rack middleware to disable CSS animations sitewide. Useful for maki
|
|
56
56
|
acceptance tests quicker and more deterministic.
|
57
57
|
email:
|
58
58
|
- micah@botandrose.com
|
59
|
-
executables:
|
59
|
+
executables:
|
60
|
+
- setup
|
60
61
|
extensions: []
|
61
62
|
extra_rdoc_files: []
|
62
63
|
files:
|
@@ -65,6 +66,8 @@ files:
|
|
65
66
|
- LICENSE.txt
|
66
67
|
- README.md
|
67
68
|
- Rakefile
|
69
|
+
- bin/setup
|
70
|
+
- lib/rack-disable_css_animations.rb
|
68
71
|
- lib/rack/disable_css_animations.rb
|
69
72
|
- lib/rack/disable_css_animations/version.rb
|
70
73
|
- rack-disable_css_animations.gemspec
|
@@ -87,8 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
90
|
- !ruby/object:Gem::Version
|
88
91
|
version: '0'
|
89
92
|
requirements: []
|
90
|
-
|
91
|
-
rubygems_version: 2.4.6
|
93
|
+
rubygems_version: 3.2.32
|
92
94
|
signing_key:
|
93
95
|
specification_version: 4
|
94
96
|
summary: Rack middleware to disable CSS animations sitewide.
|