picky-generators 4.6.3 → 4.6.4

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.
@@ -22,6 +22,7 @@ module Picky
22
22
  create_target_directory
23
23
  copy_all_files
24
24
  copy_all_files expand_prototype_path('shared/server')
25
+ copy_all_files expand_prototype_path('shared/both')
25
26
  exclaim "\"#{name}\" is a great project name! Have fun :)\n"
26
27
  exclaim ""
27
28
  exclaim "Next steps:"
@@ -21,6 +21,7 @@ module Picky
21
21
  exclaim "Setting up Picky Sinatra Client \"#{name}\"."
22
22
  create_target_directory
23
23
  copy_all_files
24
+ copy_all_files expand_prototype_path('shared/both')
24
25
  exclaim "\"#{name}\" is a great project name! Have fun :)\n"
25
26
  exclaim ""
26
27
  exclaim "Next steps:"
@@ -22,6 +22,7 @@ module Picky
22
22
  create_target_directory
23
23
  copy_all_files
24
24
  copy_all_files expand_prototype_path('shared/server')
25
+ copy_all_files expand_prototype_path('shared/both')
25
26
  exclaim "\"#{name}\" is a great project name! Have fun :)\n"
26
27
  exclaim ""
27
28
  exclaim "Next steps:"
@@ -39,4 +39,4 @@ class Book
39
39
  "<li class='book'><h3><a href='http://google.com?q=#{@title}'>#{@title}</a></h3><em>#{@author}</em><p>#{@year}, #{@publisher}</p><p>#{@subjects}</p></li>"
40
40
  end
41
41
 
42
- end
42
+ end
@@ -25,7 +25,7 @@ describe Picky::Generators::Client::Sinatra do
25
25
  it "should do things in order" do
26
26
  @sinatra.should_receive(:exclaim).twice.ordered # Initial explanation
27
27
  @sinatra.should_receive(:create_target_directory).once.ordered
28
- @sinatra.should_receive(:copy_all_files).once.ordered
28
+ @sinatra.should_receive(:copy_all_files).twice.ordered
29
29
  @sinatra.should_receive(:exclaim).at_least(7).times.ordered # Some user steps to do
30
30
 
31
31
  @sinatra.generate
@@ -25,7 +25,7 @@ describe Picky::Generators::Server::Sinatra do
25
25
  it "should do things in order" do
26
26
  @sinatra.should_receive(:exclaim).once.ordered # Initial explanation
27
27
  @sinatra.should_receive(:create_target_directory).once.ordered
28
- @sinatra.should_receive(:copy_all_files).twice.ordered
28
+ @sinatra.should_receive(:copy_all_files).exactly(3).times.ordered
29
29
  @sinatra.should_receive(:exclaim).at_least(8).times.ordered # Some user steps to do
30
30
 
31
31
  @sinatra.generate
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.6.3
4
+ version: 4.6.4
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-08-12 00:00:00.000000000 Z
12
+ date: 2012-09-20 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.6.3
37
+ version: 4.6.4
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.6.3
45
+ version: 4.6.4
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.6.3
53
+ version: 4.6.4
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.6.3
61
+ version: 4.6.4
62
62
  description: Generators for Picky.
63
63
  email: florian.hanke+picky-generators@gmail.com
64
64
  executables:
@@ -74,7 +74,6 @@ files:
74
74
  - lib/picky-generators/generators/server/sinatra.rb
75
75
  - lib/picky-generators.rb
76
76
  - prototypes/all_in_one/sinatra/app.rb
77
- - prototypes/all_in_one/sinatra/book.rb
78
77
  - prototypes/all_in_one/sinatra/Gemfile
79
78
  - prototypes/all_in_one/sinatra/images/picky.png
80
79
  - prototypes/all_in_one/sinatra/javascripts/history.adapter.jquery.min.js
@@ -90,7 +89,6 @@ files:
90
89
  - prototypes/all_in_one/sinatra/stylesheets/picky.css
