mongoid-tinyurl-id 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/.gitignore +2 -0
  2. data/README.md +18 -0
  3. data/mongoid-tinyurl-id.gemspec +19 -0
  4. metadata +48 -0
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .DS_Store
2
+ mongoid-paperclip-*.gem
data/README.md ADDED
@@ -0,0 +1,18 @@
1
+ Mongoid::TinyURLID - modifies _id generation logic to shorter string like bit.ly.
2
+ =================================================================================
3
+
4
+ Set up
5
+ ------
6
+
7
+ **Rails.root/Gemfile - Just define the following:**
8
+
9
+ gem "mongoid-tinyurl-id",:require => "mongoid_paperclip"
10
+
11
+ **Rails.root/app/models/article.rb - include the Mongoid::TinyURLID module**
12
+
13
+ class Article
14
+ include Mongoid::Document
15
+ include Mongoid::TinyURLID
16
+ end
17
+
18
+ And now, Article.new will produce _id as '1', '2', ... 'lby0l', 'lby0m'... not ObjectID('..')
@@ -0,0 +1,19 @@
1
+ # encoding: utf-8
2
+
3
+ Gem::Specification.new do |gem|
4
+
5
+ gem.name = 'mongoid-tinyurl-id'
6
+ gem.version = '0.0.1'
7
+ gem.platform = Gem::Platform::RUBY
8
+ gem.authors = 'Jay Park'
9
+ gem.email = 'jaypark@gmail.com'
10
+ gem.homepage = 'https://github.com/jinto/mongoid-tinyurl-id'
11
+ gem.summary = 'Mongoid::TinyURLID modifies _id generation logic to shorter string like bit.ly.'
12
+ gem.description = 'Mongoid::TinyURLID modifies _id generation logic to shorter string like bit.ly.'
13
+
14
+ gem.files = %x[git ls-files].split("\n")
15
+ gem.test_files = %x[git ls-files -- {spec}/*].split("\n")
16
+ gem.require_path = 'lib'
17
+
18
+ #gem.add_dependency 'paperclip', ['~> 2.3.6']
19
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mongoid-tinyurl-id
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jay Park
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-10-14 00:00:00.000000000Z
13
+ dependencies: []
14
+ description: Mongoid::TinyURLID modifies _id generation logic to shorter string like
15
+ bit.ly.
16
+ email: jaypark@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - README.md
23
+ - mongoid-tinyurl-id.gemspec
24
+ homepage: https://github.com/jinto/mongoid-tinyurl-id
25
+ licenses: []
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubyforge_project:
44
+ rubygems_version: 1.8.7
45
+ signing_key:
46
+ specification_version: 3
47
+ summary: Mongoid::TinyURLID modifies _id generation logic to shorter string like bit.ly.
48
+ test_files: []