solid_cache 0.5.1 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1045c342c381976b1af701309a06bcfc3334afb1e7f2b83e39f1064718fefeb5
4
- data.tar.gz: 59a6672e613a99b4bcf3d9c4215bd1d80a1bb2bd1ffcda3a4c5a0ac00d51bade
3
+ metadata.gz: 0e16bebed50154ce9a1657114a5fe1316d8137e7f5a0136fdb8858ece68f5351
4
+ data.tar.gz: 6a66887e0dac5e4b52fae796c482fcc54ebcd1402f145217cf3530adc47d005a
5
5
  SHA512:
6
- metadata.gz: a55f8ce342e3b205ba5b37230328199adb194ec138eb78a27a6a1458c257377e9bf4d36db82bccaba7da3c345d92b25f2f3ae3d5f1da3296b4dbc75fdac69000
7
- data.tar.gz: 270d176c9271089141fe72e6464f5cfb09f6dd052636831a63cd862eb0fc694ad3c210d4dacc70becd34371c1710e27b0d316068964ee45729d1adc75a184ad3
6
+ metadata.gz: 527da66c8b66d68ae31eafe5d3b6474f5801649119ed96848ec83a6990f3b59c0a35a706b20a33ba2ab99beebe3195575388b8f44e64308c4060e20b6fd9892f
7
+ data.tar.gz: 0d41d9ad62843d0815db7468b9475088f6f95d3122a0eaada4d16e15020eee38a5a4642dd1570f8bde0ee347f7ea54a38c5b6810429b316ad888a3fb641dadf2
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "solid_cache"
4
+
3
5
  module ActiveSupport
4
6
  module Cache
5
7
  SolidCacheStore = SolidCache::Store
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class SolidCache::InstallGenerator < Rails::Generators::Base
4
+ source_root File.expand_path("templates", __dir__)
5
+
4
6
  class_option :skip_migrations, type: :boolean, default: nil,
5
7
  desc: "Skip migrations"
6
8
 
@@ -12,6 +14,10 @@ class SolidCache::InstallGenerator < Rails::Generators::Base
12
14
  end
13
15
  end
14
16
 
17
+ def create_config_solid_cache_yml
18
+ template "config/solid_cache.yml"
19
+ end
20
+
15
21
  def create_migrations
16
22
  unless options[:skip_migrations]
17
23
  rails_command "railties:install:migrations FROM=solid_cache", inline: true
@@ -0,0 +1,15 @@
1
+ default: &default
2
+ database: <%%= Rails.env %>
3
+ store_options:
4
+ max_age: <%%= 1.week.to_i %>
5
+ max_size: <%%= 256.megabytes %>
6
+ namespace: <%%= Rails.env %>
7
+
8
+ development:
9
+ <<: *default
10
+
11
+ test:
12
+ <<: *default
13
+
14
+ production:
15
+ <<: *default
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidCache
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donal McBreen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-28 00:00:00.000000000 Z
11
+ date: 2024-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -104,6 +104,7 @@ files:
104
104
  - lib/active_support/cache/solid_cache_store.rb
105
105
  - lib/generators/solid_cache/install/USAGE
106
106
  - lib/generators/solid_cache/install/install_generator.rb
107
+ - lib/generators/solid_cache/install/templates/config/solid_cache.yml.tt
107
108
  - lib/solid_cache.rb
108
109
  - lib/solid_cache/cluster.rb
109
110
  - lib/solid_cache/cluster/connections.rb