Skip to content

Commit

Permalink
Merge pull request #363 from themarshallproject/develop
Browse files Browse the repository at this point in the history
v 0.3.4
  • Loading branch information
GabeIsman authored Jul 15, 2020
2 parents c28afa9 + 5a6f4b0 commit 5febc8c
Show file tree
Hide file tree
Showing 23 changed files with 332 additions and 107 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
# Includes ruby, node, and chrome/phantomjs
# TODO: Go back to the non-legacy version of this image, when our test
# infrastructure no longer depends on phantomjs
- image: circleci/ruby:2.4 # ...with this image as the primary container; this is where all `steps` will run
- image: circleci/ruby:2.5.7 # ...with this image as the primary container; this is where all `steps` will run
environment: # environment variables for primary container
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.5
2.5.7
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# CONTRIBUTING

Klaxon is open source software built in the newsroom of [The Marshall Project](https://www.themarshallproject.org/), a nonprofit investigative news organization covering the American criminal justice system. It was created by a team of three—Ivar Vong, Andy Rossback and Tom Meagher—and it is subject to the kind of shortcomings any young, small side project might encounter. It may break unexpectedly. It may miss a change in a website, or an email might not fire off correctly. Still, we’ve found it immensely useful in our daily reporting. We want other journalists to benefit from Klaxon and to help us improve it, but keep these caveats in mind and use it at your own risk.
Klaxon is open source software built in the newsroom of [The Marshall Project](https://www.themarshallproject.org/), a nonprofit investigative news organization covering the American criminal justice system. It was created by a team of three—Ivar Vong, Andy Rossback and Tom Meagher—and has been maintained by Gabe Isman in the years since then. It is subject to the kind of shortcomings any young, small side project might encounter. It may break unexpectedly. It may miss a change in a website, or an email might not fire off correctly. Still, we’ve found it immensely useful in our daily reporting. We want other journalists to benefit from Klaxon and to help us improve it, but keep these caveats in mind and use it at your own risk.

Our team will keep hacking on Klaxon in spare moments, and we plan to keep it humming for our own use. But we think this project has the potential to help just about any newsroom. For it to succeed and to evolve, it will depend on the contributions from other journalist-developers. We are excited about the prospect of building a community around this project to help maintain it. So when you spot the inevitable bug, please let us know. And if you’d like to help us make this better, or add new functionality to it, we’d love to have your help.

Expand All @@ -21,10 +21,10 @@ We’re especially excited about other journalist-developers contributing code t

If you want to contribute, start by reviewing this advice, inspired by this post on [the Codacy blog](http://blog.codacy.com/2015/12/17/open-source-development-a-few-guidelines/) and [Shauna Gordon-McKeon’s PyCon 2015 talk](https://shaunagm.github.io/personal/pycon2015.html). Before you do anything, read the documentation in our Github repo, particularly this CONTRIBUTING.md file and our [Code of Conduct](CODE_OF_CONDUCT.md). Once you’ve done that, you’re ready to engage with the community, by commenting on issues and participating in the process.

Look for [issues](https://github.com/themarshallproject/klaxon/issues) in Klaxon’s Github repo tagged "help wanted" or “first-timer-friendly”. After you announce you’re working on an issue with a comment, fork the project. Create a new branch for your feature, write a patch and send a pull request to us on Github.
Look for [issues](https://github.com/themarshallproject/klaxon/issues) in Klaxon’s Github repo tagged "help wanted" or “first-timer-friendly”. After you announce you’re working on an issue with a comment, fork the project. If you need help getting Klaxon running on a local development server, [follow these directions](DEVELOPING.md). Create a new branch for your feature, write a patch and send a pull request to us on Github.

You can expect that we'll acknowledge your patch and respond with questions or comments, and we’ll expect that you’ll remain engaged with the issue, responding to our questions in a timely manner and iterating on the code until the patch is merged or otherwise closed.

### Discuss

One of the things we’re most excited about as we release Klaxon is seeing how other newsrooms put it to use. We’ll be eager to hear from you about your experiences with the tool. There are several ways we can discuss this together. You can email us directly at [[email protected]](mailto:[email protected]). We also have a [Google Group email list](https://groups.google.com/forum/#!forum/news-klaxon-users) where Klaxon users and developers working on the project can talk. Users can ask questions of one another, and contributors can discuss changes to the code and adding new functionality. Finally, you can always open or comment on an item in our [Github repo’s issue tracker](https://github.com/themarshallproject/klaxon/issues).
One of the things we’re most excited about as we release Klaxon is seeing how other newsrooms put it to use. We’ll be eager to hear from you about your experiences with the tool. There are several ways we can discuss this together. You can email us directly at [[email protected]](mailto:[email protected]). We also have a [Google Group email list](https://groups.google.com/forum/#!forum/news-klaxon-users) where Klaxon users and developers working on the project can talk. Users can ask questions of one another, and contributors can discuss changes to the code and adding new functionality. Finally, you can always open or comment on an item in our [Github repo’s issue tracker](https://github.com/themarshallproject/klaxon/issues).
60 changes: 60 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Developing Klaxon Locally #

If you're interested in [helping improve Klaxon by contributing code](CONTRIBUTING.md), this is a quick guide to how to get it running on your local machine for development.

First, we'll assume you already have git on your local machine, as well as a standard postgres installation (if you need a [quick way to get Postgres up and running, try this](https://postgresapp.com/)). So go to your terminal, navigate to whatever directory where you keep your projects and clone the Klaxon repo.

```
git clone [email protected]:themarshallproject/klaxon.git
```

After you've cloned it, `cd` into the Klaxon directory. If you're on a Mac, you'll need to already have [homebrew](https://brew.sh/) and [rbenv](https://github.com/rbenv/rbenv) (a program that manages versions of Ruby) installed. Then you'll want

These next commands will put the proper (albeit aged) version of Ruby that Klaxon requires on your machine and make it available in this repo's directory.

```
brew update && brew upgrade ruby-build
rbenv install
```

Next, you'll need to have the proper versions of all of Klaxon's dependency libraries, as well as foreman, a process manager that allows you to run a local server for development. Run these commands here.

```
gem install bundler
bundle install
gem install foreman
```

In order to be allowed to login to Klaxon once it's running on your machine, it'll need to know that your email address is. Create a file named `.env` and paste in these two items:

```
ADMIN_EMAILS="[email protected]"
HOST='localhost:5000'
```

Feel free to substitute in your email address. In development, Klaxon doesn't actually send emails locally, so a real address is not required.

Now that's set, you'll run a couple of commands for Rails to create Klaxon's database on your machine.

```
rake db:create
rake db:migrate
```

Now, you should be about ready to get started. This command in the top folder of the Klaxon repo will get your dev server rolling.

```
foreman start
```

Now, you should be able to go to [localhost:5000](http://localhost:5000/) in your web browser and see Klaxon's welcome screen pop up. You'll want to manually add a webpage or two to watch at [watching/pages/new](http://localhost:5000/watching/pages/new). For development purposes, you'll probably want to pick a site that updates pretty regularly. We use [http://www.timeanddate.com/](http://www.timeanddate.com/).

To get Klaxon to check for updates on the pages you're watching, in another terminal window, run this rake command.

```
rake check:all
```

Now, when you go to the main Klaxon page, you should start to see changes in the Feed of the latest updates.

Go forth and add some features, and be sure to send us your [pull requests](/pulls) for features you think other Klaxon users might find handy.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.4.5
FROM ruby:2.5.7

# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
Expand Down
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
ruby '2.4.5'
ruby '2.5.7'

gem 'rails', '~> 5.2.2'
gem 'rails', '~> 5.2.4'
gem 'pg', '~> 0.21'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
Expand All @@ -16,10 +16,10 @@ gem 'sdoc', '~> 1.0.0', group: :doc

gem 'rack-cache'
gem 'bcrypt', '~> 3.1.12'
gem 'puma', '~> 3.12'
gem 'puma', '~> 4.3'
gem 'rails_12factor'

gem 'simple_form', '~> 4.1'
gem 'simple_form', '~> 5.0'

gem 'jwt'
gem 'premailer-rails'
Expand All @@ -28,13 +28,13 @@ gem 'httparty'
gem 'diffy'
gem 'kramdown'

gem 'aws-sdk-sqs', '~> 1.12'
gem 'aws-sdk-sqs', '~> 1.30'

group :development, :test do
gem 'byebug'
gem 'rspec-rails', '~> 3.8'
gem 'guard-rspec', require: false
gem 'factory_bot_rails', '~> 5.0'
gem 'factory_bot_rails', '~> 6.1'
gem 'database_cleaner'
gem 'sinatra'
end
Expand Down
Loading

0 comments on commit 5febc8c

Please sign in to comment.