strum-cache 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 429d0ccabdab8e28ec3066321eafcf0bbc26ecfbb4d22c21dfc01af7e0eba64b
4
- data.tar.gz: c53417e84ea5c1a96ff22c13e9d33d8ddb3cc499eac3f7e655d5cf6523696c57
3
+ metadata.gz: f1057277181a99a80a1ca12f32fcf1349c2c23170f22ac2912239cd3432321d3
4
+ data.tar.gz: 2b5f3e05091e217d8d205cda0718be2f3646c874993c35299123f5a3f484a7e7
5
5
  SHA512:
6
- metadata.gz: 89dfcc215197a83d4ec352691d3d1daeb1eaf3a7f9035c17791228bd3dad3e96a508d58c7f6ffc884727339aaedf733978c2373fd359a73860b00049b8003e92
7
- data.tar.gz: 69e51b5ae67c37ce8052665af3f1e63cfb756b2a29e714b92809c15b8962c5224bb8f25a0cdab87d6d6f54198660717abceecd760d39c5e7f246aaa1b4b5d74d
6
+ metadata.gz: 588edc1bf46b4f51690d88388690eb28a58a1adebdcb8266c37d64a018e6ae1b5e0aca6d31098c747433693741024fa0d53adde477c3b2af5ed3c713ff5b1339
7
+ data.tar.gz: a25937df792f2c5e583f9b59a98c204429f3a4e5bf52b7d874f9ca241bb9afed30398b5e2e1da96f53273e1a93acc6f9cd64e136b2167c0492ff6aba60d1ec81
data/.gitignore CHANGED
@@ -9,6 +9,7 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ /.rbenv-gemsets
12
13
 
13
14
  # Editor directories and files
14
15
  .idea
data/lib/strum/cache.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "dry/inflector"
4
+ require "dry/configurable"
3
5
  require "strum/cache/version"
4
6
  require "strum/service"
5
7
  require "strum/pipe"
6
- require "dry/inflector"
7
- require "dry/configurable"
8
+ require "strum/json"
8
9
  require "strum/cache_utils/redis"
9
10
  require "strum/cache_utils/find"
10
11
  require "strum/cache_utils/search"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Strum
4
4
  module Cache
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -11,7 +11,7 @@ module Strum
11
11
  def call
12
12
  Strum::Pipe.call(Strum::CacheUtils::BuildResourceUrl,
13
13
  Strum::CacheUtils::SendRequest,
14
- Strum::JsonDeserializer,
14
+ Strum::Json::Deserializer,
15
15
  input: input) do |m|
16
16
  m.success { |responce| output(responce) }
17
17
  m.failure { |errors| add_errors(errors) }
@@ -13,7 +13,7 @@ module Strum
13
13
  def call
14
14
  Strum::Pipe.call(Strum::CacheUtils::BuildResourcesUrl,
15
15
  Strum::CacheUtils::SendRequest,
16
- Strum::JsonDeserializer,
16
+ Strum::Json::Deserializer,
17
17
  input: input) do |m|
18
18
  m.success { |responce| output(responce) }
19
19
  m.failure { |errors| add_errors(errors) }
data/strum-cache.gemspec CHANGED
@@ -21,18 +21,22 @@ Gem::Specification.new do |spec|
21
21
  # Specify which files should be added to the gem when it is released.
22
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
23
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
+ `git ls-files -z`.split("\x0").reject do |f|
25
+ f.match(
26
+ /^(test|spec|features|\.rubocop.yml|\.ruby-version|Gemfile.lock|Gemfile|\.gitlab-ci.yml|README|\.travis.yml|CHANGELOG|\.rspec)/ # rubocop:disable Layout/LineLength
27
+ )
28
+ end
25
29
  end
26
30
  spec.bindir = "exe"
27
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
32
  spec.require_paths = ["lib"]
29
33
 
30
- spec.add_dependency "dry-configurable", "~> 0.11.6"
31
- spec.add_dependency "dry-inflector", "~> 0.2"
32
- spec.add_dependency "faraday", "~> 1.1"
33
- spec.add_dependency "json", "~> 2.3"
34
- spec.add_dependency "redis", "~> 4.2"
35
- spec.add_dependency "strum-json", "~> 0.0.2"
36
- spec.add_dependency "strum-pipe", "~> 0.0.3"
37
- spec.add_dependency "strum-service", "~> 0.1"
34
+ spec.add_runtime_dependency "dry-configurable", "~> 0.11.6"
35
+ spec.add_runtime_dependency "dry-inflector", "~> 0.2"
36
+ spec.add_runtime_dependency "faraday", "~> 1.1"
37
+ spec.add_runtime_dependency "json", "~> 2.3"
38
+ spec.add_runtime_dependency "redis", "~> 4.2"
39
+ spec.add_runtime_dependency "strum-json", "~> 0.0.3"
40
+ spec.add_runtime_dependency "strum-pipe", "~> 0.0.3"
41
+ spec.add_runtime_dependency "strum-service", "~> 0.1"
38
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strum-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serhiy Nazarov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-09 00:00:00.000000000 Z
11
+ date: 2021-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.0.2
89
+ version: 0.0.3
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.0.2
96
+ version: 0.0.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: strum-pipe
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -130,15 +130,8 @@ extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
132
  - ".gitignore"
133
- - ".gitlab-ci.yml"
134
- - ".rspec"
135
- - ".rubocop.yml"
136
- - ".travis.yml"
137
133
  - CODE_OF_CONDUCT.md
138
- - Gemfile
139
- - Gemfile.lock
140
134
  - LICENSE.txt
141
- - README.md
142
135
  - Rakefile
143
136
  - bin/console
144
137
  - bin/setup
data/.gitlab-ci.yml DELETED
@@ -1,3 +0,0 @@
1
- include:
2
- - project: 'strum-rb/ci-cd'
3
- file: '/strum-rb/.gitlab-ci.yml'
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,21 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.7
3
- NewCops: enable
4
-
5
- # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
6
- Style/HashSyntax:
7
- Enabled: true
8
-
9
- # Method definitions after `private` or `protected` isolated calls need one
10
- # extra level of indentation.
11
- Layout/IndentationConsistency:
12
- Enabled: true
13
- EnforcedStyle: indented_internal_methods
14
-
15
- # Check quotes usage according to lint rule below.
16
- Style/StringLiterals:
17
- Enabled: true
18
- EnforcedStyle: double_quotes
19
-
20
- Layout/LineLength:
21
- IgnoredPatterns: ['\A#']
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.6.5
6
- before_install: gem install bundler -v 2.1.4
data/Gemfile DELETED
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in strum-cache.gemspec
6
- gemspec
7
-
8
- gem "bundler", "~> 2.1.4"
9
- gem "rspec", "~> 3"
10
- gem "rubocop", "~> 0.90.0"
11
-
12
- gem "debase", "~> 0.2.4"
13
- gem "ruby-debug-ide", "~> 0.7.0"
data/Gemfile.lock DELETED
@@ -1,109 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- strum-cache (0.1.0)
5
- dry-configurable (~> 0.11.6)
6
- dry-inflector (~> 0.2)
7
- faraday (~> 1.1)
8
- json (~> 2.3)
9
- redis (~> 4.2)
10
- strum-json (~> 0.0.2)
11
- strum-pipe (~> 0.0.3)
12
- strum-service (~> 0.1)
13
-
14
- GEM
15
- remote: https://rubygems.org/
16
- specs:
17
- addressable (2.7.0)
18
- public_suffix (>= 2.0.2, < 5.0)
19
- ast (2.4.2)
20
- concurrent-ruby (1.1.9)
21
- debase (0.2.4.1)
22
- debase-ruby_core_source (>= 0.10.2)
23
- debase-ruby_core_source (0.10.12)
24
- diff-lcs (1.4.4)
25
- dry-configurable (0.11.6)
26
- concurrent-ruby (~> 1.0)
27
- dry-core (~> 0.4, >= 0.4.7)
28
- dry-equalizer (~> 0.2)
29
- dry-core (0.6.0)
30
- concurrent-ruby (~> 1.0)
31
- dry-equalizer (0.3.0)
32
- dry-inflector (0.2.0)
33
- faraday (1.4.2)
34
- faraday-em_http (~> 1.0)
35
- faraday-em_synchrony (~> 1.0)
36
- faraday-excon (~> 1.1)
37
- faraday-net_http (~> 1.0)
38
- faraday-net_http_persistent (~> 1.1)
39
- multipart-post (>= 1.2, < 3)
40
- ruby2_keywords (>= 0.0.4)
41
- faraday-em_http (1.0.0)
42
- faraday-em_synchrony (1.0.0)
43
- faraday-excon (1.1.0)
44
- faraday-net_http (1.0.1)
45
- faraday-net_http_persistent (1.1.0)
46
- json (2.5.1)
47
- json-schema (2.8.1)
48
- addressable (>= 2.4)
49
- multipart-post (2.1.1)
50
- parallel (1.20.1)
51
- parser (3.0.1.1)
52
- ast (~> 2.4.1)
53
- public_suffix (4.0.6)
54
- rainbow (3.0.0)
55
- rake (13.0.3)
56
- redis (4.2.5)
57
- regexp_parser (2.1.1)
58
- rexml (3.2.5)
59
- rspec (3.10.0)
60
- rspec-core (~> 3.10.0)
61
- rspec-expectations (~> 3.10.0)
62
- rspec-mocks (~> 3.10.0)
63
- rspec-core (3.10.1)
64
- rspec-support (~> 3.10.0)
65
- rspec-expectations (3.10.1)
66
- diff-lcs (>= 1.2.0, < 2.0)
67
- rspec-support (~> 3.10.0)
68
- rspec-mocks (3.10.2)
69
- diff-lcs (>= 1.2.0, < 2.0)
70
- rspec-support (~> 3.10.0)
71
- rspec-support (3.10.2)
72
- rubocop (0.90.0)
73
- parallel (~> 1.10)
74
- parser (>= 2.7.1.1)
75
- rainbow (>= 2.2.2, < 4.0)
76
- regexp_parser (>= 1.7)
77
- rexml
78
- rubocop-ast (>= 0.3.0, < 1.0)
79
- ruby-progressbar (~> 1.7)
80
- unicode-display_width (>= 1.4.0, < 2.0)
81
- rubocop-ast (0.8.0)
82
- parser (>= 2.7.1.5)
83
- ruby-debug-ide (0.7.2)
84
- rake (>= 0.8.1)
85
- ruby-progressbar (1.11.0)
86
- ruby2_keywords (0.0.4)
87
- strum-json (0.0.2)
88
- dry-inflector (~> 0.2.0)
89
- json (~> 2.3)
90
- json-schema (~> 2.8.1)
91
- strum-service (~> 0.1.0)
92
- strum-pipe (0.0.3)
93
- strum-service (~> 0.1)
94
- strum-service (0.1.2)
95
- unicode-display_width (1.7.0)
96
-
97
- PLATFORMS
98
- ruby
99
-
100
- DEPENDENCIES
101
- bundler (~> 2.1.4)
102
- debase (~> 0.2.4)
103
- rspec (~> 3)
104
- rubocop (~> 0.90.0)
105
- ruby-debug-ide (~> 0.7.0)
106
- strum-cache!
107
-
108
- BUNDLED WITH
109
- 2.1.4
data/README.md DELETED
@@ -1,70 +0,0 @@
1
- # Strum::Cache
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/strum/cache`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'strum-cache'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle install
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install strum-cache
22
-
23
- ## Usage
24
-
25
- ###ENV variables:
26
-
27
- `CACHE_REDIS_URL` - connection string to Redis
28
-
29
- `{RESOURCE}_CACHE_REDIS_URL` - separated Redis connection string for resource
30
-
31
- `BASE_RESOURCE_URL` - full url to resource find endpoint. example: "http://example.com/entities"
32
-
33
- `{RESOURCE}_RESOURCE_URL` - separated full url to resource find endpoint. example: "http://example.com/entities"
34
-
35
- `BASE_RESOURCE_SEARCH_URL` - full url to resource search endpoint. example: "http://example.com/entities/search"
36
-
37
- `{RESOURCE}_RESOURCE_SEARCH_URL` - separated full url to resource search endpoint. example: "http://example.com/entities/search"
38
-
39
- ###Configurable
40
-
41
- `Strum::Cache.config.cache_headers` - hash with headers that should be sent on http request
42
-
43
- `Strum::Cache::config.redis_class` - class of Redis. Default is `Redis`, can be changed for mock
44
-
45
- ###How to use
46
-
47
- `Strum::Cache::Entity::Find.(id)` - find Entity by id
48
-
49
- `Strum::Cache::Entity::Search.(params)` - search Entity by params
50
-
51
- `Strum::Cache::Entity::Push.(params)` - push Entity to cache
52
-
53
- ## Development
54
-
55
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
56
-
57
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
58
-
59
- ## Contributing
60
-
61
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/strum-cache. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/strum-cache/blob/master/CODE_OF_CONDUCT.md).
62
-
63
-
64
- ## License
65
-
66
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
67
-
68
- ## Code of Conduct
69
-
70
- Everyone interacting in the Strum::Cache project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/strum-cache/blob/master/CODE_OF_CONDUCT.md).