diff --git a/Gemfile b/Gemfile index 0221a31..07a5653 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ end gem 'sinatra', '~> 1.4.3', :require => 'sinatra/base' gem 'haml', '~> 4.0.0' gem 'sass', '~>3.2.7' -gem 'redis', '~>3.0.0' +gem 'redis', '~>4.2.1' gem 'redis-namespace', '~>1.3.1' gem 'rdiscount', '~>2.1.7' gem 'puma', '~>2.3.1' diff --git a/Gemfile.lock b/Gemfile.lock index f42df3b..45a8676 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,9 +26,9 @@ GEM rb-inotify (0.9.7) ffi (>= 0.5.0) rdiscount (2.1.8) - redis (3.0.7) + redis (4.2.1) redis-namespace (1.3.2) - redis (~> 3.0.4) + redis (~> 4.2.1) rerun (0.11.0) listen (~> 3.0) sass (3.2.19) @@ -50,11 +50,11 @@ DEPENDENCIES rack-test rake rdiscount (~> 2.1.7) - redis (~> 3.0.0) + redis (~> 4.2.1) redis-namespace (~> 1.3.1) rerun sass (~> 3.2.7) sinatra (~> 1.4.3) BUNDLED WITH - 1.11.2 + 1.17.3 diff --git a/README.markdown b/README.markdown index 6ce2003..dfbc848 100644 --- a/README.markdown +++ b/README.markdown @@ -3,16 +3,11 @@ Try Redis --- -**try.redis is unmaintained since March 2018. -The online instance will be kept running, but won't receive updates.** - ---- - [Try Redis](http://try.redis.io) is a demonstration of the Redis data structure server. ### Info -This project was started by [@alexmchale](https://github.com/alexmchale/) back in 2010. In January 2013 I took over the maintenance and it's running on my server since then. +This project was started by [@alexmchale](https://github.com/alexmchale/) back in 2010. In January 2013 [badboy](https://github.com/badboy/) took over the maintenance and hosting of the service, and in February 2020 [antirez](https://github.com/antirez/). It is now being maintained by the [Redis community](https://redis.io/community). -Contributions, improvements, comments and suggestions welcome. Just file an [issue](https://github.com/badboy/try.redis/issues). +Contributions, improvements, comments and suggestions welcome. Just file an [issue](https://github.com/redis/try.redis/issues). diff --git a/test/test_try_redis.rb b/test/test_try_redis.rb index a52a763..b7dea76 100644 --- a/test/test_try_redis.rb +++ b/test/test_try_redis.rb @@ -99,7 +99,7 @@ def test_eval_responds_to_help_missing_subsection def test_eval_responds_to_tutorial command "tutorial" - body_was :notification, "

Redis is what is called a key-value store" + body_was :notification, "

Redis is in the family of databases" end def test_eval_responds_to_prev @@ -109,13 +109,13 @@ def test_eval_responds_to_prev def test_eval_responds_to_next command "next" - response_was(/{"notification":"

Redis is what is called a key-value store/) - body_was :notification, "

Redis is what is called a key-value store" + response_was(/{"notification":"

Redis is in the family of databases/) + body_was :notification, "

Redis is in the family of databases" end def test_eval_responds_to_tutorial_id command "t2" - body_was :notification, "

Other common operations provided" + body_was :notification, "

Other basic operations provided by Redis" end def test_eval_responds_to_namespace @@ -379,9 +379,9 @@ def test_lexfamily command_with_body "ZREMRANGEBYLEX myzset [b [d", response: "(integer) 3" assert_equal 4, @r.zcard("lex:myzset") - command_with_body "zlexcount", error: /ERR wrong number of arguments for 'zlexcount' command/ - command_with_body "zlexcount a", error: /ERR wrong number of arguments for 'zlexcount' command/ - command_with_body "zlexcount a b c d", error: /ERR wrong number of arguments for 'zlexcount' command/ + command_with_body "zlexcount", error: /\(error\) wrong number of arguments \(given 1, expected 3\)/ + command_with_body "zlexcount a", error: /\(error\) wrong number of arguments \(given 1, expected 3\)/ + command_with_body "zlexcount a b c d", error: /\(error\) wrong number of arguments \(given 4, expected 3\)/ end end diff --git a/tutorial/01.markdown b/tutorial/01.markdown index 2be950b..7abb91f 100644 --- a/tutorial/01.markdown +++ b/tutorial/01.markdown @@ -5,7 +5,7 @@ called a value, inside a key. This data can later be retrieved only if we know the exact key used to store it. Often Redis it is called a data structure server because it has outer key-value shell, but each -value can contain a complex data structure, such as a string, a list, a hashes, or ordered data +value can contain a complex data structure, such as a string, a list, a hash, or ordered data structures called sorted sets as well as probabilistic data structures like hyperloglog. As a first example, we can use the command [SET](#help) to store the value "fido" at key "server:name": diff --git a/tutorial/07.markdown b/tutorial/07.markdown index 34220db..30915ea 100644 --- a/tutorial/07.markdown +++ b/tutorial/07.markdown @@ -12,12 +12,12 @@ client at the same time, elements in the head or the tail of the list. [RPOP](#help) removes the last element from the list and returns it.


-    RPOP friends => "3"
+    RPOP friends => "Bob"
 
-Note that the list now only has four elements: +Note that the list now only has one element:

-    LLEN friends => 4
-    LRANGE friends 0 -1 => 1) "Alice" 2) "Bob" 3) "1" 4) "2"
+    LLEN friends => 1
+    LRANGE friends 0 -1 => 1) "Alice"
 
diff --git a/tutorial/08.markdown b/tutorial/08.markdown index 3864731..b1184f6 100644 --- a/tutorial/08.markdown +++ b/tutorial/08.markdown @@ -1,7 +1,7 @@ Both [RPUSH](#help) and [LPUSH](#help) commands are variadic, so you can specify multiple elements in the same command execution.

-    RPUSH friends 1 2 3 => 6
+    RPUSH friends 1 2 3 => 4
 
@@ -11,6 +11,6 @@ Tip: RPUSH and LPUSH return the total length of the list after the operation. You can also use [LLEN](#help) to obtain the current length of the list.

-    LLEN friends => 6
+    LLEN friends => 4
 
diff --git a/views/index.haml b/views/index.haml index ba27234..357d66e 100644 --- a/views/index.haml +++ b/views/index.haml @@ -1,13 +1,21 @@ %html %head - + :javascript + (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': + new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], + j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= + 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); + })(window,document,'script','dataLayer','GTM-T6QK835'); %title Try Redis %link{"rel" => "shortcut icon", "href" => "/images/favicon.png"} %link{"rel" => "stylesheet", "href" => "/style.css"} %body - + %noscript + %iframe(src="https://www.googletagmanager.com/ns.html?id=GTM-T6QK835" + height="0" width="0" + style="display:none;visibility:hidden") #header %img{"src" => "/images/try-redis-500x50.png", "width" => 500, "height" => 50} @@ -21,8 +29,8 @@ #footer :markdown This site is open source software, you can find - the current version [here](https://github.com/antirez/try.redis). - It's now maintained and hosted by [antirez](https://twitter.com/antirez). + the current version [here](https://github.com/redis/try.redis). + It's now maintained by the [Redis community](https://redis.io/community) and hosted by Redis Labs. %script{"type" => "application/x-javascript", "src" => "/javascripts/jquery.min.js"} %script{"type" => "application/x-javascript", "src" => "/javascripts/underscore-min.js"}