caboose-cms 0.2.25 → 0.2.26

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
- YjA1N2I3NjkyNTQ2OGUwM2UwNjEwNmRhNDM0NTU2Y2EwOGFmMDFlMw==
4
+ N2YyODdjMDczNjlkN2YyM2Y4MmZkNDU2YTZjNWM4Zjc3NDQ5MTllYw==
5
5
  data.tar.gz: !binary |-
6
- ODM1ZmVkYTI5ZWRkNWRiZjZiMjRjNDdmYTliNTdhMzgxMGRjYWMzMQ==
6
+ NGFlNWMxYTEzOGIwMzhlMDhhN2RhMWM2YTUwNzZlYTdhMjcyYTgzZg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzQ0NTFhOTkyYTE1ZjUwNDM0NWM5ZWRjY2ZlNzU2NTZjYmNlOGQyYmVmYmI0
10
- NDBkOGFlYTYxMTBkYzhiYzFjNDg5MTM0ZjU4MTU3MzZiYWI2ZGY0YjdjNzAz
11
- NDczNjAzNjFiNDIzMjI1YzU0MjdhYzkyZGJmOGRhYzc3NzU1ODE=
9
+ ZGVjNjQ4OTE4Y2I1OWU1OTdhNGUxOTlkYzQ0Y2Q3M2ZkZDMyMmE1MWQ2NTIz
10
+ MmY1ZDgyZGZhMTZkYzljNjUwMDRkNzU0MzRkYTg5ZDI4OWM4YzViZTk2ZmZi
11
+ NTliNzVlY2E2YzQ2YTRiMTVhM2U2NjgxYTNiNWNhNDljNDkzNGM=
12
12
  data.tar.gz: !binary |-
13
- ODBkMzc5YmRkYjNhYzI3Y2NjMzQ3NmNlOWU0NDkyMDI3M2EyOGZlZGQyOWJi
14
- Nzg0M2UyZmQxMjljOWNlZmUwNWQ3NTNhZTg0NGJhZGQwNjFlOTBiOGE2NGVh
15
- NDE0ZmMzMjIwMDc0NjcxNjBhMzBmNzI4NDg2ZDYwZmY3ZjEyZTc=
13
+ OWJhODA0NzAxYTc5YmY0MDhhMTRkZDRlZmFmYTEwYzgxNDg5NGMwOWMzYzQx
14
+ ODcwODZlNjlmNWJkODJhYTcwNzhkYjQ3Y2ZiNThiYWU0ZDhjMDc4MTgzNTcw
15
+ NjBkYjU3OWIwYjg4OTI1Y2U0MWNkMGI0NzQzZmJhMmQ0MTJjZjg=
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.2.25'
2
+ VERSION = '0.2.26'
3
3
  end
@@ -22,17 +22,17 @@ namespace :caboose do
22
22
  desc "Resets the admin password to 'caboose'"
23
23
  task :reset_admin_pass => :environment do reset_admin_pass end
24
24
 
25
- desc "Performs caboose migrations to transition from the first to the second version. (Unsafe.)"
26
- task :migrate_between, [:from_version, :to_version] => :environment do |t, args|
27
- args.with_defaults(from_version: nil, to_version: nil)
28
- migrate_tables(args[:from_version], args[:to_version])
29
- end
30
-
31
- desc "Performs caboose migrations to transition from the current version to the given version"
32
- task :migrate_to, [:to_version] => :migrate_between
33
-
34
- desc "Performs caboose migrations to transition from the current version to the latest installed version"
35
- task :migrate => :migrate_between
25
+ #desc "Performs caboose migrations to transition from the first to the second version. (Unsafe.)"
26
+ #task :migrate_between, [:from_version, :to_version] => :environment do |t, args|
27
+ # args.with_defaults(from_version: nil, to_version: nil)
28
+ # migrate_tables(args[:from_version], args[:to_version])
29
+ #end
30
+ #
31
+ #desc "Performs caboose migrations to transition from the current version to the given version"
32
+ #task :migrate_to, [:to_version] => :migrate_between
33
+ #
34
+ #desc "Performs caboose migrations to transition from the current version to the latest installed version"
35
+ #task :migrate => :migrate_between
36
36
 
37
37
  #=============================================================================
38
38
 
@@ -216,27 +216,27 @@ namespace :caboose do
216
216
  admin_user.save
217
217
  end
218
218
 
219
- def migrate_tables(from_version, to_version)
220
- version_setting = Caboose::Setting.where(name: 'version').first
221
- versions = Caboose::VERSIONS
222
-
223
- from_version = version_setting.value if from_version.nil?
224
- to_version = Caboose::VERSION if to_version.nil?
225
- version_regex = /[0-9]+(\.[0-9]+)*/
226
-
227
- raise "from_version '#{from_version}' was invalid" if not version_regex.match(from_version)
228
- raise "to_version '#{to_version}' was invalid" if not version_regex.match(to_version)
229
-
230
- c = ActiveRecord::Base.connection
231
- from_to_compare = Caboose::Version.compare_version_strings(from_version, to_version)
232
-
233
- if from_to_compare < 0
234
- versions.select{ |v| v > from_version && v <= to_version }.each{ |v| v.up(c) }
235
- elsif from_to_compare > 0
236
- versions.select{ |v| v > to_version && v <= from_version }.reverse_each{ |v| v.down(c) }
237
- end
238
-
239
- version_setting.value = to_version
240
- version_setting.save
241
- end
219
+ #def migrate_tables(from_version, to_version)
220
+ # version_setting = Caboose::Setting.where(name: 'version').first
221
+ # versions = Caboose::VERSIONS
222
+ #
223
+ # from_version = version_setting.value if from_version.nil?
224
+ # to_version = Caboose::VERSION if to_version.nil?
225
+ # version_regex = /[0-9]+(\.[0-9]+)*/
226
+ #
227
+ # raise "from_version '#{from_version}' was invalid" if not version_regex.match(from_version)
228
+ # raise "to_version '#{to_version}' was invalid" if not version_regex.match(to_version)
229
+ #
230
+ # c = ActiveRecord::Base.connection
231
+ # from_to_compare = Caboose::Version.compare_version_strings(from_version, to_version)
232
+ #
233
+ # if from_to_compare < 0
234
+ # versions.select{ |v| v > from_version && v <= to_version }.each{ |v| v.up(c) }
235
+ # elsif from_to_compare > 0
236
+ # versions.select{ |v| v > to_version && v <= from_version }.reverse_each{ |v| v.down(c) }
237
+ # end
238
+ #
239
+ # version_setting.value = to_version
240
+ # version_setting.save
241
+ #end
242
242
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.25
4
+ version: 0.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry