lazy-head-gen 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +7 -9
- data/Gemfile.lock +18 -32
- data/README.md +21 -149
- data/Rakefile +3 -8
- data/VERSION +1 -1
- data/lazy-head-gen.gemspec +14 -23
- data/lib/lazy-head-gen.rb +73 -0
- data/lib/lazy-head-gen/templates/admin_controller_test.rb.tt +26 -26
- data/lib/lazy-head-gen/templates/blueprints.rb.tt +1 -17
- data/lib/lazy-head-gen/templates/controller.rb.tt +30 -9
- data/lib/lazy-head-gen/templates/controller_test.rb.tt +32 -13
- data/test/helper.rb +5 -1
- metadata +55 -99
data/Gemfile
CHANGED
@@ -6,11 +6,13 @@ source "http://rubygems.org"
|
|
6
6
|
# Add dependencies to develop your gem here.
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
8
8
|
group :development do
|
9
|
-
gem "
|
10
|
-
gem
|
9
|
+
gem "minitest", ">= 0"
|
10
|
+
gem 'turn', "~> 0.9.5"
|
11
|
+
gem "bundler"
|
11
12
|
gem "jeweler", "~> 1.6.4"
|
12
|
-
gem "
|
13
|
-
gem
|
13
|
+
gem "yard", "~> 0.6.0"
|
14
|
+
# gem 'ruby-debug'
|
15
|
+
# gem "simplecov"
|
14
16
|
|
15
17
|
# From Padrino Framework
|
16
18
|
if ENV['SINATRA_EDGE']
|
@@ -22,7 +24,6 @@ group :development do
|
|
22
24
|
gem "grit", ">= 2.4.1"
|
23
25
|
gem "rack", ">= 1.3.0"
|
24
26
|
gem "rake", ">= 0.8.7"
|
25
|
-
gem "yard", ">= 0.7.2"
|
26
27
|
gem "rack-test", ">= 0.5.0"
|
27
28
|
gem "fakeweb", ">= 1.2.8"
|
28
29
|
gem "webrat", ">= 0.5.1"
|
@@ -41,10 +42,7 @@ group :development do
|
|
41
42
|
gem "jruby-openssl"
|
42
43
|
end
|
43
44
|
gem "mocha", "~>0.10.0"
|
44
|
-
gem "minitest", "~>2.6.0"
|
45
45
|
gem "lumberjack"
|
46
|
-
|
47
|
-
gem 'ruby-debug'
|
48
46
|
end
|
49
47
|
|
50
|
-
gem 'padrino'
|
48
|
+
gem 'padrino'
|
data/Gemfile.lock
CHANGED
@@ -4,17 +4,18 @@ GEM
|
|
4
4
|
activesupport (3.2.3)
|
5
5
|
i18n (~> 0.6)
|
6
6
|
multi_json (~> 1.0)
|
7
|
+
ansi (1.4.2)
|
7
8
|
bcrypt-ruby (3.0.1)
|
8
9
|
builder (3.0.0)
|
9
|
-
columnize (0.3.6)
|
10
10
|
diff-lcs (1.1.3)
|
11
11
|
erubis (2.7.0)
|
12
12
|
fakeweb (1.3.0)
|
13
13
|
git (1.2.5)
|
14
|
-
grit (2.
|
14
|
+
grit (2.5.0)
|
15
15
|
diff-lcs (~> 1.1)
|
16
16
|
mime-types (~> 1.15)
|
17
|
-
|
17
|
+
posix-spawn (~> 0.3.6)
|
18
|
+
haml (3.1.6)
|
18
19
|
http_router (0.10.2)
|
19
20
|
rack (>= 1.0.0)
|
20
21
|
url_mount (~> 0.2.1)
|
@@ -23,12 +24,10 @@ GEM
|
|
23
24
|
bundler (~> 1.0)
|
24
25
|
git (>= 1.2.5)
|
25
26
|
rake
|
26
|
-
json (1.
|
27
|
-
linecache (0.46)
|
28
|
-
rbx-require-relative (> 0.0.4)
|
27
|
+
json (1.7.3)
|
29
28
|
lumberjack (1.0.2)
|
30
|
-
macaddr (1.
|
31
|
-
systemu (
|
29
|
+
macaddr (1.6.1)
|
30
|
+
systemu (~> 2.5.0)
|
32
31
|
mail (2.3.3)
|
33
32
|
i18n (>= 0.4.0)
|
34
33
|
mime-types (~> 1.16)
|
@@ -39,7 +38,7 @@ GEM
|
|
39
38
|
mocha (0.10.5)
|
40
39
|
metaclass (~> 0.0.1)
|
41
40
|
multi_json (1.3.2)
|
42
|
-
nokogiri (1.5.
|
41
|
+
nokogiri (1.5.3)
|
43
42
|
padrino (0.10.6)
|
44
43
|
padrino-admin (= 0.10.6)
|
45
44
|
padrino-cache (= 0.10.6)
|
@@ -68,40 +67,30 @@ GEM
|
|
68
67
|
mail (~> 2.3.0)
|
69
68
|
padrino-core (= 0.10.6)
|
70
69
|
polyglot (0.3.3)
|
70
|
+
posix-spawn (0.3.6)
|
71
71
|
rack (1.4.1)
|
72
72
|
rack-protection (1.2.0)
|
73
73
|
rack
|
74
74
|
rack-test (0.6.1)
|
75
75
|
rack (>= 1.0)
|
76
76
|
rake (0.9.2.2)
|
77
|
-
rbx-require-relative (0.0.9)
|
78
|
-
rdoc (3.12)
|
79
|
-
json (~> 1.4)
|
80
|
-
ruby-debug (0.10.4)
|
81
|
-
columnize (>= 0.1)
|
82
|
-
ruby-debug-base (~> 0.10.4.0)
|
83
|
-
ruby-debug-base (0.10.4)
|
84
|
-
linecache (>= 0.3)
|
85
|
-
shoulda (2.11.3)
|
86
|
-
simplecov (0.6.2)
|
87
|
-
multi_json (~> 1.3)
|
88
|
-
simplecov-html (~> 0.5.3)
|
89
|
-
simplecov-html (0.5.3)
|
90
77
|
sinatra (1.3.2)
|
91
78
|
rack (~> 1.3, >= 1.3.6)
|
92
79
|
rack-protection (~> 1.2)
|
93
80
|
tilt (~> 1.3, >= 1.3.3)
|
94
|
-
slim (1.2.
|
81
|
+
slim (1.2.1)
|
95
82
|
temple (~> 0.4.0)
|
96
83
|
tilt (~> 1.3.3)
|
97
84
|
system_timer (1.2.4)
|
98
|
-
systemu (2.5.
|
85
|
+
systemu (2.5.1)
|
99
86
|
temple (0.4.0)
|
100
87
|
thor (0.14.6)
|
101
88
|
tilt (1.3.3)
|
102
89
|
treetop (1.4.10)
|
103
90
|
polyglot
|
104
91
|
polyglot (>= 0.3.1)
|
92
|
+
turn (0.9.5)
|
93
|
+
ansi
|
105
94
|
url_mount (0.2.1)
|
106
95
|
rack
|
107
96
|
uuid (2.3.5)
|
@@ -110,7 +99,7 @@ GEM
|
|
110
99
|
nokogiri (>= 1.2.0)
|
111
100
|
rack (>= 1.0)
|
112
101
|
rack-test (>= 0.5.3)
|
113
|
-
yard (0.
|
102
|
+
yard (0.6.8)
|
114
103
|
|
115
104
|
PLATFORMS
|
116
105
|
ruby
|
@@ -118,7 +107,7 @@ PLATFORMS
|
|
118
107
|
DEPENDENCIES
|
119
108
|
bcrypt-ruby
|
120
109
|
builder (>= 2.1.2)
|
121
|
-
bundler
|
110
|
+
bundler
|
122
111
|
erubis (>= 2.7.0)
|
123
112
|
fakeweb (>= 1.2.8)
|
124
113
|
grit (>= 2.4.1)
|
@@ -127,19 +116,16 @@ DEPENDENCIES
|
|
127
116
|
jruby-openssl
|
128
117
|
json (>= 1.5.3)
|
129
118
|
lumberjack
|
130
|
-
minitest
|
119
|
+
minitest
|
131
120
|
mocha (~> 0.10.0)
|
132
121
|
nokogiri (>= 1.4.4)
|
133
122
|
padrino
|
134
123
|
rack (>= 1.3.0)
|
135
124
|
rack-test (>= 0.5.0)
|
136
125
|
rake (>= 0.8.7)
|
137
|
-
rdoc
|
138
|
-
ruby-debug
|
139
|
-
shoulda
|
140
|
-
simplecov
|
141
126
|
slim (>= 0.9.2)
|
142
127
|
system_timer (>= 1.0)
|
128
|
+
turn (~> 0.9.5)
|
143
129
|
uuid (>= 2.3.1)
|
144
130
|
webrat (>= 0.5.1)
|
145
|
-
yard (
|
131
|
+
yard (~> 0.6.0)
|
data/README.md
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
lazy-head-gen
|
2
|
-
=============
|
1
|
+
# lazy-head-gen
|
3
2
|
|
4
|
-
Lazy Head Gen
|
3
|
+
Lazy Head Gen provides a couple of extra generators for the excellent [Padrino](https://github.com/padrino/padrino-framework) framework.
|
5
4
|
|
6
|
-
It is
|
5
|
+
It is assuming that you are using ActiveRecord and MiniTest, as that is the options we normally use when developing at [Head](http://www.headlondon.com).
|
7
6
|
|
8
|
-
Installation
|
9
|
-
-------------
|
7
|
+
## Installation
|
10
8
|
|
11
9
|
```
|
12
10
|
gem install lazy-head-gen
|
@@ -15,19 +13,17 @@ gem install lazy-head-gen
|
|
15
13
|
In a Gemfile:
|
16
14
|
|
17
15
|
```ruby
|
18
|
-
gem 'lazy-head-gen'
|
16
|
+
gem 'lazy-head-gen', :group => [:development, :test]
|
19
17
|
```
|
20
18
|
|
21
19
|
Padrino gotcha: You'll need to put the `gem 'lazy-head-gen'` requirement *after* `gem 'padrino'` in your Gemfile.
|
22
|
-
Lazy Head Gen needs Padrino loaded before it can
|
20
|
+
Lazy Head Gen needs Padrino loaded before it can work.
|
23
21
|
|
24
|
-
Usage
|
25
|
-
-----
|
22
|
+
## Usage
|
26
23
|
|
27
24
|
There are currently 2 extra generators, scaffold and admin_controller_tests.
|
28
25
|
|
29
|
-
Scaffold
|
30
|
-
========
|
26
|
+
### Scaffold Generator
|
31
27
|
|
32
28
|
To generate a new scaffold:
|
33
29
|
|
@@ -53,9 +49,7 @@ It will also add:
|
|
53
49
|
* A reference to blueprints.rb to test_config.rb if required
|
54
50
|
* Add a Product blueprint and it's properties to the blueprints.rb file
|
55
51
|
|
56
|
-
|
57
|
-
Admin Controller Tests
|
58
|
-
======================
|
52
|
+
### Admin Controller Tests Generator
|
59
53
|
|
60
54
|
To generate a new admin controller test:
|
61
55
|
|
@@ -71,145 +65,24 @@ For example to generate an admin controller test for products:
|
|
71
65
|
padrino g admin_controller_tests products
|
72
66
|
```
|
73
67
|
|
74
|
-
This will generate a fully tested admin controller test for the
|
75
|
-
|
76
|
-
Other requirements
|
77
|
-
------------------
|
78
|
-
|
79
|
-
test_config.rb
|
80
|
-
==============
|
68
|
+
This will generate a fully tested admin controller test for the 6 CRUD routes of a standard Padrino admin controller.
|
81
69
|
|
82
|
-
|
83
|
-
|
84
|
-
```
|
85
|
-
# Allows testing as a logged in admin user
|
86
|
-
#
|
87
|
-
def login_as_admin(account)
|
88
|
-
post "/admin/sessions/create", {
|
89
|
-
:email => account.email, :password => "password"
|
90
|
-
}
|
91
|
-
follow_redirect!
|
92
|
-
end
|
93
|
-
|
94
|
-
# Standard assertions to test when a user is not logged in
|
95
|
-
# and trys to view an admin page
|
96
|
-
#
|
97
|
-
def assert_not_logged_in
|
98
|
-
assert !ok?
|
99
|
-
assert_equal 302, status
|
100
|
-
assert_equal "http://example.org/admin/sessions/new", location
|
101
|
-
end
|
102
|
-
|
103
|
-
# Assertions to test when a user is not logged in
|
104
|
-
# and trys to call a destroy action
|
105
|
-
#
|
106
|
-
def assert_destroy_not_logged_in
|
107
|
-
assert !ok?
|
108
|
-
assert_equal 405, status
|
109
|
-
assert_nil location
|
110
|
-
end
|
111
|
-
|
112
|
-
# Standard assertions to test when a user is logged in
|
113
|
-
# and trys to view an admin page using GET
|
114
|
-
#
|
115
|
-
def assert_logged_in
|
116
|
-
assert ok?
|
117
|
-
assert_equal 200, status
|
118
|
-
end
|
119
|
-
|
120
|
-
# Returns a key and new value which is set depending
|
121
|
-
# on the old values class.
|
122
|
-
#
|
123
|
-
def get_key_and_value(instance)
|
124
|
-
# Discount PK and Timestamps
|
125
|
-
keys = instance.attributes.keys.delete_if do |k|
|
126
|
-
["id", "created_at", "updated_at"].include?(k) or instance.attributes[k].nil?
|
127
|
-
end
|
128
|
-
|
129
|
-
key = old_value = new_value = nil
|
130
|
-
|
131
|
-
if keys.length > 0
|
132
|
-
# Pick a key at random
|
133
|
-
key = keys[rand(keys.length)]
|
134
|
-
old_value = instance.attributes[key]
|
135
|
-
|
136
|
-
case old_value.class.name
|
137
|
-
when "Integer"
|
138
|
-
new_value = old_value + 1
|
139
|
-
when "Time"
|
140
|
-
new_value = old_value + 36000
|
141
|
-
when "String"
|
142
|
-
new_value = "This is a modified string"
|
143
|
-
when "TrueClass"
|
144
|
-
new_value = false
|
145
|
-
when "FalseClass"
|
146
|
-
new_value = true
|
147
|
-
else
|
148
|
-
puts old_value.class.name
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
return [key, new_value]
|
153
|
-
end
|
154
|
-
|
155
|
-
# Some shorthands for last_request and last_response varibles
|
156
|
-
#
|
157
|
-
def path
|
158
|
-
last_request.path
|
159
|
-
end
|
160
|
-
|
161
|
-
def session
|
162
|
-
last_request.env['rack.session']
|
163
|
-
end
|
164
|
-
|
165
|
-
def body
|
166
|
-
last_response.body
|
167
|
-
end
|
168
|
-
|
169
|
-
def status
|
170
|
-
last_response.status
|
171
|
-
end
|
172
|
-
|
173
|
-
def location
|
174
|
-
last_response.original_headers["Location"]
|
175
|
-
end
|
176
|
-
|
177
|
-
def ok?
|
178
|
-
last_response.ok?
|
179
|
-
end
|
180
|
-
```
|
70
|
+
## Extras
|
181
71
|
|
182
|
-
|
183
|
-
=============
|
72
|
+
### Built in assertions and test helpers
|
184
73
|
|
185
|
-
|
186
|
-
|
187
|
-
```
|
188
|
-
module Factory
|
189
|
-
class << self
|
190
|
-
|
191
|
-
def make_admin
|
192
|
-
account = Account.make(:admin)
|
193
|
-
account.save!
|
194
|
-
account
|
195
|
-
end
|
196
|
-
|
197
|
-
end
|
198
|
-
end
|
199
|
-
```
|
74
|
+
TODO: Write about these
|
200
75
|
|
201
|
-
|
76
|
+
### blueprints.rb
|
202
77
|
|
203
|
-
|
204
|
-
----------
|
78
|
+
If you already have a blueprints.rb file, the scaffold generator looks for *# END blueprints* as a marker to insert the generated models blueprint. This is a bit... well crap... but I currently haven't thought of another way to do it.
|
205
79
|
|
206
|
-
|
207
|
-
* Get generators to check the test_config.rb to make sure that the test helpers have been added
|
208
|
-
* Tighten up some of the other requirements, certainly the blueprint inserts
|
80
|
+
## To Do List
|
209
81
|
|
82
|
+
* Finish README
|
83
|
+
* See if there is a better way to do the blueprint inserts
|
210
84
|
|
211
|
-
Contributing to lazy-head-gen
|
212
|
-
-----------------------------
|
85
|
+
## Contributing to lazy-head-gen
|
213
86
|
|
214
87
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
215
88
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
@@ -219,8 +92,7 @@ Contributing to lazy-head-gen
|
|
219
92
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
220
93
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
221
94
|
|
222
|
-
Copyright
|
223
|
-
---------
|
95
|
+
## Copyright
|
224
96
|
|
225
|
-
Copyright (c) 2012 Stuart Chinery, http://www.headlondon.com
|
97
|
+
Copyright (c) 2012 [Stuart Chinery](http://www.headlondon.com/who-we-are#stuart-chinery), [headlondon.com](http://www.headlondon.com)
|
226
98
|
See LICENSE.txt for further details.
|
data/Rakefile
CHANGED
@@ -32,12 +32,7 @@ Rake::TestTask.new(:test) do |test|
|
|
32
32
|
test.verbose = true
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
|
-
Rake::RDocTask.new do |rdoc|
|
37
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
35
|
+
task :default => :test
|
38
36
|
|
39
|
-
|
40
|
-
|
41
|
-
rdoc.rdoc_files.include('README*')
|
42
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
43
|
-
end
|
37
|
+
require 'yard'
|
38
|
+
YARD::Rake::YardocTask.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lazy-head-gen.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "lazy-head-gen"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Stuart Chinery"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-06-07"
|
13
13
|
s.description = "Lazy Head Gen is simply a couple of extra generators for the excellent Padrino framework."
|
14
14
|
s.email = "stuart.chinery@headlondon.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -53,17 +53,16 @@ Gem::Specification.new do |s|
|
|
53
53
|
|
54
54
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
55
55
|
s.add_runtime_dependency(%q<padrino>, [">= 0"])
|
56
|
-
s.add_development_dependency(%q<
|
57
|
-
s.add_development_dependency(%q<
|
56
|
+
s.add_development_dependency(%q<minitest>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<turn>, ["~> 0.9.5"])
|
58
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
58
59
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
59
|
-
s.add_development_dependency(%q<
|
60
|
-
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
60
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
61
61
|
s.add_development_dependency(%q<json>, [">= 1.5.3"])
|
62
62
|
s.add_development_dependency(%q<nokogiri>, [">= 1.4.4"])
|
63
63
|
s.add_development_dependency(%q<grit>, [">= 2.4.1"])
|
64
64
|
s.add_development_dependency(%q<rack>, [">= 1.3.0"])
|
65
65
|
s.add_development_dependency(%q<rake>, [">= 0.8.7"])
|
66
|
-
s.add_development_dependency(%q<yard>, [">= 0.7.2"])
|
67
66
|
s.add_development_dependency(%q<rack-test>, [">= 0.5.0"])
|
68
67
|
s.add_development_dependency(%q<fakeweb>, [">= 1.2.8"])
|
69
68
|
s.add_development_dependency(%q<webrat>, [">= 0.5.1"])
|
@@ -76,22 +75,19 @@ Gem::Specification.new do |s|
|
|
76
75
|
s.add_development_dependency(%q<system_timer>, [">= 1.0"])
|
77
76
|
s.add_development_dependency(%q<jruby-openssl>, [">= 0"])
|
78
77
|
s.add_development_dependency(%q<mocha>, ["~> 0.10.0"])
|
79
|
-
s.add_development_dependency(%q<minitest>, ["~> 2.6.0"])
|
80
78
|
s.add_development_dependency(%q<lumberjack>, [">= 0"])
|
81
|
-
s.add_development_dependency(%q<ruby-debug>, [">= 0"])
|
82
79
|
else
|
83
80
|
s.add_dependency(%q<padrino>, [">= 0"])
|
84
|
-
s.add_dependency(%q<
|
85
|
-
s.add_dependency(%q<
|
81
|
+
s.add_dependency(%q<minitest>, [">= 0"])
|
82
|
+
s.add_dependency(%q<turn>, ["~> 0.9.5"])
|
83
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
86
84
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
87
|
-
s.add_dependency(%q<
|
88
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
85
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
89
86
|
s.add_dependency(%q<json>, [">= 1.5.3"])
|
90
87
|
s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
|
91
88
|
s.add_dependency(%q<grit>, [">= 2.4.1"])
|
92
89
|
s.add_dependency(%q<rack>, [">= 1.3.0"])
|
93
90
|
s.add_dependency(%q<rake>, [">= 0.8.7"])
|
94
|
-
s.add_dependency(%q<yard>, [">= 0.7.2"])
|
95
91
|
s.add_dependency(%q<rack-test>, [">= 0.5.0"])
|
96
92
|
s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
|
97
93
|
s.add_dependency(%q<webrat>, [">= 0.5.1"])
|
@@ -104,23 +100,20 @@ Gem::Specification.new do |s|
|
|
104
100
|
s.add_dependency(%q<system_timer>, [">= 1.0"])
|
105
101
|
s.add_dependency(%q<jruby-openssl>, [">= 0"])
|
106
102
|
s.add_dependency(%q<mocha>, ["~> 0.10.0"])
|
107
|
-
s.add_dependency(%q<minitest>, ["~> 2.6.0"])
|
108
103
|
s.add_dependency(%q<lumberjack>, [">= 0"])
|
109
|
-
s.add_dependency(%q<ruby-debug>, [">= 0"])
|
110
104
|
end
|
111
105
|
else
|
112
106
|
s.add_dependency(%q<padrino>, [">= 0"])
|
113
|
-
s.add_dependency(%q<
|
114
|
-
s.add_dependency(%q<
|
107
|
+
s.add_dependency(%q<minitest>, [">= 0"])
|
108
|
+
s.add_dependency(%q<turn>, ["~> 0.9.5"])
|
109
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
115
110
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
116
|
-
s.add_dependency(%q<
|
117
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
111
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
118
112
|
s.add_dependency(%q<json>, [">= 1.5.3"])
|
119
113
|
s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
|
120
114
|
s.add_dependency(%q<grit>, [">= 2.4.1"])
|
121
115
|
s.add_dependency(%q<rack>, [">= 1.3.0"])
|
122
116
|
s.add_dependency(%q<rake>, [">= 0.8.7"])
|
123
|
-
s.add_dependency(%q<yard>, [">= 0.7.2"])
|
124
117
|
s.add_dependency(%q<rack-test>, [">= 0.5.0"])
|
125
118
|
s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
|
126
119
|
s.add_dependency(%q<webrat>, [">= 0.5.1"])
|
@@ -133,9 +126,7 @@ Gem::Specification.new do |s|
|
|
133
126
|
s.add_dependency(%q<system_timer>, [">= 1.0"])
|
134
127
|
s.add_dependency(%q<jruby-openssl>, [">= 0"])
|
135
128
|
s.add_dependency(%q<mocha>, ["~> 0.10.0"])
|
136
|
-
s.add_dependency(%q<minitest>, ["~> 2.6.0"])
|
137
129
|
s.add_dependency(%q<lumberjack>, [">= 0"])
|
138
|
-
s.add_dependency(%q<ruby-debug>, [">= 0"])
|
139
130
|
end
|
140
131
|
end
|
141
132
|
|
data/lib/lazy-head-gen.rb
CHANGED
@@ -3,4 +3,77 @@ begin
|
|
3
3
|
Padrino::Generators.load_paths << Dir[File.dirname(__FILE__) + '/lazy-head-gen/{admin_controller_test,scaffold}.rb']
|
4
4
|
rescue LoadError
|
5
5
|
# Fail silently
|
6
|
+
end
|
7
|
+
|
8
|
+
module LazyHeadGen
|
9
|
+
|
10
|
+
# Allows testing as a logged in admin user
|
11
|
+
#
|
12
|
+
def login_as_admin(account)
|
13
|
+
post "/admin/sessions/create", {
|
14
|
+
:email => account.email, :password => "password"
|
15
|
+
}
|
16
|
+
follow_redirect!
|
17
|
+
end
|
18
|
+
|
19
|
+
# Standard assertions to test when an admin user is not logged in
|
20
|
+
# and trys to view an admin page
|
21
|
+
#
|
22
|
+
def assert_admin_not_logged_in
|
23
|
+
assert !ok?
|
24
|
+
assert_equal 302, status
|
25
|
+
assert_equal "http://example.org/admin/sessions/new", location
|
26
|
+
end
|
27
|
+
|
28
|
+
# Assertions to test when an admin user is not logged in
|
29
|
+
# and trys to call a destroy action
|
30
|
+
#
|
31
|
+
def assert_admin_destroy_not_logged_in
|
32
|
+
assert !ok?
|
33
|
+
assert_equal 405, status
|
34
|
+
assert_nil location
|
35
|
+
end
|
36
|
+
|
37
|
+
# Some shorthands for last_request and last_response varibles
|
38
|
+
#
|
39
|
+
def path
|
40
|
+
last_request.path
|
41
|
+
end
|
42
|
+
|
43
|
+
def session
|
44
|
+
last_request.env['rack.session']
|
45
|
+
end
|
46
|
+
|
47
|
+
def body
|
48
|
+
last_response.body
|
49
|
+
end
|
50
|
+
|
51
|
+
def status
|
52
|
+
last_response.status
|
53
|
+
end
|
54
|
+
|
55
|
+
def location
|
56
|
+
last_response.original_headers["Location"]
|
57
|
+
end
|
58
|
+
|
59
|
+
def ok?
|
60
|
+
last_response.ok?
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
# A factory which we can use to build objects which are a bit more complex or
|
65
|
+
# which require special setup which can't be done by Machinist without a bit of
|
66
|
+
# help.
|
67
|
+
#
|
68
|
+
module Factory
|
69
|
+
class << self
|
70
|
+
|
71
|
+
def make_admin
|
72
|
+
account = Account.make!
|
73
|
+
account.save!
|
74
|
+
account
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
6
79
|
end
|
@@ -12,7 +12,7 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should not display the <%= @pluralized %> index page" do
|
15
|
-
|
15
|
+
assert_admin_not_logged_in
|
16
16
|
end
|
17
17
|
end
|
18
18
|
# END GET index
|
@@ -24,7 +24,7 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should not display the <%= @pluralized %> new page" do
|
27
|
-
|
27
|
+
assert_admin_not_logged_in
|
28
28
|
end
|
29
29
|
end
|
30
30
|
# END GET new
|
@@ -36,7 +36,7 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it "should not return the created text" do
|
39
|
-
|
39
|
+
assert_admin_not_logged_in
|
40
40
|
end
|
41
41
|
end
|
42
42
|
# END POST create
|
@@ -49,7 +49,7 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
it "should not display the <%= @pluralized %> edit page" do
|
52
|
-
|
52
|
+
assert_admin_not_logged_in
|
53
53
|
end
|
54
54
|
end
|
55
55
|
# END GET edit
|
@@ -62,7 +62,7 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
62
62
|
end
|
63
63
|
|
64
64
|
it "should not return the updated text" do
|
65
|
-
|
65
|
+
assert_admin_not_logged_in
|
66
66
|
end
|
67
67
|
end
|
68
68
|
# END PUT update
|
@@ -75,7 +75,7 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
75
75
|
end
|
76
76
|
|
77
77
|
it "should not return the destroyed text" do
|
78
|
-
|
78
|
+
assert_admin_destroy_not_logged_in
|
79
79
|
end
|
80
80
|
end
|
81
81
|
# END DELETE destroy
|
@@ -98,7 +98,8 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
98
98
|
end
|
99
99
|
|
100
100
|
it "should display the <%= @pluralized %> index page" do
|
101
|
-
|
101
|
+
assert ok?
|
102
|
+
assert_equal 200, status
|
102
103
|
assert_equal "/admin/<%= @pluralized %>", path
|
103
104
|
end
|
104
105
|
end
|
@@ -111,7 +112,8 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
111
112
|
end
|
112
113
|
|
113
114
|
it "should display the <%= @pluralized %> new page" do
|
114
|
-
|
115
|
+
assert ok?
|
116
|
+
assert_equal 200, status
|
115
117
|
assert_equal "/admin/<%= @pluralized %>/new", path
|
116
118
|
end
|
117
119
|
end
|
@@ -124,9 +126,12 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
124
126
|
post "/admin/<%= @pluralized %>/create", :<%= @singular %> => <%= @model %>.make.attributes
|
125
127
|
end
|
126
128
|
|
129
|
+
it "should redirect to the edit page" do
|
130
|
+
assert_equal status, 302
|
131
|
+
assert location.include?("/admin/<%= @pluralized %>/edit/#{<%= @model %>.last.to_param}")
|
132
|
+
end
|
133
|
+
|
127
134
|
it "should create a <%= @singular %>" do
|
128
|
-
assert_equal 302, status
|
129
|
-
assert location.include?("/admin/<%= @pluralized %>/edit/")
|
130
135
|
assert_equal @<%= @singular %>_count + 1, <%= @model %>.count
|
131
136
|
end
|
132
137
|
end
|
@@ -140,7 +145,8 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
140
145
|
end
|
141
146
|
|
142
147
|
it "should display the <%= @pluralized %> edit page" do
|
143
|
-
|
148
|
+
assert ok?
|
149
|
+
assert_equal 200, status
|
144
150
|
assert_equal "/admin/<%= @pluralized %>/edit/#{@<%= @singular %>.to_param}", path
|
145
151
|
end
|
146
152
|
end
|
@@ -151,27 +157,18 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
151
157
|
before do
|
152
158
|
@<%= @singular %> = <%= @model %>.make!
|
153
159
|
@<%= @singular %>_count = <%= @model %>.count
|
154
|
-
@<%= @singular
|
155
|
-
|
156
|
-
key_and_value = get_key_and_value(@<%= @singular %>)
|
157
|
-
if key_and_value[0] and key_and_value[1]
|
158
|
-
@key = key_and_value[0]
|
159
|
-
@value = key_and_value[1]
|
160
|
-
@<%= @singular %>_hash = <%= @model %>.make(@key => @value).attributes
|
161
|
-
end
|
162
|
-
|
163
|
-
put "/admin/<%= @pluralized %>/update/#{@<%= @singular %>.to_param}", :<%= @singular %> => @<%= @singular %>_hash
|
164
|
-
|
160
|
+
put "/admin/<%= @pluralized %>/update/#{@<%= @singular %>.to_param}"
|
165
161
|
@updated_<%= @singular %> = <%= @model %>.find(@<%= @singular %>.to_param)
|
166
162
|
end
|
167
163
|
|
168
|
-
it "should
|
164
|
+
it "should redirect to the edit page" do
|
169
165
|
assert_equal status, 302
|
170
166
|
assert location.include?("/admin/<%= @pluralized %>/edit/#{@<%= @singular %>.to_param}")
|
167
|
+
end
|
168
|
+
|
169
|
+
it "should update a <%= @singular %>" do
|
171
170
|
assert_equal @updated_<%= @singular %>.id, @<%= @singular %>.id
|
172
171
|
assert_equal @<%= @singular %>_count, <%= @model %>.count
|
173
|
-
# Only assert if the <%= @singular %> has a key other than id or timestamps
|
174
|
-
assert_equal @updated_<%= @singular %>.attributes[@key], @value if @key and @value
|
175
172
|
end
|
176
173
|
end
|
177
174
|
# END PUT update
|
@@ -184,8 +181,11 @@ describe "Admin::<%= @controller if @controller %>Controller" do
|
|
184
181
|
delete "/admin/<%= @pluralized %>/destroy/#{@<%= @singular %>.to_param}"
|
185
182
|
end
|
186
183
|
|
187
|
-
it "should
|
184
|
+
it "should redirect to the index page" do
|
188
185
|
assert_equal 302, status
|
186
|
+
end
|
187
|
+
|
188
|
+
it "should destroy a <%= @singular %>" do
|
189
189
|
assert_equal @<%= @singular %>_count - 1, <%= @model %>.count
|
190
190
|
end
|
191
191
|
end
|
@@ -13,20 +13,4 @@ Account.blueprint do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
|
16
|
-
# END blueprints
|
17
|
-
|
18
|
-
# A factory which we can use to build objects which are a bit more complex or
|
19
|
-
# which require special setup which can't be done by Machinist without a bit of
|
20
|
-
# help.
|
21
|
-
#
|
22
|
-
module Factory
|
23
|
-
class << self
|
24
|
-
|
25
|
-
def make_admin
|
26
|
-
account = Account.make!
|
27
|
-
account.save!
|
28
|
-
account
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|
32
|
-
end
|
16
|
+
# END blueprints
|
@@ -1,33 +1,54 @@
|
|
1
|
-
<%= @app_name %>.controllers <%= ":#{@pluralized}"
|
1
|
+
<%= @app_name %>.controllers <%= ":#{@pluralized}" %> do
|
2
2
|
|
3
3
|
get :index do
|
4
|
-
|
4
|
+
@<%= @pluralized %> = <%= @model %>.all
|
5
|
+
render "<%= @pluralized %>/index"
|
5
6
|
end
|
6
7
|
|
7
8
|
get :show, :with => :id do
|
8
|
-
|
9
|
+
@<%= @singular %> = <%= @model %>.find(params[:id])
|
10
|
+
render "<%= @pluralized %>/show"
|
9
11
|
end
|
10
12
|
|
11
13
|
<% if @create_full -%>
|
12
14
|
get :new do
|
13
|
-
|
15
|
+
@<%= @singular %> = <%= @model %>.new
|
16
|
+
render "<%= @pluralized %>/new"
|
14
17
|
end
|
15
18
|
|
16
19
|
post :create do
|
17
|
-
|
20
|
+
@<%= @singular %> = <%= @model %>.new(params[:<%= @singular %>])
|
21
|
+
if @<%= @singular %>.save
|
22
|
+
flash[:notice] = '<%= @model %> was successfully created.'
|
23
|
+
redirect url(:<%= @pluralized %>, :show, :id => @<%= @singular %>.id)
|
24
|
+
else
|
25
|
+
render '<%= @pluralized %>/new'
|
26
|
+
end
|
18
27
|
end
|
19
28
|
|
20
29
|
get :edit, :with => :id do
|
21
|
-
|
30
|
+
@<%= @singular %> = <%= @model %>.find(params[:id])
|
31
|
+
render "<%= @pluralized %>/edit"
|
22
32
|
end
|
23
33
|
|
24
34
|
put :update, :with => :id do
|
25
|
-
|
35
|
+
@<%= @singular %> = <%= @model %>.find(params[:id])
|
36
|
+
if @<%= @singular %>.update_attributes(params[:<%= @singular %>])
|
37
|
+
flash[:notice] = '<%= @model %> was successfully updated.'
|
38
|
+
redirect url(:<%= @pluralized %>, :show, :id => @<%= @singular %>.id)
|
39
|
+
else
|
40
|
+
render '<%= @pluralized %>/edit'
|
41
|
+
end
|
26
42
|
end
|
27
43
|
|
28
44
|
delete :destroy, :with => :id do
|
29
|
-
|
45
|
+
@<%= @singular %> = <%= @model %>.find(params[:id])
|
46
|
+
if @<%= @singular %>.destroy
|
47
|
+
flash[:notice] = '<%= @model %> was successfully destroyed.'
|
48
|
+
else
|
49
|
+
flash[:error] = 'Unable to destroy <%= @model %>!'
|
50
|
+
end
|
51
|
+
redirect url(:<%= @pluralized %>, :index)
|
30
52
|
end
|
31
|
-
|
32
53
|
<% end -%>
|
33
54
|
end
|
@@ -17,7 +17,7 @@ describe "<%= @controller if @controller %>Controller" do
|
|
17
17
|
# START GET show
|
18
18
|
describe "GET show" do
|
19
19
|
before do
|
20
|
-
@<%= @singular %> = <%= @model %>.make
|
20
|
+
@<%= @singular %> = <%= @model %>.make!
|
21
21
|
get "/<%= @pluralized %>/show/#{@<%= @singular %>.to_param}"
|
22
22
|
end
|
23
23
|
|
@@ -43,11 +43,17 @@ describe "<%= @controller if @controller %>Controller" do
|
|
43
43
|
# START POST create
|
44
44
|
describe "Post create" do
|
45
45
|
before do
|
46
|
-
|
46
|
+
@count = <%= @model %>.count
|
47
|
+
post "/<%= @pluralized %>/create", :<%= @singular %> => <%= @model %>.make.attributes
|
47
48
|
end
|
48
49
|
|
49
|
-
it "should
|
50
|
-
|
50
|
+
it "should redirect to the show page" do
|
51
|
+
assert_equal 302, status
|
52
|
+
assert location.include?("/<%= @pluralized %>/show/")
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should create a new <%= @singular %>" do
|
56
|
+
assert_equal @count + 1, <%= @model %>.count
|
51
57
|
end
|
52
58
|
end
|
53
59
|
# END POST create
|
@@ -55,7 +61,7 @@ describe "<%= @controller if @controller %>Controller" do
|
|
55
61
|
# START GET edit
|
56
62
|
describe "GET edit" do
|
57
63
|
before do
|
58
|
-
@<%= @singular %> = <%= @model %>.make
|
64
|
+
@<%= @singular %> = <%= @model %>.make!
|
59
65
|
get "/<%= @pluralized %>/edit/#{@<%= @singular %>.to_param}"
|
60
66
|
end
|
61
67
|
|
@@ -68,12 +74,20 @@ describe "<%= @controller if @controller %>Controller" do
|
|
68
74
|
# START PUT update
|
69
75
|
describe "PUT update" do
|
70
76
|
before do
|
71
|
-
@<%= @singular %> = <%= @
|
72
|
-
|
77
|
+
@<%= @singular %> = <%= @model %>.make!
|
78
|
+
@count = <%= @model %>.count
|
79
|
+
put "/<%= @pluralized %>/update/#{@<%= @singular %>.to_param}", :<%= @singular %> => <%= @model %>.make.attributes
|
80
|
+
@updated_<%= @singular %> = <%= @model %>.find(@<%= @singular %>.to_param)
|
81
|
+
end
|
82
|
+
|
83
|
+
it "should redirect to the show page" do
|
84
|
+
assert_equal 302, status
|
85
|
+
assert location.include?("/<%= @pluralized %>/show/")
|
73
86
|
end
|
74
87
|
|
75
|
-
it "should
|
76
|
-
|
88
|
+
it "should not create a new <%= @singular %>" do
|
89
|
+
assert_equal @count, <%= @model %>.count
|
90
|
+
assert_equal @updated_<%= @singular %>.id, @<%= @singular %>.id
|
77
91
|
end
|
78
92
|
end
|
79
93
|
# END PUT update
|
@@ -81,12 +95,17 @@ describe "<%= @controller if @controller %>Controller" do
|
|
81
95
|
# START DELETE destroy
|
82
96
|
describe "on DELETE destroy" do
|
83
97
|
before do
|
84
|
-
@<%= @singular %> = <%= @
|
85
|
-
|
98
|
+
@<%= @singular %> = <%= @model %>.make!
|
99
|
+
@count = <%= @model %>.count
|
100
|
+
delete "/<%= @pluralized %>/destroy/#{@<%= @singular %>.to_param}"
|
101
|
+
end
|
102
|
+
|
103
|
+
it "should redirect to the index page" do
|
104
|
+
assert_equal 302, status
|
86
105
|
end
|
87
106
|
|
88
|
-
it "should
|
89
|
-
assert_equal
|
107
|
+
it "should delete the <%= @singular %>" do
|
108
|
+
assert_equal(@count - 1, <%= @model %>.count)
|
90
109
|
end
|
91
110
|
end
|
92
111
|
# END DELETE destroy
|
data/test/helper.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
ENV['PADRINO_ENV'] = 'test'
|
2
2
|
PADRINO_ROOT = File.dirname(__FILE__) unless defined? PADRINO_ROOT
|
3
3
|
|
4
|
+
# require 'simplecov'
|
5
|
+
# SimpleCov.start
|
6
|
+
|
4
7
|
require File.expand_path('../load_paths', __FILE__)
|
5
8
|
require 'minitest/autorun'
|
6
9
|
require 'rack/test'
|
@@ -11,7 +14,8 @@ require 'padrino-core/support_lite' unless defined?(SupportLite)
|
|
11
14
|
require 'padrino-admin'
|
12
15
|
require File.dirname(__FILE__) + '/../lib/lazy-head-gen.rb'
|
13
16
|
|
14
|
-
require '
|
17
|
+
begin; require 'turn/autorun'; rescue LoadError; end
|
18
|
+
# require 'ruby-debug'
|
15
19
|
|
16
20
|
Padrino::Generators.load_components!
|
17
21
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazy-head-gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stuart Chinery
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-06-07 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
type: :runtime
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
- 0
|
44
44
|
version: "0"
|
45
45
|
version_requirements: *id002
|
46
|
-
name:
|
46
|
+
name: minitest
|
47
47
|
prerelease: false
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
type: :development
|
@@ -52,58 +52,60 @@ dependencies:
|
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
hash:
|
55
|
+
hash: 49
|
56
56
|
segments:
|
57
|
-
-
|
58
|
-
-
|
59
|
-
-
|
60
|
-
version:
|
57
|
+
- 0
|
58
|
+
- 9
|
59
|
+
- 5
|
60
|
+
version: 0.9.5
|
61
61
|
version_requirements: *id003
|
62
|
-
name:
|
62
|
+
name: turn
|
63
63
|
prerelease: false
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
type: :development
|
66
66
|
requirement: &id004 !ruby/object:Gem::Requirement
|
67
67
|
none: false
|
68
68
|
requirements:
|
69
|
-
- -
|
69
|
+
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
hash:
|
71
|
+
hash: 3
|
72
72
|
segments:
|
73
|
-
-
|
74
|
-
|
75
|
-
- 4
|
76
|
-
version: 1.6.4
|
73
|
+
- 0
|
74
|
+
version: "0"
|
77
75
|
version_requirements: *id004
|
78
|
-
name:
|
76
|
+
name: bundler
|
79
77
|
prerelease: false
|
80
78
|
- !ruby/object:Gem::Dependency
|
81
79
|
type: :development
|
82
80
|
requirement: &id005 !ruby/object:Gem::Requirement
|
83
81
|
none: false
|
84
82
|
requirements:
|
85
|
-
- -
|
83
|
+
- - ~>
|
86
84
|
- !ruby/object:Gem::Version
|
87
|
-
hash:
|
85
|
+
hash: 7
|
88
86
|
segments:
|
89
|
-
-
|
90
|
-
|
87
|
+
- 1
|
88
|
+
- 6
|
89
|
+
- 4
|
90
|
+
version: 1.6.4
|
91
91
|
version_requirements: *id005
|
92
|
-
name:
|
92
|
+
name: jeweler
|
93
93
|
prerelease: false
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
type: :development
|
96
96
|
requirement: &id006 !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ~>
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
hash:
|
101
|
+
hash: 7
|
102
102
|
segments:
|
103
103
|
- 0
|
104
|
-
|
104
|
+
- 6
|
105
|
+
- 0
|
106
|
+
version: 0.6.0
|
105
107
|
version_requirements: *id006
|
106
|
-
name:
|
108
|
+
name: yard
|
107
109
|
prerelease: false
|
108
110
|
- !ruby/object:Gem::Dependency
|
109
111
|
type: :development
|
@@ -188,22 +190,6 @@ dependencies:
|
|
188
190
|
- !ruby/object:Gem::Dependency
|
189
191
|
type: :development
|
190
192
|
requirement: &id012 !ruby/object:Gem::Requirement
|
191
|
-
none: false
|
192
|
-
requirements:
|
193
|
-
- - ">="
|
194
|
-
- !ruby/object:Gem::Version
|
195
|
-
hash: 7
|
196
|
-
segments:
|
197
|
-
- 0
|
198
|
-
- 7
|
199
|
-
- 2
|
200
|
-
version: 0.7.2
|
201
|
-
version_requirements: *id012
|
202
|
-
name: yard
|
203
|
-
prerelease: false
|
204
|
-
- !ruby/object:Gem::Dependency
|
205
|
-
type: :development
|
206
|
-
requirement: &id013 !ruby/object:Gem::Requirement
|
207
193
|
none: false
|
208
194
|
requirements:
|
209
195
|
- - ">="
|
@@ -214,12 +200,12 @@ dependencies:
|
|
214
200
|
- 5
|
215
201
|
- 0
|
216
202
|
version: 0.5.0
|
217
|
-
version_requirements: *
|
203
|
+
version_requirements: *id012
|
218
204
|
name: rack-test
|
219
205
|
prerelease: false
|
220
206
|
- !ruby/object:Gem::Dependency
|
221
207
|
type: :development
|
222
|
-
requirement: &
|
208
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
223
209
|
none: false
|
224
210
|
requirements:
|
225
211
|
- - ">="
|
@@ -230,12 +216,12 @@ dependencies:
|
|
230
216
|
- 2
|
231
217
|
- 8
|
232
218
|
version: 1.2.8
|
233
|
-
version_requirements: *
|
219
|
+
version_requirements: *id013
|
234
220
|
name: fakeweb
|
235
221
|
prerelease: false
|
236
222
|
- !ruby/object:Gem::Dependency
|
237
223
|
type: :development
|
238
|
-
requirement: &
|
224
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
239
225
|
none: false
|
240
226
|
requirements:
|
241
227
|
- - ">="
|
@@ -246,12 +232,12 @@ dependencies:
|
|
246
232
|
- 5
|
247
233
|
- 1
|
248
234
|
version: 0.5.1
|
249
|
-
version_requirements: *
|
235
|
+
version_requirements: *id014
|
250
236
|
name: webrat
|
251
237
|
prerelease: false
|
252
238
|
- !ruby/object:Gem::Dependency
|
253
239
|
type: :development
|
254
|
-
requirement: &
|
240
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
255
241
|
none: false
|
256
242
|
requirements:
|
257
243
|
- - ">="
|
@@ -262,12 +248,12 @@ dependencies:
|
|
262
248
|
- 2
|
263
249
|
- 22
|
264
250
|
version: 2.2.22
|
265
|
-
version_requirements: *
|
251
|
+
version_requirements: *id015
|
266
252
|
name: haml
|
267
253
|
prerelease: false
|
268
254
|
- !ruby/object:Gem::Dependency
|
269
255
|
type: :development
|
270
|
-
requirement: &
|
256
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
271
257
|
none: false
|
272
258
|
requirements:
|
273
259
|
- - ">="
|
@@ -278,12 +264,12 @@ dependencies:
|
|
278
264
|
- 7
|
279
265
|
- 0
|
280
266
|
version: 2.7.0
|
281
|
-
version_requirements: *
|
267
|
+
version_requirements: *id016
|
282
268
|
name: erubis
|
283
269
|
prerelease: false
|
284
270
|
- !ruby/object:Gem::Dependency
|
285
271
|
type: :development
|
286
|
-
requirement: &
|
272
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
287
273
|
none: false
|
288
274
|
requirements:
|
289
275
|
- - ">="
|
@@ -294,12 +280,12 @@ dependencies:
|
|
294
280
|
- 9
|
295
281
|
- 2
|
296
282
|
version: 0.9.2
|
297
|
-
version_requirements: *
|
283
|
+
version_requirements: *id017
|
298
284
|
name: slim
|
299
285
|
prerelease: false
|
300
286
|
- !ruby/object:Gem::Dependency
|
301
287
|
type: :development
|
302
|
-
requirement: &
|
288
|
+
requirement: &id018 !ruby/object:Gem::Requirement
|
303
289
|
none: false
|
304
290
|
requirements:
|
305
291
|
- - ">="
|
@@ -310,12 +296,12 @@ dependencies:
|
|
310
296
|
- 3
|
311
297
|
- 1
|
312
298
|
version: 2.3.1
|
313
|
-
version_requirements: *
|
299
|
+
version_requirements: *id018
|
314
300
|
name: uuid
|
315
301
|
prerelease: false
|
316
302
|
- !ruby/object:Gem::Dependency
|
317
303
|
type: :development
|
318
|
-
requirement: &
|
304
|
+
requirement: &id019 !ruby/object:Gem::Requirement
|
319
305
|
none: false
|
320
306
|
requirements:
|
321
307
|
- - ">="
|
@@ -326,12 +312,12 @@ dependencies:
|
|
326
312
|
- 1
|
327
313
|
- 2
|
328
314
|
version: 2.1.2
|
329
|
-
version_requirements: *
|
315
|
+
version_requirements: *id019
|
330
316
|
name: builder
|
331
317
|
prerelease: false
|
332
318
|
- !ruby/object:Gem::Dependency
|
333
319
|
type: :development
|
334
|
-
requirement: &
|
320
|
+
requirement: &id020 !ruby/object:Gem::Requirement
|
335
321
|
none: false
|
336
322
|
requirements:
|
337
323
|
- - ">="
|
@@ -340,12 +326,12 @@ dependencies:
|
|
340
326
|
segments:
|
341
327
|
- 0
|
342
328
|
version: "0"
|
343
|
-
version_requirements: *
|
329
|
+
version_requirements: *id020
|
344
330
|
name: bcrypt-ruby
|
345
331
|
prerelease: false
|
346
332
|
- !ruby/object:Gem::Dependency
|
347
333
|
type: :development
|
348
|
-
requirement: &
|
334
|
+
requirement: &id021 !ruby/object:Gem::Requirement
|
349
335
|
none: false
|
350
336
|
requirements:
|
351
337
|
- - ">="
|
@@ -355,12 +341,12 @@ dependencies:
|
|
355
341
|
- 1
|
356
342
|
- 0
|
357
343
|
version: "1.0"
|
358
|
-
version_requirements: *
|
344
|
+
version_requirements: *id021
|
359
345
|
name: system_timer
|
360
346
|
prerelease: false
|
361
347
|
- !ruby/object:Gem::Dependency
|
362
348
|
type: :development
|
363
|
-
requirement: &
|
349
|
+
requirement: &id022 !ruby/object:Gem::Requirement
|
364
350
|
none: false
|
365
351
|
requirements:
|
366
352
|
- - ">="
|
@@ -369,12 +355,12 @@ dependencies:
|
|
369
355
|
segments:
|
370
356
|
- 0
|
371
357
|
version: "0"
|
372
|
-
version_requirements: *
|
358
|
+
version_requirements: *id022
|
373
359
|
name: jruby-openssl
|
374
360
|
prerelease: false
|
375
361
|
- !ruby/object:Gem::Dependency
|
376
362
|
type: :development
|
377
|
-
requirement: &
|
363
|
+
requirement: &id023 !ruby/object:Gem::Requirement
|
378
364
|
none: false
|
379
365
|
requirements:
|
380
366
|
- - ~>
|
@@ -385,28 +371,12 @@ dependencies:
|
|
385
371
|
- 10
|
386
372
|
- 0
|
387
373
|
version: 0.10.0
|
388
|
-
version_requirements: *
|
374
|
+
version_requirements: *id023
|
389
375
|
name: mocha
|
390
376
|
prerelease: false
|
391
377
|
- !ruby/object:Gem::Dependency
|
392
378
|
type: :development
|
393
|
-
requirement: &
|
394
|
-
none: false
|
395
|
-
requirements:
|
396
|
-
- - ~>
|
397
|
-
- !ruby/object:Gem::Version
|
398
|
-
hash: 23
|
399
|
-
segments:
|
400
|
-
- 2
|
401
|
-
- 6
|
402
|
-
- 0
|
403
|
-
version: 2.6.0
|
404
|
-
version_requirements: *id025
|
405
|
-
name: minitest
|
406
|
-
prerelease: false
|
407
|
-
- !ruby/object:Gem::Dependency
|
408
|
-
type: :development
|
409
|
-
requirement: &id026 !ruby/object:Gem::Requirement
|
379
|
+
requirement: &id024 !ruby/object:Gem::Requirement
|
410
380
|
none: false
|
411
381
|
requirements:
|
412
382
|
- - ">="
|
@@ -415,23 +385,9 @@ dependencies:
|
|
415
385
|
segments:
|
416
386
|
- 0
|
417
387
|
version: "0"
|
418
|
-
version_requirements: *
|
388
|
+
version_requirements: *id024
|
419
389
|
name: lumberjack
|
420
390
|
prerelease: false
|
421
|
-
- !ruby/object:Gem::Dependency
|
422
|
-
type: :development
|
423
|
-
requirement: &id027 !ruby/object:Gem::Requirement
|
424
|
-
none: false
|
425
|
-
requirements:
|
426
|
-
- - ">="
|
427
|
-
- !ruby/object:Gem::Version
|
428
|
-
hash: 3
|
429
|
-
segments:
|
430
|
-
- 0
|
431
|
-
version: "0"
|
432
|
-
version_requirements: *id027
|
433
|
-
name: ruby-debug
|
434
|
-
prerelease: false
|
435
391
|
description: Lazy Head Gen is simply a couple of extra generators for the excellent Padrino framework.
|
436
392
|
email: stuart.chinery@headlondon.com
|
437
393
|
executables: []
|