tdiary-io-mongodb 4.1.1.1 → 4.1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tdiary/io/mongodb.rb +5 -1
- data/tdiary-io-mongodb.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 015e04bada920d057f662926fb898b83fb991a19
|
4
|
+
data.tar.gz: a65383d35c319c6bcdcdf5a18591a073d1a93d40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1447397db1689549f669ad6703a085320d4b3dd6ddf7bd7aa0613b7f0457e353b9abb590f28d74c31e5b95c612f2e9b1524272976fbd26a534ceaa98df4b40de
|
7
|
+
data.tar.gz: 59c40efcfd627231b4049a1c06bfaf025da7671e7a299bfa4af08d7ea973c5775b0478a2b015df65c4264ab37d37be959b7ebc0a354194f41e169a489de8c09e
|
data/lib/tdiary/io/mongodb.rb
CHANGED
@@ -37,6 +37,8 @@ module TDiary
|
|
37
37
|
field :body, type: String
|
38
38
|
field :last_modified, type: String
|
39
39
|
field :visible, type: Boolean
|
40
|
+
|
41
|
+
index({diary_id: 1})
|
40
42
|
end
|
41
43
|
|
42
44
|
class Referer
|
@@ -63,7 +65,7 @@ module TDiary
|
|
63
65
|
has_many :referers, autosave: true
|
64
66
|
|
65
67
|
index({diary_id: 1}, {unique: true})
|
66
|
-
index(
|
68
|
+
index({year: 1, month: 1})
|
67
69
|
end
|
68
70
|
|
69
71
|
class Plugin
|
@@ -75,6 +77,8 @@ module TDiary
|
|
75
77
|
field :key, type: String
|
76
78
|
field :value, type: String
|
77
79
|
|
80
|
+
index({plugin: 1, key: 1}, {unique: true})
|
81
|
+
|
78
82
|
def self.get(plugin_name, key)
|
79
83
|
record = where(plugin: plugin_name, key: key).first
|
80
84
|
return record ? record.value : nil
|
data/tdiary-io-mongodb.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "tdiary-io-mongodb"
|
7
|
-
spec.version = "4.1.1.
|
7
|
+
spec.version = "4.1.1.2"
|
8
8
|
spec.authors = ["TADA Tadashi"]
|
9
9
|
spec.email = ["t@tdtds.jp"]
|
10
10
|
spec.description = %q{MongoDB adapter for tDiary}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tdiary-io-mongodb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.1.
|
4
|
+
version: 4.1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TADA Tadashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|