Giter VIP home page Giter VIP logo

scalatra-website's Introduction

Scalatra Website

This is the code for https://scalatra.org, including all the news, guides, and getting started content.

To build it:

  • check it out locally
  • install Hugo version 0.31.1. Anything above 0.31.1 will not work because of this issue
  • type hugo serve from the root directory of the repo

Hugo will fire up, and you'll be able to edit the site's contents at http://localhost:1313/

New Scalatra version

The docs need to be updated when a new version of Scalatra is released. The following are the steps that were done when 2.7 was published.

  1. Create 2.7 branch, then create 2.7 directory and copy 2.6 docs to 2.7 directory on 2.7 branch
  2. Update 2.7 docs on 2.7 branch, then create a pull request
  3. Merge into master, then publish the website

Update 2.7 docs

  1. Create the file layouts/_default/guides-2.7.html. Update it as needed.
  2. In each *.md file, update the layout: guides-2.6 line to layout: guides-2.7.
  3. Add shortcodes for 2.7.
  4. Update all references of 2.6 to {{< 2-7-scalatra_short_version >}}

scalatra-website's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scalatra-website's Issues

Update the CORS documentation to explicitly state behavior

We've run into problems with CORS after upgrading scalatra to any version newer than 2.5.0.

This bug was filed scalatra/scalatra#797 and eventually resolved with help of @takezoe.

I would like the CORS documentation page updated with:

  1. Mixing in CorsSupport is not required, the documentation makes it looks like it is required.
  2. Include this explanation into CORS documentation page:

In Scalatra 2.5.1, a security issue in CORSSupport has been fixed in scalatra/scalatra#635. As the result, the origin which is sent from a client must be declared in the init param org.scalatra.cors.allowedOrigins like:

context.initParameters("org.scalatra.cors.allowedOrigins") = "http://example.com:8080,http://foo.example.com"

The default of this init param is "*". In this case, you have to add following init param:

context.initParameters("org.scalatra.cors.allowCredentials") = "false"

DRY the heroku documentation

Basically, Heroku requires a standalone deployement+some extra features.
In the Heroku docs, there is some duplication of the standalone docs (e.g. the JettyLauncher).
ideally, all this standalone information should just be in the standalone docs.

For the heroku doc, my proposal is to make a reference to the standalone docs and then add just the heroku specific information. And this I plan to do in the 2.7 docs only

_site is not generated

When I start jekyll on ubuntu 12.10 the code is not generated. I do not get any error messages

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
Configuration from /home/ynh/Documents/Doc/scalatra-website/_config.yml
Auto-regenerating enabled: . -> ./_site
[2012-11-04 18:21:58] regeneration: 455 files changed
[2012-11-04 18:21:58] INFO  WEBrick 1.3.1
[2012-11-04 18:21:58] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
[2012-11-04 18:21:58] WARN  TCPServer Error: Address already in use - bind(2)
[2012-11-04 18:21:58] INFO  WEBrick::HTTPServer#start: pid=10509 port=9999

version 2.5

Should we create the 2.5 branch? or should we change the policy on branches?

Heroku guide - where to add the startScript seq?

The Heroku guide hadn't been updated for 2.2.x yet, so the instructions in the guide are somewhat confusing - they reference build.sbt, and don't correspond to the structure of a newly-generated Scalatra project.

I've updated the Heroku example application to use the 2.2.0 structure, and it builds alright. The one question I have is that the (old) docs say to put seq(com.typesafe.startscript.StartScriptPlugin.startScriptForClassesSettings: _*) into project/build.scala. If I put this line inside the build object, this setting is not detected by sbt, and the "stage" task doesn't work, causing Heroku deployment to fail.

I have been able to work around it for the moment by putting this seq by itself inside build.sbt - this way, it gets picked up and used, and everything works.

@casualjim or @rossabaker - is there a correct way that I can get this to work inside project/build.scala? Or should I change the docs to recommend putting this setting in built.sbt? This caught out somebody in the IRC channel today, so I'd like to get it fixed up.

issues with Github pages ?

Hi !

I am not able to reach the site since yesterday, I'm surprised that i don't see any one else complaining about it... Am I the only one experiencing this ?
image

Improve standalone deployment documentation

There are a number of things we could document better in the Standalone Deployment page.

  • merge strategies to avoid conflicts with about.html etc
  • set the 'mainClass in assembly' config to JettyLauncher
  • change the Jetty dependencies to "compile;container" from just "container"

This is mostly a reminder to myself to make this contribution, but I don't think the way I'm doing the first item on the list is the most sane way to do it, so if someone else wants to chime in with the best way to accomplish that, feel free :)

Scalatra 2.3.1 Swagger breaking change?

Hi guys,

When I attempt to use Scalatra 2.3.1+ with Swagger according to what's currently in the docs, I get the following error:

