tolaria 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,29 +1,26 @@
1
1
  // Underscore 1.8.3
2
2
  // https://github.com/jashkenas/underscore
3
3
  //
4
- // Copyright (c) Jeremy Ashkenas, DocumentCloud, and
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
- // obtaining a copy of this software and associated documentation
9
- // files (the "Software"), to deal in the Software without
10
- // restriction, including without limitation the rights to use,
11
- // copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- // copies of the Software, and to permit persons to whom the
13
- // Software is furnished to do so, subject to the following
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
- // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23
- // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24
- // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25
- // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
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
@@ -9,7 +9,6 @@ require "kaminari"
9
9
  require "ransack"
10
10
 
11
11
  require "tolaria/version"
12
- require "tolaria/ransack"
13
12
  require "tolaria/engine"
14
13
  require "tolaria/config"
15
14
  require "tolaria/default_config"
@@ -2,7 +2,7 @@ module Tolaria
2
2
 
3
3
  # Returns Tolaria’s version number
4
4
  def self.version
5
- Gem::Version.new("2.0.1")
5
+ Gem::Version.new("2.0.2")
6
6
  end
7
7
 
8
8
  module VERSION
@@ -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
 
@@ -1,4 +1,4 @@
1
- class AddTestingModels < ActiveRecord::Migration
1
+ class AddTestingModels < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
 
4
4
  create_table :blog_posts, force: :true do |t|
@@ -1,4 +1,4 @@
1
- class CreateFootnotes < ActiveRecord::Migration
1
+ class CreateFootnotes < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
  create_table :footnotes do |t|
4
4
  t.timestamps null:false
@@ -1,4 +1,4 @@
1
- class CreateAdditionalDemoObjects < ActiveRecord::Migration
1
+ class CreateAdditionalDemoObjects < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
 
4
4
  create_table :images, force:true do |t|
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.7"
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.1
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-11 00:00:00.000000000 Z
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.7'
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.7'
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
@@ -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