picky-generators 2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ #
3
+ require 'spec_helper'
4
+ require 'picky-client/spec'
5
+
6
+ describe 'Integration Tests' do
7
+
8
+ before(:all) do
9
+ Indexes.index_for_tests
10
+ Indexes.load_from_cache
11
+ end
12
+
13
+ let(:books) { Picky::TestClient.new(PickySearch, :path => '/books') }
14
+
15
+ # Testing a count of results.
16
+ #
17
+ it { books.search('a s').total.should == 42 }
18
+
19
+ # Testing a specific order of result ids.
20
+ #
21
+ it { books.search('alan').ids.should == [259, 307, 449] }
22
+
23
+ # Testing an order of result categories.
24
+ #
25
+ it { books.search('alan').should have_categories(['author'], ['title']) }
26
+ it { books.search('alan p').should have_categories(['author', 'title'], ['title', 'author']) }
27
+
28
+ end
@@ -0,0 +1,9 @@
1
+ ENV['PICKY_ENV'] = 'test'
2
+
3
+ # require File.expand_path '../../../lib/picky', __FILE__
4
+ require 'picky'
5
+
6
+ SearchLog = Loggers::Search.new ::Logger.new(STDOUT)
7
+ puts "Using STDOUT as test log."
8
+
9
+ Loader.load_application
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: picky-generators
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.2.1
5
+ version: 2.3.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Florian Hanke
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-15 00:00:00 +10:00
13
+ date: 2011-04-17 00:00:00 +10:00
14
14
  default_executable: picky-generate
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,7 @@ dependencies:
32
32
  requirements:
33
33
  - - ~>
34
34
  - !ruby/object:Gem::Version
35
- version: 2.2.1
35
+ version: 2.3.0
36
36
  type: :runtime
37
37
  version_requirements: *id002
38
38
  - !ruby/object:Gem::Dependency
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- version: 2.2.1
46
+ version: 2.3.0
47
47
  type: :runtime
48
48
  version_requirements: *id003
49
49
  description: Generators for Picky.
@@ -90,7 +90,12 @@ files:
90
90
  - prototypes/server/shared_unicorn/tmp/README
91
91
  - prototypes/server/shared_unicorn/unicorn.ru
92
92
  - prototypes/server/unicorn/app/application.rb
93
- - prototypes/server/unicorn/app/library.csv
93
+ - prototypes/server/unicorn/data/development/library.csv
94
+ - prototypes/server/unicorn/data/production/library.csv
95
+ - prototypes/server/unicorn/data/test/library.csv
96
+ - prototypes/server/unicorn/Rakefile
97
+ - prototypes/server/unicorn/spec/integration_spec.rb
98
+ - prototypes/server/unicorn/spec/spec_helper.rb
94
99
  - spec/lib/picky-generators/generators/base_spec.rb
95
100
  - spec/lib/picky-generators/generators/client/sinatra_spec.rb
96
101
  - spec/lib/picky-generators/generators/selector_spec.rb