infopark_reactor 1.12.0 → 1.13.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0dc4909f67ad98599bf95e3ee6704ded12afe2b
|
4
|
+
data.tar.gz: 291f54855d8900e799ae3c278e2bd1371dbe1534
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a09584c51b669e5c19327223536e1862d35148323cfae7692c13931e617a20219dbeaa4de2039da68c9fe0f723d3e830a16f8e2fb78f6d64887106ecb60525a2
|
7
|
+
data.tar.gz: cc5823a445bcc36edd25c6db8f985c62a4fd7b7454b76d0351d5ee76657336de51b24cf51fdcd97efa99710426869d936853ba9d579a4c2f367fc5d733a9a48f
|
@@ -9,7 +9,11 @@ module Cm
|
|
9
9
|
|
10
10
|
source_root File.expand_path('../templates', __FILE__)
|
11
11
|
def create_migration_file
|
12
|
-
|
12
|
+
if Reactor.rails4_0? || Reactor.rails4_1?
|
13
|
+
migration_template "template.rb", "cm/migrate/#{file_name}.rb"
|
14
|
+
else
|
15
|
+
migration_template "template.rb", "cm/migrate/#{file_name}"
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|
@@ -11,7 +11,12 @@ module Reactor
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def set(key,value)
|
14
|
-
|
14
|
+
key = key.to_sym
|
15
|
+
if key == :attributes
|
16
|
+
@attributes = value
|
17
|
+
else
|
18
|
+
@params[key.to_sym] = value
|
19
|
+
end
|
15
20
|
end
|
16
21
|
|
17
22
|
def add_attributes(attributes)
|
@@ -34,6 +39,11 @@ module Reactor
|
|
34
39
|
def migrate_params!(attribute)
|
35
40
|
attribute.add_attributes(@add_attributes) if @add_attributes
|
36
41
|
attribute.remove_attributes(@remove_attributes) if @remove_attributes
|
42
|
+
if @attributes
|
43
|
+
previous_attributes = attribute.attributes
|
44
|
+
attribute.remove_attributes(previous_attributes)
|
45
|
+
attribute.add_attributes(@attributes)
|
46
|
+
end
|
37
47
|
@params.each{|k,v|attribute.set(k,v)}
|
38
48
|
attribute.save!
|
39
49
|
end
|
data/lib/reactor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_reactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Przedmojski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|