hide_and_seek 0.0.2 → 0.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: 9946dc7ac3cbd1b3a3765cb6398b871d7ea9dc23
4
- data.tar.gz: f47db256e465bf28a6acab51ad0597bc9b17d49b
3
+ metadata.gz: 83800f7d5e43e81cd39524fc7550443e11888be6
4
+ data.tar.gz: 04b10c2555aac4acd743f8b04dc8c692e34d95d0
5
5
  SHA512:
6
- metadata.gz: 717269e8c86c92a77132ce718174df92662e6a7d3aace710b5adb802fd225121229a0e75c8392fb78005eb8f141800f5904fa8ac2f31df9514cd9d14c2c16d53
7
- data.tar.gz: e881174fa1d2db1703531a193256563ff67f28951297c28faab4195a1e5affbc2d50f772b7d6e343eb825804033a39334251515b09d9844219c1620012640b8b
6
+ metadata.gz: c4931136212bb4a820e98aaebc155f67107fa3293d660b22c84a2d7c4c9775f2b9921942ed3a57e541c31fbd73655b14e1c1e801d75c498d2ab38c6555780f3c
7
+ data.tar.gz: b874c628de163fd4069858f10d175737776ae2d6ff8dcdc74f4c80c7860ca8ddf5edfc6130a2b052b83e2cf895ad46f9c6df810c1add53b03d6687050898ac7a
@@ -8,8 +8,8 @@ class HideAndSeek::Item
8
8
  def display?(item_name, user_identifier)
9
9
  @item_name = item_name
10
10
  @user_identifier = user_identifier
11
- return true if $redis.exists(key_name) == 1
12
- return false
11
+ return false if $redis.exists(key_name) == 1
12
+ return true
13
13
  end
14
14
 
15
15
  def hide(item_name, user_identifier)
@@ -1,3 +1,3 @@
1
1
  module HideAndSeek
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -8,13 +8,13 @@ describe HideAndSeek::Item, :type => :model do
8
8
  subject{HideAndSeek::Item.new $redis}
9
9
 
10
10
  describe "#display?" do
11
- it "should return true if key exists" do
11
+ it "should return false if key exists" do
12
12
  allow($redis).to receive(:exists).with("foo-1").and_return 1
13
- expect(subject.display?("foo", 1)).to be true
13
+ expect(subject.display?("foo", 1)).to be false
14
14
  end
15
- it "should return false if key doesn't exist" do
15
+ it "should return true if key doesn't exist" do
16
16
  allow($redis).to receive(:exists).with("foo-1").and_return 0
17
- expect(subject.display?("foo", 1)).to be false
17
+ expect(subject.display?("foo", 1)).to be true
18
18
  end
19
19
  end
20
20
 
@@ -2922,3 +2922,217 @@ Processing by HideAndSeek::ItemsController#show as JSON
2922
2922
  Parameters: {"id"=>"foo"}
2923
2923
  Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2924
2924
   (0.0ms) rollback transaction
