stark_parameters 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,8 +7,10 @@ module StarkParameters
7
7
  klass.aliases = {}
8
8
  end
9
9
 
10
- def initialize(params)
11
- @params = make_strong_parameter(params)
10
+ def initialize(*params)
11
+ @params = params.each_with_object(make_strong_parameter({})) do |p, hash|
12
+ hash.merge!(make_strong_parameter(p))
13
+ end
12
14
  end
13
15
 
14
16
  def params
@@ -1,3 +1,3 @@
1
1
  module StarkParameters
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -49,4 +49,10 @@ describe StarkParameters do
49
49
  it { expect{ validator.params }.to_not raise_error }
50
50
  it { expect(validator.params.to_hash.keys).to_not include("author") }
51
51
  end
52
+
53
+ context "with multiple params" do
54
+ let(:validator) { test_klass.new(full_params.except("name"), {"name" => "Ryan"}) }
55
+
56
+ it { expect(validator.params.to_hash).to include("name" => "Ryan") }
57
+ end
52
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stark_parameters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: