mongoid_shortener 1.0.3 → 1.1.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.
data/README.markdown CHANGED
@@ -90,6 +90,11 @@ end
90
90
 
91
91
  Let me know if you find any bug for this particular plugin.
92
92
 
93
+ ATTRIBUTION
94
+ ===========
95
+
96
+ Parts of the code are from the gem [shortener][2].
97
+
93
98
  LICENSE
94
99
  =======
95
100
 
@@ -117,3 +122,4 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
117
122
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
118
123
 
119
124
  [1]: https://github.com/siong1987/yab62
125
+ [2]: https://github.com/jpmcgrath/shortener
@@ -0,0 +1,20 @@
1
+ Copyright 2011 James P. McGrath
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,20 @@
1
+ Copyright 2011 James P. McGrath
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,20 @@
1
+ Copyright 2011 James P. McGrath
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -7,8 +7,8 @@ module MongoidShortener
7
7
  field :unique_key, :type => String
8
8
  field :use_count, :type => Integer, :default => 0
9
9
 
10
- index :url, :unique => true
11
- index :unique_key, :unique => true
10
+ index({ url: 1 }, { unique: true })
11
+ index({ unique_key: 1 }, { unique: true })
12
12
 
13
13
  URL_PROTOCOL_HTTP = "http://"
14
14
 
@@ -1,3 +1,3 @@
1
1
  module MongoidShortener
2
- VERSION = "1.0.3"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -1,20 +1,68 @@
1
1
  development:
2
- host: localhost
3
- database: dummy_development
2
+ # Configure available database sessions. (required)
3
+ sessions:
4
+ # Defines the default session. (required)
5
+ default:
6
+ # Defines the name of the default database that Mongoid can connect to.
7
+ # (required).
8
+ database: dummy_development
9
+ # Provides the hosts the default session can connect to. Must be an array
10
+ # of host:port pairs. (required)
11
+ hosts:
12
+ - localhost:27017
13
+ options:
14
+ # Change whether the session persists in safe mode by default.
15
+ # (default: false)
16
+ # safe: false
4
17
 
18
+ # Change the default consistency model to :eventual or :strong.
19
+ # :eventual will send reads to secondaries, :strong sends everything
20
+ # to master. (default: :eventual)
21
+ consistency: :strong
22
+ # Configure Mongoid specific options. (optional)
23
+ options:
24
+ # Configuration for whether or not to allow access to fields that do
25
+ # not have a field definition on the model. (default: true)
26
+ # allow_dynamic_fields: true
27
+
28
+ # Enable the identity map, needed for eager loading. (default: false)
29
+ # identity_map_enabled: false
30
+
31
+ # Includes the root model name in json serialization. (default: false)
32
+ # include_root_in_json: false
33
+
34
+ # Include the _type field in serializaion. (default: false)
35
+ # include_type_for_serialization: false
36
+
37
+ # Preload all models in development, needed when models use
38
+ # inheritance. (default: false)
39
+ # preload_models: false
40
+
41
+ # Protect id and type from mass assignment. (default: true)
42
+ # protect_sensitive_fields: true
43
+
44
+ # Raise an error when performing a #find and the document is not found.
45
+ # (default: true)
46
+ # raise_not_found_error: true
47
+
48
+ # Raise an error when defining a scope with the same name as an
49
+ # existing method. (default: false)
50
+ # scope_overwrite_exception: false
51
+
52
+ # Skip the database version check, used when connecting to a db without
53
+ # admin access. (default: false)
54
+ # skip_version_check: false
55
+
56
+ # User Active Support's time zone in conversions. (default: true)
57
+ # use_activesupport_time_zone: true
58
+
59
+ # Ensure all times are UTC in the app side. (default: false)
60
+ # use_utc: false
5
61
  test:
