unleash 3.2.2 → 4.3.0

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: da9995687fc28b71318711bd1575d9f5493fb9514cc3f276966323e4a73e15f8
4
- data.tar.gz: e4a29a197e0faeaeaf093bb5a67103ed36aba352facf9633a6845739b17ff58c
3
+ metadata.gz: f05a01bdf6013184b6948fb5c38f6b1da1cde9d18f9a0eeecd69b54cbed8ff18
4
+ data.tar.gz: 6343830fd945d00decd331acade205d605e0d496ed1d4afd4736affcb2f538ca
5
5
  SHA512:
6
- metadata.gz: a7831894183515cbe05fb10520542b93d8a8cd521eab6ff33e9c7a4f88540519b479a76fb360a085b4f1ee059be1d03d0b531eb0daa4ff3db0147380b6f5db52
7
- data.tar.gz: 93ce839564b8ef8af502ca148bd3e369f5463d32cd42af1d947be5d751dda88c52d8da71ee5a456658de899afe7fff159655f7f8579cf8030c81ff62655f1804
6
+ metadata.gz: 1ac4a4b89f787b5ae27acda02865def0eb68f261da10b83c01a6b34f6706b1b29443375eb82418b9834db555fbe54c1a1dfe49e9bf4c761556145edce88f76c9
7
+ data.tar.gz: c7a2332c7e6ab54872b08432af4c5c2cf092b7586664eb0267e45e416fb9a72c46246dd6cdedf68b4a9421678e4cb9f9507365e40fc5c2113b9fba8e703a19dd
@@ -0,0 +1,14 @@
1
+ name: Add new item to project board
2
+
3
+ on:
4
+ issues:
5
+ types:
6
+ - opened
7
+ pull_request_target:
8
+ types:
9
+ - opened
10
+
11
+ jobs:
12
+ add-to-project:
13
+ uses: unleash/.github/.github/workflows/add-item-to-project.yml@main
14
+ secrets: inherit
@@ -0,0 +1,79 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ lint:
9
+ name: RuboCop
10
+ timeout-minutes: 30
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Set up Ruby
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: "2.7"
18
+ bundler-cache: true
19
+ - name: Run RuboCop
20
+ run: bundle exec rubocop
21
+
22
+ test:
23
+ runs-on: ${{ matrix.os }}-latest
24
+
25
+ strategy:
26
+ matrix:
27
+ os:
28
+ - ubuntu
29
+ - macos
30
+ ruby-version:
31
+ - jruby-9.2
32
+ - jruby-9.3
33
+ - 3.1
34
+ - '3.0'
35
+ - 2.7
36
+ - 2.6
37
+ - 2.5
38
+
39
+ steps:
40
+ - uses: actions/checkout@v2
41
+ - name: Set up Ruby ${{ matrix.ruby-version }}
42
+ uses: ruby/setup-ruby@v1
43
+ with:
44
+ bundler-cache: true
45
+ ruby-version: ${{ matrix.ruby-version }}
46
+ - name: Install dependencies
47
+ run: bundle install
48
+ - name: Download test cases
49
+ run: git clone --depth 5 --branch v4.1.0 https://github.com/Unleash/client-specification.git client-specification
50
+ - name: Run tests
51
+ run: bundle exec rake
52
+ env:
53
+ COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54
+ - name: Coveralls Parallel
55
+ uses: coverallsapp/github-action@master
56
+ with:
57
+ github-token: ${{ secrets.GITHUB_TOKEN }}
58
+ flag-name: run-${{ matrix.test_number }}
59
+ parallel: true
60
+ - name: Notify Slack of pipeline completion
61
+ uses: 8398a7/action-slack@v3
62
+ if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
63
+ with:
64
+ status: ${{ job.status }}
65
+ text: Built on ${{ matrix.os }} - Ruby ${{ matrix.ruby-version }}
66
+ fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
67
+ env:
68
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
69
+
70
+ finish:
71
+ needs: test
72
+ runs-on: ubuntu-latest
73
+ steps:
74
+ - name: Coveralls Finished
75
+ uses: coverallsapp/github-action@master
76
+ with:
77
+ github-token: ${{ secrets.GITHUB_TOKEN }}
78
+ parallel-finished: true
79
+
data/.gitignore CHANGED
@@ -1,15 +1,19 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
7
6
  /pkg/
8
7
  /spec/reports/
9
8
  /tmp/
9
+ /vendor
10
+
11
+ # IntelliJ
12
+ .idea/
10
13
 
11
14
  # rspec failure tracking
12
15
  .rspec_status
16
+ Gemfile.lock
13
17
 
14
18
  # Clone of the client-specification
15
19
  /client-specification/
data/.rubocop.yml CHANGED
@@ -7,24 +7,24 @@ Naming/PredicateName:
7
7
  AllowedMethods:
8
8
  - is_enabled?
9
9
 
10
+
10
11
  Metrics/ClassLength:
11
- Max: 120
12
+ Max: 125
12
13
  Layout/LineLength:
13
14
  Max: 140
14
15
  Metrics/MethodLength:
15
16
  Max: 20
16
17
  Metrics/BlockLength:
17
- Max: 100
18
+ Max: 110
18
19
  Exclude:
19
- - 'spec/unleash/client_spec.rb'
20
- - 'spec/unleash/feature_toggle_spec.rb'
20
+ - 'spec/**/*.rb'
21
21
 