91
90
  - prototypes/all_in_one/sinatra/views/search.haml
92
91
  - prototypes/client/sinatra/app.rb
93
- - prototypes/client/sinatra/book.rb
94
92
  - prototypes/client/sinatra/config.ru
95
93
  - prototypes/client/sinatra/Gemfile
96
94
  - prototypes/client/sinatra/images/picky.png
@@ -107,14 +105,13 @@ files:
107
105
  - prototypes/client/sinatra/views/search.haml
108
106
  - prototypes/server/sinatra/app.rb
109
107
  - prototypes/server/sinatra/log/README
110
- - prototypes/server/sinatra/log/unicorn.stderr.log
111
- - prototypes/server/sinatra/log/unicorn.stdout.log
112
108
  - prototypes/server/sinatra/Rakefile
113
109
  - prototypes/server/sinatra/spec/integration_spec.rb
110
+ - prototypes/shared/both/book.rb
111
+ - prototypes/shared/both/data/development/library.csv
112
+ - prototypes/shared/both/data/production/library.csv
113
+ - prototypes/shared/both/data/test/library.csv
114
114
  - prototypes/shared/server/config.ru
115
- - prototypes/shared/server/data/development/library.csv
116
- - prototypes/shared/server/data/production/library.csv
117
- - prototypes/shared/server/data/test/library.csv
118
115
  - prototypes/shared/server/logging.rb
119
116
  - prototypes/shared/server/spec/spec_helper.rb
120
117
  - prototypes/shared/server/tmp/pids/README
@@ -153,3 +150,4 @@ test_files:
153
150
  - spec/lib/picky-generators/generators/client/sinatra_spec.rb
154
151
  - spec/lib/picky-generators/generators/selector_spec.rb
155
152
  - spec/lib/picky-generators/generators/server/sinatra_spec.rb
153
+ has_rdoc:
@@ -1,42 +0,0 @@
1
- require 'csv'
2
-
3
- # A book is simple, it has just:
4
- # * a title
5
- # * an author
6
- # * an isbn
7
- # * a publishing year
8
- # * a publisher
9
- # * a number of subjects
10
- #
11
- class Book
12
-
13
- @@books_mapping = {}
14
-
15
- # Load the books on startup.
16
- #
17
- file_name = File.expand_path 'library.csv', File.dirname(__FILE__)
18
- CSV.open(file_name, 'r').each do |row|
19
- @@books_mapping[row.shift.to_i] = row
20
- end
21
-
22
- # Find uses a lookup table.
23
- #
24
- def self.find ids, _ = {}
25
- ids.map { |id| new(id, *@@books_mapping[id]) }
26
- end
27
-
28
- attr_reader :id
29
-
30
- def initialize id, title, author, year, publisher, subjects
31
- @id, @title, @author, @year, @publisher, @subjects = id, title, author, year, publisher, subjects
32
- end
33
-
34
- # "Rendering" ;)
35
- #
36
- # Note: This is just an example. Please do not render in the model.
37
- #
38
- def to_s
39
- "<li class='book'><h3><a href='http://google.com?q=#{@title}'>#{@title}</a></h3><em>#{@author}</em><p>#{@year}, #{@publisher}</p><p>#{@subjects}</p></li>"
40
- end
41
-
42
- end
@@ -1,98 +0,0 @@
1
- I, [2011-08-07T19:44:32.570326 #13862] INFO -- : listening on addr=0.0.0.0:8080 fd=5
2
- I, [2011-08-07T19:44:32.570869 #13862] INFO -- : Refreshing Gem list
3
- worker=0 spawning...
4
- worker=1 spawning...
5
- worker=2 spawning...
6
- master process ready
7
- worker=0 spawned pid=13864
8
- worker=1 spawned pid=13865
9
- worker=0 ready
10
- worker=1 ready
11
- worker=2 spawned pid=13866
12
- worker=2 ready
13
- reaped #<Process::Status: pid 13866 exit 0> worker=2
14
- reaped #<Process::Status: pid 13865 exit 0> worker=1
15
- reaped #<Process::Status: pid 13864 exit 0> worker=0
16
- master complete
17
- I, [2011-08-07T19:45:29.818891 #13916] INFO -- : listening on addr=0.0.0.0:8080 fd=5
18
- I, [2011-08-07T19:45:29.822904 #13916] INFO -- : Refreshing Gem list
19
- worker=0 spawning...
20
- worker=1 spawning...
21
- worker=2 spawning...
22
- master process ready
23
- worker=0 spawned pid=13917
24
- worker=1 spawned pid=13918
25
- worker=1 ready
26
- worker=0 ready
27
- worker=2 spawned pid=13919
28
- worker=2 ready
29
- reaped #<Process::Status: pid 13919 exit 0> worker=2
30
- reaped #<Process::Status: pid 13918 exit 0> worker=1
31
- reaped #<Process::Status: pid 13917 exit 0> worker=0
32
- master complete
33
- I, [2011-08-07T19:47:59.882771 #14141] INFO -- : listening on addr=0.0.0.0:8080 fd=5
34
- I, [2011-08-07T19:47:59.899987 #14141] INFO -- : Refreshing Gem list
35
- worker=0 spawning...
36
- worker=1 spawning...
37
- worker=2 spawning...
38
- worker=0 spawned pid=14142
39
- worker=0 ready
40
- master process ready
41
- worker=1 spawned pid=14143
42
- worker=1 ready
43
- worker=2 spawned pid=14144
44
- worker=2 ready
45
- reaped #<Process::Status: pid 14144 exit 0> worker=2
46
- reaped #<Process::Status: pid 14143 exit 0> worker=1
47
- reaped #<Process::Status: pid 14142 exit 0> worker=0
48
- master complete
49
- I, [2011-08-07T19:48:25.294568 #14153] INFO -- : listening on addr=0.0.0.0:8080 fd=5
50
- I, [2011-08-07T19:48:25.295306 #14153] INFO -- : Refreshing Gem list
51
- worker=0 spawning...
52
- worker=1 spawning...
53
- worker=2 spawning...
54
- master process ready
55
- worker=0 spawned pid=14154
56
- worker=0 ready
57
- worker=1 spawned pid=14155
58
- worker=1 ready
59
- worker=2 spawned pid=14156
60
- worker=2 ready
61
- 127.0.0.1 - - [07/Aug/2011 19:49:56] "GET /books?query=b HTTP/1.1" 200 59 0.2489
62
- 127.0.0.1 - - [07/Aug/2011 19:49:56] "GET /books?query=b HTTP/1.1" 200 59 0.2517
63
- 127.0.0.1 - - [07/Aug/2011 19:49:57] "GET /books?query=b HTTP/1.1" 200 59 0.1334
64
- 127.0.0.1 - - [07/Aug/2011 19:49:57] "GET /books?query=b HTTP/1.1" 200 59 0.1352
65
- 127.0.0.1 - - [07/Aug/2011 19:49:58] "GET /books?query=b HTTP/1.1" 200 58 0.0009
66
- 127.0.0.1 - - [07/Aug/2011 19:49:58] "GET /books?query=b HTTP/1.1" 200 58 0.0015
67
- reaped #<Process::Status: pid 14156 exit 0> worker=2
68
- reaped #<Process::Status: pid 14155 exit 0> worker=1
69
- reaped #<Process::Status: pid 14154 exit 0> worker=0
70
- master complete
71
- I, [2011-08-07T19:51:12.474331 #14416] INFO -- : listening on addr=0.0.0.0:8080 fd=5
72
- I, [2011-08-07T19:51:12.506839 #14416] INFO -- : Refreshing Gem list
73
- worker=0 spawning...
74
- worker=1 spawning...
75
- worker=2 spawning...
76
- master process ready
77
- worker=0 spawned pid=14417
78
- worker=1 spawned pid=14418
79
- worker=0 ready
80
- worker=1 ready
81
- worker=2 spawned pid=14419
82
- worker=2 ready
83
- 127.0.0.1 - - [07/Aug/2011 19:51:19] "GET /books?query=b HTTP/1.1" 200 204 0.1864
84
- 127.0.0.1 - - [07/Aug/2011 19:51:19] "GET /books?query=b HTTP/1.1" 200 204 0.1890
85
- 127.0.0.1 - - [07/Aug/2011 19:51:22] "GET /books?query=b HTTP/1.1" 200 204 0.1394
86
- 127.0.0.1 - - [07/Aug/2011 19:51:22] "GET /books?query=b HTTP/1.1" 200 204 0.1415
87
- 127.0.0.1 - - [07/Aug/2011 19:51:23] "GET /books?query=b HTTP/1.1" 200 204 0.0011
88
- 127.0.0.1 - - [07/Aug/2011 19:51:23] "GET /books?query=b HTTP/1.1" 200 204 0.0018
89
- 127.0.0.1 - - [07/Aug/2011 19:51:23] "GET /books?query=b HTTP/1.1" 200 204 0.0012
90
- 127.0.0.1 - - [07/Aug/2011 19:51:23] "GET /books?query=b HTTP/1.1" 200 204 0.0025
91
- 127.0.0.1 - - [07/Aug/2011 19:51:24] "GET /books?query=b HTTP/1.1" 200 204 0.0010
92
- 127.0.0.1 - - [07/Aug/2011 19:51:24] "GET /books?query=b HTTP/1.1" 200 204 0.0017
93
- 127.0.0.1 - - [07/Aug/2011 19:51:25] "GET /books?query=b HTTP/1.1" 200 204 0.0013
94
- 127.0.0.1 - - [07/Aug/2011 19:51:25] "GET /books?query=b HTTP/1.1" 200 204 0.0023
95
- reaped #<Process::Status: pid 14419 exit 0> worker=2
96
- reaped #<Process::Status: pid 14418 exit 0> worker=1
97
- reaped #<Process::Status: pid 14417 exit 0> worker=0
98
- master complete
@@ -1,62 +0,0 @@
1
- Loaded picky with environment 'development' in /Users/admin/temp/picky/generators/prototypes/server/sinatra on Ruby 1.9.2.
2
- Loaded picky with environment 'development' in /Users/admin/temp/picky/generators/prototypes/server/sinatra on Ruby 1.9.2.
3
- Loaded picky with environment 'development' in /Users/admin/temp/picky/generators/prototypes/server/sinatra on Ruby 1.9.2.
4
- Loaded picky with environment 'development' in /Users/admin/temp/picky/generators/prototypes/server/sinatra on Ruby 1.9.2.
5
- Loaded picky with environment 'development' in /Users/admin/temp/picky/generators/prototypes/server/sinatra on Ruby 1.9.2.
6
- 19:51:13: "development:books:title": Starting serial data preparation.
7
- 19:51:13: "development:books:title": => /Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/prepared_title_index.txt.
8
- 19:51:13: "development:books:title": Finished serial data preparation.
9
- 19:51:13: "development:books:title:exact": Loading prepared data into memory.
10
- 19:51:13: "development:books:title:exact": Caching from intermediate in-memory index.
11
- 19:51:13: "development:books:title:partial": Generating partial index for index.
12
- 19:51:13: "development:books:title:partial": Caching from intermediate in-memory index.
13
- 19:51:13: "development:books:title:exact": Dumping data.
14
- 19:51:13: "development:books:title:exact": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/title_exact_inverted.json).
15
- 19:51:13: "development:books:title:exact": => Picky::Backend::File::Marshal(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/title_exact_similarity.dump).
16
- 19:51:13: "development:books:title:exact": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/title_exact_weights.json).
17
- 19:51:13: "development:books:title:exact": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/title_exact_configuration.json).
18
- 19:51:13: "development:books:title:partial": Dumping data.
19
- 19:51:13: "development:books:title:partial": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/title_partial_inverted.json).
20
- 19:51:13: "development:books:title:partial": => Picky::Backend::File::Marshal(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/title_partial_similarity.dump).
21
- 19:51:13: "development:books:title:partial": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/title_partial_weights.json).
22
- 19:51:13: "development:books:title:partial": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/title_partial_configuration.json).
23
- 19:51:13: "development:books:title": Caching finished.
24
- 19:51:13: "development:books:author": Starting serial data preparation.
25
- 19:51:13: "development:books:author": => /Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/prepared_author_index.txt.
26
- 19:51:13: "development:books:author": Finished serial data preparation.
27
- 19:51:13: "development:books:author:exact": Loading prepared data into memory.
28
- 19:51:13: "development:books:author:exact": Caching from intermediate in-memory index.
29
- 19:51:13: "development:books:author:partial": Generating partial index for index.
30
- 19:51:13: "development:books:author:partial": Caching from intermediate in-memory index.
31
- 19:51:13: "development:books:author:exact": Dumping data.
32
- 19:51:13: "development:books:author:exact": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/author_exact_inverted.json).
33
- 19:51:13: "development:books:author:exact": => Picky::Backend::File::Marshal(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/author_exact_similarity.dump).
34
- 19:51:13: "development:books:author:exact": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/author_exact_weights.json).
35
- 19:51:13: "development:books:author:exact": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/author_exact_configuration.json).
36
- 19:51:13: "development:books:author:partial": Dumping data.
37
- 19:51:13: "development:books:author:partial": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/author_partial_inverted.json).
38
- 19:51:13: "development:books:author:partial": => Picky::Backend::File::Marshal(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/author_partial_similarity.dump).
39
- 19:51:13: "development:books:author:partial": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/author_partial_weights.json).
40
- 19:51:13: "development:books:author:partial": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/author_partial_configuration.json).
41
- 19:51:13: "development:books:author": Caching finished.
42
- 19:51:13: "development:books:year": Starting serial data preparation.
43
- 19:51:13: "development:books:year": => /Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/prepared_year_index.txt.
44
- 19:51:13: "development:books:year": Finished serial data preparation.
45
- 19:51:13: "development:books:year:exact": Loading prepared data into memory.
46
- 19:51:13: "development:books:year:exact": Caching from intermediate in-memory index.
47
- 19:51:13: "development:books:year:partial": Generating partial index for index.
48
- 19:51:13: "development:books:year:partial": Caching from intermediate in-memory index.
49
- 19:51:13: "development:books:year:exact": Dumping data.
50
- 19:51:13: "development:books:year:exact": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/year_exact_inverted.json).
51
- 19:51:13: "development:books:year:exact": => Picky::Backend::File::Marshal(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/year_exact_similarity.dump).
52
- 19:51:13: "development:books:year:exact": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/year_exact_weights.json).
53
- 19:51:13: "development:books:year:exact": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/year_exact_configuration.json).
54
- 19:51:13: "development:books:year:partial": Dumping data.
55
- 19:51:13: "development:books:year:partial": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/year_partial_inverted.json).
56
- 19:51:13: "development:books:year:partial": => Picky::Backend::File::Marshal(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/year_partial_similarity.dump).
57
- 19:51:13: "development:books:year:partial": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/year_partial_weights.json).
58
- 19:51:13: "development:books:year:partial": => Picky::Backend::File::JSON(/Users/admin/temp/picky/generators/prototypes/server/sinatra/index/development/books/year_partial_configuration.json).
59
- 19:51:13: "development:books:year": Caching finished.
60
- 19:51:13: "development:books:title": Loading index from cache.
61
- 19:51:13: "development:books:author": Loading index from cache.
62
- 19:51:13: "development:books:year": Loading index from cache.