redmine_crm 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3056eb68011716cb6d4ef47f1ccbd2cf8c6ef4a
4
- data.tar.gz: c0381b69f22b09564830680e6c4dc6a75e79c24e
3
+ metadata.gz: bf1f2c458c8bf5227d929dfeff97a5d824671a2e
4
+ data.tar.gz: 9ec12c869d0b7ff00b2bda0d45d37a7b1f371ceb
5
5
  SHA512:
6
- metadata.gz: 6bf85404ae5d1af1f2a1d98c24190d9218a4a04f75b77ceee6161c2a8e66e8cb99d3d1b206880435035393ad955edb6e97c9699ce2bb96934256f92bc718169c
7
- data.tar.gz: 6c76ef2ab80c866843bc84e3b5444fa4b0b38c73eb193cf1e613fec5f7968af8bf83fd86f9c8c5dc45932477dcda4a0c033f2b62a4859509d7a626fbebda8d30
6
+ metadata.gz: 61394ed77de656deb18da9c45f85991baa65b03d67e4ea297ab87c240cc6f06e98511751c384dd2e6dddd9ff574bf35b1cbeb2c8d8a2a5b864ebe8429cb2d484
7
+ data.tar.gz: 84d63bc16b071b8c57ca45d467f649a2a6f5ed8e23152f671d812232794f7ad9854e7a0f9eef86dee16e3eb1084de342243c2a5ab754b19b9cbece24fd946ec6
@@ -4,6 +4,10 @@ Redmine crm gem - general functions for plugins (tags, vote, viewing, currency)
4
4
  Copyright (C) 2011-2015 RedmineCRM
5
5
  http://www.redminecrm.com/
6
6
 
7
+ == 2015-10-29 v0.0.20
8
+
9
+ * Added checking for vesion format in requires_redmine_crm
10
+
7
11
  == 2015-10-29 v0.0.19
8
12
 
9
13
  * New requires_redmine_crm params format and error messages
@@ -21,10 +21,15 @@ end
21
21
  def requires_redmine_crm(arg)
22
22
 
23
23
  def compare_versions(requirement, current)
24
+ raise ArgumentError.new("wrong version format") unless check_version_format(requirement)
24
25
  requirement = requirement.split('.').collect(&:to_i)
25
26
  requirement <=> current.slice(0, requirement.size)
26
27
  end
27
28
 
29
+ def check_version_format(version)
30
+ version =~ /^\d+.?\d*.?\d*$/m
31
+ end
32
+
28
33
  arg = { :version_or_higher => arg } unless arg.is_a?(Hash)
29
34
  arg.assert_valid_keys(:version, :version_or_higher)
30
35
 
@@ -1,3 +1,3 @@
1
1
  module RedmineCrm
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_crm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - RedmineCRM
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-29 00:00:00.000000000 Z
11
+ date: 2015-11-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Common libraries for RedmineCRM plugins for Redmine. Requered Redmine
14
14
  from http://redmine.org