human_attributes 0.6.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +104 -0
- data/.circleci/setup-rubygems.sh +3 -0
- data/.rubocop.yml +65 -594
- data/.ruby-version +1 -1
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +219 -147
- data/Guardfile +4 -4
- data/README.md +127 -26
- data/Rakefile +1 -1
- data/human_attributes.gemspec +11 -7
- data/lib/human_attributes/config.rb +50 -68
- data/lib/human_attributes/engine.rb +1 -0
- data/lib/human_attributes/errors.rb +6 -0
- data/lib/human_attributes/extension.rb +21 -26
- data/lib/human_attributes/formatters/base.rb +1 -0
- data/lib/human_attributes/formatters/enum.rb +25 -0
- data/lib/human_attributes/formatters/enumerize.rb +1 -0
- data/lib/human_attributes/formatters_builder.rb +1 -0
- data/lib/human_attributes/version.rb +1 -1
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/assets/stylesheets/application.css +3 -3
- 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 +0 -3
- data/spec/dummy/app/{assets/javascripts → javascript/packs}/application.js +3 -1
- 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/purchase.rb +20 -11
- data/spec/dummy/app/views/layouts/application.html.erb +10 -9
- 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/bin/rails +3 -3
- data/spec/dummy/bin/rake +2 -2
- data/spec/dummy/bin/setup +18 -14
- data/spec/dummy/config/application.rb +12 -22
- data/spec/dummy/config/boot.rb +3 -3
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +4 -18
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/environments/development.rb +49 -14
- data/spec/dummy/config/environments/production.rb +63 -22
- data/spec/dummy/config/environments/test.rb +29 -12
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +4 -3
- data/spec/dummy/config/initializers/backtrace_silencers.rb +4 -3
- data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +2 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -1
- data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/spec/dummy/config/locales/en.yml +26 -1
- data/spec/dummy/config/puma.rb +43 -0
- data/spec/dummy/config/routes.rb +1 -54
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/config.ru +3 -1
- data/spec/dummy/db/migrate/20161113032308_create_purchases.rb +1 -1
- data/spec/dummy/db/migrate/20211006145358_add_payment_method_to_purchase.rb +5 -0
- data/spec/dummy/db/migrate/20211103114451_add_shipping_to_purchase.rb +5 -0
- data/spec/dummy/db/migrate/20211103114830_add_store_to_purchase.rb +5 -0
- data/spec/dummy/db/schema.rb +17 -17
- data/spec/dummy/public/404.html +6 -6
- data/spec/dummy/public/422.html +6 -6
- data/spec/dummy/public/500.html +6 -6
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/spec/factories/purchases.rb +9 -22
- data/spec/dummy/spec/lib/active_record_extension_spec.rb +81 -33
- metadata +104 -38
- data/.hound.yml +0 -4
- data/.travis.yml +0 -15
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/secrets.yml +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 100442352d961937e384df6bfb4aa8c137be3359048ce9c0359f4a208beb4db8
|
4
|
+
data.tar.gz: 946c6db1955e759761eb9be4c3af1142a6541b600ffec8a80af318e62c381d5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 394cdc7be845cb97ea5dcd4d6f0c2e41a28eb8b660a42297aadb6a3a28145f7477d2e2225b28269845aff8e26858393d019a6aae24bbbb0136a841812788af45
|
7
|
+
data.tar.gz: 2df11b1cc727eef343ce702d559f14e9f6f3c432993b5231051b2343911ca1b26a61f90959df684a924be4ea59db99e7c413ec72da8fb4e0c4197da1b57db367
|
@@ -0,0 +1,104 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
env-vars: &env-vars
|
4
|
+
RAILS_ENV: test
|
5
|
+
NODE_ENV: test
|
6
|
+
BUNDLE_PATH: vendor/bundle
|
7
|
+
|
8
|
+
orbs:
|
9
|
+
ruby: circleci/ruby@0.1.2
|
10
|
+
browser-tools: circleci/browser-tools@1.1.3
|
11
|
+
|
12
|
+
executors:
|
13
|
+
main-executor:
|
14
|
+
parameters:
|
15
|
+
ruby-version:
|
16
|
+
description: "Ruby version"
|
17
|
+
default: "2.7"
|
18
|
+
type: string
|
19
|
+
docker:
|
20
|
+
- image: circleci/ruby:<<parameters.ruby-version>>-node
|
21
|
+
environment: *env-vars
|
22
|
+
|
23
|
+
commands:
|
24
|
+
setup:
|
25
|
+
description: checkout code and install dependencies
|
26
|
+
steps:
|
27
|
+
- checkout
|
28
|
+
- run:
|
29
|
+
name: Install bundle dependencies
|
30
|
+
command: |
|
31
|
+
BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")
|
32
|
+
gem install bundler:$BUNDLER_VERSION
|
33
|
+
bundle _$(echo $BUNDLER_VERSION)_ install
|
34
|
+
|
35
|
+
jobs:
|
36
|
+
lint:
|
37
|
+
executor: main-executor
|
38
|
+
steps:
|
39
|
+
- setup
|
40
|
+
- run:
|
41
|
+
name: Install reviewdog
|
42
|
+
command: |
|
43
|
+
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b ./bin
|
44
|
+
- run:
|
45
|
+
name: Get files to lint
|
46
|
+
command: |
|
47
|
+
mkdir tmp
|
48
|
+
git diff origin/master --name-only --diff-filter=d > tmp/files_to_lint
|
49
|
+
- run:
|
50
|
+
name: Run rubocop
|
51
|
+
shell: /bin/bash
|
52
|
+
command: |
|
53
|
+
cat tmp/files_to_lint | grep -E '.+\.(rb)$' | xargs bundle exec rubocop --force-exclusion \
|
54
|
+
| ./bin/reviewdog -reporter=github-pr-review -f=rubocop
|
55
|
+
test:
|
56
|
+
parameters:
|
57
|
+
ruby-version:
|
58
|
+
description: "Ruby version"
|
59
|
+
default: "2.7"
|
60
|
+
type: string
|
61
|
+
executor:
|
62
|
+
name: main-executor
|
63
|
+
ruby-version: <<parameters.ruby-version>>
|
64
|
+
steps:
|
65
|
+
- setup
|
66
|
+
- run:
|
67
|
+
name: Run Tests
|
68
|
+
command: |
|
69
|
+
RSPEC_JUNIT_ARGS="-r rspec_junit_formatter -f RspecJunitFormatter -o test_results/rspec.xml"
|
70
|
+
RSPEC_FORMAT_ARGS="-f progress --no-color -p 10"
|
71
|
+
bundle exec rspec ./spec $RSPEC_FORMAT_ARGS $RSPEC_JUNIT_ARGS
|
72
|
+
- store_test_results:
|
73
|
+
path: test_results
|
74
|
+
deploy:
|
75
|
+
executor: main-executor
|
76
|
+
steps:
|
77
|
+
- setup
|
78
|
+
- run:
|
79
|
+
name: Setup rubygems
|
80
|
+
command: bash .circleci/setup-rubygems.sh
|
81
|
+
- run:
|
82
|
+
name: Publish to rubygems
|
83
|
+
command: |
|
84
|
+
GEM_FILE_NAME="human_attributes-$(git describe --tags).gem"
|
85
|
+
gem build human_attributes.gemspec -o $GEM_FILE_NAME
|
86
|
+
gem push $GEM_FILE_NAME
|
87
|
+
|
88
|
+
workflows:
|
89
|
+
version: 2
|
90
|
+
main:
|
91
|
+
jobs:
|
92
|
+
- lint:
|
93
|
+
context: org-global
|
94
|
+
- test:
|
95
|
+
matrix:
|
96
|
+
parameters:
|
97
|
+
ruby-version: ["2.5", "2.6", "2.7"]
|
98
|
+
- deploy:
|
99
|
+
context: org-global
|
100
|
+
filters:
|
101
|
+
tags:
|
102
|
+
only: /.*/
|
103
|
+
branches:
|
104
|
+
ignore: /.*/
|