rails_core_extensions 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.hound.yml +2 -0
- data/.rspec +2 -0
- data/.ruby-style.yml +233 -0
- data/.travis.yml +14 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +62 -0
- data/Rakefile +12 -0
- data/gemfiles/rails3.gemfile +13 -0
- data/gemfiles/rails4.gemfile +14 -0
- data/lib/rails_core_extensions.rb +41 -0
- data/lib/rails_core_extensions/action_controller_sortable.rb +22 -0
- data/lib/rails_core_extensions/action_view_currency_extensions.rb +26 -0
- data/lib/rails_core_extensions/action_view_extensions.rb +62 -0
- data/lib/rails_core_extensions/action_view_has_many_extensions.rb +32 -0
- data/lib/rails_core_extensions/activatable.rb +38 -0
- data/lib/rails_core_extensions/active_model_extensions.rb +47 -0
- data/lib/rails_core_extensions/active_record_cache_all_attributes.rb +43 -0
- data/lib/rails_core_extensions/active_record_cloning.rb +81 -0
- data/lib/rails_core_extensions/active_record_extensions.rb +228 -0
- data/lib/rails_core_extensions/active_record_liquid_extensions.rb +32 -0
- data/lib/rails_core_extensions/active_support_concern.rb +134 -0
- data/lib/rails_core_extensions/breadcrumb.rb +170 -0
- data/lib/rails_core_extensions/caches_action_without_host.rb +17 -0
- data/lib/rails_core_extensions/concurrency.rb +152 -0
- data/lib/rails_core_extensions/position_initializer.rb +27 -0
- data/lib/rails_core_extensions/railtie.rb +7 -0
- data/lib/rails_core_extensions/sortable.rb +52 -0
- data/lib/rails_core_extensions/tasks/position_initializer.rake +12 -0
- data/lib/rails_core_extensions/time_with_zone.rb +16 -0
- data/lib/rails_core_extensions/version.rb +3 -0
- data/rails_core_extensions.gemspec +38 -0
- data/spec/action_controller_sortable_spec.rb +52 -0
- data/spec/action_view_extensions_spec.rb +25 -0
- data/spec/active_model_extensions_spec.rb +130 -0
- data/spec/active_record_extensions_spec.rb +126 -0
- data/spec/breadcrumb_spec.rb +85 -0
- data/spec/concurrency_spec.rb +110 -0
- data/spec/position_initializer_spec.rb +48 -0
- data/spec/schema.rb +17 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/spec_helper_model_base.rb +37 -0
- data/spec/support/coverage_loader.rb +26 -0
- metadata +294 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'rails_core_extensions/breadcrumb'
|
2
|
+
|
3
|
+
require 'action_view'
|
4
|
+
|
5
|
+
describe RailsCoreExtensions::Breadcrumb do
|
6
|
+
before do
|
7
|
+
class MockView
|
8
|
+
include ActionView::Helpers::TagHelper
|
9
|
+
include ActionView::Helpers::UrlHelper
|
10
|
+
include ActionView::Helpers::CaptureHelper
|
11
|
+
attr_accessor :output_buffer
|
12
|
+
include RailsCoreExtensions::Breadcrumb
|
13
|
+
|
14
|
+
attr_reader :params
|
15
|
+
|
16
|
+
def initialize(params)
|
17
|
+
@params = params
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
after { Object.send(:remove_const, 'MockView') }
|
23
|
+
|
24
|
+
subject { MockView.new(:action => action) }
|
25
|
+
|
26
|
+
let(:objects_path) { '/users' }
|
27
|
+
let(:parent) { nil }
|
28
|
+
|
29
|
+
before do
|
30
|
+
allow(subject).to receive(:objects_path) { objects_path }
|
31
|
+
allow(subject).to receive(:collection_url) { objects_path }
|
32
|
+
|
33
|
+
allow(subject).to receive(:parent) { parent }
|
34
|
+
allow(subject).to receive(:parent_object) { parent }
|
35
|
+
|
36
|
+
allow(subject).to receive(:controller) { double(:controller, :show => nil) }
|
37
|
+
end
|
38
|
+
|
39
|
+
context '#breadcrumbs (* = link)' do
|
40
|
+
let(:user_class) { double(:table_name => 'users', :model_name => double(:singular_route_key => 'user')) }
|
41
|
+
let(:user) { double(:to_s => 'Alice', :new_record? => new_record, :class => user_class) }
|
42
|
+
context 'for a new record' do
|
43
|
+
let(:action) { 'new' }
|
44
|
+
let(:new_record) { true }
|
45
|
+
|
46
|
+
it 'should breadcrumb: *Users / New' do
|
47
|
+
result = subject.breadcrumbs(user)
|
48
|
+
expect(result).to be_html_safe
|
49
|
+
expect(result).to eq(
|
50
|
+
%q(<ul class="breadcrumb"><li><a href="/users">Users</a></li><li class="active">New</li></ul>)
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context 'for a existing record' do
|
56
|
+
let(:new_record) { false }
|
57
|
+
|
58
|
+
context 'when editing' do
|
59
|
+
let(:action) { 'edit' }
|
60
|
+
it 'should breadcrumb: *Users / *Alice / Edit' do
|
61
|
+
expect(subject).to receive(:link_to).with('Users', '/users') {
|
62
|
+
'<a href="/users">Users</a>'.html_safe }
|
63
|
+
expect(subject).to receive(:link_to).with('Alice', user) {
|
64
|
+
'<a href="/users/1">Alice</a>'.html_safe }
|
65
|
+
result = subject.breadcrumbs(user)
|
66
|
+
expect(result).to be_html_safe
|
67
|
+
expect(result).to eq(
|
68
|
+
%q(<ul class="breadcrumb"><li><a href="/users">Users</a></li><li><a href="/users/1">Alice</a></li><li class="active">Edit</li></ul>)
|
69
|
+
)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'when showing' do
|
74
|
+
let(:action) { 'show' }
|
75
|
+
it 'should breadcrumb: *Users / Alice' do
|
76
|
+
result = subject.breadcrumbs(user)
|
77
|
+
expect(result).to be_html_safe
|
78
|
+
expect(result).to eq(
|
79
|
+
%q(<ul class="breadcrumb"><li><a href="/users">Users</a></li><li>Alice</li></ul>)
|
80
|
+
)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class TestConcurrencyCache
|
4
|
+
@@cache = {}
|
5
|
+
|
6
|
+
def self.read(key)
|
7
|
+
@@cache[key]
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.write(key, value)
|
11
|
+
@@cache[key] = value
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.delete(key)
|
15
|
+
@@cache.delete(key)
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.clear
|
19
|
+
@@cache = {}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe Concurrency do
|
24
|
+
before :each do
|
25
|
+
TestConcurrencyCache.clear
|
26
|
+
|
27
|
+
class ConcurrencyTest
|
28
|
+
include Concurrency
|
29
|
+
|
30
|
+
self.concurrency_cache = TestConcurrencyCache
|
31
|
+
|
32
|
+
def self.class_test_method
|
33
|
+
sleep(1)
|
34
|
+
end
|
35
|
+
|
36
|
+
def instance_test_method
|
37
|
+
sleep(1)
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.both_instance_and_class_test_method; end
|
41
|
+
def both_instance_and_class_test_method; end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
after :each do
|
46
|
+
Object.send(:remove_const, :ConcurrencyTest)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should allow specifying which methods should implement the concurrency check" do
|
50
|
+
expect { ConcurrencyTest.send(:concurrency_safe, :instance_test_method) }
|
51
|
+
.to_not raise_error
|
52
|
+
expect { ConcurrencyTest.send(:concurrency_safe, :class_test_method) }
|
53
|
+
.to_not raise_error
|
54
|
+
expect { ConcurrencyTest.send(:concurrency_safe, :both_instance_and_class_test_method) }
|
55
|
+
.to raise_error(Concurrency::AmbiguousMethodException)
|
56
|
+
expect { ConcurrencyTest.send(:concurrency_safe, :both_instance_and_class_test_method, type: :instance) }
|
57
|
+
.to_not raise_error
|
58
|
+
expect { ConcurrencyTest.send(:concurrency_safe, :both_instance_and_class_test_method, type: :class) }
|
59
|
+
.to_not raise_error
|
60
|
+
expect { ConcurrencyTest.send(:concurrency_safe, :unknown_method) }
|
61
|
+
.to raise_error(Concurrency::NoMethodException)
|
62
|
+
end
|
63
|
+
|
64
|
+
it "should allow identyfying the type of a method" do
|
65
|
+
expect(ConcurrencyTest.send(:method_types, :class_test_method)).to eq ['class']
|
66
|
+
expect(ConcurrencyTest.send(:method_types, :instance_test_method)).to eq ['instance']
|
67
|
+
expect(ConcurrencyTest.send(:method_types, :both_instance_and_class_test_method)).to eq ['class','instance']
|
68
|
+
expect(ConcurrencyTest.send(:method_types, :unknown_method)).to be_blank
|
69
|
+
expect(ConcurrencyTest.send(:method_type, :class_test_method)).to eq 'class'
|
70
|
+
expect(ConcurrencyTest.send(:method_type, :instance_test_method)).to eq 'instance'
|
71
|
+
expect { ConcurrencyTest.send(:method_type, :both_instance_and_class_test_method) }
|
72
|
+
.to raise_error(Concurrency::AmbiguousMethodException)
|
73
|
+
expect { ConcurrencyTest.send(:method_type, :unknown_method) }
|
74
|
+
.to raise_error(Concurrency::NoMethodException)
|
75
|
+
end
|
76
|
+
|
77
|
+
it "should allow checking the concurrency lock for specified class methods" do
|
78
|
+
ConcurrencyTest.send(:concurrency_safe, :class_test_method)
|
79
|
+
started = false
|
80
|
+
expect(ConcurrencyTest.concurrency_safe_method_locked?(:class_test_method)).to be false
|
81
|
+
thread = Thread.new { ConcurrencyTest.send(:class_test_method); started = true }
|
82
|
+
thread.join
|
83
|
+
expect(ConcurrencyTest.concurrency_safe_method_locked?(:class_test_method)).to be true until started
|
84
|
+
end
|
85
|
+
|
86
|
+
it "should allow checking the concurrency lock for specified instance methods" do
|
87
|
+
ConcurrencyTest.send(:concurrency_safe, :class_test_method)
|
88
|
+
instance = ConcurrencyTest.new
|
89
|
+
started = false
|
90
|
+
expect(instance.concurrency_safe_method_locked?(:instance_test_method)).to be false
|
91
|
+
thread = Thread.new { instance.send(:instance_test_method); started = true }
|
92
|
+
thread.join
|
93
|
+
expect(instance.concurrency_safe_method_locked?(:instance_test_method)).to be true until started
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should implement the concurrency check for specified class methods" do
|
97
|
+
ConcurrencyTest.send(:concurrency_safe, :class_test_method)
|
98
|
+
threads = 2.times.map { Thread.new { ConcurrencyTest.send(:class_test_method) } }
|
99
|
+
expect { threads.each(&:join) }
|
100
|
+
.to raise_error(Concurrency::ConcurrentCallException)
|
101
|
+
end
|
102
|
+
|
103
|
+
it "should implement the concurrency check for specified instance methods" do
|
104
|
+
ConcurrencyTest.send(:concurrency_safe, :instance_test_method)
|
105
|
+
instance = ConcurrencyTest.new
|
106
|
+
threads = 2.times.map { Thread.new { instance.send(:instance_test_method) } }
|
107
|
+
expect { threads.each(&:join) }
|
108
|
+
.to raise_error(Concurrency::ConcurrentCallException)
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
connect_to_sqlite
|
4
|
+
|
5
|
+
describe RailsCoreExtensions::PositionInitializer, 'When repositioning' do
|
6
|
+
class Child < ActiveRecord::Base; end
|
7
|
+
|
8
|
+
before do
|
9
|
+
Child.create!(parent_id: 1, name: 'A child')
|
10
|
+
end
|
11
|
+
|
12
|
+
after do
|
13
|
+
Child.delete_all
|
14
|
+
end
|
15
|
+
|
16
|
+
subject { RailsCoreExtensions::PositionInitializer.new(Child, :parent_id) }
|
17
|
+
let(:child) { Child.find_by_name('A child') }
|
18
|
+
|
19
|
+
context 'when not initialized' do
|
20
|
+
specify { expect(child.position).to be_nil }
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'when positioned' do
|
24
|
+
before { subject.positionalize }
|
25
|
+
|
26
|
+
specify { expect(child.position).to eq 1 }
|
27
|
+
|
28
|
+
context 'when additional models are created' do
|
29
|
+
let(:child2) { Child.find_by_name('Another child') }
|
30
|
+
let(:child3) { Child.find_by_name('Third child') }
|
31
|
+
|
32
|
+
before do
|
33
|
+
Child.create!(parent_id: 2, name: 'Another child')
|
34
|
+
Child.create!(parent_id: 1, name: 'Third child')
|
35
|
+
end
|
36
|
+
|
37
|
+
context 'when re-positioned' do
|
38
|
+
before { subject.positionalize }
|
39
|
+
|
40
|
+
it 'should reposition in groups by linked parent' do
|
41
|
+
expect(child.position).to eq 2
|
42
|
+
expect(child3.position).to eq 1
|
43
|
+
expect(child2.position).to eq 1
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/spec/schema.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
ActiveRecord::Schema.define(:version => 1) do
|
2
|
+
create_table :models do |t|
|
3
|
+
t.string :name
|
4
|
+
t.string :age
|
5
|
+
t.integer :position
|
6
|
+
t.integer :category_id
|
7
|
+
end
|
8
|
+
|
9
|
+
create_table :parents do |t|
|
10
|
+
end
|
11
|
+
|
12
|
+
create_table :children do |t|
|
13
|
+
t.string :name
|
14
|
+
t.integer :parent_id
|
15
|
+
t.integer :position
|
16
|
+
end
|
17
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# Require this file using `require "spec_helper.rb"` to ensure that it is only
|
4
|
+
# loaded once.
|
5
|
+
#
|
6
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'bundler/setup'
|
10
|
+
require 'support/coverage_loader'
|
11
|
+
|
12
|
+
require 'action_controller'
|
13
|
+
require 'active_record'
|
14
|
+
|
15
|
+
require 'rails_core_extensions'
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.raise_errors_for_deprecations!
|
19
|
+
config.run_all_when_everything_filtered = true
|
20
|
+
config.filter_run :focus
|
21
|
+
config.order = :random
|
22
|
+
end
|
23
|
+
|
24
|
+
DB_FILE = 'tmp/test_db'
|
25
|
+
def connect_to_sqlite
|
26
|
+
FileUtils.mkdir_p File.dirname(DB_FILE)
|
27
|
+
FileUtils.rm_f DB_FILE
|
28
|
+
|
29
|
+
ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => DB_FILE
|
30
|
+
load('spec/schema.rb')
|
31
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Helper defines a active-model like model so tests can work in rails2/3 environments
|
2
|
+
begin
|
3
|
+
require 'active_model'
|
4
|
+
class ModelBase
|
5
|
+
include ActiveModel::Validations
|
6
|
+
end
|
7
|
+
rescue LoadError # can't load active_model, so rails < 3
|
8
|
+
require 'active_record'
|
9
|
+
class ModelBase < ActiveRecord::Base
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'nulldb_rspec'
|
13
|
+
|
14
|
+
# Custom NullDB so can reconnect to regular adapter after running
|
15
|
+
module NullDB::CustomNullifiedDatabase
|
16
|
+
def self.included(spec_example)
|
17
|
+
spec_example.before :all do
|
18
|
+
ActiveRecord::Base.establish_connection :adapter => :nulldb, :schema => 'spec/schema.rb'
|
19
|
+
end
|
20
|
+
|
21
|
+
spec_example.before :each do
|
22
|
+
ActiveRecord::Base.connection.checkpoint!
|
23
|
+
end
|
24
|
+
|
25
|
+
spec_example.after :all do
|
26
|
+
ActiveRecord::Base.remove_connection
|
27
|
+
|
28
|
+
begin
|
29
|
+
connect_to_sqlite
|
30
|
+
rescue ActiveRecord::AdapterNotSpecified
|
31
|
+
# swallow reconnection when running in nulldb / lite environment
|
32
|
+
# without any app boot, and hence no db config for :test
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
MINIMUM_COVERAGE = 74.3
|
2
|
+
|
3
|
+
unless ENV['COVERAGE'] == 'off'
|
4
|
+
require 'simplecov'
|
5
|
+
require 'simplecov-rcov'
|
6
|
+
require 'coveralls'
|
7
|
+
Coveralls.wear!
|
8
|
+
|
9
|
+
SimpleCov.formatters = [
|
10
|
+
SimpleCov::Formatter::RcovFormatter,
|
11
|
+
Coveralls::SimpleCov::Formatter
|
12
|
+
]
|
13
|
+
SimpleCov.start do
|
14
|
+
add_filter '/vendor/'
|
15
|
+
add_filter '/spec/'
|
16
|
+
add_group 'lib', 'lib'
|
17
|
+
end
|
18
|
+
SimpleCov.at_exit do
|
19
|
+
SimpleCov.result.format!
|
20
|
+
percent = SimpleCov.result.covered_percent
|
21
|
+
unless percent >= MINIMUM_COVERAGE
|
22
|
+
puts "Coverage must be above #{MINIMUM_COVERAGE}%. It is #{"%.2f" % percent}%"
|
23
|
+
Kernel.exit(1)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,294 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails_core_extensions
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Noack
|
8
|
+
- Allesandro Berardi
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2016-06-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activerecord
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 2.3.0
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 5.0.0
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: 2.3.0
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 5.0.0
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: actionpack
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.3.0
|
41
|
+
- - "<"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 5.0.0
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 2.3.0
|
51
|
+
- - "<"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 5.0.0
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: bundler
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.3'
|
61
|
+
type: :development
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.3'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rake
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rspec
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: activerecord-nulldb-adapter
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: simplecov
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
type: :development
|
118
|
+
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: simplecov-rcov
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
type: :development
|
132
|
+
prerelease: false
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: coveralls
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
- !ruby/object:Gem::Dependency
|
153
|
+
name: sqlite3
|
154
|
+
requirement: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
type: :development
|
160
|
+
prerelease: false
|
161
|
+
version_requirements: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
- !ruby/object:Gem::Dependency
|
167
|
+
name: travis
|
168
|
+
requirement: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
type: :development
|
174
|
+
prerelease: false
|
175
|
+
version_requirements: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: make_resourceful
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
type: :development
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0'
|
194
|
+
- !ruby/object:Gem::Dependency
|
195
|
+
name: inherited_resources
|
196
|
+
requirement: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '0'
|
201
|
+
type: :development
|
202
|
+
prerelease: false
|
203
|
+
version_requirements: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
description: Set of extensions to core rails libraries.
|
209
|
+
email:
|
210
|
+
- support@travellink.com.au
|
211
|
+
executables: []
|
212
|
+
extensions: []
|
213
|
+
extra_rdoc_files: []
|
214
|
+
files:
|
215
|
+
- ".gitignore"
|
216
|
+
- ".hound.yml"
|
217
|
+
- ".rspec"
|
218
|
+
- ".ruby-style.yml"
|
219
|
+
- ".travis.yml"
|
220
|
+
- Gemfile
|
221
|
+
- LICENSE.txt
|
222
|
+
- README.md
|
223
|
+
- Rakefile
|
224
|
+
- gemfiles/rails3.gemfile
|
225
|
+
- gemfiles/rails4.gemfile
|
226
|
+
- lib/rails_core_extensions.rb
|
227
|
+
- lib/rails_core_extensions/action_controller_sortable.rb
|
228
|
+
- lib/rails_core_extensions/action_view_currency_extensions.rb
|
229
|
+
- lib/rails_core_extensions/action_view_extensions.rb
|
230
|
+
- lib/rails_core_extensions/action_view_has_many_extensions.rb
|
231
|
+
- lib/rails_core_extensions/activatable.rb
|
232
|
+
- lib/rails_core_extensions/active_model_extensions.rb
|
233
|
+
- lib/rails_core_extensions/active_record_cache_all_attributes.rb
|
234
|
+
- lib/rails_core_extensions/active_record_cloning.rb
|
235
|
+
- lib/rails_core_extensions/active_record_extensions.rb
|
236
|
+
- lib/rails_core_extensions/active_record_liquid_extensions.rb
|
237
|
+
- lib/rails_core_extensions/active_support_concern.rb
|
238
|
+
- lib/rails_core_extensions/breadcrumb.rb
|
239
|
+
- lib/rails_core_extensions/caches_action_without_host.rb
|
240
|
+
- lib/rails_core_extensions/concurrency.rb
|
241
|
+
- lib/rails_core_extensions/position_initializer.rb
|
242
|
+
- lib/rails_core_extensions/railtie.rb
|
243
|
+
- lib/rails_core_extensions/sortable.rb
|
244
|
+
- lib/rails_core_extensions/tasks/position_initializer.rake
|
245
|
+
- lib/rails_core_extensions/time_with_zone.rb
|
246
|
+
- lib/rails_core_extensions/version.rb
|
247
|
+
- rails_core_extensions.gemspec
|
248
|
+
- spec/action_controller_sortable_spec.rb
|
249
|
+
- spec/action_view_extensions_spec.rb
|
250
|
+
- spec/active_model_extensions_spec.rb
|
251
|
+
- spec/active_record_extensions_spec.rb
|
252
|
+
- spec/breadcrumb_spec.rb
|
253
|
+
- spec/concurrency_spec.rb
|
254
|
+
- spec/position_initializer_spec.rb
|
255
|
+
- spec/schema.rb
|
256
|
+
- spec/spec_helper.rb
|
257
|
+
- spec/spec_helper_model_base.rb
|
258
|
+
- spec/support/coverage_loader.rb
|
259
|
+
homepage: http://github.com/sealink/rails_core_extensions
|
260
|
+
licenses:
|
261
|
+
- MIT
|
262
|
+
metadata: {}
|
263
|
+
post_install_message:
|
264
|
+
rdoc_options: []
|
265
|
+
require_paths:
|
266
|
+
- lib
|
267
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - ">="
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '0'
|
272
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
273
|
+
requirements:
|
274
|
+
- - ">="
|
275
|
+
- !ruby/object:Gem::Version
|
276
|
+
version: '0'
|
277
|
+
requirements: []
|
278
|
+
rubyforge_project:
|
279
|
+
rubygems_version: 2.4.8
|
280
|
+
signing_key:
|
281
|
+
specification_version: 4
|
282
|
+
summary: Set of extensions to core rails libraries.
|
283
|
+
test_files:
|
284
|
+
- spec/action_controller_sortable_spec.rb
|
285
|
+
- spec/action_view_extensions_spec.rb
|
286
|
+
- spec/active_model_extensions_spec.rb
|
287
|
+
- spec/active_record_extensions_spec.rb
|
288
|
+
- spec/breadcrumb_spec.rb
|
289
|
+
- spec/concurrency_spec.rb
|
290
|
+
- spec/position_initializer_spec.rb
|
291
|
+
- spec/schema.rb
|
292
|
+
- spec/spec_helper.rb
|
293
|
+
- spec/spec_helper_model_base.rb
|
294
|
+
- spec/support/coverage_loader.rb
|