activeset 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 940224ee8c773aed3a1ce2e3cb0c93f425aff2c9
4
- data.tar.gz: ff881b84c798ac46a483ee07b6c29022eec702eb
3
+ metadata.gz: 0b2aa11544be377a08e047b5040128f7d3d10f1c
4
+ data.tar.gz: ddb9a50f0b72ca006b98538a03ffbbeb5cd05f7f
5
5
  SHA512:
6
- metadata.gz: ed967c35778e17b42ba0820c35752ee8e119cf66b6d57a19d40f03effb1b96998715099519b1eb13d5e2eeafeca2c4349c5c6898511ad0604d8378a957e69eb7
7
- data.tar.gz: f1222be08e6898a21d163494ff2d45c07cac85e0fb3d4206bdfe9554109c70e61c23dc3dc8636ed7b4162e2118c07ed2f2a8ed573af70f34ccd246f3851b1b59
6
+ metadata.gz: '018352eadd91866a0b5bfa05aae1f1653ae7e4f674f681e89fbf497d22e42d76b43fdd44df8b0e961cdb56179c1e83f84e9fed5bd13086022c141e400c1d542a'
7
+ data.tar.gz: 69a1acc99c63fbcd6b25def52599d0553c072c424ba689deddafc34444ad8d9ae0bbe8dada17835667ddd6ad9454ebccd462063d4c129ab0564c9cd73f224e51
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ v 0.5.1
2
+ - Fix bug where `transform` method tried to return a new instance of ActiveSet. It should simply returned the transformed value.
3
+ - Fail if tranformer can’t handle passed format
4
+ - Fix bug where Paginator wasn’t returning the proper result
5
+ - Ensure the `String#titleize` method is available for the Instruction::Entry
1
6
  v 0.5.0
2
7
  - Ensure the titleized method is delegated from the Instructions::Entry class
3
8
  - Make the Instructions Keypath class more resilient against nils
@@ -50,6 +50,6 @@ class ActiveSet
50
50
 
51
51
  def transform(instructions)
52
52
  transformer = TransformProcessor.new(@set, instructions)
53
- self.class.new(transformer.process)
53
+ transformer.process
54
54
  end
55
55
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'active_support/core_ext/array/wrap'
4
4
  require 'active_support/core_ext/object/try'
5
+ require 'active_support/core_ext/string/inflections'
5
6
 
6
7
  class ActiveSet
7
8
  class Instructions
@@ -6,7 +6,8 @@ require_relative './paginate/enumerable_adapter'
6
6
  class ActiveSet
7
7
  class PaginateProcessor < BaseProcessor
8
8
  def process
9
- adapter.new(@set, instruction).process
9
+ output = adapter.new(@set, instruction).process
10
+ output[:set]
10
11
  end
11
12
 
12
13
  private
@@ -6,7 +6,11 @@ require_relative './transform/csv_adapter'
6
6
  class ActiveSet
7
7
  class TransformProcessor < BaseProcessor
8
8
  def process
9
- adapter_for(format: format).new(@set, columns).process
9
+ fail "Format #{format} is not currently supported as option for tranform" unless %w[csv].include?(format)
10
+
11
+ adapter = adapter_for(format: format)
12
+ output = adapter.new(@set, columns).process
13
+ output[:set]
10
14
  end
11
15
 
12
16
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ActiveSet
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-19 00:00:00.000000000 Z
11
+ date: 2017-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport