link_to_active_state 1.0.8 → 1.0.9

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
- SHA1:
3
- metadata.gz: 29ddfa2d41bf42590f15f13cd9855ad7d0975461
4
- data.tar.gz: 64ffecdfbe4acd7be542c9deb3631fc807eb2542
2
+ SHA256:
3
+ metadata.gz: 6235f67887d012b32ed65cc5639c1d4235600e9572e3cf70a864caa4b300a83a
4
+ data.tar.gz: 47dd042be4c6b327b5aaa4f2c620ffc40d5eb713633ec8525cf83a6ec852151d
5
5
  SHA512:
6
- metadata.gz: 643104f46becb061bacf9b052f7dcd6c0fe0421ae1140f4cd04987f15ae6326690a9c39ba76ae1173ec81e26e7a8f83e6bddff0682a0306fb4944436d25bf9ee
7
- data.tar.gz: 3937bced3f91d5ef03ba0b8c855575e642d77ed4714b4fba5d7ecc0b0336286a45fb39b922d436b0dd9f6f100e58189d9c7c3724a342defbb9c8a2f92b0b1e2f
6
+ metadata.gz: 7be4375b7dd4fc5166fdc933e8d24c165f0b04f1c3d5c49883754a0436b1d9406c6dd85bf96e04d834a0290eff4cb540e9638e6296348fcc40fe0e23cf56e9f1
7
+ data.tar.gz: 0eba6b78e4d563f9c59d910371a779858a89f70f3ef6a1a89038ec50343f18383cc18faae87033c2109f6c9f83af96048ed7a8ba05a53da686ff2d2fc0f4a0ea
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # LinkToActiveState
2
2
 
3
- [![Build Status](https://travis-ci.org/robotmay/link_to_active_state.png?branch=master)](https://travis-ci.org/robotmay/link_to_active_state) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/robotmay/link_to_active_state) [![Dependency Status](https://gemnasium.com/robotmay/link_to_active_state.png)](https://gemnasium.com/robotmay/link_to_active_state)
3
+ [![Build Status](https://travis-ci.org/robotmay/link_to_active_state.png?branch=master)](https://travis-ci.org/robotmay/link_to_active_state)
4
+ [![Gem Version](https://badge.fury.io/rb/link_to_active_state.svg)](http://badge.fury.io/rb/link_to_active_state)
4
5
 
5
6
  A simple gem to implement active states on links using the standard Rails `link_to` helper.
6
7
  This can be helpful in navigation lists or buttons to give them a class when the current URL matches a condition on the link helper.
@@ -1,3 +1,3 @@
1
1
  module LinkToActiveState
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  end
@@ -5,7 +5,8 @@ module LinkToActiveState
5
5
  module ViewHelpers
6
6
  module UrlHelper
7
7
  def self.included(base)
8
- base.send(:alias_method_chain, :link_to, :active_state)
8
+ base.send(:alias_method, :link_to_without_active_state, :link_to)
9
+ base.send(:alias_method, :link_to, :link_to_with_active_state)
9
10
  end
10
11
 
11
12
  def link_to_with_active_state(*args, &block)
@@ -7,10 +7,11 @@ Gem::Specification.new do |gem|
7
7
  gem.name = "link_to_active_state"
8
8
  gem.version = LinkToActiveState::VERSION
9
9
  gem.authors = ["Robert May"]
10
- gem.email = ["robotmay@gmail.com"]
10
+ gem.email = ["rob@afternoonrobot.co.uk"]
11
11
  gem.description = %q{A simple gem to implement active states on links using the standard Rails `link_to` helper.}
12
12
  gem.summary = %q{Active states for links using the Rails link_to helper.}
13
- gem.homepage = ""
13
+ gem.homepage = "https://github.com/robotmay/link_to_active_state"
14
+ gem.licenses = ["MIT"]
14
15
 
15
16
  gem.files = `git ls-files`.split($/)
16
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -8,7 +8,7 @@ module App
8
8
  end
9
9
 
10
10
  describe LinkToActiveState::ViewHelpers::UrlHelper do
11
- let(:helper) { App::Helper.new }
11
+ let(:helper) { App::Helper.new(ActionView::LookupContext.new([Pathname.new(__dir__).to_s]), {}, nil) }
12
12
 
13
13
  let(:request) do
14
14
  class Request
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: link_to_active_state
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert May
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-10 00:00:00.000000000 Z
11
+ date: 2021-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -41,7 +41,7 @@ dependencies:
41
41
  description: A simple gem to implement active states on links using the standard Rails
42
42
  `link_to` helper.
43
43
  email:
44
- - robotmay@gmail.com
44
+ - rob@afternoonrobot.co.uk
45
45
  executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
@@ -61,8 +61,9 @@ files:
61
61
  - spec/link_to_active_state/view_helpers_spec.rb
62
62
  - spec/link_to_active_state_spec.rb
63
63
  - spec/spec_helper.rb
64
- homepage: ''
65
- licenses: []
64
+ homepage: https://github.com/robotmay/link_to_active_state
65
+ licenses:
66
+ - MIT
66
67
  metadata: {}
67
68
  post_install_message:
68
69
  rdoc_options: []
@@ -79,8 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
80
  - !ruby/object:Gem::Version
80
81
  version: '0'
81
82
  requirements: []
82
- rubyforge_project:
83
- rubygems_version: 2.4.5.1
83
+ rubygems_version: 3.0.3
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Active states for links using the Rails link_to helper.