supercache 0.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 676adc26a6426ea816528343b45cba5d138b5bb3
|
4
|
+
data.tar.gz: 9381838ba10f5f8bb545f3e7ee4d980da61a2816
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a017596f8b2a7e41b991139ec2ee02a79be064d1966ab21ec749905d4a2ac3aafc0f3119d9e844fe0a66f4b430219d3ed188759d46068dfb89382628eae653f1
|
7
|
+
data.tar.gz: 11580cf679a08e649c51d2116692d52a0f1abfe88e6bc127046f352ad7b6a0c29802488494904dac9bba14be63e8d94445d5a899d06c886fbd25889f279fb1e6
|
data/README.md
CHANGED
@@ -1,28 +1,20 @@
|
|
1
1
|
# Supercache
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Supercache is a totally unobtrusive addon that runs along your Rails application rapidly improving your development time by caching ActiveRecord Queries across requests (unlike ActiveRecord QueryCache which happens only within a single request). This is especially helpful when your local database is located elsewhere and avoids costly DNS lookups for each and every query.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
Add this line to your application
|
7
|
+
Add this line to your application’s Gemfile:
|
10
8
|
|
11
9
|
```ruby
|
12
10
|
gem 'supercache'
|
13
11
|
```
|
14
12
|
|
15
|
-
And
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install supercache
|
13
|
+
And mount the dashboard in your `config/routes.rb`:
|
22
14
|
|
23
|
-
|
24
|
-
|
25
|
-
|
15
|
+
```ruby
|
16
|
+
mount Supercache::Engine, at: "supercache"
|
17
|
+
```
|
26
18
|
|
27
19
|
## Development
|
28
20
|
|
@@ -32,10 +24,18 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
24
|
|
33
25
|
## Contributing
|
34
26
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
27
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/bragboy/supercache. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
36
28
|
|
37
29
|
|
38
30
|
## License
|
39
31
|
|
40
32
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
33
|
|
34
|
+
## Scope for Contribution
|
35
|
+
|
36
|
+
1. RSpec Integration
|
37
|
+
2. Travis Integration
|
38
|
+
3. Code Climate Integration
|
39
|
+
4. Moving all assets from CDN to the Gem through Vendor
|
40
|
+
5. Add Caching Support for HTTP Requests
|
41
|
+
6. Add Exceptions to Caching
|
@@ -1,8 +1,10 @@
|
|
1
1
|
module Supercache
|
2
2
|
class DashboardController < ActionController::Base
|
3
|
+
layout 'supercache/application'
|
4
|
+
|
3
5
|
def flip
|
4
|
-
if cache.read(:supercache)
|
5
|
-
cache.
|
6
|
+
if cache.read(:supercache)
|
7
|
+
cache.delete(:supercache)
|
6
8
|
else
|
7
9
|
cache.write(:supercache, true)
|
8
10
|
end
|
@@ -1 +1,17 @@
|
|
1
|
-
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<head>
|
3
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/css/materialize.min.css">
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
<br><br><br><br><br>
|
7
|
+
<main>
|
8
|
+
<div class="container">
|
9
|
+
<center>
|
10
|
+
<%= yield %>
|
11
|
+
</center>
|
12
|
+
</div>
|
13
|
+
</main>
|
14
|
+
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
15
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/js/materialize.min.js"></script>
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -1,5 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
1
|
+
<div class="row">
|
2
|
+
<div class="col s12">
|
3
|
+
<p class="flow-text">
|
4
|
+
Supercache is
|
5
|
+
<% if Rails.cache.read(:supercache) %>
|
6
|
+
<span class='teal-text'> active </span>
|
7
|
+
<% else %>
|
8
|
+
<span class='red-text'> stopped </span>
|
9
|
+
<% end %>
|
10
|
+
</p>
|
11
|
+
<%= link_to 'Toggle', flip_dashboard_index_path, class: 'waves-effect waves-light btn brown' %>
|
12
|
+
</div>
|
13
|
+
</div>
|
data/lib/supercache/version.rb
CHANGED