[info] Compiling 3 Scala sources to /Users/dave/workspace/foss/scalatra-website-examples/2.3/swagger-example/target/scala-2.11/classes...
[error] /Users/dave/workspace/foss/scalatra-website-examples/2.3/swagger-example/src/main/scala/org/scalatra/example/swagger/FlowersController.scala:14: class FlowersController needs to be abstract, since method render in trait JsonMethods of type (value: org.json4s.JValue)(implicit formats: org.json4s.Formats)scala.text.Document is not defined
[error] class FlowersController(implicit val swagger: Swagger) extends ScalatraServlet with NativeJsonSupport with SwaggerSupport  {
[error]       ^
[error] /Users/dave/workspace/foss/scalatra-website-examples/2.3/swagger-example/src/main/scala/org/scalatra/example/swagger/FlowersSwagger.scala:7: class ResourcesApp needs to be abstract, since method render in trait JsonMethods of type (value: org.json4s.JValue)(implicit formats: org.json4s.Formats)scala.text.Document is not defined
[error] class ResourcesApp(implicit val swagger: Swagger) extends ScalatraServlet with NativeSwaggerBase
[error]       ^
[error] two errors found

@rossabaker @casualjim @seratch any idea what fixes these? I'd like to document the fix, currently all our Swagger docs will fail for anyone who generates a project and tries to follow the docs.

Get 2.3 API docs up

@casualjim we've got the older API docs up, but haven't generated the 2.3 docs and put them on the server. I've linked them from the main nav, but currently this will 404 until the docs are there.

Reference to maven prototype

A user contributed a new Maven prototype. sbt is the direction most people will want to go, but this is a nice alternative that bears mentioning;

https://github.com/fancellu/scalatra-maven-prototype

Create 2.7 guides

I've been working with 2.7.0-RC1 making a demo project that demoes all the features of scalatra.
I'd like to start a branch for 2.7.0 in which I can update a couple of things.
What's the best way to do that?

Create 2.6 guides

We are working on creating Scalatra 2.6 guides on the scalatra-2.6 branch.
This issue shows progress of that work.

Outlook

  • Philosophy

Development

HTTP

  • Routes
  • Actions
  • Reverse Routes
  • Requests & Responses
  • GZip
  • Flash
  • Authentication
  • CORS

Async

  • Akka
  • Atmosphere

Views

  • Inline HTML
  • Scalate
  • Twirl

Resources

  • Drop this category

Formats

  • File Upload
  • JSON
  • Command (drop)
  • Forms #154

Persistence

  • Introduction
  • MongoDB
  • Riak
  • Slick
  • Squeryl

Internationalization

  • i18n (not exist)

Testing

  • ScalaTest
  • Specs2

API Design & Documentation

After Development

Monitoring

  • Logging
  • Metrics

Deployment

  • Configuration
  • Servlet container
  • Standalone
  • Heroku
  • CloudBees (drop)
  • Google App Engine

starting server fails (stack trace)

starting server fails with this error. I noticed in the _config, and in the most recent commit of Dec-16, that this webstie documentation seems old. Is this still the current scalatra.org?

ch-nb-1614:scalatra-website$ jekyll --server --auto
/Users/jbrown/.gem/ruby/2.3.1/gems/liquid-2.5.0/lib/liquid/htmltags.rb:43: warning: key "index0" is duplicated and overwritten on line 46
Configuration from /Users/jbrown/Documents/Repos/scalatra-website/_config.yml
/Users/jbrown/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require': cannot load such file -- sass/script/node (LoadError)
	from /Users/jbrown/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
	from /Users/jbrown/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
	from /Users/jbrown/.gem/ruby/2.3.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in `<top (required)>'
	from /Users/jbrown/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/jbrown/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/jbrown/.gem/ruby/2.3.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in `block in <top (required)>'
	from /Users/jbrown/.gem/ruby/2.3.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
	from /Users/jbrown/.gem/ruby/2.3.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `<top (required)>'
	from /Users/jbrown/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/jbrown/.rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/jbrown/.gem/ruby/2.3.1/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `<top (required)>'

Older documentation still shows container:start instead of jetty:start

I stumbled on some older documentation and it doesn't refer to the right command.

It seems g8 will always generate the latest template so the command needs to be updated for older versions as well.

A few more suggestions:

  • API Docs should always show all versions and not only older than the currently being viewed.
  • A banner could be shown to make it obvious that the reader is accessing an older version of the documentation

RC1 version of json4s causes compile error when following json guide

Currently the doc for handling json for 2.4 states to add the following dependencies:

  "org.scalatra" %% "scalatra-json" % "2.4.0.RC1",
  "org.json4s"   %% "json4s-jackson" % "3.3.0.RC1",

Doing so led to the following issue when following the rest of the tutorial though:

[error] /home/jjst/dev/turtlewar-scalatra/src/main/scala/com/github/jjst/turtlewar/FlowersController.scala:18: in class FlowersController, multiple overloaded alternatives of method parseOpt define default arguments.
[error] The members with defaults are defined in trait JsonMethods in package jackson and trait JsonMethods in package json4s.
[error] class FlowersController extends TurtlewarscalatraStack with JacksonJsonSupport {
[error]       ^
[error] one error found

Which I got fixed by using the stable versions instead:

  "org.scalatra" %% "scalatra-json" % "2.4.0",
  "org.json4s"   %% "json4s-jackson" % "3.3.0",

Wondering whether the version numbers from the doc should be bumped?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.