attractor-rails 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: b08f5079f640ca044dfdbbbc86c84e3db91fea4845e43a473e49ae35ad3bf9c1
4
- data.tar.gz: e614b92f84cba0cb1b9c46f94958b8c6058966aa3bea673f3feaa2c534c51f42
3
+ metadata.gz: 839e5677606f57d100c540ed9174b861f023fea46d2971f8d764a9041d03541e
4
+ data.tar.gz: 6bc124d3f394777e1b9606d32ae7e9a4e054ff0d9e36657c202e4054fc8c2710
5
5
  SHA512:
6
- metadata.gz: 46aa6d89c4347fc3cbbbe8892a2db5d8099e8b423d896cf18b5fe1b20c71b0cdd664a97ed590ddd689cb2ebe1628826b68f7590c5f422057151af6e56c4da40b
7
- data.tar.gz: 89a2efff10f776db3c47c4f8e1ea60f18484925f9fe7f4a2b0ecf7eb2c496b3f8bdba97f4a741211abfcc6a6698a89f6e8c5f5d0b6935e5090d635eea70aa092
6
+ metadata.gz: bd9888f9f014fd6ebb77374056804fca152f127d1b82ecad4770c75e1fd7801e5a72a37a0f9bc618864f3712e7702d442f26fc2ab015e27127869e39afb208dc
7
+ data.tar.gz: f9febb52b9b74e5d3748a2b07d630cb444d7e34a7a7a42d6f035db273568f5e30f4b08e89d3d0b77d9c1645d6313fa228f606ef2ce233d49c5b0ebf768acbaf9
data/README.md CHANGED
@@ -1,28 +1,118 @@
1
- # Attractor::Rails
2
- Short description and motivation.
1
+ <!-- MARKDOWN LINKS & IMAGES -->
2
+ <!-- Shields -->
3
+ [forks-shield]: https://img.shields.io/github/forks/julianrubisch/attractor-rails.svg?style=flat-square
4
+ [forks-url]: https://github.com/julianrubisch/attractor-rails/network/members
5
+ [stars-shield]: https://img.shields.io/github/stars/julianrubisch/attractor-rails.svg?style=flat-square
6
+ [stars-url]: https://github.com/julianrubisch/attractor-rails/stargazers
7
+ [issues-shield]: https://img.shields.io/github/issues/julianrubisch/attractor-rails.svg?style=flat-square
8
+ [issues-url]: https://github.com/julianrubisch/attractor-rails/issues
9
+ [license-shield]: https://img.shields.io/github/license/julianrubisch/attractor-rails.svg?style=flat-square
10
+ [license-url]: https://github.com/julianrubisch/attractor-rails/blob/master/LICENSE
11
+ [build-status]: https://travis-ci.org/julianrubisch/attractor-rails.svg?branch=master
12
+ [twitter-shield]: https://img.shields.io/twitter/follow/AttractorGem?style=social
3
13
 
