infopark_reactor 1.6.1 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  class ReactorController < ApplicationController
2
3
  def create_object
3
4
  obj_data = params[:obj] || {}
@@ -50,4 +51,4 @@ class ReactorController < ApplicationController
50
51
  format.json { render :json => :ok }
51
52
  end
52
53
  end
53
- end
54
+ end
data/config/routes.rb CHANGED
@@ -1,6 +1,7 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  Rails.application.routes.draw do
2
3
  post 'reactor/object' => 'reactor#create_object', :as => :create_object
3
4
  post 'reactor/release/:id' => 'reactor#release_object', :as => :release_object
4
5
  delete 'reactor/object/:id' => 'reactor#delete_object', :as => :delete_object
5
6
  put 'reactor/object/:id' => 'reactor#update_object', :as => :update_object
6
- end
7
+ end
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
21
  s.require_paths = ["lib", "lib/tools"]
22
22
 
23
- s.add_dependency 'rails', '<= 3.2.11', '>= 3.0.10'
23
+ s.add_dependency 'rails', '<= 3.2.12', '>= 3.0.10'
24
24
  s.add_dependency 'infopark_reactor_migrations', '>= 1.2.0'
25
25
  s.add_dependency 'infopark_rails_connector'
26
26
  s.add_dependency 'infopark_rails_connector_meta', '>= 0.0.3'
data/lib/engine.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
 
3
4
  class Engine < Rails::Engine
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # Runtime Rails version detection
2
3
  module Reactor
3
4
  def self.rails3_0?
@@ -35,4 +36,4 @@ require 'reactor/session/observers'
35
36
  require 'reactor/session/user'
36
37
 
37
38
  # require engine
38
- require File.expand_path('../engine', __FILE__) if defined?(Rails)
39
+ require File.expand_path('../engine', __FILE__) if defined?(Rails)
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  class AlreadyReleased < StandardError ; end
3
- end
4
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/attributes/date_serializer'
2
3
  require 'reactor/attributes/html_serializer'
3
4
  require 'reactor/attributes/link_list_serializer'
@@ -134,7 +135,7 @@ module Reactor
134
135
  end
135
136
 
136
137
  # attribute readers and writers
137
- #{attribute_methods}
138
+ #{attribute_methods.join("\n")}
138
139
 
139
140
  # parent-setting handling
140
141
  def parent=(parent_something)
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Attributes
3
4
  class DateSerializer
@@ -32,4 +33,4 @@ module Reactor
32
33
  end
33
34
  end
34
35
  end
35
- end
36
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/support/link_matcher'
2
3
 
3
4
  module Reactor
@@ -28,4 +29,4 @@ module Reactor
28
29
  end
29
30
  end
30
31
  end
31
- end
32
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/link/temporary_link'
2
3
 
3
4
  module Reactor
@@ -47,4 +48,4 @@ module Reactor
47
48
  end
48
49
  end
49
50
  end
50
- end
51
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/link/temporary_link'
2
3
  require 'infopark_rails_connector'
3
4
 
@@ -24,4 +25,4 @@ module Reactor
24
25
  end
25
26
  end
26
27
  end
27
- end
28
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'singleton'
2
3
 
3
4
  module Reactor
@@ -33,4 +34,4 @@ module Reactor
33
34
  end
34
35
  end
35
36
  end
36
- end
37
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'singleton'
2
3
 
3
4
  module Reactor
@@ -34,4 +35,4 @@ module Reactor
34
35
  end
35
36
  end
36
37
  end
37
- end
38
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  # This is a collection of legacy method,s that have not found any better place to live.
3
4
  module Legacy
@@ -57,4 +58,4 @@ module Reactor
57
58
  end
58
59
  end
59
60
  end
60
- end
61
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Link
3
4
  class External
@@ -16,4 +17,4 @@ module Reactor
16
17
  end
17
18
  end
18
19
  end
19
- end
20
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Link
3
4
  class Internal
@@ -16,4 +17,4 @@ module Reactor
16
17
  end
17
18
  end
18
19
  end
19
- end
20
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Link
3
4
  class TemporaryLink
@@ -40,4 +41,4 @@ module Reactor
40
41
  end
41
42
  end
42
43
  end
43
- end
44
+ end
@@ -1 +1,2 @@
1
- class Reactor::NoWorkingVersion < StandardError ; end
1
+ # -*- encoding : utf-8 -*-
2
+ class Reactor::NoWorkingVersion < StandardError ; end
@@ -1 +1,2 @@
1
- class Reactor::NotPermitted < StandardError ; end
1
+ # -*- encoding : utf-8 -*-
2
+ class Reactor::NotPermitted < StandardError ; end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/session'
2
3
  require 'reactor/cache/permission'
