activeadmin-refinerycms-authentication 0.0.2 → 0.0.3

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: 164ccaf2c38de9e195e0b073f2fc5a90cc24dd4a
4
- data.tar.gz: e0a639f835e86dd7faa07927bfe05d71686230e6
3
+ metadata.gz: 120c2ef887a9ab13de7bc4215afcb3b7cb2d3726
4
+ data.tar.gz: 06e8a34f1fc98131535f6974737af14625f54d7d
5
5
  SHA512:
6
- metadata.gz: ee56f47b688dd18ca803a690110ff672661512bef7b8321d3e3dea3e67f42d6e927141a73cba6495271fcecb815c9bec6d7c707dd8cd015d905af46919069e6e
7
- data.tar.gz: 4844b0e8db4a5e07bd762019285552841a23ccf010120e76e5da6f6aad0fc2fe627d6dc98b8606019fc2999432c11c78576fac4cded44187bb2d7f40bfe266a2
6
+ metadata.gz: 9f8deac8782c6ed525d8df02a840ae6376417301589ad1b2a245fcec7b269f4e662fd13ad41b94e9151f94ec048ac42d6fcf7e833814c300005f9c359f2556e1
7
+ data.tar.gz: c58c1a748748682d570cb1d79810773e909bcc6764b4828621860d058e67f63aebff7edeab43d773d67dc3668806b2584f8114b2b92e0e132d5ab56eeb4c896d
@@ -2,13 +2,34 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "activeadmin-refinerycms-authentication"
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
  s.authors = ["eugen neagoe"]
7
7
  s.description = "A Refinery CMS and activeadmin connector"
8
8
  s.summary = "This will tell Refinery CMS to use ActiveAdmin for authentication."
9
9
  s.homepage = "https://github.com/appmospheres/activeadmin-refinery-authentication"
10
10
 
11
- s.files = `git ls-files`.split($/)
11
+ s.files = [
12
+ 'Gemfile'.freeze,
13
+ 'LICENSE.txt'.freeze,
14
+ 'README.md'.freeze,
15
+ 'Rakefile'.freeze,
16
+ 'activeadmin-refinerycms-authentication.gemspec'.freeze,
17
+ 'app/decorators/controllers/action_controller_base_decorator.rb'.freeze,
18
+ 'app/decorators/controllers/refinery/admin_controller_decorator.rb'.freeze,
19
+ 'app/decorators/controllers/refinery/application_controller_decorator.rb'.freeze,
20
+ 'app/decorators/controllers/sessions_controller_decorator.rb'.freeze,
21
+ 'app/decorators/models/user_decorator.rb'.freeze,
22
+ 'app/models/user_plugin.rb'.freeze,
23
+ 'app/overrides/active_admin_link.rb'.freeze,
24
+ 'lib/activeadmin-refinerycms-authentication.rb'.freeze,
25
+ 'lib/activeadmin_refinery_authentication/authorisation_adapter.rb'.freeze,
26
+ 'lib/activeadmin_refinery_authentication/authorisation_manager.rb'.freeze,
27
+ 'lib/activeadmin_refinery_authentication/engine.rb'.freeze,
28
+ 'lib/generators/activeadmin_refinery_authentication/install/install_generator.rb'.freeze,
29
+ 'lib/generators/activeadmin_refinery_authentication/install/templates/_plugins_form.html.erb'.freeze,
30
+ 'lib/generators/activeadmin_refinery_authentication/install/templates/activeadmin-refinery-authentication.rb.erb'.freeze,
31
+ 'lib/generators/activeadmin_refinery_authentication/install/templates/migrations/create_user_plugins.rb'.freeze
32
+ ]
12
33
  s.test_files = s.files.grep(%r{^spec/})
13
34
  s.require_paths = ["lib"]
14
35
 
@@ -23,7 +23,7 @@ unless Rails.application.config.x.aa_refinery.empty?
23
23
 
24
24
  def plugins=(plugin_names)
25
25
  filtered_names = filter_existing_plugins_for(string_plugin_names(plugin_names))
26
- create_plugins_for(filtered_names)
26
+ build_or_create_plugins_for(filtered_names)
27
27
  end
28
28
 
29
29
  def active_plugins
@@ -53,8 +53,12 @@ unless Rails.application.config.x.aa_refinery.empty?
53
53
  plugin_names.select{ |plugin_name| plugin_name.is_a?(String) }
54
54
  end
55
55
 
56
- def create_plugins_for(plugin_names)
57
- plugin_names.each { |plugin_name| plugins.create name: plugin_name, position: plugin_position}
56
+ def build_or_create_plugins_for(plugin_names)
57
+ if persisted?
58
+ plugin_names.each { |plugin_name| plugins.create name: plugin_name, position: plugin_position}
59
+ else
60
+ plugin_names.each { |plugin_name| plugins.build name: plugin_name, position: plugin_position}
61
+ end
58
62
  end
59
63
 
60
64
  def plugin_position
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-refinerycms-authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - eugen neagoe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-01 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -106,7 +106,6 @@ files:
106
106
  - lib/generators/activeadmin_refinery_authentication/install/templates/_plugins_form.html.erb
107
107
  - lib/generators/activeadmin_refinery_authentication/install/templates/activeadmin-refinery-authentication.rb.erb
108
108
  - lib/generators/activeadmin_refinery_authentication/install/templates/migrations/create_user_plugins.rb
109
- - pkg/activeadmin-refinerycms-authentication-0.0.2.gem
110
109
  homepage: https://github.com/appmospheres/activeadmin-refinery-authentication
111
110
  licenses: []
112
111
  metadata: {}