clever 1.2.5

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2aa09c7aac824c85190007ac587d840a2a1a6405
4
+ data.tar.gz: 5215165a0770691ab4cdd48e48c5d24cd8f94728
5
+ SHA512:
6
+ metadata.gz: 2eb28ef44305ad1b53cf35a9e182c5f8673b24aa14363a6c84ff8a70399ff4a3cdd0b918ee144399b00222ffdd41ed464a19304f4a591b2aa644b8e79c9cf0f2
7
+ data.tar.gz: 9c518d83cda43403f90d35eef8c853b845584234dab8c6d8c7d846b02656b2238cbc3d311442115dc1cf41a9448827dee0cac2578b46a556742fcf98fb54c9c3
@@ -0,0 +1,116 @@
1
+ version: 2
2
+ defaults: &defaults
3
+ docker:
4
+ - image: circleci/ruby:2.4.1-node-browsers
5
+ working_directory: ~/repo
6
+ restore_ruby_cache: &restore_ruby_cache
7
+ restore_cache:
8
+ keys:
9
+ - v2-dependencies-{{ checksum "Gemfile.lock" }}
10
+ - v2-dependencies-
11
+ setup_rubygems: &setup_rubygems
12
+ run:
13
+ name: Add RubyGems API key
14
+ command: |
15
+ mkdir -p ~/.gem
16
+ echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
17
+ chmod 0600 ~/.gem/credentials
18
+
19
+ install_dependencies: &install_dependencies
20
+ run:
21
+ name: Install Dependencies
22
+ command: |
23
+ echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
24
+ source $BASH_ENV
25
+ gem install bundler
26
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
27
+
28
+ save_ruby_cache: &save_ruby_cache
29
+ save_cache:
30
+ paths:
31
+ - ./vendor/bundle
32
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
33
+ download_cc_reporter: &download_cc_reporter
34
+ run:
35
+ name: Download Code Climate Test Reporter
36
+ command: |
37
+ mkdir -p tmp/
38
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
39
+ chmod +x ./tmp/cc-test-reporter
40
+
41
+
42
+
43
+
44
+ persist: &persist
45
+ persist_to_workspace:
46
+ root: tmp
47
+ paths:
48
+ - cc-test-reporter
49
+ run_rspec_tests: &run_rspec_tests
50
+ run:
51
+ name: Run RSpec Tests
52
+ command: |
53
+ mkdir /tmp/test-results
54
+ ./tmp/cc-test-reporter before-build
55
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
56
+ circleci tests split --split-by=timings)"
57
+
58
+ bundle exec rspec --format progress \
59
+ --format RspecJunitFormatter \
60
+ --out /tmp/test-results/rspec.xml \
61
+ --format progress \
62
+ $TEST_FILES
63
+ ./tmp/cc-test-reporter format-coverage -t simplecov -o "tmp/codeclimate.json"
64
+
65
+ upload_coverage: &upload_coverage
66
+ run:
67
+ name: Upload Coverage
68
+ command: |
69
+ ./tmp/cc-test-reporter upload-coverage -i tmp/codeclimate.json
70
+
71
+ release_rubygem: &release_rubygem
72
+ run:
73
+ name: Release new version to RubyGems
74
+ command: |
75
+ bundle exec rake release
76
+
77
+ jobs:
78
+ rspec-tests:
79
+ <<: *defaults
80
+ steps:
81
+ - checkout
82
+ - *restore_ruby_cache
83
+ - *install_dependencies
84
+ - *save_ruby_cache
85
+ - *download_cc_reporter
86
+ - *persist
87
+ - *run_rspec_tests
88
+ - *upload_coverage
89
+ - store_test_results:
90
+ path: /tmp/test-results
91
+ - store_artifacts:
92
+ path: /tmp/test-results
93
+ destination: test-results
94
+
95
+ release:
96
+ <<: *defaults
97
+ steps:
98
+ - checkout
99
+ - *restore_ruby_cache
100
+ - *setup_rubygems
101
+ - *install_dependencies
102
+ - *save_ruby_cache
103
+ - *release_rubygem
104
+
105
+ workflows:
106
+ version: 2
107
+ commit:
108
+ jobs:
109
+ - rspec-tests
110
+ - release:
111
+ requires:
112
+ - rspec-tests
113
+ filters:
114
+ branches:
115
+ only:
116
+ - master
@@ -0,0 +1,3 @@
1
+ plugins:
2
+ rubocop:
3
+ enabled: true
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ .idea/*
13
+ .DS_STORE
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,2 @@
1
+ inherit_from:
2
+ - .ruby-style.yml
@@ -0,0 +1,254 @@
1
+ AllCops:
2
+ Exclude:
3
+ - "vendor/**/*"
4
+ - "script/**/*"
5
+ - "db/**/*"
6
+ UseCache: false
7
+ TargetRubyVersion: 2.4.1
8
+ Metrics/BlockLength:
9
+ ExcludedMethods: ['describe', 'context', 'it', 'let', 'class_methods', 'define']
10
+ Style/CollectionMethods:
11
+ Description: Preferred collection methods.
12
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
13
+ Enabled: true
14
+ PreferredMethods:
15
+ collect: map
16
+ collect!: map!
17
+ find_all: select
18
+ reduce:
19
+ inject: reduce
20
+ find:
21
+ detect: find
22
+ Style/GuardClause:
23
+ Description: Check for conditionals that can be replaced with guard clauses
24
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
25
+ Enabled: true
26
+ MinBodyLength: 1
27
+ Style/IfUnlessModifier:
28
+ Description: Favor modifier if/unless usage when you have a single-line body.
29
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
30
+ Enabled: true
31
+ Style/OptionHash:
32
+ Description: Don't use option hashes when you can use keyword arguments.
33
+ Enabled: true
34
+ Style/PercentLiteralDelimiters:
35
+ Description: Use `%`-literal delimiters consistently
36
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
37
+ Enabled: true
38
+ PreferredDelimiters:
39
+ "%": "()"
40
+ "%i": "()"
41
+ "%q": "()"
42
+ "%Q": "()"
43
+ "%r": "{}"
44
+ "%s": "()"
45
+ "%w": "()"
46
+ "%W": "()"
47
+ "%x": "()"
48
+ Style/RaiseArgs:
49
+ Description: Checks the arguments passed to raise/fail.
50
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
51
+ Enabled: true
52
+ EnforcedStyle: exploded
53
+ SupportedStyles:
54
+ - compact
55
+ - exploded
56
+ Style/SignalException:
57
+ Description: Checks for proper usage of fail and raise.
58
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
59
+ Enabled: true
60
+ EnforcedStyle: semantic
61
+ SupportedStyles:
62
+ - only_raise
63
+ - only_fail
64
+ - semantic
65
+ Style/SingleLineBlockParams:
66
+ Description: Enforces the names of some block params.
67
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
68
+ Enabled: true
69
+ Methods:
70
+ - reduce:
71
+ - a
72
+ - e
73
+ - inject:
74
+ - a
75
+ - e
76
+ Style/SingleLineMethods:
77
+ Description: Avoid single-line methods.
78
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
79
+ Enabled: true
80
+ AllowIfMethodIsEmpty: true
81
+ Style/StringLiterals:
82
+ Description: Checks if uses of quotes match the configured preference.
83
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
84
+ Enabled: false
85
+ Style/StringLiteralsInInterpolation:
86
+ Description: Checks if uses of quotes inside expressions in interpolated strings
87
+ match the configured preference.
88
+ Enabled: true
89
+ EnforcedStyle: single_quotes
90
+ SupportedStyles:
91
+ - single_quotes
92
+ - double_quotes
93
+ Style/TrailingCommaInArguments:
94
+ EnforcedStyleForMultiline: no_comma
95
+ Style/TrailingCommaInArrayLiteral:
96
+ EnforcedStyleForMultiline: no_comma
97
+ Metrics/AbcSize:
98
+ Description: A calculated magnitude based on number of assignments, branches, and
99
+ conditions.
100
+ Enabled: false
101
+ Max: 15
102
+ Metrics/ClassLength:
103
+ Description: Avoid classes longer than 100 lines of code.
104
+ Enabled: false
105
+ CountComments: false
106
+ Max: 100
107
+ Metrics/ModuleLength:
108
+ CountComments: false
109
+ Max: 100
110
+ Description: Avoid modules longer than 100 lines of code.
111
+ Enabled: false
112
+ Metrics/CyclomaticComplexity:
113
+ Description: A complexity metric that is strongly correlated to the number of test
114
+ cases needed to validate a method.
115
+ Enabled: true
116
+ Max: 6
117
+ Metrics/MethodLength:
118
+ Description: Avoid methods longer than 10 lines of code.
119
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
120
+ Enabled: false
121
+ CountComments: false
122
+ Max: 10
123
+ Metrics/ParameterLists:
124
+ Description: Avoid parameter lists longer than three or four parameters.
125
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
126
+ Enabled: false
127
+ Max: 5
128
+ CountKeywordArgs: true
129
+ Metrics/PerceivedComplexity:
130
+ Description: A complexity metric geared towards measuring complexity for a human
131
+ reader.
132
+ Enabled: false
133
+ Max: 7
134
+ Metrics/LineLength:
135
+ Max: 100
136
+ # To make it possible to copy or click on URIs in the code, we allow lines
137
+ # contaning a URI to be longer than Max.
138
+ AllowURI: true
139
+ URISchemes:
140
+ - http
141
+ - https
142
+ Lint/AssignmentInCondition:
143
+ Description: Don't use assignment in conditions.
144
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
145
+ Enabled: true
146
+ AllowSafeAssignment: true
147
+ Style/InlineComment:
148
+ Description: Avoid inline comments.
149
+ Enabled: false
150
+ Style/Alias:
151
+ Description: Use alias_method instead of alias.
152
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
153
+ Enabled: true
154
+ Style/Documentation:
155
+ Description: Document classes and non-namespace modules.
156
+ Enabled: false
157
+ Style/DoubleNegation:
158
+ Description: Checks for uses of double negation (!!).
159
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
160
+ Enabled: true
161
+ Style/EachWithObject:
162
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
163
+ Enabled: false
164
+ Style/EmptyLiteral:
165
+ Description: Prefer literals to Array.new/Hash.new/String.new.
166
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
167
+ Enabled: true
168
+ Style/ModuleFunction:
169
+ Description: Checks for usage of `extend self` in modules.
170
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
171
+ Enabled: true
172
+ Style/OneLineConditional:
173
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
174
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
175
+ Enabled: true
176
+ Style/PerlBackrefs:
177
+ Description: Avoid Perl-style regex back references.
178
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
179
+ Enabled: true
180
+ Style/Send:
181
+ Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
182
+ may overlap with existing methods.
183
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
184
+ Enabled: true
185
+ Style/SpecialGlobalVars:
186
+ Description: Avoid Perl-style global variables.
187
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
188
+ Enabled: true
189
+ Style/VariableInterpolation:
190
+ Description: Don't interpolate global, instance and class variables directly in
191
+ strings.
192
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
193
+ Enabled: false
194
+ Style/WhenThen:
195
+ Description: Use when x then ... for one-line cases.
196
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
197
+ Enabled: true
198
+ Lint/EachWithObjectArgument:
199
+ Description: Check for immutable argument given to each_with_object.
200
+ Enabled: true
201
+ Lint/HandleExceptions:
202
+ Description: Don't suppress exception.
203
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
204
+ Enabled: false
205
+ Lint/LiteralAsCondition:
206
+ Description: Checks of literals used in conditions.
207
+ Enabled: true
208
+ Lint/LiteralInInterpolation:
209
+ Description: Checks for literals used in interpolation.
210
+ Enabled: true
211
+ Layout/DotPosition:
212
+ Description: Checks the position of the dot in multi-line method calls.
213
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
214
+ Enabled: true
215
+ EnforcedStyle: leading
216
+ SupportedStyles:
217
+ - leading
218
+ - trailing
219
+ Layout/MultilineOperationIndentation:
220
+ EnforcedStyle: indented
221
+ SupportedStyles:
222
+ - aligned
223
+ - indented
224
+ Layout/MultilineMethodCallIndentation:
225
+ EnforcedStyle: indented
226
+ SupportedStyles:
227
+ - aligned
228
+ - indented
229
+ Layout/SpaceInsidePercentLiteralDelimiters:
230
+ Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
231
+ Enabled: false
232
+ Layout/SpaceInLambdaLiteral:
233
+ Description: 'Checks for spaces in lambda literals.'
234
+ Enabled: false
235
+ Naming/FileName:
236
+ Description: Use snake_case for source file names.
237
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
238
+ Enabled: true
239
+ Exclude: []
240
+ Naming/PredicateName:
241
+ Description: Check the names of predicate methods.
242
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
243
+ Enabled: true
244
+ NamePrefix:
245
+ - is_
246
+ - has_
247
+ - have_
248
+ NamePrefixBlacklist:
249
+ - is_
250
+ Exclude:
251
+ - spec/**/*
252
+ Naming/AccessorMethodName:
253
+ Description: Check the naming of accessor methods for get_/set_.
254
+ Enabled: false
@@ -0,0 +1 @@
1
+ 2.4.1
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in clever.gemspec
8
+ gemspec
@@ -0,0 +1,90 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ clever (1.2.5)
5
+ faraday
6
+ faraday_middleware
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.4.0)
12
+ builder (3.2.3)
13
+ coderay (1.1.2)
14
+ diff-lcs (1.3)
15
+ docile (1.3.1)
16
+ faraday (1.0.1)
17
+ multipart-post (>= 1.2, < 3)
18
+ faraday_middleware (1.0.0)
19
+ faraday (~> 1.0)
20
+ jaro_winkler (1.5.2)
21
+ json (2.2.0)
22
+ metaclass (0.0.4)
23
+ method_source (0.8.2)
24
+ mocha (1.8.0)
25
+ metaclass (~> 0.0.1)
26
+ multipart-post (2.1.1)
27
+ parallel (1.14.0)
28
+ parser (2.6.0.0)
29
+ ast (~> 2.4.0)
30
+ powerpack (0.1.2)
31
+ pry (0.10.4)
32
+ coderay (~> 1.1.0)
33
+ method_source (~> 0.8.1)
34
+ slop (~> 3.4)
35
+ pry-nav (0.2.4)
36
+ pry (>= 0.9.10, < 0.11.0)
37
+ psych (3.1.0)
38
+ rainbow (3.0.0)
39
+ rake (10.5.0)
40
+ rspec (3.8.0)
41
+ rspec-core (~> 3.8.0)
42
+ rspec-expectations (~> 3.8.0)
43
+ rspec-mocks (~> 3.8.0)
44
+ rspec-core (3.8.0)
45
+ rspec-support (~> 3.8.0)
46
+ rspec-expectations (3.8.2)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.8.0)
49
+ rspec-mocks (3.8.0)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.8.0)
52
+ rspec-support (3.8.0)
53
+ rspec_junit_formatter (0.2.2)
54
+ builder (< 4)
55
+ rspec-core (>= 2, < 4, != 2.12.0)
56
+ rubocop (0.65.0)
57
+ jaro_winkler (~> 1.5.1)
58
+ parallel (~> 1.10)
59
+ parser (>= 2.5, != 2.5.1.1)
60
+ powerpack (~> 0.1)
61
+ psych (>= 3.1.0)
62
+ rainbow (>= 2.2.2, < 4.0)
63
+ ruby-progressbar (~> 1.7)
64
+ unicode-display_width (~> 1.4.0)
65
+ ruby-progressbar (1.10.0)
66
+ simplecov (0.16.1)
67
+ docile (~> 1.1)
68
+ json (>= 1.8, < 3)
69
+ simplecov-html (~> 0.10.0)
70
+ simplecov-html (0.10.2)
71
+ slop (3.6.0)
72
+ unicode-display_width (1.4.1)
73
+
74
+ PLATFORMS
75
+ ruby
76
+
77
+ DEPENDENCIES
78
+ bundler (~> 2.1.4)
79
+ clever!
80
+ mocha
81
+ pry
82
+ pry-nav
83
+ rake (~> 10.0)
84
+ rspec (~> 3.0)
85
+ rspec_junit_formatter
86
+ rubocop
87
+ simplecov
88
+
89
+ BUNDLED WITH
90
+ 2.1.4