workerholic 0.0.22 → 0.0.23
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 +4 -4
- data/lib/workerholic/job_processor.rb +12 -11
- data/lib/workerholic/version.rb +1 -1
- data/workerholic.gemspec +1 -1
- metadata +1 -80
- data/app_test/bm.rb +0 -45
- data/app_test/job_test.rb +0 -138
- data/app_test/run.rb +0 -95
- data/demo_app/.gitignore +0 -19
- data/demo_app/Gemfile +0 -40
- data/demo_app/README.md +0 -24
- data/demo_app/Rakefile +0 -6
- data/demo_app/app/assets/config/manifest.js +0 -3
- data/demo_app/app/assets/images/.keep +0 -0
- data/demo_app/app/assets/javascripts/application.js +0 -14
- data/demo_app/app/assets/javascripts/cable.js +0 -13
- data/demo_app/app/assets/javascripts/channels/.keep +0 -0
- data/demo_app/app/assets/stylesheets/application.css +0 -15
- data/demo_app/app/assets/stylesheets/main.scss +0 -140
- data/demo_app/app/channels/application_cable/channel.rb +0 -4
- data/demo_app/app/channels/application_cable/connection.rb +0 -4
- data/demo_app/app/controllers/application_controller.rb +0 -3
- data/demo_app/app/controllers/concerns/.keep +0 -0
- data/demo_app/app/controllers/jobs_controller.rb +0 -38
- data/demo_app/app/helpers/application_helper.rb +0 -2
- data/demo_app/app/jobs/application_job.rb +0 -2
- data/demo_app/app/jobs/cpu_bound_job.rb +0 -14
- data/demo_app/app/jobs/io_bound_job.rb +0 -8
- data/demo_app/app/jobs/non_blocking_job.rb +0 -8
- data/demo_app/app/mailers/application_mailer.rb +0 -4
- data/demo_app/app/models/application_record.rb +0 -3
- data/demo_app/app/models/concerns/.keep +0 -0
- data/demo_app/app/views/jobs/_actions_form.html.slim +0 -15
- data/demo_app/app/views/jobs/_footer.html.slim +0 -5
- data/demo_app/app/views/jobs/_header.html.slim +0 -3
- data/demo_app/app/views/jobs/index.html.slim +0 -8
- data/demo_app/app/views/layouts/application.html.slim +0 -15
- data/demo_app/app/views/layouts/mailer.html.erb +0 -13
- data/demo_app/app/views/layouts/mailer.text.erb +0 -1
- data/demo_app/bin/bundle +0 -3
- data/demo_app/bin/rails +0 -9
- data/demo_app/bin/rake +0 -9
- data/demo_app/bin/setup +0 -38
- data/demo_app/bin/spring +0 -17
- data/demo_app/bin/update +0 -29
- data/demo_app/bin/yarn +0 -11
- data/demo_app/config/application.rb +0 -19
- data/demo_app/config/boot.rb +0 -3
- data/demo_app/config/cable.yml +0 -10
- data/demo_app/config/database.yml +0 -85
- data/demo_app/config/environment.rb +0 -5
- data/demo_app/config/environments/development.rb +0 -54
- data/demo_app/config/environments/production.rb +0 -91
- data/demo_app/config/environments/test.rb +0 -42
- data/demo_app/config/initializers/application_controller_renderer.rb +0 -6
- data/demo_app/config/initializers/assets.rb +0 -14
- data/demo_app/config/initializers/backtrace_silencers.rb +0 -7
- data/demo_app/config/initializers/cookies_serializer.rb +0 -5
- data/demo_app/config/initializers/filter_parameter_logging.rb +0 -4
- data/demo_app/config/initializers/inflections.rb +0 -16
- data/demo_app/config/initializers/mime_types.rb +0 -4
- data/demo_app/config/initializers/wrap_parameters.rb +0 -14
- data/demo_app/config/locales/en.yml +0 -33
- data/demo_app/config/puma.rb +0 -56
- data/demo_app/config/routes.rb +0 -6
- data/demo_app/config/secrets.yml +0 -32
- data/demo_app/config/spring.rb +0 -6
- data/demo_app/config.ru +0 -5
- data/demo_app/db/schema.rb +0 -18
- data/demo_app/db/seeds.rb +0 -7
- data/demo_app/lib/assets/.keep +0 -0
- data/demo_app/lib/tasks/.keep +0 -0
- data/demo_app/log/.keep +0 -0
- data/demo_app/package.json +0 -5
- data/demo_app/public/404.html +0 -67
- data/demo_app/public/422.html +0 -67
- data/demo_app/public/500.html +0 -66
- data/demo_app/public/apple-touch-icon-precomposed.png +0 -0
- data/demo_app/public/apple-touch-icon.png +0 -0
- data/demo_app/public/favicon.ico +0 -0
- data/demo_app/public/robots.txt +0 -1
- data/demo_app/tmp/.keep +0 -0
- data/demo_app/vendor/.keep +0 -0
- data/pkg/workerholic-0.0.14.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86a4ad33857310f6ae88067255e2ec98f0290e31
|
4
|
+
data.tar.gz: 0047fd7373d52d09e8d93a7f297ef9e9143657f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eccb9b6cccbec30b2c2c67232b6137fd8028b84a90dedc224698580bd3f4723785d617f00a9c7b9af338c611ba60ef1ef97dfbf1f4a2bd554a298c5e6bed026
|
7
|
+
data.tar.gz: d738cd59fefb6ef6abaff08ed10d07a5397a80c18db3b093aefb1fda4cb61f67f26084def316c955ad67c83161777308406215de653a0c3b973cf637f778b26b
|
@@ -10,21 +10,22 @@ module Workerholic
|
|
10
10
|
def process
|
11
11
|
job = JobSerializer.deserialize(serialized_job)
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
job.statistics.completed_at = Time.now.to_f
|
13
|
+
job.statistics.started_at = Time.now.to_f
|
14
|
+
job_result = job.perform
|
15
|
+
job.statistics.completed_at = Time.now.to_f
|
17
16
|
|
18
|
-
|
19
|
-
|
17
|
+
StatsStorage.save_job('completed_jobs', job)
|
18
|
+
StatsStorage.update_historical_stats('completed_jobs', job.klass.to_s)
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
# @logger.info("Completed: your job from class #{job.klass} was completed on #{job.statistics.completed_at}.")
|
21
|
+
|
22
|
+
# forces AR to release idle connections back to the pool
|
23
|
+
ActiveRecord::Base.clear_active_connections! if defined?(Rails)
|
25
24
|
|
26
|
-
end
|
27
25
|
job_result
|
26
|
+
rescue Exception => e
|
27
|
+
job.statistics.errors.push([e.class, e.message])
|
28
|
+
retry_job(job, e)
|
28
29
|
end
|
29
30
|
|
30
31
|
private
|
data/lib/workerholic/version.rb
CHANGED
data/workerholic.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.homepage = 'https://github.com/workerholic/workerholic'
|
12
12
|
gem.license = 'MIT'
|
13
13
|
|
14
|
-
gem.files = `git ls-files`.split("\n")
|
14
|
+
gem.files = `git ls-files | grep -Ev '^(app_test|demo_app)'`.split("\n")
|
15
15
|
gem.test_files = `git ls-files -- spec/*`.split("\n")
|
16
16
|
gem.executables = ['workerholic', 'workerholic-web']
|
17
17
|
gem.require_paths = ['lib']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workerholic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antoine Leclercq
|
@@ -117,86 +117,8 @@ files:
|
|
117
117
|
- LICENSE
|
118
118
|
- README.md
|
119
119
|
- Rakefile
|
120
|
-
- app_test/bm.rb
|
121
|
-
- app_test/job_test.rb
|
122
|
-
- app_test/run.rb
|
123
120
|
- bin/workerholic
|
124
121
|
- bin/workerholic-web
|
125
|
-
- demo_app/.gitignore
|
126
|
-
- demo_app/Gemfile
|
127
|
-
- demo_app/README.md
|
128
|
-
- demo_app/Rakefile
|
129
|
-
- demo_app/app/assets/config/manifest.js
|
130
|
-
- demo_app/app/assets/images/.keep
|
131
|
-
- demo_app/app/assets/javascripts/application.js
|
132
|
-
- demo_app/app/assets/javascripts/cable.js
|
133
|
-
- demo_app/app/assets/javascripts/channels/.keep
|
134
|
-
- demo_app/app/assets/stylesheets/application.css
|
135
|
-
- demo_app/app/assets/stylesheets/main.scss
|
136
|
-
- demo_app/app/channels/application_cable/channel.rb
|
137
|
-
- demo_app/app/channels/application_cable/connection.rb
|
138
|
-
- demo_app/app/controllers/application_controller.rb
|
139
|
-
- demo_app/app/controllers/concerns/.keep
|
140
|
-
- demo_app/app/controllers/jobs_controller.rb
|
141
|
-
- demo_app/app/helpers/application_helper.rb
|
142
|
-
- demo_app/app/jobs/application_job.rb
|
143
|
-
- demo_app/app/jobs/cpu_bound_job.rb
|
144
|
-
- demo_app/app/jobs/io_bound_job.rb
|
145
|
-
- demo_app/app/jobs/non_blocking_job.rb
|
146
|
-
- demo_app/app/mailers/application_mailer.rb
|
147
|
-
- demo_app/app/models/application_record.rb
|
148
|
-
- demo_app/app/models/concerns/.keep
|
149
|
-
- demo_app/app/views/jobs/_actions_form.html.slim
|
150
|
-
- demo_app/app/views/jobs/_footer.html.slim
|
151
|
-
- demo_app/app/views/jobs/_header.html.slim
|
152
|
-
- demo_app/app/views/jobs/index.html.slim
|
153
|
-
- demo_app/app/views/layouts/application.html.slim
|
154
|
-
- demo_app/app/views/layouts/mailer.html.erb
|
155
|
-
- demo_app/app/views/layouts/mailer.text.erb
|
156
|
-
- demo_app/bin/bundle
|
157
|
-
- demo_app/bin/rails
|
158
|
-
- demo_app/bin/rake
|
159
|
-
- demo_app/bin/setup
|
160
|
-
- demo_app/bin/spring
|
161
|
-
- demo_app/bin/update
|
162
|
-
- demo_app/bin/yarn
|
163
|
-
- demo_app/config.ru
|
164
|
-
- demo_app/config/application.rb
|
165
|
-
- demo_app/config/boot.rb
|
166
|
-
- demo_app/config/cable.yml
|
167
|
-
- demo_app/config/database.yml
|
168
|
-
- demo_app/config/environment.rb
|
169
|
-
- demo_app/config/environments/development.rb
|
170
|
-
- demo_app/config/environments/production.rb
|
171
|
-
- demo_app/config/environments/test.rb
|
172
|
-
- demo_app/config/initializers/application_controller_renderer.rb
|
173
|
-
- demo_app/config/initializers/assets.rb
|
174
|
-
- demo_app/config/initializers/backtrace_silencers.rb
|
175
|
-
- demo_app/config/initializers/cookies_serializer.rb
|
176
|
-
- demo_app/config/initializers/filter_parameter_logging.rb
|
177
|
-
- demo_app/config/initializers/inflections.rb
|
178
|
-
- demo_app/config/initializers/mime_types.rb
|
179
|
-
- demo_app/config/initializers/wrap_parameters.rb
|
180
|
-
- demo_app/config/locales/en.yml
|
181
|
-
- demo_app/config/puma.rb
|
182
|
-
- demo_app/config/routes.rb
|
183
|
-
- demo_app/config/secrets.yml
|
184
|
-
- demo_app/config/spring.rb
|
185
|
-
- demo_app/db/schema.rb
|
186
|
-
- demo_app/db/seeds.rb
|
187
|
-
- demo_app/lib/assets/.keep
|
188
|
-
- demo_app/lib/tasks/.keep
|
189
|
-
- demo_app/log/.keep
|
190
|
-
- demo_app/package.json
|
191
|
-
- demo_app/public/404.html
|
192
|
-
- demo_app/public/422.html
|
193
|
-
- demo_app/public/500.html
|
194
|
-
- demo_app/public/apple-touch-icon-precomposed.png
|
195
|
-
- demo_app/public/apple-touch-icon.png
|
196
|
-
- demo_app/public/favicon.ico
|
197
|
-
- demo_app/public/robots.txt
|
198
|
-
- demo_app/tmp/.keep
|
199
|
-
- demo_app/vendor/.keep
|
200
122
|
- lib/workerholic.rb
|
201
123
|
- lib/workerholic/adapters/active_job_adapter.rb
|
202
124
|
- lib/workerholic/cli.rb
|
@@ -231,7 +153,6 @@ files:
|
|
231
153
|
- lib/workerholic/worker.rb
|
232
154
|
- lib/workerholic/worker_balancer.rb
|
233
155
|
- logos.png
|
234
|
-
- pkg/workerholic-0.0.14.gem
|
235
156
|
- spec/helpers/helper_methods.rb
|
236
157
|
- spec/helpers/job_tests.rb
|
237
158
|
- spec/integration/dequeuing_and_job_processing_spec.rb
|
data/app_test/bm.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'benchmark'
|
2
|
-
|
3
|
-
class FibCruncher
|
4
|
-
def self.perform(n)
|
5
|
-
a, b = 0, 1
|
6
|
-
while b < n
|
7
|
-
a, b = b, a + b
|
8
|
-
end
|
9
|
-
b
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def run_benchmark(n)
|
14
|
-
Benchmark.bm do |r|
|
15
|
-
r.report do
|
16
|
-
n.times do
|
17
|
-
FibCruncher.perform(1_000)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
r.report do
|
22
|
-
n.times do
|
23
|
-
FibCruncher.perform(1_000_00)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
r.report do
|
28
|
-
n.times do
|
29
|
-
FibCruncher.perform(1_000_000)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
r.report do
|
34
|
-
n.times do
|
35
|
-
FibCruncher.perform(1_000_000_0)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
r.report do
|
40
|
-
n.times do
|
41
|
-
FibCruncher.perform(1_000_000_000)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
data/app_test/job_test.rb
DELETED
@@ -1,138 +0,0 @@
|
|
1
|
-
# $LOAD_PATH.unshift(__dir__ + '/../lib')
|
2
|
-
require 'workerholic'
|
3
|
-
require 'prime'
|
4
|
-
|
5
|
-
class JobTestFast
|
6
|
-
include Workerholic::Job
|
7
|
-
job_options queue_name: 'job_fast'
|
8
|
-
|
9
|
-
def perform(str, num)
|
10
|
-
str
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
class JobTestSlow
|
15
|
-
include Workerholic::Job
|
16
|
-
job_options queue_name: 'job_slow'
|
17
|
-
|
18
|
-
def perform(str, num)
|
19
|
-
sleep(0.5)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
class ThreadKiller
|
24
|
-
include Workerholic::Job
|
25
|
-
|
26
|
-
def perform(string, n)
|
27
|
-
Thread.main.kill
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
class LargeArg
|
32
|
-
include Workerholic::Job
|
33
|
-
|
34
|
-
def perform(arr, n)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
class ManyArgs
|
39
|
-
include Workerholic::Job
|
40
|
-
|
41
|
-
def perform(n, *args)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
# A CPU-blocking operation
|
46
|
-
class HeavyCalculation
|
47
|
-
include Workerholic::Job
|
48
|
-
|
49
|
-
def perform(arr_size)
|
50
|
-
#arr = bubble_sort(arr)
|
51
|
-
generate_large_array(arr_size)
|
52
|
-
end
|
53
|
-
|
54
|
-
def generate_large_array(arr_size)
|
55
|
-
result = []
|
56
|
-
arr_size.times do
|
57
|
-
result << rand(50 ** 10)
|
58
|
-
end
|
59
|
-
|
60
|
-
result
|
61
|
-
end
|
62
|
-
|
63
|
-
def bubble_sort(array)
|
64
|
-
return array if array.size <= 1
|
65
|
-
|
66
|
-
unsorted = true
|
67
|
-
|
68
|
-
while unsorted do
|
69
|
-
unsorted = false
|
70
|
-
0.upto(array.size-2) do |i|
|
71
|
-
if array[i] > array[i+1]
|
72
|
-
array[i], array[i+1] = array[i+1], array[i]
|
73
|
-
unsorted = true
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
array
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
class GetPrimes
|
83
|
-
include Workerholic::Job
|
84
|
-
|
85
|
-
def perform(n, max)
|
86
|
-
Prime.each(max) do |prime|
|
87
|
-
prime
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
class FutureJob
|
93
|
-
include Workerholic::Job
|
94
|
-
|
95
|
-
def perform(n)
|
96
|
-
n
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
|
-
class FutureJobWithQueue
|
101
|
-
include Workerholic::Job
|
102
|
-
job_options queue_name: 'specific_queue_for_delayed_jobs'
|
103
|
-
|
104
|
-
def perform(n)
|
105
|
-
n
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
class FailedJob
|
110
|
-
include Workerholic::Job
|
111
|
-
|
112
|
-
def perform(n)
|
113
|
-
raise Exception
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
class FailedJobWithQueue
|
118
|
-
include Workerholic::Job
|
119
|
-
job_options queue_name: 'specific_queue_for_failed_jobs'
|
120
|
-
|
121
|
-
def perform(n)
|
122
|
-
raise Exception
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
class FibCruncher
|
127
|
-
include Workerholic::Job
|
128
|
-
|
129
|
-
def perform(n)
|
130
|
-
a, b = 0, 1
|
131
|
-
|
132
|
-
while b < n
|
133
|
-
a, b = b, a + b
|
134
|
-
end
|
135
|
-
|
136
|
-
puts b
|
137
|
-
end
|
138
|
-
end
|
data/app_test/run.rb
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
require_relative 'job_test'
|
2
|
-
|
3
|
-
module TestRunner
|
4
|
-
def self.non_blocking(num_of_cycles)
|
5
|
-
num_of_cycles.times do |n|
|
6
|
-
JobTestFast.new.perform_async('NONBLOCKING', n)
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.blocking(num_of_cycles)
|
11
|
-
num_of_cycles.times do |n|
|
12
|
-
JobTestSlow.new.perform_async('BLOCKING', n)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.thread_killer(num_of_cycles)
|
17
|
-
num_of_cycles.times do |n|
|
18
|
-
ThreadKiller.new.perform_async('Kill', n)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.large_arg(num_of_cycles)
|
23
|
-
arg = Array.new(10000, 'string')
|
24
|
-
|
25
|
-
num_of_cycles.times do |n|
|
26
|
-
LargeArg.new.perform_async(arg, n)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.generate_array(num_of_cycles, array_size)
|
31
|
-
num_of_cycles.times do
|
32
|
-
HeavyCalculation.new.perform_async(array_size)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def self.many_args(num_of_cycles)
|
37
|
-
num_of_cycles.times do |n|
|
38
|
-
ManyArgs.new.perform_async(n, [1, 2, 3], { key: 'value'}, :symb, 'string', 22, false)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def self.calculate_primes(num_of_cycles)
|
43
|
-
num_of_cycles.times do |n|
|
44
|
-
GetPrimes.new.perform_async(n, 10)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def self.enqueue_delayed(num_of_cycles)
|
49
|
-
num_of_cycles.times do |n|
|
50
|
-
FutureJob.new.perform_delayed(10, n)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def self.enqueue_delayed_with_queue(num_of_cycles)
|
55
|
-
num_of_cycles.times do |n|
|
56
|
-
FutureJobWithQueue.new.perform_delayed(10, n)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def self.failed_jobs(num_of_cycles)
|
61
|
-
num_of_cycles.times do |n|
|
62
|
-
FailedJob.new.perform_async(n)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
def self.failed_jobs_with_queue(num_of_cycles)
|
67
|
-
num_of_cycles.times do |n|
|
68
|
-
FailedJobWithQueue.new.perform_async(n)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
def self.multiple_processes(num_of_proc, jobs)
|
73
|
-
pids = (1..num_of_proc).to_a.map do
|
74
|
-
fork do
|
75
|
-
jobs.each do |job|
|
76
|
-
TestRunner.send(:job[0], job[1..-1])
|
77
|
-
end
|
78
|
-
|
79
|
-
exit
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
pids.each { |pid| Process.wait(pid) }
|
84
|
-
end
|
85
|
-
|
86
|
-
def self.fibonacci_cruncher(num_of_cycles)
|
87
|
-
num_of_cycles.times do |n|
|
88
|
-
FibCruncher.new.perform_async(1_000)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
TestRunner.non_blocking(10000)
|
94
|
-
TestRunner.blocking(10000)
|
95
|
-
TestRunner.fibonacci_cruncher(10000)
|
data/demo_app/.gitignore
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
-
#
|
3
|
-
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
-
# or operating system, you probably want to add a global ignore instead:
|
5
|
-
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
-
|
7
|
-
# Ignore bundler config.
|
8
|
-
/.bundle
|
9
|
-
|
10
|
-
# Ignore all logfiles and tempfiles.
|
11
|
-
/log/*
|
12
|
-
/tmp/*
|
13
|
-
!/log/.keep
|
14
|
-
!/tmp/.keep
|
15
|
-
|
16
|
-
/node_modules
|
17
|
-
/yarn-error.log
|
18
|
-
|
19
|
-
.byebug_history
|
data/demo_app/Gemfile
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
git_source(:github) do |repo_name|
|
4
|
-
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
|
5
|
-
"https://github.com/#{repo_name}.git"
|
6
|
-
end
|
7
|
-
|
8
|
-
|
9
|
-
gem 'rails', '~> 5.1.3'
|
10
|
-
gem 'pg', '~> 0.18'
|
11
|
-
gem 'puma', '~> 3.7'
|
12
|
-
gem 'sass-rails', '~> 5.0'
|
13
|
-
gem 'uglifier', '>= 1.3.0'
|
14
|
-
gem 'coffee-rails', '~> 4.2'
|
15
|
-
#gem 'turbolinks', '~> 5'
|
16
|
-
gem 'jbuilder', '~> 2.5'
|
17
|
-
gem 'slim-rails'
|
18
|
-
gem 'http'
|
19
|
-
gem 'workerholic'
|
20
|
-
|
21
|
-
group :development, :test do
|
22
|
-
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
23
|
-
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
24
|
-
# Adds support for Capybara system testing and selenium driver
|
25
|
-
gem 'capybara', '~> 2.13'
|
26
|
-
gem 'selenium-webdriver'
|
27
|
-
end
|
28
|
-
|
29
|
-
group :development do
|
30
|
-
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
|
31
|
-
gem 'web-console', '>= 3.3.0'
|
32
|
-
gem 'pry-byebug'
|
33
|
-
gem 'listen', '>= 3.0.5', '< 3.2'
|
34
|
-
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
35
|
-
# gem 'spring'
|
36
|
-
# gem 'spring-watcher-listen', '~> 2.0.0'
|
37
|
-
end
|
38
|
-
|
39
|
-
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
40
|
-
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
data/demo_app/README.md
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
data/demo_app/Rakefile
DELETED
File without changes
|
@@ -1,14 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
|
5
|
-
// vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require rails-ujs
|
14
|
-
//= require_tree .
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
-
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
3
|
-
//
|
4
|
-
//= require action_cable
|
5
|
-
//= require_self
|
6
|
-
//= require_tree ./channels
|
7
|
-
|
8
|
-
(function() {
|
9
|
-
this.App || (this.App = {});
|
10
|
-
|
11
|
-
App.cable = ActionCable.createConsumer();
|
12
|
-
|
13
|
-
}).call(this);
|
File without changes
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
|
6
|
-
* vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
-
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
-
* It is generally better to create a new file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|