conjoin 0.0.71 → 0.0.72

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: becaec3897b25d20e6409644dd9dc65a147f72a8
4
- data.tar.gz: 077f06792bea9da2b6f522910b166eeb4c2fbc70
3
+ metadata.gz: 6ce076efde1f80dc8768b7f84f884cf4b6c6c1d7
4
+ data.tar.gz: 1b8a32ac5cb2b2cc431e5ba3aac90057abc6b45a
5
5
  SHA512:
6
- metadata.gz: 0d524b136af087bc3f7013bf82e15a5717fbfcfba1ef9ee7b8c481f9bf23b9f22f61656bd5909ea143f92fc8ed0c077582e8b328da4467f2b30a6b94a6d1c6b1
7
- data.tar.gz: 43f15a04692b313606402e6b9f63e379c65fcd7e34d457065d829725b08ca3d85c09e2c21806172aadbc83f3fc5519cc278ac89d01d7b3b641cda2dc4bf396dd
6
+ metadata.gz: 56a5928a355b0c68775f7d56fdb5d82dc4cc0da25d5a9e150436e407f42fe957da3af0fae4c79afbd4aedcb1e39c50819526a66b154c8765c76ad27d949044d5
7
+ data.tar.gz: ce4381f8146100aa27e14fada5f3d59cbc6e64174586dbefd395b28ded6175db7e9a8c631fa0c1d8a8cbd1c6934f771a63bebd87069d6524b6a94ba2778d4ebf
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency "cuba", "~> 3.1.1", '>= 3.1.1'
22
22
  spec.add_dependency "cuba-sugar", "~> 0.3.0", '>= 0.3.0'
23
- spec.add_dependency "dominate"
24
23
  spec.add_dependency "rack_csrf", "~> 2.4.0", '>= 2.4.0'
25
24
  spec.add_dependency "rack-protection", "~> 1.5.2", '>= 1.5.2'
26
25
  spec.add_dependency "r18n-core", "~> 1.1.10", '>= 1.1.10'
@@ -1,6 +1,5 @@
1
1
  require "conjoin/version"
2
- require "dominate/inflectors"
3
- # require "conjoin/recursive_ostruct"
2
+ require "conjoin/recursive_ostruct"
4
3
  require "conjoin/middleware"
5
4
  require "conjoin/env_string"
6
5
  require "conjoin/class_methods"
@@ -73,7 +73,7 @@ module Conjoin
73
73
  end
74
74
 
75
75
  def validates req_params, opts = {}
76
- req_params = req_params.to_h
76
+ req_params = req_params.is_a?(OpenStruct) ? req_params.to_hash : HashIndifferent.new(req_params)
77
77
  @req_params = req_params
78
78
 
79
79
  if as = opts.delete(:as)
@@ -129,7 +129,6 @@ module Conjoin
129
129
  return unless current_params
130
130
  # loop through associated records
131
131
  current_params.each do |name, value|
132
- name = name.to_s
133
132
  if name.end_with?("_attributes")
134
133
  associated_name = name.gsub(/_attributes$/, '')
135
134
  associated_model = model.try associated_name
@@ -142,7 +141,6 @@ module Conjoin
142
141
  elsif associated_model.kind_of? ActiveRecord::Associations::CollectionProxy
143
142
  new_current_params = current_params[name]
144
143
  associated_model.each_with_index do |current_model, i|
145
- new_current_params ||= []
146
144
  add_creator_and_updater_for current_model, current_user, new_current_params[i]
147
145
  end
148
146
  end
@@ -1,3 +1,3 @@
1
1
  module Conjoin
2
- VERSION = "0.0.71"
2
+ VERSION = "0.0.72"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjoin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.71
4
+ version: 0.0.72
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-12 00:00:00.000000000 Z
11
+ date: 2014-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cuba
@@ -50,20 +50,6 @@ dependencies:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: 0.3.0
53
- - !ruby/object:Gem::Dependency
54
- name: dominate
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: '0'
60
- type: :runtime
61
- prerelease: false
62
- version_requirements: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: '0'
67
53
  - !ruby/object:Gem::Dependency
68
54
  name: rack_csrf
69
55
  requirement: !ruby/object:Gem::Requirement