trusty-cms 2.0.1.pre.beta → 2.0.2.pre.beta
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.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/db/migrate/001_create_radiant_tables.rb +2 -2
- data/lib/trusty_cms.rb +1 -1
- metadata +1 -2
- data/db/migrate/006_integer_columns_to_boolean.rb +0 -36
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2MxYjg3NGJhY2YyNWViNDBkMjY2ZmQ5MDYxZTdiY2MzODg2MWFmNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTQwM2E4YzI0NzNjYTgwOGI5NDAwNzQyNTUyOGM0YzU1MjZmNmQyMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjU3OTM0OTE0NzBjMGQ1OWVhY2RiOGMzMTJlNDBlY2IwNzVjNTM0MmIwYzk5
|
10
|
+
ODc5MDRjYjY4MWFkNWE1ZTgyMjg5OTlmNzI3ZjNjYjhlNjI2NTgyNWIwMGNk
|
11
|
+
YjU2YjM5MTY1YWQyZGU3YTRkNTgxYWQ1YWI3YzE3YTQ3NzkwMjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmZiOGQ0NzQ1OGFhYjY5ZTI3ZWM3YjJlYTg4Mjc0MmUxMWU1YmMxN2Q4OTNk
|
14
|
+
OTQwYzA2NjI2NDc4MGE1NDBiZmRiZjdkZTg0MzE5OTc2NTY0OGYzMjRmMDIz
|
15
|
+
MGNhZmM2NjIxMmQxZWRiNzg1NGRlNjY3MzI3M2ZlNjIyYzAwNjY=
|
data/Gemfile.lock
CHANGED
@@ -53,8 +53,8 @@ class CreateRadiantTables < ActiveRecord::Migration
|
|
53
53
|
t.column "email", :string
|
54
54
|
t.column "login", :string, :limit => 40, :default => "", :null => false
|
55
55
|
t.column "password", :string, :limit => 40
|
56
|
-
t.column "admin", :
|
57
|
-
t.column "developer", :
|
56
|
+
t.column "admin", :boolean, :default => false, :null => false
|
57
|
+
t.column "developer", :boolean, :default => false, :null => false
|
58
58
|
t.column "created_at", :datetime
|
59
59
|
t.column "updated_at", :datetime
|
60
60
|
t.column "created_by", :integer
|
data/lib/trusty_cms.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trusty-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2.pre.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TrustyCms CMS dev team
|
@@ -579,7 +579,6 @@ files:
|
|
579
579
|
- db/migrate/003_rename_behavior_column.rb
|
580
580
|
- db/migrate/004_rename_filter_column.rb
|
581
581
|
- db/migrate/005_add_virtual_column_to_page.rb
|
582
|
-
- db/migrate/006_integer_columns_to_boolean.rb
|
583
582
|
- db/migrate/007_remove_virtual_column_from_page.rb
|
584
583
|
- db/migrate/008_add_virtual_column_to_page_again.rb
|
585
584
|
- db/migrate/009_add_content_type_field_to_layout.rb
|
@@ -1,36 +0,0 @@
|
|
1
|
-
class IntegerColumnsToBoolean < ActiveRecord::Migration
|
2
|
-
|
3
|
-
class User < ActiveRecord::Base; end
|
4
|
-
|
5
|
-
def self.up
|
6
|
-
change_column "users", "admin", :boolean, :default => false, :null => false
|
7
|
-
change_column "users", "developer", :boolean, :default => false, :null => false
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.down
|
11
|
-
change_column "users", "admin", :integer, :limit => 1, :default => 0, :null => false
|
12
|
-
change_column "users", "developer", :integer, :limit => 1, :default => 0, :null => false
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.change_column(table, column, type, options={})
|
16
|
-
model_class = table.singularize.camelize.constantize
|
17
|
-
|
18
|
-
announce "saving #{model_class} data"
|
19
|
-
old_values = model_class.find(:all).map do |model|
|
20
|
-
[model.id, model.send("#{column}?")]
|
21
|
-
end
|
22
|
-
|
23
|
-
remove_column table, column
|
24
|
-
add_column table, column, type, options
|
25
|
-
|
26
|
-
model_class.reset_column_information
|
27
|
-
|
28
|
-
announce "restoring #{model_class} data"
|
29
|
-
old_values.each do |(id, value)|
|
30
|
-
model = model_class.find(id)
|
31
|
-
model.send "#{column}=", value
|
32
|
-
model.save
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|