lurker 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/.gitignore +1 -0
  5. data/Gemfile +1 -0
  6. data/README.md +35 -16
  7. data/Rakefile +71 -21
  8. data/features/README.md +1 -1
  9. data/features/{controller_specs/nested_schema_scaffolding.feature → controller_nested_schema_scaffolding.feature} +7 -3
  10. data/features/{controller_specs/schema_scaffolding.feature → controller_schema_scaffolding.feature} +13 -3
  11. data/features/{docs_generation/html_generation.feature → html_generation.feature} +3 -7
  12. data/features/{docs_generation/multidomain_support.feature → multidomain_support.feature} +1 -3
  13. data/features/{docs_generation/partials.feature → partials.feature} +0 -0
  14. data/features/{request_specs/nested_schema_scaffolding.feature → request_nested_schema_scaffolding.feature} +9 -3
  15. data/features/{request_specs/schema_scaffolding.feature → request_schema_scaffolding.feature} +11 -3
  16. data/features/{request_specs/schema_suffixes.feature → schema_suffixes.feature} +8 -27
  17. data/features/{controller_specs/test_endpoint.feature → test_endpoint.feature} +9 -17
  18. data/lib/lurker/cli.rb +20 -1
  19. data/lib/lurker/endpoint_scaffold.rb +4 -2
  20. data/lib/lurker/templates/javascripts/application.js +3 -1
  21. data/lib/lurker/templates/layouts/application.html.erb +15 -1
  22. data/lib/lurker/templates/public/application.css +2 -7440
  23. data/lib/lurker/templates/public/application.js +13 -44751
  24. data/lib/lurker/templates/stylesheets/application.css +3 -0
  25. data/lib/lurker/version.rb +1 -1
  26. data/lurker.gemspec +5 -4
  27. data/templates/generate_stuff.rb +23 -4
  28. data/templates/lurker_app.rb +3 -2
  29. metadata +34 -26
  30. metadata.gz.asc +7 -7
  31. data/features/controller_specs/readme.md +0 -4
  32. data/features/docs_generation/readme.md +0 -2
  33. data/features/request_specs/readme.md +0 -4
@@ -30,6 +30,9 @@
30
30
  .post-params.bs-example:after {
31
31
  content: 'Payload';
32
32
  }
33
+ .table-condensed td, .table-condensed th {
34
+ padding: 0;
35
+ }
33
36
  /* pdf */
