lurker 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/.travis.yml +7 -0
  5. data/Gemfile +26 -2
  6. data/Gemfile.ci +4 -0
  7. data/README.md +44 -23
  8. data/Rakefile +85 -19
  9. data/features/docs_generation/html_generation.feature +7 -2
  10. data/features/docs_generation/multidomain_support.feature +12 -10
  11. data/features/docs_generation/partials.feature +98 -0
  12. data/features/step_definitions/additional_cli_steps.rb +14 -1
  13. data/features/support/env.rb +1 -0
  14. data/lib/lurker/cli.rb +16 -2
  15. data/lib/lurker/endpoint.rb +4 -0
  16. data/lib/lurker/form_builder.rb +1 -1
  17. data/lib/lurker/presenters/endpoint_presenter.rb +17 -16
  18. data/lib/lurker/presenters/schema_presenter.rb +10 -13
  19. data/lib/lurker/presenters/service_presenter.rb +11 -1
  20. data/lib/lurker/sandbox.rb +7 -2
  21. data/lib/lurker/service.rb +2 -2
  22. data/lib/lurker/templates/bootstrap.css.map +1 -0
  23. data/lib/lurker/templates/javascripts/JSXTransformer.js +12569 -0
  24. data/lib/lurker/templates/javascripts/application.js +7 -0
  25. data/lib/lurker/templates/javascripts/lurker.js +16 -45
  26. data/lib/lurker/templates/javascripts/phantomjs-shims.js +35 -0
  27. data/lib/lurker/templates/javascripts/react-catalyst.js +70 -0
  28. data/lib/lurker/templates/javascripts/react-with-addons.js +18884 -0
  29. data/lib/lurker/templates/layouts/application.html.erb +1 -1
  30. data/lib/lurker/templates/lurker/rendering/_param_form_element.html.erb +4 -4
  31. data/lib/lurker/templates/lurker/rendering/_param_form_legend.html.erb +1 -1
  32. data/lib/lurker/templates/lurker/rendering/_submit_form.html.erb +140 -0
  33. data/lib/lurker/templates/lurker/rendering/index.html.erb +5 -1
  34. data/lib/lurker/templates/lurker/rendering/show.html.erb +1 -40
  35. data/lib/lurker/templates/public/application.css +5 -0
  36. data/lib/lurker/templates/public/application.js +31828 -233
  37. data/lib/lurker/templates/stylesheets/application.css +5 -0
  38. data/lib/lurker/version.rb +1 -1
  39. data/lurker.gemspec +18 -18
  40. data/templates/generate_stuff.rb +6 -4
  41. data/templates/lurker_app.rb +1 -1
  42. metadata +79 -71
  43. metadata.gz.asc +7 -7
  44. data/Gemfile.local +0 -28
@@ -20,3 +20,8 @@
20
20
  .navbar-right {
21
21
  padding: 8px;
22
22
  }
23
+ .panel .list-group .list-group-item {
24
+ border-width: 0;
25
+ padding: 0;
26
+ margin-bottom: 10px;
27
+ }
@@ -1,3 +1,3 @@
1
1
  module Lurker
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
data/lurker.gemspec CHANGED
@@ -18,29 +18,29 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency("json")
21
+ spec.add_dependency("json", "~> 1.7")
22
22
  spec.add_dependency("json-schema", "~> 2.2")
23
- spec.add_dependency("kramdown")
24
- spec.add_dependency("thor")
25
- spec.add_dependency("diffy")
26
- spec.add_dependency("sinatra")
23
+ spec.add_dependency("kramdown", "~> 1.3")
24
+ spec.add_dependency("thor", "~> 0.19")
25
+ spec.add_dependency("diffy", "~> 3.0")
26
+ spec.add_dependency("sinatra", "~> 1.4")
27
27
 
28
28
  # testing
29
- spec.add_development_dependency("bundler")
30
- spec.add_development_dependency("rails", "~> 4.1.0.rc2")
31
- spec.add_development_dependency("rake")
32
- spec.add_development_dependency("rspec")
33
- spec.add_development_dependency("cucumber")
34
- spec.add_development_dependency("aruba")
35
- spec.add_development_dependency("capybara")
36
- spec.add_development_dependency("poltergeist")
37
- spec.add_development_dependency("database_cleaner")
29
+ spec.add_development_dependency("bundler", "~> 1.3")
30
+ spec.add_development_dependency("rails", "~> 4.1")
31
+ spec.add_development_dependency("rake", "~> 10.2")
32
+ spec.add_development_dependency("rspec", "~> 2.14")
33
+ spec.add_development_dependency("cucumber", "~> 1.3")
34
+ spec.add_development_dependency("aruba", "~> 0.5")
35
+ spec.add_development_dependency("capybara", "~> 2.2")
36
+ spec.add_development_dependency("poltergeist", "~> 1.5")
37
+ spec.add_development_dependency("database_cleaner", "~> 1.2")
38
38
 
