impressionist-cody 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/main.yml +25 -0
- data/.gitignore +17 -0
- data/.rspec +1 -0
- data/.rubocop.yml +27 -0
- data/.rubocop_todo.yml +660 -0
- data/CHANGELOG.rdoc +96 -0
- data/Gemfile +22 -0
- data/LICENSE.txt +20 -0
- data/README.md +265 -0
- data/Rakefile +20 -0
- data/UPGRADE_GUIDE.md +13 -0
- data/app/assets/config/manifest.js +3 -0
- data/app/controllers/impressionist_controller.rb +166 -0
- data/app/models/impression.rb +2 -0
- data/app/models/impressionist/bots.rb +1468 -0
- data/app/models/impressionist/impressionable.rb +62 -0
- data/impressionist.gemspec +30 -0
- data/lib/generators/active_record/impressionist_generator.rb +22 -0
- data/lib/generators/active_record/templates/create_impressions_table.rb.erb +32 -0
- data/lib/generators/impressionist_generator.rb +13 -0
- data/lib/generators/mongo_mapper/impressionist_generator.rb +8 -0
- data/lib/generators/mongoid/impressionist_generator.rb +8 -0
- data/lib/generators/templates/impression.rb.erb +8 -0
- data/lib/impressionist/bots.rb +21 -0
- data/lib/impressionist/controllers/mongoid/impressionist_controller.rb +10 -0
- data/lib/impressionist/counter_cache.rb +76 -0
- data/lib/impressionist/engine.rb +45 -0
- data/lib/impressionist/is_impressionable.rb +23 -0
- data/lib/impressionist/load.rb +11 -0
- data/lib/impressionist/models/active_record/impression.rb +14 -0
- data/lib/impressionist/models/active_record/impressionist/impressionable.rb +12 -0
- data/lib/impressionist/models/mongo_mapper/impression.rb +18 -0
- data/lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb +21 -0
- data/lib/impressionist/models/mongoid/impression.rb +26 -0
- data/lib/impressionist/models/mongoid/impressionist/impressionable.rb +28 -0
- data/lib/impressionist/rails_toggle.rb +26 -0
- data/lib/impressionist/setup_association.rb +53 -0
- data/lib/impressionist/update_counters.rb +77 -0
- data/lib/impressionist/version.rb +3 -0
- data/lib/impressionist.rb +12 -0
- data/logo.png +0 -0
- data/spec/controllers/articles_controller_spec.rb +113 -0
- data/spec/controllers/dummy_controller_spec.rb +13 -0
- data/spec/controllers/impressionist_uniqueness_spec.rb +463 -0
- data/spec/controllers/posts_controller_spec.rb +36 -0
- data/spec/controllers/widgets_controller_spec.rb +103 -0
- data/spec/counter_caching_spec.rb +49 -0
- data/spec/dummy/.ruby-version +1 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +1 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/controllers/articles_controller.rb +22 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/controllers/dummy_controller.rb +6 -0
- data/spec/dummy/app/controllers/posts_controller.rb +23 -0
- data/spec/dummy/app/controllers/profiles_controller.rb +14 -0
- data/spec/dummy/app/controllers/widgets_controller.rb +12 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/javascript/packs/application.js +15 -0
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/article.rb +3 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/dummy.rb +7 -0
- data/spec/dummy/app/models/post.rb +3 -0
- data/spec/dummy/app/models/profile.rb +6 -0
- data/spec/dummy/app/models/user.rb +3 -0
- data/spec/dummy/app/models/widget.rb +3 -0
- data/spec/dummy/app/views/articles/index.html.erb +1 -0
- data/spec/dummy/app/views/articles/show.html.erb +1 -0
- data/spec/dummy/app/views/dummy/index.html.erb +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/app/views/posts/edit.html.erb +0 -0
- data/spec/dummy/app/views/posts/index.html.erb +0 -0
- data/spec/dummy/app/views/posts/show.html.erb +0 -0
- data/spec/dummy/app/views/profiles/show.html.erb +3 -0
- data/spec/dummy/app/views/widgets/index.html.erb +0 -0
- data/spec/dummy/app/views/widgets/new.html.erb +0 -0
- data/spec/dummy/app/views/widgets/show.html.erb +0 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +33 -0
- data/spec/dummy/config/application.rb +20 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +62 -0
- data/spec/dummy/config/environments/production.rb +112 -0
- data/spec/dummy/config/environments/test.rb +49 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +12 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/impression.rb +8 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +33 -0
- data/spec/dummy/config/puma.rb +38 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/config.ru +5 -0
- data/spec/dummy/config.ru2 +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20110201153144_create_articles.rb +13 -0
- data/spec/dummy/db/migrate/20110210205028_create_posts.rb +13 -0
- data/spec/dummy/db/migrate/20111127184039_create_widgets.rb +15 -0
- data/spec/dummy/db/migrate/20150207135825_create_profiles.rb +10 -0
- data/spec/dummy/db/migrate/20150207140310_create_friendly_id_slugs.rb +18 -0
- data/spec/dummy/db/migrate/20200720143817_create_impressions_table.rb +32 -0
- data/spec/dummy/db/schema.rb +77 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/log/development.log +129 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/storage/.keep +0 -0
- data/spec/fixtures/articles.yml +3 -0
- data/spec/fixtures/impressions.yml +43 -0
- data/spec/fixtures/posts.yml +3 -0
- data/spec/fixtures/profiles.yml +4 -0
- data/spec/fixtures/widgets.yml +4 -0
- data/spec/initializers_spec.rb +21 -0
- data/spec/models/bots_spec.rb +25 -0
- data/spec/models/impression_spec.rb +66 -0
- data/spec/rails_generators/rails_generators_spec.rb +23 -0
- data/spec/rails_helper.rb +11 -0
- data/spec/rails_toggle_spec.rb +31 -0
- data/spec/setup_association_spec.rb +48 -0
- data/spec/spec_helper.rb +43 -0
- data/upgrade_migrations/version_0_3_0.rb +27 -0
- data/upgrade_migrations/version_0_4_0.rb +9 -0
- data/upgrade_migrations/version_1_5_2.rb +12 -0
- metadata +302 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1d3c6046729f36a0f5fadaf6d502415807fd44f0fabc78673bb30f893892433b
|
4
|
+
data.tar.gz: 38de6c112f5622bbf0081dc5a5231cd3e20c66792dc4dbe5037e89f7b4b38dd5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6255edac1732aaf0070328b88482173a67474d59c577831c57aa24f0e8237e9963c942c1a3097ea8b4a10ca92f50f3aa0ea40d6db3e1ce464457036e197dcb86
|
7
|
+
data.tar.gz: 508f523bc47f7aa58aa0491f0413e6a513dc4f1c5030ed3a6a5ccefa592d223e41d2f849b210a528ad3ea254118c3b05f5981d522b8ee817fb3157b24accb75c
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Main
|
2
|
+
on: [push]
|
3
|
+
jobs:
|
4
|
+
Build-And-Run-Tests:
|
5
|
+
runs-on: ubuntu-latest
|
6
|
+
strategy:
|
7
|
+
matrix:
|
8
|
+
ruby: ['3.0.3', '2.7.5']
|
9
|
+
env:
|
10
|
+
RAILS_ENV: test
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: ${{ matrix.ruby }}
|
16
|
+
- name: setup app
|
17
|
+
run: |
|
18
|
+
bundle
|
19
|
+
cd spec/dummy
|
20
|
+
bundle exec rails g impressionist -f
|
21
|
+
bundle exec rake db:create db:migrate RAILS_ENV=test
|
22
|
+
- name: Lint
|
23
|
+
run: bundle exec rubocop
|
24
|
+
- name: Run Tests
|
25
|
+
run: bundle exec rspec
|
data/.gitignore
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
*~
|
2
|
+
/coverage
|
3
|
+
/pkg
|
4
|
+
/rdoc
|
5
|
+
/test_app/db/schema.rb
|
6
|
+
/test_app/db/migrate/*_create_impressions_table.rb
|
7
|
+
/test_app/doc
|
8
|
+
/test_app/test
|
9
|
+
/test_app/vendor
|
10
|
+
Gemfile.lock
|
11
|
+
gemfiles/*.lock
|
12
|
+
.DS_Store
|
13
|
+
*.swo
|
14
|
+
.vscode/
|
15
|
+
spec/dummy/tmp
|
16
|
+
spec/dummy/db/test.sqlite3*
|
17
|
+
spec/dummy/log/*
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- "spec/dummy/**/*"
|
4
|
+
SuggestExtensions: false
|
5
|
+
|
6
|
+
inherit_from: .rubocop_todo.yml
|
7
|
+
|
8
|
+
require:
|
9
|
+
- rubocop-rspec
|
10
|
+
- rubocop-rails
|
11
|
+
|
12
|
+
Layout/SpaceAroundMethodCallOperator:
|
13
|
+
Enabled: true
|
14
|
+
Lint/RaiseException:
|
15
|
+
Enabled: True
|
16
|
+
Lint/StructNewOverride:
|
17
|
+
Enabled: True
|
18
|
+
Style/ExponentialNotation:
|
19
|
+
Enabled: True
|
20
|
+
Style/HashEachMethods:
|
21
|
+
Enabled: True
|
22
|
+
Style/HashTransformKeys:
|
23
|
+
Enabled: True
|
24
|
+
Style/HashTransformValues:
|
25
|
+
Enabled: True
|
26
|
+
RSpec/FilePath:
|
27
|
+
Enabled: False
|