gnarails 1.0.0 → 2.0.0
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/.circleci/config.yml +21 -90
- data/.ruby-version +1 -1
- data/CHANGELOG.md +50 -0
- data/README.md +1 -34
- data/bin/ci_pronto +1 -1
- data/gnarails.gemspec +2 -3
- data/gnarly.rb +44 -137
- data/lib/gnarails/version.rb +1 -1
- data/templates/.circleci/config.yml +7 -2
- data/templates/Procfile +1 -0
- data/templates/{script → bin}/brakeman +1 -1
- data/templates/{script → bin}/ci_pronto +1 -1
- data/test-app/app/views/layouts/application.html.erb +4 -2
- data/test-app/spec/factories/job_postings.rb +1 -1
- metadata +9 -64
- data/bin/generate-react-test-app.sh +0 -2
- data/templates/.ruby-version +0 -1
- data/templates/Dockerfile-assets +0 -24
- data/templates/docker-compose.yml/docker-compose-webpack.yml +0 -26
- data/templates/react/.babelrc +0 -18
- data/templates/react/.eslintrc.js +0 -45
- data/templates/react/controllers/home_controller.rb +0 -4
- data/templates/react/js/Router/Router.jsx +0 -22
- data/templates/react/js/Router/index.js +0 -3
- data/templates/react/js/api/index.js +0 -17
- data/templates/react/js/api/sessions.js +0 -8
- data/templates/react/js/app_constants/index.js +0 -6
- data/templates/react/js/components/App/App.jsx +0 -15
- data/templates/react/js/components/App/App.tests.jsx +0 -15
- data/templates/react/js/components/App/_styles.scss +0 -3
- data/templates/react/js/components/App/index.js +0 -3
- data/templates/react/js/index.scss +0 -2
- data/templates/react/js/packs/main.jsx +0 -13
- data/templates/react/js/redux/entity_getter.js +0 -7
- data/templates/react/js/redux/history.js +0 -5
- data/templates/react/js/redux/initial_state.js +0 -5
- data/templates/react/js/redux/middlewares/authentication_middleware/authentication_middleware.tests.js +0 -109
- data/templates/react/js/redux/middlewares/authentication_middleware/helpers.js +0 -21
- data/templates/react/js/redux/middlewares/authentication_middleware/helpers.tests.js +0 -84
- data/templates/react/js/redux/middlewares/authentication_middleware/index.js +0 -20
- data/templates/react/js/redux/middlewares/index.js +0 -11
- data/templates/react/js/redux/nodes/app/actions.js +0 -36
- data/templates/react/js/redux/nodes/app/config.js +0 -12
- data/templates/react/js/redux/nodes/app/reducer.js +0 -35
- data/templates/react/js/redux/nodes/app/reducer.tests.js +0 -78
- data/templates/react/js/redux/reducers.js +0 -11
- data/templates/react/js/redux/store.js +0 -14
- data/templates/react/js/storage.js +0 -15
- data/templates/react/js/styles/_variables.scss +0 -1
- data/templates/react/js/test/.setup.js +0 -51
- data/templates/react/js/test/connect_wrapper.jsx +0 -28
- data/templates/react/js/test/create_request_mock.js +0 -29
- data/templates/react/js/test/mock_store.js +0 -12
- data/templates/react/layout.html.erb +0 -16
- data/templates/react/rails_routes.rb +0 -5
- data/templates/react/views/home/default.html.erb +0 -1
data/lib/gnarails/version.rb
CHANGED
@@ -48,12 +48,12 @@ jobs:
|
|
48
48
|
command: bundle exec bundle-audit update && bundle exec bundle-audit check
|
49
49
|
- run:
|
50
50
|
name: Brakeman
|
51
|
-
command: ./
|
51
|
+
command: ./bin/brakeman
|
52
52
|
|
53
53
|
# Pronto
|
54
54
|
- run:
|
55
55
|
name: Pronto
|
56
|
-
command: ./
|
56
|
+
command: ./bin/ci_pronto
|
57
57
|
|
58
58
|
# Save Brakeman
|
59
59
|
- store_artifacts:
|
@@ -64,3 +64,8 @@ jobs:
|
|
64
64
|
- store_artifacts:
|
65
65
|
path: coverage
|
66
66
|
destination: coverage
|
67
|
+
|
68
|
+
# Save Capybara Screenshots
|
69
|
+
- store_artifacts:
|
70
|
+
path: tmp/screenshots
|
71
|
+
destination: capybara/screenshots
|
data/templates/Procfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
web: bundle exec puma
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# Script for running Brakeman tests
|
4
4
|
# Brakeman is a security scanner https://github.com/presidentbeef/brakeman.
|
5
|
-
gem install
|
5
|
+
gem install brakeman --no-document
|
6
6
|
|
7
7
|
brakeman --exit-on-warn --separate-models -o tmp/brakeman.html -o tmp/brakeman.text .
|
8
8
|
brakeman_exit_code=$?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gnarails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Gnar Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,28 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.1
|
19
|
+
version: 5.2.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.1
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rspec-rails
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
26
|
+
version: 5.2.1
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: thor
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,7 +148,6 @@ files:
|
|
162
148
|
- Rakefile
|
163
149
|
- bin/ci_pronto
|
164
150
|
- bin/console
|
165
|
-
- bin/generate-react-test-app.sh
|
166
151
|
- bin/generate-test-app.sh
|
167
152
|
- bin/setup
|
168
153
|
- bin/test-setup.sh
|
@@ -182,53 +167,14 @@ files:
|
|
182
167
|
- templates/.pronto.yml
|
183
168
|
- templates/.rspec
|
184
169
|
- templates/.rubocop.yml
|
185
|
-
- templates/.ruby-version
|
186
170
|
- templates/.scss-lint.yml
|
187
171
|
- templates/Dockerfile
|
188
|
-
- templates/
|
172
|
+
- templates/Procfile
|
189
173
|
- templates/README.md
|
174
|
+
- templates/bin/brakeman
|
175
|
+
- templates/bin/ci_pronto
|
190
176
|
- templates/database.yml
|
191
177
|
- templates/docker-compose.yml/docker-compose-standard.yml
|
192
|
-
- templates/docker-compose.yml/docker-compose-webpack.yml
|
193
|
-
- templates/react/.babelrc
|
194
|
-
- templates/react/.eslintrc.js
|
195
|
-
- templates/react/controllers/home_controller.rb
|
196
|
-
- templates/react/js/Router/Router.jsx
|
197
|
-
- templates/react/js/Router/index.js
|
198
|
-
- templates/react/js/api/index.js
|
199
|
-
- templates/react/js/api/sessions.js
|
200
|
-
- templates/react/js/app_constants/index.js
|
201
|
-
- templates/react/js/components/App/App.jsx
|
202
|
-
- templates/react/js/components/App/App.tests.jsx
|
203
|
-
- templates/react/js/components/App/_styles.scss
|
204
|
-
- templates/react/js/components/App/index.js
|
205
|
-
- templates/react/js/index.scss
|
206
|
-
- templates/react/js/packs/main.jsx
|
207
|
-
- templates/react/js/redux/entity_getter.js
|
208
|
-
- templates/react/js/redux/history.js
|
209
|
-
- templates/react/js/redux/initial_state.js
|
210
|
-
- templates/react/js/redux/middlewares/authentication_middleware/authentication_middleware.tests.js
|
211
|
-
- templates/react/js/redux/middlewares/authentication_middleware/helpers.js
|
212
|
-
- templates/react/js/redux/middlewares/authentication_middleware/helpers.tests.js
|
213
|
-
- templates/react/js/redux/middlewares/authentication_middleware/index.js
|
214
|
-
- templates/react/js/redux/middlewares/index.js
|
215
|
-
- templates/react/js/redux/nodes/app/actions.js
|
216
|
-
- templates/react/js/redux/nodes/app/config.js
|
217
|
-
- templates/react/js/redux/nodes/app/reducer.js
|
218
|
-
- templates/react/js/redux/nodes/app/reducer.tests.js
|
219
|
-
- templates/react/js/redux/reducers.js
|
220
|
-
- templates/react/js/redux/store.js
|
221
|
-
- templates/react/js/storage.js
|
222
|
-
- templates/react/js/styles/_variables.scss
|
223
|
-
- templates/react/js/test/.setup.js
|
224
|
-
- templates/react/js/test/connect_wrapper.jsx
|
225
|
-
- templates/react/js/test/create_request_mock.js
|
226
|
-
- templates/react/js/test/mock_store.js
|
227
|
-
- templates/react/layout.html.erb
|
228
|
-
- templates/react/rails_routes.rb
|
229
|
-
- templates/react/views/home/default.html.erb
|
230
|
-
- templates/script/brakeman
|
231
|
-
- templates/script/ci_pronto
|
232
178
|
- templates/spec/support/factory_bot.rb
|
233
179
|
- templates/spec/support/system_test_configuration.rb
|
234
180
|
- test-app/app/controllers/job_postings_controller.rb
|
@@ -255,15 +201,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
255
201
|
requirements:
|
256
202
|
- - ">="
|
257
203
|
- !ruby/object:Gem::Version
|
258
|
-
version: 2.
|
204
|
+
version: 2.6.0
|
259
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
206
|
requirements:
|
261
207
|
- - ">="
|
262
208
|
- !ruby/object:Gem::Version
|
263
209
|
version: '0'
|
264
210
|
requirements: []
|
265
|
-
|
266
|
-
rubygems_version: 2.7.3
|
211
|
+
rubygems_version: 3.0.1
|
267
212
|
signing_key:
|
268
213
|
specification_version: 4
|
269
214
|
summary: Easily create a gnarly rails app.
|
data/templates/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__ruby_version__
|
data/templates/Dockerfile-assets
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
FROM ruby:__ruby_version__
|
2
|
-
|
3
|
-
# use a newer version of Node to use Yarn
|
4
|
-
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
5
|
-
|
6
|
-
# nodejs: Rails needs a JS runtime
|
7
|
-
# cmake: required by Rugged, dependency of Pronto
|
8
|
-
RUN apt-get update -qq \
|
9
|
-
&& apt-get install -y -qq nodejs cmake
|
10
|
-
|
11
|
-
RUN npm install -g yarn
|
12
|
-
|
13
|
-
RUN mkdir /app
|
14
|
-
WORKDIR /app
|
15
|
-
|
16
|
-
ADD Gemfile /app/Gemfile
|
17
|
-
ADD Gemfile.lock /app/Gemfile.lock
|
18
|
-
RUN bundle install
|
19
|
-
|
20
|
-
ADD package.json /app/package.json
|
21
|
-
ADD yarn.lock /app/yarn.lock
|
22
|
-
RUN yarn install
|
23
|
-
|
24
|
-
ADD . /app
|
@@ -1,26 +0,0 @@
|
|
1
|
-
version: '3'
|
2
|
-
services:
|
3
|
-
db:
|
4
|
-
image: postgres
|
5
|
-
assets:
|
6
|
-
build:
|
7
|
-
context: .
|
8
|
-
dockerfile: Dockerfile-assets
|
9
|
-
command: yarn start
|
10
|
-
volumes:
|
11
|
-
- .:/app
|
12
|
-
- /app/node_modules
|
13
|
-
env_file:
|
14
|
-
- .env.docker-assets
|
15
|
-
web:
|
16
|
-
build: .
|
17
|
-
command: bash -c 'rm -f tmp/pids/server.pid && bundle exec rails s --port 3000 --binding 0.0.0.0'
|
18
|
-
volumes:
|
19
|
-
- .:/app
|
20
|
-
ports:
|
21
|
-
- 3000:3000
|
22
|
-
depends_on:
|
23
|
-
- db
|
24
|
-
- assets
|
25
|
-
env_file:
|
26
|
-
- .env.docker
|
data/templates/react/.babelrc
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
var path = require('path');
|
2
|
-
|
3
|
-
module.exports = {
|
4
|
-
extends: 'airbnb',
|
5
|
-
parser: 'babel-eslint',
|
6
|
-
env: {
|
7
|
-
'node': true,
|
8
|
-
'mocha': true
|
9
|
-
},
|
10
|
-
globals: {
|
11
|
-
'expect': false,
|
12
|
-
'describe': false
|
13
|
-
},
|
14
|
-
rules: {
|
15
|
-
'consistent-return': 1,
|
16
|
-
'arrow-body-style': 0,
|
17
|
-
'max-len': 0,
|
18
|
-
'jsx-a11y/img-has-alt': 0,
|
19
|
-
'no-use-before-define': [2, 'nofunc'],
|
20
|
-
'no-unused-expressions': 0,
|
21
|
-
'no-console': 0,
|
22
|
-
'space-before-function-paren': 0,
|
23
|
-
'react/prefer-stateless-function': 0,
|
24
|
-
'react/no-multi-comp': 0,
|
25
|
-
'react/no-unused-prop-types': [1, { 'customValidators': [], skipShapeProps: true }],
|
26
|
-
'no-param-reassign': 0,
|
27
|
-
'new-cap': 0,
|
28
|
-
'import/no-unresolved': 'error',
|
29
|
-
'import/no-extraneous-dependencies': ['error', { 'devDependencies': true }],
|
30
|
-
'linebreak-style': 0,
|
31
|
-
'import/no-named-as-default': 'off',
|
32
|
-
'import/no-named-as-default-member': 'off',
|
33
|
-
'no-underscore-dangle': 0
|
34
|
-
},
|
35
|
-
settings: {
|
36
|
-
'import/resolver': {
|
37
|
-
webpack: {
|
38
|
-
config: path.join(__dirname, 'webpack.config.js')
|
39
|
-
},
|
40
|
-
node: {
|
41
|
-
paths: 'app/javascript'
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import React, { Component } from 'react';
|
2
|
-
import { Provider } from 'react-redux';
|
3
|
-
import { ConnectedRouter } from 'react-router-redux'
|
4
|
-
import { Route } from 'react-router';
|
5
|
-
|
6
|
-
import App from 'components/App';
|
7
|
-
import history from 'redux/history';
|
8
|
-
import store from 'redux/store';
|
9
|
-
|
10
|
-
export default class Router extends Component {
|
11
|
-
render () {
|
12
|
-
return (
|
13
|
-
<Provider store={store}>
|
14
|
-
<ConnectedRouter history={history}>
|
15
|
-
<App>
|
16
|
-
<h1>Welcome to Gnarails</h1>
|
17
|
-
</App>
|
18
|
-
</ConnectedRouter>
|
19
|
-
</Provider>
|
20
|
-
)
|
21
|
-
}
|
22
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import Schlepp from 'schlepp';
|
2
|
-
|
3
|
-
import appConstants from 'app_constants';
|
4
|
-
import sessionMethods from 'api/sessions';
|
5
|
-
|
6
|
-
class Api extends Schlepp {
|
7
|
-
constructor(options) {
|
8
|
-
super(options);
|
9
|
-
|
10
|
-
this.sessions = sessionMethods(this);
|
11
|
-
}
|
12
|
-
}
|
13
|
-
|
14
|
-
export default new Api({
|
15
|
-
host: appConstants.API_HOST,
|
16
|
-
bearerTokenKeyInLocalStorage: `${appConstants.APP_NAME}:auth_token`,
|
17
|
-
});
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import React, { Component } from 'react';
|
2
|
-
import { withRouter } from 'react-router-dom';
|
3
|
-
|
4
|
-
class App extends Component {
|
5
|
-
render () {
|
6
|
-
const { children } = this.props;
|
7
|
-
return (
|
8
|
-
<div className="app">
|
9
|
-
{children}
|
10
|
-
</div>
|
11
|
-
);
|
12
|
-
}
|
13
|
-
};
|
14
|
-
|
15
|
-
export default withRouter(App);
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import expect from 'expect';
|
3
|
-
import { mount } from 'enzyme';
|
4
|
-
|
5
|
-
import App from 'components/App';
|
6
|
-
import connectWrapper from 'test/connect_wrapper';
|
7
|
-
|
8
|
-
describe('App - component', () => {
|
9
|
-
it('renders', () => {
|
10
|
-
const WrappedApp = connectWrapper(App);
|
11
|
-
const Component = mount(<WrappedApp />);
|
12
|
-
|
13
|
-
expect(Component.find('App').length).toEqual(1);
|
14
|
-
});
|
15
|
-
});
|