39
- spec.add_development_dependency('simplecov', '~> 0.7.1')
40
- spec.add_development_dependency('coveralls')
39
+ spec.add_development_dependency("simplecov", "~> 0.7")
40
+ spec.add_development_dependency("coveralls", "~> 0.7")
41
41
 
42
42
  # FIXME: these gems are needed while cucumber runs
43
43
  # inner Gemfile isn't getting used, but lib's one
44
- spec.add_development_dependency("rspec-rails")
45
- spec.add_development_dependency("pg")
44
+ spec.add_development_dependency("rspec-rails", "~> 2.14")
45
+ spec.add_development_dependency("pg", "~> 0.16")
46
46
  end
@@ -50,7 +50,7 @@ file 'app/controllers/api/v1/users_controller.rb', 'Api::V1::UsersController', f
50
50
  if (limit = params[:limit]).to_s.match(/\\d+/)
51
51
  @users = @users.limit(limit.to_i)
52
52
  end
53
- render json: @users
53
+ render json: @users.order('id ASC')
54
54
  end
55
55
 
56
56
  def create
@@ -106,13 +106,13 @@ file 'app/controllers/api/v1/repos_controller.rb', 'Api::V1::ReposController', f
106
106
  if (limit = params[:limit]).to_s.match(/\\d+/)
107
107
  @repos = @repos.limit(limit.to_i)
108
108
  end
109
- render json: @repos
109
+ render json: @repos.order('id ASC')
110
110
  end
111
111
 
112
112
  def create
113
113
  @repo = user.repos.build(repo_params)
114
114
  if @repo.save
115
- render json: @repo
115
+ render json: @repo.to_json(include: 'user', except: 'user_id')
116
116
  else
117
117
  render json: { errors: @repo.errors }, status: 401
118
118
  end
@@ -164,7 +164,9 @@ end
164
164
 
165
165
  inject_into_class 'config/application.rb', 'Application' do
166
166
  <<-CODE
