picky-generators 4.0.0pre1 → 4.0.0pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/picky-generators/generators/all_in_one/sinatra.rb +1 -1
- data/lib/picky-generators/generators/selector.rb +0 -6
- data/lib/picky-generators/generators/server/sinatra.rb +1 -1
- data/lib/picky-generators.rb +0 -3
- data/prototypes/all_in_one/sinatra/Gemfile +2 -2
- data/prototypes/all_in_one/sinatra/app.rb +20 -2
- data/prototypes/all_in_one/sinatra/book.rb +1 -1
- data/prototypes/all_in_one/sinatra/views/search.haml +1 -1
- data/prototypes/client/sinatra/Gemfile +1 -1
- data/prototypes/client/sinatra/app.rb +1 -1
- data/prototypes/client/sinatra/views/search.haml +1 -1
- data/prototypes/server/sinatra/app.rb +19 -1
- data/prototypes/{all_in_one/sinatra → shared/server}/config.ru +2 -0
- data/prototypes/shared/server/tmp/pids/README +1 -0
- data/spec/lib/picky-generators/generators/selector_spec.rb +11 -14
- data/spec/lib/picky-generators/generators/server/sinatra_spec.rb +5 -5
- metadata +20 -36
- data/lib/picky-generators/generators/server/classic.rb +0 -42
- data/prototypes/server/classic/Gemfile +0 -27
- data/prototypes/server/classic/app/README +0 -4
- data/prototypes/server/classic/app/application.rb +0 -47
- data/prototypes/server/classic/app/db.yml +0 -13
- data/prototypes/server/classic/app/logging.rb +0 -23
- data/prototypes/server/classic/config.ru +0 -31
- data/prototypes/server/classic/log/README +0 -1
- data/prototypes/server/classic/script/console +0 -5
- data/prototypes/server/classic/spec/spec_helper.rb +0 -8
- data/prototypes/server/shared/data/test/library.csv +0 -540
- data/prototypes/server/shared/tmp/pids/README +0 -1
- data/prototypes/server/sinatra/config.ru +0 -14
- data/prototypes/server/sinatra/logging.rb +0 -24
- data/prototypes/server/sinatra/spec/spec_helper.rb +0 -6
- data/spec/lib/picky-generators/generators/server/classic_spec.rb +0 -35
- /data/prototypes/server/{shared → sinatra}/Rakefile +0 -0
- /data/prototypes/server/{shared → sinatra}/spec/integration_spec.rb +0 -0
- /data/prototypes/{all_in_one/sinatra → shared/server/data/development}/library.csv +0 -0
- /data/prototypes/{server/shared/data/development → shared/server/data/production}/library.csv +0 -0
- /data/prototypes/{server/shared/data/production → shared/server/data/test}/library.csv +0 -0
- /data/prototypes/{all_in_one/sinatra → shared/server}/logging.rb +0 -0
- /data/prototypes/{all_in_one/sinatra → shared/server}/spec/spec_helper.rb +0 -0
- /data/prototypes/{server/shared → shared/server}/unicorn.rb +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
Temporary pids of Unicorn servers.
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require File.expand_path '../app', __FILE__
|
2
|
-
|
3
|
-
# Load all indexes.
|
4
|
-
#
|
5
|
-
Picky::Indexes.load
|
6
|
-
|
7
|
-
# Use Harakiri middleware to kill unicorn child after X requests.
|
8
|
-
#
|
9
|
-
# See http://vimeo.com/12614970 for more info.
|
10
|
-
#
|
11
|
-
# Rack::Harakiri.after = 1000
|
12
|
-
# use Rack::Harakiri
|
13
|
-
|
14
|
-
run BookSearch
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# Separate file since this is usually what is
|
2
|
-
# environment specific.
|
3
|
-
# (But go ahead and place the code in app.rb if you wish)
|
4
|
-
#
|
5
|
-
|
6
|
-
# Standard logging.
|
7
|
-
#
|
8
|
-
require 'logger'
|
9
|
-
AppLogger = Logger.new File.expand_path('log/search.log', PICKY_ROOT)
|
10
|
-
|
11
|
-
# Example with using the syslog logger.
|
12
|
-
# Falling back to the standard log if it isn't available.
|
13
|
-
# (For example, because it is used locally and syslog is
|
14
|
-
# only available on the servers)
|
15
|
-
#
|
16
|
-
# begin
|
17
|
-
# log_program_name = 'search/query'
|
18
|
-
# AppLogger = SyslogLogger.new log_program_name
|
19
|
-
# puts "Logging on syslog #{log_program_name}."
|
20
|
-
# rescue StandardError
|
21
|
-
# puts "Could not connect to the syslog, using the normal log."
|
22
|
-
# require 'logger'
|
23
|
-
# AppLogger = Logger.new(File.join(PICKY_ROOT, 'log/search.log'))
|
24
|
-
# end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
#
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
describe Picky::Generators::Server::Classic do
|
6
|
-
|
7
|
-
before(:each) do
|
8
|
-
@classic = Picky::Generators::Server::Classic.new :classic_server, 'classic_server_dir_name'
|
9
|
-
@classic.stub! :exclaim
|
10
|
-
end
|
11
|
-
|
12
|
-
context "after initialize" do
|
13
|
-
it 'has the right identifier' do
|
14
|
-
@classic.identifier.should == :classic_server
|
15
|
-
end
|
16
|
-
it 'has the right name' do
|
17
|
-
@classic.name.should == 'classic_server_dir_name'
|
18
|
-
end
|
19
|
-
it 'has the right prototype dir' do
|
20
|
-
@classic.prototype_basedir.should == File.expand_path('../../../../../../prototypes/server/classic', __FILE__)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe "generate" do
|
25
|
-
it "should do things in order" do
|
26
|
-
@classic.should_receive(:exclaim).once.ordered # Initial explanation
|
27
|
-
@classic.should_receive(:create_target_directory).once.ordered
|
28
|
-
@classic.should_receive(:copy_all_files).twice.ordered
|
29
|
-
@classic.should_receive(:exclaim).at_least(9).times.ordered # Some user steps to do
|
30
|
-
|
31
|
-
@classic.generate
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
/data/prototypes/{server/shared/data/development → shared/server/data/production}/library.csv
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|