34
37
  pre {
35
38
  page-break-inside: avoid;
@@ -1,3 +1,3 @@
1
1
  module Lurker
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.6"
3
3
  end
data/lurker.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'lurker/version'
4
+ require "lurker/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "lurker"
@@ -32,7 +32,8 @@ Gem::Specification.new do |spec|
32
32
  # testing
33
33
  spec.add_development_dependency("psych", "~> 2.0")
34
34
  spec.add_development_dependency("bundler", "~> 1.3")
35
- spec.add_development_dependency("rails", '>= 3.2', '< 4.2')
35
+ spec.add_development_dependency("rack-cors", "~> 0.2")
36
+ spec.add_development_dependency("rails", ">= 3.2", "< 4.2")
36
37
  spec.add_development_dependency("rake", "~> 10.2")
37
38
  spec.add_development_dependency("rspec", "~> 2.14")
38
39
  spec.add_development_dependency("cucumber", "~> 1.3")
@@ -46,7 +47,7 @@ Gem::Specification.new do |spec|
46
47
  spec.add_development_dependency("coveralls", "~> 0.7")
47
48
 
48
49
  # FIXME: these gems are needed while cucumber runs
49
- # inner Gemfile isn't getting used, but lib's one
50
+ # inner Gemfile isn"t getting used, but lib"s one
50
51
  spec.add_development_dependency("rspec-rails", "~> 2.14")
51
52
  spec.add_development_dependency("pg", "~> 0.16")
52
53
  end
@@ -38,6 +38,7 @@ inject_into_file "bin/lurker", before: /require .lurker.$/ do
38
38
  end
39
39
  chmod "bin/lurker", 0755
40
40
 
41
+ # not to disturb generators
41
42
  remove_file 'spec/spec_helper.rb'
42
43
  remove_file 'app/models/user.rb'
43
44
 
@@ -54,9 +55,17 @@ route <<-ROUTE
54
55
  end
55
56
  end
56
57
 
58
+ get '/robots.txt', to: proc { |env| [
59
+ 200,
60
+ { "Content-Type" => 'text/plain' },
61
+ [ "User-agent: *\\nDisallow: /" ]
62
+ ]}
63
+
57
64
  root to: redirect('/lurker')
58
65
  ROUTE
59
66
 
67
+ remove_file 'public/robots.txt'
68
+
60
69
  generate 'model User name:string --no-timestamps --no-test-framework --no-migration'
61
70
  generate 'model Repo user:references name:string --no-timestamps --no-test-framework --no-migration'
62
71
 
@@ -250,10 +259,20 @@ inject_into_class 'config/application.rb', 'Application' do
250
259
  if ENV['DATABASE_URL'].present? # heroku
251
260
  config.middleware.use Lurker::Sandbox
252
261
  end
253
- config.action_dispatch.default_headers = {
254
- 'Access-Control-Allow-Origin' => '*',
255
- 'Access-Control-Request-Method' => 'GET, PUT, POST, DELETE, OPTIONS'
256
- }
262
+
263
+ require 'rack/cors' # FIXME
264
+ config.middleware.insert 0, Rack::Cors do
265
+ allow do
266
+ origins 'localhost:3000', '127.0.0.1:3000', 'razum2um.github.io', 'lurker-app.herokuapp.com', 'lurker.razum2um.me'
267
+ resource '*',
268
+ :headers => :any,
269
+ :methods => :any,
270
+ :credentials => false,
271
+ :expose => %w[Etag Server X-Content-Type-Options X-Frame-Options X-Request-Id X-Runtime
272
+ X-Xss-Protection Date Access-Control-Request-Method Access-Control-Allow-Origin
273
+ Connection Content-Length].join(',')
274
+ end
275
+ end
257
276
  CODE
258
277
  end
259
278
 
@@ -1,9 +1,10 @@
1
+ gem 'rack-cors', require: 'rack/cors'
1
2
  gem 'rspec-rails'
2
3
  gem 'spring-commands-rspec'
3
4
  gem 'database_cleaner'
4
5
  gem 'simplecov', '~> 0.7.1', require: false
5
- gem 'pry-debugger', require: false
6
- gem 'pry-stack_explorer', require: false
6
+ gem 'pry-debugger', group: :development
7
+ gem 'pry-stack_explorer', group: :development
7
8
  gem 'unicorn', group: :production
8
9
  gem 'therubyracer', group: :production
9
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lurker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
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-05-08 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '1.3'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rack-cors
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '0.2'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '0.2'
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: rails
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -372,20 +386,17 @@ files:
372
386
  - bin/lurker
373
387
  - cucumber.yml
374
388
  - features/README.md
375
- - features/controller_specs/nested_schema_scaffolding.feature
376
- - features/controller_specs/readme.md
377
- - features/controller_specs/schema_scaffolding.feature
378
- - features/controller_specs/test_endpoint.feature
379
- - features/docs_generation/html_generation.feature
380
- - features/docs_generation/multidomain_support.feature
381
- - features/docs_generation/partials.feature
382
- - features/docs_generation/readme.md
383
- - features/request_specs/nested_schema_scaffolding.feature
384
- - features/request_specs/readme.md
385
- - features/request_specs/schema_scaffolding.feature
386
- - features/request_specs/schema_suffixes.feature
389
+ - features/controller_nested_schema_scaffolding.feature
390
+ - features/controller_schema_scaffolding.feature
391
+ - features/html_generation.feature
392
+ - features/multidomain_support.feature
393
+ - features/partials.feature
394
+ - features/request_nested_schema_scaffolding.feature
395
+ - features/request_schema_scaffolding.feature
396
+ - features/schema_suffixes.feature
387
397
  - features/step_definitions/additional_cli_steps.rb
388
398
  - features/support/env.rb
399
+ - features/test_endpoint.feature
389
400
  - gemfiles/Gemfile32.ci
390
401
  - gemfiles/Gemfile40.ci
391
402
  - gemfiles/Gemfile41.ci
@@ -493,20 +504,17 @@ specification_version: 4
493
504
  summary: Lukrs into your API rquest to tell you the truth.
494
505
  test_files:
495
506
  - features/README.md
496
- - features/controller_specs/nested_schema_scaffolding.feature
497
- - features/controller_specs/readme.md
498
- - features/controller_specs/schema_scaffolding.feature
499
- - features/controller_specs/test_endpoint.feature
500
- - features/docs_generation/html_generation.feature
501
- - features/docs_generation/multidomain_support.feature
502
- - features/docs_generation/partials.feature
503
- - features/docs_generation/readme.md
504
- - features/request_specs/nested_schema_scaffolding.feature
505
- - features/request_specs/readme.md
506
- - features/request_specs/schema_scaffolding.feature
507
- - features/request_specs/schema_suffixes.feature
507
+ - features/controller_nested_schema_scaffolding.feature
508
+ - features/controller_schema_scaffolding.feature
509
+ - features/html_generation.feature
510
+ - features/multidomain_support.feature
511
+ - features/partials.feature
512
+ - features/request_nested_schema_scaffolding.feature
513
+ - features/request_schema_scaffolding.feature
514
+ - features/schema_suffixes.feature
508
515
  - features/step_definitions/additional_cli_steps.rb
509
516
  - features/support/env.rb
517
+ - features/test_endpoint.feature
510
518
  - spec/lurker/endpoint_spec.rb
511
519
  - spec/lurker/yaml_spec.rb
512
520
  - spec/spec_helper.rb
metadata.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG v1
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABCgAGBQJTa7AEAAoJENcoxKfNVdjbXmgIAI1OcijaxiTCTY6wen2VXoTV
6
- ZWSGkswRhcl1zWEUdnnQa0nrgRwDzyIlbywwGOn2eOXpNJWWnh9g9qzOehTDbRb7
7
- 8yrFDcyky39LisiGWMvkffcSRLQ0fsW4Y3NRLGBa1A05AcSu726HwDaJXp9+IR3g
8
- MHFzjk3yyl9x2wOBhkda21j6yRO0DMc4CzJR5QMKcgDHjMtt13gRlwnp7wxQmuuT
9
- GIrGm/Wvs6BVaugTDrXfW65ppg+GHoqW2ezo1CxylAoOYfJlCOIexJRoiw2+IgpL
10
- dePVOa7fA1u5QkAupkiZR2ggVmWpscMJ89bbwGlf61U2D//8lvWLk0OJCGNlPQ8=
11
- =mPHA
5
+ iQEcBAABCgAGBQJTccHSAAoJENcoxKfNVdjbi5EIALmXJQep/uEQJRyXv+ALjEk8
6
+ kkMWaIplQ4eTug39IbYdfRGjf5PstX7kAC3qXCg127FJ2qoLUqajfoN3rFfP/nsC
7
+ CNQqiTED5jew812Dcg7A7EYghiiwg0wU1zQirI22uBur2em9fCwdz4lIYguWGYFW
8
+ 07EeFA80NiW+fKAG9dILZzZCCNzUFrutNoMiDiLuPXc47bAX8uK4+6M+L6R/r4vx
9
+ qgFY3Pt0BII2rcXo0RG+iVfN10qaGXw1qpkv7x0xdSGAnL+Ly7WjFeri05UdyJl2
10
+ cOSfW3LojNurm/yrB4w6kA9mB8Z0FM0tRU6wN1Jaab1SAR4UsfcizOgw0CNbukI=
11
+ =ax3i
12
12
  -----END PGP SIGNATURE-----
@@ -1,4 +0,0 @@
1
- When you prefer to test controller not in a unit-test fashion,
2
- but including `render_views` - you can add `:lurker` metadata
3
- to get a json schema for your api-documented endpoint
4
-
@@ -1,2 +0,0 @@
1
- Lurker generates pretty info pages based on schema information
2
- and form which allow you to test live api
@@ -1,4 +0,0 @@
1
- When you're testing your api with request specs
2
- you can add `:lurker` metadata
3
- to get a json schema for your api-documented endpoint
4
-