commonthread-rails 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{commonthread-rails}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["CommonThread"]
@@ -1,11 +1,11 @@
1
1
  class Encrypter
2
2
  def self.encrypt(input)
3
- return nil if input.nil?
3
+ return nil unless input.is_a?(String)
4
4
  Base64.encode64(self.blowfish.encrypt_string(input))
5
5
  end
6
6
 
7
7
  def self.decrypt(input)
8
- return nil if input.nil?
8
+ return nil unless input.is_a?(String)
9
9
  self.blowfish.decrypt_string(Base64.decode64(input))
10
10
  end
11
11
 
@@ -17,7 +17,7 @@ module CommonThread
17
17
  # skip_before_filter :ssl_required
18
18
  #
19
19
  def ssl_required
20
- if RAILS_ENV == 'production' and !request.ssl?
20
+ if !(RAILS_ENV == 'development' or RAILS_ENV == 'test') and !request.ssl?
21
21
  redirect_to "https://" + request.host + request.request_uri
22
22
  return false
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonthread-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - CommonThread