crunchy 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: adf5d73305331fc80df2bcdc62ba98603e6e225fcd20496eb7b5f559ad7035d1
4
+ data.tar.gz: e1a22891b01471b8a3c89e666099bb85acb0706d310bf4613eb3e74b89af9d8a
5
+ SHA512:
6
+ metadata.gz: 7d041066b036a3c38fb4ff157365a78080a97da902b8882e14ecce8fcb2d1beea6bc6f836326496cf27dfadf4ea1e34b3eeb6e8f3475bb04c9ac42908d4d9700
7
+ data.tar.gz: a1cbd9a95f0b0cb0664a5c6e3d55f46aa95cba3fe4026608d40ba1c74cfb2f1910c33a7ace808332ed89ce802b636ae3c7ec932f8a69e9eed04a77ec4c573329
@@ -0,0 +1,39 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ branches: ["main"]
8
+
9
+ jobs:
10
+ build:
11
+ name: Build + Publish
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ packages: write
16
+
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+ - name: Set up Ruby 3.2
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: 3.2.2
23
+ - uses: step-security/wait-for-secrets@v1
24
+ id: get-otp
25
+ with:
26
+ secrets: |
27
+ OTP:
28
+ name: 'OTP'
29
+ description: 'OTP for Rubygems'
30
+ # - name: Publish to RubyGems
31
+ # run: |
32
+ # mkdir -p $HOME/.gem
33
+ # touch $HOME/.gem/credentials
34
+ # chmod 0600 $HOME/.gem/credentials
35
+ # printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
36
+ # gem build *.gemspec
37
+ # gem push *.gem --otp ${{ steps.get-otp.outputs.OTP }}
38
+ # env:
39
+ # GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
data/.gitignore ADDED
@@ -0,0 +1,56 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ # Gemfile.lock
49
+ # .ruby-version
50
+ # .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,117 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ crunchy (0.0.1)
5
+ activesupport (>= 6.1.5)
6
+ paint (>= 2.0.0)
7
+ typesense (>= 0.15.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activesupport (7.0.7.2)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ addressable (2.8.5)
18
+ public_suffix (>= 2.0.2, < 6.0)
19
+ ast (2.4.2)
20
+ base64 (0.1.1)
21
+ concurrent-ruby (1.2.2)
22
+ crack (0.4.5)
23
+ rexml
24
+ diff-lcs (1.5.0)
25
+ docile (1.4.0)
26
+ ethon (0.16.0)
27
+ ffi (>= 1.15.0)
28
+ ffi (1.15.5)
29
+ hashdiff (1.0.1)
30
+ i18n (1.14.1)
31
+ concurrent-ruby (~> 1.0)
32
+ json (2.6.3)
33
+ language_server-protocol (3.17.0.3)
34
+ minitest (5.19.0)
35
+ oj (3.16.0)
36
+ paint (2.3.0)
37
+ parallel (1.23.0)
38
+ parser (3.2.2.3)
39
+ ast (~> 2.4.1)
40
+ racc
41
+ public_suffix (5.0.3)
42
+ racc (1.7.1)
43
+ rainbow (3.1.1)
44
+ regexp_parser (2.8.1)
45
+ rexml (3.2.6)
46
+ rspec (3.12.0)
47
+ rspec-core (~> 3.12.0)
48
+ rspec-expectations (~> 3.12.0)
49
+ rspec-mocks (~> 3.12.0)
50
+ rspec-core (3.12.2)
51
+ rspec-support (~> 3.12.0)
52
+ rspec-expectations (3.12.3)
53
+ diff-lcs (>= 1.2.0, < 2.0)
54
+ rspec-support (~> 3.12.0)
55
+ rspec-mocks (3.12.6)
56
+ diff-lcs (>= 1.2.0, < 2.0)
57
+ rspec-support (~> 3.12.0)
58
+ rspec-support (3.12.1)
59
+ rubocop (1.56.1)
60
+ base64 (~> 0.1.1)
61
+ json (~> 2.3)
62
+ language_server-protocol (>= 3.17.0)
63
+ parallel (~> 1.10)
64
+ parser (>= 3.2.2.3)
65
+ rainbow (>= 2.2.2, < 4.0)
66
+ regexp_parser (>= 1.8, < 3.0)
67
+ rexml (>= 3.2.5, < 4.0)
68
+ rubocop-ast (>= 1.28.1, < 2.0)
69
+ ruby-progressbar (~> 1.7)
70
+ unicode-display_width (>= 2.4.0, < 3.0)
71
+ rubocop-ast (1.29.0)
72
+ parser (>= 3.2.1.0)
73
+ rubocop-capybara (2.18.0)
74
+ rubocop (~> 1.41)
75
+ rubocop-factory_bot (2.23.1)
76
+ rubocop (~> 1.33)
77
+ rubocop-rspec (2.23.2)
78
+ rubocop (~> 1.33)
79
+ rubocop-capybara (~> 2.17)
80
+ rubocop-factory_bot (~> 2.22)
81
+ ruby-progressbar (1.13.0)
82
+ simplecov (0.22.0)
83
+ docile (~> 1.1)
84
+ simplecov-html (~> 0.11)
85
+ simplecov_json_formatter (~> 0.1)
86
+ simplecov-html (0.12.3)
87
+ simplecov_json_formatter (0.1.4)
88
+ typesense (0.15.0)
89
+ oj (~> 3.11)
90
+ typhoeus (~> 1.4)
91
+ typhoeus (1.4.0)
92
+ ethon (>= 0.9.0)
93
+ tzinfo (2.0.6)
94
+ concurrent-ruby (~> 1.0)
95
+ unicode-display_width (2.4.2)
96
+ vcr (6.2.0)
97
+ webmock (3.18.1)
98
+ addressable (>= 2.8.0)
99
+ crack (>= 0.3.2)
100
+ hashdiff (>= 0.4.0, < 2.0.0)
101
+
102
+ PLATFORMS
103
+ arm64-darwin-22
104
+
105
+ DEPENDENCIES
106
+ bundler (~> 2.3, >= 2.3.1)
107
+ crunchy!
108
+ rspec (~> 3.4)
109
+ rubocop (~> 1.36)
110
+ rubocop-rspec (~> 2.13)
111
+ simplecov (= 0.22.0)
112
+ simplecov_json_formatter (~> 0.1.4)
113
+ vcr (~> 6.0, >= 6.1.0)
114
+ webmock (~> 3.0, >= 3.0.1)
115
+
116
+ BUNDLED WITH
117
+ 2.4.18
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Front Matter
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ ![GitHub](https://img.shields.io/github/license/front-matter/crunchy?logo=MIT)
2
+
3
+ # crunchy
4
+
5
+ A ruby client for the [Typesense](https://typesense.org/) search engine. Still in early development.
6
+
7
+ ## Development
8
+
9
+ We use rspec for unit testing:
10
+
11
+ ```
12
+ bundle exec rspec
13
+ ```
14
+
15
+ Follow along via [Github Issues](https://github.com/front-matter/crunchy/issues).
16
+ Please open an issue if conversion fails or metadata are not properly supported.
17
+
18
+ ### Note on Patches/Pull Requests
19
+
20
+ - Fork the project
21
+ - Write tests for your new feature or a test that reproduces a bug
22
+ - Implement your feature or make a bug fix
23
+ - Do not mess with Rakefile, version or history
24
+ - Commit, push and make a pull request. Bonus points for topical branches.
25
+
26
+ ## License
27
+
28
+ **crunchy** is released under the [MIT License](https://github.com/front-matter/crunchy/blob/main/LICENSE).
data/crunchy.gemspec ADDED
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'English'
4
+ require 'date'
5
+ require File.expand_path('lib/crunchy/version', __dir__)
6
+
7
+ Gem::Specification.new do |s|
8
+ s.authors = 'Martin Fenner'
9
+ s.email = 'martin@front-matter.io'
10
+ s.name = 'crunchy'
11
+ s.homepage = 'https://github.com/front-matter/crunchy'
12
+ s.summary = 'Ruby client for the Typesense search engine'
13
+ s.description = 'Ruby gem and client library for the Typesense search engine.'
14
+ s.require_paths = ['lib']
15
+ s.version = Crunchy::VERSION.dup
16
+ s.extra_rdoc_files = ['README.md']
17
+ s.license = 'MIT'
18
+ s.required_ruby_version = '>= 3.0.0'
19
+
20
+ # Declare dependencies here, rather than in the Gemfile
21
+ s.add_dependency 'activesupport', '~> 6.1', '>= 6.1.5'
22
+ s.add_dependency 'typesense', '~> 0.15', '>= 0.15.0'
23
+ s.add_development_dependency 'bundler', '~> 2.3', '>= 2.3.1'
24
+ s.add_development_dependency 'rspec', '~> 3.4'
25
+ s.add_development_dependency 'rubocop', '~> 1.36'
26
+ s.add_development_dependency 'rubocop-rspec', '~> 2.13'
27
+ s.add_development_dependency 'simplecov', '0.22.0'
28
+ s.add_development_dependency 'simplecov_json_formatter', '~> 0.1.4'
29
+ s.add_development_dependency 'vcr', '~> 6.0', '>= 6.1.0'
30
+ s.add_development_dependency 'webmock', '~> 3.0', '>= 3.0.1'
31
+
32
+ s.require_paths = ['lib']
33
+ s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
34
+ s.metadata['rubygems_mfa_required'] = 'true'
35
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crunchy
4
+ VERSION = '0.0.1'
5
+ end
data/lib/crunchy.rb ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'typesense'
4
+ require 'crunchy/version'
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/setup'
4
+ Bundler.setup
5
+
6
+ require 'simplecov'
7
+ require 'simplecov_json_formatter'
8
+ SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
9
+ SimpleCov.start
10
+
11
+ require 'crunchy'
12
+ require 'rspec'
13
+ require 'webmock/rspec'
14
+ require 'vcr'
15
+
16
+ RSpec.configure do |config|
17
+ config.order = :random
18
+ config.include WebMock::API
19
+ config.expect_with :rspec do |c|
20
+ c.syntax = :expect
21
+ end
22
+
23
+ config.before do
24
+ ARGV.replace []
25
+ end
26
+ end
27
+
28
+ def fixture_path
29
+ "#{File.expand_path('fixtures', __dir__)}/"
30
+ end
31
+
32
+ VCR.configure do |c|
33
+ c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
34
+ c.hook_into :webmock
35
+ c.ignore_localhost = true
36
+ c.default_cassette_options = { record: :new_episodes }
37
+ c.allow_http_connections_when_no_cassette = true
38
+ c.configure_rspec_metadata!
39
+ end
metadata ADDED
@@ -0,0 +1,224 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: crunchy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Martin Fenner
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-08-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '6.1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 6.1.5
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '6.1'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 6.1.5
33
+ - !ruby/object:Gem::Dependency
34
+ name: typesense
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.15'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 0.15.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '0.15'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 0.15.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: bundler
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '2.3'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 2.3.1
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '2.3'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 2.3.1
73
+ - !ruby/object:Gem::Dependency
74
+ name: rspec
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '3.4'
80
+ type: :development
81
+ prerelease: false
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - "~>"
85
+ - !ruby/object:Gem::Version
86
+ version: '3.4'
87
+ - !ruby/object:Gem::Dependency
88
+ name: rubocop
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '1.36'
94
+ type: :development
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "~>"
99
+ - !ruby/object:Gem::Version
100
+ version: '1.36'
101
+ - !ruby/object:Gem::Dependency
102
+ name: rubocop-rspec
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: '2.13'
108
+ type: :development
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - "~>"
113
+ - !ruby/object:Gem::Version
114
+ version: '2.13'
115
+ - !ruby/object:Gem::Dependency
116
+ name: simplecov
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - '='
120
+ - !ruby/object:Gem::Version
121
+ version: 0.22.0
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - '='
127
+ - !ruby/object:Gem::Version
128
+ version: 0.22.0
129
+ - !ruby/object:Gem::Dependency
130
+ name: simplecov_json_formatter
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: 0.1.4
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - "~>"
141
+ - !ruby/object:Gem::Version
142
+ version: 0.1.4
143
+ - !ruby/object:Gem::Dependency
144
+ name: vcr
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '6.0'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 6.1.0
153
+ type: :development
154
+ prerelease: false
155
+ version_requirements: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '6.0'
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 6.1.0
163
+ - !ruby/object:Gem::Dependency
164
+ name: webmock
165
+ requirement: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: '3.0'
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: 3.0.1
173
+ type: :development
174
+ prerelease: false
175
+ version_requirements: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '3.0'
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: 3.0.1
183
+ description: Ruby gem and client library for the Typesense search engine.
184
+ email: martin@front-matter.io
185
+ executables: []
186
+ extensions: []
187
+ extra_rdoc_files:
188
+ - README.md
189
+ files:
190
+ - ".github/workflows/gem-push.yml"
191
+ - ".gitignore"
192
+ - Gemfile
193
+ - Gemfile.lock
194
+ - LICENSE
195
+ - README.md
196
+ - crunchy.gemspec
197
+ - lib/crunchy.rb
198
+ - lib/crunchy/version.rb
199
+ - spec/spec_helper.rb
200
+ homepage: https://github.com/front-matter/crunchy
201
+ licenses:
202
+ - MIT
203
+ metadata:
204
+ rubygems_mfa_required: 'true'
205
+ post_install_message:
206
+ rdoc_options: []
207
+ require_paths:
208
+ - lib
209
+ required_ruby_version: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ version: 3.0.0
214
+ required_rubygems_version: !ruby/object:Gem::Requirement
215
+ requirements:
216
+ - - ">="
217
+ - !ruby/object:Gem::Version
218
+ version: '0'
219
+ requirements: []
220
+ rubygems_version: 3.4.18
221
+ signing_key:
222
+ specification_version: 4
223
+ summary: Ruby client for the Typesense search engine
224
+ test_files: []