22
22
  Metrics/AbcSize:
23
- Max: 25
23
+ Max: 30
24
24
  Metrics/CyclomaticComplexity:
25
25
  Max: 9
26
26
  Metrics/PerceivedComplexity:
27
- Max: 9
27
+ Max: 10
28
28
 
29
29
  Style/Documentation:
30
30
  Enabled: false
@@ -51,6 +51,12 @@ Style/HashTransformKeys:
51
51
  Enabled: true
52
52
  Style/HashTransformValues:
53
53
  Enabled: true
54
+ Style/EmptyElse:
55
+ Exclude:
56
+ - 'lib/unleash/strategy/flexible_rollout.rb'
57
+
58
+ Style/DoubleNegation:
59
+ Enabled: false
54
60
 
55
61
  Style/IfInsideElse:
56
62
  Exclude:
@@ -60,6 +66,61 @@ Style/Next:
60
66
  Exclude:
61
67
  - 'lib/unleash/scheduled_executor.rb'
62
68
 
69
+
70
+ Style/AccessorGrouping:
71
+ Enabled: true
72
+ Style/BisectedAttrAccessor:
73
+ Enabled: true
74
+ Style/CaseLikeIf:
75
+ Enabled: true
76
+ #Style/ClassEqualityComparison:
77
+ # Enabled: true
78
+ Style/CombinableLoops:
79
+ Enabled: true
80
+ Style/ExplicitBlockArgument:
81
+ Enabled: true
82
+ Style/ExponentialNotation:
83
+ Enabled: true
84
+ #Style/GlobalStdStream:
85
+ # Enabled: true
86
+ Style/HashAsLastArrayItem:
87
+ Enabled: true
88
+ Style/HashLikeCase:
89
+ Enabled: true
90
+ Style/KeywordParametersOrder:
91
+ Enabled: true
92
+ #Style/OptionalBooleanParameter:
93
+ # Enabled: false
94
+ Style/RedundantAssignment:
95
+ Enabled: true
96
+ Style/RedundantFetchBlock:
97
+ Enabled: true
98
+ Style/RedundantFileExtensionInRequire:
99
+ Enabled: true
100
+ Style/RedundantRegexpCharacterClass:
101
+ Enabled: true
102
+ Style/RedundantRegexpEscape:
103
+ Enabled: true
104
+ Style/RedundantSelfAssignment:
105
+ Enabled: true
106
+ Style/SingleArgumentDig:
107
+ Enabled: true
108
+ Style/SlicingWithRange:
109
+ Enabled: true
110
+ Style/SoleNestedConditional:
111
+ Enabled: true
112
+ Style/StringConcatenation:
113
+ Enabled: false
114
+ Style/TrailingCommaInHashLiteral:
115
+ Enabled: true
116
+ # EnforcedStyleForMultiline: consistent_comma
117
+
118
+ Layout/BeginEndAlignment:
119
+ Enabled: true
120
+ Layout/EmptyLinesAroundAttributeAccessor:
121
+ Enabled: true
122
+ Layout/SpaceAroundMethodCallOperator:
123
+ Enabled: true
63
124
  Layout/MultilineMethodCallIndentation:
64
125
  EnforcedStyle: indented
65
126
 
@@ -68,3 +129,50 @@ Layout/SpaceBeforeBlockBraces:
68
129
  Exclude:
69
130
  - 'unleash-client.gemspec'
70
131
  - 'spec/**/*.rb'
132
+
133
+ Lint/BinaryOperatorWithIdenticalOperands:
134
+ Enabled: true
135
+ Lint/ConstantDefinitionInBlock:
136
+ Enabled: false
137
+ Lint/DeprecatedOpenSSLConstant:
138
+ Enabled: true
139
+ Lint/DuplicateElsifCondition:
140
+ Enabled: true
141
+ Lint/DuplicateRequire:
142
+ Enabled: true
143
+ Lint/DuplicateRescueException:
144
+ Enabled: true
145
+ Lint/EmptyConditionalBody:
146
+ Enabled: true
147
+ Lint/EmptyFile:
148
+ Enabled: true
149
+ Lint/FloatComparison:
150
+ Enabled: true
151
+ Lint/HashCompareByIdentity:
152
+ Enabled: true
153
+ Lint/IdentityComparison:
154
+ Enabled: true
155
+ Lint/MissingSuper:
156
+ Enabled: false
157
+ Lint/MixedRegexpCaptureTypes:
158
+ Enabled: true
159
+ Lint/OutOfRangeRegexpRef:
160
+ Enabled: true
161
+ Lint/RaiseException:
162
+ Enabled: true
163
+ Lint/RedundantSafeNavigation:
164
+ Enabled: true
165
+ Lint/SelfAssignment:
166
+ Enabled: true
167
+ Lint/StructNewOverride:
168
+ Enabled: true
169
+ Lint/TopLevelReturnWithArgument:
170
+ Enabled: true
171
+ Lint/TrailingCommaInAttributeDeclaration:
172
+ Enabled: true
173
+ Lint/UnreachableLoop:
174
+ Enabled: true
175
+ Lint/UselessMethodDefinition:
176
+ Enabled: true
177
+ Lint/UselessTimes:
178
+ Enabled: true