167
- config.middleware.use Lurker::Sandbox
167
+ if ENV['DATABASE_URL'].present? # heroku
168
+ config.middleware.use Lurker::Sandbox
169
+ end
168
170
  config.action_dispatch.default_headers = {
169
171
  'Access-Control-Allow-Origin' => '*',
170
172
  'Access-Control-Request-Method' => 'GET, PUT, POST, DELETE, OPTIONS'
@@ -16,7 +16,7 @@ append_to_file 'Gemfile' do
16
16
 
17
17
  if File.exists?(File.expand_path('../../../lurker.rb', __FILE__))
18
18
  # run within specs
19
- gem 'lurker', path: "#{File.expand_path('../../..', __FILE__)}"
19
+ gem 'lurker', '~> 0', path: "#{File.expand_path('../../..', __FILE__)}"
20
20
  else
21
21
  # run at heroku
22
22
  gem 'lurker', github: 'razum2um/lurker', branch: 'master'
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lurker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vlad Bokov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-24 00:00:00.000000000 Z
11
+ date: 2014-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json-schema
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,240 +42,240 @@ dependencies:
42
42
  name: kramdown
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '1.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: thor
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '0.19'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '0.19'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: diffy
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '3.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sinatra
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '1.4'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '1.4'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bundler
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '1.3'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '1.3'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rails
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 4.1.0.rc2
117
+ version: '4.1'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 4.1.0.rc2
124
+ version: '4.1'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: '10.2'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: '10.2'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: '2.14'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: '2.14'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: cucumber
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
159
+ version: '1.3'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: '1.3'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: aruba
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: '0.5'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0'
180
+ version: '0.5'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: capybara
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0'
187
+ version: '2.2'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0'
194
+ version: '2.2'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: poltergeist
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ">="
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '0'
201
+ version: '1.5'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ">="
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '0'
208
+ version: '1.5'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: database_cleaner
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ">="
213
+ - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '0'
215
+ version: '1.2'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ">="
220
+ - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '0'
222
+ version: '1.2'
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: simplecov
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: 0.7.1
229
+ version: '0.7'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: 0.7.1
236
+ version: '0.7'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: coveralls
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - ">="
241
+ - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: '0'
243
+ version: '0.7'
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - ">="
248
+ - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: '0'
250
+ version: '0.7'
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: rspec-rails
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - ">="
255
+ - - "~>"
256
256
  - !ruby/object:Gem::Version
257
- version: '0'
257
+ version: '2.14'
258
258
  type: :development
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - ">="
262
+ - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: '0'
264
+ version: '2.14'
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: pg
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
- - - ">="
269
+ - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: '0'
271
+ version: '0.16'
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
- - - ">="
276
+ - - "~>"
277
277
  - !ruby/object:Gem::Version
278
- version: '0'
278
+ version: '0.16'
279
279
  description: It hooks in rspec controller methods to check theirs schema and let people
280
280
  try it
281
281
  email:
@@ -290,7 +290,7 @@ files:
290
290
  - ".rspec"
291
291
  - ".travis.yml"
292
292
  - Gemfile
293
- - Gemfile.local
293
+ - Gemfile.ci
294
294
  - LICENSE.txt
295
295
  - README.md
296
296
  - Rakefile
@@ -303,6 +303,7 @@ files:
303
303
  - features/controller_specs/test_endpoint.feature
304
304
  - features/docs_generation/html_generation.feature
305
305
  - features/docs_generation/multidomain_support.feature
306
+ - features/docs_generation/partials.feature
306
307
  - features/docs_generation/readme.md
307
308
  - features/request_specs/nested_schema_scaffolding.feature
308
309
  - features/request_specs/readme.md
@@ -337,6 +338,7 @@ files:
337
338
  - lib/lurker/service.rb
338
339
  - lib/lurker/spec_watcher.rb
339
340
  - lib/lurker/tasks/capistrano.rake
341
+ - lib/lurker/templates/bootstrap.css.map
340
342
  - lib/lurker/templates/endpoint.html.erb
341
343
  - lib/lurker/templates/endpoint.md.erb
342
344
  - lib/lurker/templates/fonts/FontAwesome.otf
@@ -348,11 +350,13 @@ files:
348
350
  - lib/lurker/templates/fonts/glyphicons-halflings-regular.svg
349
351
  - lib/lurker/templates/fonts/glyphicons-halflings-regular.ttf
350
352
  - lib/lurker/templates/fonts/glyphicons-halflings-regular.woff
353
+ - lib/lurker/templates/javascripts/JSXTransformer.js
351
354
  - lib/lurker/templates/javascripts/application.js
352
355
  - lib/lurker/templates/javascripts/demo/dashboard-demo.js
353
356
  - lib/lurker/templates/javascripts/demo/flot-demo.js
354
357
  - lib/lurker/templates/javascripts/demo/morris-demo.js
355
358
  - lib/lurker/templates/javascripts/lurker.js
359
+ - lib/lurker/templates/javascripts/phantomjs-shims.js
356
360
  - lib/lurker/templates/javascripts/plugins/dataTables/dataTables.bootstrap.js
357
361
  - lib/lurker/templates/javascripts/plugins/dataTables/jquery.dataTables.js
358
362
  - lib/lurker/templates/javascripts/plugins/flot/excanvas.min.js
@@ -364,6 +368,8 @@ files:
364
368
  - lib/lurker/templates/javascripts/plugins/morris/morris.js
365
369
  - lib/lurker/templates/javascripts/plugins/morris/raphael-2.1.0.min.js
366
370
  - lib/lurker/templates/javascripts/prettify.js
371
+ - lib/lurker/templates/javascripts/react-catalyst.js
372
+ - lib/lurker/templates/javascripts/react-with-addons.js
367
373
  - lib/lurker/templates/javascripts/sb-admin.js
368
374
  - lib/lurker/templates/layouts/_navbar_right.html.erb
369
375
  - lib/lurker/templates/layouts/_sidemenu.html.erb
@@ -376,6 +382,7 @@ files:
376
382
  - lib/lurker/templates/lurker/rendering/_param_form_element.html.erb
377
383
  - lib/lurker/templates/lurker/rendering/_param_form_legend.html.erb
378
384
  - lib/lurker/templates/lurker/rendering/_route_definitions.html.erb
385
+ - lib/lurker/templates/lurker/rendering/_submit_form.html.erb
379
386
  - lib/lurker/templates/lurker/rendering/_undefined_route.html.erb
380
387
  - lib/lurker/templates/lurker/rendering/index.html.erb
381
388
  - lib/lurker/templates/lurker/rendering/show.html.erb
@@ -448,6 +455,7 @@ test_files:
448
455
  - features/controller_specs/test_endpoint.feature
449
456
  - features/docs_generation/html_generation.feature
450
457
  - features/docs_generation/multidomain_support.feature
458
+ - features/docs_generation/partials.feature
451
459
  - features/docs_generation/readme.md
452
460
  - features/request_specs/nested_schema_scaffolding.feature
453
461
  - features/request_specs/readme.md