Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from appfolio/bankUseGemToolForCIAndAppraiseRub…
Browse files Browse the repository at this point in the history
…y271AndRails61

Bank use gem tool for ci and appraise ruby271 and rails61
  • Loading branch information
Maimer authored Jun 1, 2021
2 parents 583b4a0 + dfd9836 commit dce1f0c
Show file tree
Hide file tree
Showing 16 changed files with 195 additions and 95 deletions.
16 changes: 16 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2.1

orbs:
gem-tool: appfolio/gem-tool@volatile

workflows:
rc:
jobs:
- gem-tool/checkout_bundle_install_appraisal_rake_test:
name: test-ruby-271
context: appfolio_test_context
executor_tag: gem-tool/ruby_base_271
- gem-tool/checkout_bundle_install_appraisal_rake_test:
name: test-ruby-263
context: appfolio_test_context
executor_tag: gem-tool/ruby_base_263
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
doc
ri
# Because this is a gem, ignore Gemfile.lock:

Gemfile.lock
gemfiles/.bundle/
gemfiles/*.gemfile.lock

# And because this is Ruby, ignore the following
# (source: https://github.com/github/gitignore/blob/master/Ruby.gitignore):

*.gem
.bundle
coverage
pkg
log
test/tmp
tmp
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-2.7.1
9 changes: 9 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

case RUBY_VERSION
when '2.6.3', '2.7.1'
appraise "ruby-#{RUBY_VERSION}" do
end
else
raise "Unsupported Ruby version #{RUBY_VERSION}"
end
14 changes: 14 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

source 'https://rubygems.org' do
gem 'minitest', '>= 5.8', '< 6'
gem 'minitest-reporters', '>= 1.4', '< 2'
gem 'simplecov', '>= 0.20', '< 1', group: :test, require: false
end

source 'https://rubygems.pkg.github.com/appfolio' do
gem 'af_gems', '>= 9.2', '< 10', group: :development
gem 'af_testing', '>= 14.2', '< 15'
end

gemspec
23 changes: 0 additions & 23 deletions History.txt

This file was deleted.

13 changes: 0 additions & 13 deletions Manifest.txt

This file was deleted.

38 changes: 21 additions & 17 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
require 'rubygems'
require 'hoe'
$:.unshift(File.dirname(__FILE__) + "/lib")
require 'ofx-parser'
require 'bundler'

Hoe.plugin :gemspec
Hoe.spec('ofx-parser') do |p|
p.author = 'Andrew A. Smith'
p.email = '[email protected]'
p.rubyforge_name = 'ofx-parser'
p.summary = 'ofx-parser is a ruby library for parsing OFX 1.x data.'
p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
p.urls = ['http://ofx-parser.rubyforge.org/']
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
p.extra_deps << ["hpricot", ">= 0.6"]
p.need_zip = true
p.need_tar = false
p.version = OfxParser::VERSION
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
warn e.message
warn 'Run `bundle install` to install missing gems'
exit e.status_code
end

require 'af_gems'

Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end

namespace :test do
AfGems::RubyAppraisalTask.new(:all, ['ruby-2.6.3', 'ruby-2.7.1'])
end

task default: :test
14 changes: 14 additions & 0 deletions gemfiles/ruby_2.6.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file was generated by Appraisal

source "https://rubygems.org" do
gem "minitest", ">= 5.8", "< 6"
gem "minitest-reporters", ">= 1.4", "< 2"
gem "simplecov", ">= 0.20", "< 1", group: :test, require: false
end

source "https://rubygems.pkg.github.com/appfolio" do
gem "af_gems", ">= 9.2", "< 10", group: :development
gem "af_testing", ">= 14.2", "< 15"
end

gemspec path: "../"
14 changes: 14 additions & 0 deletions gemfiles/ruby_2.7.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file was generated by Appraisal

source "https://rubygems.org" do
gem "minitest", ">= 5.8", "< 6"
gem "minitest-reporters", ">= 1.4", "< 2"
gem "simplecov", ">= 0.20", "< 1", group: :test, require: false
end

source "https://rubygems.pkg.github.com/appfolio" do
gem "af_gems", ">= 9.2", "< 10", group: :development
gem "af_testing", ">= 14.2", "< 15"
end

gemspec path: "../"
2 changes: 0 additions & 2 deletions lib/ofx-parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
end

module OfxParser
VERSION = '1.1.0.af2'

class OfxParser

# Creates and returns an Ofx instance when given a well-formed OFX document,
Expand Down
5 changes: 5 additions & 0 deletions lib/ofx-parser/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module OfxParser
VERSION = '1.1.0.af2'
end
2 changes: 1 addition & 1 deletion lib/ofx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def method_missing(meth, *args) #:nodoc:
end
end

def respond_to?(meth) #:nodoc:
def respond_to?(meth, include_all = false) #:nodoc:
monetary_method_call?(meth) ? true : super
end

Expand Down
22 changes: 22 additions & 0 deletions ofx-parser.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

require_relative 'lib/ofx-parser/version'

Gem::Specification.new do |spec|
spec.name = 'ofx-parser'
spec.version = OfxParser::VERSION
spec.platform = Gem::Platform::RUBY
spec.author = 'AppFolio'
spec.email = '[email protected]'
spec.description = 'Library to parse a realistic subset of the lengthy OFX 1.x specification.'
spec.summary = spec.description
spec.homepage = 'https://github.com/appfolio/ofx-parser'
spec.license = 'Nonstandard'
spec.files = Dir['**/*'].select { |f| f[%r{^(lib/|app/|config/|Gemfile$|Rakefile|README.md|.*gemspec)}] }
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.metadata['allowed_push_host'] = 'https://rubygems.pkg.github.com/appfolio'

spec.add_dependency('hpricot', ['>= 0.6', '< 1'])
end
Loading

0 comments on commit dce1f0c

Please sign in to comment.