external_link_to 0.1.0 → 1.0.0

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: d17abb5ad38408677624c2e779a6a43e97d47ad309f86a5aaeeb7bc1c57e08e3
4
- data.tar.gz: 555cce05a2935d965e5a796da2d5da60fa70c4c4f967cfce7db08d45e328b3d3
3
+ metadata.gz: 3671d051debc6592d5e1a531305a2ec425c4d292764995dc1a12a166d3164079
4
+ data.tar.gz: b63bb8878717bcb623e4b1a239192fdb3f07c73afff44f5187ff00e2e2d8c8a3
5
5
  SHA512:
6
- metadata.gz: 518f4472196fbe155b793ea370b4668e72d51f18fb106b4e150c4e48e2680965dcebf8bf30ffcc14cd0cce646a40af16ffd89f1ea9849d09627aedca2ef505c5
7
- data.tar.gz: 63a5cc0937ae7701f7d6e2117b38c56cb8e24e3de35fec8efc5f7819c20e5e9b25bfb3e9a954b7fae177b54c8f2b124b06b7057fbde6dca3a92a08e45f618bc5
6
+ metadata.gz: 1b58d4a02a3934a209802eb6b8753d822c64da2595ad58913b26000c7aade007843c76ca4a2ef5ad793cb02367c9d05ab7758ad35126cc5360e4fb2eb11f914f
7
+ data.tar.gz: 0d629dd018892457e9d61226298095f9a26ebd7b74a03512a883a0358665012e5e11b9d6ba336290572aa4e46f7c713ee50741a59293e4294e2476e590ad457f
@@ -0,0 +1,16 @@
1
+ name: Test
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ rubocop:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v1
10
+ - uses: actions/setup-ruby@v1
11
+ with:
12
+ ruby-version: 2.6.x
13
+ - run: |
14
+ gem install bundler --no-document
15
+ bundle install -j $(nproc) --quiet
16
+ bundle exec rspec
@@ -0,0 +1,2 @@
1
+ Layout/LineLength:
2
+ Enabled: false
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## Unreleased
9
+
10
+ ## 1.0.0
11
+
12
+ ### Added
13
+
14
+ - Adding specs
15
+
16
+ ## 0.1.0
17
+
18
+ ### Added
19
+
20
+ - Adding `external_link_to` helper.
@@ -30,6 +30,7 @@ GEM
30
30
  builder (3.2.4)
31
31
  concurrent-ruby (1.1.6)
32
32
  crass (1.0.6)
33
+ diff-lcs (1.4.4)
33
34
  erubi (1.9.0)
34
35
  i18n (1.8.3)
35
36
  concurrent-ruby (~> 1.0)
@@ -54,6 +55,19 @@ GEM
54
55
  rainbow (3.0.0)
55
56
  regexp_parser (1.7.1)
56
57
  rexml (3.2.4)
58
+ rspec (3.9.0)
59
+ rspec-core (~> 3.9.0)
60
+ rspec-expectations (~> 3.9.0)
61
+ rspec-mocks (~> 3.9.0)
62
+ rspec-core (3.9.2)
63
+ rspec-support (~> 3.9.3)
64
+ rspec-expectations (3.9.2)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.9.0)
67
+ rspec-mocks (3.9.1)
68
+ diff-lcs (>= 1.2.0, < 2.0)
69
+ rspec-support (~> 3.9.0)
70
+ rspec-support (3.9.3)
57
71
  rubocop (0.86.0)
58
72
  parallel (~> 1.10)
59
73
  parser (>= 2.7.0.1)
@@ -78,7 +92,8 @@ PLATFORMS
78
92
  DEPENDENCIES
79
93
  bundler (~> 2.0)
80
94
  external_link_to!
95
+ rspec
81
96
  rubocop
82
97
 
83
98
  BUNDLED WITH
84
- 2.0.2
99
+ 2.1.4
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/guillaumebriday)
2
2
  ![](https://github.com/guillaumebriday/external_link_to/workflows/Lint/badge.svg)
3
+ ![](https://github.com/guillaumebriday/external_link_to/workflows/Test/badge.svg)
3
4
  [![](https://img.shields.io/gem/dt/external_link_to.svg)](https://rubygems.org/gems/external_link_to)
4
5
  [![](https://img.shields.io/gem/v/external_link_to.svg)](https://rubygems.org/gems/external_link_to)
5
6
  [![](https://img.shields.io/github/license/guillaumebriday/external_link_to.svg)](https://github.com/guillaumebriday/external_link_to)
@@ -24,7 +25,7 @@ $ bundle
24
25
 
25
26
  ## Usage
26
27
 
27
- For instance, this link:
28
+ For instance, this link:
28
29
  ```ruby
29
30
  link_to 'Home', root_path, rel: 'noopener noreferrer', target: '_blank'
30
31
  # => <a rel="noopener noreferrer" target="_blank" href="/">Profile</a>Home
@@ -14,11 +14,9 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'https://github.com/guillaumebriday/external_link_to'
15
15
  spec.license = 'MIT'
16
16
 
17
- # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
18
-
19
17
  spec.metadata['homepage_uri'] = spec.homepage
20
18
  spec.metadata['source_code_uri'] = 'https://github.com/guillaumebriday/external_link_to'
21
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
19
+ spec.metadata["changelog_uri"] = "https://github.com/guillaumebriday/external_link_to/blob/master/CHANGELOG.md"
22
20
 
23
21
  # Specify which files should be added to the gem when it is released.
24
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -29,6 +27,7 @@ Gem::Specification.new do |spec|
29
27
  spec.require_paths = ['lib']
30
28
 
31
29
  spec.add_development_dependency 'bundler', '~> 2.0'
30
+ spec.add_development_dependency 'rspec'
32
31
  spec.add_development_dependency 'rubocop'
33
32
 
34
33
  spec.add_dependency 'actionpack'
@@ -1,6 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'action_view'
4
+
3
5
  module ExternalLinkTo # rubocop:disable Style/Documentation
6
+ include ActionView::Helpers::UrlHelper
7
+
4
8
  def external_link_to(*args, &block)
5
9
  name = block_given? ? capture(&block) : args.shift
6
10
  options = args.shift || {}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExternalLinkTo
4
- VERSION = '0.1.0'
4
+ VERSION = '1.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: external_link_to
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Briday
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-03 00:00:00.000000000 Z
11
+ date: 2020-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rubocop
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -61,8 +75,11 @@ extra_rdoc_files: []
61
75
  files:
62
76
  - ".github/FUNDING.yml"
63
77
  - ".github/workflows/lint.yml"
78
+ - ".github/workflows/test.yml"
64
79
  - ".gitignore"
65
80
  - ".rspec"
81
+ - ".rubocop.yml"
82
+ - CHANGELOG.md
66
83
  - Gemfile
67
84
  - Gemfile.lock
68
85
  - LICENSE.txt
@@ -78,6 +95,7 @@ licenses:
78
95
  metadata:
79
96
  homepage_uri: https://github.com/guillaumebriday/external_link_to
80
97
  source_code_uri: https://github.com/guillaumebriday/external_link_to
98
+ changelog_uri: https://github.com/guillaumebriday/external_link_to/blob/master/CHANGELOG.md
81
99
  post_install_message:
82
100
  rdoc_options: []
83
101
  require_paths: