synchronisable 1.2.3 → 1.2.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdb948ed17d774a8df92c8ca5fa030f6a6a4261c
4
- data.tar.gz: c966f90c2cf19bd68a032ede040187fe5e00fd67
3
+ metadata.gz: 749d7fb93ed6999ea16377756790c8ea8509a7a4
4
+ data.tar.gz: 9b5beac969f341f97c48b870496aa68f5258953f
5
5
  SHA512:
6
- metadata.gz: d96a07be5f69336aa55b7a5e6fb2d841516cfb3c55127f3332f7b3728f2a8970dd5279eeae2749506019c7a3ae00328ec2d0c12a3ee9df83d2201f8849b38478
7
- data.tar.gz: fdcf4e37d3fde2dbfb035196c9c2c85719bc2c08c42fa38676f299a0cb7fc8942220b56b17a2dfe7fdb552d5d6da8b34d2e1d6f664a311969cf28a7ea3356910
6
+ metadata.gz: 1c94f8a06c248e9f6a3d0449961fc21d1957fc5f0c2bab493010885941b2a143031bd0a12758a653a2e1f9c7e4810dbfb5bc7ef52c6a7d4f6526863145576bbf
7
+ data.tar.gz: c5edf4ca5f99323881187c5a64017a3918e56ec4b33270138073935064ed343e4e1020b4e465f20832896871dc604669e21fe7c7931e40b75af8f4db34ebe06a
@@ -57,8 +57,10 @@ module Synchronisable
57
57
  @required ||= false
58
58
  @force_sync ||= false
59
59
 
60
- @model ||= @name.to_s.singularize.classify.constantize
61
- @key = "#{@name.singularize}_#{@key_suffix}" unless @key.present?
60
+ singular_name = @name.to_s.singularize
61
+
62
+ @model ||= singular_name.classify.constantize
63
+ @key = "#{singular_name}_#{@key_suffix}" unless @key.present?
62
64
  end
63
65
 
64
66
  private
@@ -2,7 +2,7 @@ module Synchronisable
2
2
  module VERSION
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
- PATCH = 3
5
+ PATCH = 4
6
6
  SUFFIX = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, SUFFIX].compact.join('.')
@@ -3,11 +3,11 @@ class StageGateway < GatewayBase
3
3
  @source ||= [
4
4
  FactoryGirl.build(:remote_stage,
5
5
  :stage_id => 'stage_0',
6
- :matches_ids => %w(match_0)
6
+ :match_ids => %w(match_0)
7
7
  ),
8
8
  FactoryGirl.build( :remote_stage,
9
9
  :stage_id => 'stage_1',
10
- :matches_ids => %w(match_0)
10
+ :match_ids => %w(match_0)
11
11
  )
12
12
  ]
13
13
  end
@@ -7,11 +7,11 @@ class TeamGateway < GatewayBase
7
7
  @source ||= [
8
8
  FactoryGirl.build(:remote_team,
9
9
  :maet_id => 'team_0',
10
- :players_ids => %w(player_0 player_2)
10
+ :player_ids => %w(player_0 player_2)
11
11
  ),
12
12
  FactoryGirl.build(:remote_team,
13
13
  :maet_id => 'team_1',
14
- :players_ids => %w(player_1 player_3)
14
+ :player_ids => %w(player_1 player_3)
15
15
  )
16
16
  ]
17
17
  end
@@ -8,7 +8,7 @@ class TournamentGateway < GatewayBase
8
8
  FactoryGirl.build(:remote_tournament,
9
9
  :tour_id => 'tournament_0',
10
10
  :is_current => true,
11
- :stages_ids => [
11
+ :stage_ids => [
12
12
  {
13
13
  id: 'stage_0',
14
14
  tournament_id: 'tournament_0'
@@ -19,7 +19,7 @@ FactoryGirl.define do
19
19
  :home_team => 'team_0',
20
20
  :away_team => 'team_1'
21
21
  )
22
- object[:matches_ids] = [match[:match_id]]
22
+ object[:match_ids] = [match[:match_id]]
23
23
  end
24
24
  end
25
25
  end
@@ -14,7 +14,7 @@ FactoryGirl.define do
14
14
  trait :with_players do
15
15
  after(:build) do |object, evaluator|
16
16
  players = build_list(:remote_player, 4, team: object[:maet_id])
17
- object[:players_ids] = players.map { |h| h[:player_id] }
17
+ object[:player_ids] = players.map { |h| h[:player_id] }
18
18
  end
19
19
  end
20
20
  end
@@ -11,7 +11,7 @@ FactoryGirl.define do
11
11
  trait :with_stages do
12
12
  after(:build) do |object, evaluator|
13
13
  stages = build_list(:remote_stage, 2, tour_id: object[:tour_id])
14
- object[:stages_ids] = stages.map { |h| h[:stage_id] }
14
+ object[:stage_ids] = stages.map { |h| h[:stage_id] }
15
15
  end
16
16
  end
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synchronisable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasiliy Yorkin