Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Modularize
Browse files Browse the repository at this point in the history
  • Loading branch information
eparreno committed Aug 7, 2012
1 parent c782423 commit 6e32d5d
Show file tree
Hide file tree
Showing 36 changed files with 4,320 additions and 179 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
/coverage
/pkg
/rdoc
/doc
/vendor
!/doc
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ PATH
remote: .
specs:
apiaryio (0.0.1)
rack (~> 1.4.1)
rest-client (~> 1.6.7)

GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.1.3)
mime-types (1.19)
rack (1.4.1)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.11.0)
Expand All @@ -19,10 +21,12 @@ GEM
rspec-expectations (2.11.2)
diff-lcs (~> 1.1.3)
rspec-mocks (2.11.1)
yard (0.8.2.1)

PLATFORMS
ruby

DEPENDENCIES
apiaryio!
rspec (~> 2.11.0)
yard (~> 0.8.2.1)
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,34 @@ Apiary.io CLI
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

## Requirements

Ruby 1.9.x

## Description

Apiary provides a way to see your API documentation on your local
machine
Apiaryio gem provides a way to display your API documentation on your local
machine, either using static files or using a standalone web server

## Usage

$ apiary help

Apiary comamnd line interface

Usage: apiary command [options]
Try 'apiary help' for more information.

Currently available apiary commands are:

preview Show API documentation in default browser
preview --browser [chrome|safari|firefox] Show API documentation in specified browser
preview --path [PATH] Specify path to blueprint file
preview --api_host [HOST] Specify apiary host
preview --server Start standalone web server on port 8080
preview --server --port [PORT] Start standalone web server on specified port

help Show help

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
version Show version

## Copyright

Expand Down
17 changes: 17 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
# encoding: utf-8
require "rubygems"
require "rspec/core/rake_task"
require 'yard'

desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |t|
t.verbose = true
end

desc 'Default: Run all specs.'
task :default => :spec

task :doc => :yard
task :gem => :gemspec

def gemspec
@gemspec ||= eval(File.read('apiary.gemspec'), binding, '.gemspec')
end

YARD::Rake::YardocTask.new

desc "Validate the gemspec"
task :gemspec do
gemspec.validate
end
2 changes: 2 additions & 0 deletions apiary.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ Gem::Specification.new do |gem|
gem.version = Apiary::VERSION

gem.add_dependency "rest-client", "~> 1.6.7"
gem.add_dependency "rack", "~> 1.4.1"

gem.add_development_dependency "rspec", "~> 2.11.0"
gem.add_development_dependency "yard", "~> 0.8.2.1"

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
10 changes: 4 additions & 6 deletions bin/apiary
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env ruby
# encoding: UTF-8
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..','lib')))
require 'apiary'

lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
require File.dirname(__FILE__) + '/../lib/apiary'

Apiary::CLI.run(ARGV.dup)
trap(:INT) { abort "" }
Apiary::CLI.new(ARGV)
124 changes: 124 additions & 0 deletions doc/Apiary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Module: Apiary

&mdash; Documentation by YARD 0.7.5

</title>

<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
relpath = '';
if (relpath != '') relpath += '/';
</script>

<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

<script type="text/javascript" charset="utf-8" src="js/app.js"></script>


</head>
<body>
<script type="text/javascript" charset="utf-8">
if (window.top.frames.main) document.body.className = 'frames';
</script>

<div id="header">
<div id="menu">

<a href="_index.html">Index (A)</a> &raquo;


<span class="title">Apiary</span>


<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

<div id="search">

<a id="class_list_link" href="#">Class List</a>

<a id="method_list_link" href="#">Method List</a>

<a id="file_list_link" href="#">File List</a>

</div>
<div class="clear"></div>
</div>

<iframe id="search_frame"></iframe>

<div id="content"><h1>Module: Apiary



</h1>

<dl class="box">








<dt class="r1 last">Defined in:</dt>
<dd class="r1 last">lib/apiary.rb<span class="defines">,<br />
lib/apiary/cli.rb,<br /> lib/apiary/version.rb,<br /> lib/apiary/command/help.rb,<br /> lib/apiary/command/runner.rb,<br /> lib/apiary/command/version.rb,<br /> lib/apiary/command/preview.rb</span>
</dd>

</dl>
<div class="clear"></div>

<h2>Defined Under Namespace</h2>
<p class="children">


<strong class="modules">Modules:</strong> <span class='object_link'><a href="Apiary/Command.html" title="Apiary::Command (module)">Command</a></span>



<strong class="classes">Classes:</strong> <span class='object_link'><a href="Apiary/CLI.html" title="Apiary::CLI (class)">CLI</a></span>


</p>

<h2>Constant Summary</h2>

<dl class="constants">

<dt id="VERSION-constant" class="">VERSION =

</dt>
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>

</dl>










</div>

<div id="footer">
Generated on Tue Aug 7 16:19:54 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.5 (ruby-1.9.2).
</div>

</body>
</html>
Loading

0 comments on commit 6e32d5d

Please sign in to comment.