massa 0.0.2 → 0.0.3

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: b637d9708f9678b2a5a485a64c271a9599a07f63
4
- data.tar.gz: 9d2d70b8e9c207556ec772a0e8841481289b5f66
3
+ metadata.gz: 0840ee1cb65687c40ada54c82c676fc1c3eff844
4
+ data.tar.gz: 36af266c47e7247b1cdd6cc3813749a85411c095
5
5
  SHA512:
6
- metadata.gz: bab93ed29ebea4a2883a135078f2734a111eb4a2cae6d9671308cee39a52d6a63b8637b713f388f72f91736ace968e90050c7db237e7cb09cc50bf283b6523b9
7
- data.tar.gz: e4db48e29c9c4344f780ed56d6b76e387f658c219676b83d3fb114ae5bdd062afe5c088fcf6f060ebec7691e7c237bcc6f11ab8cdab4af65cd9556272b2b7853
6
+ metadata.gz: 16daac71883a93a42ebb2f4b63ae1af903c546ed673d1c86ff3cf1db283cdc33bebd691b448765e51c67fa73f396d631ab161532b13e1927924ea418ba93ba5c
7
+ data.tar.gz: f366b09e063b8e977933d1e52b8cbefbfa837955ba2fb96c43faad7b98f74ea52bc36e0f12de9c3ec3f5e5f27b4705483adebc27615f51b6a3071ef0b0ec1c70
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.0
4
+ before_install: gem install bundler -v 1.11.2
@@ -0,0 +1,48 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer. All complaints will be reviewed
39
+ and investigated and will result in a response that is deemed necessary and
40
+ appropriate to the circumstances. Maintainers are obligated to maintain
41
+ confidentiality with regard to the reporter of an incident.
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
44
+ version 1.3.0, available at
45
+ [http://contributor-covenant.org/version/1/3/0/][version]
46
+
47
+ [homepage]: http://contributor-covenant.org
48
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile CHANGED
@@ -1,10 +1,4 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
- gem 'bundler'
4
-
5
- group :development do
6
- gem 'jeweler'
7
- gem 'pry'
8
- # gem 'rspec'
9
- # gem 'simplecov'
10
- end
3
+ # Specify your gem's dependencies in massa.gemspec
4
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,63 +1,43 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ massa (0.0.3)
5
+
1
6
  GEM
2
- remote: http://rubygems.org/
7
+ remote: https://rubygems.org/
3
8
  specs:
4
- addressable (2.4.0)
5
- builder (3.2.2)
6
9
  coderay (1.1.0)
7
- descendants_tracker (0.0.4)
8
- thread_safe (~> 0.3, >= 0.3.1)
9
- faraday (0.9.2)
10
- multipart-post (>= 1.2, < 3)
11
- git (1.2.9.1)
12
- github_api (0.13.1)
13
- addressable (~> 2.4.0)
14
- descendants_tracker (~> 0.0.4)
15
- faraday (~> 0.8, < 0.10)
16
- hashie (>= 3.4)
17
- multi_json (>= 1.7.5, < 2.0)
18
- oauth2
19
- hashie (3.4.3)
20
- highline (1.7.8)
21
- jeweler (2.0.1)
22
- builder
23
- bundler (>= 1.0)
24
- git (>= 1.2.5)
25
- github_api
26
- highline (>= 1.6.15)
27
- nokogiri (>= 1.5.10)
28
- rake
29
- rdoc
30
- jwt (1.5.2)
10
+ diff-lcs (1.2.5)
31
11
  method_source (0.8.2)
32
- mini_portile2 (2.0.0)
33
- multi_json (1.11.2)
34
- multi_xml (0.5.5)
35
- multipart-post (2.0.0)
36
- nokogiri (1.6.7.1)
37
- mini_portile2 (~> 2.0.0.rc2)
38
- oauth2 (1.0.0)
39
- faraday (>= 0.8, < 0.10)
40
- jwt (~> 1.0)
41
- multi_json (~> 1.3)
42
- multi_xml (~> 0.5)
43
- rack (~> 1.2)
44
12
  pry (0.10.3)
45
13
  coderay (~> 1.1.0)
46
14
  method_source (~> 0.8.1)
47
15
  slop (~> 3.4)
48
- rack (1.6.4)
49
- rake (10.4.2)
50
- rdoc (4.2.0)
16
+ rake (10.5.0)
17
+ rspec (3.4.0)
18
+ rspec-core (~> 3.4.0)
19
+ rspec-expectations (~> 3.4.0)
20
+ rspec-mocks (~> 3.4.0)
21
+ rspec-core (3.4.1)
22
+ rspec-support (~> 3.4.0)
23
+ rspec-expectations (3.4.0)
24
+ diff-lcs (>= 1.2.0, < 2.0)
25
+ rspec-support (~> 3.4.0)
26
+ rspec-mocks (3.4.1)
27
+ diff-lcs (>= 1.2.0, < 2.0)
28
+ rspec-support (~> 3.4.0)
29
+ rspec-support (3.4.1)
51
30
  slop (3.6.0)
52
- thread_safe (0.3.5)
53
31
 
54
32
  PLATFORMS
55
33
  ruby
56
34
 
57
35
  DEPENDENCIES
58
- bundler
59
- jeweler
36
+ bundler (~> 1.11)
37
+ massa!
60
38
  pry
39
+ rake (~> 10.0)
40
+ rspec (~> 3.4)
61
41
 
62
42
  BUNDLED WITH
63
43
  1.11.2
data/LICENSE.txt CHANGED
@@ -1,20 +1,21 @@
1
- Copyright (c) 2015 Lucas Caton
1
+ The MIT License (MIT)
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
3
+ Copyright (c) 2016 Lucas Caton
10
4
 
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
13
11
 
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -5,29 +5,52 @@
5
5
  [![Coverage Status](https://img.shields.io/codeclimate/coverage/github/lucascaton/massa.svg)](https://codeclimate.com/github/lucascaton/massa)
6
6
  [![Code Climate](https://codeclimate.com/github/lucascaton/massa/badges/gpa.svg)](https://codeclimate.com/github/lucascaton/massa)
7
7
 
8
- Keep the quality, good practices and security of Rails projects.
8
+ It's common to see Rails projects becomming hard to maintain and less fun after a while.
9
+ This gem helps you to keep its quality, good practices and security.
10
+
11
+ ## Installation
12
+
13
+ Add the following lines to your application's Gemfile:
14
+
15
+ ```ruby
16
+ group :development, :test do
17
+ gem 'massa'
18
+ end
19
+ ```
20
+
21
+ And then execute:
22
+
23
+ $ bundle
9
24
 
10
25
  ## About the gem name
11
26
 
12
27
  "Massa" is a Portuguese slang which means "awesome",
13
28
  so once you add it to your project, it becomes "massa"!
14
29
 
30
+ ## Usage
31
+
32
+ Create a configuration file:
33
+
34
+ $ ... # TODO
35
+
36
+ Then, run:
37
+
38
+ $ massa
39
+
40
+ ## Development
41
+
42
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
43
+
44
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
45
+
15
46
  ## Contributing
16
47
 
17
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't
18
- been fixed yet.
19
- * Check out the issue tracker to make sure someone already hasn't requested it and / or
20
- contributed it.
21
- * Fork the project.
22
- * Start a feature / bugfix branch.
23
- * Commit and push until you are happy with your contribution.
24
- * Make sure to add tests for it. This is important so I don't break it in a future version
25
- unintentionally.
26
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own
27
- version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can
28
- cherry-pick around it.
29
- * Submit a Pull Request
48
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lucascaton/massa. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
49
+
50
+ ## License
51
+
52
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
30
53
 
31
54
  ## Copyright
32
55
 
33
- Copyright (c) 2015 Lucas Caton. See LICENSE.txt for further details.
56
+ Copyright (c) 2016 Lucas Caton.
data/Rakefile CHANGED
@@ -1,26 +1,6 @@
1
- require 'rubygems'
2
- require 'bundler'
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
- begin
5
- Bundler.setup(:default, :development)
6
- rescue Bundler::BundlerError => e
7
- $stderr.puts e.message
8
- $stderr.puts "Run `bundle install` to install missing gems"
9
- exit e.status_code
10
- end
4
+ RSpec::Core::RakeTask.new(:spec)
11
5
 
12
- require 'rake'
13
- require 'jeweler'
14
- require './lib/massa/version'
15
-
16
- Jeweler::Tasks.new do |gem|
17
- gem.name = 'massa'
18
- gem.homepage = 'http://github.com/lucascaton/massa'
19
- gem.license = 'MIT'
20
- gem.summary = %q{Keep the quality, good practices and security of Rails projects.}
21
- gem.description = %q{Keep the quality, good practices and security of Rails projects.}
22
- gem.authors = ['Lucas Caton']
23
- gem.version = Massa::VERSION
24
- end
25
-
26
- Jeweler::RubygemsDotOrgTasks.new
6
+ task default: :spec
data/bin/massa CHANGED
@@ -6,14 +6,20 @@ $LOAD_PATH.push File.expand_path('../../lib', __FILE__)
6
6
  options = {}
7
7
 
8
8
  OptionParser.new do |opts|
9
- opts.banner = 'Usage: massa [options]' # \n\nYou can use flags as such:'
9
+ opts.banner = 'Usage: massa [options]'
10
10
 
11
- opts.on('-h', '--help', 'Display this screen') do
11
+ opts.on('-h', '--help', 'Display this help') do
12
12
  puts opts
13
13
  exit
14
14
  end
15
15
 
16
- opts.on('-v', '--verbose', 'Run verbosely') do |v|
16
+ opts.on('-v', '--version', 'Display version') do |v|
17
+ require 'massa/version'
18
+ puts Massa::VERSION
19
+ exit
20
+ end
21
+
22
+ opts.on('-V', '--verbose', 'Run verbosely') do |v|
17
23
  options[:verbose] = v
18
24
  end
19
25
  end.parse!
@@ -28,7 +28,7 @@ module Massa
28
28
  end
29
29
 
30
30
  def gem_installed?(name, required:)
31
- return true if Bundler.require.map(&:name).include?(name)
31
+ return true if `gem query -i #{name}`.chomp == 'true'
32
32
 
33
33
  Massa::CLI.colorize :yellow, "༼ つ ◕_◕ ༽つ '#{name}' is not installed"
34
34
 
@@ -24,6 +24,6 @@
24
24
  :required: false
25
25
 
26
26
  - :description: 'RSpec'
27
- :gem_name: 'rspec'
27
+ :gem_name: 'rspec-rails'
28
28
  :command: 'RAILS_ENV=test bundle exec rspec'
29
29
  :required: true
data/lib/massa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
- class Massa
2
- VERSION = '0.0.2'
1
+ module Massa
2
+ VERSION = '0.0.3'
3
3
  end
data/massa.gemspec CHANGED
@@ -1,61 +1,25 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
- # stub: massa 0.0.2 ruby lib
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'massa/version'
6
4
 
7
- Gem::Specification.new do |s|
8
- s.name = "massa"
9
- s.version = "0.0.2"
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'massa'
7
+ spec.version = Massa::VERSION
8
+ spec.authors = ['Lucas Caton']
10
9
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Lucas Caton"]
14
- s.date = "2015-12-22"
15
- s.description = "Keep the quality, good practices and security of Rails projects."
16
- s.executables = ["massa"]
17
- s.extra_rdoc_files = [
18
- "LICENSE.txt",
19
- "README.md"
20
- ]
21
- s.files = [
22
- ".document",
23
- ".rspec",
24
- "Gemfile",
25
- "Gemfile.lock",
26
- "LICENSE.txt",
27
- "README.md",
28
- "Rakefile",
29
- "bin/massa",
30
- "lib/massa.rb",
31
- "lib/massa/analyzer.rb",
32
- "lib/massa/cli.rb",
33
- "lib/massa/default_tools.yml",
34
- "lib/massa/tool.rb",
35
- "lib/massa/version.rb",
36
- "massa.gemspec"
37
- ]
38
- s.homepage = "http://github.com/lucascaton/massa"
39
- s.licenses = ["MIT"]
40
- s.rubygems_version = "2.4.8"
41
- s.summary = "Keep the quality, good practices and security of Rails projects."
10
+ spec.summary = %q{Keep the quality, good practices and security of Rails projects.}
11
+ spec.description = %q{Keep the quality, good practices and security of Rails projects.}
12
+ spec.homepage = 'http://github.com/lucascaton/massa'
13
+ spec.license = 'MIT'
42
14
 
43
- if s.respond_to? :specification_version then
44
- s.specification_version = 4
15
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
+ spec.bindir = 'bin'
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.require_paths = ['lib']
45
19
 
46
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
- s.add_runtime_dependency(%q<bundler>, [">= 0"])
48
- s.add_development_dependency(%q<jeweler>, [">= 0"])
49
- s.add_development_dependency(%q<pry>, [">= 0"])
50
- else
51
- s.add_dependency(%q<bundler>, [">= 0"])
52
- s.add_dependency(%q<jeweler>, [">= 0"])
53
- s.add_dependency(%q<pry>, [">= 0"])
54
- end
55
- else
56
- s.add_dependency(%q<bundler>, [">= 0"])
57
- s.add_dependency(%q<jeweler>, [">= 0"])
58
- s.add_dependency(%q<pry>, [">= 0"])
59
- end
20
+ spec.add_development_dependency 'bundler', '~> 1.11'
21
+ spec.add_development_dependency 'rake', '~> 10.0'
22
+ spec.add_development_dependency 'rspec', '~> 3.4'
23
+ spec.add_development_dependency 'pry'
24
+ # spec.add_development_dependency 'simplecov'
60
25
  end
61
-
metadata CHANGED
@@ -1,43 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: massa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Caton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-22 00:00:00.000000000 Z
11
+ date: 2016-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
19
+ version: '1.11'
20
+ type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '1.11'
27
27
  - !ruby/object:Gem::Dependency
28
- name: jeweler
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.4'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.4'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: pry
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -57,12 +71,12 @@ email:
57
71
  executables:
58
72
  - massa
59
73
  extensions: []
60
- extra_rdoc_files:
61
- - LICENSE.txt
62
- - README.md
74
+ extra_rdoc_files: []
63
75
  files:
64
- - ".document"
76
+ - ".gitignore"
65
77
  - ".rspec"
78
+ - ".travis.yml"
79
+ - CODE_OF_CONDUCT.md
66
80
  - Gemfile
67
81
  - Gemfile.lock
68
82
  - LICENSE.txt
@@ -96,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
110
  version: '0'
97
111
  requirements: []
98
112
  rubyforge_project:
99
- rubygems_version: 2.4.8
113
+ rubygems_version: 2.5.1
100
114
  signing_key:
101
115
  specification_version: 4
102
116
  summary: Keep the quality, good practices and security of Rails projects.
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt