caboose-cms 0.2.103 → 0.2.104

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzU1NTA3NjgwNTZiODk5YjU1NmNiYTdkYmUwYTllYjFlMjNhYzcxMw==
4
+ ZGU3N2VjMjlhNDkxY2Y4YjkxNTMwMjVlYjQ5MzZjZDJlZTMwMjMwNQ==
5
5
  data.tar.gz: !binary |-
6
- YTRlZWMxNTYxYzQ0ZDU3YjkwYTJlZDRhMDczOWI2ZmU5MzJjODM3Ng==
6
+ NjFmZDQ0ZTViMjIwYWUxMzlmNDliODkzZDgwMmQyNGUyOTNhMmI0Nw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OGYxMjVkOGJjNTlmYzJlODIxODcyMmU1MjNkZTMxMjMwMTFjOTMwZWM0OWQx
10
- NjZiZTM0ZDM0NWMxZTI0NGY5NTRlZGVhNzA2OTM3NGNkZTNmYmRhZDc0NjY2
11
- NzYwN2E0ZDk5MmQxMGVhNWEyNmZkZDc5NDM1MmNhMTE4NTJkNWM=
9
+ NDY2Nzg4NmJhZWM3NjFlNDYyMTI5ZWNmZWIxYWRmZjRkOGFlZTNkM2EwMjZm
10
+ OWI5NDQ2ZmNlNjNiNWZmMDBhZmZkMDQ1ZGY1ZjE2NTk2MTViNjljYjI3ZDcz
11
+ NjNlNDE2MDNlOWM4MDA2ZmIxOGFjMjgxNDZhMTNkZjdjYTk1Y2E=
12
12
  data.tar.gz: !binary |-
13
- ZmE4MDlhMDEzNWZlZjZkZmU5ZDFhNjcyNTJjNzI0ZTAwYTM2N2Q1NjJlYjk2
14
- ODQ0MzAxNDlhZjBmMjY2YzYwZGZhZTE1ZmNmMmI0OWI1ZTFmNTNjN2ViYjI1
15
- M2E1N2MxMTNmNThiZjBjNGRjOTk0ZjQzMGUzMDRlMWFjZTQ3ZTk=
13
+ ZGEzZGRiNmUzMjU0ZDQ5ZmRhZGQ4NTQwNjVmN2EwMzE2OWZmMTQ5NjZlM2Nk
14
+ NzU0NGI1NmM1ZjhlZjA3YmY5MmEzY2QwNmI1MjA3OWFkY2I5ZjEwMGI0YjI0
15
+ MjhiMmZmMjZjMTM5MGFjYmQ5ZWY2NDM2ODM2YmE5YzIxNjljNmE=
@@ -5,6 +5,7 @@ class Caboose::Page < ActiveRecord::Base
5
5
  belongs_to :parent, :class_name => "Page"
6
6
  has_many :children, :class_name => "Page", :foreign_key => 'parent_id'
7
7
  has_many :page_permissions
8
+ has_many :page_blocks
8
9
  attr_accessible :parent_id,
9
10
  :title,
10
11
  :menu_title,
@@ -3,6 +3,6 @@ class Caboose::PageBlock < ActiveRecord::Base
3
3
  self.table_name = "page_blocks"
4
4
 
5
5
  belongs_to :page
6
- attr_accessible :id, :page_id, :type, :sort_order, :value
6
+ attr_accessible :id, :page_id, :type, :sort_order, :name, :value
7
7
 
8
8
  end
@@ -85,6 +85,13 @@ class Caboose::Schema < Caboose::Utilities::Schema
85
85
  [ :fb_description , :string , :limit => 156 ],
86
86
  [ :gp_description , :string , :limit => 156 ]
87
87
  ],
88
+ Caboose::PageBlock => [
89
+ [ :page_id , :integer ],
90
+ [ :type , :string , :default => 'p' ],
91
+ [ :sort_order , :integer , :default => 0 ],
92
+ [ :name , :string ],
93
+ [ :value , :text ]
94
+ ],
88
95
  Caboose::Post => [
89
96
  [ :title , :text ],
90
97
  [ :body , :text ],
@@ -73,5 +73,18 @@ when 'pg_restore'
73
73
  puts "\nRunning pg_restore...\n"
74
74
  `pg_restore --verbose --clean --no-acl --no-owner -h localhost -d #{db} #{dump_file}`
75
75
 
76
+ when 'sync_db'
77
+
78
+ puts "\nCapturing production database...\n"
79
+ `heroku pgbackups:capture`
80
+ puts "\nWhere do you want to save the production database dump file?\n"
81
+ dump_file = gets.chomp
82
+ puts "\nDownloading production database dump file...\n"
83
+ `curl -o #{dump_file} \`heroku pgbackups:url\``
84
+ puts "\nTo what database do you want to restore?"
85
+ db = gets.chomp
86
+ puts "\nRunning pg_restore...\n"
87
+ `pg_restore --verbose --clean --no-acl --no-owner -h localhost -d #{db} #{dump_file}`
88
+
76
89
  else
77
90
  end
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.2.103'
2
+ VERSION = '0.2.104'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.103
4
+ version: 0.2.104
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-09 00:00:00.000000000 Z
11
+ date: 2013-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails