supercache 0.2 → 0.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
  SHA1:
3
- metadata.gz: 40f7c6b4073a57fe2a01c1f341a542f70991c90b
4
- data.tar.gz: bef0b523d04d534f4ddb581d40f984282e93a5df
3
+ metadata.gz: 676adc26a6426ea816528343b45cba5d138b5bb3
4
+ data.tar.gz: 9381838ba10f5f8bb545f3e7ee4d980da61a2816
5
5
  SHA512:
6
- metadata.gz: f580d3c3a77a7cfc0ee09cfe5e9cc20d9b8f631a4cb55aaa4407a943934a29200cd5fd99ef6654dc00f2f983ae313bf39e2aa4a3c8e92f6a0b29d75df0469652
7
- data.tar.gz: 28515ecb1c75581dd0141c2f9148586df203d187fc0292d51321ffdd57aa8ce792a6f66d5200a79d6a7b19995ec51db12c3e97c8089f11b4cbcd818d77303466
6
+ metadata.gz: a017596f8b2a7e41b991139ec2ee02a79be064d1966ab21ec749905d4a2ac3aafc0f3119d9e844fe0a66f4b430219d3ed188759d46068dfb89382628eae653f1
7
+ data.tar.gz: 11580cf679a08e649c51d2116692d52a0f1abfe88e6bc127046f352ad7b6a0c29802488494904dac9bba14be63e8d94445d5a899d06c886fbd25889f279fb1e6
data/README.md CHANGED
@@ -1,28 +1,20 @@
1
1
  # Supercache
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/supercache`. To experiment with that code, run `bin/console` for an interactive prompt.
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's Gemfile:
7
+ Add this line to your applications Gemfile:
10
8
 
11
9
  ```ruby
12
10
  gem 'supercache'
13
11
  ```
14
12
 
15
- And then execute:
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
- ## Usage
24
-
25
- TODO: Write usage instructions here
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/[USERNAME]/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.
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.clear #Deliberately Clear all the cache available
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
- <%= yield %>
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
- Supercache is currently <%= Rails.cache.read(:supercache)? 'ON' : 'OFF' %>
2
-
3
- <br>
4
-
5
- <%= link_to 'Toggle', flip_dashboard_index_path %>
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>
@@ -1,3 +1,3 @@
1
1
  module Supercache
2
- VERSION = "0.2"
2
+ VERSION = "0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supercache
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bragadeesh J