lurker 0.6.12 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rspec +1 -2
- data/.travis.yml +30 -20
- data/Gemfile +0 -32
- data/README.md +14 -52
- data/Rakefile +3 -3
- data/cucumber.yml +1 -2
- data/features/atom_persistent_within_the_same_type.feature +4 -4
- data/features/controller_nested_schema_scaffolding.feature +7 -10
- data/features/controller_schema_scaffolding.feature +1 -3
- data/features/dereferencing_through_inlining.feature +1 -3
- data/features/html_generation.feature +3 -4
- data/features/minitest.feature +3 -5
- data/features/multidomain_support.feature +5 -6
- data/features/multitype_request_support.feature +1 -3
- data/features/partials.feature +3 -5
- data/features/request_nested_schema_scaffolding.feature +0 -2
- data/features/request_schema_scaffolding.feature +0 -2
- data/features/schema_suffixes.feature +2 -6
- data/features/schema_updating_within_test_suite.feature +2 -6
- data/features/step_definitions/additional_cli_steps.rb +8 -11
- data/features/support/env.rb +50 -10
- data/features/test_endpoint.feature +2 -6
- data/gemfiles/rails_4.gemfile +14 -0
- data/gemfiles/rails_5.gemfile +10 -0
- data/gemfiles/rails_6.gemfile +10 -0
- data/lib/lurker.rb +0 -1
- data/lib/lurker/cli.rb +5 -7
- data/lib/lurker/endpoint.rb +4 -4
- data/lib/lurker/json/concerns/validatable.rb +5 -1
- data/lib/lurker/json/parser.rb +1 -1
- data/lib/lurker/presenters/service_presenter.rb +2 -1
- data/lib/lurker/spec_helper/rspec.rb +0 -4
- data/lib/lurker/spy.rb +3 -1
- data/lib/lurker/templates/public/application.css +3 -3
- data/lib/lurker/templates/public/application.js +13 -2896
- data/lib/lurker/version.rb +1 -1
- data/lurker.gemspec +31 -33
- data/spec/spec_helper.rb +0 -1
- data/tasks/build.rake +5 -3
- data/tasks/generate.rake +25 -15
- data/templates/Dockerfile +26 -0
- data/templates/generate_stuff.rb +59 -26
- data/templates/lurker_app.rb +27 -47
- data/templates/rails4_ruby26_thread_error_fix.rb +20 -0
- metadata +136 -98
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -3
- data/Appraisals +0 -36
- data/gemfiles/rails_32.gemfile +0 -31
- data/gemfiles/rails_40.gemfile +0 -31
- data/gemfiles/rails_41.gemfile +0 -31
- data/gemfiles/rails_42.gemfile +0 -31
- data/lib/lurker/validation_error.rb +0 -4
- data/templates/rails32_http_patch_support.rb +0 -125
- metadata.gz.sig +0 -0
checksums.yaml.gz.sig
DELETED
Binary file
|
data.tar.gz.sig
DELETED
data/Appraisals
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
appraise 'rails-32' do
|
2
|
-
gem 'rails', '~> 3.2.21'
|
3
|
-
gem 'sprockets', '~> 2.2.2.backport2', github: 'razum2um/sprockets-2.2.2.backport', branch: 'master'
|
4
|
-
gem 'sass-rails', github: 'razum2um/sass-rails', branch: 'backport'
|
5
|
-
gem 'autoprefixer-rails', '~> 5.2'
|
6
|
-
gem 'rspec', '~> 2.14'
|
7
|
-
eval ::File.read('Gemfile')
|
8
|
-
end
|
9
|
-
|
10
|
-
appraise 'rails-40' do
|
11
|
-
gem 'rails', '~> 4.0.13'
|
12
|
-
gem 'sprockets'
|
13
|
-
gem 'sass-rails'
|
14
|
-
gem 'autoprefixer-rails', '~> 5.2'
|
15
|
-
gem 'rspec', '~> 2.14'
|
16
|
-
eval ::File.read('Gemfile')
|
17
|
-
end
|
18
|
-
|
19
|
-
appraise 'rails-41' do
|
20
|
-
gem 'rails', '~> 4.1.9'
|
21
|
-
gem 'sprockets'
|
22
|
-
gem 'sass-rails'
|
23
|
-
gem 'autoprefixer-rails', '~> 5.2'
|
24
|
-
gem 'rspec', '~> 2.14'
|
25
|
-
eval ::File.read('Gemfile')
|
26
|
-
end
|
27
|
-
|
28
|
-
appraise 'rails-42' do
|
29
|
-
gem 'rails', '~> 4.2.0'
|
30
|
-
gem 'sprockets'
|
31
|
-
gem 'sass-rails'
|
32
|
-
gem 'autoprefixer-rails', '~> 5.2'
|
33
|
-
gem 'rspec', '~> 2.14'
|
34
|
-
eval ::File.read('Gemfile')
|
35
|
-
end
|
36
|
-
|
data/gemfiles/rails_32.gemfile
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 3.2.21"
|
6
|
-
gem "sprockets", "~> 2.2.2.backport2", :github => "razum2um/sprockets-2.2.2.backport", :branch => "master"
|
7
|
-
gem "sass-rails", :github => "razum2um/sass-rails", :branch => "backport"
|
8
|
-
gem "autoprefixer-rails", "~> 5.2"
|
9
|
-
gem "rspec", "~> 2.14"
|
10
|
-
|
11
|
-
group :development do
|
12
|
-
gem "fuubar"
|
13
|
-
gem "fuubar-cucumber"
|
14
|
-
gem "selenium-webdriver"
|
15
|
-
gem "highline"
|
16
|
-
gem "appraisal"
|
17
|
-
gem "uglifier"
|
18
|
-
gem "coffee-rails"
|
19
|
-
gem "bootstrap-sass", "~> 3.3.3"
|
20
|
-
gem "jquery-rails"
|
21
|
-
gem "remotipart"
|
22
|
-
gem "launchy"
|
23
|
-
|
24
|
-
platforms :mri_20, :mri_21, :mri_22 do
|
25
|
-
gem "pry-byebug"
|
26
|
-
gem "pry-stack_explorer"
|
27
|
-
gem "pry-session"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
gemspec :path => "../"
|
data/gemfiles/rails_40.gemfile
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 4.0.13"
|
6
|
-
gem "sprockets"
|
7
|
-
gem "sass-rails"
|
8
|
-
gem "autoprefixer-rails", "~> 5.2"
|
9
|
-
gem "rspec", "~> 2.14"
|
10
|
-
|
11
|
-
group :development do
|
12
|
-
gem "fuubar"
|
13
|
-
gem "fuubar-cucumber"
|
14
|
-
gem "selenium-webdriver"
|
15
|
-
gem "highline"
|
16
|
-
gem "appraisal"
|
17
|
-
gem "uglifier"
|
18
|
-
gem "coffee-rails"
|
19
|
-
gem "bootstrap-sass", "~> 3.3.3"
|
20
|
-
gem "jquery-rails"
|
21
|
-
gem "remotipart"
|
22
|
-
gem "launchy"
|
23
|
-
|
24
|
-
platforms :mri_20, :mri_21, :mri_22 do
|
25
|
-
gem "pry-byebug"
|
26
|
-
gem "pry-stack_explorer"
|
27
|
-
gem "pry-session"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
gemspec :path => "../"
|
data/gemfiles/rails_41.gemfile
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 4.1.9"
|
6
|
-
gem "sprockets"
|
7
|
-
gem "sass-rails"
|
8
|
-
gem "autoprefixer-rails", "~> 5.2"
|
9
|
-
gem "rspec", "~> 2.14"
|
10
|
-
|
11
|
-
group :development do
|
12
|
-
gem "fuubar"
|
13
|
-
gem "fuubar-cucumber"
|
14
|
-
gem "selenium-webdriver"
|
15
|
-
gem "highline"
|
16
|
-
gem "appraisal"
|
17
|
-
gem "uglifier"
|
18
|
-
gem "coffee-rails"
|
19
|
-
gem "bootstrap-sass", "~> 3.3.3"
|
20
|
-
gem "jquery-rails"
|
21
|
-
gem "remotipart"
|
22
|
-
gem "launchy"
|
23
|
-
|
24
|
-
platforms :mri_20, :mri_21, :mri_22 do
|
25
|
-
gem "pry-byebug"
|
26
|
-
gem "pry-stack_explorer"
|
27
|
-
gem "pry-session"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
gemspec :path => "../"
|
data/gemfiles/rails_42.gemfile
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 4.2.0"
|
6
|
-
gem "sprockets"
|
7
|
-
gem "sass-rails"
|
8
|
-
gem "autoprefixer-rails", "~> 5.2"
|
9
|
-
gem "rspec", "~> 2.14"
|
10
|
-
|
11
|
-
group :development do
|
12
|
-
gem "fuubar"
|
13
|
-
gem "fuubar-cucumber"
|
14
|
-
gem "selenium-webdriver"
|
15
|
-
gem "highline"
|
16
|
-
gem "appraisal"
|
17
|
-
gem "uglifier"
|
18
|
-
gem "coffee-rails"
|
19
|
-
gem "bootstrap-sass", "~> 3.3.3"
|
20
|
-
gem "jquery-rails"
|
21
|
-
gem "remotipart"
|
22
|
-
gem "launchy"
|
23
|
-
|
24
|
-
platforms :mri_20, :mri_21, :mri_22 do
|
25
|
-
gem "pry-byebug"
|
26
|
-
gem "pry-stack_explorer"
|
27
|
-
gem "pry-session"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
gemspec :path => "../"
|
@@ -1,125 +0,0 @@
|
|
1
|
-
# Rails 3.2 support for HTTP PATCH.
|
2
|
-
# https://gist.github.com/bf4/8940203
|
3
|
-
if Rails::VERSION::MAJOR < 4
|
4
|
-
# see http://weblog.rubyonrails.org/2012/2/26/edge-rails-patch-is-the-new-primary-http-method-for-updates/
|
5
|
-
# https://github.com/rails/rails/pull/505
|
6
|
-
|
7
|
-
ActionDispatch::Routing::Mapper::HttpHelpers.module_eval do
|
8
|
-
# Define a route that only recognizes HTTP PATCH.
|
9
|
-
# For supported arguments, see <tt>Base#match</tt>.
|
10
|
-
#
|
11
|
-
# Example:
|
12
|
-
#
|
13
|
-
# patch 'bacon', :to => 'food#bacon'
|
14
|
-
def patch(*args, &block)
|
15
|
-
map_method(:patch, *args, &block)
|
16
|
-
end
|
17
|
-
|
18
|
-
def put(*args, &block)
|
19
|
-
map_method(:put, *args, &block)
|
20
|
-
map_method(:patch, *args, &block)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# Be very conservative not to monkey-patch any methods until
|
25
|
-
# the relevant files are loaded.
|
26
|
-
ActiveSupport.on_load(:action_controller) do
|
27
|
-
ActionDispatch::Request.module_eval do
|
28
|
-
# Is this a PATCH request?
|
29
|
-
# Equivalent to <tt>request.request_method == :patch</tt>.
|
30
|
-
def patch?
|
31
|
-
HTTP_METHOD_LOOKUP[request_method] == :patch
|
32
|
-
end
|
33
|
-
end
|
34
|
-
module ActionDispatch::Routing
|
35
|
-
HTTP_METHODS << :patch unless HTTP_METHODS.include?(:patch)
|
36
|
-
end
|
37
|
-
ActionDispatch::Integration::RequestHelpers.module_eval do
|
38
|
-
# Performs a PATCH request with the given parameters. See +#get+ for more
|
39
|
-
# details.
|
40
|
-
def patch(path, parameters = nil, headers = nil)
|
41
|
-
process :patch, path, parameters, headers
|
42
|
-
end
|
43
|
-
|
44
|
-
# Performs a PATCH request, following any subsequent redirect.
|
45
|
-
# See +request_via_redirect+ for more information.
|
46
|
-
def patch_via_redirect(path, parameters = nil, headers = nil)
|
47
|
-
request_via_redirect(:patch, path, parameters, headers)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
ActionDispatch::Integration::Runner.class_eval do
|
51
|
-
%w(patch).each do |method|
|
52
|
-
define_method(method) do |*args|
|
53
|
-
reset! unless integration_session
|
54
|
-
# reset the html_document variable, but only for new get/post calls
|
55
|
-
@html_document = nil unless method.in?(["cookies", "assigns"])
|
56
|
-
integration_session.__send__(method, *args).tap do
|
57
|
-
copy_session_variables!
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
module ActionController::TestCase::Behavior
|
63
|
-
def patch(action, parameters = nil, session = nil, flash = nil)
|
64
|
-
process(action, parameters, session, flash, "PATCH")
|
65
|
-
end
|
66
|
-
end
|
67
|
-
class ActionController::Responder
|
68
|
-
ACTIONS_FOR_VERBS.update(:patch => :edit)
|
69
|
-
delegate :patch?, :to => :request
|
70
|
-
end
|
71
|
-
ActionView::Helpers::FormHelper.module_eval do
|
72
|
-
# = Action View Form Helpers
|
73
|
-
def apply_form_for_options!(record, object, options) #:nodoc:
|
74
|
-
object = convert_to_model(object)
|
75
|
-
|
76
|
-
as = options[:as]
|
77
|
-
action, method = object.respond_to?(:persisted?) && object.persisted? ? [:edit, :patch] : [:new, :post]
|
78
|
-
options[:html].reverse_merge!(
|
79
|
-
:class => as ? "#{action}_#{as}" : dom_class(object, action),
|
80
|
-
:id => as ? "#{action}_#{as}" : [options[:namespace], dom_id(object, action)].compact.join("_").presence,
|
81
|
-
:method => method
|
82
|
-
)
|
83
|
-
|
84
|
-
options[:url] ||= polymorphic_path(record, :format => options.delete(:format))
|
85
|
-
end
|
86
|
-
private :apply_form_for_options!
|
87
|
-
end
|
88
|
-
module ActionDispatch::Routing::Mapper::Resources
|
89
|
-
class SingletonResource
|
90
|
-
def resource(*resources, &block)
|
91
|
-
options = resources.extract_options!.dup
|
92
|
-
|
93
|
-
if apply_common_behavior_for(:resource, resources, options, &block)
|
94
|
-
return self
|
95
|
-
end
|
96
|
-
|
97
|
-
resource_scope(:resource, SingletonResource.new(resources.pop, options)) do
|
98
|
-
yield if block_given?
|
99
|
-
|
100
|
-
collection do
|
101
|
-
post :create
|
102
|
-
end if parent_resource.actions.include?(:create)
|
103
|
-
|
104
|
-
new do
|
105
|
-
get :new
|
106
|
-
end if parent_resource.actions.include?(:new)
|
107
|
-
|
108
|
-
member do
|
109
|
-
get :edit if parent_resource.actions.include?(:edit)
|
110
|
-
get :show if parent_resource.actions.include?(:show)
|
111
|
-
if parent_resource.actions.include?(:update)
|
112
|
-
# all that for this PATCH
|
113
|
-
patch :update
|
114
|
-
put :update
|
115
|
-
end
|
116
|
-
delete :destroy if parent_resource.actions.include?(:destroy)
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
self
|
121
|
-
end
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
metadata.gz.sig
DELETED
Binary file
|