diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..33b63ac --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.bundle +.rvmrc +.tags +.rbenv-version +/coverage +/pkg +/rdoc +/doc +/vendor diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..53607ea --- /dev/null +++ b/.rspec @@ -0,0 +1 @@ +--colour diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..7b71ef6 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +# Specify your gem's dependencies in apiary.gemspec +gemspec diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..1d14050 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,28 @@ +PATH + remote: . + specs: + apiaryio (0.0.1) + rest-client (~> 1.6.7) + +GEM + remote: https://rubygems.org/ + specs: + diff-lcs (1.1.3) + mime-types (1.19) + rest-client (1.6.7) + mime-types (>= 1.16) + rspec (2.11.0) + rspec-core (~> 2.11.0) + rspec-expectations (~> 2.11.0) + rspec-mocks (~> 2.11.0) + rspec-core (2.11.1) + rspec-expectations (2.11.2) + diff-lcs (~> 1.1.3) + rspec-mocks (2.11.1) + +PLATFORMS + ruby + +DEPENDENCIES + apiaryio! + rspec (~> 2.11.0) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e3a3647 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012 Emili Parreno + +MIT License + +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. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..0daf969 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +apiary +============= + +Apiary.io CLI + +## Disclaimer + +This gem is not the official Apiary gem and is under development. You can find the +official gem from Apiary at https://rubygems.org/gems/apiaryio + +## Description + +Apiary provides a way to see your API documentation on your local +machine + +## Usage + + $ apiary help + + Apiary comamnd line interface + + Usage: apiary command [options] + + apiary preview + apiary preview [my_apib_file.apib] --api_host=api.apiary.io + apiary preview [my_apib_file.apib] --browser=chrome + apiary preview [my_apib_file.apib] --server + apiary preview [my_apib_file.apib] --server --port=8010 + +## Copyright + +Copyright 2012 (c) Emili ParreƱo + +## License + +Released under MIT license. See LICENSE file for further details. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..13d433e --- /dev/null +++ b/Rakefile @@ -0,0 +1,9 @@ +require "rubygems" +require "rspec/core/rake_task" + +desc "Run all specs" +RSpec::Core::RakeTask.new(:spec) do |t| + t.verbose = true +end + +task :default => :spec diff --git a/apiary.gemspec b/apiary.gemspec new file mode 100644 index 0000000..2cbdfaf --- /dev/null +++ b/apiary.gemspec @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +require File.expand_path('../lib/apiary/version', __FILE__) + +Gem::Specification.new do |gem| + gem.authors = ["Emili Parreno"] + gem.email = ["emili@eparreno.com"] + gem.description = %q{Apiary.io CLI} + gem.summary = %q{Apiary.io CLI} + gem.homepage = "http://apiary.io" + gem.license = "MIT" + + gem.files = `git ls-files`.split($\) + gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } + gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) + gem.name = "apiaryio" + gem.require_paths = ["lib"] + gem.version = Apiary::VERSION + + gem.add_dependency "rest-client", "~> 1.6.7" + + gem.add_development_dependency "rspec", "~> 2.11.0" + + gem.post_install_message = "This gem is a client for http://apiary.io. Apiary is in closed beta version now, you need an invitation. If you don't have one, visit http://apiary.us2.list-manage.com/subscribe?u=b89934a238dcec9533f4a834a&id=08f2bdde55 to get on the waiting list!" +end diff --git a/bin/apiary b/bin/apiary new file mode 100644 index 0000000..e69de29 diff --git a/lib/apiary.rb b/lib/apiary.rb new file mode 100644 index 0000000..0a65706 --- /dev/null +++ b/lib/apiary.rb @@ -0,0 +1,5 @@ +require "apiary/version" + +module Apiary + # Your code goes here... +end diff --git a/lib/apiary/version.rb b/lib/apiary/version.rb new file mode 100644 index 0000000..a786f37 --- /dev/null +++ b/lib/apiary/version.rb @@ -0,0 +1,3 @@ +module Apiary + VERSION = "0.0.1" +end diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb new file mode 100644 index 0000000..e6fdcba --- /dev/null +++ b/spec/cli_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +describe "Apiary" do + + it 'pass the test' do + true.should be_true + end + +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..9779454 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'rspec'