shortener 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- class Shortener::ShortenedUrlsController < ::ApplicationController
1
+ class Shortener::ShortenedUrlsController < ActionController::Base
2
2
 
3
3
  # find the real link for the shortened link key and redirect
4
4
  def show
@@ -17,9 +17,10 @@ class CreateShortenedUrlsTable < ActiveRecord::Migration
17
17
  t.timestamps
18
18
  end
19
19
 
20
- # we will lookup the links in the db by key and owners.
20
+ # we will lookup the links in the db by key, urls and owners.
21
21
  # also make sure the unique keys are actually unique
22
22
  add_index :shortened_urls, :unique_key, :unique => true
23
+ add_index :shortened_urls, :url
23
24
  add_index :shortened_urls, [:owner_id, :owner_type]
24
25
  end
25
26
  end
@@ -1,3 +1,3 @@
1
1
  module Shortener
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/shortener.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
9
9
  s.files = `git ls-files`.split("\n")
10
10
  s.version = Shortener::VERSION
11
11
  s.platform = Gem::Platform::RUBY
12
- s.authors = [ "James P. McGrath" ]
13
- s.email = [ "gems@jamespmcgrath.com" ]
12
+ s.authors = [ "James P. McGrath", "Michael Reinsch" ]
13
+ s.email = [ "gems@jamespmcgrath.com", "michael@mobalean.com" ]
14
14
  s.homepage = "http://jamespmcgrath.com/projects/shortener"
15
15
  s.rubyforge_project = "shortener"
16
16
  s.required_rubygems_version = "> 1.3.6"
@@ -20,6 +20,7 @@ class CreateShortenedUrlsTable < ActiveRecord::Migration
20
20
  # we will lookup the links in the db by key and owners.
21
21
  # also make sure the unique keys are actually unique
22
22
  add_index :shortened_urls, :unique_key, :unique => true
23
+ add_index :shortened_urls, :url
23
24
  add_index :shortened_urls, [:owner_id, :owner_type]
24
25
  end
25
26
  end
metadata CHANGED
@@ -1,19 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shortener
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - James P. McGrath
9
+ - Michael Reinsch
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2012-02-16 00:00:00.000000000 Z
13
+ date: 2012-02-21 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rails
16
- requirement: &18262700 !ruby/object:Gem::Requirement
17
+ requirement: &75940830 !ruby/object:Gem::Requirement
17
18
  none: false
18
19
  requirements:
19
20
  - - ! '>='
@@ -21,10 +22,10 @@ dependencies:
21
22
  version: 3.0.7
22
23
  type: :runtime
23
24
  prerelease: false
24
- version_requirements: *18262700
25
+ version_requirements: *75940830
25
26
  - !ruby/object:Gem::Dependency
26
27
  name: sqlite3
27
- requirement: &18262320 !ruby/object:Gem::Requirement
28
+ requirement: &75940170 !ruby/object:Gem::Requirement
28
29
  none: false
29
30
  requirements:
30
31
  - - ! '>='
@@ -32,10 +33,10 @@ dependencies:
32
33
  version: '0'
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *18262320
36
+ version_requirements: *75940170
36
37
  - !ruby/object:Gem::Dependency
37
38
  name: rspec-rails
38
- requirement: &18261860 !ruby/object:Gem::Requirement
39
+ requirement: &75938860 !ruby/object:Gem::Requirement
39
40
  none: false
40
41
  requirements:
41
42
  - - ! '>='
@@ -43,10 +44,10 @@ dependencies:
43
44
  version: '0'
44
45
  type: :development
45
46
  prerelease: false
46
- version_requirements: *18261860
47
+ version_requirements: *75938860
47
48
  - !ruby/object:Gem::Dependency
48
49
  name: shoulda-matchers
49
- requirement: &18261440 !ruby/object:Gem::Requirement
50
+ requirement: &75938190 !ruby/object:Gem::Requirement
50
51
  none: false
51
52
  requirements:
52
53
  - - ! '>='
@@ -54,13 +55,14 @@ dependencies:
54
55
  version: '0'
55
56
  type: :development
56
57
  prerelease: false
57
- version_requirements: *18261440
58
+ version_requirements: *75938190
58
59
  description: Shortener is a Rails Engine Gem that makes it easy to create and interpret
59
60
  shortened URLs on your own domain from within your Rails application. Once installed
60
61
  Shortener will generate, store URLS and "unshorten" shortened URLs for your applications
61
62
  visitors, all whilst collecting basic usage metrics.
62
63
  email:
63
64
  - gems@jamespmcgrath.com
65
+ - michael@mobalean.com
64
66
  executables: []
65
67
  extensions: []
66
68
  extra_rdoc_files: []
@@ -132,9 +134,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
134
  version: 1.3.6
133
135
  requirements: []
134
136
  rubyforge_project: shortener
135
- rubygems_version: 1.8.10
137
+ rubygems_version: 1.8.16
136
138
  signing_key:
137
139
  specification_version: 3
138
140
  summary: Shortener is a Rails Engine that makes it easy to create shortened URLs for
139
141
  your rails application.
140
142
  test_files: []
143
+ has_rdoc: