Commit 87fd11a17b2f2c34b9df409f79143376c8026924
1 parent
872ee70b
reorg
Showing
10 changed files
with
28 additions
and
169 deletions
Show diff stats
.rspec deleted
CODE_OF_CONDUCT.md
| @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. | @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. | ||
| 55 | ## Enforcement | 55 | ## Enforcement |
| 56 | 56 | ||
| 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be |
| 58 | -reported by contacting the project team at isaac@ike.io. All | 58 | +reported by contacting the project team at ike@wild.land. All |
| 59 | complaints will be reviewed and investigated and will result in a response that | 59 | complaints will be reviewed and investigated and will result in a response that |
| 60 | is deemed necessary and appropriate to the circumstances. The project team is | 60 | is deemed necessary and appropriate to the circumstances. The project team is |
| 61 | obligated to maintain confidentiality with regard to the reporter of an incident. | 61 | obligated to maintain confidentiality with regard to the reporter of an incident. |
LICENSE deleted
| 1 | -MIT License | ||
| 2 | - | ||
| 3 | -Copyright (c) 2018 Isaac Lewis | ||
| 4 | - | ||
| 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: | ||
| 11 | - | ||
| 12 | -The above copyright notice and this permission notice shall be included in all | ||
| 13 | -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 THE | ||
| 21 | -SOFTWARE. |
README.md
| @@ -26,7 +26,7 @@ TODO: Write usage instructions here | @@ -26,7 +26,7 @@ TODO: Write usage instructions here | ||
| 26 | 26 | ||
| 27 | ## Development | 27 | ## Development |
| 28 | 28 | ||
| 29 | -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. | 29 | +After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. |
| 30 | 30 | ||
| 31 | 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). | 31 | 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). |
| 32 | 32 | ||
| @@ -41,6 +41,3 @@ The gem is available as open source under the terms of the [MIT License](https:/ | @@ -41,6 +41,3 @@ The gem is available as open source under the terms of the [MIT License](https:/ | ||
| 41 | ## Code of Conduct | 41 | ## Code of Conduct |
| 42 | 42 | ||
| 43 | 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/[USERNAME]/syspro/blob/master/CODE_OF_CONDUCT.md). | 43 | 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/[USERNAME]/syspro/blob/master/CODE_OF_CONDUCT.md). |
| 44 | - | ||
| 45 | -# syspro | ||
| 46 | -Syspro Rails adapter |
Rakefile
| 1 | require "bundler/gem_tasks" | 1 | require "bundler/gem_tasks" |
| 2 | -require "rspec/core/rake_task" | 2 | +require "rake/testtask" |
| 3 | 3 | ||
| 4 | -RSpec::Core::RakeTask.new(:spec) | 4 | +Rake::TestTask.new(:test) do |t| |
| 5 | + t.libs << "test" | ||
| 6 | + t.libs << "lib" | ||
| 7 | + t.test_files = FileList["test/**/*_test.rb"] | ||
| 8 | +end | ||
| 5 | 9 | ||
| 6 | -task :default => :spec | 10 | +task :default => :test |
spec/spec_helper.rb deleted
| 1 | -require "bundler/setup" | ||
| 2 | -require "syspro" | ||
| 3 | - | ||
| 4 | -RSpec.configure do |config| | ||
| 5 | - # Enable flags like --only-failures and --next-failure | ||
| 6 | - config.example_status_persistence_file_path = ".rspec_status" | ||
| 7 | - | ||
| 8 | - # Disable RSpec exposing methods globally on `Module` and `main` | ||
| 9 | - config.disable_monkey_patching! | ||
| 10 | - | ||
| 11 | - config.expect_with :rspec do |c| | ||
| 12 | - c.syntax = :expect | ||
| 13 | - end | ||
| 14 | -end |
spec/syspro_spec.rb deleted
| 1 | -RSpec.describe Syspro do | ||
| 2 | - server_name = "dev3" | ||
| 3 | - | ||
| 4 | - Rspec.describe PrimitiveClient do | ||
| 5 | - base_url = "http://#{server_name}/SYSPROWCFService" | ||
| 6 | - binding = "RESTHttp" | ||
| 7 | - | ||
| 8 | - it "has a version number" do | ||
| 9 | - expect(Syspro::VERSION).not_to be nil | ||
| 10 | - end | ||
| 11 | - | ||
| 12 | - it "does something useful" do | ||
| 13 | - expect(false).to eq(true) | ||
| 14 | - end | ||
| 15 | - | ||
| 16 | - it "can be instantiated" do | ||
| 17 | - expect { | ||
| 18 | - sys = Syspro::PrimitiveClient.new(base_url, binding) | ||
| 19 | - }.not_to raise_error | ||
| 20 | - end | ||
| 21 | - | ||
| 22 | - it "can login to a syspro database" do | ||
| 23 | - sys = Syspro::PrimitiveClient.new(base_url, binding) | ||
| 24 | - login_reply = sys.login(operator_name, password, company_id, company_password) | ||
| 25 | - | ||
| 26 | - expect(login_reply).to eq(login_reply_example) | ||
| 27 | - end | ||
| 28 | - | ||
| 29 | - it "can logoff from a syspro database" do | ||
| 30 | - sys = Syspro::PrimitiveClient.new(base_url, binding) | ||
| 31 | - logoff_reply = sys.logoff(user_id) | ||
| 32 | - | ||
| 33 | - expect(logoff_reply).to eq(logoff_reply_example) | ||
| 34 | - end | ||
| 35 | - | ||
| 36 | - Rspec.describe Query do | ||
| 37 | - sys = Syspro::PrimitiveClient.new(base_url, binding) | ||
| 38 | - | ||
| 39 | - it "can query browse" do | ||
| 40 | - query_result = sys.query_browse(user_id, query_object) | ||
| 41 | - | ||
| 42 | - expect(query_result).to eq(query_result_example) | ||
| 43 | - end | ||
| 44 | - | ||
| 45 | - it "can query fetch" do | ||
| 46 | - query_result = sys.query_fetch(user_id, query_object) | ||
| 47 | - | ||
| 48 | - expect(query_result).to eq(query_result_example) | ||
| 49 | - end | ||
| 50 | - | ||
| 51 | - it "can query query" do | ||
| 52 | - query_result = sys.query_query(user_id, business_object, query_object) | ||
| 53 | - | ||
| 54 | - expect(query_result).to eq(query_result_example) | ||
| 55 | - end | ||
| 56 | - end | ||
| 57 | - | ||
| 58 | - Rspec.describe Setup do | ||
| 59 | - sys = Syspro::PrimitiveClient.new(base_url, binding) | ||
| 60 | - | ||
| 61 | - it "can add" do | ||
| 62 | - setup_result = sys.setup_add(user_id, business_object, params, query_object) | ||
| 63 | - | ||
| 64 | - expect(setup_result).to eq(setup_result_example) | ||
| 65 | - end | ||
| 66 | - | ||
| 67 | - it "can delete" do | ||
| 68 | - setup_result = sys.setup_delete(user_id, business_object, params, query_object) | ||
| 69 | - | ||
| 70 | - expect(setup_result).to eq(setup_result_example) | ||
| 71 | - end | ||
| 72 | - | ||
| 73 | - it "can update" do | ||
| 74 | - setup_result = sys.setup_update(user_id, business_object, params, query_object) | ||
| 75 | - | ||
| 76 | - expect(setup_result).to eq(setup_result_example) | ||
| 77 | - end | ||
| 78 | - end | ||
| 79 | - | ||
| 80 | - Rspec.describe Transaction do | ||
| 81 | - sys = Syspro::PrimitiveClient.new(base_url, binding) | ||
| 82 | - | ||
| 83 | - it "can build" do | ||
| 84 | - expect(sys.transaction_build(user_id, business_object, query_object)).to eq(transaction_result_example) | ||
| 85 | - end | ||
| 86 | - | ||
| 87 | - it "can post" do | ||
| 88 | - expect(sys.transaction_post(user_id, business_object, query_object)).to eq(transaction_result_example) | ||
| 89 | - end | ||
| 90 | - end | ||
| 91 | - | ||
| 92 | - Rspec.describe Asynchronous do | ||
| 93 | - # TODO: Describe asynchronous versions of above methods | ||
| 94 | - end | ||
| 95 | - | ||
| 96 | - end # Primitive | ||
| 97 | - | ||
| 98 | - Rpec.describe Client do | ||
| 99 | - base_url = "http://#{server_name}/SYSPROWCFService" | ||
| 100 | - binding = "RESTHttp" | ||
| 101 | - | ||
| 102 | - Rspec.describe Utilities do | ||
| 103 | - | ||
| 104 | - end | ||
| 105 | - | ||
| 106 | - Rspec.describe Query do | ||
| 107 | - end | ||
| 108 | - | ||
| 109 | - Rspec.describe Setup do | ||
| 110 | - end | ||
| 111 | - | ||
| 112 | - Rspec.describe Transaction do | ||
| 113 | - end | ||
| 114 | - end # Client | ||
| 115 | -end | ||
| 116 | - |
syspro.gemspec
| 1 | - | ||
| 2 | lib = File.expand_path("../lib", __FILE__) | 1 | lib = File.expand_path("../lib", __FILE__) |
| 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | 2 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) |
| 4 | require "syspro/version" | 3 | require "syspro/version" |
| @@ -7,17 +6,15 @@ Gem::Specification.new do |spec| | @@ -7,17 +6,15 @@ Gem::Specification.new do |spec| | ||
| 7 | spec.name = "syspro" | 6 | spec.name = "syspro" |
| 8 | spec.version = Syspro::VERSION | 7 | spec.version = Syspro::VERSION |
| 9 | spec.authors = ["Isaac Lewis"] | 8 | spec.authors = ["Isaac Lewis"] |
| 10 | - spec.email = ["isaac@ike.io"] | 9 | + spec.email = ["ike@wild.land"] |
| 11 | 10 | ||
| 12 | - spec.summary = %q{TODO: Write a short summary, because RubyGems requires one.} | ||
| 13 | - spec.description = %q{TODO: Write a longer description or delete this line.} | ||
| 14 | - spec.homepage = "TODO: Put your gem's website or public repo URL here." | 11 | + spec.summary = %q{Connection library for SYSPRO 7 API} |
| 15 | spec.license = "MIT" | 12 | spec.license = "MIT" |
| 16 | 13 | ||
| 17 | # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' | 14 | # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' |
| 18 | # to allow pushing to a single host or delete this section to allow pushing to any host. | 15 | # to allow pushing to a single host or delete this section to allow pushing to any host. |
| 19 | if spec.respond_to?(:metadata) | 16 | if spec.respond_to?(:metadata) |
| 20 | - spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'" | 17 | + spec.metadata["allowed_push_host"] = "http://rubygems.org" |
| 21 | else | 18 | else |
| 22 | raise "RubyGems 2.0 or newer is required to protect against " \ | 19 | raise "RubyGems 2.0 or newer is required to protect against " \ |
| 23 | "public gem pushes." | 20 | "public gem pushes." |
| @@ -32,5 +29,5 @@ Gem::Specification.new do |spec| | @@ -32,5 +29,5 @@ Gem::Specification.new do |spec| | ||
| 32 | 29 | ||
| 33 | spec.add_development_dependency "bundler", "~> 1.16" | 30 | spec.add_development_dependency "bundler", "~> 1.16" |
| 34 | spec.add_development_dependency "rake", "~> 10.0" | 31 | spec.add_development_dependency "rake", "~> 10.0" |
| 35 | - spec.add_development_dependency "rspec", "~> 3.0" | 32 | + spec.add_development_dependency "minitest", "~> 5.0" |
| 36 | end | 33 | end |