mongous 0.4.2 → 0.4.4
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.
- checksums.yaml +4 -4
- data/README.adoc +2 -1
- data/README.ja.adoc +2 -1
- data/_Gemfile.lock +38 -0
- data/lib/mongous/version.rb +1 -1
- data/sample/declare_compact_1.rb +2 -2
- data/sample/declare_compact_2.rb +4 -4
- data/sample/declare_label_1.rb +2 -2
- data/sample/declare_ndex_1.rb +2 -2
- data/sample/declare_ndex_2.rb +2 -2
- data/sample/declare_strict_1.rb +2 -2
- data/sample/declare_strict_2.rb +2 -2
- data/sample/query_basic_1.rb +2 -2
- data/sample/query_basic_2.rb +2 -2
- data/sample/query_find_1.rb +8 -8
- metadata +3 -3
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fec2b64e882095a188352b441075601ca5e84ba7063d70a04e7d182533ebb34
|
4
|
+
data.tar.gz: b332b82c2d95dab25b3c69c1786757e17c0c599319f88defacad44303f8d828c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cb477d1f25353cecc88f333136840ed75880b2ab38e7825f6053c01134f7bb5aa24950777a626cd46cc93e2fc88a857a1093f7cf925362e524bd857f6eb794b
|
7
|
+
data.tar.gz: d8ee46a451a09ab429b9754e861f21e276d311cb6b6467faef093f79a4e4868881cbc0dfe7679aa5205b5838c2ca93d1d7ff48150cc12226a0efa8ff8d5e27d5
|
data/README.adoc
CHANGED
@@ -10,6 +10,7 @@ Yet another mongo wrapper library.
|
|
10
10
|
* Check if the constraint condition is satisfied when setting the item value of the document.
|
11
11
|
* The contents of undefined items in the document can be described by value or Proc.
|
12
12
|
* Item contents at the time of document creation and update can be described by value or Proc.
|
13
|
+
* The database collection name corresponding to the class name is not converted to the plural form.
|
13
14
|
|
14
15
|
== Installation
|
15
16
|
|
@@ -55,7 +56,7 @@ class Book
|
|
55
56
|
field :title, String, :must
|
56
57
|
field :author, String
|
57
58
|
field :publisher, String
|
58
|
-
field :style, String, %w[hardcover
|
59
|
+
field :style, String, %w[hardcover softcover paperback]
|
59
60
|
field :size, String, /[AB]\d/
|
60
61
|
field :price, Integer, (0..1_000_000)
|
61
62
|
field :page, Integer, proc{ page % 4 == 0 }
|
data/README.ja.adoc
CHANGED
@@ -10,6 +10,7 @@
|
|
10
10
|
* ドキュメントの項目値設定時に制約条件を満たすか検査する.
|
11
11
|
* ドキュメントの未定義項目の内容を値または Proc で記述できる.
|
12
12
|
* ドキュメント作成時および更新時の項目内容を値または Proc で記述できる.
|
13
|
+
* クラス名に対応するデータベースのコレクション名は、複数形へ変換しない.
|
13
14
|
|
14
15
|
== 導入
|
15
16
|
|
@@ -55,7 +56,7 @@ class Book
|
|
55
56
|
field :title, String, :must
|
56
57
|
field :author, String
|
57
58
|
field :publisher, String
|
58
|
-
field :style, String, %w[hardcover
|
59
|
+
field :style, String, %w[hardcover softcover paperback]
|
59
60
|
field :size, String, /[AB]\d/
|
60
61
|
field :price, Integer, (0..1_000_000)
|
61
62
|
field :page, Integer, proc{ page % 4 == 0 }
|
data/_Gemfile.lock
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
mongous (0.4.3)
|
5
|
+
mongo
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
bson (4.11.1)
|
11
|
+
diff-lcs (1.4.4)
|
12
|
+
mongo (2.14.0)
|
13
|
+
bson (>= 4.8.2, < 5.0.0)
|
14
|
+
rake (13.0.3)
|
15
|
+
rspec (3.10.0)
|
16
|
+
rspec-core (~> 3.10.0)
|
17
|
+
rspec-expectations (~> 3.10.0)
|
18
|
+
rspec-mocks (~> 3.10.0)
|
19
|
+
rspec-core (3.10.1)
|
20
|
+
rspec-support (~> 3.10.0)
|
21
|
+
rspec-expectations (3.10.1)
|
22
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
+
rspec-support (~> 3.10.0)
|
24
|
+
rspec-mocks (3.10.1)
|
25
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
+
rspec-support (~> 3.10.0)
|
27
|
+
rspec-support (3.10.1)
|
28
|
+
|
29
|
+
PLATFORMS
|
30
|
+
x86_64-linux
|
31
|
+
|
32
|
+
DEPENDENCIES
|
33
|
+
mongous!
|
34
|
+
rake
|
35
|
+
rspec
|
36
|
+
|
37
|
+
BUNDLED WITH
|
38
|
+
2.2.6
|
data/lib/mongous/version.rb
CHANGED
data/sample/declare_compact_1.rb
CHANGED
data/sample/declare_compact_2.rb
CHANGED
@@ -11,8 +11,8 @@ book = Book1.where( title: "book1" ).first
|
|
11
11
|
book.author = "alice"
|
12
12
|
book.save
|
13
13
|
|
14
|
-
Book1.each do |
|
15
|
-
pp
|
14
|
+
Book1.each do |a_book|
|
15
|
+
pp a_book
|
16
16
|
end
|
17
17
|
puts
|
18
18
|
|
@@ -29,8 +29,8 @@ book = Book2.where( title: "book2" ).first
|
|
29
29
|
book.author = "bob"
|
30
30
|
book.save
|
31
31
|
|
32
|
-
Book2.each do |
|
33
|
-
pp
|
32
|
+
Book2.each do |a_book|
|
33
|
+
pp a_book
|
34
34
|
end
|
35
35
|
puts
|
36
36
|
|
data/sample/declare_label_1.rb
CHANGED
data/sample/declare_ndex_1.rb
CHANGED
data/sample/declare_ndex_2.rb
CHANGED
data/sample/declare_strict_1.rb
CHANGED
data/sample/declare_strict_2.rb
CHANGED
data/sample/query_basic_1.rb
CHANGED
data/sample/query_basic_2.rb
CHANGED
data/sample/query_find_1.rb
CHANGED
@@ -8,25 +8,25 @@ p book = Book.find.first
|
|
8
8
|
puts
|
9
9
|
|
10
10
|
p "Book.find.each do |book|"
|
11
|
-
Book.find.each do |
|
12
|
-
p
|
11
|
+
Book.find.each do |a_book|
|
12
|
+
p a_book
|
13
13
|
end
|
14
14
|
puts
|
15
15
|
|
16
16
|
p "Book.find( title: /title/ ).each do |book|"
|
17
|
-
Book.find( title: /title/ ).each do |
|
18
|
-
p
|
17
|
+
Book.find( title: /title/ ).each do |a_book|
|
18
|
+
p a_book
|
19
19
|
end
|
20
20
|
puts
|
21
21
|
|
22
22
|
p "Book.find( {}, { projection: {_id: 0} } ).each do |book|"
|
23
|
-
Book.find( {}, { projection: {_id: 0} } ).each do |
|
24
|
-
p
|
23
|
+
Book.find( {}, { projection: {_id: 0} } ).each do |a_book|
|
24
|
+
p a_book
|
25
25
|
end
|
26
26
|
puts
|
27
27
|
|
28
28
|
p "Book.find( {title: /title/}, { projection: {_id: 0} } ).each do |book|"
|
29
|
-
Book.find( {title: /title/}, { projection: {_id: 0} } ).each do |
|
30
|
-
p
|
29
|
+
Book.find( {title: /title/}, { projection: {_id: 0} } ).each do |a_book|
|
30
|
+
p a_book
|
31
31
|
end
|
32
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongous
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arimay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongo
|
@@ -62,11 +62,11 @@ files:
|
|
62
62
|
- ".gitignore"
|
63
63
|
- ".rspec"
|
64
64
|
- ".rubocop.yml"
|
65
|
-
- ".travis.yml"
|
66
65
|
- Gemfile
|
67
66
|
- README.adoc
|
68
67
|
- README.ja.adoc
|
69
68
|
- Rakefile
|
69
|
+
- _Gemfile.lock
|
70
70
|
- bin/console
|
71
71
|
- bin/setup
|
72
72
|
- lib/mongous.rb
|