Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rewinfrey/javarubytttinterface
A web interface written in jRuby using my Java Web Server to serve my Ruby TTT library.
https://github.com/rewinfrey/javarubytttinterface
Last synced: about 1 month ago
JSON representation
A web interface written in jRuby using my Java Web Server to serve my Ruby TTT library.
- Host: GitHub
- URL: https://github.com/rewinfrey/javarubytttinterface
- Owner: rewinfrey
- Created: 2013-02-25T16:13:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-02-25T21:45:38.000Z (over 11 years ago)
- Last Synced: 2024-04-15T14:01:25.911Z (7 months ago)
- Language: Ruby
- Size: 1.91 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TTT Web Interface
### About ###
This is a jRuby project using my [Java Web Server](https://github.com/rewinfrey/JavaWebServer) to serve my [Ruby TTT library](https://github.com/rewinfrey/ruby-ttt).
The server is included as a jar, the ruby library is included as a gem.
### Installation
You must have an installation of [jRuby](http://jruby.org/) with a jRuby binary located in usr/bin/ for the provided binary to work.
The version of jRuby used to develop this interface is jRuby-1.7.2. It is not tested on earlier versions of jRuby.
#### Biggest Hurdle
I wanted to learn about [Riak](http://basho.com/riak/), so I'm using Riak as the persistence layer for this library. If you want to use this interface, you'll need to install Riak.
If you're not interested in installing Riak from source && you are on OSX && you have [homebrew](http://mxcl.github.com/homebrew/), you can easily install Riak with the following:
`$ brew install riak`
Otherwise, please follow the Riak official installation [instructions](http://docs.basho.com/riak/latest/tutorials/installation/) for your OS.
After the Riak installation is complete, please ensure that your Riak instance is working:
`$ riak-admin ring-status`
You want to verify that your output says "All nodes are up and reachable":
================================== Claimant ===================================
Claimant: '[email protected]'
Status: up
Ring Ready: true============================== Ownership Handoff ==============================
No pending changes.============================== Unreachable Nodes ==============================
All nodes are up and reachableAnd also verify it is bound to the default Riak port (8091):
$ curl -Is http://localhost:8091 > tmp; \
ruby -e 'File.open("tmp") { |f| \
if f.gets =~ (/200/i) then puts "We are in business" \
else puts "Are you sure you got Riak installed?" end }'; \
rm tmpIf you see "We are in business", then so far so good. Otherwise, there is a problem with the Riak installation.
#### Post Riak
Clone the repo:
`$ git clone [email protected]:rewinfrey/JavaRubyTTTInterface.git`
And bundle:
`$ cd JavaRubyTTTInterface`
`$ jruby -S bundle install`
### Usage
There is a binary provided that will start the server. You must provide the port you want the server to bind to.
`$ cd JavaRubyTTTInterface`
`$ bin/server -p 3010`
Or if more verbose is your thing:
`$ bin/server --port 3010`
You should now be able to point your browser to local host at the port you started the server on, and play Tic Tac Toe!
### License
Copyright (c) 2013 Rick Winfrey
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.