3
4
  require 'reactor/cache/user'
@@ -159,6 +160,7 @@ module Reactor
159
160
  def set(permission, groups)
160
161
  identifier = identifier(permission)
161
162
 
163
+ groups = [groups] if groups.kind_of?(::String)
162
164
  crul_obj.permission_set(identifier, groups)
163
165
  end
164
166
 
@@ -167,6 +169,7 @@ module Reactor
167
169
  def grant(permission, groups)
168
170
  identifier = identifier(permission)
169
171
 
172
+ groups = [groups] if groups.kind_of?(::String)
170
173
  crul_obj.permission_grant(identifier, groups)
171
174
  end
172
175
 
@@ -175,6 +178,7 @@ module Reactor
175
178
  def revoke(permission, groups)
176
179
  identifier = identifier(permission)
177
180
 
181
+ groups = [groups] if groups.kind_of?(::String)
178
182
  crul_obj.permission_revoke(identifier, groups)
179
183
  end
180
184
 
@@ -259,4 +263,4 @@ module Reactor
259
263
 
260
264
  end
261
265
 
262
- end
266
+ end
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # -*- encoding : utf-8 -*-
2
2
  module Reactor
3
3
  module Persistence
4
4
  # Provides API for writing into the Content Manager.
@@ -470,4 +470,4 @@ module Reactor
470
470
  end
471
471
  end
472
472
  end
473
- end
473
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module RcIndependent
3
4
  module Base
@@ -10,4 +11,4 @@ module Reactor
10
11
  end
11
12
  end
12
13
  end
13
- end
14
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'singleton'
2
3
  require 'observer'
3
4
 
@@ -45,4 +46,4 @@ class Reactor::Session
45
46
  Reactor::Cm::Bridge.login_for(session_id)
46
47
  end
47
48
 
48
- end
49
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/session'
2
3
 
3
4
  module Reactor::Session::Observers
@@ -29,4 +30,4 @@ module Reactor::Session::Observers
29
30
  end
30
31
  end
31
32
  end
32
-
33
+
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/user'
2
3
 
3
4
  module Reactor
@@ -19,4 +20,4 @@ module Reactor
19
20
  end
20
21
  end
21
22
  end
22
- end
23
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module StreamingUpload
3
4
  module Base
@@ -19,4 +20,4 @@ module Reactor
19
20
  end
20
21
  end
21
22
  end
22
- end
23
+ end
data/lib/reactor/sudo.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Sudo
3
4
  def self.su(other_user_name, &block)
@@ -8,4 +9,4 @@ module Reactor
8
9
  Reactor::Session.instance.user_name = current_user_name || 'root'
9
10
  end
10
11
  end
11
- end
12
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Support
3
4
  class LinkMatcher
@@ -41,4 +42,4 @@ module Reactor
41
42
  end
42
43
  end
43
44
  end
44
- end
45
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Tools
3
4
  class WorkflowGenerator
@@ -192,4 +193,4 @@ module Reactor
192
193
 
193
194
  end
194
195
  end
195
- end
196
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  # This module provides standard validations for Objs (:permalink, :parent_obj_id, :name, :obj_class),
3
4
  # and presence validations for all mandatory fields.
@@ -52,4 +53,4 @@ module Reactor
52
53
  end
53
54
  end
54
55
  end
55
- end
56
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
- VERSION = "1.6.1"
3
+ VERSION = "1.6.3"
3
4
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/workflow/standard'
2
3
  require 'reactor/workflow/empty'
3
4
 
@@ -16,4 +17,4 @@ module Reactor
16
17
  end
17
18
  end
18
19
  end
19
- end
20
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Workflow
3
4
  class Empty < Standard
@@ -24,4 +25,4 @@ module Reactor
24
25
  end
25
26
  end
26
27
  end
27
- end
28
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Workflow
3
4
  class Standard
@@ -31,4 +32,4 @@ module Reactor
31
32
  end
32
33
  end
33
34
  end
34
- end
35
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_reactor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 1
10
- version: 1.6.1
9
+ - 3
10
+ version: 1.6.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tomasz Przedmojski
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-17 00:00:00 +01:00
18
+ date: 2013-02-13 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - <=
28
28
  - !ruby/object:Gem::Version
29
- hash: 25
29
+ hash: 23
30
30
  segments:
31
31
  - 3
32
32
  - 2
33
- - 11
34
- version: 3.2.11
33
+ - 12
34
+ version: 3.2.12
35
35
  - - ">="
36
36
  - !ruby/object:Gem::Version
37
37
  hash: 19