bumbleworks-rails 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.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +16 -0
- data/app/assets/javascripts/bumbleworks/rails/application.js +13 -0
- data/app/assets/stylesheets/bumbleworks/rails/application.css +13 -0
- data/app/controllers/bumbleworks/rails/tasks_controller.rb +77 -0
- data/app/controllers/bumbleworks_controller.rb +11 -0
- data/app/helpers/bumbleworks/rails/application_helper.rb +6 -0
- data/app/helpers/bumbleworks/rails/tasks_helper.rb +32 -0
- data/app/views/bumbleworks/rails/tasks/_table.html.erb +43 -0
- data/app/views/bumbleworks/rails/tasks/index.html.erb +11 -0
- data/app/views/bumbleworks/rails/tasks/show.html.erb +34 -0
- data/app/views/layouts/bumbleworks/rails/application.html.erb +14 -0
- data/config/routes.rb +2 -0
- data/lib/bumbleworks/rails/engine.rb +11 -0
- data/lib/bumbleworks/rails/version.rb +5 -0
- data/lib/bumbleworks/rails.rb +7 -0
- data/lib/bumbleworks/tasks/rails_tasks.rake +6 -0
- data/lib/generators/bumbleworks/rails/install/install_generator.rb +125 -0
- data/lib/generators/bumbleworks/rails/install/templates/config/initializers/bumbleworks.rb +13 -0
- data/lib/generators/bumbleworks/rails/install/templates/config/locales/bumbleworks.en.yml +8 -0
- data/lib/generators/bumbleworks/rails/install/templates/config/storages/redis.yml +20 -0
- data/lib/generators/bumbleworks/rails/install/templates/config/storages/sequel.yml +31 -0
- data/lib/generators/bumbleworks/rails/install/templates/lib/bumbleworks/participants.rb +3 -0
- metadata +164 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3cb1668ccf1e2e1a70da234ef9aa6872e4660cc8
|
4
|
+
data.tar.gz: 257293e6a78dbcf3f2b98c84242dae3184597468
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8c4f218d4f6dc97f1e42de363e1fbeb27167f435dd13b1d40e8f9051c46b3996fc29de437442ab63000e46fae5cd30321b2feefbaf89695f8ef3a09fda0c4632
|
7
|
+
data.tar.gz: 0e71564174d95b85ba85d1c7b5a7a3f32571b98dd7c6092b5428bfd723eedb1c7e98dcd452f0ed5f3b2da812f8c24f65a5070718395b320a5cba79c57d0cd78c
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2014 Bumbleworks
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
8
|
+
load 'rails/tasks/engine.rake'
|
9
|
+
|
10
|
+
Bundler::GemHelper.install_tasks
|
11
|
+
|
12
|
+
require 'rspec/core/rake_task'
|
13
|
+
|
14
|
+
RSpec::Core::RakeTask.new(:spec)
|
15
|
+
|
16
|
+
task :default => [:spec]
|
@@ -0,0 +1,13 @@
|
|
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, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, 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.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
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, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, 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 top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,77 @@
|
|
1
|
+
class Bumbleworks::Rails::TasksController < BumbleworksController
|
2
|
+
before_filter :load_and_authorize_task, :except => :index
|
3
|
+
before_filter :load_entity
|
4
|
+
|
5
|
+
def show
|
6
|
+
render :prefixes => template_prefixes
|
7
|
+
end
|
8
|
+
|
9
|
+
def index
|
10
|
+
[:available_tasks, :claimed_tasks].each do |category|
|
11
|
+
tasks = current_user.send(category)
|
12
|
+
tasks = tasks.for_entity(@entity) if @entity
|
13
|
+
instance_variable_set("@#{category}", tasks)
|
14
|
+
end
|
15
|
+
render :prefixes => template_prefixes
|
16
|
+
end
|
17
|
+
|
18
|
+
def complete
|
19
|
+
if @task.claimant == current_user.claim_token
|
20
|
+
@task.complete(params[:task] || {})
|
21
|
+
flash[:notice] = I18n.t('bumbleworks.tasks.completed')
|
22
|
+
redirect_to tasks_path
|
23
|
+
else
|
24
|
+
flash[:error] = I18n.t('bumbleworks.tasks.unclaimed_complete_attempt')
|
25
|
+
redirect_to entity_task_path @task
|
26
|
+
end
|
27
|
+
rescue Bumbleworks::Task::NotCompletable => e
|
28
|
+
flash[:error] = e.message
|
29
|
+
redirect_to entity_task_path @task
|
30
|
+
end
|
31
|
+
|
32
|
+
def claim
|
33
|
+
current_user.claim(@task)
|
34
|
+
rescue Bumbleworks::User::UnauthorizedClaimAttempt,
|
35
|
+
Bumbleworks::Task::AlreadyClaimed => e
|
36
|
+
flash[:error] = e.message
|
37
|
+
ensure
|
38
|
+
redirect_to entity_task_path @task
|
39
|
+
end
|
40
|
+
|
41
|
+
def release
|
42
|
+
current_user.release(@task)
|
43
|
+
rescue Bumbleworks::User::UnauthorizedReleaseAttempt
|
44
|
+
flash[:error] = I18n.t('bumbleworks.tasks.unauthorized_release_attempt')
|
45
|
+
ensure
|
46
|
+
redirect_to entity_task_path @task
|
47
|
+
end
|
48
|
+
|
49
|
+
protected
|
50
|
+
|
51
|
+
def template_prefixes
|
52
|
+
prefixes = _prefixes.prepend("bumbleworks/tasks")
|
53
|
+
prefixes.unshift("#{@entity.class.entity_type.pluralize}/tasks") if @entity
|
54
|
+
prefixes
|
55
|
+
end
|
56
|
+
|
57
|
+
def load_entity
|
58
|
+
if @task
|
59
|
+
@entity = @task.entity if @task.has_entity?
|
60
|
+
elsif params[:entity_type].present? && params[:entity_id].present?
|
61
|
+
klass = params[:entity_type].classify.constantize
|
62
|
+
render_404 unless Bumbleworks.entity_classes.include?(klass)
|
63
|
+
@entity = klass.first_by_identifier(params[:entity_id])
|
64
|
+
render_404 and return unless @entity
|
65
|
+
end
|
66
|
+
rescue NameError => e
|
67
|
+
render_404
|
68
|
+
end
|
69
|
+
|
70
|
+
def load_and_authorize_task
|
71
|
+
@task = Bumbleworks::Task.find_by_id(params[:id])
|
72
|
+
render_unauthorized and return unless current_user.has_role? @task.role
|
73
|
+
rescue Bumbleworks::Task::MissingWorkitem => e
|
74
|
+
flash[:error] = I18n.t('bumbleworks.tasks.not_found', :task_id => params[:id])
|
75
|
+
redirect_to '/'
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class BumbleworksController < ApplicationController
|
2
|
+
include Bumbleworks::Rails::TasksHelper
|
3
|
+
|
4
|
+
def render_unauthorized
|
5
|
+
render :text => I18n.t('bumbleworks.unauthorized'), :status => :unauthorized
|
6
|
+
end
|
7
|
+
|
8
|
+
def render_404
|
9
|
+
render :text => 'page not found', :status => 404
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Bumbleworks
|
2
|
+
module Rails
|
3
|
+
module TasksHelper
|
4
|
+
def render_task_partial(task, options = {})
|
5
|
+
options[:prefixes] = ["bumbleworks/tasks"]
|
6
|
+
options[:prefixes].unshift("#{task.entity.class.entity_type.pluralize}/tasks") if task.has_entity?
|
7
|
+
template = "custom/_#{task.nickname}"
|
8
|
+
if lookup_context.exists?(template, options[:prefixes])
|
9
|
+
options[:template] = template
|
10
|
+
render options
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def task_name(task)
|
15
|
+
entity = task.has_entity? ? task.entity.to_param : nil
|
16
|
+
I18n.t(task.nickname, :entity => entity, :scope => 'bumbleworks.tasks.names', :default => task.to_s)
|
17
|
+
end
|
18
|
+
|
19
|
+
def entity_task_url(task, options = {})
|
20
|
+
if task.has_entity?
|
21
|
+
options[:entity_type] = task.entity.class.entity_type.pluralize
|
22
|
+
options[:entity_id] = task.entity.identifier
|
23
|
+
end
|
24
|
+
main_app.task_url(options.merge(:id => task.id))
|
25
|
+
end
|
26
|
+
|
27
|
+
def entity_task_path(task, options = {})
|
28
|
+
entity_task_url(task, options.merge(:only_path => true))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<table class="tasks">
|
2
|
+
<% unless tasks.empty? %>
|
3
|
+
<thead>
|
4
|
+
<th>Task</th>
|
5
|
+
<th>Actions</th>
|
6
|
+
<th class="task_role_header">Role</th>
|
7
|
+
</thead>
|
8
|
+
<tbody>
|
9
|
+
<% tasks.sort_by {|x| x['dispatched_at']}.each do |task| %>
|
10
|
+
<tr class="task">
|
11
|
+
<td class="task-name">
|
12
|
+
<%= task_name(task) %>
|
13
|
+
</td>
|
14
|
+
<td class="task-actions">
|
15
|
+
<% if task.claimed? %>
|
16
|
+
<%= button_to 'Release',
|
17
|
+
main_app.release_task_url(:id => task.id), :method => :post, :class=> "release-link",
|
18
|
+
:id => "release-task-#{task.id}" %>
|
19
|
+
<% else %>
|
20
|
+
<%= button_to 'Claim',
|
21
|
+
main_app.claim_task_url(:id => task.id), :method => :post, :class=> "claim-link",
|
22
|
+
:id => "claim-task-#{task.id}" %>
|
23
|
+
<% end %>
|
24
|
+
<%= link_to entity_task_path(task),
|
25
|
+
:method => :get,
|
26
|
+
:id => task.id do %>
|
27
|
+
<button>View</button>
|
28
|
+
<% end %>
|
29
|
+
</td>
|
30
|
+
<td class="task_role">
|
31
|
+
<%= task.role.titleize %>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
<% end %>
|
35
|
+
</tbody>
|
36
|
+
<% else %>
|
37
|
+
<thead>
|
38
|
+
<th>
|
39
|
+
No more tasks!
|
40
|
+
</th>
|
41
|
+
</thead>
|
42
|
+
<% end %>
|
43
|
+
</table>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="window">
|
2
|
+
<header>
|
3
|
+
<h2>Tasks</h2>
|
4
|
+
</header>
|
5
|
+
<h3>Available</h3>
|
6
|
+
<%= render :partial => 'bumbleworks/rails/tasks/table',
|
7
|
+
:locals => { :tasks => @available_tasks } %>
|
8
|
+
<h3>Claimed</h3>
|
9
|
+
<%= render :partial => 'bumbleworks/rails/tasks/table',
|
10
|
+
:locals => { :tasks => @claimed_tasks } %>
|
11
|
+
</div>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<div class="bread-crumb">
|
2
|
+
<% if @task.has_entity? %>
|
3
|
+
<a id="<%= @task.entity_fields[:type].underscore %>_id" href="<%= main_app.send("#{@task.entity.class.entity_type}_path", @task.entity) %>"><%= @task.entity_fields(:humanize => true)[:type] %>: <%= @task.entity.to_param %></a> TASK:
|
4
|
+
<% end %>
|
5
|
+
<%= task_name(@task) %>
|
6
|
+
</div>
|
7
|
+
<div class="window">
|
8
|
+
<header><h2><%= task_name(@task) %></h2></header>
|
9
|
+
<div class="task">
|
10
|
+
<%= render_task_partial(@task) %>
|
11
|
+
</div>
|
12
|
+
<div class="task-controls clearfix">
|
13
|
+
<div id="task_control">
|
14
|
+
<span>
|
15
|
+
<% if @task.claimed? %>
|
16
|
+
Claimed By: <%= @task.claimant %>
|
17
|
+
<% if @task.claimant == current_user.claim_token %>
|
18
|
+
<%= button_to 'Release', main_app.release_task_url(:id => @task.id), :method => :post, :id => "release-#{@task.nickname.gsub('_', '-')}-link", :class => "release-link" %>
|
19
|
+
<% end %>
|
20
|
+
<% else %>
|
21
|
+
<%= button_to 'Claim', main_app.claim_task_url(:id => @task.id), :method => :post, :id => "claim-#{@task.nickname.gsub('_', '-')}-link", :class => "claim-link" %>
|
22
|
+
<% end %>
|
23
|
+
</span>
|
24
|
+
</div>
|
25
|
+
<% if @task.claimant == current_user.claim_token %>
|
26
|
+
<div id='task_work'>
|
27
|
+
<span>
|
28
|
+
<%= button_to 'Complete', main_app.complete_task_url(:id => @task.id), :method => :post,
|
29
|
+
:id => "complete-#{@task.nickname.gsub('_', '-')}-link", :class => "complete-link" %>
|
30
|
+
</span>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
34
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Bumbleworks::Rails</title>
|
5
|
+
<%= stylesheet_link_tag "bumbleworks/rails/application", media: "all" %>
|
6
|
+
<%= javascript_include_tag "bumbleworks/rails/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/base'
|
3
|
+
|
4
|
+
module Bumbleworks
|
5
|
+
module Rails
|
6
|
+
class InstallGenerator < ::Rails::Generators::Base
|
7
|
+
attr_reader :storage_type, :storage_config_path,
|
8
|
+
:storage, :storage_options
|
9
|
+
|
10
|
+
STORAGE_TYPES = ['Sequel', 'Redis', 'Hash']
|
11
|
+
STORAGE_CONFIG_PATH = "config/bumbleworks_storage.yml"
|
12
|
+
SEQUEL_TABLE_NAME = "bumbleworks_documents"
|
13
|
+
QUESTIONS = {
|
14
|
+
:which_storage => "Which storage will you be using?",
|
15
|
+
:storage_config_path => "Where do you want your storage configuration file to live?",
|
16
|
+
:sequel_table_name => "What database table name do you want Bumbleworks to use?"
|
17
|
+
}
|
18
|
+
|
19
|
+
class_option :storage_type, :type => :string,
|
20
|
+
:desc => "Which storage type to use (#{STORAGE_TYPES.join(', ')})"
|
21
|
+
class_option :table_name, :type => :string,
|
22
|
+
:desc => "Table name for key-value store (Sequel storage only)"
|
23
|
+
class_option :storage_config_path, :type => :string,
|
24
|
+
:desc => "Where your storage config file is (or should be created)"
|
25
|
+
|
26
|
+
source_root File.expand_path("../templates", __FILE__)
|
27
|
+
|
28
|
+
desc "Installs Bumbleworks into a Rails app"
|
29
|
+
|
30
|
+
def introduction
|
31
|
+
say <<-INTRODUCTION
|
32
|
+
|
33
|
+
Let's install Bumbleworks into your Rails app!
|
34
|
+
|
35
|
+
INTRODUCTION
|
36
|
+
end
|
37
|
+
|
38
|
+
def check_storage_type
|
39
|
+
@storage_type = if options[:storage_type]
|
40
|
+
unless STORAGE_TYPES.include?(options[:storage_type])
|
41
|
+
say "Storage type specified must be one of: #{STORAGE_TYPES.join(', ')}"
|
42
|
+
exit 1
|
43
|
+
end
|
44
|
+
options[:storage_type].underscore
|
45
|
+
else
|
46
|
+
ask(QUESTIONS[:which_storage], :limited_to => STORAGE_TYPES).underscore
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def add_storage_gem_to_gemfile
|
51
|
+
unless storage_type == 'hash'
|
52
|
+
create_file 'Gemfile', :skip => true
|
53
|
+
add_source 'https://rubygems.org'
|
54
|
+
gem "bumbleworks-#{storage_type}"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def ask_for_table_name
|
59
|
+
if storage_type == 'sequel'
|
60
|
+
unless @table_name = options[:table_name]
|
61
|
+
@table_name = ask("#{QUESTIONS[:sequel_table_name]} [#{SEQUEL_TABLE_NAME}]")
|
62
|
+
@table_name = SEQUEL_TABLE_NAME if @table_name.blank?
|
63
|
+
end
|
64
|
+
@storage_options = { 'sequel_table_name' => options[:table_name] }
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def copy_storage_config_file
|
69
|
+
unless storage_type == 'hash'
|
70
|
+
unless @storage_config_path = options[:storage_config_path]
|
71
|
+
@storage_config_path = ask("#{QUESTIONS[:storage_config_path]} [#{STORAGE_CONFIG_PATH}]")
|
72
|
+
@storage_config_path = STORAGE_CONFIG_PATH if @storage_config_path.blank?
|
73
|
+
end
|
74
|
+
|
75
|
+
template "config/storages/#{storage_type}.yml", storage_config_path
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def copy_initializer
|
80
|
+
template 'config/initializers/bumbleworks.rb',
|
81
|
+
'config/initializers/bumbleworks.rb'
|
82
|
+
end
|
83
|
+
|
84
|
+
def copy_bumbleworks_directory
|
85
|
+
directory 'lib'
|
86
|
+
end
|
87
|
+
|
88
|
+
def copy_locale
|
89
|
+
copy_file "config/locales/bumbleworks.en.yml",
|
90
|
+
"config/locales/bumbleworks.en.yml"
|
91
|
+
end
|
92
|
+
|
93
|
+
def add_task_helper_to_application_controller
|
94
|
+
insert_into_file 'app/controllers/application_controller.rb',
|
95
|
+
:after => "protect_from_forgery with: :exception\n" do <<-RUBY
|
96
|
+
|
97
|
+
helper Bumbleworks::Rails::TasksHelper
|
98
|
+
RUBY
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def farewell
|
103
|
+
say <<-FAREWELL
|
104
|
+
|
105
|
+
We're done! Remember to run `rake bumbleworks:bootstrap` whenever you change
|
106
|
+
process definitions or participant registration. Enjoy using bumbleworks!
|
107
|
+
|
108
|
+
FAREWELL
|
109
|
+
end
|
110
|
+
|
111
|
+
protected
|
112
|
+
|
113
|
+
def storage
|
114
|
+
case storage_type
|
115
|
+
when 'hash'
|
116
|
+
'{}'
|
117
|
+
when 'redis'
|
118
|
+
'Redis.new(storage_config)'
|
119
|
+
when 'sequel'
|
120
|
+
'Sequel.connect(storage_config)'
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% if storage_config_path -%>
|
2
|
+
require 'yaml'
|
3
|
+
storage_config = YAML.load_file('<%= storage_config_path %>')[Rails.env]
|
4
|
+
|
5
|
+
<% end -%>
|
6
|
+
Bumbleworks.configure do |c|
|
7
|
+
c.storage = <%= storage %>
|
8
|
+
<% if storage_options.present? -%>
|
9
|
+
c.storage_options = <%= storage_options %>
|
10
|
+
<% end -%>
|
11
|
+
end
|
12
|
+
|
13
|
+
Bumbleworks.initialize!
|
@@ -0,0 +1,8 @@
|
|
1
|
+
en:
|
2
|
+
bumbleworks:
|
3
|
+
unauthorized: "You are not authorized to access that resource."
|
4
|
+
tasks:
|
5
|
+
completed: "Task completed!"
|
6
|
+
not_found: "Can't find task %{task_id}"
|
7
|
+
unauthorized_release_attempt: "You do not currently have a lock on this task"
|
8
|
+
unclaimed_complete_attempt: "You cannot complete a task not claimed by you"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Using the Redis storage adapter for Bumbleworks.
|
2
|
+
#
|
3
|
+
default: &default
|
4
|
+
# Hostname where database server resides
|
5
|
+
host: localhost
|
6
|
+
|
7
|
+
# Which Redis database number to use
|
8
|
+
db: 0
|
9
|
+
|
10
|
+
development:
|
11
|
+
<<: *default
|
12
|
+
|
13
|
+
test:
|
14
|
+
<<: *default
|
15
|
+
# We use database number 1 by default here, so as to not cause conflicts
|
16
|
+
# with the default 0 used in development/production.
|
17
|
+
db: 1
|
18
|
+
|
19
|
+
production:
|
20
|
+
<<: *default
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Using the Sequel storage adapter for Bumbleworks.
|
2
|
+
#
|
3
|
+
default: &default
|
4
|
+
# Any adapter that Sequel can connect to (mysql, postgres, sqlite, etc.)
|
5
|
+
adapter: postgres
|
6
|
+
|
7
|
+
# Hostname where database server resides
|
8
|
+
host: localhost
|
9
|
+
|
10
|
+
# User to connect to database as
|
11
|
+
username: bumbleworks
|
12
|
+
|
13
|
+
# Password for user specified above
|
14
|
+
password:
|
15
|
+
|
16
|
+
# Database names are specified below, per environment.
|
17
|
+
# If it doesn't already exist, a table will be created in the specified database
|
18
|
+
# (the name of that table is specified in `config/initializers/bumbleworks.rb`
|
19
|
+
# as the `sequel_table_name` storage option).
|
20
|
+
#
|
21
|
+
development:
|
22
|
+
<<: *default
|
23
|
+
database: bumbleworks_development
|
24
|
+
|
25
|
+
test:
|
26
|
+
<<: *default
|
27
|
+
database: bumbleworks_test
|
28
|
+
|
29
|
+
production:
|
30
|
+
<<: *default
|
31
|
+
database: bumbleworks_production
|
metadata
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bumbleworks-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ravi Gadad
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-06-26 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.0.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.0.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bumbleworks
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.0.74
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.0.74
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bumbleworks-gui
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.0.4
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.0.4
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sqlite3
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec-rails
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: generator_spec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Rails Engine for integrating Bumbleworks into Rails.
|
112
|
+
email:
|
113
|
+
- ravi@gadad.net
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- MIT-LICENSE
|
119
|
+
- Rakefile
|
120
|
+
- app/assets/javascripts/bumbleworks/rails/application.js
|
121
|
+
- app/assets/stylesheets/bumbleworks/rails/application.css
|
122
|
+
- app/controllers/bumbleworks/rails/tasks_controller.rb
|
123
|
+
- app/controllers/bumbleworks_controller.rb
|
124
|
+
- app/helpers/bumbleworks/rails/application_helper.rb
|
125
|
+
- app/helpers/bumbleworks/rails/tasks_helper.rb
|
126
|
+
- app/views/bumbleworks/rails/tasks/_table.html.erb
|
127
|
+
- app/views/bumbleworks/rails/tasks/index.html.erb
|
128
|
+
- app/views/bumbleworks/rails/tasks/show.html.erb
|
129
|
+
- app/views/layouts/bumbleworks/rails/application.html.erb
|
130
|
+
- config/routes.rb
|
131
|
+
- lib/bumbleworks/rails.rb
|
132
|
+
- lib/bumbleworks/rails/engine.rb
|
133
|
+
- lib/bumbleworks/rails/version.rb
|
134
|
+
- lib/bumbleworks/tasks/rails_tasks.rake
|
135
|
+
- lib/generators/bumbleworks/rails/install/install_generator.rb
|
136
|
+
- lib/generators/bumbleworks/rails/install/templates/config/initializers/bumbleworks.rb
|
137
|
+
- lib/generators/bumbleworks/rails/install/templates/config/locales/bumbleworks.en.yml
|
138
|
+
- lib/generators/bumbleworks/rails/install/templates/config/storages/redis.yml
|
139
|
+
- lib/generators/bumbleworks/rails/install/templates/config/storages/sequel.yml
|
140
|
+
- lib/generators/bumbleworks/rails/install/templates/lib/bumbleworks/participants.rb
|
141
|
+
homepage: ''
|
142
|
+
licenses: []
|
143
|
+
metadata: {}
|
144
|
+
post_install_message:
|
145
|
+
rdoc_options: []
|
146
|
+
require_paths:
|
147
|
+
- lib
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
requirements: []
|
159
|
+
rubyforge_project:
|
160
|
+
rubygems_version: 2.2.2
|
161
|
+
signing_key:
|
162
|
+
specification_version: 4
|
163
|
+
summary: Rails Engine for integrating Bumbleworks into Rails.
|
164
|
+
test_files: []
|