Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove donations requests #72

Merged
merged 6 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM ruby:2.6.3-buster
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A pretty standard Dockerfile for a Ruby development container. VS Code will mount the source into the container and expose the ports.


# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# The ruby image comes with a base non-root 'ruby' user which this Dockerfile
# gives sudo access. Hoewver, for Linux, this user's GID/UID must match your local
# user UID/GID to avoid permission issues with bind mounts. Update USER_UID / USER_GID
# if yours is not 1000. See https://aka.ms/vscode-remote/containers/non-root-user.
ARG USERNAME=ruby
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
#
# Verify git and needed tools are installed
&& apt-get install -y git procps \
&& apt-get update \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
# [Optional] Add sudo support for non-root users
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=

ENV HOME /home/$USERNAME
16 changes: 16 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for VS Code only. Tells VS Code to open the project in a Docker container and configures it. Ignored otherwise. See the readme.

"name": "NUnit.org",
"dockerFile": "Dockerfile",
"appPort": 4000,
"extensions": [
"rebornix.Ruby",
"castwide.solargraph"
],
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"postCreateCommand": "bundle install",
// Comment out the next line to run as root instead. Linux users, update
// Dockerfile with your user's UID/GID if not 1000.
"runArgs": [ "-u", "ruby" ]
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
end_of_line = lf
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency for editing in a Linux environment.

*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
_site
.sass-cache
.jekyll-metadata

Thumbs.db
.DS_Store

!.gitkeep

.rbenv-version
.rvmrc
.bundle
Gemfile.lock
jekyll
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
source "https://rubygems.org"

gem 'jekyll'
gem 'github-pages'
gem 'jekyll', '>= 3.8.5'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the security issues.

gem 'github-pages', '~> 198'
gem 'yajl-ruby', '>= 1.3.1'
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
gem 'wdm', '>= 0.1.1' if Gem.win_platform?
gem 'solargraph'
225 changes: 0 additions & 225 deletions Gemfile.lock

This file was deleted.

54 changes: 50 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,58 @@
# NUnit.org website

## Installing Jekyll
To get started developing the website, you have two options. You can develop in a Docker Container using VS Code, or you can install Ruby locally and develop locally.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot more words, but a very nice development experience. I ❤️ Docker.


## Installing Docker and VS Code

Do this if you want to develop in a Docker container using VS Code.

1. Install and configure [Docker](https://www.docker.com/get-started) for your operating system.

**Windows / macOS**:

1. Install [Docker Desktop for Windows/Mac](https://www.docker.com/products/docker-desktop).
2. Right-click on the Docker taskbar item and update **Settings / Preferences > Shared Drives / File Sharing** with the drive the web app source code is located in. If you run into trouble, see [Docker Desktop for Windows tips](/docs/remote/troubleshooting.md#docker-desktop-for-windows-tips) on avoiding common problems with sharing.

**Linux**:

1. Follow the [official install instructions for Docker CE/EE for your distribution](https://docs.docker.com/install/#supported-platforms).
2. Add your user to the `docker` group by using a terminal to run: `sudo usermod -aG docker $USER`
3. Sign out and back in again so your changes take effect.

2. Install [Visual Studio Code](https://code.visualstudio.com/).
3. Install the [Remote Development extension pack](https://aka.ms/vscode-remote/download/extension).

### Quick Start for Docker with VSCode

1. Start VS Code and click on the quick actions Status Bar item in the lower left corner of the window.

![Quick actions status bar item](https://code.visualstudio.com/assets/docs/remote/common/remote-dev-status-bar.png)

2. Select **Remote-Containers: Open Folder in Container...** from the command list that appears, and open the root folder of the project you just cloned.

3. The window will then reload, but since the container does not exist yet, VS Code will create one. This may take some time, and a progress notification will provide status updates. Fortunately, this step isn't necessary the next time you open the folder since the container will already exist.

![Dev Container Progress Notification](https://code.visualstudio.com/assets/docs/remote/containers/dev-container-progress.png)

4. After the container is built, VS Code automatically connects to it and maps the project folder from your local file system into the container.

5. Open the terminal in VS Code to a bash prompt within the container by clicking on **Terminal > New Terminal**

6. In the terminal, type `bundle exec jekyll serve` to build and run the web site. (See below)

7. Open the web site at [http://localhost:4000](http://localhost:4000).

8. Begin developing in Visual Studio Code.

## Installing Ruby and Jekyll locally

1. Install Ruby 2.2 ([Linux](https://www.ruby-lang.org/en/documentation/installation/), [Mac](https://gorails.com/setup/osx/10.10-yosemite), [Windows](http://rubyinstaller.org/))
2. If you are on Windows, install [DevKit](http://rubyinstaller.org/add-ons/devkit/)
3. `gem install bundler`
4. `bundle install`

## Building the project

## Initializing the project
GitHub will do this automatically when you push, but this allows you to view the site locally before you commit.

1. `bundle install`
2. `jekyll serve`
1. `jekyll serve`
Loading