Skip to content

Commit

Permalink
Merge pull request #1 from joaoGabriel55/fix/update-config-ru
Browse files Browse the repository at this point in the history
Fix/update config.ru
  • Loading branch information
joaoGabriel55 authored Aug 18, 2024
2 parents 5994693 + 04c6ad2 commit d5eb92d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# rspec failure tracking
.rspec_status

sinatra-scaffold-0.1.0.gem
*.gem
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
## [0.1.0] - 2024-08-16

- Initial release

## [0.1.1] - 2024-08-18

- Update `config.ru` file
- Added `rackup` gem
- Added `rerun` gem to enable auto restart of server after code changes
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
sinatra-scaffold (0.1.0)
sinatra-scaffold (0.1.1)
thor (~> 1.3)

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bundle install
Build and install gem locally

```sh
gem build sinatra-scaffold.gemspec && gem install ./sinatra-scaffold-0.1.0.gem
gem build sinatra-scaffold.gemspec && gem install ./sinatra-scaffold-[version].gem
```

Run lint
Expand Down
14 changes: 12 additions & 2 deletions lib/sinatra_scaffold/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def create_directory_structure(app_name)

def create_main_files(app_name)
File.write("#{app_name}/config.ru", <<~RUBY)
require "./app"
require "./server"
run Sinatra::Application
RUBY
Expand Down Expand Up @@ -131,6 +131,7 @@ def app
gem "sinatra"
gem "dotenv"
gem "rake"
gem "rackup"
group :test do
gem "rack-test"
Expand All @@ -140,6 +141,7 @@ def app
group :development, :test do
gem "pry"
gem "standard"
gem "rerun"
end
RUBY

Expand All @@ -159,10 +161,18 @@ def app
My Sinatra application
## Running
Run:
Using ruby:
```sh
ruby server.rb
```
Running watching changes:
```sh
rerun ruby server.rb
```
Running with rackup:
```sh
bundle exec rackup config.ru -p 3000
```
## Testing
Run:
Expand Down
2 changes: 1 addition & 1 deletion lib/sinatra_scaffold/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module SinatraScaffold
VERSION = "0.1.0"
VERSION = "0.1.1"
end
2 changes: 1 addition & 1 deletion sinatra-scaffold.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
# Uncomment to register a new dependency of your gem
spec.add_development_dependency "standard", "~> 1.3"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 1.3"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_dependency "thor", "~> 1.3"

# For more information and examples about making a new gem, check out our
Expand Down

0 comments on commit d5eb92d

Please sign in to comment.