-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ignaciojonas/rubocop
Integrate Rubocop
- Loading branch information
Showing
56 changed files
with
1,138 additions
and
1,011 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
bin/ | ||
vendor/ | ||
.DS_Store | ||
.ruby-version | ||
coverage | ||
*.gem | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
inherit_from: .rubocop_todo.yml | ||
AllCops: | ||
RunRailsCops: true | ||
Exclude: | ||
- bin/**/* | ||
- vendor/**/* | ||
- auth0.gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Configuration parameters: CountComments. | ||
Metrics/MethodLength: | ||
Max: 15 | ||
|
||
# Configuration parameters: AllowURI, URISchemes. | ||
Metrics/LineLength: | ||
Max: 121 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
source "http://rubygems.org" | ||
source 'http://rubygems.org' | ||
|
||
# Specify your gem's dependencies in auth0.gemspec | ||
gemspec | ||
|
||
group :development do | ||
gem 'terminal-notifier-guard', require: false | ||
gem 'coveralls', require: false | ||
end | ||
gem 'rubocop', require: false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
scope group: :unit_test | ||
|
||
group :unit_test do | ||
guard 'rspec', cmd: "bundle exec rspec -P \"spec/lib/auth0/**/*#{ENV['PATTERN']}*_spec.rb\" --drb --format Fuubar --color" do | ||
guard 'rspec', cmd: | ||
"bundle exec rspec -P \"spec/lib/auth0/**/*#{ENV['PATTERN']}*_spec.rb\"--drb --format Fuubar --color" do | ||
# run every updated spec file | ||
watch(%r{^spec/.+_spec\.rb$}) | ||
# run the lib specs when a file in lib/ changes | ||
watch(%r{^lib/(.+)\.rb$}) { "spec" } | ||
watch(%r{^lib/(.+)\.rb$}) { 'spec' } | ||
# run all test for helper changes | ||
watch('spec/spec_helper.rb') { "spec" } | ||
watch('spec/spec_helper.rb') { 'spec' } | ||
end | ||
end | ||
|
||
group :integration do | ||
guard 'rspec', cmd: "MODE=full bundle exec rspec -P \"spec/integration/**/*#{ENV['PATTERN']}*_spec.rb\" --drb --format Fuubar --color" do | ||
guard 'rspec', cmd: | ||
"MODE=full bundle exec rspec -P \"spec/integration/**/*#{ENV['PATTERN']}*_spec.rb\" --drb --format Fuubar --color" do | ||
# run every updated spec file | ||
watch(%r{^spec/.+_spec\.rb$}) | ||
# run the lib specs when a file in lib/ changes | ||
watch(%r{^lib/(.+)\.rb$}) { "spec" } | ||
watch(%r{^lib/(.+)\.rb$}) { 'spec' } | ||
# run all test for helper changes | ||
watch('spec/spec_helper.rb') { "spec" } | ||
watch('spec/spec_helper.rb') { 'spec' } | ||
end | ||
end | ||
|
||
group :full do | ||
guard 'rspec', cmd: "MODE=full bundle exec rspec --drb --format Fuubar --color" do | ||
guard 'rspec', cmd: | ||
'MODE=full bundle exec rspec --drb --format Fuubar --color' do | ||
# run every updated spec file | ||
watch(%r{^spec/.+_spec\.rb$}) | ||
# run the lib specs when a file in lib/ changes | ||
watch(%r{^lib/(.+)\.rb$}) { "spec" } | ||
watch(%r{^lib/(.+)\.rb$}) { 'spec' } | ||
# run all test for helper changes | ||
watch('spec/spec_helper.rb') { "spec" } | ||
watch('spec/spec_helper.rb') { 'spec' } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
#!/usr/bin/env rake | ||
require "bundler/gem_tasks" | ||
require 'bundler/gem_tasks' | ||
|
||
begin | ||
require 'rubocop/rake_task' | ||
RuboCop::RakeTask.new | ||
|
||
require 'rspec/core/rake_task' | ||
|
||
desc "Run Integration Tests" | ||
desc 'Run Integration Tests' | ||
RSpec::Core::RakeTask.new(:integration) do |t| | ||
t.pattern = FileList["spec/integration/**/*#{ENV['PATTERN']}*_spec.rb"] | ||
end | ||
|
||
|
||
desc "Run Unit Tests" | ||
desc 'Run Unit Tests' | ||
RSpec::Core::RakeTask.new(:spec) do |t| | ||
t.pattern = FileList["spec/lib/auth0/**/*#{ENV['PATTERN']}*_spec.rb"] | ||
end | ||
|
||
desc "Run All Suites" | ||
desc 'Run All Suites' | ||
RSpec::Core::RakeTask.new(:all) | ||
|
||
task :default => :spec | ||
task default: [:rubocop, :spec] | ||
rescue LoadError | ||
#No RSpec | ||
puts 'Load Error - No RSpec' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
# -*- encoding: utf-8 -*- | ||
$:.push File.expand_path("../lib", __FILE__) | ||
require "auth0/version" | ||
$LOAD_PATH.push File.expand_path('../lib', __FILE__) | ||
require 'auth0/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "auth0" | ||
s.name = 'auth0' | ||
s.version = Auth0::VERSION | ||
s.authors = ["Auth0", "Jose Romaniello", "Ivan Petroe", "Patrik Ragnarsson"] | ||
s.email = ["[email protected]"] | ||
s.homepage = "https://github.com/auth0/ruby-auth0" | ||
s.summary = %q{Auth0 API Client} | ||
s.description = %q{Ruby client library for the Auth0 API.} | ||
s.authors = ['Auth0', 'Jose Romaniello', 'Ivan Petroe', 'Patrik Ragnarsson'] | ||
s.email = ['[email protected]'] | ||
s.homepage = 'https://github.com/auth0/ruby-auth0' | ||
s.summary = 'Auth0 API Client' | ||
s.description = 'Ruby client library for the Auth0 API.' | ||
|
||
s.rubyforge_project = "auth0" | ||
s.rubyforge_project = 'auth0' | ||
|
||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | ||
s.require_paths = ["lib"] | ||
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } | ||
s.require_paths = ['lib'] | ||
|
||
s.add_runtime_dependency 'httparty', '~> 0.13' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
require "auth0/version" | ||
require "auth0/mixins" | ||
require "auth0/exception" | ||
require "auth0/client" | ||
require "auth0_client" | ||
require 'auth0/version' | ||
require 'auth0/mixins' | ||
require 'auth0/exception' | ||
require 'auth0/client' | ||
require 'auth0_client' | ||
# Namespace for ruby-auth0 logic | ||
module Auth0 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.