6
- host: localhost
7
- database: dummy_test
8
-
9
- # set these environment variables on your prod server
10
- production:
11
- host: <%= ENV['MONGOID_HOST'] %>
12
- port: <%= ENV['MONGOID_PORT'] %>
13
- username: <%= ENV['MONGOID_USERNAME'] %>
14
- password: <%= ENV['MONGOID_PASSWORD'] %>
15
- database: <%= ENV['MONGOID_DATABASE'] %>
16
- # slaves:
17
- # - host: slave1.local
18
- # port: 27018
19
- # - host: slave2.local
20
- # port: 27019
62
+ sessions:
63
+ default:
64
+ database: dummy_test
65
+ hosts:
66
+ - localhost:27017
67
+ options:
68
+ consistency: :strong
@@ -3496,3 +3496,111 @@ MONGODB dummy_test['$cmd'].find({"count"=>"mongoid_shortener_shortened_urls", "q
3496
3496
  MONGODB dummy_test['$cmd'].find({"count"=>"mongoid_shortener_shortened_urls", "query"=>{:unique_key=>"0"}, "fields"=>nil})
3497
3497
  MONGODB dummy_test['$cmd'].find({"count"=>"mongoid_shortener_shortened_urls", "query"=>{}, "fields"=>nil})
3498
3498
  MONGODB dummy_test['mongoid_shortener_shortened_urls'].remove({})
3499
+ MOPED: 127.0.0.1:27017 COMMAND database=admin command={:ismaster=>1} (0.9239ms)
3500
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (119.0169ms)
3501
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0739ms)
3502
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://google.com"} flags=[] limit=-1 skip=0 fields=nil (0.2549ms)
3503
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2379ms)
3504
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.1812ms)
3505
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://google.com"}} (0.2403ms)
3506
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.2010ms)
3507
+ MOPED: 127.0.0.1:27017 INSERT database=dummy_test collection=mongoid_shortener_shortened_urls documents=[{"_id"=>"500b6a08df3e7ebb46000001", "use_count"=>0, "url"=>"http://google.com", "unique_key"=>"0", "updated_at"=>2012-07-22 02:48:40 UTC, "created_at"=>2012-07-22 02:48:40 UTC}] flags=[] (0.1960ms)
3508
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://google.com"} flags=[] limit=-1 skip=0 fields=nil (0.3271ms)
3509
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2420ms)
3510
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0541ms)
3511
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://yahoo.com"} flags=[] limit=-1 skip=0 fields=nil (0.1950ms)
3512
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1681ms)
3513
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.1609ms)
3514
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://yahoo.com"}} (0.2041ms)
3515
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.1919ms)
3516
+ MOPED: 127.0.0.1:27017 INSERT database=dummy_test collection=mongoid_shortener_shortened_urls documents=[{"_id"=>"500b6a08df3e7ebb46000002", "use_count"=>0, "url"=>"http://yahoo.com", "unique_key"=>"0", "updated_at"=>2012-07-22 02:48:40 UTC, "created_at"=>2012-07-22 02:48:40 UTC}] flags=[] (0.1211ms)
3517
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2241ms)
3518
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0489ms)
3519
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://ahha"} flags=[] limit=-1 skip=0 fields=nil (0.1729ms)
3520
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1631ms)
3521
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.1607ms)
3522
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://ahha"}} (0.2658ms)
3523
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.1969ms)
3524
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1719ms)
3525
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0520ms)
3526
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://google.com"} flags=[] limit=-1 skip=0 fields=nil (0.1740ms)
3527
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1631ms)
3528
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.1612ms)
3529
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://google.com"}} (0.1988ms)
3530
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.1981ms)
3531
+ MOPED: 127.0.0.1:27017 INSERT database=dummy_test collection=mongoid_shortener_shortened_urls documents=[{"_id"=>"500b6a08df3e7ebb46000003", "use_count"=>0, "url"=>"http://google.com", "unique_key"=>"0", "updated_at"=>2012-07-22 02:48:40 UTC, "created_at"=>2012-07-22 02:48:40 UTC}] flags=[] (0.1090ms)
3532
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://yahoo.com"} flags=[] limit=-1 skip=0 fields=nil (0.2201ms)
3533
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1659ms)
3534
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"1"} flags=[] limit=-1 skip=0 fields=nil (0.1793ms)
3535
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://yahoo.com"}} (0.2110ms)
3536
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"1"}} (0.2100ms)
3537
+ MOPED: 127.0.0.1:27017 INSERT database=dummy_test collection=mongoid_shortener_shortened_urls documents=[{"_id"=>"500b6a08df3e7ebb46000004", "use_count"=>0, "url"=>"http://yahoo.com", "unique_key"=>"1", "updated_at"=>2012-07-22 02:48:40 UTC, "created_at"=>2012-07-22 02:48:40 UTC}] flags=[] (0.1001ms)
3538
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2377ms)
3539
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0491ms)
3540
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://google.com"} flags=[] limit=-1 skip=0 fields=nil (0.1841ms)
3541
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1810ms)
3542
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.1671ms)
3543
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://google.com"}} (0.1950ms)
3544
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.1979ms)
3545
+ MOPED: 127.0.0.1:27017 INSERT database=dummy_test collection=mongoid_shortener_shortened_urls documents=[{"_id"=>"500b6a08df3e7ebb46000005", "use_count"=>0, "url"=>"http://google.com", "unique_key"=>"0", "updated_at"=>2012-07-22 02:48:40 UTC, "created_at"=>2012-07-22 02:48:40 UTC}] flags=[] (0.1028ms)
3546
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1988ms)
3547
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0410ms)
3548
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://yahoo.com"} flags=[] limit=-1 skip=0 fields=nil (0.1662ms)
3549
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1791ms)
3550
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.2139ms)
3551
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://yahoo.com"}} (0.2091ms)
3552
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.1957ms)
3553
+ MOPED: 127.0.0.1:27017 INSERT database=dummy_test collection=mongoid_shortener_shortened_urls documents=[{"_id"=>"500b6a08df3e7ebb46000006", "use_count"=>0, "url"=>"http://yahoo.com", "unique_key"=>"0", "updated_at"=>2012-07-22 02:48:40 UTC, "created_at"=>2012-07-22 02:48:40 UTC}] flags=[] (0.1042ms)
3554
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2530ms)
3555
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0498ms)
3556
+ Processing by MongoidShortener::ShortenedUrlsController#translate as HTML
3557
+ Parameters: {"unique_key"=>"~123"}
3558
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"123"} flags=[] limit=-1 skip=0 fields=nil (0.3471ms)
3559
+ Completed 301 Moved Permanently in 1ms
3560
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2398ms)
3561
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0589ms)
3562
+ Processing by MongoidShortener::ShortenedUrlsController#translate as HTML
3563
+ Parameters: {"unique_key"=>"~123"}
3564
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"123"} flags=[] limit=-1 skip=0 fields=nil (0.2518ms)
3565
+ Completed 301 Moved Permanently in 1ms
3566
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2460ms)
3567
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0501ms)
3568
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://google.com"} flags=[] limit=-1 skip=0 fields=nil (0.1822ms)
3569
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1793ms)
3570
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.1616ms)
3571
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://google.com"}} (0.2031ms)
3572
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.1972ms)
3573
+ MOPED: 127.0.0.1:27017 INSERT database=dummy_test collection=mongoid_shortener_shortened_urls documents=[{"_id"=>"500b6a08df3e7ebb46000007", "use_count"=>0, "url"=>"http://google.com", "unique_key"=>"0", "updated_at"=>2012-07-22 02:48:40 UTC, "created_at"=>2012-07-22 02:48:40 UTC}] flags=[] (0.1330ms)
3574
+ Processing by MongoidShortener::ShortenedUrlsController#translate as HTML
3575
+ Parameters: {"unique_key"=>"~0"}
3576
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.2732ms)
3577
+ MOPED: 127.0.0.1:27017 UPDATE database=dummy_test collection=mongoid_shortener_shortened_urls selector={"_id"=>"500b6a08df3e7ebb46000007"} update={"$inc"=>{"use_count"=>1}} flags=[] (0.0772ms)
3578
+ Completed 301 Moved Permanently in 1ms
3579
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1721ms)
3580
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0489ms)
3581
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2549ms)
3582
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0501ms)
3583
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://google.com"} flags=[] limit=-1 skip=0 fields=nil (0.1960ms)
3584
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1938ms)
3585
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.1619ms)
3586
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://google.com"}} (0.2012ms)
3587
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.1960ms)
3588
+ MOPED: 127.0.0.1:27017 INSERT database=dummy_test collection=mongoid_shortener_shortened_urls documents=[{"_id"=>"500b6a08df3e7ebb46000008", "use_count"=>0, "url"=>"http://google.com", "unique_key"=>"0", "updated_at"=>2012-07-22 02:48:40 UTC, "created_at"=>2012-07-22 02:48:40 UTC}] flags=[] (0.1199ms)
3589
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://google.com"} flags=[] limit=-1 skip=0 fields=nil (0.2472ms)
3590
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2098ms)
3591
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0520ms)
3592
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://google.com"} flags=[] limit=-1 skip=0 fields=nil (0.1819ms)
3593
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1810ms)
3594
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.1650ms)
3595
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://google.com"}} (0.1948ms)
3596
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.1967ms)
3597
+ MOPED: 127.0.0.1:27017 INSERT database=dummy_test collection=mongoid_shortener_shortened_urls documents=[{"_id"=>"500b6a08df3e7ebb46000009", "use_count"=>0, "url"=>"http://google.com", "unique_key"=>"0", "updated_at"=>2012-07-22 02:48:40 UTC, "created_at"=>2012-07-22 02:48:40 UTC}] flags=[] (0.1140ms)
3598
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2511ms)
3599
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0460ms)
3600
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"url"=>"http://haha"} flags=[] limit=-1 skip=0 fields=nil (0.2050ms)
3601
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.1893ms)
3602
+ MOPED: 127.0.0.1:27017 QUERY database=dummy_test collection=mongoid_shortener_shortened_urls selector={"unique_key"=>"0"} flags=[] limit=-1 skip=0 fields=nil (0.1600ms)
3603
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"url"=>"http://haha"}} (0.1988ms)
3604
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{"unique_key"=>"0"}} (0.1948ms)
3605
+ MOPED: 127.0.0.1:27017 COMMAND database=dummy_test command={:count=>:mongoid_shortener_shortened_urls, :query=>{}} (0.2189ms)
3606
+ MOPED: 127.0.0.1:27017 DELETE database=dummy_test collection=mongoid_shortener_shortened_urls selector={} flags=[] (0.0482ms)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_shortener
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-21 00:00:00.000000000Z
12
+ date: 2012-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yab62
16
- requirement: &70096783045300 !ruby/object:Gem::Requirement
16
+ requirement: &70165417063340 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 1.0.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70096783045300
24
+ version_requirements: *70165417063340
25
25
  description: MongoidShortener is a simple Rails 3.1 engine that shortens URL based
