Permalink
Browse files

Merge pull request #210 from zzak/master

Replace everything with README about upstream move
  • Loading branch information...
2 parents fe860ec + 2219573 commit 250e9db2db54c0531b0fc274e1fd1f6cb701145e @zzak zzak committed on GitHub Jul 23, 2016
Showing with 7 additions and 8,078 deletions.
  1. +0 −3 .gitignore
  2. +0 −34 .travis.yml
  3. +0 −45 Gemfile
  4. +0 −22 LICENSE
  5. +7 −137 README.md
  6. +0 −64 Rakefile
  7. +0 −29 ideas.md
  8. +0 −124 lib/sinatra/capture.rb
  9. +0 −174 lib/sinatra/config_file.rb
  10. +0 −147 lib/sinatra/content_for.rb
  11. +0 −39 lib/sinatra/contrib.rb
  12. +0 −2 lib/sinatra/contrib/all.rb
  13. +0 −53 lib/sinatra/contrib/setup.rb
  14. +0 −17 lib/sinatra/contrib/version.rb
  15. +0 −329 lib/sinatra/cookies.rb
  16. +0 −60 lib/sinatra/custom_logger.rb
  17. +0 −5 lib/sinatra/decompile.rb
  18. +0 −96 lib/sinatra/engine_tracking.rb
  19. +0 −95 lib/sinatra/extension.rb
  20. +0 −131 lib/sinatra/json.rb
  21. +0 −132 lib/sinatra/link_header.rb
  22. +0 −87 lib/sinatra/multi_route.rb
  23. +0 −363 lib/sinatra/namespace.rb
  24. +0 −403 lib/sinatra/reloader.rb
  25. +0 −71 lib/sinatra/required_params.rb
  26. +0 −266 lib/sinatra/respond_with.rb
  27. +0 −137 lib/sinatra/runner.rb
  28. +0 −243 lib/sinatra/streaming.rb
  29. +0 −87 lib/sinatra/test_helpers.rb
  30. +0 −93 lib/sinatra/webdav.rb
  31. +0 −244 sinatra-contrib.gemspec
  32. +0 −100 spec/capture_spec.rb
  33. 0 spec/config_file/config.txt
  34. +0 −7 spec/config_file/key_value.yml
  35. +0 −6 spec/config_file/key_value.yml.erb
  36. +0 −2 spec/config_file/key_value_override.yml
  37. +0 −4 spec/config_file/missing_env.yml
  38. +0 −7 spec/config_file/with_envs.yml
  39. +0 −11 spec/config_file/with_nested_envs.yml
  40. +0 −76 spec/config_file_spec.rb
  41. +0 −1 spec/content_for/different_key.erb
  42. +0 −1 spec/content_for/different_key.erubis
  43. +0 −2 spec/content_for/different_key.haml
  44. +0 −2 spec/content_for/different_key.slim
  45. +0 −3 spec/content_for/footer.erb
  46. +0 −3 spec/content_for/footer.erubis
  47. +0 −2 spec/content_for/footer.haml
  48. +0 −2 spec/content_for/footer.slim
  49. +0 −1 spec/content_for/layout.erb
  50. +0 −1 spec/content_for/layout.erubis
  51. +0 −1 spec/content_for/layout.haml
  52. +0 −1 spec/content_for/layout.slim
  53. +0 −4 spec/content_for/multiple_blocks.erb
  54. +0 −4 spec/content_for/multiple_blocks.erubis
  55. +0 −8 spec/content_for/multiple_blocks.haml
  56. +0 −8 spec/content_for/multiple_blocks.slim
  57. +0 −3 spec/content_for/multiple_yields.erb
  58. +0 −3 spec/content_for/multiple_yields.erubis
  59. +0 −3 spec/content_for/multiple_yields.haml
  60. +0 −3 spec/content_for/multiple_yields.slim
  61. +0 −1 spec/content_for/passes_values.erb
  62. +0 −1 spec/content_for/passes_values.erubis
  63. +0 −1 spec/content_for/passes_values.haml
  64. +0 −1 spec/content_for/passes_values.slim
  65. +0 −1 spec/content_for/same_key.erb
  66. +0 −1 spec/content_for/same_key.erubis
  67. +0 −2 spec/content_for/same_key.haml
  68. +0 −2 spec/content_for/same_key.slim
  69. +0 −1 spec/content_for/takes_values.erb
  70. +0 −1 spec/content_for/takes_values.erubis
  71. +0 −3 spec/content_for/takes_values.haml
  72. +0 −3 spec/content_for/takes_values.slim
  73. +0 −241 spec/content_for_spec.rb
  74. +0 −803 spec/cookies_spec.rb
  75. +0 −43 spec/custom_logger_spec.rb
  76. +0 −32 spec/extension_spec.rb
  77. +0 −115 spec/json_spec.rb
  78. +0 −99 spec/link_header_spec.rb
  79. +0 −59 spec/multi_route_spec.rb
  80. +0 −1 spec/namespace/foo.erb
  81. +0 −1 spec/namespace/nested/foo.erb
  82. +0 −791 spec/namespace_spec.rb
  83. +0 −581 spec/okjson.rb
  84. +0 −40 spec/reloader/app.rb.erb
  85. +0 −440 spec/reloader_spec.rb
  86. +0 −68 spec/required_params_spec.rb
  87. +0 −1 spec/respond_with/bar.erb
  88. +0 −1 spec/respond_with/bar.json.erb
  89. +0 −1 spec/respond_with/baz.yajl
  90. +0 −1 spec/respond_with/foo.html.erb
  91. +0 −2 spec/respond_with/not_html.sass
  92. +0 −317 spec/respond_with_spec.rb
  93. +0 −7 spec/spec_helper.rb
  94. +0 −415 spec/streaming_spec.rb
