visibilityjs 1.2.2 → 1.2.3

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: 923a8a2685fe0e13f3f276bfb74a4ed439ce65d9
4
- data.tar.gz: a91ae3872b6f645fa134e8310ae00f9ac298c733
3
+ metadata.gz: a711dbbf3f1ca23882071ac17368d8d082461a0a
4
+ data.tar.gz: 58e4634a686cbf16f4ed23b4d7c133adcc30a1b3
5
5
  SHA512:
6
- metadata.gz: fae606b3eea3dc3e7b9bb1934e162d363153df68c35c3b301aead1989756059a97287114989c4b9580680f34d0b62ff0f8a785ab1277d22f08189e138cf2d70c
7
- data.tar.gz: 357aa1ab11c1cd2efd7defc998a80aa7d7ce57cdef5fb18144f5b63f9718989fc5f22047a5fe10a3917a9ee3c1cd70acec2b47efdf9605cc71efcab3075fdbcc
6
+ metadata.gz: 45726b3b92476e310002265dc45977ec640cc9de907dce500087a381d1bca6aa6fca2f784822627bbf1c0a99cdad941ae600bfd45cb983fe88fe2ddf50e4a432
7
+ data.tar.gz: 94278cdef353d8c3e8a9c6a3592fd1281ebf275896e5e966697e41c073423a2acff53939a47b4c6c54752e8735d6a1273222008c0661215a8bb96d45ed34e29d
data/ChangeLog.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 1.2.3 “Vanguard 3, 300 years”
2
+ * Fix Rails support by @dimko.
3
+
1
4
  ### 1.2.2 “Luna 2, impact”
2
5
  * Fix Sprockets 3 support by Waseem Sadiq.
3
6
  * Add Component support by Mitchel Kelonye.
data/lib/visibilityjs.rb CHANGED
@@ -1,16 +1,19 @@
1
1
  # Used only for Ruby on Rails gem to tell, that gem contain `lib/assets` with
2
2
  # visibility.js file.
3
+
3
4
  module VisibilityJs
4
5
 
5
- def self.install(sprockets)
6
- sprockets.append_path(Pathname(__FILE__).dirname)
6
+ # Path where is the visibility.js located.
7
+ def self.assets_path
8
+ Pathname(__FILE__).dirname
7
9
  end
8
10
 
9
- module Rails
10
- class Engine < ::Rails::Engine
11
- initializer 'visibilityjs' do |app|
12
- VisibilityJs.install(app.config.assets)
13
- end
14
- end
11
+ # Add assets path to standalone Sprockets environment.
12
+ def self.install(sprockets)
13
+ sprockets.append_path(assets_path)
15
14
  end
16
15
  end
16
+
17
+ if defined?(Rails)
18
+ require 'visibilityjs/railtie'
19
+ end
@@ -0,0 +1,7 @@
1
+ # Add visibility.js path to the Rails assets paths.
2
+
3
+ module VisibilityJs
4
+ class Railtie < Rails::Railtie
5
+ config.assets.configure { |env| VisibilityJs.install(env) }
6
+ end
7
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visibilityjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Sitnik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-22 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: sprockets
@@ -44,6 +44,7 @@ files:
44
44
  - lib/visibility.js
45
45
  - lib/visibility.timers.js
46
46
  - lib/visibilityjs.rb
47
+ - lib/visibilityjs/railtie.rb
47
48
  homepage: https://github.com/ai/visibilityjs
48
49
  licenses:
49
50
  - MIT