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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 053bc9ff5ab737f18e20c9f2d616741c99a995b4
4
- data.tar.gz: 8260cf8a5eb7ff6c6acee885189bcfcbca724944
3
+ metadata.gz: 015e04bada920d057f662926fb898b83fb991a19
4
+ data.tar.gz: a65383d35c319c6bcdcdf5a18591a073d1a93d40
5
5
  SHA512:
6
- metadata.gz: cd8b9e0ab3b660706696e5100350b04383e499140142ca7a5c651166383e26f6d9254b33b0ee338d8b8c734c63c7671ddae3b1042c5895640d0c02b933147d7d
7
- data.tar.gz: e6d3b5e45b128ee2421635f28b36a1e77e1b0c8abb3ef7b7b82034060f684292577eae3c76e6c9756bf4c44382ed685786638b76d7153b21f17c52a82b1a3c75
6
+ metadata.gz: 1447397db1689549f669ad6703a085320d4b3dd6ddf7bd7aa0613b7f0457e353b9abb590f28d74c31e5b95c612f2e9b1524272976fbd26a534ceaa98df4b40de
7
+ data.tar.gz: 59c40efcfd627231b4049a1c06bfaf025da7671e7a299bfa4af08d7ea973c5775b0478a2b015df65c4264ab37d37be959b7ebc0a354194f41e169a489de8c09e
@@ -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('comments.no' => 1)
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
@@ -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.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.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-14 00:00:00.000000000 Z
11
+ date: 2015-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid