mrpin-sdk 1.0.70 → 1.0.71

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: 248d4656d235849c8c31c751997ccf664de9ce65
4
- data.tar.gz: 1f6b4961cc92d3dfb88921dcbfc86c4917eb79d9
3
+ metadata.gz: 8ee0f86730c5209d1d03f6b714a77441cbbbba4b
4
+ data.tar.gz: cb69d9ca38a610504e6797ba248869728aae6547
5
5
  SHA512:
6
- metadata.gz: 5949897b2af14705526bcd71fdf2856844d15b8818fc915dd1c96dfc2236a181f3b2506a403b7e9ec5c8a88969058a77a833bc4cae725c4de51fc13995799297
7
- data.tar.gz: 8c70cd3b7c177051c48a7e55556ba0cba2efb2d6eac1853ee145fb09bafef39108d114bd2d764fa7a315ba0d509667638de5d9a61fbbe0087d8f1d17c9093ba0
6
+ metadata.gz: 8bf602594a00983663eb4451d268da828250064689d5aa707dfaf49729db128ce181ba0f92c86db273d2fbe969af31ecc0a01998de0b8114dbd5c0423a4aa8dc
7
+ data.tar.gz: 49c9d0deb6bf8852f65d1773f4974beaab9c7de4113f826e3c2c71b9dafd713985e08abaddfad341d37c239d3402bda19fed1506d95a4e2acb31c88763a0c2d0
@@ -65,12 +65,15 @@ class BundleBase < ModelBase
65
65
  field :name, type: String
66
66
  field :url, type: String
67
67
 
68
+ field :crc, type: Integer, default: 0
68
69
  field :version, type: Integer, default: 0
69
70
 
70
71
  #
71
- # add indexes
72
+ # indexes
72
73
  #
73
74
 
75
+ index({build_type: 1, name: 1}, {unique: true})
76
+
74
77
  #
75
78
  # Properties
76
79
  #
@@ -98,7 +101,6 @@ class BundleBase < ModelBase
98
101
  validates :url, presence: true, allow_blank: false, allow_nil: false
99
102
  validates :build_type, presence: true, allow_blank: false, allow_nil: false
100
103
 
101
- validate :check_uniq
102
104
  #
103
105
  # callbacks
104
106
  #
@@ -112,13 +114,6 @@ class BundleBase < ModelBase
112
114
  self.version += 1
113
115
  end
114
116
 
115
- private
116
- def check_uniq
117
- if BundleBase.where(build_type: self.build_type, name: self.name, :id.ne => self.id).exists?
118
- self.errors.add(:base, 'bundle with same build type and name already exist')
119
- end
120
- end
121
-
122
117
  #
123
118
  # uploaders
124
119
  #
@@ -7,6 +7,7 @@ class BundleInfoBase < InfoBase
7
7
  attr_accessor :version
8
8
  attr_accessor :name
9
9
  attr_accessor :url
10
+ attr_accessor :crc
10
11
 
11
12
  #
12
13
  # Methods
@@ -20,9 +21,10 @@ class BundleInfoBase < InfoBase
20
21
  public
21
22
  def serialize
22
23
  {
23
- version: version,
24
- name: name,
25
- url: url
24
+ version: @version,
25
+ name: @name,
26
+ url: @url,
27
+ crc: @crc
26
28
  }
27
29
  end
28
30
 
@@ -46,7 +46,7 @@ class LocalizationBase < ModelBase
46
46
  # add indexes
47
47
  #
48
48
 
49
- index({key: 1}, {unique: 1})
49
+ index({key: 1}, {unique: true})
50
50
 
51
51
  #
52
52
  # Methods
data/mrpin-sdk.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'mrpin-sdk'
7
- spec.version = '1.0.70'
7
+ spec.version = '1.0.71'
8
8
  spec.authors = %w(Gregory Tkach Yakupov Dmitrij)
9
9
  spec.email = %w(gregory.tkach@gmail.com yakupov.dmitrij@gmail.com)
10
10
  spec.description = %q{Mrpin sdk for backend development.}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mrpin-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.70
4
+ version: 1.0.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-05-15 00:00:00.000000000 Z
14
+ date: 2017-05-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler