example_file 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 127253a74db21db286783ea5a8eee2929f7dd85ab11a6d2fe2aadac42aabd56b
4
- data.tar.gz: 1bedfb4962cf19fc156d97697a9924980864c56b5556ffff39feb945cc0ffa4e
3
+ metadata.gz: c27c0c37aed4d33ed7fdbaddc5ea08add611a904c5adeb588abc42178de8b2a4
4
+ data.tar.gz: 26812fb041b9727dc718da8f46a6e8e70e7ea58f3d684625fd9ccdbd28898cd8
5
5
  SHA512:
6
- metadata.gz: e5d2cd033e13c51a2905a7d12f9e530492f081c2edbd674463837965c1c5523751f72c27539797e1b4511762372d07ef959f9f4f2485d7fa923005be791321c1
7
- data.tar.gz: 928d302a75284fcc145751762a2f1e56b35f68a992a3ae47a6abfb0955657a4c4133e3a6831f97281fb655e95a825e382b090019ae1336051ac1c1e4e75ef1c8
6
+ metadata.gz: e8008ba9546a72a9e79deafca628ed45cd77e634e25f903fa16f37ee3a68d8577f9ac652358f7ff3c9fdfde8835ad41121b63ac86c1297533f39b6d9645f40c2
7
+ data.tar.gz: d2159ad14738f0afda3f65a6e3d48b5d99ef8e82edcf07e25601c260768de6c6c01459822eb5e50a4d1b47eb2bbca2638be26fe861d9ecf79de6b1ae0c88ee5c
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## master (unreleased)
4
+
5
+ ## 0.2.0 (2020-09-30)
6
+
7
+ ## 0.1.0 (2020-06-02)
8
+
9
+ * Initial release.
data/README.md CHANGED
@@ -1,6 +1,14 @@
1
- # ExampleFile
1
+ # Example File
2
2
 
