kanpachi 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +6 -0
- data/kanpachi.gemspec +5 -5
- data/lib/kanpachi/cli.rb +9 -5
- data/lib/kanpachi/doc/middleman-ext/middleman-deploy.rb +22 -0
- data/lib/kanpachi/{documentation → doc/template}/config.rb +3 -3
- data/lib/kanpachi/{documentation → doc/template}/source/errors/index.html.slim +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/fonts/glyphicons-halflings-regular.svg +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/images/background.png +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/images/middleman.png +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/index.html.slim +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/javascripts/all.js +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/javascripts/bootstrap.js +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/javascripts/bootstrap.min.js +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/javascripts/html5shiv.js +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/javascripts/jquery-1.10.2.min.js +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/javascripts/respond.min.js +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/layouts/layout.slim +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/resource.html.slim +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/stylesheets/bootstrap-theme.css +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/stylesheets/bootstrap-theme.min.css +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/stylesheets/bootstrap.css +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/stylesheets/bootstrap.min.css +0 -0
- data/lib/kanpachi/{documentation → doc/template}/source/stylesheets/jumbotron.css +0 -0
- data/lib/kanpachi/response.rb +4 -0
- data/lib/kanpachi/version.rb +1 -1
- metadata +34 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b55c01d01b90779258c2e170be5a0125a1cbb55
|
4
|
+
data.tar.gz: 02a41a98655be74d77874f77a0f43fb970dc9d54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5483acf81a19d4f96fa179aee97539250a0054638442e2ddfe9397f642c6d77948e781ddb752521aeefe27dd05fcb825cbbc7f4dfc5b3d963a91fe0fa3d6f558
|
7
|
+
data.tar.gz: 246d9f2479ca917f92ae46d1dae90a0603b3a0f0e450d819c6781652255d3f0a2550b4c42152020fa995319272f4e9da772a015cc526cd6990a16521643525fd
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Kanpachi Changelog
|
2
2
|
|
3
|
+
## 0.0.4
|
4
|
+
* Add support for middleman-deploy extension, just add middleman-deploy to your
|
5
|
+
Gemfile and then activate it in your doc/config.rb
|
6
|
+
* Move documentation directory to doc and move doc template into doc/template
|
7
|
+
* Default render_nils to true in all roar representers
|
8
|
+
|
3
9
|
## 0.0.3
|
4
10
|
* Wrap documentation footer in a container class to pad copyright
|
5
11
|
* Switch response roar representer to decorator. Prefer decorating objects
|
data/kanpachi.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Kanpachi::VERSION
|
9
9
|
spec.authors = ["Jack Chu"]
|
10
10
|
spec.email = ["kamuigt@gmail.com"]
|
11
|
-
spec.
|
12
|
-
spec.
|
11
|
+
spec.summary = %q{DSL for describing Web APIs and generating documentation}
|
12
|
+
spec.description = %q{Kanpachi is a ruby gem that provides a DSL to describe your web API, generate documentation, and will even eventually help you implement it.}
|
13
13
|
spec.homepage = "https://github.com/kamui/kanpachi"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
@@ -22,12 +22,12 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'roar'
|
23
23
|
spec.add_dependency 'representable'
|
24
24
|
spec.add_dependency 'mutations'
|
25
|
-
spec.add_dependency 'virtus', '~> 1.0.
|
25
|
+
spec.add_dependency 'virtus', '~> 1.0.0'
|
26
26
|
spec.add_dependency 'coercible'
|
27
27
|
spec.add_dependency 'kramdown'
|
28
28
|
spec.add_dependency 'inflecto'
|
29
|
-
spec.add_dependency 'middleman', '~> 3.1.
|
30
|
-
spec.add_dependency 'slim', '~>
|
29
|
+
spec.add_dependency 'middleman', '~> 3.1.6'
|
30
|
+
spec.add_dependency 'slim', '~> 2.0.1'
|
31
31
|
|
32
32
|
# Live-reloading plugin
|
33
33
|
spec.add_dependency 'middleman-livereload', '~> 3.1.0'
|
data/lib/kanpachi/cli.rb
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
require 'thor'
|
2
|
-
require 'inflecto'
|
3
|
-
require 'json'
|
4
2
|
require 'middleman-core'
|
5
3
|
require 'middleman-core/cli'
|
6
4
|
require 'middleman-core/profiling'
|
7
|
-
|
8
|
-
|
5
|
+
require 'kanpachi'
|
6
|
+
require 'kanpachi/commands/new'
|
7
|
+
|
8
|
+
# doc template requires these gems
|
9
|
+
require 'inflecto'
|
10
|
+
require 'json'
|
9
11
|
|
10
|
-
ENV['MM_ROOT'] = File.join(File.expand_path(File.dirname(__FILE__)), '
|
12
|
+
ENV['MM_ROOT'] = File.join(File.expand_path(File.dirname(__FILE__)), 'doc', 'template')
|
11
13
|
|
12
14
|
class Middleman::Cli::Server
|
13
15
|
default_task :server
|
@@ -30,3 +32,5 @@ module Kanpachi
|
|
30
32
|
register ::Middleman::Cli::Build, 'build', task.usage, task.description, task.options
|
31
33
|
end
|
32
34
|
end
|
35
|
+
|
36
|
+
require 'kanpachi/doc/middleman-ext/middleman-deploy'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'middleman-core'
|
3
|
+
require 'middleman-core/cli'
|
4
|
+
require 'kanpachi'
|
5
|
+
|
6
|
+
begin
|
7
|
+
require 'middleman-deploy'
|
8
|
+
rescue LoadError
|
9
|
+
end
|
10
|
+
|
11
|
+
if defined? Middleman::Cli::Deploy
|
12
|
+
class Middleman::Cli::Deploy
|
13
|
+
default_task :deploy
|
14
|
+
end
|
15
|
+
|
16
|
+
module Kanpachi
|
17
|
+
class CLI < Thor
|
18
|
+
task = ::Middleman::Cli::Deploy.tasks['deploy']
|
19
|
+
register ::Middleman::Cli::Deploy, 'deploy', task.usage, task.description, task.options
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -65,12 +65,12 @@ set :js_dir, 'javascripts'
|
|
65
65
|
|
66
66
|
set :images_dir, 'images'
|
67
67
|
|
68
|
-
project_config_file = File.join(Dir.pwd, '
|
68
|
+
project_config_file = File.join(Dir.pwd, 'doc', 'config.rb')
|
69
69
|
if File.exist?(project_config_file)
|
70
70
|
self.instance_eval File.read(project_config_file)
|
71
|
-
puts 'Loaded
|
71
|
+
puts 'Loaded doc/config.rb'
|
72
72
|
else
|
73
|
-
puts 'No
|
73
|
+
puts 'No doc/config.rb file found'
|
74
74
|
|
75
75
|
# Reload the browser automatically whenever files change
|
76
76
|
activate :livereload
|
File without changes
|
data/lib/kanpachi/{documentation → doc/template}/source/fonts/glyphicons-halflings-regular.eot
RENAMED
File without changes
|
data/lib/kanpachi/{documentation → doc/template}/source/fonts/glyphicons-halflings-regular.svg
RENAMED
File without changes
|
data/lib/kanpachi/{documentation → doc/template}/source/fonts/glyphicons-halflings-regular.ttf
RENAMED
File without changes
|
data/lib/kanpachi/{documentation → doc/template}/source/fonts/glyphicons-halflings-regular.woff
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/kanpachi/response.rb
CHANGED
@@ -23,6 +23,10 @@ module Kanpachi
|
|
23
23
|
include Roar::Representer::JSON
|
24
24
|
include Roar::Decorator::HypermediaConsumer
|
25
25
|
|
26
|
+
def self.property(name, options={})
|
27
|
+
super(name, options.merge!(render_nil: true))
|
28
|
+
end
|
29
|
+
|
26
30
|
def self.example
|
27
31
|
example = Hash.new
|
28
32
|
self.properties.each do |key, value|
|
data/lib/kanpachi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kanpachi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Chu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.0.
|
75
|
+
version: 1.0.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.0.
|
82
|
+
version: 1.0.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: coercible
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,28 +128,28 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 3.1.
|
131
|
+
version: 3.1.6
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 3.1.
|
138
|
+
version: 3.1.6
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: slim
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 2.0.1
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 2.0.1
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: middleman-livereload
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,7 +234,8 @@ dependencies:
|
|
234
234
|
- - ">="
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
|
-
description:
|
237
|
+
description: Kanpachi is a ruby gem that provides a DSL to describe your web API,
|
238
|
+
generate documentation, and will even eventually help you implement it.
|
238
239
|
email:
|
239
240
|
- kamuigt@gmail.com
|
240
241
|
executables:
|
@@ -259,28 +260,29 @@ files:
|
|
259
260
|
- lib/kanpachi/api_list.rb
|
260
261
|
- lib/kanpachi/cli.rb
|
261
262
|
- lib/kanpachi/commands/new.rb
|
262
|
-
- lib/kanpachi/
|
263
|
-
- lib/kanpachi/
|
264
|
-
- lib/kanpachi/
|
265
|
-
- lib/kanpachi/
|
266
|
-
- lib/kanpachi/
|
267
|
-
- lib/kanpachi/
|
268
|
-
- lib/kanpachi/
|
269
|
-
- lib/kanpachi/
|
270
|
-
- lib/kanpachi/
|
271
|
-
- lib/kanpachi/
|
272
|
-
- lib/kanpachi/
|
273
|
-
- lib/kanpachi/
|
274
|
-
- lib/kanpachi/
|
275
|
-
- lib/kanpachi/
|
276
|
-
- lib/kanpachi/
|
277
|
-
- lib/kanpachi/
|
278
|
-
- lib/kanpachi/
|
279
|
-
- lib/kanpachi/
|
280
|
-
- lib/kanpachi/
|
281
|
-
- lib/kanpachi/
|
282
|
-
- lib/kanpachi/
|
283
|
-
- lib/kanpachi/
|
263
|
+
- lib/kanpachi/doc/middleman-ext/middleman-deploy.rb
|
264
|
+
- lib/kanpachi/doc/template/config.rb
|
265
|
+
- lib/kanpachi/doc/template/source/errors/index.html.slim
|
266
|
+
- lib/kanpachi/doc/template/source/fonts/glyphicons-halflings-regular.eot
|
267
|
+
- lib/kanpachi/doc/template/source/fonts/glyphicons-halflings-regular.svg
|
268
|
+
- lib/kanpachi/doc/template/source/fonts/glyphicons-halflings-regular.ttf
|
269
|
+
- lib/kanpachi/doc/template/source/fonts/glyphicons-halflings-regular.woff
|
270
|
+
- lib/kanpachi/doc/template/source/images/background.png
|
271
|
+
- lib/kanpachi/doc/template/source/images/middleman.png
|
272
|
+
- lib/kanpachi/doc/template/source/index.html.slim
|
273
|
+
- lib/kanpachi/doc/template/source/javascripts/all.js
|
274
|
+
- lib/kanpachi/doc/template/source/javascripts/bootstrap.js
|
275
|
+
- lib/kanpachi/doc/template/source/javascripts/bootstrap.min.js
|
276
|
+
- lib/kanpachi/doc/template/source/javascripts/html5shiv.js
|
277
|
+
- lib/kanpachi/doc/template/source/javascripts/jquery-1.10.2.min.js
|
278
|
+
- lib/kanpachi/doc/template/source/javascripts/respond.min.js
|
279
|
+
- lib/kanpachi/doc/template/source/layouts/layout.slim
|
280
|
+
- lib/kanpachi/doc/template/source/resource.html.slim
|
281
|
+
- lib/kanpachi/doc/template/source/stylesheets/bootstrap-theme.css
|
282
|
+
- lib/kanpachi/doc/template/source/stylesheets/bootstrap-theme.min.css
|
283
|
+
- lib/kanpachi/doc/template/source/stylesheets/bootstrap.css
|
284
|
+
- lib/kanpachi/doc/template/source/stylesheets/bootstrap.min.css
|
285
|
+
- lib/kanpachi/doc/template/source/stylesheets/jumbotron.css
|
284
286
|
- lib/kanpachi/dsl.rb
|
285
287
|
- lib/kanpachi/dsl/api.rb
|
286
288
|
- lib/kanpachi/dsl/error.rb
|
@@ -347,7 +349,7 @@ rubyforge_project:
|
|
347
349
|
rubygems_version: 2.1.7
|
348
350
|
signing_key:
|
349
351
|
specification_version: 4
|
350
|
-
summary: DSL for describing Web APIs
|
352
|
+
summary: DSL for describing Web APIs and generating documentation
|
351
353
|
test_files:
|
352
354
|
- spec/api_list_spec.rb
|
353
355
|
- spec/api_spec.rb
|