Commit bbf1c61aea298a9b3ccd2545d3a503ebe8797cc4

Authored by Joe Weakley
1 parent 724c1cbe

Updated documentation and add rubocop.

1 -source "https://rubygems.org" 1 +# frozen_string_literal: true
2 2
3 -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } 3 +source 'https://rubygems.org'
  4 +
  5 +git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4 6
5 gemspec 7 gemspec
@@ -3,20 +3,39 @@ PATH @@ -3,20 +3,39 @@ PATH
3 specs: 3 specs:
4 syspro-ruby (0.1.0) 4 syspro-ruby (0.1.0)
5 faraday (~> 0.10) 5 faraday (~> 0.10)
  6 + nokogiri (~> 1.8.2)
6 7
7 GEM 8 GEM
8 remote: https://rubygems.org/ 9 remote: https://rubygems.org/
9 specs: 10 specs:
  11 + ast (2.4.0)
10 coderay (1.1.2) 12 coderay (1.1.2)
11 faraday (0.14.0) 13 faraday (0.14.0)
12 multipart-post (>= 1.2, < 3) 14 multipart-post (>= 1.2, < 3)
13 method_source (0.9.0) 15 method_source (0.9.0)
  16 + mini_portile2 (2.3.0)
14 minitest (5.11.3) 17 minitest (5.11.3)
15 multipart-post (2.0.0) 18 multipart-post (2.0.0)
  19 + nokogiri (1.8.2)
  20 + mini_portile2 (~> 2.3.0)
  21 + parallel (1.12.1)
  22 + parser (2.5.0.5)
  23 + ast (~> 2.4.0)
  24 + powerpack (0.1.1)
16 pry (0.11.3) 25 pry (0.11.3)
17 coderay (~> 1.1.0) 26 coderay (~> 1.1.0)
18 method_source (~> 0.9.0) 27 method_source (~> 0.9.0)
  28 + rainbow (3.0.0)
19 rake (10.5.0) 29 rake (10.5.0)
  30 + rubocop (0.54.0)
  31 + parallel (~> 1.10)
  32 + parser (>= 2.5)
  33 + powerpack (~> 0.1)
  34 + rainbow (>= 2.2.2, < 4.0)
  35 + ruby-progressbar (~> 1.7)
  36 + unicode-display_width (~> 1.0, >= 1.0.1)
  37 + ruby-progressbar (1.9.0)
  38 + unicode-display_width (1.3.0)
20 39
21 PLATFORMS 40 PLATFORMS
22 ruby 41 ruby
@@ -26,6 +45,7 @@ DEPENDENCIES @@ -26,6 +45,7 @@ DEPENDENCIES
26 minitest (~> 5.0) 45 minitest (~> 5.0)
27 pry (~> 0.11) 46 pry (~> 0.11)
28 rake (~> 10.0) 47 rake (~> 10.0)
  48 + rubocop (~> 0.54.0)
29 syspro-ruby! 49 syspro-ruby!
30 50
31 BUNDLED WITH 51 BUNDLED WITH
@@ -177,6 +177,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To @@ -177,6 +177,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
177 177
178 ## Contributing 178 ## Contributing
179 179
  180 +Run `bundle exec rake` and ensure everything looks good.
  181 +
180 Bug reports and pull requests are welcome on GitHub at https://github.com/ike/syspro-ruby. 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. 182 Bug reports and pull requests are welcome on GitHub at https://github.com/ike/syspro-ruby. 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.
181 183
182 ## License 184 ## License
@@ -185,4 +187,4 @@ The gem is available as open source under the terms of the [MIT License](https:/ @@ -185,4 +187,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
185 187
186 ## Code of Conduct 188 ## Code of Conduct
187 189
188 -Everyone interacting in the Syspro project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ike/syspro-ruby/blob/master/CODE_OF_CONDUCT.md). 190 +Everyone interacting in the Syspro project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/wildland/code-of-conduct).
1 -require "bundler/gem_tasks"  
2 -require "rake/testtask" 1 +# frozen_string_literal: true
  2 +
  3 +require 'bundler/gem_tasks'
  4 +require 'rake/testtask'
  5 +require 'rubocop/rake_task'
