infopark_reactor_migrations 1.6.1 → 1.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/infopark_reactor_migrations.gemspec +1 -1
  2. data/lib/generators/cm/migration/migration_generator.rb +2 -1
  3. data/lib/generators/cm/migration/templates/template.rb +2 -1
  4. data/lib/infopark_reactor_migrations.rb +1 -0
  5. data/lib/reactor/cm/attribute.rb +2 -1
  6. data/lib/reactor/cm/bridge.rb +2 -1
  7. data/lib/reactor/cm/channel.rb +1 -0
  8. data/lib/reactor/cm/editorial_group.rb +1 -0
  9. data/lib/reactor/cm/group.rb +1 -0
  10. data/lib/reactor/cm/language.rb +2 -1
  11. data/lib/reactor/cm/link.rb +2 -1
  12. data/lib/reactor/cm/live_group.rb +1 -0
  13. data/lib/reactor/cm/missing_credentials.rb +2 -1
  14. data/lib/reactor/cm/obj.rb +1 -0
  15. data/lib/reactor/cm/obj_class.rb +2 -1
  16. data/lib/reactor/cm/object_base.rb +2 -1
  17. data/lib/reactor/cm/user.rb +1 -0
  18. data/lib/reactor/cm/workflow.rb +2 -1
  19. data/lib/reactor/cm/xml_attribute.rb +1 -0
  20. data/lib/reactor/cm/xml_markup.rb +4 -3
  21. data/lib/reactor/cm/xml_request.rb +1 -0
  22. data/lib/reactor/cm/xml_request_error.rb +2 -1
  23. data/lib/reactor/cm/xml_response.rb +2 -0
  24. data/lib/reactor/configuration.rb +2 -1
  25. data/lib/reactor/migration.rb +1 -0
  26. data/lib/reactor/migrations/railtie.rb +2 -1
  27. data/lib/reactor/migrations/version.rb +2 -1
  28. data/lib/reactor/plans/common_attribute.rb +2 -1
  29. data/lib/reactor/plans/common_channel.rb +1 -0
  30. data/lib/reactor/plans/common_group.rb +1 -0
  31. data/lib/reactor/plans/common_obj_class.rb +2 -1
  32. data/lib/reactor/plans/create_attribute.rb +2 -1
  33. data/lib/reactor/plans/create_channel.rb +1 -0
  34. data/lib/reactor/plans/create_group.rb +1 -0
  35. data/lib/reactor/plans/create_obj.rb +1 -0
  36. data/lib/reactor/plans/create_obj_class.rb +2 -1
  37. data/lib/reactor/plans/delete_attribute.rb +2 -1
  38. data/lib/reactor/plans/delete_channel.rb +1 -0
  39. data/lib/reactor/plans/delete_group.rb +1 -0
  40. data/lib/reactor/plans/delete_obj.rb +2 -1
  41. data/lib/reactor/plans/delete_obj_class.rb +2 -1
  42. data/lib/reactor/plans/prepared.rb +2 -1
  43. data/lib/reactor/plans/rename_group.rb +1 -0
  44. data/lib/reactor/plans/rename_obj_class.rb +2 -1
  45. data/lib/reactor/plans/update_attribute.rb +2 -1
  46. data/lib/reactor/plans/update_group.rb +1 -0
  47. data/lib/reactor/plans/update_obj.rb +2 -1
  48. data/lib/reactor/plans/update_obj_class.rb +2 -1
  49. data/lib/reactor/tools/migrator.rb +2 -1
  50. data/lib/reactor/tools/response_handler/base.rb +1 -0
  51. data/lib/reactor/tools/response_handler/string.rb +1 -0
  52. data/lib/reactor/tools/response_handler/xml_attribute.rb +1 -0
  53. data/lib/reactor/tools/smart_xml_logger.rb +1 -0
  54. data/lib/reactor/tools/sower.rb +2 -1
  55. data/lib/reactor/tools/uploader.rb +6 -3
  56. data/lib/reactor/tools/versioner.rb +1 -0
  57. data/lib/reactor/tools/xml_attributes.rb +1 -0
  58. metadata +7 -7
@@ -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"]
22
22
 
23
- s.add_dependency 'rails', '>= 3.0.10', '<= 3.2.11'
23
+ s.add_dependency 'rails', '>= 3.0.10', '<= 3.2.12'
24
24
  s.add_dependency 'term-ansicolor'
25
25
  s.add_dependency 'nokogiri'
26
26
  s.add_development_dependency 'rspec'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Cm
2
3
  module Generators
3
4
  class MigrationGenerator < Rails::Generators::NamedBase
@@ -12,4 +13,4 @@ module Cm
12
13
  end
