turbolinks-animate 2.0.1 → 2.0.2

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
  SHA256:
3
- metadata.gz: 4b6edd9fd88bd6a84bab1e4187425e70f381b5a8fdc5d895a56d8182b2c57209
4
- data.tar.gz: c607ffa939cd9f6ef63c9f62b4df5b6bdb64eb5983a4e2b2759238a7379b824a
3
+ metadata.gz: 980874783a6f58bc209f2a2043f77b82775d9a177707786471ecae18e150a65d
4
+ data.tar.gz: 5d5b3eff69127cc8bdbbb89d9eeee1ec8d8ab5531c8766ac61dd3505c0ebdc43
5
5
  SHA512:
6
- metadata.gz: f16f23e1a59679980fa0ae5359a391c20a777e001229fc70dbb9d8e6e2a9311f55f2d348ef5a344ffe7f894ddb672e05e2d31fe9386ece87680dc05c7092ede5
7
- data.tar.gz: 328f28d6f402d15cb90e9db3a9afe119d7bf1a7489a92118b12c851a38c4b8917b835b3d563841ed64991e6ce70819b00958fa4e1f8a2c67dd7e4fd21a37e6ce
6
+ metadata.gz: 60703ceb0768e68dd31fec5c5ddf8857b519edc2e712aad1dd895448a4cdbd1db664c77c7bef301f574d6d390541e5e5d49544bfebea0e6f41e7a2df41bd941f
7
+ data.tar.gz: 436b86ce6a0afe890b37d6383e00f5b42ff3e7e55d76adfdea38f6e9acc4d7a54a0da03a2169f96cfebc8084b1d542886af573534908f8d4b25a9140e69c5d45
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
File without changes
@@ -1,7 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module TurbolinksAnimateHelper
4
+ def turbolinks_animate(animation)
5
+ @turbolinks_animate_animation = turbolinks_animate_animation(animation)
6
+ end
7
+
8
+ private
2
9
 
3
- def turbolinks_animate animation
4
- @turbolinks_animate_animation = animation.is_a?(Hash) ? animation.to_json : animation
5
- end
10
+ def turbolinks_animate_animation(animation)
11
+ return animation.to_json if animation.is_a?(Hash)
6
12
 
13
+ animation
14
+ end
7
15
  end
@@ -1,4 +1,4 @@
1
1
  <% element = options.delete :element %>
2
2
  <%= content_tag element, options do %>
3
- <%= block %>
3
+ <%= block %>
4
4
  <% end %>
@@ -1,8 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'turbolinks-animate/version'
2
4
 
3
5
  module TurbolinksAnimate
4
-
5
- require 'turbolinks-animate/engine'
6
- require 'turbolinks-animate/railtie'
7
-
6
+ require 'turbolinks-animate/engine'
7
+ require 'turbolinks-animate/railtie'
8
8
  end
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails/railtie'
2
4
 
3
5
  module TurbolinksAnimate
4
- class Engine < ::Rails::Engine
5
- end
6
+ class Engine < ::Rails::Engine
7
+ end
6
8
  end
@@ -1,28 +1,29 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails/railtie'
2
4
  require 'mozaic'
3
5
 
4
6
  module TurbolinksAnimate
5
- class Railtie < Rails::Railtie
6
-
7
- initializer 'turbolinks-animate.mozaic' do
8
- Mozaic.configure do |config|
9
- config.define_component 'turbolinks-animate', element: 'body' do |options|
10
- animation = options.delete :animation
11
- if animation
12
- options[:class] += ( options[:class].length > 0 ? ' turbolinks-animate' : 'turbolinks-animate' )
13
- options[:data] ||= {}
14
- options[:data][:turbolinks_animate_animation] = animation
15
- end
16
- options
17
- end
18
- end
19
- end
7
+ class Railtie < Rails::Railtie
8
+ initializer 'turbolinks-animate.mozaic' do
9
+ Mozaic.configure do |config|
10
+ config.define_component('turbolinks-animate',
11
+ element: 'body') do |options|
12
+ animation = options.delete :animation
13
+ return options unless animation
20
14
 
21
- initializer 'turbolinks-animate.action_controller' do
22
- ActiveSupport.on_load :action_controller do
23
- include TurbolinksAnimateHelper
24
- end
15
+ options[:class] = [options[:class], 'turbolinks-animate'].compact
16
+ .join(' ')
17
+ options[:data] ||= {}
18
+ options[:data][:turbolinks_animate_animation] = animation
25
19
  end
20
+ end
21
+ end
26
22
 
23
+ initializer 'turbolinks-animate.action_controller' do
24
+ ActiveSupport.on_load :action_controller do
25
+ include TurbolinksAnimateHelper
26
+ end
27
27
  end
28
+ end
28
29
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module TurbolinksAnimate
2
- VERSION = '2.0.1'
4
+ VERSION = '2.0.2'
3
5
  end
metadata CHANGED
@@ -1,71 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbolinks-animate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-14 00:00:00.000000000 Z
11
+ date: 2019-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: railties
14
+ name: mozaic
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '2.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
- version: '5.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: mozaic
28
+ name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '5.2'
34
34
  type: :runtime
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: '2.0'
40
+ version: '5.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.7'
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
- version: '3.7'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '0.52'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
- version: '0.52'
82
+ version: '0'
69
83
  description: A dead simple & powerful way of adding rich & adaptive animations to
70
84
  your Rails app which is already using Turbolinks™.
71
85
  email: me@jonhue.me
@@ -73,7 +87,6 @@ executables: []
73
87
  extensions: []
74
88
  extra_rdoc_files: []
75
89
  files:
76
- - CHANGELOG.md
77
90
  - LICENSE
78
91
  - README.md
79
92
  - app/helpers/turbolinks_animate_helper.rb
@@ -82,7 +95,7 @@ files:
82
95
  - lib/turbolinks-animate/engine.rb
83
96
  - lib/turbolinks-animate/railtie.rb
84
97
  - lib/turbolinks-animate/version.rb
85
- homepage: https://github.com/jonhue/turbolinks-animate
98
+ homepage: https://github.com/jonhue/turbolinks-animate-rails
86
99
  licenses:
87
100
  - MIT
88
101
  metadata: {}
@@ -101,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
114
  - !ruby/object:Gem::Version
102
115
  version: '0'
103
116
  requirements: []
104
- rubyforge_project:
105
- rubygems_version: 2.7.6
117
+ rubygems_version: 3.0.3
106
118
  signing_key:
107
119
  specification_version: 4
108
120
  summary: Rich & adaptive animations for apps using Rails w/ Turbolinks™
@@ -1,32 +0,0 @@
1
- # Changelog
2
-
3
- ### master
4
-
5
- * nothing yet
6
-
7
- ### 2.0.0 - 2018/02/17
8
-
9
- * features
10
- * support webpack
11
- * added `'turbolinks-animate'` mozaic component
12
-
13
- ### 1.3.0 - 2018/01/19
14
-
15
- * enhancements
16
- * updated [turbolinks-animate.js](https://github.com/jonhue/turbolinks-animate.js) to `2.0.0`
17
-
18
- ### 1.2.0 - 2018/01/06
19
-
20
- * enhancements
21
- * automatically include `TurbolinksAnimateHelper` in controllers
22
- * updated [turbolinks-animate.js](https://github.com/jonhue/turbolinks-animate.js) to `1.3.8`
23
-
24
- ### 1.1.0 - 2017/12/17
25
-
26
- * enhancements
27
- * add animate.css to asset pipeline
28
- * bugfixes
29
-
30
- ### 1.0.0 - 2017/12/17
31
-
32
- * initial release