apipie-rails 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +8 -10
- data/app/controllers/apipie/apipies_controller.rb +12 -4
- data/app/views/apipie/apipies/_disqus.html.erb +11 -0
- data/app/views/apipie/apipies/apipie_404.html.erb +12 -0
- data/app/views/apipie/apipies/method.html.erb +1 -1
- data/app/views/apipie/apipies/resource.html.erb +1 -1
- data/app/views/layouts/apipie/apipie.html.erb +4 -15
- data/lib/apipie-rails.rb +1 -0
- data/lib/apipie/apipie_module.rb +10 -2
- data/lib/apipie/client/base.rb +131 -0
- data/lib/apipie/client/{template/cli_command.rb.tt → cli_command.rb} +21 -22
- data/lib/apipie/client/generator.rb +33 -30
- data/lib/apipie/client/{template/bin.rb.tt → main.rb} +13 -30
- data/lib/apipie/client/{template/rest_client_oauth.rb.tt → rest_client_oauth.rb} +1 -11
- data/lib/apipie/client/template/{client.gemspec.tt → a_name.gemspec.tt} +1 -0
- data/lib/apipie/client/template/bin/bin.rb.tt +30 -0
- data/lib/apipie/client/template/lib/a_name.rb.tt +27 -0
- data/lib/apipie/client/template/{cli.rb.tt → lib/a_name/commands/cli.rb.tt} +5 -8
- data/lib/apipie/client/template/lib/a_name/config.yml +6 -0
- data/lib/apipie/client/template/lib/a_name/resources/resource.rb.tt +22 -0
- data/lib/apipie/client/template/{version.rb.tt → lib/a_name/version.rb.tt} +0 -0
- data/lib/apipie/client/thor.rb +19 -0
- data/lib/apipie/dsl_definition.rb +3 -3
- data/lib/apipie/errors.rb +38 -0
- data/lib/apipie/helpers.rb +17 -0
- data/lib/apipie/param_description.rb +19 -10
- data/lib/apipie/resource_description.rb +2 -2
- data/lib/apipie/validator.rb +13 -33
- data/lib/apipie/version.rb +1 -1
- data/lib/tasks/apipie.rake +5 -0
- data/rubygem-apipie-rails.spec +80 -41
- data/spec/controllers/users_controller_spec.rb +20 -17
- data/spec/dummy/app/controllers/users_controller.rb +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -7
- data/spec/dummy/config/initializers/apipie.rb +15 -0
- data/spec/lib/param_description_spec.rb +0 -0
- data/spec/lib/parameter_description_spec.rb +41 -0
- metadata +50 -40
- data/lib/apipie/client/template/base.rb.tt +0 -55
- data/lib/apipie/client/template/client.rb.tt +0 -13
- data/lib/apipie/client/template/resource.rb.tt +0 -19
data/lib/apipie/version.rb
CHANGED
data/lib/tasks/apipie.rake
CHANGED
@@ -40,10 +40,15 @@ namespace :apipie do
|
|
40
40
|
task :cache => :environment do
|
41
41
|
with_loaded_documentation do
|
42
42
|
cache_dir = Apipie.configuration.cache_dir
|
43
|
+
subdir = Apipie.configuration.doc_base_url.sub(/\A\//,"")
|
44
|
+
|
43
45
|
file_base = File.join(cache_dir, Apipie.configuration.doc_base_url)
|
46
|
+
Apipie.url_prefix = "./#{subdir}"
|
44
47
|
doc = Apipie.to_json
|
45
48
|
generate_index_page(file_base, doc, true)
|
49
|
+
Apipie.url_prefix = "../#{subdir}"
|
46
50
|
generate_resource_pages(file_base, doc, true)
|
51
|
+
Apipie.url_prefix = "../../#{subdir}"
|
47
52
|
generate_method_pages(file_base, doc, true)
|
48
53
|
end
|
49
54
|
end
|
data/rubygem-apipie-rails.spec
CHANGED
@@ -1,73 +1,112 @@
|
|
1
|
-
%global
|
1
|
+
%global gem_name apipie-rails
|
2
2
|
|
3
|
-
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
4
|
-
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
5
3
|
%if 0%{?rhel} == 6 || 0%{?fedora} < 17
|
6
4
|
%define rubyabi 1.8
|
7
5
|
%else
|
8
|
-
%define rubyabi 1.9
|
6
|
+
%define rubyabi 1.9.1
|
7
|
+
%endif
|
8
|
+
%if 0%{?rhel} == 6
|
9
|
+
%global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
10
|
+
%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
|
11
|
+
%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
|
12
|
+
%global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
|
13
|
+
%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
|
14
|
+
%global gem_libdir %{gem_dir}/gems/%{gem_name}-%{version}/lib
|
9
15
|
%endif
|
10
16
|
|
11
|
-
Summary: Rails API documentation tool and client generator
|
12
|
-
Name: rubygem-%{
|
13
|
-
Version: 0.0.
|
14
|
-
Release:
|
17
|
+
Summary: Rails API documentation tool and client generator
|
18
|
+
Name: rubygem-%{gem_name}
|
19
|
+
Version: 0.0.11
|
20
|
+
Release: 3%{?dist}
|
15
21
|
Group: Development/Libraries
|
16
22
|
License: MIT
|
17
23
|
URL: http://github.com/Pajk/apipie-rails
|
18
|
-
Source0: http://rubygems.org/downloads/%{
|
24
|
+
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
|
19
25
|
Requires: ruby(abi) >= %{rubyabi}
|
20
26
|
Requires: rubygems
|
27
|
+
%if 0%{?fedora}
|
28
|
+
BuildRequires: rubygems-devel
|
29
|
+
%endif
|
21
30
|
BuildRequires: ruby(abi) >= %{rubyabi}
|
22
31
|
BuildRequires: rubygems
|
23
32
|
BuildArch: noarch
|
24
|
-
Provides: rubygem(%{
|
33
|
+
Provides: rubygem(%{gem_name}) = %{version}
|
25
34
|
|
26
35
|
%description
|
27
36
|
This gem adds new methods to Rails controllers that can be used to describe
|
28
|
-
resources exposed by API.
|
37
|
+
resources exposed by API. Information entered with provided DSL are used
|
29
38
|
to generate documentation, client or to validate incoming requests.
|
30
39
|
|
40
|
+
%package doc
|
41
|
+
BuildArch: noarch
|
42
|
+
Requires: %{name} = %{version}-%{release}
|
43
|
+
Summary: Documentation for rubygem-%{gem_name}
|
44
|
+
|
45
|
+
%description doc
|
46
|
+
This package contains documentation for rubygem-%{gem_name}.
|
47
|
+
|
31
48
|
%prep
|
32
49
|
%setup -q -c -T
|
33
|
-
mkdir -p .%{
|
34
|
-
gem install --local --install-dir .%{
|
35
|
-
--force %{SOURCE0}
|
50
|
+
mkdir -p .%{gem_dir}
|
51
|
+
gem install --local --install-dir .%{gem_dir} \
|
52
|
+
--force %{SOURCE0} --no-rdoc --no-ri
|
36
53
|
|
37
54
|
%build
|
38
55
|
|
39
56
|
%install
|
40
|
-
mkdir -p %{buildroot}%{
|
41
|
-
cp -a .%{
|
42
|
-
%{buildroot}%{
|
43
|
-
|
57
|
+
mkdir -p %{buildroot}%{gem_dir}
|
58
|
+
cp -a .%{gem_dir}/* \
|
59
|
+
%{buildroot}%{gem_dir}/
|
44
60
|
|
45
61
|
%files
|
46
|
-
%{
|
47
|
-
%{
|
48
|
-
%{
|
49
|
-
%{
|
50
|
-
%{
|
51
|
-
%{
|
52
|
-
%{
|
53
|
-
|
54
|
-
|
55
|
-
%exclude %{
|
56
|
-
%exclude %{
|
57
|
-
%exclude %{
|
58
|
-
%exclude %{
|
59
|
-
%exclude %{
|
60
|
-
%exclude %{
|
61
|
-
%exclude %{
|
62
|
-
%exclude %{
|
63
|
-
|
64
|
-
|
65
|
-
%doc %{
|
66
|
-
%doc %{
|
67
|
-
%doc %{
|
68
|
-
%
|
62
|
+
%dir %{gem_instdir}
|
63
|
+
%{gem_instdir}/app
|
64
|
+
%{gem_instdir}/lib
|
65
|
+
%exclude %{gem_instdir}/Gemfile.lock
|
66
|
+
%exclude %{gem_cache}
|
67
|
+
%{gem_spec}
|
68
|
+
%doc %{gem_instdir}/MIT-LICENSE
|
69
|
+
%doc %{gem_instdir}/APACHE-LICENSE-2.0
|
70
|
+
|
71
|
+
%exclude %{gem_instdir}/spec
|
72
|
+
%exclude %{gem_instdir}/rel-eng
|
73
|
+
%exclude %{gem_instdir}/.gitignore
|
74
|
+
%exclude %{gem_instdir}/.rspec
|
75
|
+
%exclude %{gem_instdir}/.rvmrc
|
76
|
+
%exclude %{gem_instdir}/.travis.yml
|
77
|
+
%exclude %{gem_instdir}/rubygem-apipie-rails.spec
|
78
|
+
%exclude %{gem_dir}/cache/%{gem_name}-%{version}.gem
|
79
|
+
|
80
|
+
%files doc
|
81
|
+
%doc %{gem_instdir}/MIT-LICENSE
|
82
|
+
%doc %{gem_instdir}/README.rdoc
|
83
|
+
%doc %{gem_instdir}/NOTICE
|
84
|
+
%{gem_instdir}/Rakefile
|
85
|
+
%{gem_instdir}/Gemfile
|
86
|
+
%{gem_instdir}/%{gem_name}.gemspec
|
69
87
|
|
70
88
|
%changelog
|
89
|
+
* Fri Sep 07 2012 Miroslav Suchý <msuchy@redhat.com> 0.0.11-3
|
90
|
+
- summary should not end with dot (msuchy@redhat.com)
|
91
|
+
- fix spelling (msuchy@redhat.com)
|
92
|
+
- do not package Gemfile.lock (msuchy@redhat.com)
|
93
|
+
|
94
|
+
* Fri Aug 17 2012 Ivan Necas <inecas@redhat.com> 0.0.11-2
|
95
|
+
- fix building for F17 reusing the macros from rubygem- devel
|
96
|
+
|
97
|
+
* Wed Aug 15 2012 Pavel Pokorný <pajkycz@gmail.com> 0.0.11-1
|
98
|
+
- apipie-rails v0.0.11
|
99
|
+
- cli client improvements
|
100
|
+
|
101
|
+
* Tue Jul 31 2012 Pavel Pokorný <pajkycz@gmail.com> 0.0.9-2
|
102
|
+
- exclude documentation from rpm
|
103
|
+
|
104
|
+
* Tue Jul 31 2012 Pavel Pokorný <pajkycz@gmail.com> 0.0.9-1
|
105
|
+
- New version of apipie-rails gem (pajkycz@gmail.com)
|
106
|
+
- fixed client generator
|
107
|
+
- resource level error descriptions
|
108
|
+
- response supported formats
|
109
|
+
|
71
110
|
* Thu Jul 26 2012 Pavel Pokorný <pajkycz@gmail.com> 0.0.8-3
|
72
111
|
- Require rubygems in spec file
|
73
112
|
|
@@ -85,15 +85,15 @@ describe UsersController do
|
|
85
85
|
end
|
86
86
|
|
87
87
|
it "should fail if required parameter is missing" do
|
88
|
-
lambda { get :show, :id => 5 }.should raise_error(
|
88
|
+
lambda { get :show, :id => 5 }.should raise_error(Apipie::ParamMissing, /\bsession\b/)
|
89
89
|
end
|
90
90
|
|
91
|
-
it "should work with Type validator" do
|
91
|
+
it "should work with custom Type validator" do
|
92
92
|
lambda {
|
93
93
|
get :show,
|
94
94
|
:id => "not a number",
|
95
95
|
:session => "secret_hash"
|
96
|
-
}.should raise_error(
|
96
|
+
}.should raise_error(Apipie::ParamError, /id/) # old-style error rather than ParamInvalid
|
97
97
|
end
|
98
98
|
|
99
99
|
it "should work with Regexp validator" do
|
@@ -108,7 +108,7 @@ describe UsersController do
|
|
108
108
|
:id => 5,
|
109
109
|
:session => "secret_hash",
|
110
110
|
:regexp_param => "ten years"
|
111
|
-
}.should raise_error(
|
111
|
+
}.should raise_error(Apipie::ParamInvalid, /regexp_param/)
|
112
112
|
end
|
113
113
|
|
114
114
|
it "should work with Array validator" do
|
@@ -126,14 +126,14 @@ describe UsersController do
|
|
126
126
|
:id => 5,
|
127
127
|
:session => "secret_hash",
|
128
128
|
:array_param => "blabla"
|
129
|
-
}.should raise_error(
|
129
|
+
}.should raise_error(Apipie::ParamInvalid, /array_param/)
|
130
130
|
|
131
131
|
lambda {
|
132
132
|
get :show,
|
133
133
|
:id => 5,
|
134
134
|
:session => "secret_hash",
|
135
135
|
:array_param => 3
|
136
|
-
}.should raise_error(
|
136
|
+
}.should raise_error(Apipie::ParamInvalid, /array_param/)
|
137
137
|
end
|
138
138
|
|
139
139
|
it "should work with Proc validator" do
|
@@ -142,7 +142,7 @@ describe UsersController do
|
|
142
142
|
:id => 5,
|
143
143
|
:session => "secret_hash",
|
144
144
|
:proc_param => "asdgsag"
|
145
|
-
}.should raise_error(
|
145
|
+
}.should raise_error(Apipie::ParamInvalid, /proc_param/)
|
146
146
|
|
147
147
|
get :show,
|
148
148
|
:id => 5,
|
@@ -167,11 +167,11 @@ describe UsersController do
|
|
167
167
|
|
168
168
|
lambda {
|
169
169
|
post :create, :user => { :name => "root", :pass => "12345", :membership => "____" }
|
170
|
-
}.should raise_error(
|
170
|
+
}.should raise_error(Apipie::ParamInvalid, /membership/)
|
171
171
|
|
172
172
|
lambda {
|
173
173
|
post :create, :user => { :name => "root" }
|
174
|
-
}.should raise_error(
|
174
|
+
}.should raise_error(Apipie::ParamInvalid, /pass/)
|
175
175
|
|
176
176
|
post :create, :user => { :name => "root", :pass => "pwd" }
|
177
177
|
assert_response :success
|
@@ -181,7 +181,7 @@ describe UsersController do
|
|
181
181
|
params = Apipie[UsersController, :create].to_json[:params]
|
182
182
|
params.should include(:name => "facts",
|
183
183
|
:full_name => "facts",
|
184
|
-
:validator => "
|
184
|
+
:validator => "Must be Hash",
|
185
185
|
:description => "\n<p>Additional optional facts about the user</p>\n",
|
186
186
|
:required => false,
|
187
187
|
:allow_nil => true,
|
@@ -263,8 +263,8 @@ describe UsersController do
|
|
263
263
|
|
264
264
|
it "should contain all params description" do
|
265
265
|
a = Apipie.get_method_description(UsersController, :show)
|
266
|
-
a.params.count.should ==
|
267
|
-
a.instance_variable_get('@params_ordered').count.should ==
|
266
|
+
a.params.count.should == 9
|
267
|
+
a.instance_variable_get('@params_ordered').count.should == 7
|
268
268
|
end
|
269
269
|
|
270
270
|
it "should contain all api method description" do
|
@@ -294,11 +294,11 @@ describe UsersController do
|
|
294
294
|
:params => [{:full_name=>"oauth",
|
295
295
|
:required=>false,
|
296
296
|
:allow_nil => false,
|
297
|
-
:validator=>"
|
297
|
+
:validator=>"Must be String",
|
298
298
|
:description=>"\n<p>Authorization</p>\n",
|
299
299
|
:name=>"oauth",
|
300
300
|
:expected_type=>"string"},
|
301
|
-
{:validator=>"
|
301
|
+
{:validator=>"Must be a Hash",
|
302
302
|
:description=>"\n<p>Param description for all methods</p>\n",
|
303
303
|
:expected_type=>"hash",
|
304
304
|
:allow_nil=>false,
|
@@ -308,13 +308,13 @@ describe UsersController do
|
|
308
308
|
:params=>
|
309
309
|
[{:required=>true,
|
310
310
|
:allow_nil => false,
|
311
|
-
:validator=>"
|
311
|
+
:validator=>"Must be String",
|
312
312
|
:description=>"\n<p>Username for login</p>\n",
|
313
313
|
:name=>"ausername", :full_name=>"resource_param[ausername]",
|
314
314
|
:expected_type=>"string"},
|
315
315
|
{:required=>true,
|
316
316
|
:allow_nil => false,
|
317
|
-
:validator=>"
|
317
|
+
:validator=>"Must be String",
|
318
318
|
:description=>"\n<p>Password for login</p>\n",
|
319
319
|
:name=>"apassword", :full_name=>"resource_param[apassword]",
|
320
320
|
:expected_type=>"string"}
|
@@ -394,8 +394,11 @@ EOS2
|
|
394
394
|
param = a.params[:proc_param]
|
395
395
|
param.desc.should eq("\n<p>proc validator</p>\n")
|
396
396
|
param.validator.class.should be(Apipie::Validator::ProcValidator)
|
397
|
+
|
398
|
+
param = a.params[:briefer_dsl]
|
399
|
+
param.desc.should eq("\n<p>You dont need :desc => from now</p>\n")
|
400
|
+
param.validator.class.should be(Apipie::Validator::TypeValidator)
|
397
401
|
end
|
398
402
|
|
399
403
|
end
|
400
|
-
|
401
404
|
end
|
@@ -177,6 +177,7 @@ class UsersController < ApplicationController
|
|
177
177
|
param :proc_param, lambda { |val|
|
178
178
|
val == "param value" ? true : "The only good value is 'param value'."
|
179
179
|
}, :desc => "proc validator"
|
180
|
+
param :briefer_dsl, String, "You dont need :desc => from now"
|
180
181
|
def show
|
181
182
|
unless params[:session] == "secret_hash"
|
182
183
|
render :text => "Not authorized", :status => 401
|
@@ -1,14 +1,21 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title>Dummy</title>
|
5
|
-
<%=
|
6
|
-
<%= javascript_include_tag :defaults %>
|
7
|
-
<%= csrf_meta_tag %>
|
4
|
+
<title>Dummy API</title>
|
5
|
+
<%= Apipie.include_stylesheets %>
|
8
6
|
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
|
7
|
+
<body style='background-color: #F5F6F7;'>
|
8
|
+
<div class="container">
|
9
|
+
<div class="row">
|
10
|
+
<div id='container' style='background-color: white;padding:10px;box-shadow:0px 0px 10px rgba(68,68,68,0.6);'>
|
11
|
+
<%= yield %>
|
12
|
+
<%= render 'disqus' if Apipie.configuration.use_disqus? %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
<hr>
|
16
|
+
<footer><%= yield :apipie_footer %></footer>
|
17
|
+
</div>
|
12
18
|
|
19
|
+
<%= Apipie.include_javascripts %>
|
13
20
|
</body>
|
14
21
|
</html>
|
@@ -28,6 +28,19 @@ Apipie.configure do |config|
|
|
28
28
|
|
29
29
|
path = File.expand_path(File.dirname(__FILE__)+'/../../../../README.rdoc')
|
30
30
|
config.app_info = File.read(path)
|
31
|
+
|
32
|
+
# set all parameters as required by default
|
33
|
+
# if enabled, use param :name, val, :required => false for optional params
|
34
|
+
config.required_by_default = false
|
35
|
+
|
36
|
+
# use custom layout
|
37
|
+
# use Apipie.include_stylesheets and Apipie.include_javascripts
|
38
|
+
# to include apipies css and js
|
39
|
+
config.layout = "application"
|
40
|
+
|
41
|
+
# specify disqus site shortname to show discusion on each page
|
42
|
+
# to show it in custom layout, use `render 'disqus' if Apipie.configuration.use_disqus?`
|
43
|
+
# config.disqus_shortname = 'paveltest'
|
31
44
|
end
|
32
45
|
|
33
46
|
|
@@ -51,6 +64,8 @@ class Apipie::Validator::IntegerValidator < Apipie::Validator::BaseValidator
|
|
51
64
|
end
|
52
65
|
|
53
66
|
def error
|
67
|
+
# Newer style is to return an instance of ParamInvalid. Keeping this
|
68
|
+
# to test backwards compatibility.
|
54
69
|
"Parameter #{param_name} expecting to be #{@type.name}, got: #{@error_value.class.name}"
|
55
70
|
end
|
56
71
|
|
File without changes
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Apipie::ParamDescription do
|
4
|
+
|
5
|
+
describe "required_by_default config option" do
|
6
|
+
|
7
|
+
context "parameters required by default" do
|
8
|
+
|
9
|
+
before { Apipie.configuration.required_by_default = true }
|
10
|
+
|
11
|
+
it "should set param as required by default" do
|
12
|
+
param = Apipie::ParamDescription.new(:required_by_default, String)
|
13
|
+
param.required.should be_true
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should be possible to set param as optional" do
|
17
|
+
param = Apipie::ParamDescription.new(:optional, String, :required => false)
|
18
|
+
param.required.should be_false
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
context "parameters optional by default" do
|
24
|
+
|
25
|
+
before { Apipie.configuration.required_by_default = false }
|
26
|
+
|
27
|
+
it "should set param as optional by default" do
|
28
|
+
param = Apipie::ParamDescription.new(:optional_by_default, String)
|
29
|
+
param.required.should be_false
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should be possible to set param as required" do
|
33
|
+
param = Apipie::ParamDescription.new(:required, String, 'description','required' => true)
|
34
|
+
param.required.should be_true
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apipie-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 12
|
10
|
+
version: 0.0.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pavel Pokorny
|
@@ -16,12 +16,12 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-
|
19
|
+
date: 2012-10-09 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
prerelease: false
|
23
22
|
name: rspec-rails
|
24
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
@@ -30,12 +30,12 @@ dependencies:
|
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
version: "0"
|
33
|
-
requirement: *id001
|
34
33
|
type: :development
|
34
|
+
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
prerelease: false
|
37
36
|
name: rails
|
38
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
@@ -46,12 +46,12 @@ dependencies:
|
|
46
46
|
- 0
|
47
47
|
- 10
|
48
48
|
version: 3.0.10
|
49
|
-
requirement: *id002
|
50
49
|
type: :development
|
50
|
+
version_requirements: *id002
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
|
-
prerelease: false
|
53
52
|
name: sqlite3
|
54
|
-
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
55
|
none: false
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
@@ -60,12 +60,12 @@ dependencies:
|
|
60
60
|
segments:
|
61
61
|
- 0
|
62
62
|
version: "0"
|
63
|
-
requirement: *id003
|
64
63
|
type: :development
|
64
|
+
version_requirements: *id003
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
|
-
prerelease: false
|
67
66
|
name: minitest
|
68
|
-
|
67
|
+
prerelease: false
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
69
|
none: false
|
70
70
|
requirements:
|
71
71
|
- - ">="
|
@@ -74,12 +74,12 @@ dependencies:
|
|
74
74
|
segments:
|
75
75
|
- 0
|
76
76
|
version: "0"
|
77
|
-
requirement: *id004
|
78
77
|
type: :development
|
78
|
+
version_requirements: *id004
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
|
-
prerelease: false
|
81
80
|
name: redcarpet
|
82
|
-
|
81
|
+
prerelease: false
|
82
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ">="
|
@@ -88,12 +88,12 @@ dependencies:
|
|
88
88
|
segments:
|
89
89
|
- 0
|
90
90
|
version: "0"
|
91
|
-
requirement: *id005
|
92
91
|
type: :development
|
92
|
+
version_requirements: *id005
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
|
-
prerelease: false
|
95
94
|
name: RedCloth
|
96
|
-
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
99
|
- - ">="
|
@@ -102,12 +102,12 @@ dependencies:
|
|
102
102
|
segments:
|
103
103
|
- 0
|
104
104
|
version: "0"
|
105
|
-
requirement: *id006
|
106
105
|
type: :development
|
106
|
+
version_requirements: *id006
|
107
107
|
- !ruby/object:Gem::Dependency
|
108
|
-
prerelease: false
|
109
108
|
name: rake
|
110
|
-
|
109
|
+
prerelease: false
|
110
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
111
111
|
none: false
|
112
112
|
requirements:
|
113
113
|
- - ">="
|
@@ -116,12 +116,12 @@ dependencies:
|
|
116
116
|
segments:
|
117
117
|
- 0
|
118
118
|
version: "0"
|
119
|
-
requirement: *id007
|
120
119
|
type: :development
|
120
|
+
version_requirements: *id007
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
|
-
prerelease: false
|
123
122
|
name: rest-client
|
124
|
-
|
123
|
+
prerelease: false
|
124
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
125
125
|
none: false
|
126
126
|
requirements:
|
127
127
|
- - ">="
|
@@ -130,12 +130,12 @@ dependencies:
|
|
130
130
|
segments:
|
131
131
|
- 0
|
132
132
|
version: "0"
|
133
|
-
requirement: *id008
|
134
133
|
type: :development
|
134
|
+
version_requirements: *id008
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
|
-
prerelease: false
|
137
136
|
name: oauth
|
138
|
-
|
137
|
+
prerelease: false
|
138
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
139
139
|
none: false
|
140
140
|
requirements:
|
141
141
|
- - ">="
|
@@ -144,8 +144,8 @@ dependencies:
|
|
144
144
|
segments:
|
145
145
|
- 0
|
146
146
|
version: "0"
|
147
|
-
requirement: *id009
|
148
147
|
type: :development
|
148
|
+
version_requirements: *id009
|
149
149
|
description: Maintain your API documentation up to date!
|
150
150
|
email:
|
151
151
|
- pajkycz@gmail.com
|
@@ -179,8 +179,10 @@ files:
|
|
179
179
|
- app/public/apipie/stylesheets/bundled/bootstrap-responsive.min.css
|
180
180
|
- app/public/apipie/stylesheets/bundled/bootstrap.min.css
|
181
181
|
- app/public/apipie/stylesheets/bundled/prettify.css
|
182
|
+
- app/views/apipie/apipies/_disqus.html.erb
|
182
183
|
- app/views/apipie/apipies/_params.html.erb
|
183
184
|
- app/views/apipie/apipies/_params_plain.html.erb
|
185
|
+
- app/views/apipie/apipies/apipie_404.html.erb
|
184
186
|
- app/views/apipie/apipies/index.html.erb
|
185
187
|
- app/views/apipie/apipies/method.html.erb
|
186
188
|
- app/views/apipie/apipies/plain.html.erb
|
@@ -190,21 +192,25 @@ files:
|
|
190
192
|
- lib/apipie-rails.rb
|
191
193
|
- lib/apipie/apipie_module.rb
|
192
194
|
- lib/apipie/application.rb
|
195
|
+
- lib/apipie/client/base.rb
|
196
|
+
- lib/apipie/client/cli_command.rb
|
193
197
|
- lib/apipie/client/generator.rb
|
198
|
+
- lib/apipie/client/main.rb
|
199
|
+
- lib/apipie/client/rest_client_oauth.rb
|
194
200
|
- lib/apipie/client/template/Gemfile.tt
|
195
201
|
- lib/apipie/client/template/README.tt
|
196
202
|
- lib/apipie/client/template/Rakefile.tt
|
197
|
-
- lib/apipie/client/template/
|
198
|
-
- lib/apipie/client/template/bin.rb.tt
|
199
|
-
- lib/apipie/client/template/
|
200
|
-
- lib/apipie/client/template/
|
201
|
-
- lib/apipie/client/template/
|
202
|
-
- lib/apipie/client/template/
|
203
|
-
- lib/apipie/client/template/
|
204
|
-
- lib/apipie/client/
|
205
|
-
- lib/apipie/client/template/version.rb.tt
|
203
|
+
- lib/apipie/client/template/a_name.gemspec.tt
|
204
|
+
- lib/apipie/client/template/bin/bin.rb.tt
|
205
|
+
- lib/apipie/client/template/lib/a_name.rb.tt
|
206
|
+
- lib/apipie/client/template/lib/a_name/commands/cli.rb.tt
|
207
|
+
- lib/apipie/client/template/lib/a_name/config.yml
|
208
|
+
- lib/apipie/client/template/lib/a_name/resources/resource.rb.tt
|
209
|
+
- lib/apipie/client/template/lib/a_name/version.rb.tt
|
210
|
+
- lib/apipie/client/thor.rb
|
206
211
|
- lib/apipie/dsl_definition.rb
|
207
212
|
- lib/apipie/error_description.rb
|
213
|
+
- lib/apipie/errors.rb
|
208
214
|
- lib/apipie/extractor.rb
|
209
215
|
- lib/apipie/extractor/collector.rb
|
210
216
|
- lib/apipie/extractor/recorder.rb
|
@@ -261,6 +267,8 @@ files:
|
|
261
267
|
- spec/dummy/public/javascripts/rails.js
|
262
268
|
- spec/dummy/public/stylesheets/.gitkeep
|
263
269
|
- spec/dummy/script/rails
|
270
|
+
- spec/lib/param_description_spec.rb
|
271
|
+
- spec/lib/parameter_description_spec.rb
|
264
272
|
- spec/spec_helper.rb
|
265
273
|
homepage: http://github.com/Pajk/apipie-rails
|
266
274
|
licenses: []
|
@@ -333,4 +341,6 @@ test_files:
|
|
333
341
|
- spec/dummy/public/javascripts/rails.js
|
334
342
|
- spec/dummy/public/stylesheets/.gitkeep
|
335
343
|
- spec/dummy/script/rails
|
344
|
+
- spec/lib/param_description_spec.rb
|
345
|
+
- spec/lib/parameter_description_spec.rb
|
336
346
|
- spec/spec_helper.rb
|