4
- ## Usage
5
- How to use my plugin.
14
+ <!-- Media -->
15
+ [logo-source]: https://thenounproject.com/term/black-hole/1043893
16
+
17
+ [repo]: https://github.com/julianrubisch/attractor-rails
18
+
19
+ <!-- PROJECT LOGO -->
20
+ <br />
21
+ <div align="center">
22
+ <a href="https://github.com/julianrubisch/attractor-rails">
23
+ <img src="https://user-images.githubusercontent.com/4352208/65411858-3dc84200-ddee-11e9-99b6-c9cdbeb533c5.png" alt="Logo" width="80" height="80">
24
+ </a>
25
+ <h2 align="center">Attractor Rails Engine</h2>
26
+ <p align="center">A code complexity metrics visualization and exploration tool for Ruby and JavaScript</p>
27
+ <p align="center">baked into a mountable Rails Engine</p>
28
+
29
+ ---
30
+
31
+ <!-- PROJECT SHIELDS -->
32
+ ![Build Status][build-status]
33
+ [![Forks][forks-shield]][forks-url]
34
+ [![Stargazers][stars-shield]][stars-url]
35
+ [![Issues][issues-shield]][issues-url]
36
+ [![MIT License][license-shield]][license-url]
37
+ <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
38
+ [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
39
+ <!-- ALL-CONTRIBUTORS-BADGE:END -->
40
+ <a href="https://www.patreon.com/user?u=24747270"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="Become a Patron!" width="160" /></a>
41
+ </div>
42
+
43
+ ## Table of Contents
44
+
45
+ - [Table of Contents](#table-of-contents)
46
+ - [Introduction](#introduction)
47
+ - [Installation](#installation)
48
+ - [Configuration](#configuration)
49
+ - [Contributing](#contributing)
50
+ - [Logo Attribution](#logo-attribution)
51
+ - [Contributors ✨](#contributors-%e2%9c%a8)
6
52
 
7
53
  ## Installation
8
- Add this line to your application's Gemfile:
54
+
55
+ Add the gem to your Gemfile:
9
56
 
10
57
  ```ruby
11
- gem 'attractor-rails'
58
+ group :development do
59
+ gem 'attractor-rails'
60
+ end
12
61
  ```
13
62
 
14
63
  And then execute:
15
- ```bash
16
- $ bundle
64
+
65
+ ```sh
66
+ bundle install
67
+ ```
68
+
69
+ This will install `attractor`, along with two plugins (`attractor-ruby`, `attractor-javascript`) for you.
70
+
71
+ Mount the engine in your `routes.rb`:
72
+
73
+ ```ruby
74
+ Rails.application.routes.draw do
75
+ mount Attractor::Rails::Engine, at: "/attractor" if Rails.env.development?
76
+ # ...
77
+ end
17
78
  ```
18
79
 
19
- Or install it yourself as:
20
- ```bash
21
- $ gem install attractor-rails
80
+ And that's it! Browse to http://localhost:3000/attractor and enjoy your code metrics!
81
+
82
+ ## Configuration
83
+
84
+ `attractor-rails` ships with sensible defaults, but you can override the following configuration options in an initializer, if you like:
85
+
86
+ ```ruby
87
+ # config/initializers/attractor.rb
88
+ Attractor::Rails.minimum_churn_count = 1 # default: 3
89
+ Attractor::Rails.file_prefix = "app" # default: ""
90
+ Attractor::Rails.start_ago = "3m" # default: "5y"
22
91
  ```
23
92
 
24
93
  ## Contributing
25
- Contribution directions go here.
26
94
 
27
- ## License
28
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
95
+ Bug reports and pull requests are welcome on [GitHub][repo].
96
+
97
+ ## Logo Attribution
98
+
99
+ [Black Hole by Eynav Raphael from the Noun Project][logo-source]
100
+
101
+ ## Contributors ✨
102
+
103
+ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
104
+
105
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
106
+ <!-- prettier-ignore-start -->
107
+ <!-- markdownlint-disable -->
108
+ <table>
109
+ <tr>
110
+ <td align="center"><a href="http://www.julianrubisch.at"><img src="https://avatars0.githubusercontent.com/u/4352208?v=4" width="100px;" alt=""/><br /><sub><b>Julian Rubisch</b></sub></a><br /><a href="https://github.com/julianrubisch/attractor/commits?author=julianrubisch" title="Code">💻</a> <a href="https://github.com/julianrubisch/attractor/commits?author=julianrubisch" title="Documentation">📖</a></td>
111
+ </tr>
112
+ </table>
113
+
114
+ <!-- markdownlint-enable -->
115
+ <!-- prettier-ignore-end -->
116
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
117
+
118
+ This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
@@ -23,7 +23,8 @@ module Attractor::Rails
23
23
 
24
24
  def suggestions
25
25
  threshold = params[:t] || 95
26
- render json: @reporter.suggestions(threshold).map(&:to_h)
26
+ type = params[:type] || "rb"
27
+ render json: @reporter.suggestions(quantile: threshold, type: type).map(&:to_h)
27
28
  end
28
29
 
29
30
  private
@@ -1,5 +1,5 @@
1
1
  module Attractor
2
2
  module Rails
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attractor-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Rubisch
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-17 00:00:00.000000000 Z
11
+ date: 2020-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -138,7 +138,7 @@ homepage: https://github.com/julianrubisch/attractor-rails
138
138
  licenses:
139
139
  - MIT
140
140
  metadata: {}
141
- post_install_message:
141
+ post_install_message:
142
142
  rdoc_options: []
143
143
  require_paths:
144
144
  - lib
@@ -153,8 +153,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  requirements: []
156
- rubygems_version: 3.1.2
157
- signing_key:
156
+ rubygems_version: 3.1.4
157
+ signing_key:
158
158
  specification_version: 4
159
159
  summary: Churn vs Complexity Chart Generator
160
160
  test_files: []