rails_api_documentation 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8b8f7b032d883cc5ea4129aea304e1f24fe0461
4
- data.tar.gz: 3c6ccd6d88e6ea75a21c91ce05fb60d39c07c834
3
+ metadata.gz: 5e7d3ec4c16b4519d33306c2bf303c712e9748f7
4
+ data.tar.gz: 6c71e6cfa1298def8301c076bb88bb111fe8c7d1
5
5
  SHA512:
6
- metadata.gz: fd89abad36beb60a5769825e8d45e96a9376c8c03c96f438f2625b5a3f82f888aa58d8ee1592fb147c3eb16d17657fcbbfb81d78707c41f1217cfb30c0a6f28e
7
- data.tar.gz: 72f6539705ebc78f5ff275e76558a814de311e8b960172858d1e0265c88ce7de02a77ed4c967ff875e2e78c69f55d128e499a22a5e715061b555b02ea057b52d
6
+ metadata.gz: c90cadfa96cd6a860dfa9b8d199deff6d8b5ea5346f63683921470e0d3efc6169e701b107d5a597eaab500c3edafc365b2ce893d7ba961cd773b11370ae86dc3
7
+ data.tar.gz: 24e4970f86060efca123e637831b9986535b0e3f73c2ce24d422eca0bdbf042863d0ecc0a0d123cde958f91d7f59f335c879a73cf4e68aba3fc06d19665ecea8
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  Add this line to your application's Gemfile:
7
7
 
8
8
  ```ruby
9
- gem 'rails_api_doc'
9
+ gem 'rails_api_documentation'
10
10
  ```
11
11
 
12
12
  And then execute:
@@ -15,7 +15,7 @@ And then execute:
15
15
 
16
16
  Or install it yourself as:
17
17
 
18
- $ gem install rails_api_doc
18
+ $ gem install rails_api_documentation
19
19
 
20
20
  ## Features
21
21
 
@@ -1,4 +1,6 @@
1
1
  _header_height = 0
2
+ _window_height = 0
3
+ _window = null
2
4
  _side_menu = null
3
5
 
4
6
  $ ->
@@ -18,13 +20,15 @@ $ ->
18
20
 
19
21
  _header_height = $('.aside').offset().top
20
22
 
23
+ _window = $(window)
24
+
25
+ _window_height = _window.height()
26
+
21
27
  _side_menu = $('#side-menu')
22
28
 
23
29
  $(document).on 'scroll', ->
24
- _window = $(window)
25
30
  _scrollTop = _window.scrollTop()
26
31
 
27
- console.log _header_height
28
32
  if _scrollTop > _header_height
29
33
  _side_menu.addClass('fixed')
30
34
  else
@@ -25,69 +25,3 @@
25
25
  * c) left should reduce font size if too much content
26
26
  *
27
27
  */
28
-
29
- .affix {
30
- position: fixed !important;
31
- }
32
- .nav > li > a {
33
- display: block;
34
- padding: 4px 20px;
35
- font-size: 15px;
36
- font-weight: 500;
37
- color: #767676;
38
- }
39
-
40
- .nav > li > a:hover {
41
- padding-left: 19px;
42
- color: #563d7c;
43
- text-decoration: none;
44
- background-color: transparent;
45
- border-left: 1px solid #563d7c;
46
- }
47
-
48
- .bs-docs-sidebar.affix {
49
- position: fixed;
50
- top: 20px;
51
- padding-left: 20px;
52
- margin: 0;
53
- }
54
- .nav {
55
- padding-left: 0;
56
- }
57
-
58
- .bs-docs-sidebar .nav>.is-current:focus>a, .bs-docs-sidebar .nav>.is-current:hover>a, .bs-docs-sidebar .nav>.is-current>a {
59
- padding-left: 18px;
60
- font-weight: 700;
61
- color: #563d7c;
62
- background-color: transparent;
63
- border-left: 2px solid #563d7c;
64
- }
65
-
66
- .nav>li>ul>.is-current>a {
67
- padding-left: 28px;
68
- font-weight: 500;
69
- }
70
-
71
- .bs-docs-sidebar .nav .nav>li>a {
72
- padding-top: 1px;
73
- padding-bottom: 1px;
74
- padding-left: 30px;
75
- font-size: 14px;
76
- font-weight: 500;
77
- }
78
-
79
- .blue {
80
- background-color: #A0A0E5;
81
- }
82
-
83
- .title{
84
- background-color: #f5f3f3;
85
- }
86
- .table-column {
87
- border: 1px solid black;
88
- }
89
-
90
- .nopadding {
91
- padding: 0 !important;
92
- margin: 0 !important;
93
- }
@@ -0,0 +1,30 @@
1
+ .side-menu
2
+ list-style-type: none
3
+ padding: 0
4
+ font-size: 15px
5
+
6
+ li
7
+ margin-bottom: 3px
8
+
9
+ span
10
+ margin: 0 2px
11
+
12
+ a
13
+ display: inline-block
14
+ padding: 0
15
+ font-size: 15px
16
+ font-weight: 500
17
+ color: #767676
18
+ text-decoration: none
19
+
20
+ &:hover
21
+ color: #563d7c
22
+ text-decoration: underline
23
+ background-color: transparent
24
+
25
+ &.is-current
26
+ padding-left: 18px
27
+ font-weight: 700
28
+ color: #563d7c
29
+ background-color: transparent
30
+ border-left: 2px solid #563d7c
@@ -3,8 +3,7 @@ nav.bs-docs-sidebar.hidden-print.hidden-sm.hidden-xs
3
3
  - locals[:models].each do |model|
4
4
  li
5
5
  a[href=('#' + model.to_s)] = model.to_s
6
- ul.nav
7
- li
8
- a[href=('#' + model.to_s + '.request')] request
9
- li
10
- a[href=('#' + model.to_s + '.response')] response
6
+ span = '('
7
+ a[href=('#' + model.to_s + '.request')] req,
8
+ a[href=('#' + model.to_s + '.response')] resp
9
+ span = ')'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # author: Vadim Shaveiko <@vshaveyko>
3
3
  module RailsApiDoc
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_api_documentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - vs
@@ -139,6 +139,7 @@ files:
139
139
  - app/assets/javascripts/rails_api_doc/application.js
140
140
  - app/assets/javascripts/table.js.coffee
141
141
  - app/assets/stylesheets/rails_api_doc/application.css
142
+ - app/assets/stylesheets/rails_api_doc/side_menu.sass
142
143
  - app/assets/stylesheets/rails_api_doc/table.sass
143
144
  - app/controllers/rails_api_doc/api_docs_controller.rb
144
145
  - app/controllers/rails_api_doc/application_controller.rb