wd_sinatra 1.0.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +1 -4
- data/CHANGELOG.md +20 -0
- data/Gemfile +0 -2
- data/LICENSE +4 -2
- data/README.md +28 -19
- data/bin/wd_sinatra +7 -25
- data/lib/wd_sinatra/app_loader.rb +12 -20
- data/lib/wd_sinatra/sinatra_ext.rb +8 -7
- data/lib/wd_sinatra/test_helpers.rb +1 -1
- data/lib/wd_sinatra/version.rb +2 -4
- data/templates/Gemfile +16 -11
- data/templates/{Rakefile → Rakefile.tt} +4 -4
- data/templates/Thorfile +14 -8
- data/templates/api/hello_world.rb +17 -10
- data/templates/bin/console +1 -1
- data/templates/config.ru.tt +6 -0
- data/templates/config/sinatra_config.rb.tt +50 -0
- data/templates/lib/{app.rb → app.rb.tt} +4 -1
- data/templates/lib/hooks.rb +25 -15
- data/templates/test/{test_helpers.rb → test_helpers.rb.tt} +8 -6
- data/test/test_helper.rb +0 -4
- data/test/ws_list_ext_test.rb +6 -6
- data/wd-sinatra.gemspec +11 -7
- metadata +72 -104
- data/templates/config.ru +0 -5
- data/templates/config/middleware.rb +0 -16
- data/templates/config/sinatra_config.rb +0 -18
- data/templates/lib/body_parser.rb +0 -24
- data/templates/lib/tasks/doc.rake +0 -39
- data/templates/lib/tasks/doc_generator/bootstrap/.gitignore +0 -4
- data/templates/lib/tasks/doc_generator/bootstrap/LICENSE +0 -176
- data/templates/lib/tasks/doc_generator/bootstrap/Makefile +0 -47
- data/templates/lib/tasks/doc_generator/bootstrap/README.md +0 -105
- data/templates/lib/tasks/doc_generator/bootstrap/bootstrap.css +0 -2467
- data/templates/lib/tasks/doc_generator/bootstrap/bootstrap.min.css +0 -356
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/css/docs.css +0 -317
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-114x114.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-57x57.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-72x72.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/favicon.ico +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/bird.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/browsers.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-01.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-02.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-03.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/grid-18px.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/twitter-logo-no-bird.png +0 -0
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/application.js +0 -52
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/google-code-prettify/prettify.css +0 -94
- data/templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/google-code-prettify/prettify.js +0 -28
- data/templates/lib/tasks/doc_generator/bootstrap/docs/index.html +0 -2037
- data/templates/lib/tasks/doc_generator/bootstrap/docs/javascript.html +0 -798
- data/templates/lib/tasks/doc_generator/bootstrap/examples/container-app.html +0 -119
- data/templates/lib/tasks/doc_generator/bootstrap/examples/fluid.html +0 -122
- data/templates/lib/tasks/doc_generator/bootstrap/examples/hero.html +0 -79
- data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-alerts.js +0 -124
- data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-buttons.js +0 -64
- data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-dropdown.js +0 -55
- data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-modal.js +0 -260
- data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-popover.js +0 -90
- data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-scrollspy.js +0 -107
- data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-tabs.js +0 -80
- data/templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-twipsy.js +0 -321
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/index.html +0 -40
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-alerts.js +0 -41
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-buttons.js +0 -42
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-dropdown.js +0 -52
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-modal.js +0 -151
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-popover.js +0 -76
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-scrollspy.js +0 -31
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-tabs.js +0 -77
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-twipsy.js +0 -81
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/vendor/qunit.css +0 -232
- data/templates/lib/tasks/doc_generator/bootstrap/js/tests/vendor/qunit.js +0 -1510
- data/templates/lib/tasks/doc_generator/bootstrap/lib/bootstrap.less +0 -26
- data/templates/lib/tasks/doc_generator/bootstrap/lib/forms.less +0 -479
- data/templates/lib/tasks/doc_generator/bootstrap/lib/mixins.less +0 -222
- data/templates/lib/tasks/doc_generator/bootstrap/lib/patterns.less +0 -1060
- data/templates/lib/tasks/doc_generator/bootstrap/lib/reset.less +0 -141
- data/templates/lib/tasks/doc_generator/bootstrap/lib/scaffolding.less +0 -139
- data/templates/lib/tasks/doc_generator/bootstrap/lib/tables.less +0 -224
- data/templates/lib/tasks/doc_generator/bootstrap/lib/type.less +0 -187
- data/templates/lib/tasks/doc_generator/bootstrap/lib/variables.less +0 -60
- data/templates/lib/tasks/doc_generator/template.erb +0 -156
@@ -1,10 +1,18 @@
|
|
1
1
|
describe_service "/hello_world" do |service|
|
2
|
-
service.formats :json
|
2
|
+
service.formats :json, :xml
|
3
3
|
service.http_verb :get
|
4
4
|
service.disable_auth # on by default
|
5
5
|
|
6
|
+
# DOCUMENTATION
|
7
|
+
service.documentation do |doc|
|
8
|
+
doc.overall "Be polite and say hello"
|
9
|
+
doc.example "<code>curl -I 'http://localhost:9292/hello_world?name=Matt'</code>"
|
10
|
+
end
|
11
|
+
|
6
12
|
# INPUT
|
7
|
-
service.
|
13
|
+
service.params do |p|
|
14
|
+
p.string :name, :default => 'World'
|
15
|
+
end
|
8
16
|
|
9
17
|
# OUTPUT
|
10
18
|
service.response do |response|
|
@@ -14,16 +22,15 @@ describe_service "/hello_world" do |service|
|
|
14
22
|
end
|
15
23
|
end
|
16
24
|
|
17
|
-
# DOCUMENTATION
|
18
|
-
service.documentation do |doc|
|
19
|
-
doc.overall "This service provides a simple hello world implementation example."
|
20
|
-
doc.param :name, "The name of the person to greet."
|
21
|
-
doc.example "<code>curl -I 'http://localhost:9292/hello_world?name=Matt'</code>"
|
22
|
-
end
|
23
|
-
|
24
25
|
# ACTION/IMPLEMENTATION
|
25
26
|
service.implementation do
|
26
|
-
{:message => "Hello #{params[:name]}", :at => Time.now}
|
27
|
+
data = {:message => "Hello #{params[:name]}", :at => Time.now}
|
28
|
+
case env["wd.format"]
|
29
|
+
when :json
|
30
|
+
data.to_json
|
31
|
+
when :xml
|
32
|
+
# data.to_xml # serialize to xml
|
33
|
+
end
|
27
34
|
end
|
28
35
|
|
29
36
|
end
|
data/templates/bin/console
CHANGED
@@ -0,0 +1,50 @@
|
|
1
|
+
class <%= name_const %> < Sinatra::Base
|
2
|
+
set :environment, RACK_ENV
|
3
|
+
set :root, WDSinatra::AppLoader.root_path
|
4
|
+
set :app_file, __FILE__
|
5
|
+
set :public_folder, File.join(WDSinatra::AppLoader.root_path, "public")
|
6
|
+
set :method_override, true
|
7
|
+
|
8
|
+
# enable logging in certain environments
|
9
|
+
configure :development, :production do
|
10
|
+
enable :logging
|
11
|
+
end
|
12
|
+
|
13
|
+
# Checks on static files before dispatching calls
|
14
|
+
enable :static
|
15
|
+
|
16
|
+
# enable rack session
|
17
|
+
enable :session
|
18
|
+
|
19
|
+
set :raise_errors, false
|
20
|
+
|
21
|
+
# enable that option to run by calling this file automatically (without using the config.ru file)
|
22
|
+
# enable :run
|
23
|
+
|
24
|
+
# Store the caught exception in the rack env so it can be used
|
25
|
+
# by 3rd party apps like airbrake.
|
26
|
+
error(::Exception) do |exception|
|
27
|
+
@env['rack.exception'] = exception
|
28
|
+
end
|
29
|
+
|
30
|
+
# Use this middleware with AR to avoid threading issues.
|
31
|
+
# require 'active_record'
|
32
|
+
# use ActiveRecord::ConnectionAdapters::ConnectionManagement
|
33
|
+
|
34
|
+
use Airbrake::Rack if defined?(Airbrake)
|
35
|
+
|
36
|
+
use Rack::ContentLength
|
37
|
+
|
38
|
+
require "rack/parser"
|
39
|
+
use Rack::Parser
|
40
|
+
|
41
|
+
if defined?(NewRelic)
|
42
|
+
#if RACK_ENV == 'development'
|
43
|
+
#require 'new_relic/rack/developer_mode'
|
44
|
+
#use NewRelic::Rack::DeveloperMode
|
45
|
+
#end
|
46
|
+
if NewRelic::Agent.config[:agent_enabled]
|
47
|
+
LOGGER.info "New Relic monitoring enabled App name: '#{NewRelic::Control.instance['app_name']}', Mode: '#{NewRelic::Control.instance.app}'"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -13,7 +13,7 @@ if File.exist?(airbrake_config_file)
|
|
13
13
|
require 'airbrake'
|
14
14
|
Airbrake.configure do |config|
|
15
15
|
config.api_key = airbrake_config['api_key']
|
16
|
-
(airbrake_config['params_filters'] - config.params_filters).each do |param|
|
16
|
+
(airbrake_config['params_filters'] - config.params_filters).each do |param|
|
17
17
|
config.params_filters << param
|
18
18
|
end
|
19
19
|
config.environment_name = RACK_ENV
|
@@ -22,3 +22,6 @@ if File.exist?(airbrake_config_file)
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
25
|
+
|
26
|
+
class <%= name_const %> < Sinatra::Base
|
27
|
+
end
|
data/templates/lib/hooks.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
require 'body_parser' # from the lib folder
|
2
|
-
# Change the JSON parser if you want to use Yajl for instance.
|
3
|
-
require 'json'
|
4
|
-
BodyParser.json_parser = JSON
|
5
|
-
|
6
1
|
module WDSinatraHooks
|
7
2
|
|
8
3
|
MOBILE_X_HEADER = 'HTTP_X_MOBILE_TOKEN'
|
9
4
|
INTERNAL_X_HEADER = 'HTTP_X_INTERNAL_API_KEY'
|
10
|
-
|
5
|
+
SUPPORTED_MEDIA_TYPES = {
|
6
|
+
"application/json" => :json,
|
7
|
+
"application/xml" => :xml,
|
8
|
+
# add custom media types here, for example:
|
9
|
+
# "application/vnd.example+json" => :json,
|
10
|
+
}
|
11
11
|
|
12
12
|
####### HOOKS #############################
|
13
13
|
#
|
@@ -21,18 +21,13 @@ module WDSinatraHooks
|
|
21
21
|
# @param [Hash] params the incoming params.
|
22
22
|
# processed.
|
23
23
|
# @returns [Hash] the pre processed params.
|
24
|
-
def params_preprocessor_hook(params)
|
25
|
-
|
26
|
-
BodyParser.parse(params, request.body, request.content_type)
|
27
|
-
else
|
28
|
-
params
|
29
|
-
end
|
30
|
-
end
|
24
|
+
# def params_preprocessor_hook(params)
|
25
|
+
# end
|
31
26
|
|
32
27
|
|
33
28
|
# This hooks gets called when an exception is raised while preprocessing the params,
|
34
29
|
# verifying them or post processing them.
|
35
|
-
# If this method isn't defined, the default handler is used (a 400 error is returned with the
|
30
|
+
# If this method isn't defined, the default handler is used (a 400 error is returned with the
|
36
31
|
# exception message sent back as a json.
|
37
32
|
#
|
38
33
|
# @param [Exception] exception The exception that was rescued.
|
@@ -53,9 +48,24 @@ module WDSinatraHooks
|
|
53
48
|
|
54
49
|
# This hook gets called before dispatching any
|
55
50
|
# requests.
|
56
|
-
#
|
51
|
+
#
|
57
52
|
# Implementation example
|
58
53
|
def pre_dispatch_hook
|
54
|
+
# content negotiation
|
55
|
+
accept = env["rack-accept.request"]
|
56
|
+
if accept
|
57
|
+
service_media_types = SUPPORTED_MEDIA_TYPES.select {|k,v| service.formats.include?(v)}
|
58
|
+
env["wd.media_type"] = accept.media_type.best_of(service_media_types.keys)
|
59
|
+
halt 406 unless env["wd.media_type"]
|
60
|
+
env["wd.format"] = SUPPORTED_MEDIA_TYPES[env["wd.media_type"]]
|
61
|
+
else
|
62
|
+
env["wd.media_type"] = "*/*"
|
63
|
+
env["wd.format"] = service.formats.first
|
64
|
+
halt 406 unless env["wd.format"] # 406 if no defined service.formats
|
65
|
+
end
|
66
|
+
|
67
|
+
content_type env["wd.format"], charset: "utf-8"
|
68
|
+
|
59
69
|
if service.extra[:mobile]
|
60
70
|
mobile_auth_check
|
61
71
|
elsif service.extra[:internal]
|
@@ -8,21 +8,23 @@ require 'wd_sinatra/test_helpers'
|
|
8
8
|
|
9
9
|
ENV['DONT_PRINT_ROUTES'] = 'true'
|
10
10
|
root = File.expand_path('..', File.dirname(__FILE__))
|
11
|
-
WDSinatra::AppLoader.
|
11
|
+
WDSinatra::AppLoader.setup(root)
|
12
|
+
WDSinatra::AppLoader.server(<%= name_const %>)
|
12
13
|
WeaselDiesel.send(:include, JSONResponseVerification)
|
13
14
|
|
14
|
-
if RUBY_VERSION =~ /1.8/
|
15
|
-
require 'minitest/autorun'
|
16
|
-
end
|
17
|
-
|
18
15
|
require 'wd_sinatra/test_unit_helpers'
|
19
16
|
include TestUnitHelpers
|
20
17
|
|
21
18
|
TestApi.auth_request_x_header = WDSinatraHooks::INTERNAL_X_HEADER[/HTTP_(.*)/, 1] # strip the header marker added by Rack
|
22
19
|
TestApi.mobile_request_x_header = WDSinatraHooks::MOBILE_X_HEADER[/HTTP_(.*)/, 1] # strip the header marker added by Rack
|
23
20
|
|
24
|
-
|
21
|
+
class Requester
|
22
|
+
def app
|
23
|
+
<%= name_const %>.new
|
24
|
+
end
|
25
|
+
end
|
25
26
|
|
27
|
+
module TestApi
|
26
28
|
# Edit this method to reflect your own Auth strategy
|
27
29
|
def self.valid_internal_api_headers(headers)
|
28
30
|
custom_headers = {TestApi.auth_request_x_header => WDSinatraHooks::ALLOWED_API_KEYS[0]}
|
data/test/test_helper.rb
CHANGED
data/test/ws_list_ext_test.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'uri'
|
2
|
-
|
2
|
+
require_relative 'test_helper'
|
3
3
|
|
4
4
|
class WsListExtTest < MiniTest::Unit::TestCase
|
5
5
|
|
@@ -27,11 +27,11 @@ class WsListExtTest < MiniTest::Unit::TestCase
|
|
27
27
|
|
28
28
|
# A snapshot of a working sorting of url array
|
29
29
|
# The sorting doesn't have to actually be similar to that
|
30
|
-
# but this allows us to have a baseline to measure against in case
|
30
|
+
# but this allows us to have a baseline to measure against in case
|
31
31
|
# of tests.
|
32
32
|
def expected_sorted_urls
|
33
33
|
[
|
34
|
-
"/foo/bar/bazz",
|
34
|
+
"/foo/bar/bazz",
|
35
35
|
"/foo/bart",
|
36
36
|
"/foo/bar/",
|
37
37
|
"/foo/bar/:baz",
|
@@ -44,9 +44,9 @@ class WsListExtTest < MiniTest::Unit::TestCase
|
|
44
44
|
def matched_route(url_query, reference_urls)
|
45
45
|
sorted_regexps = reference_urls.map do |url|
|
46
46
|
ignore = ""
|
47
|
-
pattern = url.gsub(/[^\?\%\\\/\:\*\w]/){ |c|
|
47
|
+
pattern = url.gsub(/[^\?\%\\\/\:\*\w]/){ |c|
|
48
48
|
ignore << escaped(c).join if c.match(/[\.@]/)
|
49
|
-
char_encoded(c)
|
49
|
+
char_encoded(c)
|
50
50
|
}
|
51
51
|
pattern.gsub!(/((:\w+)|\*)/) do |match|
|
52
52
|
if match == "*"
|
@@ -78,7 +78,7 @@ class WsListExtTest < MiniTest::Unit::TestCase
|
|
78
78
|
assert_equal nil, matched_route("/fooz", base_urls), "shouldn't match /fooz"
|
79
79
|
assert_equal nil, matched_route("/foo/bar/baz/baz", base_urls), "shouldn't match /foo/bar/baz/baz"
|
80
80
|
assert_equal nil, matched_route("/foo/", base_urls), "shouldn't match /foo/"
|
81
|
-
assert_equal "/foo/([^/?#]+)/bazz", matched_route("/foo/123/bazz", base_urls), "Should match /foo/123/bazz"
|
81
|
+
assert_equal "/foo/([^/?#]+)/bazz", matched_route("/foo/123/bazz", base_urls), "Should match /foo/123/bazz"
|
82
82
|
end
|
83
83
|
|
84
84
|
def test_route_matching_expectations
|
data/wd-sinatra.gemspec
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'wd_sinatra/version'
|
3
5
|
|
4
6
|
Gem::Specification.new do |gem|
|
5
7
|
gem.authors = ["Matt Aimonetti"]
|
@@ -13,15 +15,17 @@ Gem::Specification.new do |gem|
|
|
13
15
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
16
|
gem.name = "wd_sinatra"
|
15
17
|
gem.require_paths = ["lib"]
|
16
|
-
gem.version =
|
18
|
+
gem.version = WDSinatra::VERSION
|
19
|
+
gem.license = 'MIT'
|
17
20
|
|
18
21
|
gem.add_dependency('sinatra', ">= 1.3.3")
|
19
22
|
gem.add_dependency('rake')
|
20
|
-
gem.add_dependency('weasel_diesel', ">= 1.2.
|
23
|
+
gem.add_dependency('weasel_diesel', ">= 1.2.2")
|
21
24
|
gem.add_dependency('rack', ">= 1.4.4")
|
25
|
+
gem.add_dependency('rack-parser', ">= 0.2.0")
|
26
|
+
gem.add_dependency('rack-accept', ">= 0.4.5")
|
22
27
|
gem.add_dependency('rack-test')
|
23
28
|
gem.add_dependency('thor')
|
24
|
-
gem.add_dependency('minitest')
|
29
|
+
gem.add_dependency('minitest', "~> 4.7.4")
|
30
|
+
gem.add_dependency('inflecto')
|
25
31
|
end
|
26
|
-
|
27
|
-
|
metadata
CHANGED
@@ -1,126 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wd_sinatra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Matt Aimonetti
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: sinatra
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 1.3.3
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 1.3.3
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: weasel_diesel
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.2.
|
47
|
+
version: 1.2.2
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.2.
|
54
|
+
version: 1.2.2
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rack
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: 1.4.4
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: 1.4.4
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rack-parser
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.2.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.2.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rack-accept
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.4.5
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.4.5
|
78
97
|
- !ruby/object:Gem::Dependency
|
79
98
|
name: rack-test
|
80
99
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
100
|
requirements:
|
83
|
-
- -
|
101
|
+
- - '>='
|
84
102
|
- !ruby/object:Gem::Version
|
85
103
|
version: '0'
|
86
104
|
type: :runtime
|
87
105
|
prerelease: false
|
88
106
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
107
|
requirements:
|
91
|
-
- -
|
108
|
+
- - '>='
|
92
109
|
- !ruby/object:Gem::Version
|
93
110
|
version: '0'
|
94
111
|
- !ruby/object:Gem::Dependency
|
95
112
|
name: thor
|
96
113
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
114
|
requirements:
|
99
|
-
- -
|
115
|
+
- - '>='
|
100
116
|
- !ruby/object:Gem::Version
|
101
117
|
version: '0'
|
102
118
|
type: :runtime
|
103
119
|
prerelease: false
|
104
120
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
121
|
requirements:
|
107
|
-
- -
|
122
|
+
- - '>='
|
108
123
|
- !ruby/object:Gem::Version
|
109
124
|
version: '0'
|
110
125
|
- !ruby/object:Gem::Dependency
|
111
126
|
name: minitest
|
112
127
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - ~>
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 4.7.4
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ~>
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 4.7.4
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: inflecto
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
116
144
|
- !ruby/object:Gem::Version
|
117
145
|
version: '0'
|
118
146
|
type: :runtime
|
119
147
|
prerelease: false
|
120
148
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
149
|
requirements:
|
123
|
-
- -
|
150
|
+
- - '>='
|
124
151
|
- !ruby/object:Gem::Version
|
125
152
|
version: '0'
|
126
153
|
description: Weasel-Diesel Sinatra app gem, allowing you to generate/update sinatra
|
@@ -149,109 +176,50 @@ files:
|
|
149
176
|
- lib/wd_sinatra/ws_list_ext.rb
|
150
177
|
- templates/Gemfile
|
151
178
|
- templates/Guardfile
|
152
|
-
- templates/Rakefile
|
179
|
+
- templates/Rakefile.tt
|
153
180
|
- templates/Thorfile
|
154
181
|
- templates/api/hello_world.rb
|
155
182
|
- templates/bin/console
|
156
|
-
- templates/config.ru
|
183
|
+
- templates/config.ru.tt
|
157
184
|
- templates/config/airbrake.yml.sample
|
158
185
|
- templates/config/environments/default.rb
|
159
186
|
- templates/config/environments/production.rb
|
160
187
|
- templates/config/environments/test.rb
|
161
|
-
- templates/config/
|
162
|
-
- templates/
|
163
|
-
- templates/lib/app.rb
|
164
|
-
- templates/lib/body_parser.rb
|
188
|
+
- templates/config/sinatra_config.rb.tt
|
189
|
+
- templates/lib/app.rb.tt
|
165
190
|
- templates/lib/hooks.rb
|
166
191
|
- templates/lib/newrelic_instrumentation.rb
|
167
|
-
- templates/lib/tasks/doc.rake
|
168
|
-
- templates/lib/tasks/doc_generator/bootstrap/.gitignore
|
169
|
-
- templates/lib/tasks/doc_generator/bootstrap/LICENSE
|
170
|
-
- templates/lib/tasks/doc_generator/bootstrap/Makefile
|
171
|
-
- templates/lib/tasks/doc_generator/bootstrap/README.md
|
172
|
-
- templates/lib/tasks/doc_generator/bootstrap/bootstrap.css
|
173
|
-
- templates/lib/tasks/doc_generator/bootstrap/bootstrap.min.css
|
174
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/css/docs.css
|
175
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-114x114.png
|
176
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-57x57.png
|
177
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/bootstrap-apple-72x72.png
|
178
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/ico/favicon.ico
|
179
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/bird.png
|
180
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/browsers.png
|
181
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-01.png
|
182
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-02.png
|
183
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/example-diagram-03.png
|
184
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/grid-18px.png
|
185
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/img/twitter-logo-no-bird.png
|
186
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/application.js
|
187
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/google-code-prettify/prettify.css
|
188
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/assets/js/google-code-prettify/prettify.js
|
189
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/index.html
|
190
|
-
- templates/lib/tasks/doc_generator/bootstrap/docs/javascript.html
|
191
|
-
- templates/lib/tasks/doc_generator/bootstrap/examples/container-app.html
|
192
|
-
- templates/lib/tasks/doc_generator/bootstrap/examples/fluid.html
|
193
|
-
- templates/lib/tasks/doc_generator/bootstrap/examples/hero.html
|
194
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-alerts.js
|
195
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-buttons.js
|
196
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-dropdown.js
|
197
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-modal.js
|
198
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-popover.js
|
199
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-scrollspy.js
|
200
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-tabs.js
|
201
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/bootstrap-twipsy.js
|
202
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/index.html
|
203
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-alerts.js
|
204
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-buttons.js
|
205
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-dropdown.js
|
206
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-modal.js
|
207
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-popover.js
|
208
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-scrollspy.js
|
209
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-tabs.js
|
210
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/unit/bootstrap-twipsy.js
|
211
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/vendor/qunit.css
|
212
|
-
- templates/lib/tasks/doc_generator/bootstrap/js/tests/vendor/qunit.js
|
213
|
-
- templates/lib/tasks/doc_generator/bootstrap/lib/bootstrap.less
|
214
|
-
- templates/lib/tasks/doc_generator/bootstrap/lib/forms.less
|
215
|
-
- templates/lib/tasks/doc_generator/bootstrap/lib/mixins.less
|
216
|
-
- templates/lib/tasks/doc_generator/bootstrap/lib/patterns.less
|
217
|
-
- templates/lib/tasks/doc_generator/bootstrap/lib/reset.less
|
218
|
-
- templates/lib/tasks/doc_generator/bootstrap/lib/scaffolding.less
|
219
|
-
- templates/lib/tasks/doc_generator/bootstrap/lib/tables.less
|
220
|
-
- templates/lib/tasks/doc_generator/bootstrap/lib/type.less
|
221
|
-
- templates/lib/tasks/doc_generator/bootstrap/lib/variables.less
|
222
|
-
- templates/lib/tasks/doc_generator/template.erb
|
223
192
|
- templates/public/favicon.ico
|
224
193
|
- templates/test/integration/hello_world_test.rb
|
225
|
-
- templates/test/test_helpers.rb
|
194
|
+
- templates/test/test_helpers.rb.tt
|
226
195
|
- test/test_helper.rb
|
227
196
|
- test/ws_list_ext_test.rb
|
228
197
|
- wd-sinatra.gemspec
|
229
198
|
homepage: https://github.com/mattetti/wd-sinatra
|
230
|
-
licenses:
|
199
|
+
licenses:
|
200
|
+
- MIT
|
201
|
+
metadata: {}
|
231
202
|
post_install_message:
|
232
203
|
rdoc_options: []
|
233
204
|
require_paths:
|
234
205
|
- lib
|
235
206
|
required_ruby_version: !ruby/object:Gem::Requirement
|
236
|
-
none: false
|
237
207
|
requirements:
|
238
|
-
- -
|
208
|
+
- - '>='
|
239
209
|
- !ruby/object:Gem::Version
|
240
210
|
version: '0'
|
241
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
|
-
none: false
|
243
212
|
requirements:
|
244
|
-
- -
|
213
|
+
- - '>='
|
245
214
|
- !ruby/object:Gem::Version
|
246
215
|
version: '0'
|
247
216
|
requirements: []
|
248
217
|
rubyforge_project:
|
249
|
-
rubygems_version:
|
218
|
+
rubygems_version: 2.0.7
|
250
219
|
signing_key:
|
251
|
-
specification_version:
|
220
|
+
specification_version: 4
|
252
221
|
summary: Weasel-Diesel Sinatra app gem, allowing you to generate/update sinatra apps
|
253
222
|
using the Weasel Diesel DSL
|
254
223
|
test_files:
|
255
224
|
- test/test_helper.rb
|
256
225
|
- test/ws_list_ext_test.rb
|
257
|
-
has_rdoc:
|