couchbase 3.0.0.beta.1-universal-darwin-19 → 3.0.0-universal-darwin-19

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 (104) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +227 -0
  3. data/.rubocop_todo.yml +47 -0
  4. data/CONTRIBUTING.md +110 -0
  5. data/Gemfile +4 -0
  6. data/README.md +3 -3
  7. data/Rakefile +1 -1
  8. data/couchbase.gemspec +40 -39
  9. data/examples/analytics.rb +123 -108
  10. data/examples/auth.rb +33 -0
  11. data/examples/crud.rb +16 -2
  12. data/examples/managing_analytics_indexes.rb +18 -4
  13. data/examples/managing_buckets.rb +17 -3
  14. data/examples/managing_collections.rb +22 -9
  15. data/examples/managing_query_indexes.rb +38 -18
  16. data/examples/managing_search_indexes.rb +21 -6
  17. data/examples/managing_view_indexes.rb +18 -4
  18. data/examples/query.rb +17 -3
  19. data/examples/query_with_consistency.rb +30 -20
  20. data/examples/search.rb +116 -101
  21. data/examples/search_with_consistency.rb +43 -30
  22. data/examples/subdocument.rb +42 -30
  23. data/examples/view.rb +19 -10
  24. data/ext/CMakeLists.txt +40 -2
  25. data/ext/build_version.hxx.in +1 -1
  26. data/ext/couchbase/bucket.hxx +190 -38
  27. data/ext/couchbase/cluster.hxx +22 -4
  28. data/ext/couchbase/configuration.hxx +14 -14
  29. data/ext/couchbase/couchbase.cxx +108 -12
  30. data/ext/couchbase/error_map.hxx +202 -2
  31. data/ext/couchbase/errors.hxx +8 -2
  32. data/ext/couchbase/io/dns_client.hxx +6 -6
  33. data/ext/couchbase/io/http_command.hxx +2 -2
  34. data/ext/couchbase/io/http_session.hxx +7 -11
  35. data/ext/couchbase/io/http_session_manager.hxx +3 -3
  36. data/ext/couchbase/io/mcbp_command.hxx +101 -44
  37. data/ext/couchbase/io/mcbp_session.hxx +144 -49
  38. data/ext/couchbase/io/retry_action.hxx +30 -0
  39. data/ext/couchbase/io/retry_context.hxx +39 -0
  40. data/ext/couchbase/io/retry_orchestrator.hxx +96 -0
  41. data/ext/couchbase/io/retry_reason.hxx +235 -0
  42. data/ext/couchbase/io/retry_strategy.hxx +156 -0
  43. data/ext/couchbase/operations/document_decrement.hxx +2 -0
  44. data/ext/couchbase/operations/document_exists.hxx +2 -0
  45. data/ext/couchbase/operations/document_get.hxx +2 -0
  46. data/ext/couchbase/operations/document_get_and_lock.hxx +2 -0
  47. data/ext/couchbase/operations/document_get_and_touch.hxx +2 -0
  48. data/ext/couchbase/operations/document_get_projected.hxx +2 -0
  49. data/ext/couchbase/operations/document_increment.hxx +2 -0
  50. data/ext/couchbase/operations/document_insert.hxx +2 -0
  51. data/ext/couchbase/operations/document_lookup_in.hxx +2 -0
  52. data/ext/couchbase/operations/document_mutate_in.hxx +3 -0
  53. data/ext/couchbase/operations/document_query.hxx +10 -0
  54. data/ext/couchbase/operations/document_remove.hxx +2 -0
  55. data/ext/couchbase/operations/document_replace.hxx +2 -0
  56. data/ext/couchbase/operations/document_search.hxx +8 -3
  57. data/ext/couchbase/operations/document_touch.hxx +2 -0
  58. data/ext/couchbase/operations/document_unlock.hxx +2 -0
  59. data/ext/couchbase/operations/document_upsert.hxx +2 -0
  60. data/ext/couchbase/operations/query_index_create.hxx +14 -4
  61. data/ext/couchbase/operations/query_index_drop.hxx +12 -2
  62. data/ext/couchbase/operations/query_index_get_all.hxx +11 -2
  63. data/ext/couchbase/origin.hxx +47 -17
  64. data/ext/couchbase/platform/backtrace.c +189 -0
  65. data/ext/couchbase/platform/backtrace.h +54 -0
  66. data/ext/couchbase/platform/terminate_handler.cc +122 -0
  67. data/ext/couchbase/platform/terminate_handler.h +36 -0
  68. data/ext/couchbase/protocol/cmd_get_cluster_config.hxx +6 -1
  69. data/ext/couchbase/protocol/status.hxx +14 -4
  70. data/ext/couchbase/version.hxx +2 -2
  71. data/ext/extconf.rb +39 -36
  72. data/ext/test/main.cxx +64 -16
  73. data/lib/couchbase.rb +0 -1
  74. data/lib/couchbase/analytics_options.rb +2 -4
  75. data/lib/couchbase/authenticator.rb +14 -0
  76. data/lib/couchbase/binary_collection.rb +9 -9
  77. data/lib/couchbase/binary_collection_options.rb +8 -6
  78. data/lib/couchbase/bucket.rb +18 -18
  79. data/lib/couchbase/cluster.rb +121 -90
  80. data/lib/couchbase/collection.rb +36 -38
  81. data/lib/couchbase/collection_options.rb +31 -17
  82. data/lib/couchbase/common_options.rb +1 -1
  83. data/lib/couchbase/datastructures/couchbase_list.rb +16 -16
  84. data/lib/couchbase/datastructures/couchbase_map.rb +18 -18
  85. data/lib/couchbase/datastructures/couchbase_queue.rb +13 -13
  86. data/lib/couchbase/datastructures/couchbase_set.rb +8 -7
  87. data/lib/couchbase/errors.rb +10 -3
  88. data/lib/couchbase/json_transcoder.rb +2 -2
  89. data/lib/couchbase/libcouchbase.bundle +0 -0
  90. data/lib/couchbase/management/analytics_index_manager.rb +37 -37
  91. data/lib/couchbase/management/bucket_manager.rb +25 -25
  92. data/lib/couchbase/management/collection_manager.rb +3 -3
  93. data/lib/couchbase/management/query_index_manager.rb +59 -14
  94. data/lib/couchbase/management/search_index_manager.rb +15 -12
  95. data/lib/couchbase/management/user_manager.rb +1 -1
  96. data/lib/couchbase/management/view_index_manager.rb +11 -5
  97. data/lib/couchbase/mutation_state.rb +12 -0
  98. data/lib/couchbase/query_options.rb +23 -9
  99. data/lib/couchbase/scope.rb +61 -1
  100. data/lib/couchbase/search_options.rb +40 -27
  101. data/lib/couchbase/subdoc.rb +31 -28
  102. data/lib/couchbase/version.rb +2 -2
  103. data/lib/couchbase/view_options.rb +0 -1
  104. metadata +20 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0662d4e64ea7bc1e7b6cc7975cb9029a03ab89d70f279a1eef8d84cb9804510c
