Skip to content

Commit

Permalink
Merge pull request #25 from lyrasis/facets-to-activesupport
Browse files Browse the repository at this point in the history
Facets to activesupport
  • Loading branch information
kspurgin authored Aug 3, 2021
2 parents 4345655 + 27a3a46 commit ed0b747
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 52 deletions.
7 changes: 0 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
source 'https://rubygems.org'

git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
gem 'csv', '~> 3.0'
gem 'facets', require: false

# Specify your gem's dependencies in kiba-extend.gemspec
gemspec

group :development do
gem 'rubocop', require: false
gem 'rubocop-rspec', require: false
end
24 changes: 11 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
PATH
remote: .
specs:
kiba-extend (1.15.3)
activesupport
kiba (>= 4.0.0)
kiba-common (>= 1.5.0)
xxhash
kiba-extend (1.15.4)
activesupport (~> 6.1.4)
csv (~> 3.0)
kiba (~> 4.0.0)
kiba-common (~> 1.5.0)
xxhash (~> 0.4)

GEM
remote: https://rubygems.org/
Expand All @@ -19,9 +20,8 @@ GEM
ast (2.4.2)
coderay (1.1.2)
concurrent-ruby (1.1.9)
csv (3.1.9)
csv (3.2.0)
diff-lcs (1.3)
facets (3.1.0)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
kiba (4.0.0)
Expand Down Expand Up @@ -52,13 +52,13 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.3)
rubocop (1.18.3)
rubocop (1.18.4)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.7.0, < 2.0)
rubocop-ast (>= 1.8.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.8.0)
Expand All @@ -78,14 +78,12 @@ PLATFORMS

DEPENDENCIES
bundler (>= 1.17)
csv (~> 3.0)
facets
kiba-extend!
pry (~> 0.12.2)
rake (~> 13.0)
rspec (~> 3.0)
rubocop
rubocop-rspec
rubocop (~> 1.18.4)
rubocop-rspec (~> 2.4.0)

BUNDLED WITH
2.1.4
15 changes: 8 additions & 7 deletions kiba-extend.gemspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'kiba/extend/version'
require_relative 'lib/kiba/extend/version'

Gem::Specification.new do |spec|
spec.name = 'kiba-extend'
Expand Down Expand Up @@ -37,13 +35,16 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_dependency 'activesupport'
spec.add_dependency 'kiba', '>= 4.0.0'
spec.add_dependency 'kiba-common', '>= 1.5.0'
spec.add_dependency 'xxhash'
spec.add_dependency 'activesupport', '~> 6.1.4'
spec.add_dependency 'csv', '~> 3.0'
spec.add_dependency 'kiba', '~> 4.0.0'
spec.add_dependency 'kiba-common', '~> 1.5.0'
spec.add_dependency 'xxhash', '~> 0.4'

spec.add_development_dependency 'bundler', '>= 1.17'
spec.add_development_dependency 'pry', '~> 0.12.2'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rubocop', '~> 1.18.4'
spec.add_development_dependency 'rubocop-rspec', '~> 2.4.0'
end
33 changes: 9 additions & 24 deletions lib/kiba/extend.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# frozen_string_literal: true

require "active_support"
require "active_support/core_ext/object"
require 'kiba'
require 'kiba-common/sources/csv'
require 'kiba-common/destinations/csv'
require 'pry'
require 'active_support/all'
require 'xxhash'
require 'facets/kernel/blank'

require 'kiba/extend/version'


# Default CSV options
CSVOPT = { headers: true, header_converters: :symbol }.freeze
Expand All @@ -22,30 +25,12 @@
module Kiba
# Provides a suite of abstract, reusable, well-tested data transformations for use in Kiba ETL pipelines
module Extend
autoload :VERSION, 'extend/version'

puts "kiba-extend version: #{Kiba::Extend::VERSION}"

require 'kiba/extend/fieldset'
require 'kiba/extend/destinations/csv'
require 'kiba/extend/transforms/helpers'
require 'kiba/extend/transforms/append'
require 'kiba/extend/transforms/clean'
require 'kiba/extend/transforms/combine_values'
require 'kiba/extend/transforms/copy'
require 'kiba/extend/transforms/deduplicate'
require 'kiba/extend/transforms/cspace'
require 'kiba/extend/transforms/delete'
require 'kiba/extend/transforms/explode'
require 'kiba/extend/transforms/filter_rows'
require 'kiba/extend/transforms/merge'
require 'kiba/extend/transforms/ms_access'
require 'kiba/extend/transforms/prepend'
require 'kiba/extend/transforms/rename'
require 'kiba/extend/transforms/replace'
require 'kiba/extend/transforms/reshape'
require 'kiba/extend/transforms/split'
require 'kiba/extend/utils/lookup'
# Require application files
Dir.glob("#{__dir__}/**/*").sort.select{ |path| path.match?(/\.rb$/) }.each do |rbfile|
require rbfile.delete_prefix("#{File.expand_path(__dir__)}/lib/")
end

# strips, collapses multiple spaces, removes terminal commas, strips again
CSV::Converters[:stripplus] = lambda { |s|
Expand Down
2 changes: 2 additions & 0 deletions lib/kiba/extend/transforms/clean.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'kiba/extend/transforms/helpers'

module Kiba
module Extend
module Transforms
Expand Down
2 changes: 1 addition & 1 deletion lib/kiba/extend/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Kiba
module Extend
VERSION = '1.15.3'
VERSION = '1.15.4'
end
end

0 comments on commit ed0b747

Please sign in to comment.