make_it_so 0.4.3 → 0.4.5

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: 93d4348c1dde9b0175763af2254ae6e76d8f487a
4
- data.tar.gz: 8a12cede997f834e9a199b8759a195f832f1dba6
3
+ metadata.gz: 9ac6f0d77fb6e01dd7624748326a46c41d6783e2
4
+ data.tar.gz: c09977db2febc42710977548d5e7bb938fe7be3c
5
5
  SHA512:
6
- metadata.gz: 78e8c1b2e1bdef76cb8d7c5d4c605aa15a954ad22cf51400659f05fdb9f3315030d2ebcf626319f1955e131df63eb197a0d0e4df338429f015db38025b62455d
7
- data.tar.gz: 18c64e74daa2e20da95b9f9ba33a3248c82b579e9e32c62dd5d74a0e435059ae17f2bdb3e52493f6232fd6d4361eea751f3bb67b05115bb3a8386764cf7e851e
6
+ metadata.gz: 6fadff30e6ccc16cbfe781dd9973a0f02b889581a60f3dd8e5369c634122177bdb4bb0ab91c55d943372be1e5f7fd2e77ad11613b9ff8bce290e293aba492209
7
+ data.tar.gz: e97860de45eb65ece6811879340cd38b770cdc8843bb569cf82366ec624f444d375c3056d65a84e3c0fcf4ca6c5c8b8327c740f8c570c958ae0bf43a3b64643d
@@ -42,6 +42,11 @@ module MakeItSo
42
42
  default: true,
43
43
  desc: 'Skip spring gem'
44
44
 
45
+ class_option :skip_active_storage,
46
+ type: :boolean,
47
+ default: true,
48
+ desc: "Skip Active Storage"
49
+
45
50
  class_option :react,
46
51
  type: :boolean,
47
52
  default: true,
@@ -1,3 +1,3 @@
1
1
  module MakeItSo
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.5"
3
3
  end
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "devDependencies": {
3
+ "babel-plugin-transform-runtime": "^6.23.0",
3
4
  "enzyme": "~2.9.1",
4
- "jasmine-ajax": "3.2.0",
5
+ "fetch-mock": "5",
6
+ "fetch-ponyfill": "^6.0.2",
5
7
  "jasmine-core": "~2.4.1",
6
8
  "jasmine-enzyme": "~3.4.0",
7
9
  "karma": "~0.13.22",
@@ -43,6 +43,10 @@ feature 'user generates rails app' do
43
43
  expect(File.read(app_layout)).to include('viewport')
44
44
  end
45
45
 
46
+ scenario 'skips active_storage' do
47
+ expect(FileTest.exists?(join_paths(app_path, 'config/storage.yml'))).to eq(false)
48
+ end
49
+
46
50
  scenario 'creates a valid gemfile' do
47
51
  words = ['source', '#', 'gem', 'group', 'end', 'ruby']
48
52
 
@@ -242,6 +246,13 @@ feature 'user generates rails app' do
242
246
  end
243
247
  end
244
248
 
249
+ it 'includes fetch-mock' do
250
+ in_package_json?(File.join(app_path, 'package.json')) do |json|
251
+ expect(json["devDependencies"]["fetch-mock"]).to_not be_nil
252
+ end
253
+
254
+ end
255
+
245
256
  it 'adds coverage/* to gitignore' do
246
257
  expect(File.read(File.join(app_path, '.gitignore'))).to include("coverage/*\n")
247
258
  end
@@ -2,7 +2,7 @@
2
2
  import React from 'react'
3
3
  import { render } from 'react-dom'
4
4
 
5
- import App from '../react/components/app'
5
+ import App from '../react/components/App'
6
6
  import RedBox from 'redbox-react'
7
7
 
8
8
  document.addEventListener('DOMContentLoaded', () => {
@@ -36,7 +36,6 @@ module.exports = function(config) {
36
36
  // use babel-loader to transpile the test and src folders
37
37
  {
38
38
  test: /\.jsx?$/,
39
- exclude: /node_modules/,
40
39
  loader: 'babel-loader'
41
40
  },
42
41
  {
@@ -1,13 +1,18 @@
1
1
  import { shallow, mount } from 'enzyme';
2
2
  import jasmineEnzyme from 'jasmine-enzyme';
3
3
  import React from 'react';
4
- import 'jasmine-ajax';
4
+ import fetchPonyfill from 'fetch-ponyfill';
5
+ const {fetch, Request, Response, Headers} = fetchPonyfill({});
5
6
 
6
7
  Object.assign(global, {
7
8
  jasmineEnzyme,
8
9
  mount,
9
10
  React,
10
11
  shallow,
12
+ fetch,
13
+ Request,
14
+ Response,
15
+ Headers
11
16
  });
12
17
 
13
18
  beforeEach(() => {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: make_it_so
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Pickett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-05 00:00:00.000000000 Z
11
+ date: 2019-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -191,7 +191,7 @@ files:
191
191
  - templates/rails/app/controllers/application_controller.rb
192
192
  - templates/rails/app/controllers/homes_controller.rb
193
193
  - templates/rails/app/javascript/packs/new_application.js
194
- - templates/rails/app/javascript/react/components/app.js
194
+ - templates/rails/app/javascript/react/components/App.js
195
195
  - templates/rails/app/models/application_record.rb
196
196
  - templates/rails/app/views/homes/index.html.erb
197
197
  - templates/rails/app/views/layouts/application.html.erb.tt