13
14
  end
14
15
  end
15
- end
16
+ end
@@ -1,7 +1,8 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  class <%= class_name %> < Reactor::Migration
2
3
  def self.up
3
4
  end
4
5
 
5
6
  def self.down
6
7
  end
7
- end
8
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  # require config
2
3
  require 'reactor/configuration'
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Cm
3
4
  class Attribute
@@ -81,4 +82,4 @@ module Reactor
81
82
  end
82
83
  end
83
84
  end
84
- end
85
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Cm
3
4
  class Bridge
@@ -46,4 +47,4 @@ module Reactor
46
47
  end
47
48
  end
48
49
  end
49
- end
50
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/object_base'
2
3
 
3
4
  module Reactor
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/group'
2
3
 
3
4
  module Reactor
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/xml_request'
2
3
  require 'reactor/cm/xml_response'
3
4
  require 'reactor/cm/xml_request_error'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Cm
3
4
  class Language
@@ -53,4 +54,4 @@ module Reactor
53
54
 
54
55
  end
55
56
  end
56
- end
57
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Cm
3
4
  class Link
@@ -129,4 +130,4 @@ module Reactor
129
130
  end
130
131
  end
131
132
  end
132
- end
133
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/group'
2
3
 
3
4
  module Reactor
@@ -1,7 +1,8 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Cm
3
4
  class MissingCredentials < StandardError
4
5
  def initialize ; super("CM access credentials are missing. Check your configuration or supplied credentials.") ; end
5
6
  end
6
7
  end
7
- end
8
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Cm
3
4
  class Obj
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/xml_request'
2
3
  require 'reactor/cm/xml_response'
3
4
  require 'reactor/cm/xml_request_error'
@@ -183,4 +184,4 @@ module Reactor
183
184
  end
184
185
  end
185
186
  end
186
- end
187
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/tools/xml_attributes'
2
3
 
3
4
  module Reactor
@@ -161,4 +162,4 @@ module Reactor
161
162
  end
162
163
  end
163
164
  end
164
- end
165
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/object_base'
2
3
  require 'reactor/configuration'
3
4
  require 'reactor/cm/language'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/object_base'
2
3
 
3
4
  module Reactor
@@ -37,4 +38,4 @@ module Reactor
37
38
  end
38
39
  end
39
40
  end
40
- end
41
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
 
3
4
  module Cm
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'builder'
2
3
 
3
4
  module Reactor
@@ -30,7 +31,7 @@ module Reactor
30
31
 
31
32
  def get_key_tag!(base_name, key)
32
33
  get_tag!(base_name) do |xml|
33
- if key.kind_of?(Array)
34
+ if key.kind_of?(::Array)
34
35
  key.each {|k| xml.tag!(k.to_s) }
35
36
  else
36
37
  xml.tag!(key.to_s) ; end
@@ -56,8 +57,8 @@ module Reactor
56
57
  end
57
58
 
58
59
  def value_tag!(key, value, options = {})
59
- if value.kind_of? Array then array_value_tag!(key, value, options)
60
- elsif value.kind_of? Hash then hash_value_tag!(key, value)
60
+ if value.kind_of? ::Array then array_value_tag!(key, value, options)
61
+ elsif value.kind_of? ::Hash then hash_value_tag!(key, value)
61
62
  else tag!(key.to_s) { text!(value.to_s) }
62
63
  end
63
64
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'net/http'
2
3
  require 'reactor/cm/xml_response'
3
4
  require 'reactor/cm/xml_request_error'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Cm
3
4
  class XmlRequestError < StandardError
@@ -13,4 +14,4 @@ module Reactor
13
14
 
14
15
  end
15
16
  end
16
- end
17
+ end
@@ -1,4 +1,6 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/tools/response_handler/xml_attribute'
3
+ require 'rexml/document'
2
4
 
3
5
  module Reactor
4
6
 
@@ -1,7 +1,8 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  class Configuration
3
4
  class << self
4
5
  attr_accessor :xml_access
5
6
  end
6
7
  end
7
- end
8
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/plans/create_obj'
2
3
  require 'reactor/plans/delete_obj'
3
4
  require 'reactor/plans/update_obj'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Migrations
3
4
  class Railtie < Rails::Railtie
@@ -7,4 +8,4 @@ module Reactor
7
8
  end
8
9
  end
9
10
  end
10
- end
11
+ end
@@ -1,5 +1,6 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Migrations
3
- VERSION = "1.6.1"
4
+ VERSION = "1.6.3"
4
5
  end
5
6
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class CommonAttribute
@@ -29,4 +30,4 @@ module Reactor
29
30
  end
30
31
  end
31
32
  end
