active_redis_db 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :db do
4
+ namespace :redis do
5
+
6
+ desc 'Reset Redis database'
7
+ task reset: :environment do
8
+ puts '== Reset: reseting Redis '.ljust(80, '=')
9
+ total_task_start_time = Time.current
10
+
11
+ puts ' -> Resetting'
12
+ ActiveRedisDB::Connection.flush
13
+
14
+ total_task_elapsed_time = (Time.current - total_task_start_time).round(5)
15
+ puts "== Reset: reset Redis (#{total_task_elapsed_time}s) ".ljust(80, '=')
16
+ puts ''
17
+ end
18
+
19
+ desc 'Reset all Redis databases'
20
+ task reset_all: :environment do
21
+ puts '== Reset: reseting all Redis '.ljust(80, '=')
22
+ total_task_start_time = Time.current
23
+
24
+ puts ' -> Resetting'
25
+ ActiveRedisDB::Connection.flush_all
26
+
27
+ total_task_elapsed_time = (Time.current - total_task_start_time).round(5)
28
+ puts "== Reset: reset all Redis (#{total_task_elapsed_time}s) ".ljust(80, '=')
29
+ puts ''
30
+ end
31
+
32
+ end
33
+ end
metadata ADDED
@@ -0,0 +1,222 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: active_redis_db
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Juan Gomez
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-09-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: redis
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: coveralls
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: fasterer
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: generator_spec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: reek
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: Redis activerecord like interface.
154
+ email:
155
+ - j.gomez@drexed.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".DS_Store"
161
+ - ".fasterer.yml"
162
+ - ".gitattributes"
163
+ - ".gitignore"
164
+ - ".reek.yml"
165
+ - ".rspec"
166
+ - ".rubocop.yml"
167
+ - ".travis.yml"
168
+ - CODE_OF_CONDUCT.md
169
+ - Gemfile
170
+ - README.md
171
+ - Rakefile
172
+ - active_redis_db.gemspec
173
+ - bin/console
174
+ - bin/rake
175
+ - bin/setup
176
+ - lib/.DS_Store
177
+ - lib/active_redis_db.rb
178
+ - lib/active_redis_db/.DS_Store
179
+ - lib/active_redis_db/base.rb
180
+ - lib/active_redis_db/configuration.rb
181
+ - lib/active_redis_db/connection.rb
182
+ - lib/active_redis_db/geo.rb
183
+ - lib/active_redis_db/hash.rb
184
+ - lib/active_redis_db/hyper_log_log.rb
185
+ - lib/active_redis_db/key.rb
186
+ - lib/active_redis_db/list.rb
187
+ - lib/active_redis_db/pub_sub.rb
188
+ - lib/active_redis_db/railtie.rb
189
+ - lib/active_redis_db/script.rb
190
+ - lib/active_redis_db/set.rb
191
+ - lib/active_redis_db/sorted_set.rb
192
+ - lib/active_redis_db/string.rb
193
+ - lib/active_redis_db/transaction.rb
194
+ - lib/active_redis_db/version.rb
195
+ - lib/generators/active_redis_db/install_generator.rb
196
+ - lib/generators/active_redis_db/templates/install.rb
197
+ - lib/tasks/redis.rake
198
+ homepage: http://drexed.github.io/active_redis_db
199
+ licenses:
200
+ - MIT
201
+ metadata: {}
202
+ post_install_message:
203
+ rdoc_options: []
204
+ require_paths:
205
+ - lib
206
+ required_ruby_version: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: '0'
211
+ required_rubygems_version: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ requirements: []
217
+ rubyforge_project:
218
+ rubygems_version: 2.7.7
219
+ signing_key:
220
+ specification_version: 4
221
+ summary: Gem for Redis activerecord like interface.
222
+ test_files: []