picky-generators 3.0.0.pre1 → 3.0.0.pre2
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.
- data/lib/picky-generators/generators/selector.rb +3 -4
- data/lib/picky-generators/generators/server/{unicorn.rb → classic.rb} +6 -6
- data/lib/picky-generators/generators/server/sinatra.rb +3 -2
- data/lib/picky-generators.rb +3 -2
- data/prototypes/server/classic/Gemfile +27 -0
- data/prototypes/server/classic/app/README +4 -0
- data/prototypes/server/{unicorn → classic}/app/application.rb +8 -3
- data/prototypes/server/{shared_unicorn → classic}/app/db.yml +0 -0
- data/prototypes/server/{shared_unicorn → classic}/app/logging.rb +7 -4
- data/prototypes/server/{shared_unicorn → classic}/config.ru +1 -7
- data/prototypes/server/{shared_unicorn → classic}/log/README +0 -0
- data/prototypes/server/{shared_unicorn → classic}/script/console +1 -1
- data/prototypes/server/classic/spec/spec_helper.rb +8 -0
- data/prototypes/server/{sinatra → shared}/Rakefile +0 -0
- data/prototypes/server/{sinatra → shared}/data/development/library.csv +0 -0
- data/prototypes/server/{sinatra → shared}/data/production/library.csv +0 -0
- data/prototypes/server/{sinatra → shared}/data/test/library.csv +0 -0
- data/prototypes/server/{sinatra → shared}/spec/integration_spec.rb +0 -0
- data/prototypes/server/{sinatra → shared}/tmp/pids/README +0 -0
- data/prototypes/server/{shared_unicorn → shared}/unicorn.rb +0 -0
- data/prototypes/server/sinatra/Gemfile +2 -3
- data/prototypes/server/sinatra/app.rb +5 -3
- data/prototypes/server/sinatra/logging.rb +24 -0
- data/spec/lib/picky-generators/generators/selector_spec.rb +2 -2
- data/spec/lib/picky-generators/generators/server/classic_spec.rb +35 -0
- data/spec/lib/picky-generators/generators/server/sinatra_spec.rb +1 -1
- metadata +24 -34
- data/lib/picky-generators/generators/server/empty_unicorn.rb +0 -40
- data/prototypes/server/empty_unicorn/app/application.rb +0 -10
- data/prototypes/server/shared_unicorn/Gemfile +0 -35
- data/prototypes/server/shared_unicorn/Rakefile +0 -1
- data/prototypes/server/shared_unicorn/app/README +0 -5
- data/prototypes/server/shared_unicorn/tmp/README +0 -0
- data/prototypes/server/shared_unicorn/tmp/pids/README +0 -0
- data/prototypes/server/sinatra/unicorn.rb +0 -17
- data/prototypes/server/unicorn/Rakefile +0 -6
- data/prototypes/server/unicorn/data/development/library.csv +0 -540
- data/prototypes/server/unicorn/data/production/library.csv +0 -540
- data/prototypes/server/unicorn/data/test/library.csv +0 -540
- data/prototypes/server/unicorn/spec/integration_spec.rb +0 -28
- data/prototypes/server/unicorn/spec/spec_helper.rb +0 -8
- data/spec/lib/picky-generators/generators/server/unicorn_spec.rb +0 -35
@@ -1,28 +0,0 @@
|
|
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
|
-
Picky::Indexes.index_for_tests
|
10
|
-
Picky::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
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
#
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
describe Picky::Generators::Server::Unicorn do
|
6
|
-
|
7
|
-
before(:each) do
|
8
|
-
@unicorn = Picky::Generators::Server::Unicorn.new :unicorn_server, 'unicorn_server_dir_name'
|
9
|
-
@unicorn.stub! :exclaim
|
10
|
-
end
|
11
|
-
|
12
|
-
context "after initialize" do
|
13
|
-
it 'has the right identifier' do
|
14
|
-
@unicorn.identifier.should == :unicorn_server
|
15
|
-
end
|
16
|
-
it 'has the right name' do
|
17
|
-
@unicorn.name.should == 'unicorn_server_dir_name'
|
18
|
-
end
|
19
|
-
it 'has the right prototype dir' do
|
20
|
-
@unicorn.prototype_basedir.should == File.expand_path('../../../../../../prototypes/server/unicorn', __FILE__)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe "generate" do
|
25
|
-
it "should do things in order" do
|
26
|
-
@unicorn.should_receive(:exclaim).once.ordered # Initial explanation
|
27
|
-
@unicorn.should_receive(:create_target_directory).once.ordered
|
28
|
-
@unicorn.should_receive(:copy_all_files).twice
|
29
|
-
@unicorn.should_receive(:exclaim).at_least(9).times.ordered # Some user steps to do
|
30
|
-
|
31
|
-
@unicorn.generate
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
end
|