thanoscase 0.0.2 → 0.0.3

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: b7645870ddf8dec162523f139ee3a9ed78d704b867b754c2cd7ad553e8a717ee
4
- data.tar.gz: c8ea0f80fee9294e8eb19ed2d509f2b7cfa6a4a0489354a2826be3e962aed53f
3
+ metadata.gz: c921606aed6f2a041a38b81bc2b5503ed1c4a5ea9e1441aa42dcee509ea7ca01
4
+ data.tar.gz: 434cb23e0d92fa5c5c1c2b0c286face077d6a2995a626f7ef407935810357cea
5
5
  SHA512:
6
- metadata.gz: 19c154b6357e27ef8b63b397931e23b4b029f9b6f01c5ee730890cadffdf051420324f57170bfb450c24c4798e162077f507aa1b4fbce556f0392f66a4d44fb4
7
- data.tar.gz: d739f35cc27c1f186331ed5c24eb0bcc53efd425d03fa8371b73fb2511927e9de9dfc68873f978799df381073b4705b58bcfa013fbdcc7f32772fa165a35da39
6
+ metadata.gz: db47312e7e2d0f3faa8601169e17e20578372974d0a4e390914f29193ae3f26fc3c0f68978f5705e6937d788dca9400d16e355232c751ad70334ceac205645d2
7
+ data.tar.gz: 0b27626db9d5089086809a9d10c02815a98aac16c18a4dcff0b0ff231fe7d76076cfec45696dc83b4f3a03cfb6b8c103c130a3e088c7fc8a513acfa511af0d9b
@@ -0,0 +1,8 @@
1
+ .DS_Store
2
+ results.html
3
+ pkg
4
+ html
5
+ .idea
6
+ .byebug_history
7
+ coverage
8
+ *.gem
data/.rspec CHANGED
@@ -1 +1 @@
1
- --require spec_helper
1
+ --require spec_helper --format documentation
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
@@ -1,32 +1,64 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- thanoscase (0.0.2)
4
+ thanoscase (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.3)
10
- rspec (3.8.0)
11
- rspec-core (~> 3.8.0)
12
- rspec-expectations (~> 3.8.0)
13
- rspec-mocks (~> 3.8.0)
14
- rspec-core (3.8.0)
15
- rspec-support (~> 3.8.0)
16
- rspec-expectations (3.8.2)
9
+ ast (2.4.1)
10
+ byebug (11.1.3)
11
+ diff-lcs (1.4.4)
12
+ docile (1.3.2)
13
+ json (2.3.1)
14
+ parallel (1.19.2)
15
+ parser (2.7.1.4)
16
+ ast (~> 2.4.1)
17
+ rainbow (3.0.0)
18
+ regexp_parser (1.7.1)
19
+ rexml (3.2.4)
20
+ rspec (3.9.0)
21
+ rspec-core (~> 3.9.0)
22
+ rspec-expectations (~> 3.9.0)
23
+ rspec-mocks (~> 3.9.0)
24
+ rspec-core (3.9.2)
25
+ rspec-support (~> 3.9.3)
26
+ rspec-expectations (3.9.2)
17
27
  diff-lcs (>= 1.2.0, < 2.0)
18
- rspec-support (~> 3.8.0)
19
- rspec-mocks (3.8.0)
28
+ rspec-support (~> 3.9.0)
29
+ rspec-mocks (3.9.1)
20
30
  diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.8.0)
22
- rspec-support (3.8.0)
31
+ rspec-support (~> 3.9.0)
32
+ rspec-support (3.9.3)
33
+ rubocop (0.86.0)
34
+ parallel (~> 1.10)
35
+ parser (>= 2.7.0.1)
36
+ rainbow (>= 2.2.2, < 4.0)
37
+ regexp_parser (>= 1.7)
38
+ rexml
39
+ rubocop-ast (>= 0.0.3, < 1.0)
40
+ ruby-progressbar (~> 1.7)
41
+ unicode-display_width (>= 1.4.0, < 2.0)
42
+ rubocop-ast (0.1.0)
43
+ parser (>= 2.7.0.1)
44
+ ruby-progressbar (1.10.1)
45
+ simplecov (0.17.1)
46
+ docile (~> 1.1)
47
+ json (>= 1.8, < 3)
48
+ simplecov-html (~> 0.10.0)
49
+ simplecov-html (0.10.2)
50
+ unicode-display_width (1.7.0)
23
51
 