3 6
4 Rake::TestTask.new(:test) do |t| 7 Rake::TestTask.new(:test) do |t|
5 - t.libs << "test"  
6 - t.libs << "lib"  
7 - t.test_files = FileList["test/**/*_test.rb"] 8 + t.libs << 'test'
  9 + t.libs << 'lib'
  10 + t.test_files = FileList['test/**/*_test.rb']
8 end 11 end
9 12
10 -task :default => :test 13 +task default: %i[test rubocop]
  14 +
  15 +RuboCop::RakeTask.new(:rubocop) do |t|
  16 + t.options = ['--display-cop-names']
  17 +end
syspro-ruby.gemspec
1 -lib = File.expand_path("../lib", __FILE__) 1 +# frozen_string_literal: true
  2 +
  3 +lib = File.expand_path('lib', __dir__)
2 $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3 -require "syspro/version" 5 +require 'syspro/version'
4 6
5 Gem::Specification.new do |spec| 7 Gem::Specification.new do |spec|
6 - spec.name = "syspro-ruby" 8 + spec.name = 'syspro-ruby'
7 spec.version = Syspro::VERSION 9 spec.version = Syspro::VERSION
8 - spec.authors = ["Isaac Lewis"]  
9 - spec.email = ["isaac@ike.io"] 10 + spec.authors = ['Isaac Lewis']
  11 + spec.email = ['isaac@ike.io']
10 12
11 - spec.summary = %q{SYSPRO 7 Api Ruby adapter}  
12 - spec.license = "MIT" 13 + spec.summary = 'SYSPRO 7 Api Ruby adapter'
  14 + spec.license = 'MIT'
13 15
14 # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' 16 # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
15 # to allow pushing to a single host or delete this section to allow pushing to any host. 17 # to allow pushing to a single host or delete this section to allow pushing to any host.
16 if spec.respond_to?(:metadata) 18 if spec.respond_to?(:metadata)
17 - spec.metadata["allowed_push_host"] = "http://rubygems.org" 19 + spec.metadata['allowed_push_host'] = 'http://rubygems.org'
18 else 20 else
19 - raise "RubyGems 2.0 or newer is required to protect against " \  
20 - "public gem pushes." 21 + raise 'RubyGems 2.0 or newer is required to protect against ' \
  22 + 'public gem pushes.'
21 end 23 end
  24 + spec.required_ruby_version = '>= 1.9.0'
22 25
23 - spec.files = `git ls-files -z`.split("\x0").reject do |f| 26 + spec.files = `git ls-files -z`.split("\x0").reject do |f|
24 f.match(%r{^(test|spec|features)/}) 27 f.match(%r{^(test|spec|features)/})
25 end 28 end
26 - spec.bindir = "exe" 29 + spec.bindir = 'exe'
27 spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } 30 spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28 - spec.require_paths = ["lib"] 31 + spec.require_paths = ['lib']
29 32
30 - spec.add_dependency("faraday", "~> 0.10") 33 + spec.add_dependency('faraday', '~> 0.10')
  34 + spec.add_dependency('nokogiri', '~> 1.8.2')
31 35
32 - spec.add_development_dependency "bundler", "~> 1.16"  
33 - spec.add_development_dependency "pry", "~> 0.11"  
34 - spec.add_development_dependency "rake", "~> 10.0"  
35 - spec.add_development_dependency "minitest", "~> 5.0" 36 + spec.add_development_dependency 'bundler', '~> 1.16'
  37 + spec.add_development_dependency 'minitest', '~> 5.0'
  38 + spec.add_development_dependency 'pry', '~> 0.11'
  39 + spec.add_development_dependency 'rake', '~> 10.0'
  40 + spec.add_development_dependency 'rubocop', '~> 0.54.0'
36 end 41 end