View
@@ -1,3 +0,0 @@
-doc/
-.bundle/
-Gemfile.lock
View
@@ -1,34 +0,0 @@
----
-language: ruby
-
-before_install:
- - rvm get head
- - gem install bundler
-
-rvm:
- - 2.2.4
- - 2.3.1
- - rbx
- - jruby-9.1.0.0
- - jruby-head
- - ruby-head
-
-matrix:
- include:
- - { rvm: 2.3.1, env: tilt=master }
- - { rvm: ruby-head, env: tilt=master }
- - { rvm: 2.3.1, env: rack=master }
- allow_failures:
- - env: tilt=master
- - rvm: ruby-head
- - rvm: jruby-head
- - rvm: rbx
- - env: rack=master
-
-notifications:
- recipients:
- - _@trevorbramble.com
- - mail@zzak.io
- slack: sinatrarb:LQGhUfGYcqRgRzwKea0bqUhY
-
-sudo: false
View
45 Gemfile
@@ -1,45 +0,0 @@
-source "https://rubygems.org" unless ENV['QUICK']
-gemspec
-
-gem 'mustermann', github: 'sinatra/mustermann'
-gem 'sinatra', github: 'sinatra/sinatra'
-
-group :development, :test do
-
- platform :jruby do
- gem 'json'
- gem 'rdoc'
- end
-
- platform :jruby do
- gem 'therubyrhino'
- end
-
- platform :jruby, :ruby do
- gem 'slim', '2.1.0'
- gem 'liquid', '~> 2.6.x'
- end
-
- platform :ruby do
- gem 'execjs', '2.0.0'
- gem 'nokogiri', '1.5.10'
- gem 'redcarpet', '2.3.0'
- gem 'yajl-ruby'
- # ref is a dependency of therubyracer
- gem 'ref'
- gem 'therubyracer'
- end
-
- gem 'multi_json'
-end
-
-# Allows stuff like `tilt=1.2.2 bundle install` or `tilt=master ...`.
-# Used by the CI.
-repos = { 'sinatra' => 'sinatra/sinatra', 'tilt' => 'rtomayko/tilt', 'rack' => 'rack/rack' }
-%w[sinatra tilt rack].each do |lib|
- dep = (ENV[lib] || 'stable').sub "#{lib}-", ''
- dep = nil if dep == 'stable'
- dep = {:github => repos[lib], :branch => dep} if dep and dep !~ /(\d+\.)+\d+/
- gem lib, dep if dep
-end
-
View
22 LICENSE
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2008-2011 Nicolas Sanguinetti, entp.com, Konstantin Haase
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
144 README.md
@@ -1,146 +1,16 @@
-[![Build Status](https://secure.travis-ci.org/sinatra/sinatra-contrib.png)](http://travis-ci.org/sinatra/sinatra-contrib)
+# NOTE: This project has been merged upstream to [sinatra/sinatra](https://github.com/sinatra/sinatra)
-# Sinatra::Contrib
+The tree will be [merged upstream](https://github.com/sinatra/sinatra/tree/master/sinatra-contrib), including commit history.
-Collection of common Sinatra extensions, semi-officially supported.
+For specific file history, please refer to the [pre-merge branch](https://github.com/sinatra/sinatra-contrib/tree/pre-merge) here.
-## Goals
+To use this gem from the upstream repository, you can add the following to your `Gemfile`:
-* For every future Sinatra release, have at least one fully compatible release
-* High code quality, high test coverage
-* Include plugins people usually ask for a lot
-
-## Included extensions
-
-### Common Extensions
-
-These are common extension which will not add significant overhead or change any
-behavior of already existing APIs. They do not add any dependencies not already
-installed with this gem.
-
-Currently included:
-
-* `sinatra/capture`: Let's you capture the content of blocks in templates.
-
-* `sinatra/config_file`: Allows loading configuration from yaml files.
-
-* `sinatra/content_for`: Adds Rails-style `content_for` helpers to Haml, Erb,
- Erubis and Slim.
-
-* `sinatra/cookies`: A `cookies` helper for reading and writing cookies.
-
-* `sinatra/engine_tracking`: Adds methods like `haml?` that allow helper
- methods to check whether they are called from within a template.
-
-* `sinatra/json`: Adds a `#json` helper method to return JSON documents.
-
-* `sinatra/link_header`: Helpers for generating `link` HTML tags and
- corresponding `Link` HTTP headers. Adds `link`, `stylesheet` and `prefetch`
- helper methods.
-
-* `sinatra/multi_route`: Adds ability to define one route block for multiple
- routes and multiple or custom HTTP verbs.
-
-* `sinatra/namespace`: Adds namespace support to Sinatra.
-
-* `sinatra/respond_with`: Choose action and/or template automatically
- depending on the incoming request. Adds helpers `respond_to` and
- `respond_with`.
-
-* `sinatra/custom_logger`: This extension allows you to define your own
- logger instance using +logger+ setting. That logger then will
- be available as #logger helper method in your routes and views.
-
-* `sinatra/required_params`: Ensure if required query parameters exist
-
-### Custom Extensions
-
-These extensions may add additional dependencies and enhance the behavior of the
-existing APIs.
-
-Currently included:
-
-* `sinatra/reloader`: Automatically reloads Ruby files on code changes.
-
-### Other Tools
-
-* `sinatra/extension`: Mixin for writing your own Sinatra extensions.
-
-* `sinatra/test_helpers`: Helper methods to ease testing your Sinatra
- application. Partly extracted from Sinatra. Testing framework agnostic
-
-## Installation
-
-Add `gem 'sinatra-contrib'` to *Gemfile*, then execute `bundle install`.
-
-If you don't use Bundler, install the gem manually by executing `gem install sinatra-contrib` in your command line.
-
-
-## Usage
-
-### Classic Style
-
-A single extension (example: sinatra-content-for):
-
-``` ruby
-require 'sinatra'
-require 'sinatra/content_for'
-```
-
-Common extensions:
-
-``` ruby
-require 'sinatra'
-require 'sinatra/contrib'
-```
-
-All extensions:
-
-``` ruby
-require 'sinatra'
-require 'sinatra/contrib/all'
-```
-
-### Modular Style
-
-A single extension (example: sinatra-content-for):
-
-``` ruby
-require 'sinatra/base'
-require 'sinatra/content_for'
-require 'sinatra/namespace'
-
-class MyApp < Sinatra::Base
- # Note: Some modules are extensions, some helpers, see the specific
- # documentation or the source
- helpers Sinatra::ContentFor
- register Sinatra::Namespace
-end
-```
-
-Common extensions:
-
-``` ruby
-require 'sinatra/base'
-require 'sinatra/contrib'
-
-class MyApp < Sinatra::Base
- register Sinatra::Contrib
+```ruby
+github 'sinatra/sinatra' do
+ gem 'sinatra-contrib'
end
```
-All extensions:
-
-``` ruby
-require 'sinatra/base'
-require 'sinatra/contrib/all'
-
-class MyApp < Sinatra::Base
- register Sinatra::Contrib
-end
-```
-
-### Documentation
-
For more info check the [official docs](http://www.sinatrarb.com/contrib/) and
[api docs](http://www.rubydoc.info/gems/sinatra-contrib).
View
@@ -1,64 +0,0 @@
-$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
-require 'open-uri'
-require 'yaml'
-require 'sinatra/contrib/version'
-
-desc "run specs"
-task(:spec) { ruby '-S rspec spec -cw' }
-task(:test => :spec)
-task(:default => :spec)
-
-namespace :doc do
- task :readmes do
- Dir.glob 'lib/sinatra/*.rb' do |file|
- excluded_files = %w[lib/sinatra/contrib.rb lib/sinatra/capture.rb lib/sinatra/engine_tracking.rb]
- next if excluded_files.include?(file)
- doc = File.read(file)[/^module Sinatra(\n)+( #[^\n]*\n)*/m].scan(/^ *#(?!#) ?(.*)\n/).join("\n")
- file = "doc/#{file[4..-4].tr("/_", "-")}.rdoc"
- Dir.mkdir "doc" unless File.directory? "doc"
- puts "writing #{file}"
- File.open(file, "w") { |f| f << doc }
- end
- end
-
- task :all => [:readmes]
-end
-
-desc "generate documentation"
-task :doc => 'doc:all'
-
-desc "generate gemspec"
-task 'sinatra-contrib.gemspec' do
- content = File.read 'sinatra-contrib.gemspec'
-
- fields = {
- :authors => `git shortlog -sn`.scan(/[^\d\s].*/),
- :email => `git shortlog -sne`.scan(/[^<]+@[^>]+/),
- :files => `git ls-files`.split("\n").reject { |f| f =~ /^(\.|Gemfile)/ }
- }
-
- fields.each do |field, values|
- updated = " s.#{field} = ["
- updated << values.map { |v| "\n %p" % v }.join(',')
- updated << "\n ]"
- content.sub!(/ s\.#{field} = \[\n( .*\n)* \]/, updated)
- end
-
- File.open('sinatra-contrib.gemspec', 'w') { |f| f << content }
-end
-
-task :gemspec => 'sinatra-contrib.gemspec'
-
-task :release => :gemspec do
- sh <<-SH
- rm -Rf sinatra-contrib*.gem &&
- gem build sinatra-contrib.gemspec &&
- gem install sinatra-contrib*.gem --local &&
- gem push sinatra-contrib*.gem &&
- git commit --allow-empty -a -m '#{Sinatra::Contrib::VERSION} release' &&
- git tag -s v#{Sinatra::Contrib::VERSION} -m '#{Sinatra::Contrib::VERSION} release' &&
- git push && (git push origin master || true) &&
- git push --tags && (git push origin --tags || true)
- SH
-end
-
View
@@ -1,29 +0,0 @@
-* Extension that does something like this:
-
- def build(*)
- if settings.memcached?
- use Rack::Cache, :backend => :memcached
- use Rack::Session::Memcached
- # ...
- end
- super
- end
-
-* `sinatra-smart-cache`: update cache header only if arguments are more
- restrictive than curent value, set caching headers that way for most helper
- methods (i.e. `sass` or `send_file`)
-
-* Some verbose logging extension: Log what filters, routes, error handlers,
- templates, and so on is used.
-
-* Form helpers, with forms as first class objects that accepts hashes or
- something, so the form meta data can also be used to expose a JSON API or
- similar, possibly defining routes (like "Sinatra's Hat"), strictly using
- the ActiveModel API.
-
-* Extend `sinatra-content-for` to support Liquid, Radius, Markaby, Nokogiri and
- Builder. At least the first two probably involve patching Tilt.
-
-* Rewrite of `sinatra-compass`?
-
-* Helpers for HTML escaping and such.
Oops, something went wrong.

0 comments on commit 250e9db

Please sign in to comment.