rack-disable_css_animations 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 562ac48e28297edd4fee1121a64eda52e2c0d152
4
- data.tar.gz: 27cd3b0f39313c443e8f8b76967ecaa449cee79d
3
+ metadata.gz: e8374de1dbc9db337701d8e37b4c30b1c3e4af0b
4
+ data.tar.gz: 7e7f3627e61a3e3f97f3e38d290f3b561f7b13fe
5
5
  SHA512:
6
- metadata.gz: 193f474c6e4d432cf29cdeade9c2ab052b9f369e5851698ebe14dd79ea8e61c2db47c944a959071675052137f24d2238e991d48c012034760f55f36c12037cf6
7
- data.tar.gz: 2f2bbe357f796ab5e643154c5bcde8d78d8069d7bac968788b6fef5ed28825ae5417bf9a790435346784e74ec5c18c124fe3b618aa9fe54813fabac71da02ef3
6
+ metadata.gz: 00c364de5aa92dd3355a04ff74637846a309ac2a5391695ba14365f3ee8eae2b45536923c66ae84a97a9428c201c8f3709192bd766a2f677bcde519484ea31fe
7
+ data.tar.gz: 403142445daf4b9fc1b53d910dbea31ff1637169bba3887fdaa6c21649743bac232e4c4bbe2a55a5a230d54c1fe0802f80a6bad3030a3619ba9a5dd633d0bdd6
@@ -29,14 +29,20 @@ module Rack
29
29
  markup = <<-CSS
30
30
  <style>
31
31
  * {
32
- transition-duration: 0 !important;
33
- -webkit-transition-duration: 0 !important;
34
- -moz-transition-duration: 0 !important;
35
- -o-transitio-duration: 0 !important;
32
+ #{with_prefixes "animation-delay: 0s !important;"}
33
+ #{with_prefixes "animation-duration: 0.01s !important;"}
34
+ #{with_prefixes "transition-delay: 0s !important;"}
35
+ #{with_prefixes "transition-duration: 0.01s !important;"}
36
36
  }
37
37
  </style>
38
38
  CSS
39
39
  response.gsub(%r{</head>}, "#{markup}</head>")
40
40
  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
41
47
  end
42
48
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class DisableCSSAnimations
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-disable_css_animations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.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: 2014-06-18 00:00:00.000000000 Z
11
+ date: 2016-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.6'
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
40
  version: '1.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Rack middleware to disable CSS animations sitewide. Useful for making
@@ -60,7 +60,7 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - .gitignore
63
+ - ".gitignore"
64
64
  - Gemfile
65
65
  - LICENSE.txt
66
66
  - README.md
@@ -78,17 +78,17 @@ require_paths:
78
78
  - lib
79
79
  required_ruby_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - '>='
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.2.2
91
+ rubygems_version: 2.4.6
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Rack middleware to disable CSS animations sitewide.