32
- end
33
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class CommonChannel
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
 
3
4
  module Plans
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class CommonObjClass
@@ -66,4 +67,4 @@ module Reactor
66
67
  end
67
68
  end
68
69
  end
69
- end
70
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/plans/common_attribute'
2
3
 
3
4
  module Reactor
@@ -29,4 +30,4 @@ module Reactor
29
30
 
30
31
  end
31
32
  end
32
- end
33
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/channel'
2
3
  require 'reactor/plans/common_channel'
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/plans/common_group'
2
3
 
3
4
  module Reactor
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class CreateObj
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/plans/common_obj_class'
2
3
 
3
4
  module Reactor
@@ -25,4 +26,4 @@ module Reactor
25
26
  end
26
27
  end
27
28
  end
28
- end
29
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class DeleteAttribute < CommonAttribute
@@ -20,4 +21,4 @@ module Reactor
20
21
 
21
22
  end
22
23
  end
23
- end
24
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class DeleteChannel < CommonAttribute
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
 
3
4
  module Plans
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/plans/prepared'
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 Plans
3
4
  class DeleteObjClass < CommonObjClass
@@ -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 Plans
3
4
  module Prepared
@@ -12,4 +13,4 @@ module Reactor
12
13
  end
13
14
  end
14
15
  end
15
- end
16
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
 
3
4
  module Plans
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class RenameObjClass
@@ -21,4 +22,4 @@ module Reactor
21
22
  end
22
23
  end
23
24
  end
24
- end
25
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class UpdateAttribute < CommonAttribute
@@ -20,4 +21,4 @@ module Reactor
20
21
 
21
22
  end
22
23
  end
23
- end
24
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
 
3
4
  module Plans
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class UpdateObj
@@ -27,4 +28,4 @@ module Reactor
27
28
  end
28
29
  end
29
30
  end
30
- end
31
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Plans
3
4
  class UpdateObjClass < CommonObjClass
@@ -23,4 +24,4 @@ module Reactor
23
24
 
24
25
  end
25
26
  end
26
- end
27
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/tools/versioner'
2
3
 
3
4
  module Reactor
@@ -132,4 +133,4 @@ module Reactor
132
133
  end
133
134
  end
134
135
  end
135
- end
136
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
 
3
4
  module ResponseHandler
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/tools/response_handler/base'
2
3
 
3
4
  module Reactor
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/tools/response_handler/base'
2
3
 
3
4
  module Reactor
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'nokogiri'
2
3
  require 'term/ansicolor'
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
 
3
4
  class Sower
@@ -86,4 +87,4 @@ module RailsConnector
86
87
  end
87
88
 
88
89
  end
89
- end
90
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Reactor
2
3
  module Tools
3
4
  class Uploader
@@ -57,8 +58,9 @@ module Reactor
57
58
  # Stream into CM from memory. Used in cases when the file
58
59
  # has already been read into memory
59
60
  def stream_data(data, extension)
60
- response, ticket_id = (Net::HTTP.new(self.class.streaming_host, self.class.streaming_port).post('/stream', data,
61
+ response = (Net::HTTP.new(self.class.streaming_host, self.class.streaming_port).post('/stream', data,
61
62
  {'Content-Type' => self.class.content_type_for_ext(extension)}))
63
+ ticket_id = response.body
62
64
 
63
65
  handle_response(response, ticket_id)
64
66
  end
@@ -75,7 +77,8 @@ module Reactor
75
77
  Net::HTTP.start(self.class.streaming_host, self.class.streaming_port) do |http|
76
78
  http.read_timeout = 60
77
79
  #http.set_debug_output $stderr
78
- response, ticket_id = http.request(request)
80
+ response = http.request(request)
81
+ ticket_id = response.body
79
82
  end
80
83
 
81
84
  handle_response(response, ticket_id)
@@ -128,4 +131,4 @@ module Reactor
128
131
  end
129
132
  end
130
133
  end
131
- end
134
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'base64'
2
3
  require 'yaml'
3
4
  require 'singleton'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'reactor/cm/xml_attribute'
2
3
  require 'reactor/tools/response_handler/xml_attribute'
3
4
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_reactor_migrations
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
@@ -34,12 +34,12 @@ dependencies:
34
34
  version: 3.0.10
35
35
  - - <=
36
36
  - !ruby/object:Gem::Version
37
- hash: 25
37
+ hash: 23
38
38
  segments:
39
39
  - 3
40
40
  - 2
41
- - 11
42
- version: 3.2.11
41
+ - 12
42
+ version: 3.2.12
43
43
  type: :runtime
44
44
  version_requirements: *id001
45
45
  - !ruby/object:Gem::Dependency