active_orm 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/Rakefile +3 -1
- data/lib/active_orm/version.rb +1 -1
- data/lib/tasks/redis.rake +27 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61a1841c3376b651ff527c0907bb00d6ac74c74e
|
4
|
+
data.tar.gz: 7b1ae76647410041ff6b62aaade16e9ba15c925f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a77fd77eef239ab02efc8d5f92756248d3b681bd87374c896933027a69a87819413f603181a4d33b48b40e8490f3e7b18180cd13f51cb24f65924a490fd44e91
|
7
|
+
data.tar.gz: 300fe78254e083637db4c7482bf8d3245ebe705eaf80abdf09e936e52dc618c778690fec2ce9212f2774aad2fcd70b3c202538a672244c76055863359c7dc42a
|
data/README.md
CHANGED
@@ -73,6 +73,14 @@ ActiveOrm::Redis::List.find(:user_1) #=> { id: "32123", name: "James Dean", user
|
|
73
73
|
ActiveOrm::Redis::List.evaluate.find(:user_1) #=> { id: 32123, name: "James Dean", username: "alpha123" }
|
74
74
|
```
|
75
75
|
|
76
|
+
**Rake:**
|
77
|
+
|
78
|
+
**Options:**
|
79
|
+
* reset: reset current database
|
80
|
+
* reset_all: reset all databases
|
81
|
+
|
82
|
+
`rake redis:reset` and `rake redis:reset_all`
|
83
|
+
|
76
84
|
## Contributing
|
77
85
|
|
78
86
|
1. Fork it ( https://github.com/[my-github-username]/active_orm/fork )
|
data/Rakefile
CHANGED
data/lib/active_orm/version.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
namespace :redis do
|
2
|
+
|
3
|
+
desc "Reset active Redis databases"
|
4
|
+
task reset: :environment do
|
5
|
+
puts "== Reset: reseting active ".ljust(80, "=")
|
6
|
+
total_task_start_time = Time.current
|
7
|
+
|
8
|
+
ActiveOrm::Redis::Connection.flush
|
9
|
+
|
10
|
+
total_task_elapsed_time = (Time.current - total_task_start_time).round(5)
|
11
|
+
puts "== Reset: reset active (#{total_task_elapsed_time}s) ".ljust(80, "=")
|
12
|
+
puts ""
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "Reset all Redis databases"
|
16
|
+
task reset_all: :environment do
|
17
|
+
puts "== Reset: reseting all ".ljust(80, "=")
|
18
|
+
total_task_start_time = Time.current
|
19
|
+
|
20
|
+
ActiveOrm::Redis::Connection.flush_all
|
21
|
+
|
22
|
+
total_task_elapsed_time = (Time.current - total_task_start_time).round(5)
|
23
|
+
puts "== Reset: reset all (#{total_task_elapsed_time}s) ".ljust(80, "=")
|
24
|
+
puts ""
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_orm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/active_orm/redis/string.rb
|
104
104
|
- lib/active_orm/redis/transaction.rb
|
105
105
|
- lib/active_orm/version.rb
|
106
|
+
- lib/tasks/redis.rake
|
106
107
|
homepage: https://github.com/drexed/active_orm
|
107
108
|
licenses:
|
108
109
|
- MIT
|