ncore 2.0.6 → 2.0.7

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: b523ea09eeef01e0934a5234b7c18ae1fcefbaa4
4
- data.tar.gz: 706fb1317c0287044961e2b892a9eff172bed6b2
3
+ metadata.gz: 9e8ddfadecbc44cc598f232dd1a01eb6971943e6
4
+ data.tar.gz: 8fb58c11b5a129683a62e510f2cb4b24de754dbc
5
5
  SHA512:
6
- metadata.gz: 999a37b8ab9c97a4b95bd98821ca068b3fb8311f4d977fadcdf1c02407ea9b519098e04a62520c010b279206e103cb5959ad61b7461b192756180a332b44f9c0
7
- data.tar.gz: 0d228214b9969c3223ed238020e4f52d2d00d8808224e5c23c0beed6e74812749f59d703042e10670ad14a8fdf39277e6d44a5b700241753b698a3c7e77f2c22
6
+ metadata.gz: e1ecef6f44ffac66086639f6fb1ba9d6742c241f9f2f11c505361562249a1701d8f80bf5f7dbb38f961d296a142d9b87180b08e274edd3324c5a3ef03535acbd
7
+ data.tar.gz: 8009fa7beefffe6d43c55964580ceec6071e8f54f6d1f42d8f4441f24eddca82e419b678b96e1741908f7d70c2ec9fd24cf39ddbd15cfc4228dccc1df71a5e7f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ #### 2.0.7
2
+
3
+ - Accept ActionController::Parameters objects as attribute params
4
+
1
5
  #### 2.0.6
2
6
 
3
7
  - Allow ActiveSupport 5.1
data/lib/ncore.rb CHANGED
@@ -10,4 +10,5 @@ end
10
10
  require "ncore/methods/#{f}"
11
11
  end
12
12
 
13
+ require 'ncore/rails/action_controller' if defined?(::ActionController)
13
14
  require 'ncore/rails/active_model' if defined?(::ActiveModel)
@@ -0,0 +1,22 @@
1
+ require 'action_controller'
2
+
3
+ module NCore
4
+ module ActionController
5
+ module Parameters
6
+ extend ActiveSupport::Concern
7
+
8
+ included do
9
+ alias :with_indifferent_access :to_h
10
+ end
11
+
12
+ end
13
+ end
14
+ end
15
+
16
+
17
+ if defined?(ActionController::Parameters)
18
+ acp = ActionController::Parameters.new
19
+ unless acp.respond_to? :with_indifferent_access
20
+ ActionController::Parameters.include NCore::ActionController::Parameters
21
+ end
22
+ end
data/lib/ncore/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module NCore
2
- VERSION = '2.0.6'
2
+ VERSION = '2.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ncore
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Notioneer Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-09 00:00:00.000000000 Z
11
+ date: 2017-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -112,6 +112,7 @@ files:
112
112
  - lib/ncore/methods/find.rb
113
113
  - lib/ncore/methods/find_single.rb
114
114
  - lib/ncore/methods/update.rb
115
+ - lib/ncore/rails/action_controller.rb
115
116
  - lib/ncore/rails/active_model.rb
116
117
  - lib/ncore/rails/log_subscriber.rb
117
118
  - lib/ncore/singleton_base.rb