apify_scheduler 0.0.1

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.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/javascripts/scheduler/application.js +19 -0
  6. data/app/assets/stylesheets/scheduler/application.css +15 -0
  7. data/app/controllers/apify/scheduler/application_controller.rb +6 -0
  8. data/app/controllers/apify/scheduler/histories_controller.rb +24 -0
  9. data/app/controllers/apify/scheduler/servers_controller.rb +71 -0
  10. data/app/controllers/apify/scheduler/units_controller.rb +77 -0
  11. data/app/helpers/apify/scheduler/application_helper.rb +6 -0
  12. data/app/helpers/apify/scheduler/histories_helper.rb +4 -0
  13. data/app/helpers/apify/scheduler/servers_helper.rb +4 -0
  14. data/app/helpers/apify/scheduler/units_helper.rb +4 -0
  15. data/app/jobs/unit_performer_job.rb +10 -0
  16. data/app/models/apify/scheduler/frequency_period.rb +5 -0
  17. data/app/models/apify/scheduler/history.rb +9 -0
  18. data/app/models/apify/scheduler/server.rb +12 -0
  19. data/app/models/apify/scheduler/unit.rb +45 -0
  20. data/app/views/apify/scheduler/histories/_history.html.erb +6 -0
  21. data/app/views/apify/scheduler/histories/index.html.erb +14 -0
  22. data/app/views/apify/scheduler/servers/_form.html.erb +48 -0
  23. data/app/views/apify/scheduler/servers/edit.html.erb +6 -0
  24. data/app/views/apify/scheduler/servers/index.html.erb +46 -0
  25. data/app/views/apify/scheduler/servers/new.html.erb +5 -0
  26. data/app/views/apify/scheduler/servers/show.html.erb +35 -0
  27. data/app/views/apify/scheduler/shared/_short_history.html.erb +39 -0
  28. data/app/views/apify/scheduler/units/_form.html.erb +99 -0
  29. data/app/views/apify/scheduler/units/_unit.html.erb +27 -0
  30. data/app/views/apify/scheduler/units/edit.html.erb +6 -0
  31. data/app/views/apify/scheduler/units/index.html.erb +37 -0
  32. data/app/views/apify/scheduler/units/new.html.erb +5 -0
  33. data/app/views/apify/scheduler/units/show.html.erb +36 -0
  34. data/app/views/layouts/apify/scheduler/_flash.html.erb +32 -0
  35. data/app/views/layouts/apify/scheduler/application.html.erb +37 -0
  36. data/config/routes.rb +15 -0
  37. data/db/migrate/20150104005044_create_apify_scheduler_units.rb +24 -0
  38. data/db/migrate/20150105225841_create_apify_servers.rb +14 -0
  39. data/db/migrate/20150105234957_create_apify_histories.rb +13 -0
  40. data/db/migrate/20150112223842_create_frequency_periods.rb +9 -0
  41. data/lib/apify_scheduler.rb +6 -0
  42. data/lib/apify_scheduler/engine.rb +16 -0
  43. data/lib/apify_scheduler/version.rb +5 -0
  44. data/lib/tasks/resque.rake +2 -0
  45. data/lib/tasks/scheduler_tasks.rake +4 -0
  46. data/test/controllers/apify/histories_controller_test.rb +51 -0
  47. data/test/controllers/apify/names_controller_test.rb +51 -0
  48. data/test/controllers/apify/servers_controller_test.rb +51 -0
  49. data/test/controllers/apify/units_controller_test.rb +51 -0
  50. data/test/dummy/README.rdoc +28 -0
  51. data/test/dummy/Rakefile +6 -0
  52. data/test/dummy/app/assets/javascripts/application.js +13 -0
  53. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  54. data/test/dummy/app/controllers/application_controller.rb +5 -0
  55. data/test/dummy/app/helpers/application_helper.rb +2 -0
  56. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  57. data/test/dummy/bin/bundle +3 -0
  58. data/test/dummy/bin/rails +4 -0
  59. data/test/dummy/bin/rake +4 -0
  60. data/test/dummy/config.ru +4 -0
  61. data/test/dummy/config/application.rb +23 -0
  62. data/test/dummy/config/boot.rb +5 -0
  63. data/test/dummy/config/database.yml +25 -0
  64. data/test/dummy/config/environment.rb +5 -0
  65. data/test/dummy/config/environments/development.rb +37 -0
  66. data/test/dummy/config/environments/production.rb +78 -0
  67. data/test/dummy/config/environments/test.rb +39 -0
  68. data/test/dummy/config/initializers/assets.rb +8 -0
  69. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  70. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  71. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  72. data/test/dummy/config/initializers/inflections.rb +16 -0
  73. data/test/dummy/config/initializers/mime_types.rb +4 -0
  74. data/test/dummy/config/initializers/session_store.rb +3 -0
  75. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  76. data/test/dummy/config/locales/en.yml +23 -0
  77. data/test/dummy/config/routes.rb +4 -0
  78. data/test/dummy/config/secrets.yml +22 -0
  79. data/test/dummy/public/404.html +67 -0
  80. data/test/dummy/public/422.html +67 -0
  81. data/test/dummy/public/500.html +66 -0
  82. data/test/dummy/public/favicon.ico +0 -0
  83. data/test/fixtures/apify/histories.yml +11 -0
  84. data/test/fixtures/apify/servers.yml +11 -0
  85. data/test/fixtures/apify/units.yml +11 -0
  86. data/test/helpers/apify/histories_helper_test.rb +6 -0
  87. data/test/helpers/apify/names_helper_test.rb +6 -0
  88. data/test/helpers/apify/servers_helper_test.rb +6 -0
  89. data/test/helpers/apify/units_helper_test.rb +6 -0
  90. data/test/integration/navigation_test.rb +10 -0
  91. data/test/models/apify/history_test.rb +9 -0
  92. data/test/models/apify/server_test.rb +9 -0
  93. data/test/models/apify/unit_test.rb +9 -0
  94. data/test/scheduler_test.rb +7 -0
  95. data/test/test_helper.rb +17 -0
  96. metadata +231 -0
