simple-feed 2.0.2 → 3.1.2

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.
Files changed (51) hide show
  1. checksums.yaml +5 -5
  2. data/.envrc +3 -0
  3. data/.github/workflows/rubocop.yml +33 -0
  4. data/.github/workflows/ruby.yml +34 -0
  5. data/.gitignore +2 -1
  6. data/.relaxed-rubocop-2.4.yml +174 -0
  7. data/.rspec +1 -1
  8. data/.rubocop.yml +43 -1150
  9. data/.rubocop_todo.yml +203 -0
  10. data/.travis.yml +7 -10
  11. data/CHANGELOG.md +120 -0
  12. data/Gemfile +4 -0
  13. data/Guardfile +3 -3
  14. data/README.adoc +601 -0
  15. data/Rakefile +5 -6
  16. data/bin/console +1 -0
  17. data/codecov.yml +28 -0
  18. data/examples/shared/provider_example.rb +51 -26
  19. data/lib/simple-feed.rb +2 -0
  20. data/lib/simple_feed.rb +2 -0
  21. data/lib/simplefeed/activity/base.rb +2 -0
  22. data/lib/simplefeed/activity/multi_user.rb +8 -6
  23. data/lib/simplefeed/activity/single_user.rb +7 -6
  24. data/lib/simplefeed/dsl/activities.rb +4 -3
  25. data/lib/simplefeed/dsl/formatter.rb +79 -40
  26. data/lib/simplefeed/dsl.rb +3 -1
  27. data/lib/simplefeed/event.rb +52 -13
  28. data/lib/simplefeed/feed.rb +36 -28
  29. data/lib/simplefeed/providers/base/provider.rb +7 -4
  30. data/lib/simplefeed/providers/hash.rb +2 -0
  31. data/lib/simplefeed/providers/key.rb +60 -36
  32. data/lib/simplefeed/providers/proxy.rb +28 -14
  33. data/lib/simplefeed/providers/redis/driver.rb +25 -27
  34. data/lib/simplefeed/providers/redis/provider.rb +41 -39
  35. data/lib/simplefeed/providers/redis/stats.rb +12 -13
  36. data/lib/simplefeed/providers/redis.rb +2 -0
  37. data/lib/simplefeed/providers.rb +24 -10
  38. data/lib/simplefeed/response.rb +7 -7
  39. data/lib/simplefeed/version.rb +3 -1
  40. data/lib/simplefeed.rb +27 -21
  41. data/man/running-example-redis-debug.png +0 -0
  42. data/man/running-example.png +0 -0
  43. data/man/sf-color-dump.png +0 -0
  44. data/simple-feed.gemspec +23 -16
  45. metadata +115 -44
  46. data/README.md +0 -415
  47. data/examples/hash_provider_example.rb +0 -24
  48. data/lib/simplefeed/key/template.rb +0 -52
  49. data/lib/simplefeed/key/type.rb +0 -26
  50. data/lib/simplefeed/providers/hash/paginator.rb +0 -31
  51. data/lib/simplefeed/providers/hash/provider.rb +0 -198
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c0041dae8cf2aeff75f069680843b654093dad50
4
- data.tar.gz: 6c21de78f66d8e964eecd08296f415061f288423
2
+ SHA256:
3
+ metadata.gz: 6fa9d217e5424a6b045ddb3269dd5ad76d1992ab3c3c20e4873b0d18c882bdf3
4
+ data.tar.gz: 5df00e7d893ee7ae704e36005a57a87659dd5a005ece144ef542d21f001cd332
5
5
  SHA512:
6
- metadata.gz: 3a3377a50d75428dcc155bbb3d156fd6b8e394c845c690ec23d5a2b6e083a39feded268a40a80e16e5fe9cb33ad6f68f872a51690a0c4c3f7ada8587aad3ec54
7
- data.tar.gz: 5c436ae8b4c7cac404f40aef9c7cf614c8dd8788a998d567139bd2cca0fc10c1a815943bc80374f10db8ef8375f5f6db3ee74af6c89253570b5e9b4ed78b5baf
6
+ metadata.gz: c38954719e29f0b7f485777788f0d57e8ad6e053684f7be21d0c49939107a315fedfc0275449323e5f74c3ba4d67cd12228b229379d3ea9d56e50446e304b574
7
+ data.tar.gz: beda9b9b41b6e5ca4b94e4a96e37b4653bd68908083403da9dbf120df91c546b46616720c2512edcd9e87ebb1d7c57e3130df6ab5edb1722795c22802aab2b94
data/.envrc ADDED
@@ -0,0 +1,3 @@
1
+
2
+ export ACTIONS_ALLOW_UNSECURE_COMMANDS=true
3
+ export RUBYOPT="-W0"
@@ -0,0 +1,33 @@
1
+
2
+ name: Rubocop
3
+
4
+ on:
5
+ push:
6
+ branches: [ master ]
7
+ pull_request:
8
+ branches: [ master ]
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ services:
14
+ redis:
15
+ image: redis
16
+ ports:
17
+ - 6379:6379
18
+ options: --entrypoint redis-server
19
+ env:
20
+ CODECOV_TOKEN: "8314c388-54a3-4125-915b-3d4836c15b29"
21
+ REDIS_HOST: redis
22
+ REDIS_PORT: 6379
23
+ steps:
24
+ - uses: actions/checkout@v2
25
+ - uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: 3.1 # Not needed with a .ruby-version file
28
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
29
+ - run: |
30
+ gem update --system
31
+ gem install bundler
32
+ bundle update --jobs 4 --retry 3
33
+ bundle exec rubocop
@@ -0,0 +1,34 @@
1
+
2
+ name: RSpec
3
+
4
+ on:
5
+ push:
6
+ branches: [ master ]
7
+ pull_request:
8
+ branches: [ master ]
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ environment: Code Coverage
14
+ services:
15
+ redis:
16
+ image: redis
17
+ ports:
18
+ - 6379:6379
19
+ options: --entrypoint redis-server
20
+ env:
21
+ CODECOV_TOKEN: "8314c388-54a3-4125-915b-3d4836c15b29"
22
+ REDIS_HOST: redis
23
+ REDIS_PORT: 6379
24
+ steps:
25
+ - uses: actions/checkout@v2
26
+ - uses: ruby/setup-ruby@v1
27
+ with:
28
+ ruby-version: 3.1 # Not needed with a .ruby-version file
29
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
30
+ - run: |
31
+ gem update --system
32
+ gem install bundler
33
+ bundle update --jobs 4 --retry 3
34
+ bundle exec rspec --format documentation
data/.gitignore CHANGED
@@ -14,4 +14,5 @@
14
14
  ._*
15
15
  .Spotlight-V100
16
16
  .Trashes
