mongomapper_autokey 0.0.1 → 0.0.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
2
  SHA1:
3
- metadata.gz: fa83b5d65c955e441ff20602ca7406a1d3f41420
4
- data.tar.gz: d7fae75be2be93078ca0bd4e9b484c506e1813e9
3
+ metadata.gz: f586607194cae020afa9763aa2139fc008501c09
4
+ data.tar.gz: 3487b23e54234fbf51542ed80d6fd8635932e9da
5
5
  SHA512:
6
- metadata.gz: cc7ae2f71a07f9dd7bbb24fc09ab4fb115b67f0d19ff44c871a600988e3292a5167483385616c22caf3cf1c6fbd66b8dfb6eb3f14fb93bac72e048122df0f6ef
7
- data.tar.gz: d91a5d7f59e4eef441242813f2b215d2c6e14f7f9439e9d77e94148a3164e962afb7b3996cc5b0f958fcbd27f263126463e43cc66be6bd2954b45a859e8b624d
6
+ metadata.gz: b8d3a99d4f7bd0401bfc82d8b81841bcd17226c9aacbd84c4346b129e9d4a883d7586d379210a97521be673b1c87c560ad39e1eb7091c4c21250ba5b2a503378
7
+ data.tar.gz: 2044a09c2f8ccff1faa75d76aa7ab5f6f322fc9b5d82ed16b7d23408f57fea76a62a68a98a5faabb394ebd1a55df756ed56292672cc13ba6121cb92e9580c4b7
File without changes
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # MongomapperAutokey
2
2
 
3
- TODO: Write a gem description
3
+ It's a MongoMapper plugin add incremented id in Mongomapper
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- ```ruby
9
+ ```
10
10
  gem 'mongomapper_autokey'
11
11
  ```
12
12
 
@@ -20,12 +20,44 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write usage instructions here
23
+ auto increment with id
24
24
 
25
- ## Contributing
25
+ ```
26
+ class Product
27
+ include MongoMapper::Document
28
+ include MongoMapper::AutoKey
29
+
30
+ auto_increment_key
31
+ key :title, String
32
+ end
33
+ ```
26
34
 
27
- 1. Fork it ( https://github.com/[my-github-username]/mongomapper_autokey/fork )
28
- 2. Create your feature branch (`git checkout -b my-new-feature`)
29
- 3. Commit your changes (`git commit -am 'Add some feature'`)
30
- 4. Push to the branch (`git push origin my-new-feature`)
31
- 5. Create a new Pull Request
35
+ auto increment without id
36
+
37
+ ```
38
+ class Product
39
+ include MongoMapper::Document
40
+ include MongoMapper::AutoKey
41
+
42
+ auto_increment_key :other_id
43
+ key :sku, Integer, auto_increment: true
44
+ end
45
+ ```
46
+
47
+ set default value
48
+
49
+ ```
50
+ class Product
51
+ include MongoMapper::Document
52
+ include MongoMapper::AutoKey
53
+
54
+ auto_increment_key default: 100000
55
+ auto_increment_key :id2, default: 100000
56
+ key :sku, Integer, auto_increment: true, default: 100000
57
+ end
58
+ ```
59
+
60
+ ## License
61
+
62
+ Copyright © 2015, Ye Li. Released under the MIT License
63
+
@@ -1,5 +1,5 @@
1
1
  module MongoMapper
2
2
  module Autokey
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
8
8
  spec.version = MongoMapper::Autokey::VERSION
9
9
  spec.authors = ["yee.li"]
10
10
  spec.email = ["yeeli@outlook.com"]
11
- spec.summary = %q{Auto increment for mongo mappper}
12
- spec.description = %q{Auto increment for mongo mapper}
13
- spec.homepage = ""
11
+ spec.summary = %q{Auto increment for MongoMappper}
12
+ spec.description = %q{Auto increment for MongoMapper}
13
+ spec.homepage = "https://github.com/yeeli/mongomapper_autokey"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongomapper_autokey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - yee.li
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: Auto increment for mongo mapper
55
+ description: Auto increment for MongoMapper
56
56
  email:
57
57
  - yeeli@outlook.com
58
58
  executables: []
@@ -61,7 +61,7 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
63
  - Gemfile
64
- - LICENSE.txt
64
+ - LICENSE
65
65
  - README.md
66
66
  - Rakefile
67
67
  - lib/mongomapper_autokey.rb
@@ -69,7 +69,7 @@ files:
69
69
  - lib/mongomapper_autokey/plucky.rb
70
70
  - lib/mongomapper_autokey/version.rb
71
71
  - mongomapper_autokey.gemspec
72
- homepage: ''
72
+ homepage: https://github.com/yeeli/mongomapper_autokey
73
73
  licenses:
74
74
  - MIT
75
75
  metadata: {}
@@ -92,5 +92,5 @@ rubyforge_project:
92
92
  rubygems_version: 2.4.2
93
93
  signing_key:
94
94
  specification_version: 4
95
- summary: Auto increment for mongo mappper
95
+ summary: Auto increment for MongoMappper
96
96
  test_files: []