File without changes
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ succ_download: 1
5
+ fail_download: 1
6
+ response_body: MyText
7
+
8
+ two:
9
+ succ_download: 1
10
+ fail_download: 1
11
+ response_body: MyText
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ name: MyString
5
+ url: MyString
6
+ description: MyString
7
+
8
+ two:
9
+ name: MyString
10
+ url: MyString
11
+ description: MyString
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the '{}' from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module Apify::Scheduler
4
+ class HistoriesHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module Apify::Scheduler
4
+ class NamesHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module Apify::Scheduler
4
+ class ServersHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module Apify::Scheduler
4
+ class UnitsHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+ fixtures :all
5
+
6
+ # test "the truth" do
7
+ # assert true
8
+ # end
9
+ end
10
+
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module Apify::Scheduler
4
+ class HistoryTest < ActiveSupport::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module Apify::Scheduler
4
+ class ServerTest < ActiveSupport::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module Apify::Scheduler
4
+ class UnitTest < ActiveSupport::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class SchedulerTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, Scheduler
6
+ end
7
+ end
@@ -0,0 +1,17 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
5
+ ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
6
+ ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
7
+ require "rails/test_help"
8
+
9
+ Rails.backtrace_cleaner.remove_silencers!
10
+
11
+ # Load support files
12
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
13
+
14
+ # Load fixtures from the engine
15
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
16
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
17
+ end
metadata ADDED
@@ -0,0 +1,231 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: apify_scheduler
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - victorvsk
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 4.1.8
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 4.1.8
27
+ - !ruby/object:Gem::Dependency
28
+ name: rest_client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: resque
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 1.25.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.25.2
55
+ description: Create instance (i.e. JSON representation of site crawling rules), set
56
+ Server Nodes addresses with callback urls and choose schedule time.
57
+ email:
58
+ - victor@vyskrebentsev.ru
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - MIT-LICENSE
64
+ - README.rdoc
65
+ - Rakefile
66
+ - app/assets/javascripts/scheduler/application.js
67
+ - app/assets/stylesheets/scheduler/application.css
68
+ - app/controllers/apify/scheduler/application_controller.rb
69
+ - app/controllers/apify/scheduler/histories_controller.rb
70
+ - app/controllers/apify/scheduler/servers_controller.rb
71
+ - app/controllers/apify/scheduler/units_controller.rb
72
+ - app/helpers/apify/scheduler/application_helper.rb
73
+ - app/helpers/apify/scheduler/histories_helper.rb
74
+ - app/helpers/apify/scheduler/servers_helper.rb
75
+ - app/helpers/apify/scheduler/units_helper.rb
76
+ - app/jobs/unit_performer_job.rb
77
+ - app/models/apify/scheduler/frequency_period.rb
78
+ - app/models/apify/scheduler/history.rb
79
+ - app/models/apify/scheduler/server.rb
80
+ - app/models/apify/scheduler/unit.rb
81
+ - app/views/apify/scheduler/histories/_history.html.erb
82
+ - app/views/apify/scheduler/histories/index.html.erb
83
+ - app/views/apify/scheduler/servers/_form.html.erb
84
+ - app/views/apify/scheduler/servers/edit.html.erb
85
+ - app/views/apify/scheduler/servers/index.html.erb
86
+ - app/views/apify/scheduler/servers/new.html.erb
87
+ - app/views/apify/scheduler/servers/show.html.erb
88
+ - app/views/apify/scheduler/shared/_short_history.html.erb
89
+ - app/views/apify/scheduler/units/_form.html.erb
90
+ - app/views/apify/scheduler/units/_unit.html.erb
91
+ - app/views/apify/scheduler/units/edit.html.erb
92
+ - app/views/apify/scheduler/units/index.html.erb
93
+ - app/views/apify/scheduler/units/new.html.erb
94
+ - app/views/apify/scheduler/units/show.html.erb
95
+ - app/views/layouts/apify/scheduler/_flash.html.erb
96
+ - app/views/layouts/apify/scheduler/application.html.erb
97
+ - config/routes.rb
98
+ - db/migrate/20150104005044_create_apify_scheduler_units.rb
99
+ - db/migrate/20150105225841_create_apify_servers.rb
100
+ - db/migrate/20150105234957_create_apify_histories.rb
101
+ - db/migrate/20150112223842_create_frequency_periods.rb
102
+ - lib/apify_scheduler.rb
103
+ - lib/apify_scheduler/engine.rb
104
+ - lib/apify_scheduler/version.rb
105
+ - lib/tasks/resque.rake
106
+ - lib/tasks/scheduler_tasks.rake
107
+ - test/controllers/apify/histories_controller_test.rb
108
+ - test/controllers/apify/names_controller_test.rb
109
+ - test/controllers/apify/servers_controller_test.rb
110
+ - test/controllers/apify/units_controller_test.rb
111
+ - test/dummy/README.rdoc
112
+ - test/dummy/Rakefile
113
+ - test/dummy/app/assets/javascripts/application.js
114
+ - test/dummy/app/assets/stylesheets/application.css
115
+ - test/dummy/app/controllers/application_controller.rb
116
+ - test/dummy/app/helpers/application_helper.rb
117
+ - test/dummy/app/views/layouts/application.html.erb
118
+ - test/dummy/bin/bundle
119
+ - test/dummy/bin/rails
120
+ - test/dummy/bin/rake
121
+ - test/dummy/config.ru
122
+ - test/dummy/config/application.rb
123
+ - test/dummy/config/boot.rb
124
+ - test/dummy/config/database.yml
125
+ - test/dummy/config/environment.rb
126
+ - test/dummy/config/environments/development.rb
127
+ - test/dummy/config/environments/production.rb
128
+ - test/dummy/config/environments/test.rb
129
+ - test/dummy/config/initializers/assets.rb
130
+ - test/dummy/config/initializers/backtrace_silencers.rb
131
+ - test/dummy/config/initializers/cookies_serializer.rb
132
+ - test/dummy/config/initializers/filter_parameter_logging.rb
133
+ - test/dummy/config/initializers/inflections.rb
134
+ - test/dummy/config/initializers/mime_types.rb
135
+ - test/dummy/config/initializers/session_store.rb
136
+ - test/dummy/config/initializers/wrap_parameters.rb
137
+ - test/dummy/config/locales/en.yml
138
+ - test/dummy/config/routes.rb
139
+ - test/dummy/config/secrets.yml
140
+ - test/dummy/public/404.html
141
+ - test/dummy/public/422.html
142
+ - test/dummy/public/500.html
143
+ - test/dummy/public/favicon.ico
144
+ - test/fixtures/apify/histories.yml
145
+ - test/fixtures/apify/servers.yml
146
+ - test/fixtures/apify/units.yml
147
+ - test/helpers/apify/histories_helper_test.rb
148
+ - test/helpers/apify/names_helper_test.rb
149
+ - test/helpers/apify/servers_helper_test.rb
150
+ - test/helpers/apify/units_helper_test.rb
151
+ - test/integration/navigation_test.rb
152
+ - test/models/apify/history_test.rb
153
+ - test/models/apify/server_test.rb
154
+ - test/models/apify/unit_test.rb
155
+ - test/scheduler_test.rb
156
+ - test/test_helper.rb
157
+ homepage: ''
158
+ licenses:
159
+ - MIT
160
+ metadata: {}
161
+ post_install_message:
162
+ rdoc_options: []
163
+ require_paths:
164
+ - lib
165
+ required_ruby_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ required_rubygems_version: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ requirements: []
176
+ rubyforge_project:
177
+ rubygems_version: 2.4.3
178
+ signing_key:
179
+ specification_version: 4
180
+ summary: Apify Scheduler is an easy interface to manage your parser instances.
181
+ test_files:
182
+ - test/dummy/config/environments/development.rb
183
+ - test/dummy/config/environments/test.rb
184
+ - test/dummy/config/environments/production.rb
185
+ - test/dummy/config/secrets.yml
186
+ - test/dummy/config/database.yml
187
+ - test/dummy/config/initializers/session_store.rb
188
+ - test/dummy/config/initializers/filter_parameter_logging.rb
189
+ - test/dummy/config/initializers/mime_types.rb
190
+ - test/dummy/config/initializers/inflections.rb
191
+ - test/dummy/config/initializers/cookies_serializer.rb
192
+ - test/dummy/config/initializers/backtrace_silencers.rb
193
+ - test/dummy/config/initializers/wrap_parameters.rb
194
+ - test/dummy/config/initializers/assets.rb
195
+ - test/dummy/config/application.rb
196
+ - test/dummy/config/routes.rb
197
+ - test/dummy/config/boot.rb
198
+ - test/dummy/config/environment.rb
199
+ - test/dummy/config/locales/en.yml
200
+ - test/dummy/Rakefile
201
+ - test/dummy/app/views/layouts/application.html.erb
202
+ - test/dummy/app/controllers/application_controller.rb
203
+ - test/dummy/app/helpers/application_helper.rb
204
+ - test/dummy/app/assets/javascripts/application.js
205
+ - test/dummy/app/assets/stylesheets/application.css
206
+ - test/dummy/config.ru
207
+ - test/dummy/public/422.html
208
+ - test/dummy/public/favicon.ico
209
+ - test/dummy/public/500.html
210
+ - test/dummy/public/404.html
211
+ - test/dummy/bin/rails
212
+ - test/dummy/bin/bundle
213
+ - test/dummy/bin/rake
214
+ - test/dummy/README.rdoc
215
+ - test/integration/navigation_test.rb
216
+ - test/controllers/apify/names_controller_test.rb
217
+ - test/controllers/apify/servers_controller_test.rb
218
+ - test/controllers/apify/units_controller_test.rb
219
+ - test/controllers/apify/histories_controller_test.rb
220
+ - test/test_helper.rb
221
+ - test/helpers/apify/servers_helper_test.rb
222
+ - test/helpers/apify/units_helper_test.rb
223
+ - test/helpers/apify/names_helper_test.rb
224
+ - test/helpers/apify/histories_helper_test.rb
225
+ - test/scheduler_test.rb
226
+ - test/models/apify/server_test.rb
227
+ - test/models/apify/history_test.rb
228
+ - test/models/apify/unit_test.rb
229
+ - test/fixtures/apify/servers.yml
230
+ - test/fixtures/apify/histories.yml
231
+ - test/fixtures/apify/units.yml