3
- Class helper for example files. Usualy it's the alternative
3
+ ![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/example_file?style=flat-square)
4
+ [![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/example_file/master.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/example_file)
5
+ [![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/example_file.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/example_file)
6
+ ![Depfu](https://img.shields.io/depfu/AlexWayfer/example_file?style=flat-square)
7
+ [![Inline docs](https://inch-ci.org/github/AlexWayfer/example_file.svg?branch=master)](https://inch-ci.org/github/AlexWayfer/example_file)
8
+ [![license](https://img.shields.io/github/license/AlexWayfer/example_file.svg?style=flat-square)](https://github.com/AlexWayfer/example_file/blob/master/LICENSE.txt)
9
+ [![Gem](https://img.shields.io/gem/v/example_file.svg?style=flat-square)](https://rubygems.org/gems/example_file)
10
+
11
+ Class helper for example files. Usually it's the alternative
4
12
  to environment variables (and `.env` files).
5
13
 
6
14
  You can have git-controlled example files and git-ignored real files.
@@ -40,6 +48,7 @@ regular file.
40
48
  Editor below is `$EDITOR` environment variable.
41
49
  You should set it to your preferred editor, console or GUI
42
50
  (console is more comfortable usually for such scenarios).
51
+ Otherwise the whole program will be aborted with a message about this.
43
52
 
44
53
  It'll act in these ways:
45
54
 
@@ -78,13 +87,13 @@ config/**/*
78
87
  ## Development
79
88
 
80
89
  After checking out the repo, run `bundle install` to install dependencies.
81
- Then, run `bundle exec rake spec` to run the tests.
82
90
 
83
- To install this gem onto your local machine, run `bundle exec rake install`.
84
- To release a new version, update the version number in `version.rb`,
85
- and then run `bundle exec rake release`, which will create a git tag
86
- for the version, push git commits and tags, and push the `.gem` file
87
- to [rubygems.org](https://rubygems.org).
91
+ Then, run `toys rspec` to run the tests.
92
+
93
+ To install this gem onto your local machine, run `toys gem install`.
94
+
95
+ To release a new version, run `toys gem release %version%`.
96
+ See how it works [here](https://github.com/AlexWayfer/gem_toys#release).
88
97
 
89
98
  ## Contributing
90
99
 
@@ -100,6 +100,8 @@ class ExampleFile
100
100
  end
101
101
 
102
102
  def edit_file(filename)
103
+ abort '`EDITOR` environment variable is empty, see README' if ENV['EDITOR'].to_s.empty?
104
+
103
105
  system "eval $EDITOR #{filename}"
104
106
  end
105
107
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ExampleFile
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: example_file
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov
8
- autorequire:
9
- bindir: exe
8
+ autorequire:
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-02 00:00:00.000000000 Z
11
+ date: 2020-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy
@@ -53,61 +53,75 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: codecov
56
+ name: pry-byebug
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.1.0
61
+ version: '3.9'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.1.0
68
+ version: '3.9'
69
69
  - !ruby/object:Gem::Dependency
70
- name: mdl
70
+ name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.9.0
75
+ version: '2.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.9.0
82
+ version: '2.0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: pry-byebug
84
+ name: gem_toys
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.9'
89
+ version: 0.4.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.9'
96
+ version: 0.4.0
97
97
  - !ruby/object:Gem::Dependency
98
- name: rake
98
+ name: toys
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '13.0'
103
+ version: 0.11.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '13.0'
110
+ version: 0.11.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: codecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.2.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.2.0
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rspec
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -123,35 +137,35 @@ dependencies:
123
137
  - !ruby/object:Gem::Version
124
138
  version: '3.9'
125
139
  - !ruby/object:Gem::Dependency
126
- name: rubocop
140
+ name: simplecov
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: 0.85.0
145
+ version: 0.19.0
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: 0.85.0
152
+ version: 0.19.0
139
153
  - !ruby/object:Gem::Dependency
140
- name: rubocop-performance
154
+ name: rubocop
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
157
  - - "~>"
144
158
  - !ruby/object:Gem::Version
145
- version: '1.0'
159
+ version: 0.92.0
146
160
  type: :development
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
164
  - - "~>"
151
165
  - !ruby/object:Gem::Version
152
- version: '1.0'
166
+ version: 0.92.0
153
167
  - !ruby/object:Gem::Dependency
154
- name: rubocop-rspec
168
+ name: rubocop-performance
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
171
  - - "~>"
@@ -165,19 +179,19 @@ dependencies:
165
179
  - !ruby/object:Gem::Version
166
180
  version: '1.0'
167
181
  - !ruby/object:Gem::Dependency
168
- name: simplecov
182
+ name: rubocop-rspec
169
183
  requirement: !ruby/object:Gem::Requirement
170
184
  requirements:
171
185
  - - "~>"
172
186
  - !ruby/object:Gem::Version
173
- version: 0.18.0
187
+ version: '1.0'
174
188
  type: :development
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
192
  - - "~>"
179
193
  - !ruby/object:Gem::Version
180
- version: 0.18.0
194
+ version: '1.0'
181
195
  description: |
182
196
  Class helper for example files.
183
197
  Usualy it's the alternative to environment variables (and `.env` files).
@@ -189,18 +203,9 @@ executables: []
189
203
  extensions: []
190
204
  extra_rdoc_files: []
191
205
  files:
192
- - ".cirrus.yml"
193
- - ".editorconfig"
194
- - ".gitignore"
195
- - ".mdl.style.rb"
196
- - ".mdlrc"
197
- - ".rspec"
198
- - ".rubocop.yml"
199
- - Gemfile
206
+ - CHANGELOG.md
200
207
  - LICENSE.txt
201
208
  - README.md
202
- - Rakefile
203
- - example_file.gemspec
204
209
  - lib/example_file.rb
205
210
  - lib/example_file/version.rb
206
211
  homepage: https://github.com/AlexWayfer/example_file
@@ -209,7 +214,8 @@ licenses:
209
214
  metadata:
210
215
  source_code_uri: https://github.com/AlexWayfer/example_file
211
216
  homepage_uri: https://github.com/AlexWayfer/example_file
212
- post_install_message:
217
+ changelog_uri: https://github.com/AlexWayfer/example_file/blob/master/CHANGELOG.md
218
+ post_install_message:
213
219
  rdoc_options: []
214
220
  require_paths:
215
221
  - lib
@@ -225,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
231
  version: '0'
226
232
  requirements: []
227
233
  rubygems_version: 3.1.2
228
- signing_key:
234
+ signing_key:
229
235
  specification_version: 4
230
236
  summary: Class helper for example files
231
237
  test_files: []
@@ -1,35 +0,0 @@
1
- bundle_cache: &bundle_cache
2
- bundle_cache:
3
- folder: /usr/local/bundle
4
- fingerprint_script:
5
- - echo $CIRRUS_OS
6
- - ruby -v
7
- - cat Gemfile
8
- - cat *.gemspec
9
- install_script: bundle update
10
-
11
- markdownlint_task:
12
- container:
13
- image: ruby:latest
14
- <<: *bundle_cache
15
- rubocop_script: bundle exec mdl .
16
-
17
- rubocop_task:
18
- container:
19
- image: ruby:latest
20
- <<: *bundle_cache
21
- rubocop_script: bundle exec rubocop
22
-
23
- test_task:
24
- depends_on:
25
- - rubocop
26
- - markdownlint
27
- container:
28
- matrix:
29
- image: ruby:2.5
30
- image: ruby:2.6
31
- image: ruby:2.7
32
- <<: *bundle_cache
33
- environment:
34
- CODECOV_TOKEN: ENCRYPTED[de650f17db291399a09839a898ab3be8d0bb09a14b369f16f31a1831d6db8d826d4601ea7ad87eab99d005ad832846cc]
35
- test_script: bundle exec rake
@@ -1,18 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab
5
- indent_size = 2
6
- end_of_line = lf
7
- charset = utf-8
8
- trim_trailing_whitespace = true
9
- insert_final_newline = true
10
- max_line_length = 100
11
-
12
- [*.y{a,}ml]
13
- indent_style = space
14
- indent_size = 2
15
-
16
- [*.md]
17
- indent_style = space
18
- indent_size = 4
data/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- Gemfile.lock
2
- /coverage/
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- all
4
-
5
- rule 'MD007', indent: 4
6
- rule 'MD024', allow_different_nesting: true
7
- rule 'MD029', style: 'ordered'
8
- rule 'MD030', ul_single: 3, ul_multi: 3, ol_single: 2, ol_multi: 2
data/.mdlrc DELETED
@@ -1 +0,0 @@
1
- style ".mdl.style.rb"
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --warnings
2
- --color
3
- --require spec_helper
@@ -1,58 +0,0 @@
1
- require:
2
- - rubocop-performance
3
- - rubocop-rspec
4
-
5
- Layout/IndentationStyle:
6
- EnforcedStyle: tabs
7
- IndentationWidth: 2
8
- Layout/IndentationWidth:
9
- Width: 1
10
- Layout/LineLength:
11
- Max: 100
12
- Layout/MultilineMethodCallIndentation:
13
- EnforcedStyle: indented
14
- Layout/ArgumentAlignment:
15
- EnforcedStyle: with_fixed_indentation
16
- Layout/EmptyLinesAroundAttributeAccessor:
17
- Enabled: true
18
- Layout/SpaceAroundMethodCallOperator:
19
- Enabled: true
20
-
21
- Lint/DeprecatedOpenSSLConstant:
22
- Enabled: true
23
- Lint/MixedRegexpCaptureTypes:
24
- Enabled: true
25
- Lint/RaiseException:
26
- Enabled: true
27
- Lint/StructNewOverride:
28
- Enabled: true
29
-
30
- Style/HashEachMethods:
31
- Enabled: true
32
- Style/HashTransformKeys:
33
- Enabled: true
34
- Style/HashTransformValues:
35
- Enabled: true
36
- Style/ExponentialNotation:
37
- Enabled: true
38
- Style/RedundantRegexpCharacterClass:
39
- Enabled: true
40
- Style/RedundantRegexpEscape:
41
- Enabled: true
42
- Style/SlicingWithRange:
43
- Enabled: true
44
-
45
- Metrics/BlockLength:
46
- Exclude:
47
- - '*.gemspec'
48
- - spec/**/*.rb
49
-
50
- AllCops:
51
- TargetRubyVersion: 2.5
52
-
53
- RSpec/NestedGroups:
54
- Max: 6
55
- RSpec/RepeatedExampleGroupBody:
56
- Exclude:
57
- ## Variables are generating from context description
58
- - spec/example_file_spec.rb
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task default: :spec
@@ -1,58 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'lib/example_file/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'example_file'
7
- spec.version = ExampleFile::VERSION
8
- spec.authors = ['Alexander Popov']
9
- spec.email = ['alex.wayfer@gmail.com']
10
-
11
- spec.summary = 'Class helper for example files'
12
- spec.description = <<~DESC
13
- Class helper for example files.
14
- Usualy it's the alternative to environment variables (and `.env` files).
15
- You can have git-controlled example files and git-ignored real files.
16
- For example, configuration, especially with sensitive data.
17
- DESC
18
- spec.license = 'MIT'
19
-
20
- spec.required_ruby_version = '>= 2.5'
21
-
22
- source_code_uri = 'https://github.com/AlexWayfer/example_file'
23
-
24
- spec.homepage = source_code_uri
25
-
26
- spec.metadata['source_code_uri'] = source_code_uri
27
-
28
- spec.metadata['homepage_uri'] = spec.homepage
29
-
30
- # TODO: Put your gem's CHANGELOG.md URL here.
31
- # spec.metadata["changelog_uri"] = ""
32
-
33
- # Specify which files should be added to the gem when it is released.
34
- # The `git ls-files -z` loads the files in the RubyGem that have been added
35
- # into git.
36
- spec.files = Dir.chdir(__dir__) do
37
- `git ls-files -z`.split("\x0").reject do |file|
38
- file.match(%r{^(test|spec|features)/})
39
- end
40
- end
41
- spec.bindir = 'exe'
42
- spec.executables = spec.files.grep(%r{^exe/}) { |file| File.basename(file) }
43
- spec.require_paths = ['lib']
44
-
45
- spec.add_runtime_dependency 'diffy', '~> 3.0'
46
- spec.add_runtime_dependency 'highline', '~> 2.0'
47
- spec.add_runtime_dependency 'paint', '~> 2.0'
48
-
49
- spec.add_development_dependency 'codecov', '~> 0.1.0'
50
- spec.add_development_dependency 'mdl', '~> 0.9.0'
51
- spec.add_development_dependency 'pry-byebug', '~> 3.9'
52
- spec.add_development_dependency 'rake', '~> 13.0'
53
- spec.add_development_dependency 'rspec', '~> 3.9'
54
- spec.add_development_dependency 'rubocop', '~> 0.85.0'
55
- spec.add_development_dependency 'rubocop-performance', '~> 1.0'
56
- spec.add_development_dependency 'rubocop-rspec', '~> 1.0'
57
- spec.add_development_dependency 'simplecov', '~> 0.18.0'
58
- end