groonga-client-model 0.9.2 → 0.9.3
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/Gemfile +1 -3
- data/doc/text/news.md +6 -0
- data/groonga-client-model.gemspec +1 -1
- data/lib/groonga_client_model/client.rb +1 -0
- data/lib/groonga_client_model/spec_helper.rb +5 -3
- data/lib/groonga_client_model/test/fixture.rb +9 -9
- data/lib/groonga_client_model/test/groonga_server_runner.rb +53 -0
- data/lib/groonga_client_model/test_helper.rb +7 -5
- data/lib/groonga_client_model/version.rb +1 -1
- data/test/apps/rails5/Gemfile.lock +1 -1
- data/test/apps/rails5/log/test.log +165 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10ccadcbf3eaddb6061a466dc9ba7b87cdc4d2d5
|
4
|
+
data.tar.gz: 1075d6f24a9ff0d5e86f108aace16fd72ebf60b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f5e4724ecb1596f0bc346eac94655629fa8c7a81dbc2c69d1c685eac944774f56dfd0d407d4c11aec84ebce5dc161e2a5f3065df4957ba8e2b0bc48e76dfaaa
|
7
|
+
data.tar.gz: a01f038e60358a501df26ac9561bc327d532fe9cfad9a3b75828b0c950d7de8c047184a60f0d3c01ea97ff53c1f5dbd3d3b2b267ac8a885ab9b92c463e49a8ef
|
data/Gemfile
CHANGED
data/doc/text/news.md
CHANGED
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
|
|
43
43
|
spec.files += Dir.glob("doc/text/*")
|
44
44
|
spec.test_files += Dir.glob("test/**/*")
|
45
45
|
|
46
|
-
spec.add_runtime_dependency("groonga-client", ">= 0.3.
|
46
|
+
spec.add_runtime_dependency("groonga-client", ">= 0.3.7")
|
47
47
|
spec.add_runtime_dependency("groonga-command-parser")
|
48
48
|
spec.add_runtime_dependency("activemodel")
|
49
49
|
|
@@ -14,7 +14,6 @@
|
|
14
14
|
# License along with this library; if not, write to the Free Software
|
15
15
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
|
-
require "groonga/client/spec-helper"
|
18
17
|
require "groonga_client_model/test/fixture"
|
19
18
|
|
20
19
|
module GroongaClientModel
|
@@ -22,11 +21,14 @@ module GroongaClientModel
|
|
22
21
|
extend ActiveSupport::Concern
|
23
22
|
|
24
23
|
included do
|
25
|
-
include Groonga::Client::SpecHelper
|
26
24
|
include Test::Fixture
|
27
25
|
|
28
26
|
before(:each) do
|
29
|
-
|
27
|
+
setup_groonga
|
28
|
+
end
|
29
|
+
|
30
|
+
after(:each) do
|
31
|
+
teardown_groonga
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
@@ -14,19 +14,19 @@
|
|
14
14
|
# License along with this library; if not, write to the Free Software
|
15
15
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
|
+
require "groonga_client_model/test/groonga_server_runner"
|
18
|
+
|
17
19
|
module GroongaClientModel
|
18
20
|
module Test
|
19
21
|
module Fixture
|
20
|
-
def
|
21
|
-
|
22
|
+
def setup_groonga
|
23
|
+
@groonga_server_runner = GroongaServerRunner.new
|
24
|
+
@groonga_server_runner.run
|
25
|
+
end
|
22
26
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
base_dir = Pathname.pwd
|
27
|
-
end
|
28
|
-
schema_loader = SchemaLoader.new(base_dir)
|
29
|
-
schema_loader.load
|
27
|
+
def teardown_groonga
|
28
|
+
return if @groonga_server_runner.nil?
|
29
|
+
@groonga_server_runner.stop
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Copyright (C) 2016 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "pathname"
|
18
|
+
require "uri"
|
19
|
+
|
20
|
+
require "groonga/client/test/groonga-server-runner"
|
21
|
+
|
22
|
+
module GroongaClientModel
|
23
|
+
module Test
|
24
|
+
class GroongaServerRunner < Groonga::Client::Test::GroongaServerRunner
|
25
|
+
def initialize
|
26
|
+
super
|
27
|
+
@client = Client.new
|
28
|
+
end
|
29
|
+
|
30
|
+
def run
|
31
|
+
super
|
32
|
+
return if using_running_server?
|
33
|
+
|
34
|
+
if defined?(Rails)
|
35
|
+
base_dir = Rails.root
|
36
|
+
else
|
37
|
+
base_dir = Pathname.pwd
|
38
|
+
end
|
39
|
+
schema_loader = SchemaLoader.new(base_dir)
|
40
|
+
schema_loader.load
|
41
|
+
end
|
42
|
+
|
43
|
+
def url
|
44
|
+
@url ||= URI(@client.url)
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
def open_client(&block)
|
49
|
+
@client.open(&block)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -14,19 +14,21 @@
|
|
14
14
|
# License along with this library; if not, write to the Free Software
|
15
15
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
16
|
|
17
|
-
require "groonga/client/test-helper"
|
18
17
|
require "groonga_client_model/test/fixture"
|
19
18
|
|
20
19
|
module GroongaClientModel
|
21
20
|
module TestHelper
|
21
|
+
include Test::Fixture
|
22
|
+
|
22
23
|
extend ActiveSupport::Concern
|
23
24
|
|
24
25
|
included do
|
25
|
-
include Groonga::Client::TestHelper
|
26
|
-
include Test::Fixture
|
27
|
-
|
28
26
|
setup do
|
29
|
-
|
27
|
+
setup_groonga
|
28
|
+
end
|
29
|
+
|
30
|
+
teardown do
|
31
|
+
teardown_groonga
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
@@ -1577,3 +1577,168 @@ Processing by PostsController#edit as HTML
|
|
1577
1577
|
Rendered posts/_form.html.erb (2.1ms)
|
1578
1578
|
Rendered posts/edit.html.erb within layouts/application (3.3ms)
|
1579
1579
|
Completed 200 OK in 71ms (Views: 5.8ms)
|
1580
|
+
------------------------------------------
|
1581
|
+
PostsControllerTest: test_should_get_index
|
1582
|
+
------------------------------------------
|
1583
|
+
----------------------------------------
|
1584
|
+
PostsControllerTest: test_should_get_new
|
1585
|
+
----------------------------------------
|
1586
|
+
-----------------------------------------
|
1587
|
+
PostsControllerTest: test_should_get_edit
|
1588
|
+
-----------------------------------------
|
1589
|
+
--------------------------------------------
|
1590
|
+
PostsControllerTest: test_should_update_post
|
1591
|
+
--------------------------------------------
|
1592
|
+
--------------------------------------------
|
1593
|
+
PostsControllerTest: test_should_create_post
|
1594
|
+
--------------------------------------------
|
1595
|
+
------------------------------------------
|
1596
|
+
PostsControllerTest: test_should_show_post
|
1597
|
+
------------------------------------------
|
1598
|
+
---------------------------------------------
|
1599
|
+
PostsControllerTest: test_should_destroy_post
|
1600
|
+
---------------------------------------------
|
1601
|
+
--------------------------------------------
|
1602
|
+
PostsControllerTest: test_should_create_post
|
1603
|
+
--------------------------------------------
|
1604
|
+
------------------------------------------
|
1605
|
+
PostsControllerTest: test_should_show_post
|
1606
|
+
------------------------------------------
|
1607
|
+
---------------------------------------------
|
1608
|
+
PostsControllerTest: test_should_destroy_post
|
1609
|
+
---------------------------------------------
|
1610
|
+
----------------------------------------
|
1611
|
+
PostsControllerTest: test_should_get_new
|
1612
|
+
----------------------------------------
|
1613
|
+
--------------------------------------------
|
1614
|
+
PostsControllerTest: test_should_update_post
|
1615
|
+
--------------------------------------------
|
1616
|
+
-----------------------------------------
|
1617
|
+
PostsControllerTest: test_should_get_edit
|
1618
|
+
-----------------------------------------
|
1619
|
+
------------------------------------------
|
1620
|
+
PostsControllerTest: test_should_get_index
|
1621
|
+
------------------------------------------
|
1622
|
+
------------------------------------------
|
1623
|
+
PostsControllerTest: test_should_show_post
|
1624
|
+
------------------------------------------
|
1625
|
+
--------------------------------------------
|
1626
|
+
PostsControllerTest: test_should_create_post
|
1627
|
+
--------------------------------------------
|
1628
|
+
------------------------------------------
|
1629
|
+
PostsControllerTest: test_should_get_index
|
1630
|
+
------------------------------------------
|
1631
|
+
----------------------------------------
|
1632
|
+
PostsControllerTest: test_should_get_new
|
1633
|
+
----------------------------------------
|
1634
|
+
---------------------------------------------
|
1635
|
+
PostsControllerTest: test_should_destroy_post
|
1636
|
+
---------------------------------------------
|
1637
|
+
--------------------------------------------
|
1638
|
+
PostsControllerTest: test_should_update_post
|
1639
|
+
--------------------------------------------
|
1640
|
+
-----------------------------------------
|
1641
|
+
PostsControllerTest: test_should_get_edit
|
1642
|
+
-----------------------------------------
|
1643
|
+
-----------------------------------------
|
1644
|
+
PostsControllerTest: test_should_get_edit
|
1645
|
+
-----------------------------------------
|
1646
|
+
------------------------------------------
|
1647
|
+
PostsControllerTest: test_should_get_index
|
1648
|
+
------------------------------------------
|
1649
|
+
--------------------------------------------
|
1650
|
+
PostsControllerTest: test_should_create_post
|
1651
|
+
--------------------------------------------
|
1652
|
+
------------------------------------------
|
1653
|
+
PostsControllerTest: test_should_show_post
|
1654
|
+
------------------------------------------
|
1655
|
+
---------------------------------------------
|
1656
|
+
PostsControllerTest: test_should_destroy_post
|
1657
|
+
---------------------------------------------
|
1658
|
+
--------------------------------------------
|
1659
|
+
PostsControllerTest: test_should_update_post
|
1660
|
+
--------------------------------------------
|
1661
|
+
----------------------------------------
|
1662
|
+
PostsControllerTest: test_should_get_new
|
1663
|
+
----------------------------------------
|
1664
|
+
---------------------------------------------
|
1665
|
+
PostsControllerTest: test_should_destroy_post
|
1666
|
+
---------------------------------------------
|
1667
|
+
-----------------------------------------
|
1668
|
+
PostsControllerTest: test_should_get_edit
|
1669
|
+
-----------------------------------------
|
1670
|
+
--------------------------------------------
|
1671
|
+
PostsControllerTest: test_should_create_post
|
1672
|
+
--------------------------------------------
|
1673
|
+
------------------------------------------
|
1674
|
+
PostsControllerTest: test_should_get_index
|
1675
|
+
------------------------------------------
|
1676
|
+
----------------------------------------
|
1677
|
+
PostsControllerTest: test_should_get_new
|
1678
|
+
----------------------------------------
|
1679
|
+
------------------------------------------
|
1680
|
+
PostsControllerTest: test_should_show_post
|
1681
|
+
------------------------------------------
|
1682
|
+
--------------------------------------------
|
1683
|
+
PostsControllerTest: test_should_update_post
|
1684
|
+
--------------------------------------------
|
1685
|
+
--------------------------------------------
|
1686
|
+
PostsControllerTest: test_should_create_post
|
1687
|
+
--------------------------------------------
|
1688
|
+
Started POST "/posts" for 127.0.0.1 at 2016-12-20 17:28:34 +0900
|
1689
|
+
Processing by PostsController#create as HTML
|
1690
|
+
Parameters: {"post"=>{"body"=>"World", "title"=>"Hello"}}
|
1691
|
+
Redirected to http://www.example.com/posts/2
|
1692
|
+
Completed 302 Found in 10ms
|
1693
|
+
------------------------------------------
|
1694
|
+
PostsControllerTest: test_should_get_index
|
1695
|
+
------------------------------------------
|
1696
|
+
Started GET "/posts" for 127.0.0.1 at 2016-12-20 17:28:34 +0900
|
1697
|
+
Processing by PostsController#index as HTML
|
1698
|
+
Rendering posts/index.html.erb within layouts/application
|
1699
|
+
Rendered posts/index.html.erb within layouts/application (7.5ms)
|
1700
|
+
Completed 200 OK in 167ms (Views: 164.9ms)
|
1701
|
+
-----------------------------------------
|
1702
|
+
PostsControllerTest: test_should_get_edit
|
1703
|
+
-----------------------------------------
|
1704
|
+
Started GET "/posts/1/edit" for 127.0.0.1 at 2016-12-20 17:28:35 +0900
|
1705
|
+
Processing by PostsController#edit as HTML
|
1706
|
+
Parameters: {"id"=>"1"}
|
1707
|
+
Rendering posts/edit.html.erb within layouts/application
|
1708
|
+
Rendered posts/_form.html.erb (8.1ms)
|
1709
|
+
Rendered posts/edit.html.erb within layouts/application (8.8ms)
|
1710
|
+
Completed 200 OK in 44ms (Views: 10.3ms)
|
1711
|
+
----------------------------------------
|
1712
|
+
PostsControllerTest: test_should_get_new
|
1713
|
+
----------------------------------------
|
1714
|
+
Started GET "/posts/new" for 127.0.0.1 at 2016-12-20 17:28:35 +0900
|
1715
|
+
Processing by PostsController#new as HTML
|
1716
|
+
Rendering posts/new.html.erb within layouts/application
|
1717
|
+
Rendered posts/_form.html.erb (4.2ms)
|
1718
|
+
Rendered posts/new.html.erb within layouts/application (6.3ms)
|
1719
|
+
Completed 200 OK in 13ms (Views: 11.7ms)
|
1720
|
+
------------------------------------------
|
1721
|
+
PostsControllerTest: test_should_show_post
|
1722
|
+
------------------------------------------
|
1723
|
+
Started GET "/posts/1" for 127.0.0.1 at 2016-12-20 17:28:35 +0900
|
1724
|
+
Processing by PostsController#show as HTML
|
1725
|
+
Parameters: {"id"=>"1"}
|
1726
|
+
Rendering posts/show.html.erb within layouts/application
|
1727
|
+
Rendered posts/show.html.erb within layouts/application (0.5ms)
|
1728
|
+
Completed 200 OK in 59ms (Views: 2.1ms)
|
1729
|
+
---------------------------------------------
|
1730
|
+
PostsControllerTest: test_should_destroy_post
|
1731
|
+
---------------------------------------------
|
1732
|
+
Started DELETE "/posts/1" for 127.0.0.1 at 2016-12-20 17:28:35 +0900
|
1733
|
+
Processing by PostsController#destroy as HTML
|
1734
|
+
Parameters: {"id"=>"1"}
|
1735
|
+
Redirected to http://www.example.com/posts
|
1736
|
+
Completed 302 Found in 58ms
|
1737
|
+
--------------------------------------------
|
1738
|
+
PostsControllerTest: test_should_update_post
|
1739
|
+
--------------------------------------------
|
1740
|
+
Started PATCH "/posts/1" for 127.0.0.1 at 2016-12-20 17:28:35 +0900
|
1741
|
+
Processing by PostsController#update as HTML
|
1742
|
+
Parameters: {"post"=>{"body"=>"World", "title"=>"Hello"}, "id"=>"1"}
|
1743
|
+
Redirected to http://www.example.com/posts/1
|
1744
|
+
Completed 302 Found in 59ms
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groonga-client-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.3.
|
19
|
+
version: 0.3.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.3.
|
26
|
+
version: 0.3.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: groonga-command-parser
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- lib/groonga_client_model/schema_loader.rb
|
151
151
|
- lib/groonga_client_model/spec_helper.rb
|
152
152
|
- lib/groonga_client_model/test/fixture.rb
|
153
|
+
- lib/groonga_client_model/test/groonga_server_runner.rb
|
153
154
|
- lib/groonga_client_model/test_helper.rb
|
154
155
|
- lib/groonga_client_model/version.rb
|
155
156
|
- test/apps/rails5/Gemfile
|