code_analysis 1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3ae3495dae8c39d5d43d27e12f00b377e8d77584
4
+ data.tar.gz: 0f6516da3b8a5e422a259e066f6c2a2f98b046b0
5
+ SHA512:
6
+ metadata.gz: 43fdede290c071a359f6785b47565a6c5460764e61ab789d9ef65fb95c37860120ced81d8c838f9c76ce80bf600f6d659f55509c3013d9e79d6c697a7d68297f
7
+ data.tar.gz: fa295af75a40060acf3fa07b8fbe476c68ffb367b816bc8c727778bc0a0ea19ac7e9d3be4437b1d11621a8e8bbda4b5e6e7d6f0abe1f9a381c8d2c9e206a6c81
@@ -0,0 +1,3 @@
1
+ module CodeAnalysis
2
+ require 'code_analysis/railtie' if defined?(Rails)
3
+ end
@@ -0,0 +1,5 @@
1
+ class CodeAnalysis::Railtie < Rails::Railtie
2
+ rake_tasks do
3
+ load 'tasks/code_analysis.rake'
4
+ end
5
+ end
@@ -0,0 +1,19 @@
1
+ task :code_analysis, :disable_tools do |_t, args|
2
+ tools_list = args[:disable_tools].try(:split, '/') || []
3
+
4
+ unless tools_list.include?('disable_rubocop')
5
+ sh 'bundle exec rubocop app config lib'
6
+ end
7
+
8
+ unless tools_list.include?('disable_reek')
9
+ sh 'bundle exec reek app config lib -c .reek'
10
+ end
11
+
12
+ unless tools_list.include?('disable_rails_best_practices')
13
+ sh 'bundle exec rails_best_practices .'
14
+ end
15
+
16
+ unless tools_list.include?('disable_scss_lint')
17
+ sh 'bundle exec scss-lint app/assets/stylesheets --config .scss_lint.yml'
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: code_analysis
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.0'
5
+ platform: ruby
6
+ authors:
7
+ - Pablo Gonzaga
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-10-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: reek
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 4.7.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 4.7.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.51.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.51.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails_best_practices
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.19'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.19'
55
+ - !ruby/object:Gem::Dependency
56
+ name: scss_lint
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.55.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.55.0
69
+ description: Adds a task to run rubocop, reek, rails_best_practices and scss lint
70
+ into your rails project
71
+ email: pgonzaga.uy@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - lib/code_analysis.rb
77
+ - lib/code_analysis/railtie.rb
78
+ - lib/tasks/code_analysis.rake
79
+ homepage: https://github.com/pgonzaga/code_analysis
80
+ licenses:
81
+ - MIT
82
+ metadata: {}
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ requirements: []
98
+ rubyforge_project:
99
+ rubygems_version: 2.6.14
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: Adds code analysis tools to your project
103
+ test_files: []