24
52
  PLATFORMS
25
53
  ruby
26
54
 
27
55
  DEPENDENCIES
28
- rspec (~> 3.8)
56
+ bundler (~> 2.1, >= 2.1.4)
57
+ byebug (~> 11.1, >= 11.1.3)
58
+ rspec (~> 3.9)
59
+ rubocop (~> 0.86.0)
60
+ simplecov (~> 0.17.1)
29
61
  thanoscase!
30
62
 
31
63
  BUNDLED WITH
32
- 1.17.3
64
+ 2.1.4
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ [![Maintainability](https://api.codeclimate.com/v1/badges/e44605df0cb27199d63f/maintainability)](https://codeclimate.com/github/nisevi/thanoscase/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/e44605df0cb27199d63f/test_coverage)](https://codeclimate.com/github/nisevi/thanoscase/test_coverage) [![Build Status](https://semaphoreci.com/api/v1/nisevi/thanoscase/branches/master/shields_badge.svg)](https://semaphoreci.com/nisevi/thanoscase)
2
+ [![Gem Version](https://badge.fury.io/rb/thanoscase.svg)](https://badge.fury.io/rb/thanoscase)
3
+
1
4
  # Thanoscase
2
5
 
3
6
  Wipes out your strings from the universe
@@ -7,7 +10,7 @@ Wipes out your strings from the universe
7
10
  In your gemfile:
8
11
 
9
12
  ```ruby
10
- gem 'thanoscase', '~> 0.0.1'
13
+ gem 'thanoscase'
11
14
  ```
12
15
 
13
16
  or in the console:
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "thanoscase/string"
3
+ require 'thanoscase/string'
@@ -3,7 +3,8 @@
3
3
  class String
4
4
  def thanoscase!
5
5
  return self if empty?
6
- half_universe = length/2
6
+
7
+ half_universe = length / 2
7
8
  half_universe.times { slice!(rand(length)) }
8
9
  self
9
10
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Thanoscase
4
+ VERSION = '0.0.3'
5
+ end
@@ -1,21 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'thanoscase/version'
6
+
3
7
  Gem::Specification.new do |s|
4
- s.name = "thanoscase"
5
- s.version = "0.0.2"
6
- s.date = "2019-04-27"
7
- s.summary = "Thanos gem"
8
- s.description = "Randomly removes half the characters of a given string."
9
- s.authors = ["Nicolas Sebastian Vidal"]
10
- s.email = "nicolas.s.vidal@gmail.com"
11
- s.homepage = "https://github.com/nisevi/thanoscase"
12
- s.bindir = "bin"
8
+ s.name = 'thanoscase'
9
+ s.version = Thanoscase::VERSION
10
+ s.date = '2019-04-27'
11
+ s.summary = 'Thanos gem'
12
+ s.description = 'Randomly removes half the characters of a given string.'
13
+ s.authors = ['Nicolas Sebastian Vidal']
14
+ s.email = 'nicolas.s.vidal@gmail.com'
15
+ s.homepage = 'https://github.com/nisevi/thanoscase'
16
+ s.bindir = 'bin'
13
17
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
- s.require_paths = ["lib"]
15
- s.license = "MIT"
18
+ s.require_paths = ['lib']
19
+ s.license = 'MIT'
16
20
  s.files = `git ls-files -z`.split("\x0").reject do |f|
17
21
  f.match(%r{^(test|spec|features)/})
18
22
  end
19
- s.required_ruby_version = ">= 2.5.0"
20
- s.add_development_dependency "rspec", "~> 3.8"
23
+ s.required_ruby_version = '>= 2.7.1'
24
+
25
+ s.add_development_dependency 'bundler', '~> 2.1', '>= 2.1.4'
26
+ s.add_development_dependency 'byebug', '~> 11.1', '>= 11.1.3'
27
+ s.add_development_dependency 'rspec', '~> 3.9'
28
+ s.add_development_dependency 'rubocop', '~> 0.86.0'
29
+ s.add_development_dependency 'simplecov', '~> 0.17.1'
21
30
  end
metadata CHANGED
@@ -1,38 +1,105 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thanoscase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Sebastian Vidal
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2019-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.1.4
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '2.1'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.1.4
33
+ - !ruby/object:Gem::Dependency
34
+ name: byebug
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '11.1'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 11.1.3
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '11.1'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 11.1.3
13
53
  - !ruby/object:Gem::Dependency
14
54
  name: rspec
15
55
  requirement: !ruby/object:Gem::Requirement
16
56
  requirements:
17
57
  - - "~>"
18
58
  - !ruby/object:Gem::Version
19
- version: '3.8'
59
+ version: '3.9'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '3.9'
67
+ - !ruby/object:Gem::Dependency
68
+ name: rubocop
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: 0.86.0
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: 0.86.0
81
+ - !ruby/object:Gem::Dependency
82
+ name: simplecov
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: 0.17.1
20
88
  type: :development
21
89
  prerelease: false
22
90
  version_requirements: !ruby/object:Gem::Requirement
23
91
  requirements:
24
92
  - - "~>"
25
93
  - !ruby/object:Gem::Version
26
- version: '3.8'
94
+ version: 0.17.1
27
95
  description: Randomly removes half the characters of a given string.
28
96
  email: nicolas.s.vidal@gmail.com
29
97
  executables: []
30
98
  extensions: []
31
99
  extra_rdoc_files: []
32
100
  files:
33
- - ".circleci/config.yml"
101
+ - ".gitignore"
34
102
  - ".rspec"
35
- - ".rubocop.yml"
36
103
  - CODE_OF_CONDUCT.md
37
104
  - Gemfile
38
105
  - Gemfile.lock
@@ -40,12 +107,13 @@ files:
40
107
  - README.md
41
108
  - lib/thanoscase.rb
42
109
  - lib/thanoscase/string.rb
110
+ - lib/thanoscase/version.rb
43
111
  - thanoscase.gemspec
44
112
  homepage: https://github.com/nisevi/thanoscase
45
113
  licenses:
46
114
  - MIT
47
115
  metadata: {}
48
- post_install_message:
116
+ post_install_message:
49
117
  rdoc_options: []
50
118
  require_paths:
51
119
  - lib
@@ -53,15 +121,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
121
  requirements:
54
122
  - - ">="
55
123
  - !ruby/object:Gem::Version
56
- version: 2.5.0
124
+ version: 2.7.1
57
125
  required_rubygems_version: !ruby/object:Gem::Requirement
58
126
  requirements:
59
127
  - - ">="
60
128
  - !ruby/object:Gem::Version
61
129
  version: '0'
62
130
  requirements: []
63
- rubygems_version: 3.0.3
64
- signing_key:
131
+ rubygems_version: 3.1.4
132
+ signing_key:
65
133
  specification_version: 4
66
134
  summary: Thanos gem
67
135
  test_files: []
@@ -1,43 +0,0 @@
1
- version: 2.1
2
- commands:
3
- cached-bundle:
4
- steps:
5
- - restore_cache:
6
- keys:
7
- - gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
8
- - gem-cache-v1-{{ arch }}-{{ .Branch }}
9
- - gem-cache-v1
10
- - run: bundle install --path vendor/bundle
11
- - save_cache:
12
- key: gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
13
- paths:
14
- - vendor/bundle
15
- rspec-tests:
16
- steps:
17
- - run: |
18
- bundle exec rspec \
19
- --profile 10 \
20
- --format progress \
21
- $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
22
-
23
- executors:
24
- ruby-2-6-2:
25
- docker:
26
- - image: circleci/ruby:2.6.2
27
- environment:
28
- BUNDLE_JOBS: 3
29
- BUNDLE_RETRY: 3
30
- BUNDLE_PATH: vendor/bundle
31
- jobs:
32
- build:
33
- working_directory: ~/app
34
- executor: ruby-2-6-2
35
- steps:
36
- - checkout
37
- - cached-bundle
38
- - rspec-tests
39
-
40
- workflows:
41
- main:
42
- jobs:
43
- - build
@@ -1,245 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.5
3
- # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
4
- # to ignore them, so only the ones explicitly set in this file are enabled.
5
- DisabledByDefault: true
6
-
7
- Performance:
8
- Exclude:
9
- - '**/test/**/*'
10
-
11
- Rails:
12
- Enabled: true
13
-
14
- # Prefer assert_not over assert !
15
- Rails/AssertNot:
16
- Include:
17
- - '**/test/**/*'
18
-
19
- # Prefer assert_not_x over refute_x
20
- Rails/RefuteMethods:
21
- Include:
22
- - '**/test/**/*'
23
-
24
- # Prefer &&/|| over and/or.
25
- Style/AndOr:
26
- Enabled: true
27
-
28
- # Do not use braces for hash literals when they are the last argument of a
29
- # method call.
30
- Style/BracesAroundHashParameters:
31
- Enabled: true
32
- EnforcedStyle: context_dependent
33
-
34
- # Align `when` with `case`.
35
- Layout/CaseIndentation:
36
- Enabled: true
37
-
38
- # Align comments with method definitions.
39
- Layout/CommentIndentation:
40
- Enabled: true
41
-
42
- Layout/ElseAlignment:
43
- Enabled: true
44
-
45
- # Align `end` with the matching keyword or starting expression except for
46
- # assignments, where it should be aligned with the LHS.
47
- Layout/EndAlignment:
48
- Enabled: true
49
- EnforcedStyleAlignWith: variable
50
- AutoCorrect: true
51
-
52
- Layout/EmptyLineAfterMagicComment:
53
- Enabled: true
54
-
55
- Layout/EmptyLinesAroundBlockBody:
56
- Enabled: true
57
-
58
- # In a regular class definition, no empty lines around the body.
59
- Layout/EmptyLinesAroundClassBody:
60
- Enabled: true
61
-
62
- # In a regular method definition, no empty lines around the body.
63
- Layout/EmptyLinesAroundMethodBody:
64
- Enabled: true
65
-
66
- # In a regular module definition, no empty lines around the body.
67
- Layout/EmptyLinesAroundModuleBody:
68
- Enabled: true
69
-
70
- Layout/FirstParameterIndentation:
71
- Enabled: true
72
-
73
- # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
74
- Style/HashSyntax:
75
- Enabled: true
76
-
77
- # Method definitions after `private` or `protected` isolated calls need one
78
- # extra level of indentation.
79
- Layout/IndentationConsistency:
80
- Enabled: true
81
- EnforcedStyle: rails
82
-
83
- # Two spaces, no tabs (for indentation).
84
- Layout/IndentationWidth:
85
- Enabled: true
86
-
87
- Layout/LeadingCommentSpace:
88
- Enabled: true
89
-
90
- Layout/SpaceAfterColon:
91
- Enabled: true
92
-
93
- Layout/SpaceAfterComma:
94
- Enabled: true
95
-
96
- Layout/SpaceAfterSemicolon:
97
- Enabled: true
98
-
99
- Layout/SpaceAroundEqualsInParameterDefault:
100
- Enabled: true
101
-
102
- Layout/SpaceAroundKeyword:
103
- Enabled: true
104
-
105
- Layout/SpaceAroundOperators:
106
- Enabled: true
107
-
108
- Layout/SpaceBeforeComma:
109
- Enabled: true
110
-
111
- Layout/SpaceBeforeComment:
112
- Enabled: true
113
-
114
- Layout/SpaceBeforeFirstArg:
115
- Enabled: true
116
-
117
- Style/DefWithParentheses:
118
- Enabled: true
119
-
120
- # Defining a method with parameters needs parentheses.
121
- Style/MethodDefParentheses:
122
- Enabled: true
123
-
124
- Style/FrozenStringLiteralComment:
125
- Enabled: true
126
- EnforcedStyle: always
127
- Exclude:
128
- - 'actionview/test/**/*.builder'
129
- - 'actionview/test/**/*.ruby'
130
- - 'actionpack/test/**/*.builder'
131
- - 'actionpack/test/**/*.ruby'
132
- - 'activestorage/db/migrate/**/*.rb'
133
- - 'activestorage/db/update_migrate/**/*.rb'
134
- - 'actionmailbox/db/migrate/**/*.rb'
135
- - 'actiontext/db/migrate/**/*.rb'
136
-
137
- Style/RedundantFreeze:
138
- Enabled: true
139
-
140
- # Use `foo {}` not `foo{}`.
141
- Layout/SpaceBeforeBlockBraces:
142
- Enabled: true
143
-
144
- # Use `foo { bar }` not `foo {bar}`.
145
- Layout/SpaceInsideBlockBraces:
146
- Enabled: true
147
- EnforcedStyleForEmptyBraces: space
148
-
149
- # Use `{ a: 1 }` not `{a:1}`.
150
- Layout/SpaceInsideHashLiteralBraces:
151
- Enabled: true
152
-
153
- Layout/SpaceInsideParens:
154
- Enabled: true
155
-
156
- # Check quotes usage according to lint rule below.
157
- Style/StringLiterals:
158
- Enabled: true
159
- EnforcedStyle: double_quotes
160
-
161
- # Detect hard tabs, no hard tabs.
162
- Layout/Tab:
163
- Enabled: true
164
-
165
- # Blank lines should not have any spaces.
166
- Layout/TrailingBlankLines:
167
- Enabled: true
168
-
169
- # No trailing whitespace.
170
- Layout/TrailingWhitespace:
171
- Enabled: true
172
-
173
- # Use quotes for string literals when they are enough.
174
- Style/UnneededPercentQ:
175
- Enabled: true
176
-
177
- Lint/AmbiguousOperator:
178
- Enabled: true
179
-
180
- Lint/AmbiguousRegexpLiteral:
181
- Enabled: true
182
-
183
- Lint/ErbNewArguments:
184
- Enabled: true
185
-
186
- # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
187
- Lint/RequireParentheses:
188
- Enabled: true
189
-
190
- Lint/ShadowingOuterLocalVariable:
191
- Enabled: true
192
-
193
- Lint/StringConversionInInterpolation:
194
- Enabled: true
195
-
196
- Lint/UriEscapeUnescape:
197
- Enabled: true
198
-
199
- Lint/UselessAssignment:
200
- Enabled: true
201
-
202
- Lint/DeprecatedClassMethods:
203
- Enabled: true
204
-
205
- Style/ParenthesesAroundCondition:
206
- Enabled: true
207
-
208
- Style/RedundantBegin:
209
- Enabled: true
210
-
211
- Style/RedundantReturn:
212
- Enabled: true
213
- AllowMultipleReturnValues: true
214
-
215
- Style/Semicolon:
216
- Enabled: true
217
- AllowAsExpressionSeparator: true
218
-
219
- # Prefer Foo.method over Foo::method
220
- Style/ColonMethodCall:
221
- Enabled: true
222
-
223
- Style/TrivialAccessors:
224
- Enabled: true
225
-
226
- Performance/FlatMap:
227
- Enabled: true
228
-
229
- Performance/RedundantMerge:
230
- Enabled: true
231
-
232
- Performance/StartWith:
233
- Enabled: true
234
-
235
- Performance/EndWith:
236
- Enabled: true
237
-
238
- Performance/RegexpMatch:
239
- Enabled: true
240
-
241
- Performance/ReverseEach:
242
- Enabled: true
243
-
244
- Performance/UnfreezeString:
245
- Enabled: true