Skip to content

Commit 6ad2ba6

Browse files
authored
V2 release (#427)
chore: bump version to 2.0.0
1 parent bd4d483 commit 6ad2ba6

File tree

106 files changed

+6547
-17247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+6547
-17247
lines changed

.circleci/config.yml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
aliases:
2+
- &check_bundler
3+
name: Which bundler?
4+
command: bundle -v
5+
6+
- &restore_cache
7+
name: Restore Bundler cache
8+
keys:
9+
- ruby-cache-<< parameters.version >>-{{ checksum "Gemfile" }}
10+
- ruby-cache-<< parameters.version >>-
11+
12+
- &install_bundler
13+
name: Bundle Install
14+
command: bundle check || bundle install
15+
16+
- &save_cache
17+
name: Save Bundler cache
18+
key: ruby-cache-<< parameters.version >>-{{ checksum "Gemfile" }}
19+
paths:
20+
- vendor/bundle
21+
22+
- &run_lint
23+
name: Run linting tool
24+
command: bundle exec rake rubocop
25+
26+
- &run_tests
27+
name: Run unit and integration tests
28+
command: |
29+
mkdir /tmp/test-results
30+
bundle exec rake test:all
31+
32+
references:
33+
default_docker_ruby_executor: &default_docker_ruby_executor
34+
image: circleci/ruby:<< parameters.version >>
35+
environment:
36+
BUNDLE_JOBS: 3
37+
BUNDLE_RETRY: 3
38+
BUNDLE_PATH: vendor/bundle
39+
40+
default_docker_jruby_executor: &default_docker_jruby_executor
41+
image: circleci/jruby:<< parameters.version >>
42+
environment:
43+
BUNDLE_JOBS: 3
44+
BUNDLE_RETRY: 3
45+
BUNDLE_PATH: vendor/bundle
46+
47+
version: 2.1
48+
49+
jobs:
50+
format:
51+
description: Run our linter checks against the entire code base
52+
parameters:
53+
version:
54+
type: string
55+
docker:
56+
- *default_docker_ruby_executor
57+
steps:
58+
- checkout
59+
- run: *check_bundler
60+
- run: *install_bundler
61+
- run: *run_lint
62+
63+
test_ruby:
64+
description: Build, unit and integration tests for Ruby
65+
parameters:
66+
version:
67+
type: string
68+
docker:
69+
- *default_docker_ruby_executor
70+
steps:
71+
- checkout
72+
- run: *check_bundler
73+
- restore_cache: *restore_cache
74+
- run: *install_bundler
75+
- save_cache: *save_cache
76+
- run: *run_tests
77+
78+
test_jruby:
79+
description: Build, unit and integration tests for JRuby
80+
parameters:
81+
version:
82+
type: string
83+
docker:
84+
- *default_docker_jruby_executor
85+
steps:
86+
- checkout
87+
- run: *check_bundler
88+
- restore_cache: *restore_cache
89+
- run: *install_bundler
90+
- save_cache: *save_cache
91+
- run: *run_tests
92+
93+
release:
94+
description: Release a new version of the Ruby client
95+
parameters:
96+
version:
97+
type: string
98+
docker:
99+
- *default_docker_ruby_executor
100+
steps:
101+
- checkout
102+
- run: *check_bundler
103+
- run: *install_bundler
104+
- run:
105+
name: Build new gem
106+
command: gem build algolia.gemspec
107+
- run:
108+
name: Publish new gem
109+
command: |
110+
if [[ -z "$RUBYGEMS_API_KEY" ]]; then echo '$RUBYGEMS_API_KEY is not set'; exit 1; fi
111+
gem push --key $RUBYGEMS_API_KEY $(ls algolia-*.gem)
112+
113+
workflows:
114+
version: 2
115+
ci:
116+
jobs:
117+
- format:
118+
version: '2.7'
119+
filters:
120+
tags:
121+
only: /.*/
122+
- test_ruby:
123+
matrix:
124+
parameters:
125+
version: ['2.2', '2.3', '2.4', '2.5', '2.6', '2.7']
126+
filters:
127+
tags:
128+
only: /.*/
129+
- test_jruby:
130+
matrix:
131+
parameters:
132+
version: ['9.1', '9.2']
133+
filters:
134+
tags:
135+
only: /.*/
136+
- release:
137+
version: '2.7'
138+
requires:
139+
- format
140+
- test_ruby
141+
- test_jruby
142+
filters:
143+
branches:
144+
ignore: /.*/
145+
tags:
146+
only: /^[1-9]+.[0-9]+.[0-9]+.*/

.gitignore

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
# rspec failure tracking
2+
.rspec_status
3+
14
## MAC OS
25
.DS_Store
6+
.idea/
37

48
## TEXTMATE
59
*.tmproj
@@ -18,11 +22,18 @@ coverage
1822
rdoc
1923
pkg
2024
.rvmrc
21-
.rubocop.yml
25+
/.bundle/
26+
/.yardoc
27+
/_yardoc/
28+
/coverage/
29+
/doc/
30+
/pkg/
31+
/spec/reports/
32+
/tmp/
2233

2334
## PROJECT::SPECIFIC
2435
Gemfile.lock
2536
spec/integration_spec_conf.rb
2637
data.sqlite3
2738

28-
.idea/
39+
debug.log

.rspec

Lines changed: 0 additions & 2 deletions
This file was deleted.

.rubocop.yml

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
inherit_from: .rubocop_todo.yml
2+
3+
AllCops:
4+
NewCops: enable
5+
6+
# Metrics
7+
Metrics/BlockLength:
8+
Enabled: false
9+
10+
Metrics/MethodLength:
11+
Enabled: false
12+
13+
Metrics/AbcSize:
14+
Enabled: false
15+
16+
Metrics/CyclomaticComplexity:
17+
Enabled: false
18+
19+
Metrics/PerceivedComplexity:
20+
Enabled: false
21+
22+
Metrics/ModuleLength:
23+
Enabled: false
24+
25+
Metrics/ClassLength:
26+
Enabled: false
27+
28+
Metrics/ParameterLists:
29+
Enabled: false
30+
31+
# Lint
32+
Lint/UnreachableCode:
33+
Exclude:
34+
- 'Dangerfile'
35+
36+
Lint/RaiseException:
37+
Enabled: true
38+
39+
Lint/StructNewOverride:
40+
Enabled: true
41+
42+
# Naming
43+
Naming/AccessorMethodName:
44+
Enabled: false
45+
46+
Naming/VariableName:
47+
Enabled: false
48+
49+
Naming/MethodParameterName:
50+
AllowedNames:
51+
- 'autoGenerateObjectIDIfNotExist'
52+
53+
# Disabled since it's not working when using variables instead of a name
54+
Naming/RescuedExceptionsVariableName:
55+
Enabled: false
56+
57+
# Layout
58+
Layout/LineLength:
59+
Enabled: false
60+
61+
Layout/SpaceAroundOperators:
62+
Enabled: false
63+
64+
Layout/IndentationWidth:
65+
Enabled: false
66+
67+
Layout/EmptyLineAfterGuardClause:
68+
Enabled: false
69+
70+
Layout/RescueEnsureAlignment:
71+
Enabled: false
72+
73+
Layout/IndentationConsistency:
74+
Exclude:
75+
- 'app/helpers/demos_helper.rb'
76+
77+
Layout/ParameterAlignment:
78+
EnforcedStyle: with_fixed_indentation
79+
80+
Layout/MultilineMethodCallIndentation:
81+
EnforcedStyle: indented
82+
83+
Layout/MultilineOperationIndentation:
84+
EnforcedStyle: indented
85+
IndentationWidth: 2
86+
87+
Layout/SpaceInLambdaLiteral:
88+
EnforcedStyle: require_space
89+
90+
Layout/CaseIndentation:
91+
EnforcedStyle: end
92+
93+
Layout/FirstHashElementIndentation:
94+
EnforcedStyle: consistent
95+
96+
Layout/FirstArrayElementIndentation:
97+
EnforcedStyle: consistent
98+
99+
Layout/EndAlignment:
100+
EnforcedStyleAlignWith: start_of_line
101+
102+
Layout/ExtraSpacing:
103+
AllowBeforeTrailingComments: true
104+
# When true, forces the alignment of `=` in assignments on consecutive lines.
105+
ForceEqualSignAlignment: true
106+
107+
# Style
108+
Style/Documentation:
109+
Enabled: false
110+
111+
Style/FrozenStringLiteralComment:
112+
Enabled: false
113+
114+
Style/NumericLiterals:
115+
Enabled: false
116+
117+
Style/IfUnlessModifier:
118+
Enabled: false
119+
120+
Style/WhileUntilModifier:
121+
Enabled: false
122+
123+
Style/NumericPredicate:
124+
Enabled: false
125+
126+
Style/ClassAndModuleChildren:
127+
Enabled: false
128+
129+
Style/GuardClause:
130+
Enabled: false
131+
132+
Style/EmptyMethod:
133+
Enabled: false
134+
135+
Style/Next:
136+
Enabled: false
137+
138+
Style/NegatedIf:
139+
Enabled: false
140+
141+
Style/RedundantSelf:
142+
Enabled: true
143+
144+
Style/SymbolArray:
145+
Enabled: false
146+
147+
Style/SafeNavigation:
148+
Enabled: false
149+
150+
Style/SignalException:
151+
Exclude:
152+
- 'Dangerfile'
153+
154+
Style/PreferredHashMethods:
155+
EnforcedStyle: verbose
156+
157+
Style/Alias:
158+
EnforcedStyle: prefer_alias_method
159+
160+
Style/Lambda:
161+
EnforcedStyle: literal
162+
163+
Style/PercentLiteralDelimiters:
164+
PreferredDelimiters:
165+
default: '()'
166+
'%w': '()'
167+
'%W': '()'
168+
'%i': '()'
169+
170+
Style/MutableConstant:
171+
Enabled: false
172+
173+
Style/ClassVars:
174+
Enabled: false
175+
176+
Style/SpecialGlobalVars:
177+
Enabled: false
178+
179+
Style/HashTransformKeys:
180+
Enabled: false
181+
182+
Style/HashTransformValues:
183+
Enabled: false
184+
185+
Style/HashEachMethods:
186+
Enabled: true
187+
188+
Style/RedundantBegin:
189+
Enabled: false

.rubocop_todo.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2019-12-12 11:07:55 +0100 using RuboCop version 0.77.0.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
Style/Documentation:
11+
Exclude:
12+
- 'spec/**/*'
13+
- 'test/**/*'
14+
- 'lib/rubybundle/search_config.rb'

0 commit comments

Comments
 (0)