ez-settings 0.1.0 → 0.1.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: ab92996758b0720c782a270a27937d4e62d2f84a
4
- data.tar.gz: ccad41c32652e4f590a428b7e64268e0605b1ee3
3
+ metadata.gz: caf64937214857f2b1dae105981ff36cbda1846b
4
+ data.tar.gz: 147fa9ad163b13f6e18f4eead814ab69bd19f961
5
5
  SHA512:
6
- metadata.gz: 1a07335a8448a2baf82d96f22c67855aa02c24cb8b2e8a2f9f14fa3a6304cf2b53448aa717670238253efef4aaa2515975787d6dba3cd31db8cfabab5940673d
7
- data.tar.gz: a61b3c69ff16ebe41297861b902add48fe025da4e95e748610c0e89570244293a6aeb238a7fca05b25df37ff151f3f8eb50e8fbcbdae85c682df42049816e0c2
6
+ metadata.gz: eb1ee85874297af4074545beb08ef06cea1f798940c7b1a5cfae8b5121f657b0a6bbac614c4932add6164b44d8112aff39128bf84355ba9a57cd7390c059203f
7
+ data.tar.gz: 61419a186371abcf55d158572f54f1465438510cefcc5fa2df03975108300c41912d63bf7f7eebf03754e4c64645140f71fd3dbb8e12c13ce7dfb6fbc4529903
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
1
  # Ez::Settings
2
+
3
+ [![Build Status](https://travis-ci.org/ez-engines/ez-settings.svg?branch=master)](https://travis-ci.org/ez-engines/ez-settings)
4
+
2
5
  **Ez Settings** (read as "easy settings") - one of the [ez-engines](https://github.com/ez-engines) collection that helps easily add settings interface to your [Rails](http://rubyonrails.org/) application.
3
6
 
4
7
  - Flexible tool with simple DSL
@@ -4,13 +4,17 @@ module Ez
4
4
  # should implement :params
5
5
 
6
6
  def interface
7
+ return unless params[:ez_settings_interface]
8
+
7
9
  # TODO: add raise exception in nil
8
10
  Ez::Registry.data(:settings_interfaces).find do |interface|
9
- interface.name == params[:interface].to_sym
11
+ interface.name == params[:ez_settings_interface].to_sym
10
12
  end
11
13
  end
12
14
 
13
15
  def group
16
+ return unless interface
17
+
14
18
  # TODO: add raise exception if nil
15
19
  interface.groups.find { |g| g.name == params[:group].to_sym }
16
20
  end
@@ -1,6 +1,6 @@
1
1
  class ActionDispatch::Routing::Mapper
2
2
  def ez_settings_for(interface)
3
- defaults interface: interface do
3
+ defaults ez_settings_interface: interface do
4
4
  mount Ez::Settings::Engine, at: '/settings', as: :ez_settings
5
5
  end
6
6
  end
@@ -1,5 +1,5 @@
1
1
  module Ez
2
2
  module Settings
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ez-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volodya Sveredyuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-28 00:00:00.000000000 Z
11
+ date: 2017-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ez-core
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 5.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 5.0.0
41
41
  - !ruby/object:Gem::Dependency