4
- data.tar.gz: 80317092f682ecca19c7fc0410b1b1f7d44207a8efab95c4cf166140916dd9cc
3
+ metadata.gz: a27f3825351af4c8019df9e2260e8977f17ac5353a01f0016152cb6aa41b51b1
4
+ data.tar.gz: ce5cfbafbc797db005c97127bd2b31ce5ee15cc87b62f51c83c60e5bf796e8f8
5
5
  SHA512:
6
- metadata.gz: 641149befde0a43934f1afddaf10128b689bbc3b9f826d9da69bca82bed1b654eb9f667fc34e0c0cb9ace5d1d80eff6992f9c1b25f78e3811bfc1a909b48ba7b
7
- data.tar.gz: 65f86e6f65023c3ac3e6d1f84373775f13cb2c03c67980f43c2b86ad54300e11f3ee04865068e5c8e727bfa3d44cf195fbdffd5477211740c7bd7583ceda784d
6
+ metadata.gz: 5d5cd08018fd07081f9a2ed62723667d4046f3f431ce76bd22cf66cd80bc523b8a44741a16813637d0e852edb9a477429e137fb5a300d854795922282bf6f11a
7
+ data.tar.gz: 3fe628456ba71cba09722020973658bf0c709be85a22a220d506ad1d28d6b6003b21475102e96950aa04b23c156c6c04dd54c095e8b7ce4160ced0f3252f398a
@@ -0,0 +1,227 @@
1
+ inherit_from: .rubocop_todo.yml
2
+ require:
3
+ - rubocop-performance
4
+ - rubocop-minitest
5
+
6
+ AllCops:
7
+ TargetRubyVersion: 2.5
8
+
9
+ Layout/LineLength:
10
+ Max: 140
11
+
12
+ Layout/SpaceInsideHashLiteralBraces:
13
+ EnforcedStyle: no_space
14
+ EnforcedStyleForEmptyBraces: no_space
15
+
16
+ Style/Copyright:
17
+ Enabled: true
18
+ Notice: 'Copyright .*2020 Couchbase, Inc.'
19
+ AutocorrectNotice: 'Copyright 2020 Couchbase, Inc.'
20
+
21
+ Style/Lambda:
22
+ EnforcedStyle: lambda
23
+
24
+ Style/SymbolArray:
25
+ EnforcedStyle: brackets
26
+
27
+ Style/RegexpLiteral:
28
+ EnforcedStyle: mixed
29
+ AllowInnerSlashes: true
30
+
31
+ Style/TrailingCommaInArrayLiteral:
32
+ EnforcedStyleForMultiline: comma
33
+
34
+ Style/TrailingCommaInHashLiteral:
35
+ EnforcedStyleForMultiline: comma
36
+
37
+ Layout/FirstHashElementIndentation:
38
+ EnforcedStyle: consistent
39
+
40
+ Layout/EmptyLinesAroundAttributeAccessor:
41
+ Enabled: true
42
+
43
+ Layout/SpaceAroundMethodCallOperator:
44
+ Enabled: true
45
+
46
+ Lint/BinaryOperatorWithIdenticalOperands:
47
+ Enabled: true
48
+
49
+ Lint/DeprecatedOpenSSLConstant:
50
+ Enabled: true
51
+
52
+ Lint/DuplicateElsifCondition:
53
+ Enabled: true
54
+
55
+ Lint/DuplicateRescueException:
56
+ Enabled: true
57
+
58
+ Lint/EmptyConditionalBody:
59
+ Enabled: true
60
+
61
+ Lint/FloatComparison:
62
+ Enabled: true
63
+
64
+ Lint/MissingSuper:
65
+ Enabled: true
66
+
67
+ Lint/MixedRegexpCaptureTypes:
68
+ Enabled: true
69
+
70
+ Lint/OutOfRangeRegexpRef:
71
+ Enabled: true
72
+
73
+ Lint/RaiseException:
74
+ Enabled: true
75
+
76
+ Lint/SelfAssignment:
77
+ Enabled: true
78
+
79
+ Lint/StructNewOverride:
80
+ Enabled: true
81
+
82
+ Lint/TopLevelReturnWithArgument:
83
+ Enabled: true
84
+
85
+ Lint/UnreachableLoop:
86
+ Enabled: true
87
+
88
+ Style/ArrayCoercion:
89
+ Enabled: true
90
+
91
+ Style/BisectedAttrAccessor:
92
+ Enabled: true
93
+
94
+ Style/CaseLikeIf:
95
+ Enabled: true
96
+
97
+ Style/ExponentialNotation:
98
+ Enabled: true
99
+
100
+ Style/GlobalStdStream:
101
+ Enabled: true
102
+
103
+ Style/HashAsLastArrayItem:
104
+ Enabled: true
105
+
106
+ Style/HashEachMethods:
107
+ Enabled: true
108
+
109
+ Style/HashLikeCase:
110
+ Enabled: true
111
+
112
+ Style/HashTransformKeys:
113
+ Enabled: true
114
+
115
+ Style/HashTransformValues:
116
+ Enabled: true
117
+
118
+ Style/OptionalBooleanParameter:
119
+ Enabled: true
120
+
121
+ Style/RedundantAssignment:
122
+ Enabled: true
123
+
124
+ Style/RedundantFetchBlock:
125
+ Enabled: true
126
+
127
+ Style/RedundantFileExtensionInRequire:
128
+ Enabled: true
129
+
130
+ Style/RedundantRegexpCharacterClass:
131
+ Enabled: true
132
+
133
+ Style/RedundantRegexpEscape:
134
+ Enabled: true
135
+
136
+ Style/SingleArgumentDig:
137
+ Enabled: true
138
+
139
+ Style/SlicingWithRange:
140
+ Enabled: true
141
+
142
+ Style/StringConcatenation:
143
+ Enabled: true
144
+
145
+ Performance/AncestorsInclude:
146
+ Enabled: true
147
+
148
+ Performance/BigDecimalWithNumericArgument:
149
+ Enabled: true
150
+
151
+ Performance/RedundantSortBlock:
152
+ Enabled: true
153
+
154
+ Performance/RedundantStringChars:
155
+ Enabled: true
156
+
157
+ Performance/ReverseFirst:
158
+ Enabled: true
159
+
160
+ Performance/SortReverse:
161
+ Enabled: true
162
+
163
+ Performance/Squeeze:
164
+ Enabled: true
165
+
166
+ Performance/StringInclude:
167
+ Enabled: true
168
+
169
+ Minitest/AssertInDelta:
170
+ Enabled: true
171
+
172
+ Minitest/AssertionInLifecycleHook:
173
+ Enabled: true
174
+
175
+ Minitest/AssertKindOf:
176
+ Enabled: true
177
+
178
+ Minitest/AssertOutput:
179
+ Enabled: true
180
+
181
+ Minitest/AssertPathExists:
182
+ Enabled: true
183
+
184
+ Minitest/AssertSilent:
185
+ Enabled: true
186
+
187
+ Minitest/LiteralAsActualArgument:
188
+ Enabled: true
189
+
190
+ Minitest/RefuteInDelta:
191
+ Enabled: true
192
+
193
+ Minitest/RefuteKindOf:
194
+ Enabled: true
195
+
196
+ Minitest/RefutePathExists:
197
+ Enabled: true
198
+
199
+ Minitest/TestMethodName:
200
+ Enabled: true
201
+
202
+ Minitest/UnspecifiedException:
203
+ Enabled: true
204
+
205
+ Lint/DuplicateRequire:
206
+ Enabled: true
207
+
208
+ Lint/EmptyFile:
209
+ Enabled: true
210
+
211
+ Lint/TrailingCommaInAttributeDeclaration:
212
+ Enabled: true
213
+
214
+ Lint/UselessMethodDefinition:
215
+ Enabled: true
216
+
217
+ Style/CombinableLoops:
218
+ Enabled: true
219
+
220
+ Style/KeywordParametersOrder:
221
+ Enabled: true
222
+
223
+ Style/RedundantSelfAssignment:
224
+ Enabled: true
225
+
226
+ Style/SoleNestedConditional:
227
+ Enabled: true
@@ -0,0 +1,47 @@
1
+ Style/Documentation:
2
+ Enabled: false
3
+
4
+ Style/FrozenStringLiteralComment:
5
+ Enabled: false
6
+
7
+ Style/NumericLiterals:
8
+ Enabled: false
9
+
10
+ Style/StringLiterals:
11
+ Enabled: false
12
+
13
+ Style/HashSyntax:
14
+ Enabled: false
15
+
16
+ Metrics/MethodLength:
17
+ Enabled: false
18
+
19
+ Metrics/CyclomaticComplexity:
20
+ Enabled: false
21
+
22
+ Metrics/AbcSize:
23
+ Enabled: false
24
+
25
+ Metrics/PerceivedComplexity:
26
+ Enabled: false
27
+
28
+ Naming/AccessorMethodName:
29
+ Enabled: false
30
+
31
+ Metrics/ClassLength:
32
+ Enabled: false
33
+
34
+ Metrics/BlockLength:
35
+ Enabled: false
36
+
37
+ Naming/PredicateName:
38
+ Enabled: false
39
+
40
+ Style/AccessorGrouping:
41
+ Enabled: false
42
+
43
+ Style/ExplicitBlockArgument:
44
+ Enabled: false
45
+
46
+ Minitest/MultipleAssertions:
47
+ Enabled: false
@@ -0,0 +1,110 @@
1
+ # Contributing
2
+
3
+ In addition to filing bugs, you may contribute by submitting patches to fix bugs in the library. Contributions may be
4
+ submitting to http://review.couchbase.com.
5
+
6
+ We use Gerrit as our code review system --- and thus submitting a change requires an account there. Note that pull
7
+ requests will not be ignored but will be responded to more quickly and with more detail in Gerrit.
8
+
9
+ For something to be accepted into the codebase, it must be formatted properly and have undergone proper testing.
10
+ We use `rubocop` for linting with a configuration stored in `.rubocop.yml`.
11
+
12
+ To install and use the linter you can use `./bin/setup` and then run `rubocop` in the project root directory.
13
+
14
+ ## Branches and Tags
15
+
16
+ Released versions of the library are marked as annotated tags inside the repository.
17
+
18
+ * The `master` branch represents the mainline branch. The master branch typically consists of content going into the
19
+ next release.
20
+
21
+ ## Contributing Patches
22
+
23
+ If you wish to contribute a new feature or a bug fix to the library, try to follow the following guidelines to help
24
+ ensure your change gets merged upstream.
25
+
26
+ ### Before you begin
27
+
28
+ For any code change, ensure the new code you write looks similar to the code surrounding it and that linting does not
29
+ produce errors.
30
+
31
+ If your change is going to involve a substantial amount of time or effort, please attempt to discuss it with the project
32
+ developers first who will provide assistance and direction where possible.
33
+
34
+ #### For new features
35
+
36
+ Ensure the feature you are adding does not already exist, and think about how this feature may be useful for other users.
37
+ In general less intrusive changes are more likely to be accepted.
38
+
39
+ #### For fixing bugs
40
+
41
+ Ensure the bug you are fixing is actually a bug (and not a usage error), and that it has not been fixed in a more recent
42
+ version. Please read the release notes as well as the issue tracker to see a list of open and resolved issues.
43
+
44
+ ### Code Review
45
+
46
+ #### Signing up on Gerrit
47
+
48
+ Everything that is merged into the library goes through a code review process. The code review process is done via
49
+ [Gerrit](https://review.couchbase.org).
50
+
51
+ To sign up for a gerrit account, go to https://review.couchbase.org and click on the _Register_ link at the top right.
52
+ Once you've signed in you will need to agree to the CLA (Contributor License Agreement) by going you your gerrit
53
+ account page and selecting the _Agreements_ link on the left.
54
+
55
+ When you've done that, everything should flow through just fine.
56
+
57
+ Be sure that you have registered your email address at http://review.couchbase.org/#/settings/contact as many sign-up
58
+ methods won't pass emails along.
59
+
60
+ Note that your email address in your code commit and in the gerrit settings must match.
61
+
62
+ Add your public SSH key to gerrit before submitting.
63
+
64
+ #### Setting up your fork with Gerrit
65
+
66
+ Assuming you have a repository created like so:
67
+
68
+ ```
69
+ $ git clone git://github.com/couchbase/couchbase-ruby-client.git
70
+ ```
71
+
72
+ you can simply perform two simple steps to get started with gerrit:
73
+
74
+ ```
75
+ $ git remote add gerrit ssh://${USERNAME}@review.couchbase.org:29418/couchbase-ruby-client
76
+
77
+ $ scp -P 29418 ${USERNAME}@review.couchbase.org:hooks/commit-msg .git/hooks
78
+ $ chmod a+x .git/hooks/commit-msg
79
+ ```
80
+
81
+ The last change is required for annotating each commit message with a special header known as `Change-Id`.
82
+ This allows Gerrit to group together different revisions of the same patch.
83
+
84
+ #### Pushing a changeset
85
+
86
+ Now that you have your change and a gerrit account to push to, you need to upload the change for review.
87
+ To do so, invoke the following incantation:
88
+
89
+ ```
90
+ $ git push gerrit HEAD:refs/for/master
91
+ ```
92
+
93
+ Where `gerrit` is the name of the _remote_ added earlier.
94
+ You may encounter some errors when pushing.
95
+ The most common are:
96
+
97
+ * "You are not authorized to push to this repository".
98
+ You will get this if your account has not yet been approved.
99
+ Feel free to ask about in gitter.im/couchbase or in the forums for help if blocked.
100
+
101
+ * "Missing Change-Id". You need to install the `commit-msg` hook as described above.
102
+ Note that even once you do this, you will need to ensure that any prior commits already have this header --- this may be
103
+ done by doing an interactive rebase (e.g. `git rebase -i origin/master` and selecting `reword` for all the commits;
104
+ which will automatically fillin the Change-Id).
105
+
106
+
107
+ Once you've pushed your changeset you can add people to review.
108
+ Currently these are:
109
+
110
+ * Sergey Avseyev
data/Gemfile CHANGED
@@ -20,6 +20,10 @@ gemspec
20
20
  gem "rake"
21
21
 
22
22
  group :development do
23
+ gem "rubocop"
24
+ gem "rubocop-minitest"
25
+ gem "rubocop-performance"
26
+ gem "standard"
23
27
  gem "yard"
24
28
  platforms :mri do
25
29
  gem "byebug"
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Couchbase Ruby Client [![tests](https://github.com/couchbase/couchbase-ruby-client/workflows/tests/badge.svg)](https://github.com/couchbase/couchbase-ruby-client/actions?query=workflow%3Atests)
1
+ # Couchbase Ruby Client [![gem](https://badge.fury.io/rb/couchbase.svg)](https://rubygems.org/gems/couchbase) [![tests](https://github.com/couchbase/couchbase-ruby-client/workflows/tests/badge.svg)](https://github.com/couchbase/couchbase-ruby-client/actions?query=workflow%3Atests)
2
2
 
3
3
  This repository contains the third generation of the official Couchbase SDK for Ruby (aka. SDKv3)
4
4
 
@@ -18,7 +18,7 @@ The library tested with the MRI 2.5, 2.6 and 2.7. Supported platforms are Linux
18
18
  Add this line to your application's Gemfile:
19
19
 
20
20
  ```ruby
21
- gem "couchbase", "3.0.0.beta.1"
21
+ gem "couchbase", "3.0.0"
22
22
  ```
23
23
 
24
24
  And then execute:
@@ -27,7 +27,7 @@ And then execute:
27
27
 
28
28
  Or install it yourself as:
29
29
 
30
- $ gem install --pre couchbase
30
+ $ gem install couchbase
31
31
 
32
32
  For some platforms we precompile binary packages. When, for some reason, binary package cannot be used, pass
33
33
  `--platform=ruby` to `gem install` command (or check `specific_platform` and `force_ruby_platform` options of Bundler).
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ end
24
24
  task :compile do
25
25
  require 'tempfile'
26
26
  Dir.chdir(Dir.tmpdir) do
27
- sh "ruby #{File.join(__dir__, "ext", "extconf.rb")}"
27
+ sh "ruby #{File.join(__dir__, 'ext', 'extconf.rb')}"
28
28
  end
29
29
  end
30
30
 
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- lib = File.expand_path("../lib", __FILE__)
15
+ lib = File.expand_path("lib", __dir__)
16
16
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
17
17
  require "couchbase/version"
18
18
 
@@ -25,53 +25,54 @@ Gem::Specification.new do |spec|
25
25
  spec.description = "Modern SDK for Couchbase Server"
26
26
  spec.homepage = "https://www.couchbase.com"
27
27
  spec.license = "Apache-2.0"
28
+ spec.required_ruby_version = "~> 2.5"
28
29
 
29
30
  spec.metadata = {
30
- "homepage_uri" => "https://docs.couchbase.com/ruby-sdk/3.0/hello-world/start-using-sdk.html",
31
- "bug_tracker_uri" => "https://couchbase.com/issues/browse/RCBC",
32
- "mailing_list_uri" => "https://forums.couchbase.com/c/ruby-sdk",
33
- "source_code_uri" => "https://github.com/couchbasse/couchbase-ruby-client/tree/#{spec.version}",
34
- "changelog_uri" => "https://github.com/couchbase/couchbase-ruby-client/releases/tag/#{spec.version}",
35
- "documentation_uri" => "https://docs.couchbase.com/sdk-api/couchbase-ruby-client-#{spec.version}/index.html",
36
- "github_repo" => "ssh://github.com/couchbase/couchbase-ruby-client",
31
+ "homepage_uri" => "https://docs.couchbase.com/ruby-sdk/3.0/hello-world/start-using-sdk.html",
32
+ "bug_tracker_uri" => "https://couchbase.com/issues/browse/RCBC",
33
+ "mailing_list_uri" => "https://forums.couchbase.com/c/ruby-sdk",
34
+ "source_code_uri" => "https://github.com/couchbase/couchbase-ruby-client/tree/#{spec.version}",
35
+ "changelog_uri" => "https://github.com/couchbase/couchbase-ruby-client/releases/tag/#{spec.version}",
36
+ "documentation_uri" => "https://docs.couchbase.com/sdk-api/couchbase-ruby-client-#{spec.version}/index.html",
37
+ "github_repo" => "ssh://github.com/couchbase/couchbase-ruby-client",
37
38
  }
38
39
 
39
- spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
40
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
40
41
  exclude_paths = %w[
41
- .idea
42
- .github
43
- .gitignore
44
- .gitmodules
45
- bin
46
- test
47
- spec
48
- features
49
- test_data
50
- ext/third_party/asio/asio/src/examples
51
- ext/third_party/asio/asio/src/tests
52
- ext/third_party/asio/asio/src/tools
53
- ext/third_party/gsl/tests
54
- ext/third_party/http_parser/contrib
55
- ext/third_party/http_parser/fuzzers
56
- ext/third_party/json/contrib
57
- ext/third_party/json/doc
58
- ext/third_party/json/src/example
59
- ext/third_party/json/src/perf
60
- ext/third_party/json/src/test
61
- ext/third_party/json/tests
62
- ext/third_party/snappy/testdata
63
- ext/third_party/spdlog/bench
64
- ext/third_party/spdlog/example
65
- ext/third_party/spdlog/logos
66
- ext/third_party/spdlog/scripts
67
- ext/third_party/spdlog/tests
42
+ .idea
43
+ .github
44
+ .gitignore
45
+ .gitmodules
46
+ bin
47
+ test
48
+ spec
49
+ features
50
+ test_data
51
+ ext/third_party/asio/asio/src/examples
52
+ ext/third_party/asio/asio/src/tests
53
+ ext/third_party/asio/asio/src/tools
54
+ ext/third_party/gsl/tests
55
+ ext/third_party/http_parser/contrib
56
+ ext/third_party/http_parser/fuzzers
57
+ ext/third_party/json/contrib
58
+ ext/third_party/json/doc
59
+ ext/third_party/json/src/example
60
+ ext/third_party/json/src/perf
61
+ ext/third_party/json/src/test
62
+ ext/third_party/json/tests
63
+ ext/third_party/snappy/testdata
64
+ ext/third_party/spdlog/bench
65
+ ext/third_party/spdlog/example
66
+ ext/third_party/spdlog/logos
67
+ ext/third_party/spdlog/scripts
68
+ ext/third_party/spdlog/tests
68
69
  ]
69
70
  `git ls-files --recurse-submodules -z`
70
- .split("\x0")
71
- .reject { |f| f.match(%r{^(#{Regexp.union(exclude_paths)})}) }
71
+ .split("\x0")
72
+ .reject { |f| f.match?(/^(#{Regexp.union(exclude_paths)})/) }
72
73
  end
73
74
  spec.bindir = "exe"
74
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
75
+ spec.executables = spec.files.grep(/^exe\//) { |f| File.basename(f) }
75
76
  spec.require_paths = ["lib"]
76
77
  spec.extensions = ["ext/extconf.rb"]
77
78
  spec.rdoc_options << "--exclude" << "ext/"