tablets 1.0.0 → 1.1.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: f105a9c8c32b9cdf0bacde5fd4ec570a87e7e61f
4
- data.tar.gz: b95ace2d9f48cf273b7fa44516b3c51087861adf
3
+ metadata.gz: f5e96cdb1c2b3d97a936ff7d2c8f9db941468990
4
+ data.tar.gz: 5337d9aa657c9c69aa82281778f0fe2316837a4c
5
5
  SHA512:
6
- metadata.gz: 6aac28aec6ec6e4b4c1b4bc6b27088dbc2e114ae6eb79cfa7e8dee9fa674d62bd44cc00054c2780a2772d7a873c26343eb2a5fac19b712ea047682bf64eebbc9
7
- data.tar.gz: c29191e2424dfa056acabccf4e613a13ee25a0affa851be45e17b65d72860a8d6ab6c73922547a2e490c6dcb880f32203e1d7cb8aeadc94cb393fea2bbcda8ed
6
+ metadata.gz: 90d6403fb216b57abf8e4284f82295ee946b3abce57d5b456f0cfbc2fa343d52ded1c741e71f37d10c3f4e5e0efda68c290dac6e3351469c93328189b2125726
7
+ data.tar.gz: c991fccc8065312bf592cdd23f587da5007852c7981187b539e28cab8f6987fd91362c1c53afb0d9ff7f8baec4af0ed1b4c8df649ed320c8a94f65021c012a01
@@ -10,16 +10,23 @@ module Tablets
10
10
  ActionView::Base.send :include, Tablets::ViewHelpers
11
11
  end
12
12
 
13
+ reloader_class =
14
+ if Rails::VERSION::MAJOR >= 5
15
+ ActiveSupport::Reloader
16
+ else
17
+ ActionDispatch::Reloader
18
+ end
19
+
13
20
  # Manages tablets loading and cleanup
14
21
  # Also ensures tablets reloading in development environment
15
22
  initializer 'tablets.reloader' do |app|
16
23
  if app.config.reload_classes_only_on_change
17
- ActionDispatch::Reloader.to_prepare(prepend: true) { Tablets.unload! }
24
+ reloader_class.to_prepare(prepend: true) { Tablets.unload! }
18
25
  else
19
- ActionDispatch::Reloader.to_cleanup { Tablets.unload! }
26
+ reloader_class.to_cleanup { Tablets.unload! }
20
27
  end
21
28
 
22
- ActionDispatch::Reloader.to_prepare do
29
+ reloader_class.to_prepare do
23
30
  Tablets.load! unless Tablets.loaded?
24
31
  end
25
32
  end
@@ -2,7 +2,7 @@ module Tablets
2
2
  # Tablets gem version
3
3
  module Version
4
4
  MAJOR = 1
5
- MINOR = 0
5
+ MINOR = 1
6
6
  TINY = 0
7
7
  PRE = nil
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tablets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yevhen Shemet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2016-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails