nice_partials 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af46913e68f4ca3d87579e5491ce53f040f11878d4671df03cfd7fc89723b66d
4
- data.tar.gz: 1b4938352c280f79aed63af5caea1899737d4b8f8961e13cf0013c1790aeb88d
3
+ metadata.gz: 3275a33c9f1de9e8267042ab36b485297451804bb1c704082576890d800a20cd
4
+ data.tar.gz: 7b55dd85d2d291eb411b564819c602e039dc412ec8cbb82df7b58f8472d062e4
5
5
  SHA512:
6
- metadata.gz: 966d51762add5e871895c3eca4b8860fe3aff73a35e144095566b996ec7763a9df34e419cc4a1aa2d97078f3411e9ac0aeb6ac3da0c24f3b38db4ba08b6a5a2d
7
- data.tar.gz: 2fedb3928eaa838b754d6bb7fe84638e0588a6dab2574200ad49c810bad1bbf360b872e535b5d62516ee02e468adfe801b6e90c136d899d8792cab18eb5b8ac5
6
+ metadata.gz: ef49218a25d20bb8b0446b5b0dd975fb173191ea1e236e9dfa6a700fec717ef9b24f8f06fcc114b4e1e731ddf62aed143cd225193cd6ebc64acb4fd06edb0e3b
7
+ data.tar.gz: 52e0f030102269996e35132ad2ff16bcb94100faca76787b13059a31450c0d65456961b71bf69d2610f46bb8f48a9b410f4a01090c96f946d2d5b1ec6ece9b8c
data/.travis.yml CHANGED
@@ -2,6 +2,7 @@ sudo: false
2
2
  language: ruby
3
3
 
4
4
  rvm:
5
+ - 3.0
5
6
  - 2.7
6
7
  - 2.6
7
8
  - 2.5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## CHANGELOG
2
2
 
3
+ * Rely on `ActiveSupport.on_load :action_view`
4
+ * Add support for Ruby 3.0
5
+
3
6
  ### 0.1.0
4
7
 
5
8
  * Initial release
data/README.md CHANGED
@@ -37,6 +37,17 @@ These partials can still be utilized with a standard `render` call, but you can
37
37
  Nice Partials is a lightweight and hopefully more Rails-native alternative to [ViewComponent](http://viewcomponent.org). It aims to provide many of the same benefits as ViewComponent while requiring less ceremony. This specific approach originated with [Bullet Train](https://bullettrain.co)'s "Field Partials" and was later reimagined and completely reimplemented by Dom Christie.
38
38
 
39
39
 
40
+ ## Sponsored By
41
+
42
+ <a href="https://bullettrain.co" target="_blank">
43
+ <img src="https://github.com/CanCanCommunity/cancancan/raw/develop/logo/bullet_train.png" alt="Bullet Train" width="400"/>
44
+ </a>
45
+ <br/>
46
+ <br/>
47
+
48
+ > Would you like to support Nice Partials development and have your logo featured here? [Reach out!](http://twitter.com/andrewculver)
49
+
50
+
40
51
  ## Benefits of Nice Partials
41
52
 
42
53
  Compared to something more heavy-handed, Nice Partials:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NicePartials
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
data/lib/nice_partials.rb CHANGED
@@ -16,4 +16,6 @@ def nice_partials_locale_prefix_from_view_context_and_block(context, block)
16
16
  partial_location.split('.').first.gsub('/_', '/').gsub('/', '.')
17
17
  end
18
18
 
19
- ActionView::Base.send :include, NicePartials::Helper
19
+ ActiveSupport.on_load :action_view do
20
+ include NicePartials::Helper
21
+ end
@@ -17,5 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.required_ruby_version = "~> 2.0"
20
+ gem.required_ruby_version = ">= 2.0"
21
+
22
+ gem.add_dependency "actionview", '>= 4.2.6'
21
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nice_partials
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
@@ -9,8 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-02-11 00:00:00.000000000 Z
13
- dependencies: []
12
+ date: 2021-10-05 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: actionview
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 4.2.6
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 4.2.6
14
28
  description: A little bit of magic to make partials perfect for components.
15
29
  email:
16
30
  - andrew.culver@gmail.com
@@ -45,7 +59,7 @@ require_paths:
45
59
  - lib
46
60
  required_ruby_version: !ruby/object:Gem::Requirement
47
61
  requirements:
48
- - - "~>"
62
+ - - ">="
49
63
  - !ruby/object:Gem::Version
50
64
  version: '2.0'
51
65
  required_rubygems_version: !ruby/object:Gem::Requirement