amazing_print 1.6.0 → 1.7.2
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 +4 -4
- data/CHANGELOG.md +15 -2
- data/lib/amazing_print/ext/active_record.rb +32 -2
- data/lib/amazing_print/ext/nobrainer.rb +2 -2
- data/lib/amazing_print/formatters/base_formatter.rb +5 -1
- data/lib/amazing_print/formatters/hash_formatter.rb +29 -9
- data/lib/amazing_print/formatters/mswin_helper.rb +4 -4
- data/lib/amazing_print/formatters/object_formatter.rb +1 -1
- data/lib/amazing_print/formatters/struct_formatter.rb +1 -1
- data/lib/amazing_print/inspector.rb +1 -1
- data/lib/amazing_print/version.rb +1 -1
- metadata +6 -63
- data/.gitignore +0 -35
- data/Appraisals +0 -66
- data/Gemfile +0 -18
- data/Gemfile.lock +0 -94
- data/LICENSE +0 -22
- data/Rakefile +0 -25
- data/spec/active_record_helper.rb +0 -43
- data/spec/colors_spec.rb +0 -120
- data/spec/core_ext/logger_spec.rb +0 -70
- data/spec/ext/action_controller_spec.rb +0 -40
- data/spec/ext/action_view_spec.rb +0 -24
- data/spec/ext/active_model_spec.rb +0 -37
- data/spec/ext/active_record_spec.rb +0 -302
- data/spec/ext/active_support_spec.rb +0 -37
- data/spec/ext/mongo_mapper_spec.rb +0 -265
- data/spec/ext/mongoid_spec.rb +0 -135
- data/spec/ext/nobrainer_spec.rb +0 -64
- data/spec/ext/nokogiri_spec.rb +0 -52
- data/spec/ext/ostruct_spec.rb +0 -24
- data/spec/ext/ripple_spec.rb +0 -53
- data/spec/ext/sequel_spec.rb +0 -45
- data/spec/formats_spec.rb +0 -795
- data/spec/methods_spec.rb +0 -520
- data/spec/misc_spec.rb +0 -206
- data/spec/objects_spec.rb +0 -225
- data/spec/sequel_helper.rb +0 -18
- data/spec/spec_helper.rb +0 -112
- data/spec/support/active_record_data/3_2_diana.txt +0 -24
- data/spec/support/active_record_data/3_2_diana_legacy.txt +0 -24
- data/spec/support/active_record_data/3_2_multi.txt +0 -50
- data/spec/support/active_record_data/3_2_multi_legacy.txt +0 -50
- data/spec/support/active_record_data/4_0_diana.txt +0 -98
- data/spec/support/active_record_data/4_0_multi.txt +0 -198
- data/spec/support/active_record_data/4_1_diana.txt +0 -97
- data/spec/support/active_record_data/4_1_multi.txt +0 -196
- data/spec/support/active_record_data/4_2_diana.txt +0 -109
- data/spec/support/active_record_data/4_2_diana_legacy.txt +0 -109
- data/spec/support/active_record_data/4_2_multi.txt +0 -220
- data/spec/support/active_record_data/4_2_multi_legacy.txt +0 -220
- data/spec/support/active_record_data/5_0_diana.txt +0 -105
- data/spec/support/active_record_data/5_0_multi.txt +0 -212
- data/spec/support/active_record_data/5_1_diana.txt +0 -104
- data/spec/support/active_record_data/5_1_multi.txt +0 -210
- data/spec/support/active_record_data/5_2_diana.txt +0 -104
- data/spec/support/active_record_data/5_2_multi.txt +0 -210
- data/spec/support/active_record_data/6_0_diana.txt +0 -104
- data/spec/support/active_record_data/6_0_multi.txt +0 -210
- data/spec/support/active_record_data/6_1_diana.txt +0 -109
- data/spec/support/active_record_data/6_1_multi.txt +0 -220
- data/spec/support/active_record_data/7_0_diana.txt +0 -110
- data/spec/support/active_record_data/7_0_multi.txt +0 -222
- data/spec/support/active_record_data.rb +0 -22
- data/spec/support/ext_verifier.rb +0 -46
- data/spec/support/mongoid_versions.rb +0 -24
- data/spec/support/rails_versions.rb +0 -62
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'pathname'
|
4
|
-
|
5
|
-
class ActiveRecordData
|
6
|
-
class << self
|
7
|
-
data_file_selector = Pathname(File.dirname(__FILE__)).join('active_record_data', '*.txt')
|
8
|
-
|
9
|
-
# Example generated method
|
10
|
-
# data_filename = '/path/to/ap/spec/support/active_record_data/4_2_diana.txt'
|
11
|
-
#
|
12
|
-
# def self.raw_4_2_dana
|
13
|
-
# File.read(data_filename).strip
|
14
|
-
# end
|
15
|
-
Dir[data_file_selector].each do |data_filename|
|
16
|
-
method_name = Pathname(data_filename).basename('.txt')
|
17
|
-
define_method(:"raw_#{method_name}") do
|
18
|
-
File.read(data_filename).strip
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ExtVerifier
|
4
|
-
def require_dependencies!(dependencies)
|
5
|
-
dependencies.each do |dependency|
|
6
|
-
require dependency
|
7
|
-
rescue LoadError
|
8
|
-
end
|
9
|
-
end
|
10
|
-
module_function :require_dependencies!
|
11
|
-
|
12
|
-
def has_rails?
|
13
|
-
defined?(Rails)
|
14
|
-
end
|
15
|
-
module_function :has_rails?
|
16
|
-
|
17
|
-
def has_mongoid?
|
18
|
-
defined?(Mongoid)
|
19
|
-
end
|
20
|
-
module_function :has_mongoid?
|
21
|
-
|
22
|
-
def has_mongo_mapper?
|
23
|
-
defined?(MongoMapper)
|
24
|
-
end
|
25
|
-
module_function :has_mongo_mapper?
|
26
|
-
|
27
|
-
def has_ripple?
|
28
|
-
defined?(Ripple)
|
29
|
-
end
|
30
|
-
module_function :has_ripple?
|
31
|
-
|
32
|
-
def has_nobrainer?
|
33
|
-
defined?(NoBrainer)
|
34
|
-
end
|
35
|
-
module_function :has_nobrainer?
|
36
|
-
|
37
|
-
def has_sequel?
|
38
|
-
defined?(::Sequel::Model)
|
39
|
-
end
|
40
|
-
module_function :has_sequel?
|
41
|
-
end
|
42
|
-
|
43
|
-
RSpec.configure do |config|
|
44
|
-
config.include(ExtVerifier)
|
45
|
-
config.extend(ExtVerifier)
|
46
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module MongoidVersions
|
4
|
-
def mongoid_version
|
5
|
-
Gem::Version.new(Mongoid::VERSION)
|
6
|
-
end
|
7
|
-
|
8
|
-
def mongoid_4_0?
|
9
|
-
Gem::Requirement.new('~> 4.0.0').satisfied_by?(mongoid_version)
|
10
|
-
end
|
11
|
-
|
12
|
-
def mongoid_5_0?
|
13
|
-
Gem::Requirement.new('~> 5.0.0').satisfied_by?(mongoid_version)
|
14
|
-
end
|
15
|
-
|
16
|
-
def mongoid_6_0?
|
17
|
-
Gem::Requirement.new('~> 6.0.0').satisfied_by?(mongoid_version)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
RSpec.configure do |config|
|
22
|
-
config.include(MongoidVersions)
|
23
|
-
config.extend(MongoidVersions)
|
24
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module RailsVersions
|
4
|
-
def rails_version
|
5
|
-
Gem::Version.new(Rails::VERSION::STRING)
|
6
|
-
end
|
7
|
-
|
8
|
-
def rails_7_0?
|
9
|
-
Gem::Requirement.new('~> 7.0.0').satisfied_by?(rails_version)
|
10
|
-
end
|
11
|
-
alias activerecord_7_0? rails_7_0?
|
12
|
-
|
13
|
-
def rails_6_1?
|
14
|
-
Gem::Requirement.new('~> 6.1.0').satisfied_by?(rails_version)
|
15
|
-
end
|
16
|
-
alias activerecord_6_1? rails_6_1?
|
17
|
-
|
18
|
-
def rails_6_0?
|
19
|
-
Gem::Requirement.new('~> 6.0.0').satisfied_by?(rails_version)
|
20
|
-
end
|
21
|
-
alias activerecord_6_0? rails_6_0?
|
22
|
-
|
23
|
-
def rails_5_2?
|
24
|
-
Gem::Requirement.new('~> 5.2.0').satisfied_by?(rails_version)
|
25
|
-
end
|
26
|
-
alias activerecord_5_2? rails_5_2?
|
27
|
-
|
28
|
-
def rails_5_1?
|
29
|
-
Gem::Requirement.new('~> 5.1.0').satisfied_by?(rails_version)
|
30
|
-
end
|
31
|
-
alias activerecord_5_1? rails_5_1?
|
32
|
-
|
33
|
-
def rails_5_0?
|
34
|
-
Gem::Requirement.new('~> 5.0.0.racecar1').satisfied_by?(rails_version)
|
35
|
-
end
|
36
|
-
alias activerecord_5_0? rails_5_0?
|
37
|
-
|
38
|
-
def rails_4_2?
|
39
|
-
Gem::Requirement.new('~> 4.2.0').satisfied_by?(rails_version)
|
40
|
-
end
|
41
|
-
alias activerecord_4_2? rails_4_2?
|
42
|
-
|
43
|
-
def rails_4_1?
|
44
|
-
Gem::Requirement.new('~> 4.1.0').satisfied_by?(rails_version)
|
45
|
-
end
|
46
|
-
alias activerecord_4_1? rails_4_1?
|
47
|
-
|
48
|
-
def rails_4_0?
|
49
|
-
Gem::Requirement.new('~> 4.0.0').satisfied_by?(rails_version)
|
50
|
-
end
|
51
|
-
alias activerecord_4_0? rails_4_0?
|
52
|
-
|
53
|
-
def rails_3_2?
|
54
|
-
Gem::Requirement.new('~> 3.2.0').satisfied_by?(rails_version)
|
55
|
-
end
|
56
|
-
alias activerecord_3_2? rails_3_2?
|
57
|
-
end
|
58
|
-
|
59
|
-
RSpec.configure do |config|
|
60
|
-
config.include(RailsVersions)
|
61
|
-
config.extend(RailsVersions)
|
62
|
-
end
|