Skip to content

Commit ef33485

Browse files
committed
Initial commit
0 parents  commit ef33485

20 files changed

+8434
-0
lines changed

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
extends: 'eslint-config-gusto',
3+
rules: {
4+
// 'no-console': 'off',
5+
},
6+
env: {
7+
jest: true,
8+
node: true,
9+
},
10+
};

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# yarn
2+
yarn-debug.log*
3+
yarn-error.log*
4+
5+
# Dependency directories
6+
node_modules/
7+
8+
# Temporary test fixtures
9+
src/__tests__/fixtures/temp

.prettierrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
module.exports = require('eslint-config-gusto/.prettierrc');

.vscode/launch.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Jest All",
11+
"program": "${workspaceFolder}/node_modules/.bin/jest",
12+
"args": ["--runInBand"],
13+
"console": "integratedTerminal",
14+
"internalConsoleOptions": "neverOpen",
15+
"disableOptimisticBPs": true,
16+
"windows": {
17+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
18+
}
19+
}
20+
]
21+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"debug.node.autoAttach": "on"
3+
}

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const verifyConditions = require('./src/verifyConditions');
2+
const prepare = require('./src/prepare');
3+
const publish = require('./src/publish');
4+
5+
module.exports = { verifyConditions, prepare, publish };

jest.config.js

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
// For a detailed explanation regarding each configuration property, visit:
2+
// https://jestjs.io/docs/en/configuration.html
3+
4+
module.exports = {
5+
// All imported modules in your tests should be mocked automatically
6+
// automock: false,
7+
8+
// Stop running tests after `n` failures
9+
// bail: 0,
10+
11+
// The directory where Jest should store its cached dependency information
12+
// cacheDirectory: "/private/var/folders/kq/v6tqn9k50cgcdkphm6b4cp_c_zcv_y/T/jest_63dmce",
13+
14+
// Automatically clear mock calls and instances between every test
15+
// clearMocks: false,
16+
17+
// Indicates whether the coverage information should be collected while executing the test
18+
// collectCoverage: false,
19+
20+
// An array of glob patterns indicating a set of files for which coverage information should be collected
21+
// collectCoverageFrom: undefined,
22+
23+
// The directory where Jest should output its coverage files
24+
// coverageDirectory: undefined,
25+
26+
// An array of regexp pattern strings used to skip coverage collection
27+
// coveragePathIgnorePatterns: [
28+
// "/node_modules/"
29+
// ],
30+
31+
// Indicates which provider should be used to instrument code for coverage
32+
coverageProvider: 'v8',
33+
34+
// A list of reporter names that Jest uses when writing coverage reports
35+
// coverageReporters: [
36+
// "json",
37+
// "text",
38+
// "lcov",
39+
// "clover"
40+
// ],
41+
42+
// An object that configures minimum threshold enforcement for coverage results
43+
// coverageThreshold: undefined,
44+
45+
// A path to a custom dependency extractor
46+
// dependencyExtractor: undefined,
47+
48+
// Make calling deprecated APIs throw helpful error messages
49+
// errorOnDeprecated: false,
50+
51+
// Force coverage collection from ignored files using an array of glob patterns
52+
// forceCoverageMatch: [],
53+
54+
// A path to a module which exports an async function that is triggered once before all test suites
55+
// globalSetup: undefined,
56+
57+
// A path to a module which exports an async function that is triggered once after all test suites
58+
// globalTeardown: undefined,
59+
60+
// A set of global variables that need to be available in all test environments
61+
// globals: {},
62+
63+
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
64+
// maxWorkers: "50%",
65+
66+
// An array of directory names to be searched recursively up from the requiring module's location
67+
// moduleDirectories: [
68+
// "node_modules"
69+
// ],
70+
71+
// An array of file extensions your modules use
72+
// moduleFileExtensions: [
73+
// "js",
74+
// "json",
75+
// "jsx",
76+
// "ts",
77+
// "tsx",
78+
// "node"
79+
// ],
80+
81+
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
82+
// moduleNameMapper: {},
83+
84+
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
85+
// modulePathIgnorePatterns: [],
86+
87+
// Activates notifications for test results
88+
// notify: false,
89+
90+
// An enum that specifies notification mode. Requires { notify: true }
91+
// notifyMode: "failure-change",
92+
93+
// A preset that is used as a base for Jest's configuration
94+
// preset: undefined,
95+
96+
// Run tests from one or more projects
97+
// projects: undefined,
98+
99+
// Use this configuration option to add custom reporters to Jest
100+
// reporters: undefined,
101+
102+
// Automatically reset mock state between every test
103+
// resetMocks: false,
104+
105+
// Reset the module registry before running each individual test
106+
// resetModules: false,
107+
108+
// A path to a custom resolver
109+
// resolver: undefined,
110+
111+
// Automatically restore mock state between every test
112+
// restoreMocks: false,
113+
114+
// The root directory that Jest should scan for tests and modules within
115+
// rootDir: undefined,
116+
117+
// A list of paths to directories that Jest should use to search for files in
118+
// roots: [
119+
// "<rootDir>"
120+
// ],
121+
122+
// Allows you to use a custom runner instead of Jest's default test runner
123+
// runner: "jest-runner",
124+
125+
// The paths to modules that run some code to configure or set up the testing environment before each test
126+
// setupFiles: [],
127+
128+
// A list of paths to modules that run some code to configure or set up the testing framework before each test
129+
// setupFilesAfterEnv: [],
130+
131+
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
132+
// snapshotSerializers: [],
133+
134+
// The test environment that will be used for testing
135+
testEnvironment: 'node',
136+
137+
// Options that will be passed to the testEnvironment
138+
// testEnvironmentOptions: {},
139+
140+
// Adds a location field to test results
141+
// testLocationInResults: false,
142+
143+
// The glob patterns Jest uses to detect test files
144+
// testMatch: [
145+
// "**/__tests__/**/*.[jt]s?(x)",
146+
// "**/?(*.)+(spec|test).[tj]s?(x)"
147+
// ],
148+
149+
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
150+
// testPathIgnorePatterns: [
151+
// "/node_modules/"
152+
// ],
153+
154+
// The regexp pattern or array of patterns that Jest uses to detect test files
155+
// testRegex: [],
156+
157+
// This option allows the use of a custom results processor
158+
// testResultsProcessor: undefined,
159+
160+
// This option allows use of a custom test runner
161+
// testRunner: "jasmine2",
162+
163+
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
164+
// testURL: "http://localhost",
165+
166+
// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
167+
// timers: "real",
168+
169+
// A map from regular expressions to paths to transformers
170+
// transform: undefined,
171+
172+
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
173+
// transformIgnorePatterns: [
174+
// "/node_modules/"
175+
// ],
176+
177+
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
178+
// unmockedModulePathPatterns: undefined,
179+
180+
// Indicates whether each individual test should be reported during the run
181+
// verbose: undefined,
182+
183+
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
184+
// watchPathIgnorePatterns: [],
185+
186+
// Whether to use watchman for file crawling
187+
// watchman: true,
188+
};

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "semantic-release-rubygem",
3+
"version": "1.0.0",
4+
"description": "A semantic-release plugin for publishing Ruby gems",
5+
"main": "index.js",
6+
"author": "Rylan Collins <[email protected]>",
7+
"license": "MIT",
8+
"private": false,
9+
"scripts": {
10+
"lint": "eslint .",
11+
"test": "jest"
12+
},
13+
"devDependencies": {
14+
"eslint-config-gusto": "^11.0.0",
15+
"jest": "^26.1.0",
16+
"ncp": "^2.0.0",
17+
"rimraf": "^3.0.2",
18+
"semantic-release": "^17.0.8"
19+
},
20+
"dependencies": {
21+
"@semantic-release/error": "^2.2.0",
22+
"execa": "^4.0.2",
23+
"glob": "^7.1.6"
24+
}
25+
}

