Skip to content

Commit 678b3a0

Browse files
authored
Merge pull request #3 from rofreg/rofreg/update-development-instructions
Updated development instructions to make it easier to play with the gem locally - thanks @rofreg !
2 parents 9c1f5ac + fd4c45f commit 678b3a0

5 files changed

Lines changed: 7 additions & 3 deletions

File tree

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BEARER_TOKEN=<your-bearer-token>

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
/spec/reports/
88
/tmp/
99
.env
10+
!.env.example

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ Coming soon.
5959

6060
## Development
6161

62-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
62+
After checking out the repo, run `bin/setup` to install dependencies.
63+
64+
To run tests, first copy `.env.example` to `.env`, and modify it to include a valid Bearer token for the Twitter v2 API. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
6365

6466
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
6567

spec/client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require './spec_helper'
1+
require_relative './spec_helper'
22

33
describe Tweetkit do
44
it 'initializes a new client' do

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
22
require 'dotenv'
33

4-
BASE_ENV_FILE_PATH = '../.env'
4+
BASE_ENV_FILE_PATH = '.env'
55

66
def traverse_for_env_file(env_file_path, stack_level)
77
if stack_level > 5

0 commit comments

Comments
 (0)