File tree Expand file tree Collapse file tree 11 files changed +16
-40
lines changed Expand file tree Collapse file tree 11 files changed +16
-40
lines changed Original file line number Diff line number Diff line change 23
23
- ruby : " 3.2"
24
24
- ruby : " 3.3"
25
25
# ## TEST RAILS VERSIONS
26
- - ruby : " 2.7"
27
- rails_version : " ~> 6.0.0"
28
26
- ruby : " 2.7"
29
27
rails_version : " ~> 6.1.0"
30
28
- ruby : " 3.3"
Original file line number Diff line number Diff line change 2
2
3
3
### Unreleased
4
4
- [ View Diff] ( https://github.com/westonganger/pairer/compare/v1.1.0...master )
5
- - Nothing yet
5
+ - [ # 17 ] ( https://github.com/westonganger/pairer/pull/17 ) - Remove dependency on Sprockets. Now compatible with both Propshaft and Sprockets.
6
6
7
7
### v1.1.0 - July 23, 2024
8
8
- [ View Diff] ( https://github.com/westonganger/pairer/compare/v1.0.0...v1.1.0 )
Original file line number Diff line number Diff line change @@ -18,7 +18,15 @@ def get_env(name)
18
18
( ENV [ name ] && !ENV [ name ] . empty? ) ? ENV [ name ] : nil
19
19
end
20
20
21
- gem "rails" , get_env ( "RAILS_VERSION" )
21
+ rails_version = get_env ( "RAILS_VERSION" )
22
+
23
+ gem "rails" , rails_version
24
+
25
+ if rails_version . nil? || rails_version . to_f >= 8.0
26
+ gem "propshaft"
27
+ else
28
+ gem 'sprockets-rails' , require : 'sprockets/railtie'
29
+ end
22
30
23
31
db_gem = get_env ( "DB_GEM" ) || "sqlite3"
24
32
gem db_gem , get_env ( "DB_GEM_VERSION" )
Original file line number Diff line number Diff line change 1
- //= require rails-ujs
2
-
3
1
window . init = function ( ) {
4
2
$ ( 'form' ) . attr ( 'autocomplete' , 'off' ) ;
5
3
Original file line number Diff line number Diff line change 1
- /*
2
- *= require ./utility
3
- *= require_self
4
- */
5
-
6
1
: root {
7
2
--navbar-height : 3.5em ;
8
3
}
Original file line number Diff line number Diff line change 13
13
14
14
link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/united/bootstrap.min.css" integrity =" sha512-JsK+6bBl5wmtKe9PnCXclLS1fwG7GvLZ9IkBg/ACzuSJJUKTedxyXRFujJf+KpcNFFhSX+I05YPAm99r1ivmog==" crossorigin =" anonymous" referrerpolicy =" no-referrer"
15
15
16
+ = stylesheet_link_tag ' pairer/utility'
16
17
= stylesheet_link_tag ' pairer/application' , media: ' all'
17
18
18
19
script src =" https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" referrerpolicy =" no-referrer"
28
29
29
30
script src =" https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity =" sha512-oBTprMeNEKCnqfuqKd6sbvFzmFQtlXS3e0C/RGFV0hD6QzhHV+ODfaQbAlmY6/q0ubbwlAM/nCJjkrgA3waLzg==" crossorigin =" anonymous" referrerpolicy =" no-referrer"
30
31
32
+ = javascript_include_tag ' rails-ujs'
31
33
= javascript_include_tag ' pairer/application'
32
34
33
35
body
Original file line number Diff line number Diff line change 1
1
require 'slim'
2
- require "sprockets/railtie"
3
2
require 'hashids'
4
3
5
4
module Pairer
6
5
class Engine < ::Rails ::Engine
7
6
isolate_namespace Pairer
8
7
9
8
initializer "pairer.assets.precompile" do |app |
9
+ # this initializer is only called when sprockets is in use
10
+
10
11
app . config . assets . precompile << "pairer_manifest.js" ### manifest file required
11
12
app . config . assets . precompile << "pairer/favicon.ico"
13
+ app . config . assets . precompile << "rails-ujs" # provided by activesupport
12
14
13
15
### Automatically precompile assets in specified folders
14
16
[ "app/assets/images/" ] . each do |folder |
Original file line number Diff line number Diff line change @@ -18,11 +18,10 @@ Gem::Specification.new do |spec|
18
18
19
19
spec . required_ruby_version = ">= 2.7"
20
20
21
- spec . add_dependency "rails" , ">= 6.0 "
21
+ spec . add_dependency "rails" , ">= 6.1 "
22
22
spec . add_dependency "actioncable"
23
23
spec . add_dependency "slim"
24
24
spec . add_dependency "hashids"
25
- spec . add_dependency "sprockets-rails"
26
25
27
26
spec . add_development_dependency "sqlite3"
28
27
spec . add_development_dependency "rspec-rails"
Original file line number Diff line number Diff line change 45
45
# Highlight code that triggered database queries in logs.
46
46
config . active_record . verbose_query_logs = true
47
47
48
- # Debug mode disables concatenation and preprocessing of assets.
49
- # This option may cause significant delays in view rendering with a large
50
- # number of complex assets.
51
- config . assets . debug = true
52
-
53
- # Suppress logger output for asset requests.
54
- config . assets . quiet = true
55
-
56
48
# Raises error for missing translations.
57
49
# config.action_view.raise_on_missing_translations = true
58
50
Original file line number Diff line number Diff line change 22
22
# Apache or NGINX already handles this.
23
23
config . public_file_server . enabled = ENV [ 'RAILS_SERVE_STATIC_FILES' ] . present?
24
24
25
- # Compress CSS using a preprocessor.
26
- # config.assets.css_compressor = :sass
27
-
28
- # Do not fallback to assets pipeline if a precompiled asset is missed.
29
- config . assets . compile = false
30
-
31
25
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
32
26
# config.action_controller.asset_host = 'http://assets.example.com'
33
27
You can’t perform that action at this time.
0 commit comments