grape-swagger-ui 0.0.1 → 0.0.2

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/.gitignore CHANGED
@@ -16,3 +16,4 @@ spec/reports
16
16
  test/tmp
17
17
  test/version_tmp
18
18
  tmp
19
+ *.iml
data/README.md CHANGED
@@ -1,20 +1,27 @@
1
- # Swagger::Ui::Rails
1
+ Grape::Swagger::Ui
2
+ ===============
3
+
4
+ [![Code Climate](https://codeclimate.com/github/kendrikat/grape-swagger-ui.png)](https://codeclimate.com/github/kendrikat/grape-swagger-ui)
2
5
 
3
6
  TODO/WIP: Write a gem description
4
7
 
5
- This is experimental and my first gem :)
8
+ Integrates [swagger-ui] with your "grapified" Rails3 application.
9
+
10
+ Dependencies
11
+ -
6
12
 
7
- Integrates swagger-ui.js to your "grapified" Rails3 application.
13
+ * [grape-swagger]
14
+ > Add swagger compliant documentation to your grape API
8
15
 
9
- Works best with :)
10
- - grape-swagger => https://github.com/tim-vandecasteele/grape-swagger
11
- - grape => https://github.com/intridea/grape
16
+ * [grape]
17
+ > An opinionated micro-framework for creating REST-like APIs in Ruby
12
18
 
13
- ## Installation
19
+ Installation
20
+ -
14
21
 
15
22
  Add this line to your application's Gemfile:
16
23
 
17
- gem 'swagger-ui-rails'
24
+ gem 'grape-swagger-ui'
18
25
 
19
26
  And then execute:
20
27
 
@@ -22,15 +29,14 @@ And then execute:
22
29
 
23
30
  Or install it yourself as:
24
31
 
25
- $ gem install swagger-ui-rails
32
+ $ gem install grape-swagger-ui
26
33
 
27
- ## Usage
28
-
29
- TODO/WIP: Write usage instructions here
34
+ Usage
35
+ -
30
36
 
31
37
  If your api path is "api/v1" just go to
32
38
 
33
- http://localhost:3000/api/swagger
39
+ http://host:port/api/swagger
34
40
 
35
41
  else
36
42
 
@@ -45,6 +51,10 @@ Since this is a seperate layout and if you want to use this in your staging envi
45
51
  #staging.rb
46
52
  config.assets.precompile += ["swagger_ui.css", "swagger_ui.js"]
47
53
 
54
+ Version
55
+ --------
56
+ 0.0.2
57
+
48
58
  ## Contributing
49
59
 
50
60
  1. Fork it
@@ -52,3 +62,13 @@ Since this is a seperate layout and if you want to use this in your staging envi
52
62
  3. Commit your changes (`git commit -am 'Add some feature'`)
53
63
  4. Push to the branch (`git push origin my-new-feature`)
54
64
  5. Create new Pull Request
65
+
66
+ ## License
67
+ MIT License, full text of license see [here][License]
68
+
69
+ *Free Software, Fuck Yeah!*
70
+
71
+ [License]: https://github.com/kendrikat/grape-swagger-ui/blob/master/LICENSE.txt "LICENSE"
72
+ [grape-swagger]: https://github.com/tim-vandecasteele/grape-swagger
73
+ [grape]: https://github.com/intridea/grape
74
+ [swagger-ui]: https://github.com/wordnik/swagger-ui/
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["klaas.endrikat@googlemail.com"]
11
11
  gem.description = %q{swagger ui js integration for grape and grape-swagger}
12
12
  gem.summary = %q{swagger ui js integration for grape and grape-swagger}
13
- gem.homepage = "https://github.com/klausistblau/grape-swagger-ui"
13
+ gem.homepage = "https://github.com/kendrikat/grape-swagger-ui"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -1,7 +1,7 @@
1
1
  module Grape
2
2
  module Swagger
3
3
  module Ui
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -1563,7 +1563,10 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
1563
1563
  _ref3 = this.model.parameters;
1564
1564
  for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
1565
1565
  param = _ref3[_l];
1566
- bodyParam.append(param.name, map[param.name]);
1566
+ var paramValue = map[param.name];
1567
+ if (param && paramValue) {
1568
+ bodyParam.append(param.name, map[param.name]);
1569
+ }
1567
1570
  }
1568
1571
  } else {
1569
1572
  bodyParam = null;
@@ -1941,3 +1944,4 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
1941
1944
  })(Backbone.View);
1942
1945
 
1943
1946
  }).call(this);
1947
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-swagger-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-25 00:00:00.000000000 Z
12
+ date: 2013-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -83,7 +83,7 @@ files:
83
83
  - vendor/assets/stylesheets/hightlight.default.css
84
84
  - vendor/assets/stylesheets/screen.css
85
85
  - vendor/assets/stylesheets/swagger_ui.css
86
- homepage: https://github.com/klausistblau/grape-swagger-ui
86
+ homepage: https://github.com/kendrikat/grape-swagger-ui
87
87
  licenses: []
88
88
  post_install_message:
89
89
  rdoc_options: []