trusty-cms 2.0.5.pre.beta → 2.0.7.pre.beta

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
- ZDY1ZGU1YzIyMTI1NWVkMjNjOWM2NTczZDY0NjYxYjgwMWQwOTdiMw==
4
+ ZWY5YjBlNDg4Yzg4M2NkYWUxZWJjZmE2MGU2YzY4NmQxYzI2MmZlNw==
5
5
  data.tar.gz: !binary |-
6
- MjA5YjAzNmRkNzk3NGNhOTlmOTAxYzRlMDY4YTFkY2ExY2Q0OTA2NA==
6
+ NzAyMTkyYWI4ZTJmNWQwNGJjMWMzNjMwZTgwMmQ3NjdkZGM1ZThmOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Yjk4OGU5MGQ5MWU3Mzg0MWQwNTgzY2I3MzcwNTk5ODg0NGI0YTdhMjgwNTkw
10
- ZGQ0YjRlMTc2NGJmODk0ZGFjZjJhNWM0ZjkyOWI0NTYzZjhlZDFjYjM0MjY1
11
- ZDYxMjJhMzE0MGMxNmZiM2ViMTBjMGNjN2FiZTlkMjFhY2U2NDc=
9
+ MTQyNmUzZWFiY2IyMmU3NGQ1ZDBkNzdkMmVhMzE4ZmJlNjFiYjVlZWFiODkz
10
+ OWU0MDFhMDU2MTAxNTU0ZGE1OWQwYjExZjRlZDRiZTM1ZWU3ZmMzMjFkMDdk
11
+ ZGIwMTA0YWM1ZmMwNTlmYTVlY2QyYzAwYTkwMDFkNDNkZWQ5YmU=
12
12
  data.tar.gz: !binary |-
13
- YmM3YTFlYmJhYzNmMzhjMmI1ZDE5MTRkZGIwYjQ5MmFhMjgwOWUzNjY1ZGE1
14
- ZmM0MTljNmQ3MGNhMGFlODAwNGExNTkyMTVkODM4MDRiZTU4ZDE4ZjAzOTll
15
- ODkzMzA3MmI1ZWE3NDU1ODY5MDU4ZmM3Y2RkYzUyZjZiYzg4M2I=
13
+ OTUxMGRjMGFmM2M1NTc5ZGNhZWFhYTU0OGJkY2U0NjY0YTBlY2MzOTE3NDFj
14
+ Y2UyNDdiNzNkZDExMGJmYTU1MGY2MDRiOTk2YmQwMDQ0Nzg5Mjk0YTM1NmQ4
15
+ YzIzM2VhNmUyZWY5NjAwNzUxOThlZWYyODQyMTk5ZTE2Y2U0MzM=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (2.0.5.pre.beta)
4
+ trusty-cms (2.0.7.pre.beta)
5
5
  RedCloth (~> 4.2)
6
6
  acts_as_tree (~> 2.1)
7
7
  bundler (~> 1.7)
@@ -88,7 +88,7 @@ module TrustyCms
88
88
 
89
89
  def []=(key, value)
90
90
  if table_exists?
91
- setting = find_or_initialize_by(key: key)
91
+ setting = where(key: key).first_or_initialize
92
92
  setting.value = value
93
93
  end
94
94
  end
@@ -2,6 +2,6 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = "2.0.5-beta"
5
+ VERSION = "2.0.7-beta"
6
6
  end
7
7
  end
@@ -84,13 +84,12 @@ module TrustyCms
84
84
 
85
85
  def record_version_state_after_migrating(version)
86
86
  sm_table = self.class.schema_migrations_table_name
87
-
88
87
  @migrated_versions ||= []
89
88
  if down?
90
89
  @migrated_versions.delete(version.to_i)
91
90
  ActiveRecord::Base.connection.update("DELETE FROM #{sm_table} WHERE version = #{quote(version_string(version))}")
92
91
  else
93
- @migrated_versions.push(version.to_i).sort!
92
+ @migrated_versions.add(version.to_i)
94
93
  ActiveRecord::Base.connection.insert("INSERT INTO #{sm_table} (version) VALUES (#{quote(version_string(version))})")
95
94
  end
96
95
  end
@@ -36,7 +36,7 @@ module TrustyCms
36
36
  :password => password,
37
37
  :password_confirmation => password
38
38
  }
39
- admin = User.find_by_login(username)
39
+ admin = User.find_by(login: username)
40
40
  admin = User.new unless admin
41
41
  admin.update_attributes(attributes)
42
42
  admin.admin = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5.pre.beta
4
+ version: 2.0.7.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrustyCms CMS dev team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2015-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo