sampler
Sampler Rails application to show RSpec, Bundler, search using Google & Yahoo, and more
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Repository
Sampler Rails application to show RSpec, Bundler, search using Google & Yahoo, and more
Basic Info
- Host: GitHub
- Owner: joelparkerhenderson
- Language: Ruby
- Default Branch: master
- Size: 54.7 KB
Statistics
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Sampler application
The goal of this application is to show Rails functionality.
The challenege: create a RESTful API that consists of one or more resources. The API should allow the consumer to retrieve aggregated data from 2 or 3 sources. See sample below. Here are some of the requirements.
Show your knowledge of how to design RESTful resources.
The API should support at least GET requests.
The API takes requests for data, then delegates those requests to more than one public APIs (see samples below), once the responses are received, the data from multiple sources should be aggregated and sent back to the consumer.
One of the delegations should be asynchronous and use a message queue.
Persist some request tracking information using ActiveRecord; in-memory database is fine. Add your own creative twists.
Show your experience in packaging a full ready-to-run project.
Required: add unit and integrations tests using rspec
Required technologies: Ruby on Rails, Bundler and Rspec
Optional: add some authentication of your choice
Deliver a Rails project--via Github--that runs correctly after an initial "git clone
Implementation
This is a quick implementation designed to show Rails functionality.
Show the user (or REST agent) a homepage with search box.
When the user (or REST agent) submits a search, show some results from Google and Yahoo.
The results are in typical HTML, suitable for REST to follow.
Run It
To run this app using the local webrick server:
rails s
To run the AMQP asynchronous message queue:
cd script/amqp
bundle exec ./amqp-weather-server.rb
To load the home page in any browser:
http://0.0.0.0:3000
Discussion
Tradeoffs:
This app uses simple HTML APIs that are web requests akin to what a browser would request.
Future development could use similar JSON APIs, and reconstruct the HTML links.
REST:
For REST, I use the Fielding paper.
I agree with Fielding's position that REST APIs must be hypertext driven: http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
For this sample app, HTML is the closest to REST for a quick implementation.
If the goal is to use pre-determined JSON RPC endpoints, such as the Google Search API, I would tend to describe the app design as using JSON RPC (rather than as using REST). This is a valuable distinction because a true REST app is significantly more powerful than JSON RPC, tends to be more challenging to develop, and needs more follow-testing.
Owner
- Name: Joel Parker Henderson
- Login: joelparkerhenderson
- Kind: user
- Location: California
- Website: http://www.joelparkerhenderson.com
- Repositories: 319
- Profile: https://github.com/joelparkerhenderson
Software developer. Technology consultant. Creator of GitAlias.com, NumCommand.com, SixArm.com, and many open source projects.
Citation (CITATION.cff)
cff-version: 1.2.0
title: Sampler application
message: >-
If you use this work and you want to cite it,
then you can use the metadata from this file.
type: software
authors:
- given-names: Joel Parker
family-names: Henderson
email: joel@joelparkerhenderson.com
affiliation: joelparkerhenderson.com
orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
- type: url
value: 'https://github.com/joelparkerhenderson/sampler/'
description: Sampler application
repository-code: 'https://github.com/joelparkerhenderson/sampler/'
abstract: >-
Sampler application
license: See license file
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Joel Parker Henderson | j****l@j****m | 28 |
Committer Domains (Top 20 + Academic)
Dependencies
- capybara >= 0 development
- coffee-rails ~> 3.2.1 development
- factory_girl >= 0 development
- factory_girl_rails >= 0 development
- rspec-rails >= 0 development
- sass-rails ~> 3.2.3 development
- uglifier ~> 1.2.3 development
- amqp >= 0
- em-http-request >= 0
- eventmachine >= 0
- httparty >= 0
- jquery-rails >= 0
- rails = 3.2.8
- sqlite3 >= 0
- actionmailer 3.2.8
- actionpack 3.2.8
- activemodel 3.2.8
- activerecord 3.2.8
- activeresource 3.2.8
- activesupport 3.2.8
- addressable 2.3.2
- amq-client 0.9.4
- amq-protocol 0.9.5
- amqp 0.9.7
- arel 3.0.2
- builder 3.0.3
- capybara 1.1.2
- childprocess 0.3.5
- coffee-rails 3.2.2
- coffee-script 2.2.0
- coffee-script-source 1.3.3
- cookiejar 0.3.0
- diff-lcs 1.1.3
- em-http-request 1.0.3
- em-socksify 0.2.1
- erubis 2.7.0
- eventmachine 1.0.0
- execjs 1.4.0
- factory_girl 4.1.0
- factory_girl_rails 4.1.0
- ffi 1.1.5
- hike 1.2.1
- http_parser.rb 0.5.3
- httparty 0.9.0
- i18n 0.6.1
- journey 1.0.4
- jquery-rails 2.1.2
- json 1.7.5
- libwebsocket 0.1.5
- mail 2.4.4
- mime-types 1.19
- multi_json 1.3.6
- multi_xml 0.5.1
- nokogiri 1.5.5
- polyglot 0.3.3
- rack 1.4.1
- rack-cache 1.2
- rack-ssl 1.3.2
- rack-test 0.6.1
- rails 3.2.8
- railties 3.2.8
- rake 0.9.2.2
- rdoc 3.12
- rspec 2.11.0
- rspec-core 2.11.1
- rspec-expectations 2.11.3
- rspec-mocks 2.11.3
- rspec-rails 2.11.0
- rubyzip 0.9.9
- sass 3.2.1
- sass-rails 3.2.5
- selenium-webdriver 2.25.0
- sprockets 2.1.3
- sqlite3 1.3.6
- thor 0.16.0
- tilt 1.3.3
- treetop 1.4.10
- tzinfo 0.3.33
- uglifier 1.2.7
- xpath 0.1.4