26
26
  on Mongoid.
27
27
  email:
@@ -31,8 +31,11 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - app/controllers/mongoid_shortener/application_controller.rb
34
+ - app/controllers/mongoid_shortener/MIT-LICENSE
34
35
  - app/controllers/mongoid_shortener/shortened_urls_controller.rb
36
+ - app/helpers/mongoid_shortener/MIT-LICENSE
35
37
  - app/helpers/mongoid_shortener/shortened_urls_helper.rb
38
+ - app/models/mongoid_shortener/MIT-LICENSE
36
39
  - app/models/mongoid_shortener/shortened_url.rb
37
40
  - lib/mongoid_shortener/engine.rb
38
41
  - lib/mongoid_shortener/version.rb
@@ -89,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
92
  version: '0'
90
93
  segments:
91
94
  - 0
92
- hash: -2072445065250042422
95
+ hash: -3154399471294239992
93
96
  required_rubygems_version: !ruby/object:Gem::Requirement
94
97
  none: false
95
98
  requirements:
@@ -98,10 +101,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
101
  version: '0'
99
102
  segments:
100
103
  - 0
101
- hash: -2072445065250042422
104
+ hash: -3154399471294239992
102
105
  requirements: []
103
106
  rubyforge_project:
104
- rubygems_version: 1.8.10
107
+ rubygems_version: 1.8.15
105
108
  signing_key:
106
109
  specification_version: 3
107
110
  summary: MongoidShortener is a simple Rails 3.1 engine that shortens URL based on