draper 4.0.1 → 4.0.4
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/.github/workflows/ci.yml +71 -0
- data/.rspec +1 -2
- data/CHANGELOG.md +29 -0
- data/Gemfile +27 -4
- data/README.md +24 -2
- data/bin/bundle +114 -0
- data/bin/rake +29 -0
- data/draper.gemspec +4 -4
- data/lib/draper/automatic_delegation.rb +16 -6
- data/lib/draper/decoratable/collection_proxy.rb +15 -0
- data/lib/draper/decoratable.rb +2 -2
- data/lib/draper/helper_proxy.rb +2 -1
- data/lib/draper/lazy_helpers.rb +1 -1
- data/lib/draper/query_methods.rb +2 -2
- data/lib/draper/railtie.rb +8 -4
- data/lib/draper/version.rb +1 -1
- data/lib/draper/view_context/build_strategy.rb +1 -9
- data/lib/draper/view_helpers.rb +1 -1
- data/lib/draper.rb +2 -6
- data/spec/draper/collection_decorator_spec.rb +5 -4
- data/spec/draper/decoratable_spec.rb +1 -1
- data/spec/draper/decorator_spec.rb +4 -4
- data/spec/draper/factory_spec.rb +8 -8
- data/spec/draper/query_methods_spec.rb +10 -0
- data/spec/draper/view_context/build_strategy_spec.rb +1 -18
- data/spec/dummy/.rspec +0 -1
- data/spec/dummy/app/decorators/comment_decorator.rb +13 -0
- data/spec/dummy/app/decorators/mongoid_post_decorator.rb +1 -3
- data/spec/dummy/app/models/admin.rb +2 -4
- data/spec/dummy/app/models/comment.rb +3 -0
- data/spec/dummy/app/models/mongoid_post.rb +2 -4
- data/spec/dummy/app/models/post.rb +4 -0
- data/spec/dummy/app/models/user.rb +2 -4
- data/spec/dummy/config/application.rb +22 -51
- data/spec/dummy/config/environments/development.rb +66 -21
- data/spec/dummy/config/environments/production.rb +77 -32
- data/spec/dummy/config/environments/test.rb +56 -20
- data/spec/dummy/config/initializers/draper.rb +4 -2
- data/spec/dummy/config/storage.yml +7 -0
- data/spec/dummy/db/migrate/20240907041839_create_comments.rb +9 -0
- data/spec/dummy/db/schema.rb +16 -9
- data/spec/dummy/spec/decorators/active_model_serializers_spec.rb +1 -1
- data/spec/dummy/spec/decorators/post_decorator_spec.rb +1 -1
- data/spec/dummy/spec/jobs/publish_post_job_spec.rb +2 -0
- data/spec/dummy/spec/models/post_spec.rb +41 -5
- data/spec/dummy/spec/rails_helper.rb +69 -0
- data/spec/dummy/spec/spec_helper.rb +90 -5
- data/spec/generators/decorator/decorator_generator_spec.rb +1 -1
- data/spec/performance/benchmark.rb +1 -1
- data/spec/support/dummy_app.rb +1 -1
- metadata +40 -13
- data/.travis.yml +0 -28
data/spec/dummy/db/schema.rb
CHANGED
@@ -1,21 +1,28 @@
|
|
1
|
-
# encoding: UTF-8
|
2
1
|
# This file is auto-generated from the current state of the database. Instead
|
3
2
|
# of editing this file, please use the migrations feature of Active Record to
|
4
3
|
# incrementally modify your database, and then regenerate this schema definition.
|
5
4
|
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# from scratch.
|
10
|
-
#
|
5
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
6
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
7
|
+
# be faster and is potentially less error prone than running all of your
|
8
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
|
+
# migrations use external dependencies or application code.
|
11
10
|
#
|
12
|
-
# It's strongly recommended
|
11
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
12
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2024_09_07_041839) do
|
15
14
|
|
16
|
-
create_table "
|
15
|
+
create_table "comments", force: :cascade do |t|
|
16
|
+
t.integer "post_id"
|
17
|
+
t.datetime "created_at", precision: 6, null: false
|
18
|
+
t.datetime "updated_at", precision: 6, null: false
|
19
|
+
t.index ["post_id"], name: "index_comments_on_post_id"
|
20
|
+
end
|
21
|
+
|
22
|
+
create_table "posts", force: :cascade do |t|
|
17
23
|
t.datetime "created_at", null: false
|
18
24
|
t.datetime "updated_at", null: false
|
19
25
|
end
|
20
26
|
|
27
|
+
add_foreign_key "comments", "posts"
|
21
28
|
end
|
@@ -1,15 +1,51 @@
|
|
1
|
-
require '
|
1
|
+
require 'rails_helper'
|
2
2
|
require 'shared_examples/decoratable'
|
3
3
|
|
4
4
|
RSpec.describe Post do
|
5
|
+
let(:record) { described_class.create! }
|
6
|
+
|
5
7
|
it_behaves_like 'a decoratable model'
|
6
8
|
|
7
9
|
it { should be_a ApplicationRecord }
|
8
10
|
|
9
|
-
describe '
|
10
|
-
|
11
|
-
|
11
|
+
describe 'associations' do
|
12
|
+
context 'when decorated' do
|
13
|
+
subject { associated.decorate }
|
14
|
+
|
15
|
+
let(:associated) { record.comments }
|
16
|
+
let(:persisted) { associated.create! [{}] * rand(0..2) }
|
17
|
+
let(:unsaved) { associated.build [{}] * rand(1..2) }
|
18
|
+
|
19
|
+
before { persisted } # should exist
|
20
|
+
|
21
|
+
it 'returns a decorated collection' do
|
22
|
+
is_expected.to match_array persisted
|
23
|
+
is_expected.to be_all &:decorated?
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'uses cached records' do
|
27
|
+
expect(associated).not_to be_loaded
|
28
|
+
|
29
|
+
associated.load
|
30
|
+
|
31
|
+
expect { subject.to_a }.to execute.exactly(0).queries
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'caches records' do
|
35
|
+
expect(associated).not_to be_loaded
|
36
|
+
|
37
|
+
associated.decorate
|
38
|
+
|
39
|
+
expect { subject.to_a; associated.load }.to execute.exactly(0).queries
|
40
|
+
end
|
41
|
+
|
42
|
+
context 'with unsaved records' do
|
43
|
+
before { unsaved } # should exist
|
12
44
|
|
13
|
-
|
45
|
+
it 'respects unsaved records' do
|
46
|
+
is_expected.to match_array persisted + unsaved
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
14
50
|
end
|
15
51
|
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
+
require 'spec_helper'
|
3
|
+
ENV['RAILS_ENV'] ||= 'test'
|
4
|
+
require_relative '../config/environment'
|
5
|
+
# Prevent database truncation if the environment is production
|
6
|
+
abort("The Rails environment is running in production mode!") if Rails.env.production?
|
7
|
+
require 'rspec/rails'
|
8
|
+
require 'rspec/activerecord/expectations'
|
9
|
+
# Add additional requires below this line. Rails is not loaded until this point!
|
10
|
+
|
11
|
+
# Requires supporting ruby files with custom matchers and macros, etc, in
|
12
|
+
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
13
|
+
# run as spec files by default. This means that files in spec/support that end
|
14
|
+
# in _spec.rb will both be required and run as specs, causing the specs to be
|
15
|
+
# run twice. It is recommended that you do not name files matching this glob to
|
16
|
+
# end with _spec.rb. You can configure this pattern with the --pattern
|
17
|
+
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
|
18
|
+
#
|
19
|
+
# The following line is provided for convenience purposes. It has the downside
|
20
|
+
# of increasing the boot-up time by auto-requiring all files in the support
|
21
|
+
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
22
|
+
# require only the support files necessary.
|
23
|
+
#
|
24
|
+
# Rails.root.glob('spec/support/**/*.rb').sort.each { |f| require f }
|
25
|
+
|
26
|
+
# Checks for pending migrations and applies them before tests are run.
|
27
|
+
# If you are not using ActiveRecord, you can remove these lines.
|
28
|
+
begin
|
29
|
+
ActiveRecord::Migration.maintain_test_schema!
|
30
|
+
rescue ActiveRecord::PendingMigrationError => e
|
31
|
+
abort e.to_s.strip
|
32
|
+
end
|
33
|
+
RSpec.configure do |config|
|
34
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
35
|
+
# config.fixture_paths = [
|
36
|
+
# Rails.root.join('spec/fixtures')
|
37
|
+
# ]
|
38
|
+
|
39
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
40
|
+
# examples within a transaction, remove the following line or assign false
|
41
|
+
# instead of true.
|
42
|
+
# config.use_transactional_fixtures = true
|
43
|
+
|
44
|
+
# You can uncomment this line to turn off ActiveRecord support entirely.
|
45
|
+
# config.use_active_record = false
|
46
|
+
|
47
|
+
# RSpec Rails can automatically mix in different behaviours to your tests
|
48
|
+
# based on their file location, for example enabling you to call `get` and
|
49
|
+
# `post` in specs under `spec/controllers`.
|
50
|
+
#
|
51
|
+
# You can disable this behaviour by removing the line below, and instead
|
52
|
+
# explicitly tag your specs with their type, e.g.:
|
53
|
+
#
|
54
|
+
# RSpec.describe UsersController, type: :controller do
|
55
|
+
# # ...
|
56
|
+
# end
|
57
|
+
#
|
58
|
+
# The different available types are documented in the features, such as in
|
59
|
+
# https://rspec.info/features/6-0/rspec-rails
|
60
|
+
config.infer_spec_type_from_file_location!
|
61
|
+
|
62
|
+
# Filter lines from Rails gems in backtraces.
|
63
|
+
config.filter_rails_from_backtrace!
|
64
|
+
# arbitrary gems may also be filtered via:
|
65
|
+
# config.filter_gems_from_backtrace("gem name")
|
66
|
+
|
67
|
+
# Extra matchers
|
68
|
+
config.include RSpec::ActiveRecord::Expectations
|
69
|
+
end
|
@@ -1,8 +1,93 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require
|
4
|
-
|
1
|
+
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
+
# files.
|
6
|
+
#
|
7
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
+
# a separate helper file that requires the additional dependencies and performs
|
12
|
+
# the additional setup, and require it from the spec files that actually need
|
13
|
+
# it.
|
14
|
+
#
|
15
|
+
# See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
5
16
|
RSpec.configure do |config|
|
6
|
-
|
17
|
+
# rspec-expectations config goes here. You can use an alternate
|
18
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
19
|
+
# assertions if you prefer.
|
20
|
+
config.expect_with :rspec do |expectations|
|
21
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
22
|
+
# and `failure_message` of custom matchers include text for helper methods
|
23
|
+
# defined using `chain`, e.g.:
|
24
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
25
|
+
# # => "be bigger than 2 and smaller than 4"
|
26
|
+
# ...rather than:
|
27
|
+
# # => "be bigger than 2"
|
28
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
29
|
+
end
|
30
|
+
|
31
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
32
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
33
|
+
config.mock_with :rspec do |mocks|
|
34
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
35
|
+
# a real object. This is generally recommended, and will default to
|
36
|
+
# `true` in RSpec 4.
|
37
|
+
mocks.verify_partial_doubles = true
|
38
|
+
end
|
39
|
+
|
40
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
41
|
+
# have no way to turn it off -- the option exists only for backwards
|
42
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
43
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
44
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
45
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
46
|
+
|
47
|
+
# The settings below are suggested to provide a good initial experience
|
48
|
+
# with RSpec, but feel free to customize to your heart's content.
|
49
|
+
|
50
|
+
# This allows you to limit a spec run to individual examples or groups
|
51
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
52
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
53
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
54
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
55
|
+
config.filter_run_when_matching :focus
|
56
|
+
|
57
|
+
# Allows RSpec to persist some state between runs in order to support
|
58
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
59
|
+
# you configure your source control system to ignore this file.
|
60
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
61
|
+
|
62
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
63
|
+
# recommended. For more details, see:
|
64
|
+
# https://rspec.info/features/3-12/rspec-core/configuration/zero-monkey-patching-mode/
|
65
|
+
# config.disable_monkey_patching!
|
66
|
+
|
67
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
68
|
+
# file, and it's useful to allow more verbose output when running an
|
69
|
+
# individual spec file.
|
70
|
+
if config.files_to_run.one?
|
71
|
+
# Use the documentation formatter for detailed output,
|
72
|
+
# unless a formatter has already been configured
|
73
|
+
# (e.g. via a command-line flag).
|
74
|
+
config.default_formatter = "doc"
|
75
|
+
end
|
76
|
+
|
77
|
+
# Print the 10 slowest examples and example groups at the
|
78
|
+
# end of the spec run, to help surface which specs are running
|
79
|
+
# particularly slow.
|
80
|
+
config.profile_examples = 10
|
81
|
+
|
82
|
+
# Run specs in random order to surface order dependencies. If you find an
|
83
|
+
# order dependency and want to debug it, you can fix the order by providing
|
84
|
+
# the seed, which is printed after each run.
|
85
|
+
# --seed 1234
|
7
86
|
config.order = :random
|
87
|
+
|
88
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
89
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
90
|
+
# test failures related to randomization by passing the same `--seed` value
|
91
|
+
# as the one that triggered the failure.
|
92
|
+
Kernel.srand config.seed
|
8
93
|
end
|
@@ -40,7 +40,7 @@ describe Rails::Generators::DecoratorGenerator do
|
|
40
40
|
|
41
41
|
context "with an ApplicationDecorator" do
|
42
42
|
before do
|
43
|
-
allow_any_instance_of(Object).to receive(:require)
|
43
|
+
allow_any_instance_of(Object).to receive(:require).and_call_original
|
44
44
|
allow_any_instance_of(Object).to receive(:require).with("application_decorator").and_return(
|
45
45
|
stub_const "ApplicationDecorator", Class.new
|
46
46
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
3
|
-
require 'bundler/setup' if File.
|
3
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
4
4
|
Bundler.require :default
|
5
5
|
|
6
6
|
require "benchmark"
|
data/spec/support/dummy_app.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: draper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Casimir
|
8
8
|
- Steve Klabnik
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -81,6 +81,20 @@ dependencies:
|
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '1.0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: ruby2_keywords
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
99
|
name: ammeter
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,7 +138,7 @@ dependencies:
|
|
124
138
|
- !ruby/object:Gem::Version
|
125
139
|
version: '0'
|
126
140
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
141
|
+
name: rspec-activerecord-expectations
|
128
142
|
requirement: !ruby/object:Gem::Requirement
|
129
143
|
requirements:
|
130
144
|
- - ">="
|
@@ -138,7 +152,7 @@ dependencies:
|
|
138
152
|
- !ruby/object:Gem::Version
|
139
153
|
version: '0'
|
140
154
|
- !ruby/object:Gem::Dependency
|
141
|
-
name:
|
155
|
+
name: minitest-rails
|
142
156
|
requirement: !ruby/object:Gem::Requirement
|
143
157
|
requirements:
|
144
158
|
- - ">="
|
@@ -152,19 +166,19 @@ dependencies:
|
|
152
166
|
- !ruby/object:Gem::Version
|
153
167
|
version: '0'
|
154
168
|
- !ruby/object:Gem::Dependency
|
155
|
-
name:
|
169
|
+
name: capybara
|
156
170
|
requirement: !ruby/object:Gem::Requirement
|
157
171
|
requirements:
|
158
172
|
- - ">="
|
159
173
|
- !ruby/object:Gem::Version
|
160
|
-
version: '0
|
174
|
+
version: '0'
|
161
175
|
type: :development
|
162
176
|
prerelease: false
|
163
177
|
version_requirements: !ruby/object:Gem::Requirement
|
164
178
|
requirements:
|
165
179
|
- - ">="
|
166
180
|
- !ruby/object:Gem::Version
|
167
|
-
version: '0
|
181
|
+
version: '0'
|
168
182
|
- !ruby/object:Gem::Dependency
|
169
183
|
name: rubocop
|
170
184
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,10 +218,10 @@ extra_rdoc_files: []
|
|
204
218
|
files:
|
205
219
|
- ".codeclimate.yml"
|
206
220
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
221
|
+
- ".github/workflows/ci.yml"
|
207
222
|
- ".gitignore"
|
208
223
|
- ".rspec"
|
209
224
|
- ".rubocop.yml"
|
210
|
-
- ".travis.yml"
|
211
225
|
- ".yardopts"
|
212
226
|
- CHANGELOG.md
|
213
227
|
- CONTRIBUTING.md
|
@@ -216,6 +230,8 @@ files:
|
|
216
230
|
- LICENSE
|
217
231
|
- README.md
|
218
232
|
- Rakefile
|
233
|
+
- bin/bundle
|
234
|
+
- bin/rake
|
219
235
|
- draper.gemspec
|
220
236
|
- lib/draper.rb
|
221
237
|
- lib/draper/automatic_delegation.rb
|
@@ -224,6 +240,7 @@ files:
|
|
224
240
|
- lib/draper/compatibility/global_id.rb
|
225
241
|
- lib/draper/configuration.rb
|
226
242
|
- lib/draper/decoratable.rb
|
243
|
+
- lib/draper/decoratable/collection_proxy.rb
|
227
244
|
- lib/draper/decoratable/equality.rb
|
228
245
|
- lib/draper/decorated_association.rb
|
229
246
|
- lib/draper/decorates_assigned.rb
|
@@ -285,6 +302,7 @@ files:
|
|
285
302
|
- spec/dummy/app/controllers/base_controller.rb
|
286
303
|
- spec/dummy/app/controllers/localized_urls.rb
|
287
304
|
- spec/dummy/app/controllers/posts_controller.rb
|
305
|
+
- spec/dummy/app/decorators/comment_decorator.rb
|
288
306
|
- spec/dummy/app/decorators/mongoid_post_decorator.rb
|
289
307
|
- spec/dummy/app/decorators/post_decorator.rb
|
290
308
|
- spec/dummy/app/helpers/application_helper.rb
|
@@ -293,6 +311,7 @@ files:
|
|
293
311
|
- spec/dummy/app/mailers/post_mailer.rb
|
294
312
|
- spec/dummy/app/models/admin.rb
|
295
313
|
- spec/dummy/app/models/application_record.rb
|
314
|
+
- spec/dummy/app/models/comment.rb
|
296
315
|
- spec/dummy/app/models/mongoid_post.rb
|
297
316
|
- spec/dummy/app/models/post.rb
|
298
317
|
- spec/dummy/app/models/user.rb
|
@@ -319,7 +338,9 @@ files:
|
|
319
338
|
- spec/dummy/config/locales/en.yml
|
320
339
|
- spec/dummy/config/mongoid.yml
|
321
340
|
- spec/dummy/config/routes.rb
|
341
|
+
- spec/dummy/config/storage.yml
|
322
342
|
- spec/dummy/db/migrate/20121019115657_create_posts.rb
|
343
|
+
- spec/dummy/db/migrate/20240907041839_create_comments.rb
|
323
344
|
- spec/dummy/db/schema.rb
|
324
345
|
- spec/dummy/db/seeds.rb
|
325
346
|
- spec/dummy/fast_spec/post_decorator_spec.rb
|
@@ -341,6 +362,7 @@ files:
|
|
341
362
|
- spec/dummy/spec/models/application_spec.rb
|
342
363
|
- spec/dummy/spec/models/mongoid_post_spec.rb
|
343
364
|
- spec/dummy/spec/models/post_spec.rb
|
365
|
+
- spec/dummy/spec/rails_helper.rb
|
344
366
|
- spec/dummy/spec/shared_examples/decoratable.rb
|
345
367
|
- spec/dummy/spec/spec_helper.rb
|
346
368
|
- spec/dummy/test/decorators/minitest/devise_test.rb
|
@@ -365,11 +387,11 @@ files:
|
|
365
387
|
- spec/support/matchers/have_text.rb
|
366
388
|
- spec/support/shared_examples/decoratable_equality.rb
|
367
389
|
- spec/support/shared_examples/view_helpers.rb
|
368
|
-
homepage:
|
390
|
+
homepage: https://github.com/drapergem/draper
|
369
391
|
licenses:
|
370
392
|
- MIT
|
371
393
|
metadata: {}
|
372
|
-
post_install_message:
|
394
|
+
post_install_message:
|
373
395
|
rdoc_options: []
|
374
396
|
require_paths:
|
375
397
|
- lib
|
@@ -384,8 +406,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
384
406
|
- !ruby/object:Gem::Version
|
385
407
|
version: '0'
|
386
408
|
requirements: []
|
387
|
-
rubygems_version: 3.
|
388
|
-
signing_key:
|
409
|
+
rubygems_version: 3.5.23
|
410
|
+
signing_key:
|
389
411
|
specification_version: 4
|
390
412
|
summary: View Models for Rails
|
391
413
|
test_files:
|
@@ -415,6 +437,7 @@ test_files:
|
|
415
437
|
- spec/dummy/app/controllers/base_controller.rb
|
416
438
|
- spec/dummy/app/controllers/localized_urls.rb
|
417
439
|
- spec/dummy/app/controllers/posts_controller.rb
|
440
|
+
- spec/dummy/app/decorators/comment_decorator.rb
|
418
441
|
- spec/dummy/app/decorators/mongoid_post_decorator.rb
|
419
442
|
- spec/dummy/app/decorators/post_decorator.rb
|
420
443
|
- spec/dummy/app/helpers/application_helper.rb
|
@@ -423,6 +446,7 @@ test_files:
|
|
423
446
|
- spec/dummy/app/mailers/post_mailer.rb
|
424
447
|
- spec/dummy/app/models/admin.rb
|
425
448
|
- spec/dummy/app/models/application_record.rb
|
449
|
+
- spec/dummy/app/models/comment.rb
|
426
450
|
- spec/dummy/app/models/mongoid_post.rb
|
427
451
|
- spec/dummy/app/models/post.rb
|
428
452
|
- spec/dummy/app/models/user.rb
|
@@ -449,7 +473,9 @@ test_files:
|
|
449
473
|
- spec/dummy/config/locales/en.yml
|
450
474
|
- spec/dummy/config/mongoid.yml
|
451
475
|
- spec/dummy/config/routes.rb
|
476
|
+
- spec/dummy/config/storage.yml
|
452
477
|
- spec/dummy/db/migrate/20121019115657_create_posts.rb
|
478
|
+
- spec/dummy/db/migrate/20240907041839_create_comments.rb
|
453
479
|
- spec/dummy/db/schema.rb
|
454
480
|
- spec/dummy/db/seeds.rb
|
455
481
|
- spec/dummy/fast_spec/post_decorator_spec.rb
|
@@ -471,6 +497,7 @@ test_files:
|
|
471
497
|
- spec/dummy/spec/models/application_spec.rb
|
472
498
|
- spec/dummy/spec/models/mongoid_post_spec.rb
|
473
499
|
- spec/dummy/spec/models/post_spec.rb
|
500
|
+
- spec/dummy/spec/rails_helper.rb
|
474
501
|
- spec/dummy/spec/shared_examples/decoratable.rb
|
475
502
|
- spec/dummy/spec/spec_helper.rb
|
476
503
|
- spec/dummy/test/decorators/minitest/devise_test.rb
|
data/.travis.yml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
env:
|
2
|
-
global:
|
3
|
-
- CC_TEST_REPORTER_ID=b7ba588af2a540fa96c267b3655a2afe31ea29976dc25905a668dd28d5e88915
|
4
|
-
|
5
|
-
language: ruby
|
6
|
-
cache: bundler
|
7
|
-
|
8
|
-
services:
|
9
|
-
- mongodb
|
10
|
-
|
11
|
-
rvm:
|
12
|
-
- 2.4.9
|
13
|
-
- 2.5.7
|
14
|
-
- 2.6.5
|
15
|
-
- 2.7.0
|
16
|
-
- ruby-head
|
17
|
-
|
18
|
-
matrix:
|
19
|
-
allow_failures:
|
20
|
-
- rvm: ruby-head
|
21
|
-
|
22
|
-
before_script:
|
23
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
24
|
-
- chmod +x ./cc-test-reporter
|
25
|
-
- ./cc-test-reporter before-build
|
26
|
-
|
27
|
-
after_script:
|
28
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|