2925
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2926
+  (0.1ms) select sqlite_version(*)
2927
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2928
+  (0.1ms) begin transaction
2929
+  (0.1ms) rollback transaction
2930
+  (0.0ms) begin transaction
2931
+  (0.0ms) rollback transaction
2932
+  (0.0ms) begin transaction
2933
+  (0.0ms) rollback transaction
2934
+  (0.0ms) begin transaction
2935
+  (0.0ms) rollback transaction
2936
+  (0.0ms) begin transaction
2937
+  (0.0ms) rollback transaction
2938
+  (0.0ms) begin transaction
2939
+  (0.0ms) rollback transaction
2940
+  (0.0ms) begin transaction
2941
+ Processing by HideAndSeek::ItemsController#update as JSON
2942
+ Parameters: {"user_id"=>9001, "id"=>"foo"}
2943
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2944
+  (0.1ms) rollback transaction
2945
+  (0.0ms) begin transaction
2946
+ Processing by HideAndSeek::ItemsController#update as JSON
2947
+ Parameters: {"id"=>"foo"}
2948
+ Completed 502 Bad Gateway in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2949
+  (0.0ms) rollback transaction
2950
+  (0.0ms) begin transaction
2951
+ Processing by HideAndSeek::ItemsController#update as JSON
2952
+ Parameters: {"id"=>"foo"}
2953
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2954
+  (0.1ms) rollback transaction
2955
+  (0.0ms) begin transaction
2956
+ Processing by HideAndSeek::ItemsController#update as JSON
2957
+ Parameters: {"id"=>"foo"}
2958
+ Completed 502 Bad Gateway in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2959
+  (0.1ms) rollback transaction
2960
+  (0.0ms) begin transaction
2961
+ Processing by HideAndSeek::ItemsController#show as JSON
2962
+ Parameters: {"user_id"=>9001, "id"=>"foo"}
2963
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2964
+  (0.1ms) rollback transaction
2965
+  (0.0ms) begin transaction
2966
+ Processing by HideAndSeek::ItemsController#show as JSON
2967
+ Parameters: {"id"=>"foo"}
2968
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2969
+  (0.1ms) rollback transaction
2970
+  (0.0ms) begin transaction
2971
+ Processing by HideAndSeek::ItemsController#show as JSON
2972
+ Parameters: {"id"=>"foo"}
2973
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2974
+  (0.1ms) rollback transaction
2975
+  (0.0ms) begin transaction
2976
+ Processing by HideAndSeek::ItemsController#show as JSON
2977
+ Parameters: {"id"=>"foo"}
2978
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2979
+  (0.1ms) rollback transaction
2980
+  (0.0ms) begin transaction
2981
+  (0.0ms) rollback transaction
2982
+  (0.0ms) begin transaction
2983
+  (0.0ms) rollback transaction
2984
+  (0.0ms) begin transaction
2985
+  (0.0ms) rollback transaction
2986
+  (0.0ms) begin transaction
2987
+  (0.0ms) rollback transaction
2988
+  (0.0ms) begin transaction
2989
+  (0.0ms) rollback transaction
2990
+  (0.0ms) begin transaction
2991
+  (0.0ms) rollback transaction
2992
+  (0.0ms) begin transaction
2993
+ Processing by HideAndSeek::ItemsController#update as JSON
2994
+ Parameters: {"user_id"=>9001, "id"=>"foo"}
2995
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
2996
+  (0.0ms) rollback transaction
2997
+  (0.0ms) begin transaction
2998
+ Processing by HideAndSeek::ItemsController#update as JSON
2999
+ Parameters: {"id"=>"foo"}
3000
+ Completed 502 Bad Gateway in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3001
+  (0.1ms) rollback transaction
3002
+  (0.0ms) begin transaction
3003
+ Processing by HideAndSeek::ItemsController#update as JSON
3004
+ Parameters: {"id"=>"foo"}
3005
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3006
+  (0.1ms) rollback transaction
3007
+  (0.1ms) begin transaction
3008
+ Processing by HideAndSeek::ItemsController#update as JSON
3009
+ Parameters: {"id"=>"foo"}
3010
+ Completed 502 Bad Gateway in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3011
+  (0.0ms) rollback transaction
3012
+  (0.0ms) begin transaction
3013
+ Processing by HideAndSeek::ItemsController#show as JSON
3014
+ Parameters: {"user_id"=>9001, "id"=>"foo"}
3015
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3016
+  (0.1ms) rollback transaction
3017
+  (0.0ms) begin transaction
3018
+ Processing by HideAndSeek::ItemsController#show as JSON
3019
+ Parameters: {"id"=>"foo"}
3020
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3021
+  (0.1ms) rollback transaction
3022
+  (0.0ms) begin transaction
3023
+ Processing by HideAndSeek::ItemsController#show as JSON
3024
+ Parameters: {"id"=>"foo"}
3025
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3026
+  (0.1ms) rollback transaction
3027
+  (0.0ms) begin transaction
3028
+ Processing by HideAndSeek::ItemsController#show as JSON
3029
+ Parameters: {"id"=>"foo"}
3030
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3031
+  (0.0ms) rollback transaction
3032
+  (2.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
3033
+  (0.1ms) select sqlite_version(*)
3034
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3035
+  (0.1ms) begin transaction
3036
+  (0.0ms) rollback transaction
3037
+  (0.0ms) begin transaction
3038
+  (0.1ms) rollback transaction
3039
+  (0.0ms) begin transaction
3040
+  (0.0ms) rollback transaction
3041
+  (0.0ms) begin transaction
3042
+  (0.0ms) rollback transaction
3043
+  (0.0ms) begin transaction
3044
+  (0.0ms) rollback transaction
3045
+  (0.0ms) begin transaction
3046
+  (0.0ms) rollback transaction
3047
+  (0.0ms) begin transaction
3048
+  (0.0ms) rollback transaction
3049
+  (0.0ms) begin transaction
3050
+  (0.0ms) rollback transaction
3051
+  (0.0ms) begin transaction
3052
+  (0.0ms) rollback transaction
3053
+  (0.0ms) begin transaction
3054
+  (0.0ms) rollback transaction
3055
+  (0.0ms) begin transaction
3056
+  (0.0ms) rollback transaction
3057
+  (0.0ms) begin transaction
3058
+  (0.0ms) rollback transaction
3059
+  (0.0ms) begin transaction
3060
+ Processing by HideAndSeek::ItemsController#update as JSON
3061
+ Parameters: {"user_id"=>9001, "id"=>"foo"}
3062
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3063
+  (0.1ms) rollback transaction
3064
+  (0.0ms) begin transaction
3065
+ Processing by HideAndSeek::ItemsController#update as JSON
3066
+ Parameters: {"id"=>"foo"}
3067
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3068
+  (0.0ms) rollback transaction
3069
+  (0.0ms) begin transaction
3070
+ Processing by HideAndSeek::ItemsController#update as JSON
3071
+ Parameters: {"id"=>"foo"}
3072
+ Completed 502 Bad Gateway in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3073
+  (0.0ms) rollback transaction
3074
+  (0.0ms) begin transaction
3075
+ Processing by HideAndSeek::ItemsController#update as JSON
3076
+ Parameters: {"id"=>"foo"}
3077
+ Completed 502 Bad Gateway in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3078
+  (0.1ms) rollback transaction
3079
+  (0.0ms) begin transaction
3080
+ Processing by HideAndSeek::ItemsController#show as JSON
3081
+ Parameters: {"user_id"=>9001, "id"=>"foo"}
3082
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3083
+  (0.1ms) rollback transaction
3084
+  (0.0ms) begin transaction
3085
+ Processing by HideAndSeek::ItemsController#show as JSON
3086
+ Parameters: {"id"=>"foo"}
3087
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3088
+  (0.1ms) rollback transaction
3089
+  (0.0ms) begin transaction
3090
+ Processing by HideAndSeek::ItemsController#show as JSON
3091
+ Parameters: {"id"=>"foo"}
3092
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3093
+  (0.0ms) rollback transaction
3094
+  (0.0ms) begin transaction
3095
+ Processing by HideAndSeek::ItemsController#show as JSON
3096
+ Parameters: {"id"=>"foo"}
3097
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3098
+  (0.0ms) rollback transaction
3099
+  (0.0ms) begin transaction
3100
+ Processing by HideAndSeek::ItemsController#update as JSON
3101
+ Parameters: {"user_id"=>9001, "id"=>"foo"}
3102
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3103
+  (0.1ms) rollback transaction
3104
+  (0.0ms) begin transaction
3105
+ Processing by HideAndSeek::ItemsController#update as JSON
3106
+ Parameters: {"id"=>"foo"}
3107
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3108
+  (0.1ms) rollback transaction
3109
+  (0.0ms) begin transaction
3110
+ Processing by HideAndSeek::ItemsController#update as JSON
3111
+ Parameters: {"id"=>"foo"}
3112
+ Completed 502 Bad Gateway in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3113
+  (0.1ms) rollback transaction
3114
+  (0.1ms) begin transaction
3115
+ Processing by HideAndSeek::ItemsController#update as JSON
3116
+ Parameters: {"id"=>"foo"}
3117
+ Completed 502 Bad Gateway in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3118
+  (0.1ms) rollback transaction
3119
+  (0.0ms) begin transaction
3120
+ Processing by HideAndSeek::ItemsController#show as JSON
3121
+ Parameters: {"user_id"=>9001, "id"=>"foo"}
3122
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3123
+  (0.1ms) rollback transaction
3124
+  (0.0ms) begin transaction
3125
+ Processing by HideAndSeek::ItemsController#show as JSON
3126
+ Parameters: {"id"=>"foo"}
3127
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3128
+  (0.0ms) rollback transaction
3129
+  (0.0ms) begin transaction
3130
+ Processing by HideAndSeek::ItemsController#show as JSON
3131
+ Parameters: {"id"=>"foo"}
3132
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3133
+  (0.0ms) rollback transaction
3134
+  (0.0ms) begin transaction
3135
+ Processing by HideAndSeek::ItemsController#show as JSON
3136
+ Parameters: {"id"=>"foo"}
3137
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
3138
+  (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hide_and_seek
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - BJ Clark