release.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
plugins: [
3+
// '@semantic-release/commit-analyzer',
4+
// '@semantic-release/release-notes-generator',
5+
// '@semantic-release/changelog',
6+
process.cwd(),
7+
// [
8+
// '@semantic-release/exec',
9+
// {
10+
// // TODO: Verify the presence of the GEM_HOST_API_KEY env var
11+
// // verifyConditionsCmd: './verify.sh',
12+
// // eslint-disable-next-line no-template-curly-in-string
13+
// prepareCmd: 'ruby bin/prepare.rb ${nextRelease.version}',
14+
// // eslint-disable-next-line no-template-curly-in-string
15+
// publishCmd: 'ruby bin/publish.rb ${nextRelease.version}',
16+
// },
17+
// ],
18+
// [
19+
// '@semantic-release/git',
20+
// {
21+
// // eslint-disable-next-line no-template-curly-in-string
22+
// message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
23+
// assets: ['CHANGELOG.md', '**/*.lock', 'lib/apollo-federation/version.rb'],
24+
// },
25+
// ],
26+
// '@semantic-release/github',
27+
],
28+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
# lib = File.expand_path('lib', __dir__)
4+
# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5+
6+
# require 'apollo-federation/version'
7+
8+
puts 'Hello, world!'

0 commit comments

Comments
 (0)