Skip to content

Commit 1f120ca

Browse files
author
Vidas P
committed
Start here
0 parents  commit 1f120ca

File tree

534 files changed

+57778
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

534 files changed

+57778
-0
lines changed

.buildpacks

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
heroku/ruby
2+
https://github.com/weibeld/heroku-buildpack-graphviz.git

.circleci/config.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Ruby CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
docker:
9+
# specify the version you desire here
10+
- image: circleci/ruby:2.6.3-node-browsers
11+
12+
# Specify service dependencies here if necessary
13+
# CircleCI maintains a library of pre-built images
14+
# documented at https://circleci.com/docs/2.0/circleci-images/
15+
# - image: circleci/postgres:9.4
16+
17+
working_directory: ~/repo
18+
19+
steps:
20+
- checkout
21+
22+
# Download and cache dependencies
23+
- restore_cache:
24+
keys:
25+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
26+
# fallback to using the latest cache if no exact match is found
27+
- v1-dependencies-
28+
29+
- run:
30+
name: install dependencies
31+
command: |
32+
bundle install --jobs=4 --retry=3 --path vendor/bundle
33+
34+
- save_cache:
35+
paths:
36+
- ./vendor/bundle
37+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
38+
39+
# Database setup
40+
- run: bundle exec rake db:create
41+
- run: bundle exec rake db:schema:load
42+
43+
# run tests!
44+
- run:
45+
name: run tests
46+
command: |
47+
mkdir /tmp/test-results
48+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
49+
circleci tests split --split-by=timings)"
50+
51+
bundle exec rspec \
52+
--format progress \
53+
--format RspecJunitFormatter \
54+
--out /tmp/test-results/rspec.xml \
55+
--format progress \
56+
$TEST_FILES
57+
58+
# collect reports
59+
- store_test_results:
60+
path: /tmp/test-results
61+
- store_artifacts:
62+
path: /tmp/test-results
63+
destination: test-results

.dockerignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.git
2+
tmp
3+
log
4+
doc
5+
spec
6+
media
7+
.openshift
8+
.bundle
9+
vendor/bundle
10+
db/*.sqlite3
11+
public/system/*
12+
coverage
13+
spec/tmp/*
14+
.travis.yml
15+
build_docker_image.sh
16+
17+
# Copied from .gitignore
18+
*.rbc
19+
*.sassc
20+
.sass-cache
21+
capybara-*.html
22+
.rspec
23+
!/tmp/.gitkeep
24+
**.orig
25+
rerun.txt
26+
pickle-email-*.html
27+
.idea/
28+
.DS_Store
29+
.env
30+
deployment/tmp
31+
deployment/cookbooks
32+
.vagrant
33+
.*un~
34+
.ruby-gemset
35+
.ruby-version
36+
manifest.yml
37+
config/unicorn.rb
38+
db/schema.rb
39+
/tags

.env

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Required configuration settings for ActiveWorkflow
2+
3+
# Heroku sets PORT automatically.
4+
PORT=3000
5+
6+
SECRET_KEY_BASE=REPLACE_ME_NOW!
7+
8+
# Concurrency options
9+
10+
WEB_CONCURRENCY=2
11+
RAILS_MAX_THREADS=5
12+
RACK_TIMEOUT_SERVICE_TIMEOUT=20
13+
14+
15+
# Database setup
16+
17+
#DATABASE_ADAPTER=sqlite3
18+
#DATABASE_ENCODING=utf8
19+
#DATABASE_RECONNECT=true
20+
#DATABASE_NAME=db/development.sqlite3
21+
#DATABASE_POOL=20
22+
#DATABASE_USERNAME=
23+
#DATABASE_PASSWORD=""
24+
#DATABASE_HOST=
25+
#DATABASE_PORT=
26+
#TEST_DATABASE_NAME=
27+
28+
#DO_NOT_CREATE_DATABASE
29+
#DO_NOT_MIGRATE=
30+
SEED_DATABASE=1
31+
32+
SEED_USERNAME=admin
33+
SEED_PASSWORD=password
34+
35+
36+
37+
# User authentication and registration
38+
39+
# If you'd like to require new users to confirm their email address after sign up, set this to true.
40+
REQUIRE_CONFIRMED_EMAIL=false
41+
42+
# If REQUIRE_CONFIRMED_EMAIL is true, set this to the duration in which a user needs to confirm their email address.
43+
ALLOW_UNCONFIRMED_ACCESS_FOR=2.days
44+
45+
# Duration for which the above confirmation token is valid
46+
CONFIRM_WITHIN=3.days
47+
48+
# Minimum password length
49+
MIN_PASSWORD_LENGTH=8
50+
51+
# Duration for which the reset password token is valid
52+
RESET_PASSWORD_WITHIN=6.hours
53+
54+
# Set to 'failed_attempts' to lock user accounts for the UNLOCK_AFTER period they fail MAX_FAILED_LOGIN_ATTEMPTS login attempts. Set to 'none' to allow unlimited failed login attempts.
55+
LOCK_STRATEGY=failed_attempts
56+
57+
# After how many failed login attempts the account is locked when LOCK_STRATEGY is set to failed_attempts.
58+
MAX_FAILED_LOGIN_ATTEMPTS=10
59+
60+
# Can be set to 'email', 'time', 'both' or 'none'. 'none' requires manual unlocking of your users!
61+
UNLOCK_STRATEGY=both
62+
63+
# Duration after which the user is unlocked when UNLOCK_STRATEGY is 'both' or 'time' and LOCK_STRATEGY is 'failed_attempts'
64+
UNLOCK_AFTER=1.hour
65+
66+
# Duration for which the user will be remembered without asking for credentials again.
67+
REMEMBER_FOR=4.weeks
68+
69+
# Set to 'true' if you would prefer new users to start with a default set of agents
70+
IMPORT_DEFAULT_WORKFLOW_FOR_ALL_USERS=true
71+
72+
# Users can be given a default set of agents to get them started
73+
# You can override this scenario with your own scenario via file path or URL
74+
# DEFAULT_WORKFLOW_FILE=path-or-url-to-scenario.json
75+
76+
# Set path to graphviz dot utility to draw diagrams:
77+
#GRAPHVIZ_DOT=dot
78+
79+
# Maximum number of log entries to store (per agent), default: 200
80+
#AGENT_LOG_LENGTH=1000
81+
82+
# Mail configuration.
83+
84+
#SMTP_DOMAIN=
85+
#SMTP_SERVER=
86+
#SMTP_PASSWORD=
87+
#SMTP_USER_NAME=
88+
# You may need this for some servers
89+
#SMTP_ENABLE_STARTTLS_AUTO: true
90+
# Don't disable openssl verification on production!
91+
#SMTP_OPENSSL_VERIFY_MODE: none
92+

.gitignore

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
*.rbc
2+
*.sassc
3+
.sass-cache
4+
capybara-*.html
5+
.rspec
6+
/.bundle
7+
/vendor/bundle
8+
/vendor/cache
9+
/log/*
10+
/tmp/*
11+
!/tmp/.gitkeep
12+
/db/*.sqlite3
13+
/db/*.sqlite3-journal
14+
/public/system/*
15+
/coverage/
16+
/spec/tmp/*
17+
**.orig
18+
rerun.txt
19+
pickle-email-*.html
20+
.idea/
21+
.DS_Store
22+
deployment/tmp
23+
deployment/cookbooks
24+
.vagrant
25+
.*un~
26+
.ruby-gemset
27+
.ruby-version
28+
.local/
29+
spec/examples.txt
30+
/tags
31+
/.mozilla
32+
/.cache

.graphviz

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz

.reek.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
exclude_paths:
2+
- vendor/

.rubocop

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--rails

.rubocop.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
Metrics/ModuleLength:
2+
Enabled: false
3+
Metrics/ClassLength:
4+
Enabled: false
5+
Metrics/LineLength:
6+
Enabled: false
7+
Style/NumericPredicate:
8+
Enabled: false
9+
Style/DoubleNegation:
10+
Enabled: false
11+
Style/Documentation:
12+
Enabled: false
13+
Lint/EmptyWhen:
14+
Enabled: false
15+
Style/ParallelAssignment:
16+
Enabled: false
17+
Style/ClassVars:
18+
Enabled: false
19+
Naming/AccessorMethodName:
20+
Enabled: false
21+
Style/AndOr:
22+
Enabled: false
23+
Style/FrozenStringLiteralComment:
24+
Enabled: false
25+
Lint/UnderscorePrefixedVariableName:
26+
Enabled: false
27+
Style/BracesAroundHashParameters:
28+
Enabled: false
29+
Metrics/BlockLength:
30+
Enabled: false
31+
Style/BlockDelimiters:
32+
Enabled: false
33+
Lint/AmbiguousBlockAssociation:
34+
Enabled: false
35+
Style/MethodCallWithoutArgsParentheses:
36+
Enabled: false
37+
Rails/TimeZone:
38+
Enabled: false
39+
Rails/Date:
40+
Enabled: false
41+
Rails/OutputSafety:
42+
Enabled: false
43+
Layout/TrailingWhitespace:
44+
Enabled: false
45+
Style/ClassAndModuleChildren:
46+
Enabled: false
47+
Naming/PredicateName:
48+
Enabled: false
49+
Style/FormatStringToken:
50+
Enabled: false
51+
Style/RescueModifier:
52+
Enabled: false
53+
Rails/Blank:
54+
Enabled: false
55+
Metrics/BlockNesting:
56+
Enabled: false
57+
Rails/Present:
58+
Enabled: false
59+
60+
61+
# Temporary disable method size metrics
62+
Metrics/AbcSize:
63+
Enabled: false
64+
Metrics/MethodLength:
65+
Enabled: false
66+
67+
68+
AllCops:
69+
Exclude:
70+
- 'bin/*'
71+
- 'vendor/**/*'
72+
- 'db/schema.rb'

Dockerfile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM ubuntu:16.04
2+
3+
COPY docker/scripts/prepare /scripts/
4+
RUN /scripts/prepare
5+
6+
WORKDIR /app
7+
8+
COPY ["Gemfile", "Gemfile.lock", "/app/"]
9+
COPY lib/gemfile_helper.rb /app/lib/
10+
COPY vendor/gems/ /app/vendor/gems/
11+
12+
# Get rid of annoying "fatal: Not a git repository (or any of the parent directories): .git" messages
13+
RUN umask 002 && git init && \
14+
LC_ALL=en_US.UTF-8 RAILS_ENV=production SECRET_KEY_BASE=secret DATABASE_ADAPTER=postgresql bundle install --without "test development" --path vendor/bundle -j 4
15+
16+
COPY ./ /app/
17+
18+
RUN umask 002 && \
19+
LC_ALL=en_US.UTF-8 RAILS_ENV=production SECRET_KEY_BASE=secret DATABASE_ADAPTER=postgresql bundle exec rake assets:clean assets:precompile && \
20+
chmod g=u /app/Gemfile.lock /app/config/ /app/tmp/
21+
22+
23+
EXPOSE 3000
24+
25+
COPY ["docker/scripts/setup_env", "docker/scripts/init", "/scripts/"]
26+
CMD ["/scripts/init"]
27+
28+
USER 1001

0 commit comments

Comments
 (0)