angular_sprinkles 0.2.1 → 0.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eed7aee04a4952f676338e250a4cb8f4eca0aac9
|
4
|
+
data.tar.gz: 46e54cfb72da69292b61b3093addd93d211aa2e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2af21d9b5c9d740184e23a5a4fa6ded80b234c4f05f643123b8e3044fa142c71f7ad4827fb53b65080c507508ee743bb8dde4e14df264abfa64df780c7709c53
|
7
|
+
data.tar.gz: 2f57f13b8f6010257dee08f6e67e88c1c1d6f4f02026142a91619123cec86592ffd1cb5d5dd10997d16fd0a03073d5b04a9d4cbeb614a56a3535746d5bd10a98
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/angular_sprinkles.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: angular_sprinkles 0.2.
|
5
|
+
# stub: angular_sprinkles 0.2.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "angular_sprinkles"
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -4,8 +4,14 @@ module AngularSprinkles
|
|
4
4
|
private
|
5
5
|
|
6
6
|
def augment_args
|
7
|
+
binding = { "ng-model" => @attribute_binding }
|
8
|
+
|
7
9
|
@args.tap do |args|
|
8
|
-
args.
|
10
|
+
if args.many?
|
11
|
+
args.second.reverse_merge!(binding)
|
12
|
+
else
|
13
|
+
args.push(binding)
|
14
|
+
end
|
9
15
|
end
|
10
16
|
end
|
11
17
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe AngularSprinkles::FormBinder::CheckBox do
|
4
|
-
let(:method) { ->(name,
|
5
|
-
let(:args) { [:attribute
|
4
|
+
let(:method) { ->(name, *opts) {} }
|
5
|
+
let(:args) { [:attribute] }
|
6
6
|
let(:attribute_binding) { double }
|
7
7
|
let(:object) { double(bind: attribute_binding) }
|
8
8
|
let(:params) { { method: method, args: args, object: object } }
|
@@ -11,6 +11,10 @@ describe AngularSprinkles::FormBinder::CheckBox do
|
|
11
11
|
augmented_args = described_class.new(params).call
|
12
12
|
expect(augmented_args.second["ng-model"]).to eq(attribute_binding)
|
13
13
|
|
14
|
+
args.push({})
|
15
|
+
augmented_args = described_class.new(params).call
|
16
|
+
expect(augmented_args.second["ng-model"]).to eq(attribute_binding)
|
17
|
+
|
14
18
|
args.push(1)
|
15
19
|
augmented_args = described_class.new(params).call
|
16
20
|
expect(augmented_args.second["ng-model"]).to eq(attribute_binding)
|