xeroizer-float 2.15.3.10 → 2.15.3.11
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.
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.15.3.
|
1
|
+
2.15.3.11
|
@@ -10,8 +10,8 @@ module Xeroizer
|
|
10
10
|
class BankTransaction < Base
|
11
11
|
|
12
12
|
BANK_TRANSACTION_STATUS = {
|
13
|
-
'ACTIVE' => '
|
14
|
-
'DELETED' => '
|
13
|
+
'ACTIVE' => 'Active bank transactions',
|
14
|
+
'DELETED' => 'Deleted bank transactions',
|
15
15
|
} unless defined?(BANK_TRANSACTION_STATUS)
|
16
16
|
BANK_TRANSACTION_STATUSES = BANK_TRANSACTION_STATUS.keys.sort
|
17
17
|
|
@@ -8,7 +8,10 @@ module Xeroizer
|
|
8
8
|
include ClassLevelInheritableAttributes
|
9
9
|
class_inheritable_attributes :api_controller_name
|
10
10
|
|
11
|
-
|
11
|
+
module InvaidPermissionError; end
|
12
|
+
class InvalidPermissionError < StandardError
|
13
|
+
include InvaidPermissionError
|
14
|
+
end
|
12
15
|
ALLOWED_PERMISSIONS = [:read, :write, :update]
|
13
16
|
class_inheritable_attributes :permissions
|
14
17
|
|
@@ -40,7 +43,7 @@ module Xeroizer
|
|
40
43
|
def set_permissions(*args)
|
41
44
|
self.permissions = {}
|
42
45
|
args.each do | permission |
|
43
|
-
raise
|
46
|
+
raise InvalidPermissionError.new("Permission #{permission} is invalid.") unless ALLOWED_PERMISSIONS.include?(permission)
|
44
47
|
self.permissions[permission] = true
|
45
48
|
end
|
46
49
|
end
|
@@ -17,7 +17,12 @@ module Xeroizer
|
|
17
17
|
def parse_params(options)
|
18
18
|
params = {}
|
19
19
|
params[:ModifiedAfter] = options[:modified_since] if options[:modified_since]
|
20
|
-
|
20
|
+
|
21
|
+
params[:order] = options[:order] if options[:order]
|
22
|
+
params[:reverseorder] = options[:reverseorder] if options[:reverseorder]
|
23
|
+
|
24
|
+
params[:order] = options[:order] if options[:order]
|
25
|
+
params[:reverseorder] = options[:order] if options[:reverseorder]
|
21
26
|
if options[:where]
|
22
27
|
params[:where] = case options[:where]
|
23
28
|
when String then options[:where]
|
@@ -47,4 +47,12 @@ class RecordBaseModelTest < Test::Unit::TestCase
|
|
47
47
|
|
48
48
|
end
|
49
49
|
|
50
|
+
context "InvalidPermissionError" do
|
51
|
+
should "also be catchable by the name 'InvaidPermissionError' for historical reasons" do
|
52
|
+
assert_raise(Xeroizer::Record::BaseModel::InvaidPermissionError) do
|
53
|
+
raise Xeroizer::Record::BaseModel::InvalidPermissionError
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
50
58
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xeroizer-float
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.3.
|
4
|
+
version: 2.15.3.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: builder
|