picky-generators 4.9.0 → 4.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -98,7 +98,7 @@ class BookSearch < Sinatra::Application
98
98
  #
99
99
  get '/search/full' do
100
100
  results = books.search params[:query], params[:ids] || 20, params[:offset] || 0
101
- AppLogger.info results
101
+ Picky.logger.info results
102
102
  results = results.to_hash
103
103
  results.extend Picky::Convenience
104
104
  results.populate_with Book do |book|
@@ -64,7 +64,7 @@ class BookSearch < Sinatra::Application
64
64
  #
65
65
  get '/books' do
66
66
  results = books.search params[:query], params[:ids] || 20, params[:offset] || 0
67
- AppLogger.info results
67
+ Picky.logger.info results
68
68
  results.to_json
69
69
  end
70
70
 
@@ -3,22 +3,11 @@
3
3
  # (But go ahead and place the code in app.rb if you wish)
4
4
  #
5
5
 
6
- # Standard logging.
6
+ # Picky loggers log into IO or Logger instances.
7
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)
8
+ # For example:
9
+ # Picky.logger = Picky::Loggers::Concise.new STDOUT
10
+ # Picky.logger = Picky::Loggers::Concise.new Logger.new('log/search.log')
15
11
  #
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
12
+
13
+ Picky.logger = Picky::Loggers::Concise.new STDOUT
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picky-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.0
4
+ version: 4.10.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-16 00:00:00.000000000 Z
12
+ date: 2012-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 4.9.0
37
+ version: 4.10.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 4.9.0
45
+ version: 4.10.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: picky-client
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 4.9.0
53
+ version: 4.10.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 4.9.0
61
+ version: 4.10.0
62
62
  description: Generators for Picky.
63
63
  email: florian.hanke+picky-generators@gmail.com
64
64
  executables: