varvara 1.0.0 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5844c61371821088110d611b66250bb10be24a6c
4
- data.tar.gz: e798c1a4c2b2d2ff861b2d4bfadf813514ff6150
3
+ metadata.gz: f1c72ea6068f43e2357e120dd2df42f17f601703
4
+ data.tar.gz: ad7965e4cce469d3610d53f267489d3be86e10f7
5
5
  SHA512:
6
- metadata.gz: 92714b3c8629e465ea910b34781d5ca3c2428c8456a6ee622211924f01b53c78c65041d1666cea9abc8a8496e986d531780eab0c196e91d63eb6b52a31f7e3ad
7
- data.tar.gz: 7f455c02e72c5b2cb3fa20565c89f9d8241cec5830d251da8ba93393bf48364d5f475d15533ffc65159775f9c888bad6bb6c45589078b5a41849de76b6703cf8
6
+ metadata.gz: 0f029267c21a1d34cd0f833010e2354b8651999e2571c55c504121ad2d298f39f204e479c3b4f5a9b0281af59811e859934d6bf23961046869a8b9b3cbccacc9
7
+ data.tar.gz: f2628cce1777065897b916c32a050394debf4a11db763187be0dac1edf1684391587009ae05db1e50463b7b41a594f6c51e41a6744e0193efe650a5e2bd6ce6d
data/CHANGES.md ADDED
@@ -0,0 +1,12 @@
1
+ ##Version 1.0.2
2
+
3
+ Second release:
4
+ 1. Controllers with actions names
5
+ 2. Routes display fix
6
+
7
+ ##Version 1.0.0
8
+
9
+ Initial open source release:
10
+ 1. Models with columns and associations displaying
11
+ 2. Routes displayed
12
+ 3. Controllers as a simple list displayed
data/README.md CHANGED
@@ -10,7 +10,7 @@ Displays your routes, controllers, models, their columns associations and their
10
10
  Add this line to your application's Gemfile:
11
11
 
12
12
  group :development do
13
- gem 'varvara', git: 'git://github.com/ostaptan/varvara.git'
13
+ gem 'varvara'
14
14
  end
15
15
 
16
16
  And then execute:
@@ -13,6 +13,9 @@
13
13
  text-decoration: none;
14
14
  color: #000;
15
15
  }
16
+ a:hover {
17
+ color:#3181D1;
18
+ };
16
19
  li {
17
20
  display: inline-block;
18
21
  padding-right:10px;
@@ -24,51 +27,4 @@
24
27
 
25
28
  .varvara-container {
26
29
  padding-top: 35px;
27
- }
28
-
29
- .button {
30
- -moz-box-shadow:inset 0px 1px 0px 0px #cae3fc;
31
- -webkit-box-shadow:inset 0px 1px 0px 0px #cae3fc;
32
- box-shadow:inset 0px 1px 0px 0px #cae3fc;
33
- background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #4197ee) );
34
- background:-moz-linear-gradient( center top, #79bbff 5%, #4197ee 100% );
35
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#79bbff', endColorstr='#4197ee');
36
- background-color:#79bbff;
37
- -webkit-border-top-left-radius:13px;
38
- -moz-border-radius-topleft:13px;
39
- border-top-left-radius:13px;
40
- -webkit-border-top-right-radius:0px;
41
- -moz-border-radius-topright:0px;
42
- border-top-right-radius:0px;
43
- -webkit-border-bottom-right-radius:13px;
44
- -moz-border-radius-bottomright:13px;
45
- border-bottom-right-radius:13px;
46
- -webkit-border-bottom-left-radius:13px;
47
- -moz-border-radius-bottomleft:13px;
48
- border-bottom-left-radius:13px;
49
- text-indent:-2.07px;
50
- border:2px solid #469df5;
51
- display:inline-block;
52
- font-family:Arial;
53
- font-size:17px;
54
- font-weight:bold;
55
- font-style:normal;
56
- height:33px;
57
- line-height:33px;
58
- width:69px;
59
- a {
60
- color:#ffffff;
61
- text-decoration:none;
62
- }
63
- text-align:center;
64
- text-shadow:4px 3px 0px #287ace;
65
- }
66
- .button:hover {
67
- background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #4197ee), color-stop(1, #79bbff) );
68
- background:-moz-linear-gradient( center top, #4197ee 5%, #79bbff 100% );
69
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4197ee', endColorstr='#79bbff');
70
- background-color:#4197ee;
71
- }.button:active {
72
- position:relative;
73
- top:1px;
74
- }
30
+ }
@@ -1,2 +1 @@
1
- .button
2
- = link_to 'Back', '/varvara'
1
+ .div= button_to 'Back', '/varvara', method: :get
@@ -1,6 +1,7 @@
1
1
  <table id='route_table' class='route_table'>
2
2
  <thead>
3
3
  <tr>
4
+ <th>Rails verb</th>
4
5
  <th>HTTP Verb</th>
5
6
  <th>Path</th>
6
7
  <th>Controller#Action</th>
@@ -5,5 +5,10 @@
5
5
  <ul>
6
6
  <% @controllers.each do |c| %>
7
7
  <li><%= c %></li>
8
+ <ul>
9
+ <% c.action_methods.each do |method| %>
10
+ <li><%= method %></li>
11
+ <% end %>
12
+ </ul>
8
13
  <% end %>
9
14
  </ul>
data/lib/varvara.rb CHANGED
@@ -21,12 +21,16 @@ module Varvara
21
21
  end
22
22
 
23
23
  def self.format_controllers(hash = all_controllers)
24
- # output -> array with controllers names
25
- hash.map {|c| c[:controller]}.uniq.compact.map {|c_name| "#{c_name.capitalize}Controller" unless c_name.split('/').size >= 2}.compact
24
+ # output -> array with controllers
25
+ hash.map do |c|
26
+ c[:controller]
27
+ end.uniq.compact.map do |c_name|
28
+ self.controller_from_name(c_name)
29
+ end.compact
26
30
  end
27
-
28
- def format_controller_actions(hash = all_controllers)
29
-
31
+
32
+ def self.controller_from_name(c_name)
33
+ "#{c_name.camelize}Controller".constantize
30
34
  end
31
35
 
32
36
  private
@@ -1,3 +1,3 @@
1
1
  module Varvara
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: varvara
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ostaptan
@@ -146,6 +146,7 @@ extensions: []
146
146
  extra_rdoc_files: []
147
147
  files:
148
148
  - .gitignore
149
+ - CHANGES.md
149
150
  - Gemfile
150
151
  - LICENSE.txt
151
152
  - README.md