komandir 1.0.0 → 1.0.1

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.
@@ -1,10 +1,13 @@
1
1
  module Komandir
2
+ class WrongTime < Exception; end
3
+
2
4
  module ControllerMethods
3
5
 
4
6
  module ClassMethods
5
7
  end
6
8
 
7
9
  module InstanceMethods
10
+
8
11
  # TODO Переделать user в параметрах через @current_user
9
12
  def action_signature_valid?(user)
10
13
  raise "Blank komandir_signature" if params[:komandir_signature].blank?
@@ -49,7 +52,7 @@ module Komandir
49
52
  if params[:komandir_time].present?
50
53
  server_time_epoch = Time.now.to_i
51
54
  client_time_epoch = params[:komandir_time].to_i
52
- raise "Время в подписи неверное" if (client_time_epoch - server_time_epoch).abs > 60
55
+ raise Komandir::WrongTime if (client_time_epoch - server_time_epoch).abs > 60
53
56
  end
54
57
  end
55
58
  end
@@ -1,3 +1,3 @@
1
1
  module Komandir
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: komandir
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - divineforest
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-28 00:00:00 +03:00
18
+ date: 2011-11-28 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency