pbw 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/MIT-LICENSE +1 -1
- data/Rakefile +7 -0
- data/app/controllers/pbw/application_controller.rb +9 -3
- data/app/controllers/pbw/areas_controller.rb +7 -0
- data/app/controllers/pbw/base_models_controller.rb +106 -0
- data/app/controllers/pbw/capabilities_controller.rb +7 -0
- data/app/controllers/pbw/constraints_controller.rb +7 -0
- data/app/controllers/pbw/item_containers_controller.rb +7 -0
- data/app/controllers/pbw/item_conversions_controller.rb +7 -0
- data/app/controllers/pbw/item_transfers_controller.rb +7 -0
- data/app/controllers/pbw/items_controller.rb +7 -0
- data/app/controllers/pbw/processes_controller.rb +7 -0
- data/app/controllers/pbw/roles_controller.rb +5 -2
- data/app/controllers/pbw/tokens_controller.rb +7 -0
- data/app/controllers/pbw/triggers_controller.rb +7 -0
- data/app/controllers/pbw/user_tokens_controller.rb +7 -0
- data/app/models/pbw/area.rb +17 -0
- data/app/models/pbw/capability.rb +5 -0
- data/app/models/pbw/constraint.rb +6 -0
- data/app/models/pbw/item.rb +15 -0
- data/app/models/pbw/item_container.rb +12 -0
- data/app/models/pbw/item_conversion.rb +9 -0
- data/app/models/pbw/item_transfer.rb +9 -0
- data/app/models/pbw/permission.rb +1 -0
- data/app/models/pbw/process.rb +10 -0
- data/app/models/pbw/role.rb +1 -0
- data/app/models/pbw/rule.rb +11 -0
- data/app/models/pbw/token.rb +16 -0
- data/app/models/pbw/trigger.rb +7 -0
- data/app/models/pbw/user.rb +7 -5
- data/app/models/pbw/user_token.rb +16 -0
- data/app/views/layouts/pbw/application.html.erb +41 -8
- data/config/initializers/devise.rb +80 -4
- data/config/locales/devise.en.yml +59 -0
- data/config/routes.rb +11 -0
- data/lib/generators/pbw/install/install_generator.rb +9 -1
- data/lib/generators/pbw/install/templates/application.html.erb +47 -0
- data/lib/pbw/engine.rb +33 -13
- data/lib/pbw/version.rb +1 -1
- data/public/Foundation-MIT-LICENSE.txt +20 -0
- data/public/config.rb +26 -0
- data/public/humans.txt +8 -0
- data/public/javascripts/foundation/foundation.alerts.js +52 -0
- data/public/javascripts/foundation/foundation.clearing.js +516 -0
- data/public/javascripts/foundation/foundation.cookie.js +74 -0
- data/public/javascripts/foundation/foundation.dropdown.js +178 -0
- data/public/javascripts/foundation/foundation.forms.js +525 -0
- data/public/javascripts/foundation/foundation.interchange.js +271 -0
- data/public/javascripts/foundation/foundation.joyride.js +844 -0
- data/public/javascripts/foundation/foundation.js +447 -0
- data/public/javascripts/foundation/foundation.magellan.js +134 -0
- data/public/javascripts/foundation/foundation.orbit.js +390 -0
- data/public/javascripts/foundation/foundation.placeholder.js +179 -0
- data/public/javascripts/foundation/foundation.reveal.js +330 -0
- data/public/javascripts/foundation/foundation.section.js +422 -0
- data/public/javascripts/foundation/foundation.tooltips.js +208 -0
- data/public/javascripts/foundation/foundation.topbar.js +303 -0
- data/public/javascripts/vendor/custom.modernizr.js +4 -0
- data/public/javascripts/vendor/jquery.js +9807 -0
- data/public/javascripts/vendor/zepto.js +2000 -0
- data/public/robots.txt +4 -0
- data/public/sass/_normalize.scss +402 -0
- data/public/sass/_settings.scss +1271 -0
- data/public/sass/app.scss +48 -0
- data/public/stylesheets/app.css +6686 -0
- metadata +82 -4
- data/app/assets/javascripts/pbw/application.js +0 -13
- data/app/assets/stylesheets/pbw/application.css +0 -13
@@ -0,0 +1,59 @@
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
devise:
|
5
|
+
confirmations:
|
6
|
+
confirmed: "Your account was successfully confirmed. You are now signed in."
|
7
|
+
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
|
8
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
|
9
|
+
failure:
|
10
|
+
already_authenticated: "You are already signed in."
|
11
|
+
inactive: "Your account was not activated yet."
|
12
|
+
invalid: "Invalid email or password."
|
13
|
+
invalid_token: "Invalid authentication token."
|
14
|
+
locked: "Your account is locked."
|
15
|
+
not_found_in_database: "Invalid email or password."
|
16
|
+
timeout: "Your session expired, please sign in again to continue."
|
17
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
+
unconfirmed: "You have to confirm your account before continuing."
|
19
|
+
mailer:
|
20
|
+
confirmation_instructions:
|
21
|
+
subject: "Confirmation instructions"
|
22
|
+
reset_password_instructions:
|
23
|
+
subject: "Reset password instructions"
|
24
|
+
unlock_instructions:
|
25
|
+
subject: "Unlock Instructions"
|
26
|
+
omniauth_callbacks:
|
27
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
28
|
+
success: "Successfully authenticated from %{kind} account."
|
29
|
+
passwords:
|
30
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
31
|
+
send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
|
32
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
33
|
+
updated: "Your password was changed successfully. You are now signed in."
|
34
|
+
updated_not_active: "Your password was changed successfully."
|
35
|
+
registrations:
|
36
|
+
destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
|
37
|
+
signed_up: "Welcome! You have signed up successfully."
|
38
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
39
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
40
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
|
41
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
|
42
|
+
updated: "You updated your account successfully."
|
43
|
+
sessions:
|
44
|
+
signed_in: "Signed in successfully."
|
45
|
+
signed_out: "Signed out successfully."
|
46
|
+
unlocks:
|
47
|
+
send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
|
48
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
|
49
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
50
|
+
errors:
|
51
|
+
messages:
|
52
|
+
already_confirmed: "was already confirmed, please try signing in"
|
53
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
54
|
+
expired: "has expired, please request a new one"
|
55
|
+
not_found: "not found"
|
56
|
+
not_locked: "was not locked"
|
57
|
+
not_saved:
|
58
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
59
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
data/config/routes.rb
CHANGED
@@ -3,4 +3,15 @@ Pbw::Engine.routes.draw do
|
|
3
3
|
class_name: 'Pbw::User',
|
4
4
|
module: :devise
|
5
5
|
}
|
6
|
+
resources :areas
|
7
|
+
resources :capabilities
|
8
|
+
resources :constraints
|
9
|
+
resources :processes
|
10
|
+
resources :items
|
11
|
+
resources :item_containers
|
12
|
+
resources :item_conversions
|
13
|
+
resources :item_transfers
|
14
|
+
resources :tokens
|
15
|
+
resources :triggers
|
16
|
+
resources :user_tokens
|
6
17
|
end
|
@@ -31,7 +31,15 @@ module Pbw
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def add_engine_routes
|
34
|
-
route "mount Pbw::Engine, :at => '/'"
|
34
|
+
route "mount Pbw::Engine, :at => '/pbw'"
|
35
|
+
end
|
36
|
+
|
37
|
+
def devise_views
|
38
|
+
generate "devise:views"
|
39
|
+
end
|
40
|
+
|
41
|
+
def engine_layout
|
42
|
+
template "application.html.erb", "app/views/pbw/layouts/application.html.erb"
|
35
43
|
end
|
36
44
|
end
|
37
45
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en" > <![endif]-->
|
4
|
+
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
5
|
+
<head>
|
6
|
+
<meta charset="utf-8" />
|
7
|
+
<meta name="viewport" content="width=device-width" />
|
8
|
+
<title>PBW</title>
|
9
|
+
<link rel="stylesheet" href="stylesheets/app.css" />
|
10
|
+
<script src="javascripts/vendor/custom.modernizr.js"></script>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<div class="row">
|
14
|
+
<div class="large-12 columns">
|
15
|
+
<h2>Welcome to PBW</h2>
|
16
|
+
<p>This is version <%=Pbw::Engine.version%></p>
|
17
|
+
<hr />
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<script>
|
22
|
+
document.write('<script src=' +
|
23
|
+
('__proto__' in {} ? 'javascripts/vendor/zepto' : 'javascripts/vendor/jquery') +
|
24
|
+
'.js><\/script>')
|
25
|
+
</script>
|
26
|
+
<script src="javascripts/foundation/foundation.js"></script>
|
27
|
+
<script src="javascripts/foundation/foundation.alerts.js"></script>
|
28
|
+
<script src="javascripts/foundation/foundation.clearing.js"></script>
|
29
|
+
<script src="javascripts/foundation/foundation.cookie.js"></script>
|
30
|
+
<script src="javascripts/foundation/foundation.dropdown.js"></script>
|
31
|
+
<script src="javascripts/foundation/foundation.forms.js"></script>
|
32
|
+
<script src="javascripts/foundation/foundation.interchange.js"></script>
|
33
|
+
<script src="javascripts/foundation/foundation.joyride.js"></script>
|
34
|
+
<script src="javascripts/foundation/foundation.magellan.js"></script>
|
35
|
+
<script src="javascripts/foundation/foundation.orbit.js"></script>
|
36
|
+
<script src="javascripts/foundation/foundation.placeholder.js"></script>
|
37
|
+
<script src="javascripts/foundation/foundation.reveal.js"></script>
|
38
|
+
<script src="javascripts/foundation/foundation.section.js"></script>
|
39
|
+
<script src="javascripts/foundation/foundation.tooltips.js"></script>
|
40
|
+
<script src="javascripts/foundation/foundation.topbar.js"></script>
|
41
|
+
|
42
|
+
|
43
|
+
<script>
|
44
|
+
$(document).foundation();
|
45
|
+
</script>
|
46
|
+
</body>
|
47
|
+
</html>
|
data/lib/pbw/engine.rb
CHANGED
@@ -1,20 +1,40 @@
|
|
1
|
+
require 'pbw/version'
|
2
|
+
|
1
3
|
module Pbw
|
2
4
|
class Engine < ::Rails::Engine
|
3
5
|
isolate_namespace Pbw
|
4
6
|
engine_name 'pbw'
|
5
|
-
|
7
|
+
|
8
|
+
config.mount_at = '/pbw'
|
9
|
+
|
10
|
+
rake_tasks do
|
11
|
+
load File.join(File.dirname(__FILE__), 'tasks/pbw_tasks.rake')
|
12
|
+
end
|
13
|
+
|
6
14
|
config.generators do |g|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
g.orm :mongoid
|
16
|
+
g.template_engine :erb
|
17
|
+
g.test_framework :rspec
|
18
|
+
g.assets :false
|
19
|
+
g.helper :false
|
20
|
+
g.javascript_engine :coffee
|
21
|
+
end
|
22
|
+
|
23
|
+
initializer "check config" do |app|
|
24
|
+
config.mount_at += '/' unless config.mount_at.last == '/'
|
25
|
+
end
|
26
|
+
|
27
|
+
initializer "static assets" do |app|
|
28
|
+
app.middleware.use ::ActionDispatch::Static, "#{root}/public"
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.config(&block)
|
32
|
+
yield Engine.config if block
|
33
|
+
Engine.config
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.version
|
37
|
+
Pbw::VERSION
|
38
|
+
end
|
19
39
|
end
|
20
40
|
end
|
data/lib/pbw/version.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 ZURB, http://www.zurb.com/
|
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/public/config.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'zurb-foundation'
|
2
|
+
# Require any additional compass plugins here.
|
3
|
+
|
4
|
+
|
5
|
+
# Set this to the root of your project when deployed:
|
6
|
+
http_path = "/"
|
7
|
+
css_dir = "stylesheets"
|
8
|
+
sass_dir = "sass"
|
9
|
+
images_dir = "images"
|
10
|
+
javascripts_dir = "javascripts"
|
11
|
+
|
12
|
+
# You can select your preferred output style here (can be overridden via the command line):
|
13
|
+
# output_style = :expanded or :nested or :compact or :compressed
|
14
|
+
|
15
|
+
# To enable relative paths to assets via compass helper functions. Uncomment:
|
16
|
+
# relative_assets = true
|
17
|
+
|
18
|
+
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
19
|
+
# line_comments = false
|
20
|
+
|
21
|
+
|
22
|
+
# If you prefer the indented syntax, you might want to regenerate this
|
23
|
+
# project again passing --syntax sass, or you can uncomment this:
|
24
|
+
# preferred_syntax = :sass
|
25
|
+
# and then run:
|
26
|
+
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
data/public/humans.txt
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
/*jslint unparam: true, browser: true, indent: 2 */
|
2
|
+
|
3
|
+
;(function ($, window, document, undefined) {
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
Foundation.libs.alerts = {
|
7
|
+
name : 'alerts',
|
8
|
+
|
9
|
+
version : '4.2.2',
|
10
|
+
|
11
|
+
settings : {
|
12
|
+
speed: 300, // fade out speed
|
13
|
+
callback: function (){}
|
14
|
+
},
|
15
|
+
|
16
|
+
init : function (scope, method, options) {
|
17
|
+
this.scope = scope || this.scope;
|
18
|
+
|
19
|
+
if (typeof method === 'object') {
|
20
|
+
$.extend(true, this.settings, method);
|
21
|
+
}
|
22
|
+
|
23
|
+
if (typeof method !== 'string') {
|
24
|
+
if (!this.settings.init) { this.events(); }
|
25
|
+
|
26
|
+
return this.settings.init;
|
27
|
+
} else {
|
28
|
+
return this[method].call(this, options);
|
29
|
+
}
|
30
|
+
},
|
31
|
+
|
32
|
+
events : function () {
|
33
|
+
var self = this;
|
34
|
+
|
35
|
+
$(this.scope).on('click.fndtn.alerts', '[data-alert] a.close', function (e) {
|
36
|
+
e.preventDefault();
|
37
|
+
$(this).closest("[data-alert]").fadeOut(self.speed, function () {
|
38
|
+
$(this).remove();
|
39
|
+
self.settings.callback();
|
40
|
+
});
|
41
|
+
});
|
42
|
+
|
43
|
+
this.settings.init = true;
|
44
|
+
},
|
45
|
+
|
46
|
+
off : function () {
|
47
|
+
$(this.scope).off('.fndtn.alerts');
|
48
|
+
},
|
49
|
+
|
50
|
+
reflow : function () {}
|
51
|
+
};
|
52
|
+
}(Foundation.zj, this, this.document));
|