shortener 0.8.0 → 0.8.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
- SHA1:
3
- metadata.gz: 0ff66256668eb71d5b42010c191233c7346c2651
4
- data.tar.gz: f4cf3ffadd4b4f74ae6076be7f9fa13edf55b5ea
2
+ SHA256:
3
+ metadata.gz: a65ebf87f18746199fa76ac0a91f3365d0c34b9c969f897c25422370a676355b
4
+ data.tar.gz: 8a06527bce6d9f10805d2a97525b04dc631ee1c9115cc3e016bb5263307269a3
5
5
  SHA512:
6
- metadata.gz: c88fd4cda719d6759af9f1faa5fc70829f18ff99662f77dc10ae33f20e9debcfabd051c5fe7157a75b505f45d164752cd40ead26ed110be6c09c1427e81e382e
7
- data.tar.gz: 0e4ae113ede69db12a0b9901747bb20bb0ed4a72e51817e619524c166cc8cf1a8159f69c0352af843a48650773c3aa98e62d92a44f5e5ffcbcfd083265a0c629
6
+ metadata.gz: 62ec7fe6fc1a26fd89804c967a00fffa9d7e9235ecb10d1b338dd188ca5f12bcf964ac983e2bac597b1a97a2b5195002060c81db280355701967a6d1b324bb60
7
+ data.tar.gz: 427b8118350ff106e97828caf7ce41433ae1dcc69d67c902e6e871555613e64bd4a5256709a22f3bf4d95c587cc96f43235bd38f6eb91cb17b454a24039337d8
data/.gitignore CHANGED
@@ -12,4 +12,6 @@ bin/*
12
12
  *.swp
13
13
  Gemfile.lock
14
14
  .rvmrc
15
- .redcar/*
15
+ .redcar/*
16
+ gemfiles/*.lock
17
+ spec/dummy/tmp
data/.travis.yml CHANGED
@@ -1,16 +1,32 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.2.10
4
+ - 2.2
5
5
  - 2.3
6
6
  - 2.4
7
7
  - 2.5
8
-
9
- matrix:
10
- fast_finish: true
8
+ - 2.6
9
+ - 2.7
11
10
 
12
11
  gemfile:
13
12
  - gemfiles/rails_4.gemfile
14
13
  - gemfiles/rails_5.0.gemfile
15
14
  - gemfiles/rails_5.1.gemfile
16
15
  - gemfiles/rails_5.2.gemfile
16
+ - gemfiles/rails_6.0.gemfile
17
+
18
+ jobs:
19
+ fast_finish: true
20
+ exclude:
21
+ - rvm: 2.6
22
+ gemfile: gemfiles/rails_4.gemfile
23
+ - rvm: 2.7
24
+ gemfile: gemfiles/rails_4.gemfile
25
+ - rvm: 2.2
26
+ gemfile: gemfiles/rails_5.2.gemfile
27
+ - rvm: 2.2
28
+ gemfile: gemfiles/rails_6.0.gemfile
29
+ - rvm: 2.3
30
+ gemfile: gemfiles/rails_6.0.gemfile
31
+ - rvm: 2.4
32
+ gemfile: gemfiles/rails_6.0.gemfile
data/Appraisals CHANGED
@@ -1,9 +1,11 @@
1
1
  appraise "rails_4" do
2
2
  gem "rails", "~> 4.2.10"
3
+ gem "sqlite3", "~> 1.3.6"
3
4
  end
4
5
 
5
6
  appraise "rails_5.0" do
6
7
  gem "rails", "~> 5.0.7"
8
+ gem "sqlite3", "~> 1.3.6"
7
9
  end
8
10
 
9
11
  appraise "rails_5.1" do
@@ -11,5 +13,9 @@ appraise "rails_5.1" do
11
13
  end
12
14
 
13
15
  appraise "rails_5.2" do
14
- gem "rails", "5.2.0"
16
+ gem "rails", "~> 5.2.0"
17
+ end
18
+
19
+ appraise "rails_6.0" do
20
+ gem "rails", "~> 6.0.0"
15
21
  end
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify any dependencies in the gemspec
4
4
  gemspec
data/README.rdoc CHANGED
@@ -1,4 +1,6 @@
1
- {<img src="https://secure.travis-ci.org/jpmcgrath/shortener.png?branch=master" alt="Build Status" />}[http://travis-ci.org/jpmcgrath/shortener] {<img src="https://codeclimate.com/github/jpmcgrath/shortener/badges/gpa.svg" />}[https://codeclimate.com/github/jpmcgrath/shortener]
1
+ {<img src="https://secure.travis-ci.org/jpmcgrath/shortener.svg?branch=master" alt="Build Status" />}[http://travis-ci.org/jpmcgrath/shortener]
2
+ {<img src="https://codeclimate.com/github/jpmcgrath/shortener/badges/gpa.svg" />}[https://codeclimate.com/github/jpmcgrath/shortener]
3
+ {<img src="https://badge.fury.io/rb/shortener.svg" alt="Gem version" />}[http://badge.fury.io/rb/shortener]
2
4
 
3
5
  = Shortener
4
6
 
@@ -14,7 +16,7 @@ The majority of the Shortener consists of three parts:
14
16
 
15
17
  === Dependencies
16
18
 
17
- Shortener is designed to work from within a Rails 3 and Rails 4 applications. It has dependancies Rails core components like ActiveRecord, ActionController, the rails routing engine and more.
19
+ Shortener is designed to work from within a Ruby on Rail applications. It has dependancies Rails core components like ActiveRecord, ActionController, the rails routing engine and more.
18
20
 
19
21
  === Ruby Version Support
20
22
 
@@ -61,15 +63,9 @@ migration:
61
63
  * The link records a count of how many times it has been “un-shortened”;
62
64
  * The link can be associated with a user, this allows for stats of the link usage for a particular user and other interesting things;
63
65
 
64
- === Future improvements:
65
-
66
- * There has not been an attempt to remove ambiguous characters (i.e. 1 l and capital i, or 0 and O etc.) from the unique key generated for the link. This means people might copy the link incorrectly if copying the link by hand;
67
- * The system could pre-generate unique keys in advance, avoiding the database penalty when checking that a newly generated key is unique;
68
- * The system could store/cache the shortened URL if the url is to be continually rendered;
69
-
70
66
  == Installation
71
67
 
72
- Shortener is compatible with Rails v3, v4 & v5. To install, add to your Gemfile:
68
+ Shortener is compatible with Rails v3, v4, v5, & v6. To install, add to your Gemfile:
73
69
 
74
70
  gem 'shortener'
75
71
 
@@ -101,6 +97,15 @@ the upper and lower case charset, by including the following:
101
97
 
102
98
  Shortener.charset = :alphanumcase
103
99
 
100
+ If you want to use a custom charset, you can create your own combination by creating an array of possible values, such as allowing underscore and dashes:
101
+
102
+ Shortener.charset = ("a".."z").to_a + (0..9).to_a + ["-", "_"]
103
+
104
+ By default, <b>Shortener assumes URLs to be valid web URLs</b> and normalizes them in an effort to make sure there are no duplicate records generated for effectively same URLs with differences of only non-effective slash etc.
105
+ You can control this option if it interferes for any of your logic. One common case is for mobile app links or universal links where normalization can corrupt the URLs of form <tt>appname://some_route</tt>
106
+
107
+ Shortener.auto_clean_url = true
108
+
104
109
  == Usage
105
110
 
106
111
  To generate a Shortened URL object for the URL "http://example.com" within your controller / models do the following:
@@ -143,7 +148,9 @@ And to access those URLs:
143
148
 
144
149
  You can pass in your own key when generating a shortened URL. This should be unique.
145
150
 
146
- Shortener::ShortenedUrl.generate("example.com", owner: user, custom_key: "my-key")
151
+ *Important:* Custom keys can't contain characters other than those defined in *Shortener.charset*. Default is numbers and lowercase a-z (See *Configuration*).
152
+
153
+ Shortener::ShortenedUrl.generate("example.com", owner: user, custom_key: "mykey")
147
154
 
148
155
  short_url("http://example.com", custom_key: 'yourkey')
149
156
 
@@ -170,7 +177,7 @@ to create a fresh record, you can pass the following argument:
170
177
  === Forbidden keys
171
178
 
172
179
  You can ensure that records with forbidden keys will not be generated.
173
- In rails you can put next line into config/initializers/shortener.rb
180
+ In Rails you can put next line into config/initializers/shortener.rb
174
181
 
175
182
  Shortener.forbidden_keys.concat %w(terms promo)
176
183
 
@@ -280,4 +287,4 @@ To contribute:
280
287
  6. Create a new Pull Request
281
288
  7. Ensure the build is passing
282
289
 
283
- Note: We adhere to the community driven Ruby style guide: https://github.com/bbatsov/ruby-style-guide
290
+ Note: We adhere to the community driven Ruby style guide: https://github.com/bbatsov/ruby-style-guide
@@ -4,7 +4,7 @@ class Shortener::ShortenedUrl < ActiveRecord::Base
4
4
 
5
5
  validates :url, presence: true
6
6
 
7
- before_create :generate_unique_key
7
+ around_create :generate_unique_key
8
8
 
9
9
  # allows the shortened link to be associated with a user
10
10
  if ActiveRecord::VERSION::MAJOR >= 5
@@ -35,7 +35,7 @@ class Shortener::ShortenedUrl < ActiveRecord::Base
35
35
  def self.generate!(destination_url, owner: nil, custom_key: nil, expires_at: nil, fresh: false, category: nil)
36
36
  # if we get a shortened_url object with a different owner, generate
37
37
  # new one for the new owner. Otherwise return same object
38
- result = if destination_url.is_a? Shortener::ShortenedUrl
38
+ if destination_url.is_a? Shortener::ShortenedUrl
39
39
  if destination_url.owner == owner
40
40
  destination_url
41
41
  else
@@ -52,14 +52,13 @@ class Shortener::ShortenedUrl < ActiveRecord::Base
52
52
  scope = owner ? owner.shortened_urls : self
53
53
  creation_method = fresh ? 'create' : 'first_or_create'
54
54
 
55
- scope.where(url: clean_url(destination_url), category: category).send(
55
+ url_to_save = Shortener.auto_clean_url ? clean_url(destination_url) : destination_url
56
+ scope.where(url: url_to_save, category: category).send(
56
57
  creation_method,
57
58
  custom_key: custom_key,
58
59
  expires_at: expires_at
59
60
  )
60
61
  end
61
-
62
- result
63
62
  end
64
63
 
65
64
  # return shortened url on success, nil on failure
@@ -127,15 +126,24 @@ class Shortener::ShortenedUrl < ActiveRecord::Base
127
126
 
128
127
  private
129
128
 
130
- def generate_unique_key
129
+ def self.unique_key_candidate
130
+ charset = ::Shortener.key_chars
131
+ (0...::Shortener.unique_key_length).map{ charset[rand(charset.size)] }.join
132
+ end
133
+
134
+ def generate_unique_key(retries = Shortener.persist_retries)
131
135
  begin
132
136
  self.unique_key = custom_key || self.class.unique_key_candidate
133
137
  self.custom_key = nil
134
- end while self.class.exists?(unique_key: unique_key) && custom_key.blank?
135
- end
138
+ end while self.class.unscoped.exists?(unique_key: unique_key)
136
139
 
137
- def self.unique_key_candidate
138
- charset = ::Shortener.key_chars
139
- (0...::Shortener.unique_key_length).map{ charset[rand(charset.size)] }.join
140
+ yield
141
+ rescue ActiveRecord::RecordNotUnique
142
+ if retries <= 0
143
+ raise
144
+ else
145
+ retries -= 1
146
+ retry
147
+ end
140
148
  end
141
149
  end
@@ -3,5 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.2.10"
6
+ gem "sqlite3", "~> 1.3.6"
6
7
 
7
8
  gemspec path: "../"
@@ -3,5 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 5.0.7"
6
+ gem "sqlite3", "~> 1.3.6"
6
7
 
7
8
  gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "5.2.0"
5
+ gem "rails", "~> 5.2.0"
6
6
 
7
7
  gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 6.0.0"
6
+
7
+ gemspec path: "../"
data/lib/shortener.rb CHANGED
@@ -19,8 +19,9 @@ module Shortener
19
19
  self.unique_key_length = 5
20
20
 
21
21
  # character set to chose from:
22
- # :alphanum - a-z0-9 - has about 60 million possible combos
23
- # :alphanumcase - a-zA-Z0-9 - has about 900 million possible combos
22
+ # :alphanum // a-z0-9 ## has about 60 million possible combos
23
+ # :alphanumcase // a-zA-Z0-9 ## has about 900 million possible combos
24
+ # ("a".."z").to_a + ("A".."Z").to_a + (0..9).to_a + ["-", "_"] ## define a custom set
24
25
  mattr_accessor :charset
25
26
  self.charset = :alphanum
26
27
 
@@ -36,9 +37,16 @@ module Shortener
36
37
  mattr_accessor :ignore_robots
37
38
  self.ignore_robots = false
38
39
 
40
+ # persist_retries - number of retries on ActiveRecord::RecordNotUnique error
41
+ mattr_accessor :persist_retries
42
+ self.persist_retries = 3
43
+
44
+ # auto_clean_url - controls url cleaning mechanism, set it to false to disable
45
+ mattr_accessor :auto_clean_url
46
+ self.auto_clean_url = true
39
47
 
40
48
  def self.key_chars
41
- CHARSETS[charset]
49
+ charset.is_a?(Symbol) ? CHARSETS[charset] : charset
42
50
  end
43
51
  end
44
52
 
@@ -6,8 +6,5 @@ class Shortener::Railtie < ::Rails::Railtie #:nodoc:
6
6
  ActiveSupport.on_load :active_record do
7
7
  extend Shortener::ActiveRecordExtension
8
8
  end
9
- ActiveSupport.on_load :action_view do
10
- include Shortener::ShortenerHelper
11
- end
12
9
  end
13
10
  end
@@ -1,3 +1,3 @@
1
1
  module Shortener
2
- VERSION = '0.8.0'.freeze
2
+ VERSION = '0.8.2'.freeze
3
3
  end
data/shortener.gemspec CHANGED
@@ -12,7 +12,6 @@ Gem::Specification.new do |s|
12
12
  s.authors = [ "James P. McGrath", "Michael Reinsch" ]
13
13
  s.email = [ "gems@jamespmcgrath.com", "michael@mobalean.com" ]
14
14
  s.homepage = "http://jamespmcgrath.com/projects/shortener"
15
- s.rubyforge_project = "shortener"
16
15
  s.required_rubygems_version = "> 2.1.0"
17
16
 
18
17
  s.add_dependency "voight_kampff", '~> 1.1.2'
@@ -24,6 +23,7 @@ Gem::Specification.new do |s|
24
23
  s.add_development_dependency "faker"
25
24
  s.add_development_dependency "byebug"
26
25
  s.add_development_dependency "appraisal"
26
+ s.add_development_dependency "capybara"
27
27
 
28
28
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
29
29
  s.require_path = 'lib'
@@ -132,6 +132,25 @@ describe Shortener::ShortenedUrlsController, type: :controller do
132
132
  end
133
133
  end
134
134
 
135
+ context "custom charset set" do
136
+ before do
137
+ Shortener::ShortenedUrl.delete_all
138
+ Shortener.charset = ("a".."z").to_a + ("A".."Z").to_a + (0..9).to_a + ["-", "_"]
139
+ end
140
+
141
+ after do
142
+ Shortener.charset = :alphanum
143
+ end
144
+
145
+ context 'key with valid characters' do
146
+ let(:key) { "cust-Key_123" }
147
+ let(:custom_url) { Shortener::ShortenedUrl.generate(Faker::Internet.url, custom_key: key) }
148
+ it 'allows if in custom charset' do
149
+ expect(custom_url.unique_key).to eq key
150
+ end
151
+ end
152
+ end
153
+
135
154
  context 'expired code' do
136
155
  let(:expired_url) { Shortener::ShortenedUrl.generate(Faker::Internet.url, expires_at: 1.hour.ago) }
137
156
  describe "GET show with expired code" do
File without changes
@@ -0,0 +1,3 @@
1
+ class HomeController < ApplicationController
2
+ def show; end
3
+ end
@@ -0,0 +1 @@
1
+ Example: <%= short_url("http://example.com") %>
@@ -2,8 +2,6 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
- <%= stylesheet_link_tag :all %>
6
- <%= javascript_include_tag :defaults %>
7
5
  <%= csrf_meta_tag %>
8
6
  </head>
9
7
  <body>
@@ -1,4 +1,4 @@
1
1
  Dummy::Application.routes.draw do
2
2
  get '/:id' => "shortener/shortened_urls#show"
3
- root to: "application_controller#show"
3
+ root to: "home#show"
4
4
  end
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ describe Shortener, type: :feature do
4
+ it "includes 'short_url'-helper into public namespace" do
5
+ visit root_path
6
+ expect(page).to have_content(%r{http://www.example.com/[a-zA-Z0-9]{5}})
7
+ end
8
+ end
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe Shortener::ShortenedUrl, type: :model do
5
- it { is_expected.to belong_to :owner }
5
+ it { is_expected.to belong_to(:owner).optional }
6
6
  it { is_expected.to validate_presence_of :url }
7
7
 
8
8
  describe '#generate!' do
@@ -123,10 +123,45 @@ describe Shortener::ShortenedUrl, type: :model do
123
123
 
124
124
  context "duplicate unique key" do
125
125
  let(:duplicate_key) { 'ABCDEF' }
126
- it 'should try until it finds a non-dup key' do
126
+ context 'without retry' do
127
+ around do |spec|
128
+ tries = Shortener.persist_retries
129
+ Shortener.persist_retries = 0
130
+ spec.run
131
+ Shortener.persist_retries = tries
132
+ end
133
+
134
+ it 'finds a non-dup key' do
135
+ Shortener::ShortenedUrl.where(unique_key: duplicate_key).delete_all
136
+ Shortener::ShortenedUrl.create!(url: Faker::Internet.url, custom_key: duplicate_key)
137
+ short_url = Shortener::ShortenedUrl.create!(url: Faker::Internet.url, custom_key: duplicate_key)
138
+ expect(short_url).not_to be_nil
139
+ expect(short_url.unique_key).not_to be_nil
140
+ expect(short_url.unique_key).not_to eq duplicate_key
141
+ end
142
+
143
+ it 'unscoped query to finds a non-dup key' do
144
+ Shortener::ShortenedUrl.where(unique_key: duplicate_key).delete_all
145
+ Shortener::ShortenedUrl.create!(url: Faker::Internet.url, custom_key: duplicate_key)
146
+ short_url = Shortener::ShortenedUrl.where(
147
+ url: Faker::Internet.url, category: :test
148
+ ).create!(url: Faker::Internet.url, custom_key: duplicate_key)
149
+ expect(short_url).not_to be_nil
150
+ expect(short_url.unique_key).not_to be_nil
151
+ expect(short_url.unique_key).not_to eq duplicate_key
152
+ end
153
+ end
154
+
155
+ it 'use retry in case with DB unique constraint exception' do
127
156
  Shortener::ShortenedUrl.where(unique_key: duplicate_key).delete_all
128
157
  Shortener::ShortenedUrl.create!(url: Faker::Internet.url, custom_key: duplicate_key)
129
- short_url = Shortener::ShortenedUrl.create!(url: Faker::Internet.url, unique_key: duplicate_key)
158
+
159
+ query = double
160
+ allow(query).to receive(:exists?).and_return(false)
161
+ allow(Shortener::ShortenedUrl).to receive(:unscoped).and_return(query).once
162
+ allow(Shortener::ShortenedUrl).to receive(:unscoped).and_call_original
163
+
164
+ short_url = Shortener::ShortenedUrl.create!(url: Faker::Internet.url, custom_key: duplicate_key)
130
165
  expect(short_url).not_to be_nil
131
166
  expect(short_url.unique_key).not_to be_nil
132
167
  expect(short_url.unique_key).not_to eq duplicate_key
@@ -142,8 +177,26 @@ describe Shortener::ShortenedUrl, type: :model do
142
177
  it 'finds the shortened url from slashless oath' do
143
178
  expect(Shortener::ShortenedUrl.generate!(path)).to eq existing_shortened_url
144
179
  end
145
- it "should look up exsiting URL" do
146
- expect(Shortener::ShortenedUrl.generate!("/#{path}")).to eq existing_shortened_url
180
+
181
+ context 'with auto_clean_url enabled by default' do
182
+ it "looks up existing cleaned URL" do
183
+ expect(Shortener::ShortenedUrl.generate!("/#{path}")).to eq existing_shortened_url
184
+ end
185
+ end
186
+
187
+ context 'with auto_clean_url disabled' do
188
+ around do |spec|
189
+ tries = Shortener.auto_clean_url
190
+ Shortener.auto_clean_url = false
191
+ spec.run
192
+ Shortener.auto_clean_url = tries
193
+ end
194
+
195
+ it "does not look up existing cleaned URL" do
196
+ shortened_url = Shortener::ShortenedUrl.generate!("/#{path}")
197
+ expect(shortened_url).not_to eq existing_shortened_url
198
+ expect(shortened_url.url).to eq "/#{path}"
199
+ end
147
200
  end
148
201
  end
149
202
  end
data/spec/spec_helper.rb CHANGED
@@ -7,6 +7,7 @@ require 'rspec/rails'
7
7
  require 'shoulda/matchers'
8
8
  require 'byebug'
9
9
  require 'faker'
10
+ require 'capybara/rspec'
10
11
 
11
12
  Rails.backtrace_cleaner.remove_silencers!
12
13
 
@@ -18,8 +19,11 @@ Shoulda::Matchers.configure do |config|
18
19
  end
19
20
 
20
21
  # Run any available migration
22
+ migration_path = File.expand_path("../dummy/db/migrate/", __FILE__)
21
23
  if ActiveRecord::Migrator.respond_to?(:migrate)
22
- ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
24
+ ActiveRecord::Migrator.migrate(migration_path)
25
+ elsif Rails::VERSION::MAJOR < 6
26
+ ActiveRecord::MigrationContext.new(migration_path).migrate
23
27
  else
24
- ActiveRecord::MigrationContext.new(File.expand_path("../dummy/db/migrate/", __FILE__)).migrate
28
+ ActiveRecord::MigrationContext.new(migration_path, ActiveRecord::Base.connection.schema_migration).migrate
25
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shortener
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James P. McGrath
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-07-27 00:00:00.000000000 Z
12
+ date: 2020-05-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: voight_kampff
@@ -123,6 +123,20 @@ dependencies:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: capybara
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
126
140
  description: Shortener is a Rails Engine Gem that makes it easy to create and interpret
127
141
  shortened URLs on your own domain from within your Rails application. Once installed
128
142
  Shortener will generate, store URLS and "unshorten" shortened URLs for your applications
@@ -148,6 +162,7 @@ files:
148
162
  - gemfiles/rails_5.0.gemfile
149
163
  - gemfiles/rails_5.1.gemfile
150
164
  - gemfiles/rails_5.2.gemfile
165
+ - gemfiles/rails_6.0.gemfile
151
166
  - lib/generators/shortener/shortener_generator.rb
152
167
  - lib/generators/shortener/templates/migration.rb
153
168
  - lib/shortener.rb
@@ -160,9 +175,12 @@ files:
160
175
  - spec/controllers/shortened_urls_controller_spec.rb
161
176
  - spec/dummy/.gitignore
162
177
  - spec/dummy/Rakefile
178
+ - spec/dummy/app/assets/config/manifest.js
163
179
  - spec/dummy/app/controllers/application_controller.rb
180
+ - spec/dummy/app/controllers/home_controller.rb
164
181
  - spec/dummy/app/helpers/application_helper.rb
165
182
  - spec/dummy/app/models/user.rb
183
+ - spec/dummy/app/views/home/show.html.erb
166
184
  - spec/dummy/app/views/layouts/application.html.erb
167
185
  - spec/dummy/config.ru
168
186
  - spec/dummy/config/application.rb
@@ -188,6 +206,7 @@ files:
188
206
  - spec/dummy/db/schema.rb
189
207
  - spec/dummy/public/favicon.ico
190
208
  - spec/dummy/script/rails
209
+ - spec/features/shortener_feature_spec.rb
191
210
  - spec/helpers/shortener_helper_spec.rb
192
211
  - spec/models/shortened_url_spec.rb
193
212
  - spec/models/user_spec.rb
@@ -211,8 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
230
  - !ruby/object:Gem::Version
212
231
  version: 2.1.0
213
232
  requirements: []
214
- rubyforge_project: shortener
215
- rubygems_version: 2.5.1
233
+ rubygems_version: 3.0.3
216
234
  signing_key:
217
235
  specification_version: 4
218
236
  summary: Shortener is a Rails Engine that makes it easy to create shortened URLs for