Skip to content

Commit 38e7c90

Browse files
authored
Update dummy app to current Rails conventions (#110)
* Update test app * Remove testing branch * Update changelog
1 parent 16d178d commit 38e7c90

File tree

30 files changed

+204
-164
lines changed

30 files changed

+204
-164
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### Next Release
22

33
* Your contribution here.
4+
* [#110](https://github.com/ruby-grape/grape-swagger-rails/pull/110): Update dummy app to current rails conventions - [@duffn](https://github.com/duffn).
45

56
### 0.4.0 (2023/03/28)
67

Gemfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,18 @@ end
1212

1313
group :development, :test do
1414
gem 'capybara'
15-
gem 'coffee-rails'
1615
gem 'grape-swagger-ui'
1716
gem 'jquery-rails'
1817
gem 'mime-types'
1918
gem 'nokogiri'
2019
gem 'rack', '< 3.0'
2120
gem 'rack-cors'
22-
gem 'rack-no_animations'
2321
gem 'rake'
2422
gem 'rspec-rails'
25-
gem 'rubocop', '0.77.0'
23+
gem 'rubocop'
2624
gem 'ruby-grape-danger', '~> 0.2.0', require: false
27-
gem 'sass'
28-
gem 'sass-rails'
2925
gem 'selenium-webdriver'
30-
gem 'sprockets'
26+
gem 'sprockets-rails', require: 'sprockets/railtie'
3127
gem 'uglifier'
3228
gem 'webrick'
3329
end

Rakefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
#!/usr/bin/env rake
2-
begin
3-
require 'bundler/setup'
4-
rescue LoadError
5-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6-
end
7-
8-
APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
1+
require 'bundler/setup'
92

3+
APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
104
load 'rails/tasks/engine.rake'
11-
Bundler::GemHelper.install_tasks
125

136
Dir[File.join(File.dirname(__FILE__), 'lib/tasks/**/*.rake')].each do |f|
147
load f
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//= link_directory ../stylesheets/grape_swagger_rails .css
2+
//= link_directory ../javascripts/grape_swagger_rails .js

spec/dummy/Rakefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#!/usr/bin/env rake
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
23

3-
require File.expand_path('../config/application', __FILE__)
4+
require_relative 'config/application'
45

5-
Dummy::Application.load_tasks
6+
Rails.application.load_tasks
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//= link application.js
2-
//= link application.css
3-
//= link grape_swagger_rails/application.css
4-
//= link grape_swagger_rails/application.js
1+
//= link_directory ../stylesheets .css
2+
//= link_directory ../javascripts .js
3+
//= link grape_swagger_rails_manifest.js
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
//= require jquery
2-
//= require jquery_ujs
31
//= require_tree .

spec/dummy/app/views/layouts/application.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<%= stylesheet_link_tag 'application', media: 'all' %>
66
<%= javascript_include_tag 'application' %>
77
<%= csrf_meta_tags %>
8+
<%= csp_meta_tag %>
89
</head>
910
<body>
1011

spec/dummy/bin/bundle

Lines changed: 0 additions & 3 deletions
This file was deleted.

spec/dummy/bin/rails

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
#!/usr/bin/env ruby
2-
begin
3-
load File.expand_path('../spring', __FILE__)
4-
rescue LoadError
5-
end
6-
APP_PATH = File.expand_path('../../config/application', __FILE__)
2+
APP_PATH = File.expand_path('../config/application', __dir__)
73
require_relative '../config/boot'
84
require 'rails/commands'

0 commit comments

Comments
 (0)