foot_stats_simulator 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/foot_stats_simulator/api_controller.rb +18 -13
- data/app/models/simulator_championship.rb +9 -1
- data/app/models/simulator_championship_participation.rb +122 -0
- data/app/models/simulator_classification.rb +119 -0
- data/app/models/simulator_match.rb +231 -26
- data/app/models/simulator_player.rb +26 -1
- data/app/models/simulator_team.rb +18 -0
- data/app/models/simulator_timeline.rb +74 -82
- data/app/models/simulator_timeline/card_event.rb +41 -0
- data/app/models/simulator_timeline/event.rb +26 -0
- data/app/models/simulator_timeline/event_handler.rb +69 -0
- data/app/models/simulator_timeline/goal_event.rb +40 -0
- data/app/models/simulator_timeline/lorem.rb +23 -0
- data/app/models/simulator_timeline/lorem_messages.rb +185 -0
- data/app/models/simulator_timeline/minute.rb +26 -0
- data/app/models/simulator_timeline/narration_event.rb +39 -0
- data/app/models/simulator_timeline/period.rb +29 -0
- data/app/models/simulator_timeline/player_event.rb +65 -0
- data/app/models/simulator_timeline/states.rb +45 -0
- data/config/routes.rb +2 -4
- data/lib/foot_stats_simulator.rb +13 -1
- data/lib/foot_stats_simulator/migrate.rb +44 -34
- data/lib/foot_stats_simulator/tasks/foot_stats_simulator.rake +40 -21
- data/lib/foot_stats_simulator/version.rb +1 -1
- metadata +31 -2
@@ -1,30 +1,49 @@
|
|
1
|
-
namespace :
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
namespace :foot_stats do
|
2
|
+
namespace :clone do
|
3
|
+
desc "Clones FootStats championships to database"
|
4
|
+
task championship: :environment do
|
5
|
+
base_url = FootStats.base_url
|
6
|
+
FootStats.base_url = "http://footstats.com.br/modyo.asmx/"
|
7
|
+
SimulatorChampionship.dump!
|
8
|
+
FootStats.base_url = base_url
|
9
|
+
end
|
6
10
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
+
desc "Clones FootStats championship teams to database"
|
12
|
+
task team: :environment do
|
13
|
+
base_url = FootStats.base_url
|
14
|
+
FootStats.base_url = "http://footstats.com.br/modyo.asmx/"
|
15
|
+
SimulatorTeam.dump!
|
16
|
+
FootStats.base_url = base_url
|
17
|
+
end
|
11
18
|
|
12
|
-
|
13
|
-
|
14
|
-
|
19
|
+
desc "Clones FootStats players to database"
|
20
|
+
task player: :environment do
|
21
|
+
base_url = FootStats.base_url
|
22
|
+
FootStats.base_url = "http://footstats.com.br/modyo.asmx/"
|
23
|
+
SimulatorPlayer.dump!
|
24
|
+
FootStats.base_url = base_url
|
25
|
+
end
|
26
|
+
|
27
|
+
desc "Clones all FootStats data to database"
|
28
|
+
task data: :environment do
|
29
|
+
base_url = FootStats.base_url
|
30
|
+
FootStats.base_url = "http://footstats.com.br/modyo.asmx/"
|
31
|
+
SimulatorChampionship.dump!
|
32
|
+
SimulatorTeam.dump!
|
33
|
+
SimulatorPlayer.dump!
|
34
|
+
FootStats.base_url = base_url
|
35
|
+
end
|
15
36
|
end
|
16
37
|
|
17
|
-
desc "
|
18
|
-
task :
|
19
|
-
SimulatorChampionship.
|
20
|
-
SimulatorTeam.
|
21
|
-
SimulatorPlayer.
|
38
|
+
desc "Deletes all FootStats simulator data stored on database"
|
39
|
+
task clean: :environment do
|
40
|
+
SimulatorChampionship.delete_all
|
41
|
+
SimulatorTeam.delete_all
|
42
|
+
SimulatorPlayer.delete_all
|
22
43
|
end
|
23
|
-
end
|
24
44
|
|
25
|
-
namespace :foot_stats do
|
26
45
|
desc "Migrate simulator data"
|
27
|
-
task :
|
28
|
-
|
46
|
+
task migrate: :environment do
|
47
|
+
load 'foot_stats_simulator/migrate.rb'
|
29
48
|
end
|
30
49
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foot_stats_simulator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -43,6 +43,22 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: faker
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
46
62
|
- !ruby/object:Gem::Dependency
|
47
63
|
name: sqlite3
|
48
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,9 +88,22 @@ files:
|
|
72
88
|
- app/controllers/foot_stats_simulator/application_controller.rb
|
73
89
|
- app/helpers/foot_stats_simulator/application_helper.rb
|
74
90
|
- app/models/simulator_championship.rb
|
91
|
+
- app/models/simulator_championship_participation.rb
|
92
|
+
- app/models/simulator_classification.rb
|
75
93
|
- app/models/simulator_match.rb
|
76
94
|
- app/models/simulator_player.rb
|
77
95
|
- app/models/simulator_team.rb
|
96
|
+
- app/models/simulator_timeline/card_event.rb
|
97
|
+
- app/models/simulator_timeline/event.rb
|
98
|
+
- app/models/simulator_timeline/event_handler.rb
|
99
|
+
- app/models/simulator_timeline/goal_event.rb
|
100
|
+
- app/models/simulator_timeline/lorem.rb
|
101
|
+
- app/models/simulator_timeline/lorem_messages.rb
|
102
|
+
- app/models/simulator_timeline/minute.rb
|
103
|
+
- app/models/simulator_timeline/narration_event.rb
|
104
|
+
- app/models/simulator_timeline/period.rb
|
105
|
+
- app/models/simulator_timeline/player_event.rb
|
106
|
+
- app/models/simulator_timeline/states.rb
|
78
107
|
- app/models/simulator_timeline.rb
|
79
108
|
- app/views/layouts/foot_stats_simulator/application.html.erb
|
80
109
|
- config/routes.rb
|