Created
April 22, 2015 10:15
-
-
Save josh-/4a5e0157628db3ece436 to your computer and use it in GitHub Desktop.
Grape issue code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './test' | |
run Test::API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'grape', '~> 0.10.1' | |
gem 'activesupport', '~> 4.2.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GEM | |
remote: https://rubygems.org/ | |
specs: | |
activesupport (4.2.1) | |
i18n (~> 0.7) | |
json (~> 1.7, >= 1.7.7) | |
minitest (~> 5.1) | |
thread_safe (~> 0.3, >= 0.3.4) | |
tzinfo (~> 1.1) | |
axiom-types (0.1.1) | |
descendants_tracker (~> 0.0.4) | |
ice_nine (~> 0.11.0) | |
thread_safe (~> 0.3, >= 0.3.1) | |
builder (3.2.2) | |
coercible (1.0.0) | |
descendants_tracker (~> 0.0.1) | |
descendants_tracker (0.0.4) | |
thread_safe (~> 0.3, >= 0.3.1) | |
equalizer (0.0.11) | |
grape (0.10.1) | |
activesupport | |
builder | |
hashie (>= 2.1.0) | |
multi_json (>= 1.3.2) | |
multi_xml (>= 0.5.2) | |
rack (>= 1.3.0) | |
rack-accept | |
rack-mount | |
virtus (>= 1.0.0) | |
hashie (3.4.1) | |
i18n (0.7.0) | |
ice_nine (0.11.1) | |
json (1.8.2) | |
minitest (5.6.0) | |
multi_json (1.11.0) | |
multi_xml (0.5.5) | |
rack (1.6.0) | |
rack-accept (0.4.5) | |
rack (>= 0.4) | |
rack-mount (0.8.3) | |
rack (>= 1.0.0) | |
thread_safe (0.3.5) | |
tzinfo (1.2.2) | |
thread_safe (~> 0.1) | |
virtus (1.0.5) | |
axiom-types (~> 0.1) | |
coercible (~> 1.0) | |
descendants_tracker (~> 0.0, >= 0.0.3) | |
equalizer (~> 0.0, >= 0.0.9) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
activesupport (~> 4.2.0) | |
grape (~> 0.10.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'grape' | |
module Test | |
class API < Grape::API | |
version 'v1', using: :header, vendor: 'josh' | |
format :json | |
prefix :api | |
resource :test do | |
desc "Test." | |
params do | |
requires :country, type: String, desc: "Country." | |
end | |
route_param :country do | |
get do | |
"Hello World!" | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment