picky-generators 4.0.0pre1 → 4.0.0pre2

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.
Files changed (41) hide show
  1. data/lib/picky-generators/generators/all_in_one/sinatra.rb +1 -1
  2. data/lib/picky-generators/generators/selector.rb +0 -6
  3. data/lib/picky-generators/generators/server/sinatra.rb +1 -1
  4. data/lib/picky-generators.rb +0 -3
  5. data/prototypes/all_in_one/sinatra/Gemfile +2 -2
  6. data/prototypes/all_in_one/sinatra/app.rb +20 -2
  7. data/prototypes/all_in_one/sinatra/book.rb +1 -1
  8. data/prototypes/all_in_one/sinatra/views/search.haml +1 -1
  9. data/prototypes/client/sinatra/Gemfile +1 -1
  10. data/prototypes/client/sinatra/app.rb +1 -1
  11. data/prototypes/client/sinatra/views/search.haml +1 -1
  12. data/prototypes/server/sinatra/app.rb +19 -1
  13. data/prototypes/{all_in_one/sinatra → shared/server}/config.ru +2 -0
  14. data/prototypes/shared/server/tmp/pids/README +1 -0
  15. data/spec/lib/picky-generators/generators/selector_spec.rb +11 -14
  16. data/spec/lib/picky-generators/generators/server/sinatra_spec.rb +5 -5
  17. metadata +20 -36
  18. data/lib/picky-generators/generators/server/classic.rb +0 -42
  19. data/prototypes/server/classic/Gemfile +0 -27
  20. data/prototypes/server/classic/app/README +0 -4
  21. data/prototypes/server/classic/app/application.rb +0 -47
  22. data/prototypes/server/classic/app/db.yml +0 -13
  23. data/prototypes/server/classic/app/logging.rb +0 -23
  24. data/prototypes/server/classic/config.ru +0 -31
  25. data/prototypes/server/classic/log/README +0 -1
  26. data/prototypes/server/classic/script/console +0 -5
  27. data/prototypes/server/classic/spec/spec_helper.rb +0 -8
  28. data/prototypes/server/shared/data/test/library.csv +0 -540
  29. data/prototypes/server/shared/tmp/pids/README +0 -1
  30. data/prototypes/server/sinatra/config.ru +0 -14
  31. data/prototypes/server/sinatra/logging.rb +0 -24
  32. data/prototypes/server/sinatra/spec/spec_helper.rb +0 -6
  33. data/spec/lib/picky-generators/generators/server/classic_spec.rb +0 -35
  34. /data/prototypes/server/{shared → sinatra}/Rakefile +0 -0
  35. /data/prototypes/server/{shared → sinatra}/spec/integration_spec.rb +0 -0
  36. /data/prototypes/{all_in_one/sinatra → shared/server/data/development}/library.csv +0 -0
  37. /data/prototypes/{server/shared/data/development → shared/server/data/production}/library.csv +0 -0
  38. /data/prototypes/{server/shared/data/production → shared/server/data/test}/library.csv +0 -0
  39. /data/prototypes/{all_in_one/sinatra → shared/server}/logging.rb +0 -0
  40. /data/prototypes/{all_in_one/sinatra → shared/server}/spec/spec_helper.rb +0 -0
  41. /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,6 +0,0 @@
1
- ENV['PICKY_ENV'] = 'test'
2
-
3
- require 'picky'
4
- require 'rspec'
5
-
6
- Picky::Loader.load_application
@@ -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