orats 5.0.3 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7c876d02dca8517be317f10f0112a67dda8129d
4
- data.tar.gz: c94d98c498563ecc3498e39f7680600342e9392f
3
+ metadata.gz: eb20963767e37cb986ff42fb5a57f75b2b5f1f4f
4
+ data.tar.gz: 508c76aed5f130ab05257bc146560b896cb4a03b
5
5
  SHA512:
6
- metadata.gz: 0b1105a104c18de32733948292b1629c71d8981f38ef63648cc7867002b05d7b520c97bd73459a0315c16ac713d2eaaa7c864eb51f4478798609d310a04cd45a
7
- data.tar.gz: b4bf8bd14171a0b0b867d20d48caa6f956d95371e9376c28f776310b16b04aacfb047e8c02b9416f8f5856fe45a4eead186f4e100c87059fc5767f1787cbe098
6
+ metadata.gz: 7f3be6ed7d606750b8f958a174383571f6cdfe27fb2f630479ad8002462be3073a5f54a61f0410da031b5a99ce116dec7f50144b3be641d41c2b6797180ec143
7
+ data.tar.gz: 5ac1c565210c8f9cada3dc39882b6a66285a6100a9873d9da8f2d7bfc45e53d40d3a55f629341110f5e90379aa097d0805ad00c5985937144235a86cb176c8c6
@@ -5,6 +5,15 @@ Documentation:
5
5
  # Skips checking to make sure top level modules / classes have a comment.
6
6
  Enabled: false
7
7
 
8
+ Style/PercentLiteralDelimiters:
9
+ PreferredDelimiters:
10
+ default: ()
11
+ '%r': '{}'
12
+ '%w': '()'
13
+ '%W': '()'
14
+ '%i': '()'
15
+ '%I': '()'
16
+
8
17
  Style/ClassAndModuleChildren:
9
18
  # Skips checking the style of children definitions at classes and modules.
10
19
  #
@@ -1,3 +1,18 @@
1
+ ## orats 5.1.1 (June 16, 2017)
2
+
3
+ - Update Ruby to `2.4`
4
+ - Update rails to `5.1.1`
5
+ - Update sidekiq to `5.0`
6
+ - Update Puma to `3.9`
7
+ - Update pg to `0.21`
8
+ - Update redis-rails to `5.0`
9
+ - Bring back jQuery with `jquery-rails`
10
+ - Comment out Capybara in the `Gemfile` (Rails 5.1 has it enabled by default)
11
+ - Switch from Debian to Alpine as a base image in the `Dockerfile`
12
+ - Remove compiling assets inside of the `Dockerfile`
13
+ - Hard code `/app` in the `Dockerfile` and `docker-compose.yml` volumes
14
+ - Change the `MAINTAINER` instruction to use a `LABEL` in the `Dockerfile`
15
+
1
16
  ## orats 5.0.3 (December 21, 2016)
2
17
 
3
18
  - Update Rails to `5.0.1`
data/README.md CHANGED
@@ -13,13 +13,17 @@ application on top of it.
13
13
  It also happens to use Docker so that your app can be ran on any major
14
14
  platform -- even without needing Ruby installed.
15
15
 
