tolaria 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/admin/lib/backbone.js +125 -102
- data/app/assets/javascripts/admin/lib/jquery.chosen.js +31 -20
- data/app/assets/javascripts/admin/lib/jquery.js +4225 -4502
- data/app/assets/javascripts/admin/lib/moment.js +10748 -1989
- data/app/assets/javascripts/admin/lib/underscore.js +14 -17
- data/lib/generators/tolaria/install/templates/administrators_migration.rb +1 -5
- data/lib/tolaria.rb +0 -1
- data/lib/tolaria/version.rb +1 -1
- data/test/demo/db/migrate/20150601202901_create_administrators.rb +2 -6
- data/test/demo/db/migrate/20150603204006_add_testing_models.rb +1 -1
- data/test/demo/db/migrate/20150609232013_create_footnotes.rb +1 -1
- data/test/demo/db/migrate/20150610135235_create_additional_demo_objects.rb +1 -1
- data/tolaria.gemspec +1 -1
- metadata +4 -5
- data/lib/tolaria/ransack.rb +0 -43
@@ -1,29 +1,26 @@
|
|
1
1
|
// Underscore 1.8.3
|
2
2
|
// https://github.com/jashkenas/underscore
|
3
3
|
//
|
4
|
-
// Copyright
|
5
|
-
// Investigative Reporters & Editors
|
4
|
+
// Copyright © Jeremy Ashkenas, DocumentCloud, and Investigative Reporters & Editors
|
6
5
|
//
|
7
|
-
// Permission is hereby granted, free of charge, to any person
|
8
|
-
//
|
9
|
-
//
|
10
|
-
//
|
11
|
-
//
|
12
|
-
//
|
13
|
-
//
|
14
|
-
// conditions:
|
6
|
+
// Permission is hereby granted, free of charge, to any person obtaining
|
7
|
+
// a copy of this software and associated documentation files
|
8
|
+
// (the "Software"), to deal in the Software without restriction,
|
9
|
+
// including without limitation the rights to use, copy, modify, merge,
|
10
|
+
// publish, distribute, sublicense, and/or sell copies of the Software,
|
11
|
+
// and to permit persons to whom the Software is furnished to do so,
|
12
|
+
// subject to the following conditions:
|
15
13
|
//
|
16
14
|
// The above copyright notice and this permission notice shall be
|
17
15
|
// included in all copies or substantial portions of the Software.
|
18
16
|
//
|
19
17
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
20
|
-
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
21
|
-
//
|
22
|
-
//
|
23
|
-
//
|
24
|
-
//
|
25
|
-
//
|
26
|
-
// OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
20
|
+
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
21
|
+
// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
22
|
+
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
|
23
|
+
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27
24
|
|
28
25
|
(function() {
|
29
26
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateAdministrators < ActiveRecord::Migration
|
1
|
+
class CreateAdministrators < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
|
4
4
|
create_table :administrators, force:true do |t|
|
@@ -13,15 +13,11 @@ class CreateAdministrators < ActiveRecord::Migration
|
|
13
13
|
t.string :organization, null:false
|
14
14
|
|
15
15
|
# Passcode and authentication system fields
|
16
|
-
|
17
16
|
t.string :passcode, limit:60, null:false
|
18
17
|
t.datetime :passcode_expires_at, null:false
|
19
|
-
|
20
18
|
t.string :auth_token, limit:32, null:false, index:true
|
21
|
-
|
22
19
|
t.datetime :account_unlocks_at, null:false
|
23
20
|
t.integer :lockout_strikes, null:false, default:0
|
24
|
-
|
25
21
|
t.integer :total_strikes, null:false, default:0
|
26
22
|
t.integer :sessions_created, null:false, default:0
|
27
23
|
|
data/lib/tolaria.rb
CHANGED
data/lib/tolaria/version.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
class CreateAdministrators < ActiveRecord::Migration
|
1
|
+
class CreateAdministrators < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
|
4
4
|
create_table :administrators, force:true do |t|
|
5
5
|
|
6
|
-
t.timestamps
|
6
|
+
t.timestamps null:false
|
7
7
|
|
8
8
|
# The email used to log into this account
|
9
9
|
t.string :email, null:false, index:true
|
@@ -13,15 +13,11 @@ class CreateAdministrators < ActiveRecord::Migration
|
|
13
13
|
t.string :organization, null:false
|
14
14
|
|
15
15
|
# Passcode and authentication system fields
|
16
|
-
|
17
16
|
t.string :passcode, limit:60, null:false
|
18
17
|
t.datetime :passcode_expires_at, null:false
|
19
|
-
|
20
18
|
t.string :auth_token, limit:32, null:false, index:true
|
21
|
-
|
22
19
|
t.datetime :account_unlocks_at, null:false
|
23
20
|
t.integer :lockout_strikes, null:false, default:0
|
24
|
-
|
25
21
|
t.integer :total_strikes, null:false, default:0
|
26
22
|
t.integer :sessions_created, null:false, default:0
|
27
23
|
|
data/tolaria.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_dependency "bcrypt", "~> 3.1"
|
23
23
|
s.add_dependency "kaminari", "~> 0.16"
|
24
24
|
s.add_dependency "rails", "~> 5.0"
|
25
|
-
s.add_dependency "ransack", "~> 1.
|
25
|
+
s.add_dependency "ransack", "~> 1.8"
|
26
26
|
s.add_dependency "sass-rails", "~> 5.0"
|
27
27
|
s.add_dependency "sass", "~> 3.0"
|
28
28
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tolaria
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Csuhta
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-07-
|
12
|
+
date: 2016-07-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bcrypt
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '1.
|
62
|
+
version: '1.8'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '1.
|
69
|
+
version: '1.8'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: sass-rails
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -334,7 +334,6 @@ files:
|
|
334
334
|
- lib/tolaria/managed_class.rb
|
335
335
|
- lib/tolaria/markdown.rb
|
336
336
|
- lib/tolaria/random_tokens.rb
|
337
|
-
- lib/tolaria/ransack.rb
|
338
337
|
- lib/tolaria/reload.rb
|
339
338
|
- lib/tolaria/routes.rb
|
340
339
|
- lib/tolaria/version.rb
|
data/lib/tolaria/ransack.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# Until Ransack releases a new gem version, we have to patch in this
|
2
|
-
# Rails 5 support from their master branch
|
3
|
-
|
4
|
-
module Ransack
|
5
|
-
module Helpers
|
6
|
-
module FormHelper
|
7
|
-
|
8
|
-
def sort_link(search_object, attribute, *args, &block)
|
9
|
-
search, routing_proxy = extract_search_and_routing_proxy(search_object)
|
10
|
-
unless Search === search
|
11
|
-
raise TypeError, 'First argument must be a Ransack::Search!'
|
12
|
-
end
|
13
|
-
args.unshift(capture(&block)) if block_given?
|
14
|
-
s = SortLink.new(search, attribute, args, params, &block)
|
15
|
-
link_to(s.name, url(routing_proxy, s.url_options), s.html_options(args))
|
16
|
-
end
|
17
|
-
|
18
|
-
class SortLink
|
19
|
-
|
20
|
-
def initialize(search, attribute, args, params)
|
21
|
-
@search = search
|
22
|
-
@params = parameters_hash(params)
|
23
|
-
@field = attribute.to_s
|
24
|
-
@sort_fields = extract_sort_fields_and_mutate_args!(args).compact
|
25
|
-
@current_dir = existing_sort_direction
|
26
|
-
@label_text = extract_label_and_mutate_args!(args)
|
27
|
-
@options = extract_options_and_mutate_args!(args)
|
28
|
-
@hide_indicator = @options.delete(:hide_indicator) || Ransack.options[:hide_sort_order_indicators]
|
29
|
-
@default_order = @options.delete :default_order
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def parameters_hash(params)
|
35
|
-
return params unless params.respond_to?(:to_unsafe_h)
|
36
|
-
params.to_unsafe_h
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|