lurker 0.6.1 → 0.6.2
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.hound.yml +62 -0
- data/.rubocop.yml +62 -0
- data/Gemfile +1 -1
- data/Rakefile +2 -268
- data/features/atom_persistent_within_the_same_type.feature +0 -2
- data/features/controller_nested_schema_scaffolding.feature +0 -1
- data/features/controller_schema_scaffolding.feature +0 -1
- data/features/html_generation.feature +0 -1
- data/features/minitest.feature +0 -2
- data/features/multidomain_support.feature +0 -1
- data/features/multitype_request_support.feature +0 -2
- data/features/partials.feature +0 -1
- data/features/request_nested_schema_scaffolding.feature +0 -1
- data/features/request_schema_scaffolding.feature +0 -1
- data/features/schema_suffixes.feature +0 -1
- data/features/schema_updating_within_test_suite.feature +37 -2
- data/features/test_endpoint.feature +0 -1
- data/lib/lurker.rb +5 -1
- data/lib/lurker/endpoint.rb +121 -176
- data/lib/lurker/endpoint/http_parameters.rb +77 -0
- data/lib/lurker/endpoint/response_codes.rb +42 -0
- data/lib/lurker/erb_schema_context.rb +8 -6
- data/lib/lurker/jaml_descriptor.rb +8 -1
- data/lib/lurker/json_schema_hash.rb +48 -0
- data/lib/lurker/presenters/base_presenter.rb +1 -2
- data/lib/lurker/presenters/endpoint_presenter.rb +17 -10
- data/lib/lurker/presenters/json_presenter.rb +6 -6
- data/lib/lurker/presenters/schema_presenter.rb +15 -14
- data/lib/lurker/presenters/service_presenter.rb +5 -6
- data/lib/lurker/rendering_controller.rb +0 -1
- data/lib/lurker/request.rb +3 -1
- data/lib/lurker/sandbox.rb +0 -1
- data/lib/lurker/schema_modifier.rb +4 -2
- data/lib/lurker/schema_modifier/atom.rb +14 -5
- data/lib/lurker/server.rb +4 -5
- data/lib/lurker/service.rb +3 -4
- data/lib/lurker/spec_helper/rspec.rb +15 -57
- data/lib/lurker/spy.rb +9 -5
- data/lib/lurker/templates/layouts/_sidemenu.html.erb +1 -1
- data/lib/lurker/templates/lurker/rendering/show.html.erb +5 -1
- data/lib/lurker/templates/public/application.css +2 -2
- data/lib/lurker/templates/stylesheets/docs.css +0 -1
- data/lib/lurker/utils.rb +18 -0
- data/lib/lurker/validator.rb +3 -6
- data/lib/lurker/version.rb +1 -1
- data/tasks/build.rake +57 -0
- data/tasks/deploy.rake +139 -0
- data/tasks/generate.rake +78 -0
- data/templates/generate_stuff.rb +4 -4
- data/templates/lurker_app.rb +1 -1
- metadata +9 -2
- metadata.gz.sig +0 -0
data/tasks/generate.rake
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
EXAMPLE_APP = 'tmp/lurker_app'
|
2
|
+
EXAMPLE_PATH = File.expand_path("../../#{EXAMPLE_APP}", __FILE__)
|
3
|
+
|
4
|
+
namespace :clobber do
|
5
|
+
desc "clobber coverage"
|
6
|
+
task :coverage do
|
7
|
+
rm_rf File.expand_path('../coverage', __FILE__)
|
8
|
+
end
|
9
|
+
|
10
|
+
desc "clobber the generated app"
|
11
|
+
task :app do
|
12
|
+
FileUtils.mkdir_p EXAMPLE_PATH
|
13
|
+
in_lurker_app "bin/spring stop" rescue nil
|
14
|
+
Dir.chdir EXAMPLE_PATH do
|
15
|
+
Dir.glob("*", File::FNM_DOTMATCH).each do |fname|
|
16
|
+
next if fname == '.' || fname == '..' || fname == '.git' || fname == '.bundle'
|
17
|
+
FileUtils.rm_rf fname
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
namespace :generate do
|
24
|
+
desc "generate a fresh app with rspec installed"
|
25
|
+
task :app do |t|
|
26
|
+
if needs_generation?
|
27
|
+
sh "bundle exec rails new #{EXAMPLE_APP} -d postgresql -m #{File.expand_path '../../templates/lurker_app.rb', __FILE__} --skip-javascript --skip-git --skip-test-unit --skip-keeps --skip-bundle --quiet"
|
28
|
+
in_lurker_app "bundle config --local local.lurker $PWD/../.." unless ENV['TRAVIS']
|
29
|
+
in_lurker_app "bundle install"
|
30
|
+
%w[rake rspec-core spring].each do |gem|
|
31
|
+
in_lurker_app "bundle binstubs #{gem}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
desc "generate a bunch of stuff with generators"
|
37
|
+
task :stuff do
|
38
|
+
in_lurker_app "LOCATION='../../templates/generate_stuff.rb' bin/rake rails:template --quiet --silent"
|
39
|
+
|
40
|
+
unless ENV['TRAVIS']
|
41
|
+
in_lurker_app 'bin/rake db:setup'
|
42
|
+
in_lurker_app 'bin/rake db:import'
|
43
|
+
end
|
44
|
+
in_lurker_app 'bin/rake RAILS_ENV=test db:setup'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def in_lurker_app(command)
|
49
|
+
FileUtils.mkdir_p(EXAMPLE_PATH)
|
50
|
+
Dir.chdir(EXAMPLE_PATH) do
|
51
|
+
Bundler.with_clean_env do
|
52
|
+
sh command
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def needs_generation?
|
58
|
+
!File.exists?("#{EXAMPLE_PATH}/Gemfile")
|
59
|
+
end
|
60
|
+
|
61
|
+
desc 'destroys & recreates new test app'
|
62
|
+
task :regenerate => ["clobber:coverage", "clobber:app", "generate:app", "generate:stuff"]
|
63
|
+
|
64
|
+
desc 'run cucumber in a fresh env'
|
65
|
+
task :features => [:regenerate, :cucumber]
|
66
|
+
|
67
|
+
desc 'convert docs for example app, prepages gh-pages'
|
68
|
+
task :build_example_docs => :features do
|
69
|
+
if File.exists?(readme = File.expand_path('../../README.md', __FILE__))
|
70
|
+
in_lurker_app "bin/lurker convert -c #{readme}"
|
71
|
+
else
|
72
|
+
in_lurker_app "bin/lurker convert"
|
73
|
+
end
|
74
|
+
|
75
|
+
in_lurker_app %Q{sed -i "" "s|</header>|</header><a href='https://github.com/razum2um/lurker'><img style='position: absolute; top: 0; right: 0; border: 0; z-index: 1000' src='https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png' alt='Fork me on GitHub'></a>|" html/index.html}
|
76
|
+
in_lurker_app "bin/lurker convert -f pdf -o html"
|
77
|
+
end
|
78
|
+
|
data/templates/generate_stuff.rb
CHANGED
@@ -310,8 +310,8 @@ file 'test/test_helper.rb', force: true do
|
|
310
310
|
class ActionDispatch::IntegrationTest
|
311
311
|
def setup
|
312
312
|
super if defined? super
|
313
|
-
|
314
|
-
ActiveRecord::Base.connection.execute "ALTER SEQUENCE \#{
|
313
|
+
[User, Repo].each do |klass|
|
314
|
+
ActiveRecord::Base.connection.execute "ALTER SEQUENCE \#{klass.sequence_name} RESTART WITH 1"
|
315
315
|
end
|
316
316
|
DatabaseCleaner.start
|
317
317
|
end
|
@@ -354,8 +354,8 @@ file 'spec/support/fixme.rb', force: true do
|
|
354
354
|
]
|
355
355
|
|
356
356
|
c.before do
|
357
|
-
|
358
|
-
ActiveRecord::Base.connection.execute "ALTER SEQUENCE \#{
|
357
|
+
[User, Repo].each do |klass|
|
358
|
+
ActiveRecord::Base.connection.execute "ALTER SEQUENCE \#{klass.sequence_name} RESTART WITH 1"
|
359
359
|
end
|
360
360
|
DatabaseCleaner.start
|
361
361
|
end
|
data/templates/lurker_app.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lurker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vlad Bokov
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
vzKbYclpJ7gENr/xiTjGqA/Md3zJMzmsFrzUXt4RVmo5SaCyZjC6gFfhSr+PODc7
|
31
31
|
ZaSbckvH/+m4boAsg0JkGGFcS3j5fgNmdwgA1A==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2014-
|
33
|
+
date: 2014-07-09 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: json
|
@@ -481,10 +481,13 @@ files:
|
|
481
481
|
- lib/lurker/capistrano.rb
|
482
482
|
- lib/lurker/cli.rb
|
483
483
|
- lib/lurker/endpoint.rb
|
484
|
+
- lib/lurker/endpoint/http_parameters.rb
|
485
|
+
- lib/lurker/endpoint/response_codes.rb
|
484
486
|
- lib/lurker/engine.rb
|
485
487
|
- lib/lurker/erb_schema_context.rb
|
486
488
|
- lib/lurker/form_builder.rb
|
487
489
|
- lib/lurker/jaml_descriptor.rb
|
490
|
+
- lib/lurker/json_schema_hash.rb
|
488
491
|
- lib/lurker/presenters/base_presenter.rb
|
489
492
|
- lib/lurker/presenters/endpoint_presenter.rb
|
490
493
|
- lib/lurker/presenters/json_presenter.rb
|
@@ -551,6 +554,7 @@ files:
|
|
551
554
|
- lib/lurker/templates/stylesheets/bootstrap.css
|
552
555
|
- lib/lurker/templates/stylesheets/docs.css
|
553
556
|
- lib/lurker/templates/stylesheets/github.css
|
557
|
+
- lib/lurker/utils.rb
|
554
558
|
- lib/lurker/validation_error.rb
|
555
559
|
- lib/lurker/validator.rb
|
556
560
|
- lib/lurker/version.rb
|
@@ -558,6 +562,9 @@ files:
|
|
558
562
|
- spec/lurker/endpoint_spec.rb
|
559
563
|
- spec/lurker/yaml_spec.rb
|
560
564
|
- spec/spec_helper.rb
|
565
|
+
- tasks/build.rake
|
566
|
+
- tasks/deploy.rake
|
567
|
+
- tasks/generate.rake
|
561
568
|
- templates/generate_stuff.rb
|
562
569
|
- templates/lurker_app.rb
|
563
570
|
- templates/rails32_http_patch_support.rb
|
metadata.gz.sig
CHANGED
Binary file
|