16
+ If you want to learn about Docker specifically then I recommend checking out
17
+ the [Dive Into Docker: The Complete Docker Course for Developers course](https://diveintodocker.com/courses/dive-into-docker). You can even watch the
18
+ first 20 videos for free.
19
+
16
20
  ## What versions are you targeting?
17
21
 
18
- #### Ruby 2.3+
22
+ #### Ruby 2.4+
19
23
 
20
- #### Rails 5+
24
+ #### Rails 5.1+
21
25
 
22
- #### Docker 1.11+
26
+ #### Docker 1.11+ / Docker Compose API v2+
23
27
 
24
28
  ## Contents
25
29
  - [Installation](#installation)
@@ -86,6 +90,8 @@ add it.
86
90
  - Use `redis` as the cache backend
87
91
  - Use `sidekiq` as a background worker through Active Job
88
92
  - Use a standalone Action Cable server
93
+ - jQuery is installed with `jquery-rails`
94
+ - Capybara is commented out in the `Gemfile`
89
95
  - **Features**:
90
96
  - Add a `pages` controller with `home` action
91
97
  - **Config**:
@@ -120,6 +126,8 @@ add it.
120
126
  Check out the blog post
121
127
  [Dockerize a Rails 5, Postgres, Redis, Sidekiq and Action Cable Application](http://nickjanetakis.com/blog/dockerize-a-rails-5-postgres-redis-sidekiq-action-cable-app-with-docker-compose).
122
128
 
129
+ Another option is to take my [Dive Into Docker course](https://diveintodocker.com/courses/dive-into-docker).
130
+
123
131
  #### What do I do after I generate the application?
124
132
 
125
133
  Start by reading the above blog post, because the Docker blog post explains
@@ -178,7 +186,7 @@ cp -r /tmp/orats/lib/orats/templates/base /tmp/foo_bar
178
186
  # Swap a few custom values into the base project.
179
187
  find /tmp/foo_bar -type f -exec sed -i -e 's/OratsBase/FooBar/g' {} \;
180
188
  find /tmp/foo_bar -type f -exec sed -i -e 's/orats_base/foo_bar/g' {} \;
181
- find /tmp/foo_bar -type f -exec sed -i -e 's/VERSION/5.0.3/g' {} \;
189
+ find /tmp/foo_bar -type f -exec sed -i -e 's/VERSION/5.1.1/g' {} \;
182
190
 
183
191
  # Rename the example .env file since `.env` is git ignored.
184
192
  mv /tmp/orats/.env.example /tmp/orats/.env
@@ -1,5 +1,5 @@
1
1
  .git
2
2
  .dockerignore
3
3
  .byebug_history
4
- /log/*
5
- /tmp/*
4
+ log/*
5
+ tmp/*
@@ -1,102 +1,15 @@
1
- FROM ruby:2.3-slim
2
- # Docker images can start off with nothing, but it's extremely
3
- # common to pull in from a base image. In our case we're pulling
4
- # in from the slim version of the official Ruby 2.3 image.
5
- #
6
- # Details about this image can be found here:
7
- # https://hub.docker.com/_/ruby/
8
- #
9
- # Slim is pulling in from the official Debian Jessie image.
10
- #
11
- # You can tell it's using Debian Jessie by clicking the
12
- # Dockerfile link next to the 2.3-slim bullet on the Docker hub.
13
- #
14
- # The Docker hub is the standard place for you to find official
15
- # Docker images. Think of it like GitHub but for Docker images.
1
+ FROM ruby:2.4-alpine
16
2
 
17
- MAINTAINER Nick Janetakis <nick.janetakis@gmail.com>
18
- # It is good practice to set a maintainer for all of your Docker
19
- # images. It's not necessary but it's a good habit.
3
+ RUN apk update && apk add build-base nodejs postgresql-dev
20
4
 
21
- RUN apt-get update && apt-get install -qq -y --no-install-recommends \
22
- build-essential nodejs libpq-dev
23
- # Ensure that our apt package list is updated and install a few
24
- # packages to ensure that we can compile assets (nodejs) and
25
- # communicate with PostgreSQL (libpq-dev).
26
-
27
- ENV INSTALL_PATH /orats_base
28
- # The name of the application is orats_base and while there
29
- # is no standard on where your project should live inside of the Docker
30
- # image, I like to put it in the root of the image and name it
31
- # after the project.
32
- #
33
- # We don't even need to set the INSTALL_PATH variable, but I like
34
- # to do it because we're going to be referencing it in a few spots
35
- # later on in the Dockerfile.
36
- #
37
- # The variable could be named anything you want.
38
-
39
- RUN mkdir -p $INSTALL_PATH
40
- # This just creates the folder in the Docker image at the
41
- # install path we defined above.
42
-
43
- WORKDIR $INSTALL_PATH
44
- # We're going to be executing a number of commands below, and
45
- # having to CD into the /orats_base folder every time would be
46
- # lame, so instead we can set the WORKDIR to be /orats_base.
47
- #
48
- # By doing this, Docker will be smart enough to execute all
49
- # future commands from within this directory.
5
+ RUN mkdir /app
6
+ WORKDIR /app
50
7
 
51
8
  COPY Gemfile Gemfile.lock ./
52
- # This is going to copy in the Gemfile and Gemfile.lock from our
53
- # work station at a path relative to the Dockerfile to the
54
- # orats_base/ path inside of the Docker image.
55
- #
56
- # It copies it to /orats_base because of the WORKDIR being set.
57
- #
58
- # We copy in our Gemfile before the main app because Docker is
59
- # smart enough to cache "layers" when you build a Docker image.
60
- #
61
- # You see, each command we have in the Dockerfile is going to be
62
- # ran and then saved as a separate layer. Docker is smart enough
63
- # to only re-build pieces that change, in order from top to bottom.
64
- #
65
- # This is an advanced concept but it means that we'll be able to
66
- # cache all of our gems so that if we make an application code
67
- # change, it won't re-run bundle install unless a gem changed.
68
-
69
9
  RUN bundle install --binstubs
70
- # We want binstubs to be available so we can directly call sidekiq and
71
- # potentially other binaries as command overrides without depending on
72
- # bundle exec.
73
- # This is mainly due for production compatibility assurance.
74
10
 
75
11
  COPY . .
76
- # This might look a bit alien but it's copying in everything from
77
- # the current directory relative to the Dockerfile, over to the
78
- # /orats_base folder inside of the Docker image.
79
- #
80
- # We can get away with using the . for the second argument because
81
- # this is how the unix command cp (copy) works. It stands for the
82
- # current directory.
83
-
84
- RUN bundle exec rake RAILS_ENV=production DATABASE_URL=postgresql://user:pass@127.0.0.1/dbname ACTION_CABLE_ALLOWED_REQUEST_ORIGINS=foo,bar SECRET_TOKEN=dummytoken assets:precompile
85
- # Provide a dummy DATABASE_URL and more to Rails so it can pre-compile
86
- # assets. The values do not need to be real, just valid syntax.
87
- #
88
- # If you're saving your assets to a CDN and are working with multiple
89
- # app instances, you may want to remove this step and deal with asset
90
- # compilation at a different stage of your deployment.
91
12
 
92
- VOLUME ["$INSTALL_PATH/public"]
93
- # In production you will very likely reverse proxy Rails with nginx.
94
- # This sets up a volume so that nginx can read in the assets from
95
- # the Rails Docker image without having to copy them to the Docker host.
13
+ LABEL maintainer="Nick Janetakis <nick.janetakis@gmail.com>"
96
14
 
97
15
  CMD puma -C config/puma.rb
98
- # This is the command that's going to be ran by default if you run the
99
- # Docker image without any arguments.
100
- #
101
- # In our case, it will start the Puma app server while passing in
102
- # its config file.
@@ -1,10 +1,15 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ git_source(:github) do |repo_name|
4
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
5
+ "https://github.com/#{repo_name}.git"
6
+ end
7
+
3
8
  # Looking to use the Edge version? gem 'rails', github: 'rails/rails'
4
- gem 'rails', '~> 5.0.1'
9
+ gem 'rails', '~> 5.1.1'
5
10
 
6
11
  # Use Puma as the app server
7
- gem 'puma', '~> 3.0'
12
+ gem 'puma', '~> 3.9'
8
13
 
9
14
  # Use Rack Timeout. Read more: https://github.com/heroku/rack-timeout
10
15
  gem 'rack-timeout', '~> 0.4'
@@ -13,19 +18,19 @@ gem 'rack-timeout', '~> 0.4'
13
18
  gem 'jbuilder', '~> 2.5'
14
19
 
15
20
  # Use PostgreSQL as the database for Active Record
16
- gem 'pg', '~> 0.18'
21
+ gem 'pg', '~> 0.21'
17
22
 
18
23
  # Use Redis Rails to set up a Redis backed Cache and / or Session
19
- gem 'redis-rails', '~> 5.0.0.pre'
24
+ gem 'redis-rails', '~> 5.0'
20
25
 
21
26
  # Use Sidekiq as a background job processor through Active Job
22
- gem 'sidekiq', '~> 4.2'
27
+ gem 'sidekiq', '~> 5.0'
23
28
 
24
29
  # Use Clockwork for recurring background tasks without needing cron
25
30
  # gem 'clockwork', '~> 2.0'
26
31
 
27
32
  # Use Kaminari for pagination
28
- # gem 'kaminari', '~> 0.16'
33
+ # gem 'kaminari', '~> 0.17'
29
34
 
30
35
  # Use SCSS for stylesheets
31
36
  gem 'sass-rails', '~> 5.0'
@@ -34,7 +39,7 @@ gem 'sass-rails', '~> 5.0'
34
39
  gem 'uglifier', '>= 1.3.0'
35
40
 
36
41
  # Use jQuery as the JavaScript library
37
- gem 'jquery-rails'
42
+ gem 'jquery-rails', '~> 4.3'
38
43
 
39
44
  # Use Turbolinks. Read more: https://github.com/turbolinks/turbolinks
40
45
  gem 'turbolinks', '~> 5'
@@ -48,6 +53,10 @@ gem 'font-awesome-rails', '~> 4.7'
48
53
  group :development, :test do
49
54
  # Call 'byebug' anywhere in your code to drop into a debugger console
50
55
  gem 'byebug', platform: :mri
56
+
57
+ # End to end testing of your rails apps (Rails 5.1+ supports this)
58
+ # gem 'capybara', '~> 2.13'
59
+ # gem 'selenium-webdriver'
51
60
  end
52
61
 
53
62
  group :development do
@@ -58,7 +67,7 @@ group :development do
58
67
  gem 'web-console', '~> 3.3.0'
59
68
 
60
69
  # Get notified of file changes. Read more: https://github.com/guard/listen
61
- gem 'listen', '~> 3.0.5'
70
+ gem 'listen', '>= 3.0.5', '< 3.2'
62
71
 
63
72
  # Use Spring. Read more: https://github.com/rails/spring
64
73
  gem 'spring'
@@ -66,4 +75,4 @@ group :development do
66
75
  end
67
76
 
68
77
  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
69
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
78
+ gem 'tzinfo-data'
@@ -1,207 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- actioncable (5.0.1)
5
- actionpack (= 5.0.1)
6
- nio4r (~> 1.2)
7
- websocket-driver (~> 0.6.1)
8
- actionmailer (5.0.1)
9
- actionpack (= 5.0.1)
10
- actionview (= 5.0.1)
11
- activejob (= 5.0.1)
12
- mail (~> 2.5, >= 2.5.4)
13
- rails-dom-testing (~> 2.0)
14
- actionpack (5.0.1)
15
- actionview (= 5.0.1)
16
- activesupport (= 5.0.1)
17
- rack (~> 2.0)
18
- rack-test (~> 0.6.3)
19
- rails-dom-testing (~> 2.0)
20
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
21
- actionview (5.0.1)
22
- activesupport (= 5.0.1)
23
- builder (~> 3.1)
24
- erubis (~> 2.7.0)
25
- rails-dom-testing (~> 2.0)
26
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
- activejob (5.0.1)
28
- activesupport (= 5.0.1)
29
- globalid (>= 0.3.6)
30
- activemodel (5.0.1)
31
- activesupport (= 5.0.1)
32
- activerecord (5.0.1)
33
- activemodel (= 5.0.1)
34
- activesupport (= 5.0.1)
35
- arel (~> 7.0)
36
- activesupport (5.0.1)
37
- concurrent-ruby (~> 1.0, >= 1.0.2)
38
- i18n (~> 0.7)
39
- minitest (~> 5.1)
40
- tzinfo (~> 1.1)
41
- arel (7.1.4)
42
- autoprefixer-rails (6.5.4)
43
- execjs
44
- bootstrap-sass (3.3.7)
45
- autoprefixer-rails (>= 5.2.1)
46
- sass (>= 3.3.4)
47
- builder (3.2.2)
48
- byebug (9.0.6)
49
- concurrent-ruby (1.0.3)
50
- connection_pool (2.2.1)
51
- debug_inspector (0.0.2)
52
- erubis (2.7.0)
53
- execjs (2.7.0)
54
- ffi (1.9.14)
55
- font-awesome-rails (4.7.0.1)
56
- railties (>= 3.2, < 5.1)
57
- globalid (0.3.7)
58
- activesupport (>= 4.1.0)
59
- i18n (0.7.0)
60
- jbuilder (2.6.1)
61
- activesupport (>= 3.0.0, < 5.1)
62
- multi_json (~> 1.2)
63
- jquery-rails (4.2.1)
64
- rails-dom-testing (>= 1, < 3)
65
- railties (>= 4.2.0)
66
- thor (>= 0.14, < 2.0)
67
- listen (3.0.8)
68
- rb-fsevent (~> 0.9, >= 0.9.4)
69
- rb-inotify (~> 0.9, >= 0.9.7)
70
- loofah (2.0.3)
71
- nokogiri (>= 1.5.9)
72
- mail (2.6.4)
73
- mime-types (>= 1.16, < 4)
74
- method_source (0.8.2)
75
- mime-types (3.1)
76
- mime-types-data (~> 3.2015)
77
- mime-types-data (3.2016.0521)
78
- mini_portile2 (2.1.0)
79
- minitest (5.10.1)
80
- multi_json (1.12.1)
81
- nio4r (1.2.1)
82
- nokogiri (1.6.8.1)
83
- mini_portile2 (~> 2.1.0)
84
- pg (0.19.0)
85
- puma (3.6.2)
86
- rack (2.0.1)
87
- rack-mini-profiler (0.10.1)
88
- rack (>= 1.2.0)
89
- rack-protection (1.5.3)
90
- rack
91
- rack-test (0.6.3)
92
- rack (>= 1.0)
93
- rack-timeout (0.4.2)
94
- rails (5.0.1)
95
- actioncable (= 5.0.1)
96
- actionmailer (= 5.0.1)
97
- actionpack (= 5.0.1)
98
- actionview (= 5.0.1)
99
- activejob (= 5.0.1)
100
- activemodel (= 5.0.1)
101
- activerecord (= 5.0.1)
102
- activesupport (= 5.0.1)
103
- bundler (>= 1.3.0, < 2.0)
104
- railties (= 5.0.1)
105
- sprockets-rails (>= 2.0.0)
106
- rails-dom-testing (2.0.1)
107
- activesupport (>= 4.2.0, < 6.0)
108
- nokogiri (~> 1.6.0)
109
- rails-html-sanitizer (1.0.3)
110
- loofah (~> 2.0)
111
- railties (5.0.1)
112
- actionpack (= 5.0.1)
113
- activesupport (= 5.0.1)
114
- method_source
115
- rake (>= 0.8.7)
116
- thor (>= 0.18.1, < 2.0)
117
- rake (12.0.0)
118
- rb-fsevent (0.9.8)
119
- rb-inotify (0.9.7)
120
- ffi (>= 0.5.0)
121
- redis (3.3.2)
122
- redis-actionpack (5.0.1)
123
- actionpack (>= 4.0, < 6)
124
- redis-rack (>= 1, < 3)
125
- redis-store (>= 1.1.0, < 1.4.0)
126
- redis-activesupport (5.0.1)
127
- activesupport (>= 3, < 6)
128
- redis-store (~> 1.2.0)
129
- redis-rack (2.0.0)
130
- rack (~> 2.0)
131
- redis-store (~> 1.2.0)
132
- redis-rails (5.0.1)
133
- redis-actionpack (~> 5.0.0)
134
- redis-activesupport (~> 5.0.0)
135
- redis-store (~> 1.2.0)
136
- redis-store (1.2.0)
137
- redis (>= 2.2)
138
- sass (3.4.23)
139
- sass-rails (5.0.6)
140
- railties (>= 4.0.0, < 6)
141
- sass (~> 3.1)
142
- sprockets (>= 2.8, < 4.0)
143
- sprockets-rails (>= 2.0, < 4.0)
144
- tilt (>= 1.1, < 3)
145
- sidekiq (4.2.7)
146
- concurrent-ruby (~> 1.0)
147
- connection_pool (~> 2.2, >= 2.2.0)
148
- rack-protection (>= 1.5.0)
149
- redis (~> 3.2, >= 3.2.1)
150
- spring (2.0.0)
151
- activesupport (>= 4.2)
152
- spring-watcher-listen (2.0.1)
153
- listen (>= 2.7, < 4.0)
154
- spring (>= 1.2, < 3.0)
155
- sprockets (3.7.1)
156
- concurrent-ruby (~> 1.0)
157
- rack (> 1, < 3)
158
- sprockets-rails (3.2.0)
159
- actionpack (>= 4.0)
160
- activesupport (>= 4.0)
161
- sprockets (>= 3.0.0)
162
- thor (0.19.4)
163
- thread_safe (0.3.5)
164
- tilt (2.0.5)
165
- turbolinks (5.0.1)
166
- turbolinks-source (~> 5)
167
- turbolinks-source (5.0.0)
168
- tzinfo (1.2.2)
169
- thread_safe (~> 0.1)
170
- uglifier (3.0.4)
171
- execjs (>= 0.3.0, < 3)
172
- web-console (3.3.1)
173
- actionview (>= 5.0)
174
- activemodel (>= 5.0)
175
- debug_inspector
176
- railties (>= 5.0)
177
- websocket-driver (0.6.4)
178
- websocket-extensions (>= 0.1.0)
179
- websocket-extensions (0.1.2)
180
-
181
- PLATFORMS
182
- ruby
183
-
184
- DEPENDENCIES
185
- bootstrap-sass (~> 3.3)
186
- byebug
187
- font-awesome-rails (~> 4.7)
188
- jbuilder (~> 2.5)
189
- jquery-rails
190
- listen (~> 3.0.5)
191
- pg (~> 0.18)
192
- puma (~> 3.0)
193
- rack-mini-profiler (~> 0.10)
194
- rack-timeout (~> 0.4)
195
- rails (~> 5.0.1)
196
- redis-rails (~> 5.0.0.pre)
197
- sass-rails (~> 5.0)
198
- sidekiq (~> 4.2)
199
- spring
200
- spring-watcher-listen (~> 2.0.0)
201
- turbolinks (~> 5)
202
- tzinfo-data
203
- uglifier (>= 1.3.0)
204
- web-console (~> 3.3.0)
205
-
206
- BUNDLED WITH
207
- 1.12.5
@@ -16,7 +16,7 @@
16
16
  // about supported directives.
17
17
  //
18
18
  //= require jquery
19
- //= require jquery_ujs
19
+ //= require rails-ujs
20
20
  //= require turbolinks
21
21
  //= require bootstrap/affix
22
22
  //= require bootstrap/alert
@@ -23,11 +23,9 @@
23
23
  // @import "bootstrap-sprockets";
24
24
  @import "bootstrap/variables";
25
25
  @import "bootstrap/mixins";
26
-
27
26
  // Reset
28
27
  @import "bootstrap/normalize";
29
28
  @import "bootstrap/print";
30
-
31
29
  // Core CSS
32
30
  @import "bootstrap/scaffolding";
33
31
  @import "bootstrap/type";
@@ -36,7 +34,6 @@
36
34
  @import "bootstrap/tables";
37
35
  @import "bootstrap/forms";
38
36
  @import "bootstrap/buttons";
39
-
40
37
  // Components
41
38
  @import "bootstrap/component-animations";
42
39
  // @import "bootstrap/glyphicons";
@@ -59,31 +56,28 @@
59
56
  @import "bootstrap/panels";
60
57
  @import "bootstrap/wells";
61
58
  @import "bootstrap/close";
62
-
63
59
  // Components w/ JavaScript
64
60
  @import "bootstrap/modals";
65
61
  @import "bootstrap/tooltip";
66
62
  @import "bootstrap/popovers";
67
63
  @import "bootstrap/carousel";
68
-
69
64
  // Utility classes
70
65
  @import "bootstrap/utilities";
71
66
  @import "bootstrap/responsive-utilities";
72
-
73
67
  .alert-notice {
74
- @extend .alert-success;
68
+ @extend .alert-success;
75
69
  }
76
70
 
77
71
  .alert-alert {
78
- @extend .alert-danger;
72
+ @extend .alert-danger;
79
73
  }
80
74
 
81
75
  img {
82
- @extend .img-responsive;
76
+ @extend .img-responsive;
83
77
  }
84
78
 
85
79
  .validation-error {
86
- margin-top: 2px;
87
- color: $brand-danger;
88
- font-size: $font-size-small;
89
- }
80
+ margin-top: 2px;
81
+ color: $brand-danger;
82
+ font-size: $font-size-small;
83
+ }
@@ -1,4 +1,3 @@
1
1
  class PagesController < ApplicationController
2
- def home
3
- end
2
+ def home; end
4
3
  end
@@ -18,11 +18,11 @@
18
18
 
19
19
  <hr/>
20
20
 
21
- <h3>Learn more about Docker and this project</h3>
21
+ <h3>Learn more about Docker</h3>
22
22
 
23
23
  <ul>
24
24
  <li>
25
- <%= link_to 'Learn how this application was Dockerized', 'http://nickjanetakis.com/blog/dockerize-a-rails-5-postgres-redis-sidekiq-action-cable-app-with-docker-compose' %>
25
+ <%= link_to 'Learn how to build web apps with Docker', 'https://diveintodocker.com/courses/dive-into-docker' %>
26
26
  </li>
27
27
  </ul>
28
28
 
@@ -18,6 +18,9 @@ chdir APP_ROOT do
18
18
  system! 'gem install bundler --conservative'
19
19
  system('bundle check') || system!('bundle install')
20
20
 
21
+ # Install JavaScript dependencies if using Yarn
22
+ # system('bin/yarn')
23
+
21
24
  # puts "\n== Copying sample files =="
22
25
  # unless File.exist?('config/database.yml')
23
26
  # cp 'config/database.yml.sample', 'config/database.yml'
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ VENDOR_PATH = File.expand_path('..', __dir__)
3
+ Dir.chdir(VENDOR_PATH) do
4
+ begin
5
+ exec "yarnpkg #{ARGV.join(' ')}"
6
+ rescue Errno::ENOENT
7
+ $stderr.puts 'Yarn executable was not detected in the system.'
8
+ $stderr.puts 'Download Yarn at https://yarnpkg.com/en/docs/install'
9
+ exit 1
10
+ end
11
+ end
@@ -8,6 +8,9 @@ Bundler.require(*Rails.groups)
8
8
 
9
9
  module OratsBase
10
10
  class Application < Rails::Application
11
+ # Initialize configuration defaults for originally generated Rails version.
12
+ config.load_defaults 5.1
13
+
11
14
  # Application configuration should go into files in config/initializers
12
15
  # -- all .rb files in that directory are automatically loaded.
13
16
 
@@ -20,7 +23,7 @@ module OratsBase
20
23
  # or a third party host such as Loggly, etc..
21
24
  logger = ActiveSupport::Logger.new(STDOUT)
22
25
  logger.formatter = config.log_formatter
23
- config.log_tags = [:subdomain, :uuid]
26
+ config.log_tags = %i[subdomain uuid]
24
27
  config.logger = ActiveSupport::TaggedLogging.new(logger)
25
28
 
26
29
  # Action mailer settings.
@@ -12,6 +12,11 @@ Rails.application.configure do
12
12
  config.consider_all_requests_local = false
13
13
  config.action_controller.perform_caching = true
14
14
 
15
+ # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
16
+ # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
17
+ # `config/secrets.yml.key`.
18
+ config.read_encrypted_secrets = false
19
+
15
20
  # Disable serving static files from the `/public` folder by default since
16
21
  # Apache or NGINX already handles this.
17
22
  config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
@@ -3,9 +3,12 @@
3
3
  # Version of your assets, change this if you want to expire all your assets.
4
4
  Rails.application.config.assets.version = '1.0'
5
5
 
6
- # Add additional assets to the asset load path
6
+ # Add additional assets to the asset load path.
7
7
  # Rails.application.config.assets.paths << Emoji.images_path
8
8
 
9
+ # Add Yarn node_modules folder to the asset load path.
10
+ Rails.application.config.assets.paths << Rails.root.join('node_modules')
11
+
9
12
  # Pre-compile additional assets.
10
13
  Rails.application.config.assets.precompile << proc do |path|
11
14
  true if path =~ /\.(eot|svg|ttf|woff|png)\z/
@@ -1,6 +1,6 @@
1
- %w(
1
+ %w[
2
2
  .ruby-version
3
3
  .rbenv-vars
4
4
  tmp/restart.txt
5
5
  tmp/caching-dev.txt
6
- ).each { |path| Spring.watch(path) }
6
+ ].each { |path| Spring.watch(path) }
@@ -2,7 +2,7 @@ version: '2'
2
2
 
3
3
  services:
4
4
  postgres:
5
- image: 'postgres:9.5'
5
+ image: 'postgres:9.6-alpine'
6
6
  environment:
7
7
  POSTGRES_USER: 'orats_base'
8
8
  POSTGRES_PASSWORD: 'yourpassword'
@@ -27,7 +27,7 @@ services:
27
27
  ports:
28
28
  - '3000:3000'
29
29
  volumes:
30
- - '.:/orats_base'
30
+ - '.:/app'
31
31
  env_file:
32
32
  - '.env'
33
33
 
@@ -38,7 +38,7 @@ services:
38
38
  build: .
39
39
  command: sidekiq -C config/sidekiq.yml.erb
40
40
  volumes:
41
- - '.:/orats_base'
41
+ - '.:/app'
42
42
  env_file:
43
43
  - '.env'
44
44
 
@@ -50,7 +50,7 @@ services:
50
50
  ports:
51
51
  - '28080:28080'
52
52
  volumes:
53
- - '.:/orats_base'
53
+ - '.:/app'
54
54
  env_file:
55
55
  - '.env'
56
56
 
@@ -0,0 +1,5 @@
1
+ require 'test_helper'
2
+
3
+ # class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4
+ # driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5
+ # end
@@ -1,4 +1,3 @@
1
- ENV['RAILS_ENV'] ||= 'test'
2
1
  require File.expand_path('../../config/environment', __FILE__)
3
2
  require 'rails/test_help'
4
3
 
@@ -1,4 +1,4 @@
1
1
  # set the version of this gem
2
2
  module Orats
3
- VERSION = '5.0.3'.freeze
3
+ VERSION = '5.1.1'.freeze
4
4
  end
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'orats/version'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orats
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.3
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Janetakis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-21 00:00:00.000000000 Z
11
+ date: 2017-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -142,6 +142,7 @@ files:
142
142
  - lib/orats/templates/base/bin/rake
143
143
  - lib/orats/templates/base/bin/setup
144
144
  - lib/orats/templates/base/bin/update
145
+ - lib/orats/templates/base/bin/yarn
145
146
  - lib/orats/templates/base/cable/config.ru
146
147
  - lib/orats/templates/base/config.ru
147
148
  - lib/orats/templates/base/config/application.rb
@@ -160,7 +161,6 @@ files:
160
161
  - lib/orats/templates/base/config/initializers/filter_parameter_logging.rb
161
162
  - lib/orats/templates/base/config/initializers/inflections.rb
162
163
  - lib/orats/templates/base/config/initializers/mime_types.rb
163
- - lib/orats/templates/base/config/initializers/new_framework_defaults.rb
164
164
  - lib/orats/templates/base/config/initializers/session_store.rb
165
165
  - lib/orats/templates/base/config/initializers/sidekiq.rb
166
166
  - lib/orats/templates/base/config/initializers/timeout.rb
@@ -183,6 +183,7 @@ files:
183
183
  - lib/orats/templates/base/public/apple-touch-icon.png
184
184
  - lib/orats/templates/base/public/favicon.ico
185
185
  - lib/orats/templates/base/public/robots.txt
186
+ - lib/orats/templates/base/test/application_system_test_case.rb
186
187
  - lib/orats/templates/base/test/controllers/.keep
187
188
  - lib/orats/templates/base/test/controllers/pages_controller_test.rb
188
189
  - lib/orats/templates/base/test/fixtures/.keep
@@ -1,27 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
- #
3
- # This file contains migration options to ease your Rails 5.0 upgrade.
4
- #
5
- # Read the Rails 5.0 release notes for more info on each option.
6
-
7
- # Enable per-form CSRF tokens. Previous versions had false.
8
- Rails.application.config.action_controller.per_form_csrf_tokens = true
9
-
10
- # Enable origin-checking CSRF mitigation. Previous versions had false.
11
- Rails.application.config
12
- .action_controller.forgery_protection_origin_check = true
13
-
14
- # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
15
- # Previous versions had false.
16
- ActiveSupport.to_time_preserves_timezone = true
17
-
18
- # Require `belongs_to` associations by default. Previous versions had false.
19
- Rails.application.config.active_record.belongs_to_required_by_default = true
20
-
21
- # Do not halt callback chains when a callback returns false.
22
- # Previous versions had true.
23
- ActiveSupport.halt_callback_chains_on_return_false = false
24
-
25
- # Configure SSL options to enable HSTS with subdomains.
26
- # Previous versions had false.
27
- Rails.application.config.ssl_options = { hsts: { subdomains: true } }