17
- /lib/simplefeed/providers/serialization/key.rb
17
+ .rakeTasks
18
+ .ruby-version
@@ -0,0 +1,174 @@
1
+ # Relaxed.Ruby.Style
2
+ ## Version 2.4
3
+
4
+ Style/Alias:
5
+ Enabled: false
6
+ StyleGuide: https://relaxed.ruby.style/#stylealias
7
+
8
+ Style/AsciiComments:
9
+ Enabled: false
10
+ StyleGuide: https://relaxed.ruby.style/#styleasciicomments
11
+
12
+ Style/BeginBlock:
13
+ Enabled: false
14
+ StyleGuide: https://relaxed.ruby.style/#stylebeginblock
15
+
16
+ Style/BlockDelimiters:
17
+ Enabled: false
18
+ StyleGuide: https://relaxed.ruby.style/#styleblockdelimiters
19
+
20
+ Style/CommentAnnotation:
21
+ Enabled: false
22
+ StyleGuide: https://relaxed.ruby.style/#stylecommentannotation
23
+
24
+ Style/Documentation:
25
+ Enabled: false
26
+ StyleGuide: https://relaxed.ruby.style/#styledocumentation
27
+
28
+ Layout/DotPosition:
29
+ Enabled: false
30
+ StyleGuide: https://relaxed.ruby.style/#layoutdotposition
31
+
32
+ Style/DoubleNegation:
33
+ Enabled: false
34
+ StyleGuide: https://relaxed.ruby.style/#styledoublenegation
35
+
36
+ Style/EndBlock:
37
+ Enabled: false
38
+ StyleGuide: https://relaxed.ruby.style/#styleendblock
39
+
40
+ Style/FormatString:
41
+ Enabled: false
42
+ StyleGuide: https://relaxed.ruby.style/#styleformatstring
43
+
44
+ Style/IfUnlessModifier:
45
+ Enabled: false
46
+ StyleGuide: https://relaxed.ruby.style/#styleifunlessmodifier
47
+
48
+ Style/Lambda:
49
+ Enabled: false
50
+ StyleGuide: https://relaxed.ruby.style/#stylelambda
51
+
52
+ Style/ModuleFunction:
53
+ Enabled: false
54
+ StyleGuide: https://relaxed.ruby.style/#stylemodulefunction
55
+
56
+ Style/MultilineBlockChain:
57
+ Enabled: false
58
+ StyleGuide: https://relaxed.ruby.style/#stylemultilineblockchain
59
+
60
+ Style/NegatedIf:
61
+ Enabled: false
62
+ StyleGuide: https://relaxed.ruby.style/#stylenegatedif
63
+
64
+ Style/NegatedWhile:
65
+ Enabled: false
66
+ StyleGuide: https://relaxed.ruby.style/#stylenegatedwhile
67
+
68
+ Style/NumericPredicate:
69
+ Enabled: false
70
+ StyleGuide: https://relaxed.ruby.style/#stylenumericpredicate
71
+
72
+ Style/ParallelAssignment:
73
+ Enabled: false
74
+ StyleGuide: https://relaxed.ruby.style/#styleparallelassignment
75
+
76
+ Style/PercentLiteralDelimiters:
77
+ Enabled: false
78
+ StyleGuide: https://relaxed.ruby.style/#stylepercentliteraldelimiters
79
+
80
+ Style/PerlBackrefs:
81
+ Enabled: false
82
+ StyleGuide: https://relaxed.ruby.style/#styleperlbackrefs
83
+
84
+ Style/Semicolon:
85
+ Enabled: false
86
+ StyleGuide: https://relaxed.ruby.style/#stylesemicolon
87
+
88
+ Style/SignalException:
89
+ Enabled: false
90
+ StyleGuide: https://relaxed.ruby.style/#stylesignalexception
91
+
92
+ Style/SingleLineBlockParams:
93
+ Enabled: false
94
+ StyleGuide: https://relaxed.ruby.style/#stylesinglelineblockparams
95
+
96
+ Style/SingleLineMethods:
97
+ Enabled: false
98
+ StyleGuide: https://relaxed.ruby.style/#stylesinglelinemethods
99
+
100
+ Layout/SpaceBeforeBlockBraces:
101
+ Enabled: false
102
+ StyleGuide: https://relaxed.ruby.style/#layoutspacebeforeblockbraces
103
+
104
+ Layout/SpaceInsideParens:
105
+ Enabled: false
106
+ StyleGuide: https://relaxed.ruby.style/#layoutspaceinsideparens
107
+
108
+ Layout/LineLength:
109
+ Enabled: false
110
+
111
+ Style/SpecialGlobalVars:
112
+ Enabled: false
113
+ StyleGuide: https://relaxed.ruby.style/#stylespecialglobalvars
114
+
115
+ Style/StringLiterals:
116
+ Enabled: false
117
+ StyleGuide: https://relaxed.ruby.style/#stylestringliterals
118
+
119
+ Style/TrailingCommaInArguments:
120
+ Enabled: false
121
+ StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarguments
122
+
123
+ Style/TrailingCommaInArrayLiteral:
124
+ Enabled: false
125
+ StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarrayliteral
126
+
127
+ Style/TrailingCommaInHashLiteral:
128
+ Enabled: false
129
+ StyleGuide: https://relaxed.ruby.style/#styletrailingcommainhashliteral
130
+
131
+ Style/SymbolArray:
132
+ Enabled: false
133
+ StyleGuide: http://relaxed.ruby.style/#stylesymbolarray
134
+
135
+ Style/WhileUntilModifier:
136
+ Enabled: false
137
+ StyleGuide: https://relaxed.ruby.style/#stylewhileuntilmodifier
138
+
139
+ Style/WordArray:
140
+ Enabled: false
141
+ StyleGuide: https://relaxed.ruby.style/#stylewordarray
142
+
143
+ Lint/AmbiguousRegexpLiteral:
144
+ Enabled: false
145
+ StyleGuide: https://relaxed.ruby.style/#lintambiguousregexpliteral
146
+
147
+ Lint/AssignmentInCondition:
148
+ Enabled: false
149
+ StyleGuide: https://relaxed.ruby.style/#lintassignmentincondition
150
+
151
+ Metrics/AbcSize:
152
+ Enabled: false
153
+
154
+ Metrics/BlockNesting:
155
+ Enabled: false
156
+
157
+ Metrics/ClassLength:
158
+ Enabled: false
159
+
160
+ Metrics/ModuleLength:
161
+ Enabled: false
162
+
163
+ Metrics/CyclomaticComplexity:
164
+ Enabled: false
165
+
166
+ Metrics/MethodLength:
167
+ Enabled: false
168
+
169
+ Metrics/ParameterLists:
170
+ Enabled: false
171
+
172
+ Metrics/PerceivedComplexity:
173
+ Enabled: false
174
+
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
1
  --format progress
2
- --color
2
+ --force-color
3
3
  --profile 1