blob-feature-check-rails 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b09f07fa8cab582821313aaf7835682f24a4f809
4
+ data.tar.gz: b392fbbdd0cbb377756ade8c56693cdbd7976166
5
+ SHA512:
6
+ metadata.gz: 355c64d4c64c62421504f414d5d2132e0e5d9e19ee7a3247e23dc31967e1d269cf2322c14e1b2609a1541ff2ace03c1bff31c93957e3b769bee3802f15abdd15
7
+ data.tar.gz: 876e778cc8720a0881b5a10551f7dbefcbcd08792eabeaabc527da77094639af9903459a03cfa6ffbba361660024efa68b7c943e8879224ad7bec7425cf9bd72
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 ronnqvistandreas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # Blob::Feature::Check::Rails
2
+
3
+ [blob-feature-check](https://github.com/ssorallen/blob-feature-check) for Rails 3.1+ asset pipeline.
4
+
5
+ blob-feature-check is 'Small feature check for "blob:" URL support'
6
+
7
+ ### Usage
8
+
9
+ In your Gemfile, add this line:
10
+
11
+ gem "blob-feature-check-rails"
12
+
13
+ Then, run `bundle install`.
14
+
15
+ In your app/assets/javascripts/application.js, add this line:
16
+
17
+ //= require blob-feature-check
18
+
19
+ You're done!
20
+
21
+ ### Versioning
22
+
23
+ blob-feature-check-rails 1.1.0 == blob-feature-check 1.1.0
24
+
25
+ ## License
26
+
27
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,12 @@
1
+ require "blob/feature/check/rails/version"
2
+
3
+ module Blob
4
+ module Feature
5
+ module Check
6
+ module Rails
7
+ class Engine < ::Rails::Engine
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ module Blob
2
+ module Feature
3
+ module Check
4
+ module Rails
5
+ VERSION = "1.1.0"
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Blob Feature Check v1.1.0
3
+ *
4
+ * Released into the public domain.
5
+ * http://unlicense.org
6
+ */
7
+ (function() {
8
+ var featureDiv = document.getElementById("blob-urls");
9
+
10
+ function fail() { featureDiv.className += " feature-unsupported"; }
11
+ function pass() { featureDiv.className += " feature-supported"; }
12
+
13
+ var svg = new Blob(
14
+ ["<svg xmlns='http://www.w3.org/2000/svg'></svg>"],
15
+ {type: "image/svg+xml;charset=utf-8"}
16
+ );
17
+
18
+ // Safari 6 uses "webkitURL".
19
+ var url = window.webkitURL || window.URL;
20
+ var objectUrl = url.createObjectURL(svg);
21
+
22
+ if (/^blob:/.exec(objectUrl) === null) {
23
+ // `URL.createObjectURL` created a URL that started with something other
24
+ // than "blob:", which means it has been polyfilled and is not supported by
25
+ // this browser.
26
+ fail();
27
+ } else {
28
+ var img = new Image();
29
+ img.onload = function() { pass(); };
30
+ img.onerror = function() { fail(); };
31
+ img.src = objectUrl;
32
+ }
33
+ })();
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: blob-feature-check-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Andreas Rönnqvist
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-01-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
27
+ description: Provides easy installation and usage of blob-feature-check javascript
28
+ library for your Rails 3.1+ application.
29
+ email:
30
+ - ronnqvist.andreas@gmail.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - LICENSE
36
+ - README.md
37
+ - lib/blob/feature/check/rails.rb
38
+ - lib/blob/feature/check/rails/version.rb
39
+ - vendor/assets/javascripts/blob-feature-check.js
40
+ homepage: https://github.com/ronnqvistandreas/blob-feature-check-rails
41
+ licenses:
42
+ - MIT
43
+ metadata: {}
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: 1.3.6
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 2.4.6
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: blob-feature-check for Rails Asset pipeline
64
+ test_files: []