gemaker 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +103 -0
  3. data/.circleci/setup-rubygems.sh +3 -0
  4. data/.rubocop.yml +72 -614
  5. data/.ruby-version +1 -1
  6. data/CHANGELOG.md +33 -0
  7. data/README.md +16 -1
  8. data/gemaker.gemspec +9 -15
  9. data/lib/gemaker.rb +2 -1
  10. data/lib/gemaker/cli.rb +8 -6
  11. data/lib/gemaker/commands/add_cli_structure.rb +1 -0
  12. data/lib/gemaker/commands/add_install_generator.rb +30 -6
  13. data/lib/gemaker/commands/configure_continuous_integration.rb +23 -0
  14. data/lib/gemaker/commands/configure_editor_config.rb +10 -0
  15. data/lib/gemaker/commands/configure_git.rb +13 -2
  16. data/lib/gemaker/commands/configure_test_env.rb +9 -6
  17. data/lib/gemaker/commands/create_gem.rb +11 -5
  18. data/lib/gemaker/commands/customize_engine.rb +31 -4
  19. data/lib/gemaker/config.rb +1 -9
  20. data/lib/gemaker/templates/circle_config.yml.erb +103 -0
  21. data/lib/gemaker/templates/circleci-setup-script.sh +3 -0
  22. data/lib/gemaker/templates/editorconfig +24 -0
  23. data/lib/gemaker/templates/engine/Guardfile +6 -9
  24. data/lib/gemaker/templates/engine/README.md.erb +45 -2
  25. data/lib/gemaker/templates/engine/development.rb.erb +81 -0
  26. data/lib/gemaker/templates/engine/engine.rb.erb +1 -1
  27. data/lib/gemaker/templates/engine/gemspec.erb +9 -5
  28. data/lib/gemaker/templates/engine/gitignore +10 -0
  29. data/lib/gemaker/templates/engine/install_generator.rb.erb +0 -2
  30. data/lib/gemaker/templates/engine/rails_helper.rb.erb +24 -9
  31. data/lib/gemaker/templates/engine/rubocop.yml.erb +503 -0
  32. data/lib/gemaker/templates/normal/README.md.erb +14 -0
  33. data/lib/gemaker/templates/normal/gemspec.erb +9 -5
  34. data/lib/gemaker/templates/normal/rubocop.yml.erb +496 -0
  35. data/lib/gemaker/templates/normal/spec_helper.rb.erb +11 -0
  36. data/lib/gemaker/templates/ruby-version.erb +1 -1
  37. data/lib/gemaker/util.rb +3 -2
  38. data/lib/gemaker/version.rb +7 -1
  39. metadata +65 -50
  40. data/.coveralls.yml +0 -1
  41. data/.hound.yml +0 -4
  42. data/.travis.yml +0 -13
  43. data/lib/gemaker/commands/add_hound_rules.rb +0 -12
@@ -1,3 +1,14 @@
1
+ require 'simplecov'
2
+ require 'coveralls'
3
+
4
+ formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
5
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter::new(formatters)
6
+
7
+ SimpleCov.start do
8
+ add_filter { |src| !(src.filename =~ /lib/) }
9
+ add_filter "spec.rb"
10
+ end
11
+
1
12
  $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
2
13
  require "<%= config.gem_name %>"
3
14
  require "pry"
@@ -1 +1 @@
1
- <%= config.ruby_version %>
1
+ <%= Gemaker::RUBY_VERSION %>
data/lib/gemaker/util.rb CHANGED
@@ -5,7 +5,7 @@ module Gemaker
5
5
  end
6
6
 
7
7
  def copy_template(source, destination, locales = {})
8
- template_path = get_template_path(source) + ".erb"
8
+ template_path = "#{get_template_path(source)}.erb"
9
9
  destination_path = get_destination_path(destination)
10
10
 
11
11
  input = File.open(template_path)
@@ -62,7 +62,7 @@ module Gemaker
62
62
  def parse_erb(content, data)
63
63
  b = binding
64
64
  data.each { |k, v| singleton_class.send(:define_method, k) { v } }
65
- ERB.new(content, nil, "-").result(b)
65
+ ERB.new(content, trim_mode: '-').result(b)
66
66
  end
67
67
 
68
68
  def info(string)
@@ -71,6 +71,7 @@ module Gemaker
71
71
 
72
72
  def error(string)
73
73
  return if string.blank?
74
+
74
75
  puts string.to_s.red
75
76
  end
76
77
  end
@@ -1,3 +1,9 @@
1
1
  module Gemaker
2
- VERSION = "0.3.0"
2
+ VERSION = "1.0.0"
3
+ BUNDLER_VERSION = "2.2.15"
4
+ RAILS_VERSION = "6.0"
5
+ MIN_RAILS_VERSION = "6.0"
6
+ RUBY_VERSIONS = ["2.5", "2.6", "2.7"]
7
+ RUBY_VERSION = RUBY_VERSIONS.last
8
+ RUBOCOP_VERSION = "1.9"
3
9
  end
metadata CHANGED
@@ -1,129 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Segovia
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-28 00:00:00.000000000 Z
11
+ date: 2021-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: power-types
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.1'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
- version: 0.1.0
19
+ version: '0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '0.1'
30
24
  - - ">="
31
25
  - !ruby/object:Gem::Version
32
- version: 0.1.0
26
+ version: '0'
33
27
  - !ruby/object:Gem::Dependency
34
- name: commander
28
+ name: artii
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: '4.4'
33
+ version: '2.1'
40
34
  - - ">="
41
35
  - !ruby/object:Gem::Version
42
- version: 4.4.0
36
+ version: 2.1.1
43
37
  type: :runtime
44
38
  prerelease: false
45
39
  version_requirements: !ruby/object:Gem::Requirement
46
40
  requirements:
47
41
  - - "~>"
48
42
  - !ruby/object:Gem::Version
49
- version: '4.4'
43
+ version: '2.1'
50
44
  - - ">="
51
45
  - !ruby/object:Gem::Version
52
- version: 4.4.0
46
+ version: 2.1.1
53
47
  - !ruby/object:Gem::Dependency
54
- name: activesupport
48
+ name: colorize
55
49
  requirement: !ruby/object:Gem::Requirement
56
50
  requirements:
57
51
  - - "~>"
58
52
  - !ruby/object:Gem::Version
59
- version: '4.2'
53
+ version: '0.7'
60
54
  - - ">="
61
55
  - !ruby/object:Gem::Version
62
- version: 4.2.6
56
+ version: 0.7.7
63
57
  type: :runtime
64
58
  prerelease: false
65
59
  version_requirements: !ruby/object:Gem::Requirement
66
60
  requirements:
67
61
  - - "~>"
68
62
  - !ruby/object:Gem::Version
69
- version: '4.2'
63
+ version: '0.7'
70
64
  - - ">="
71
65
  - !ruby/object:Gem::Version
72
- version: 4.2.6
66
+ version: 0.7.7
73
67
  - !ruby/object:Gem::Dependency
74
- name: colorize
68
+ name: commander
75
69
  requirement: !ruby/object:Gem::Requirement
76
70
  requirements:
77
- - - "~>"
78
- - !ruby/object:Gem::Version
79
- version: '0.7'
80
71
  - - ">="
81
72
  - !ruby/object:Gem::Version
82
- version: 0.7.7
73
+ version: '0'
83
74
  type: :runtime
84
75
  prerelease: false
85
76
  version_requirements: !ruby/object:Gem::Requirement
86
77
  requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '0.7'
90
78
  - - ">="
91
79
  - !ruby/object:Gem::Version
92
- version: 0.7.7
80
+ version: '0'
93
81
  - !ruby/object:Gem::Dependency
94
- name: artii
82
+ name: power-types
95
83
  requirement: !ruby/object:Gem::Requirement
96
84
  requirements:
97
- - - "~>"
98
- - !ruby/object:Gem::Version
99
- version: '2.1'
100
85
  - - ">="
101
86
  - !ruby/object:Gem::Version
102
- version: 2.1.1
87
+ version: '0'
103
88
  type: :runtime
104
89
  prerelease: false
105
90
  version_requirements: !ruby/object:Gem::Requirement
106
91
  requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '2.1'
110
92
  - - ">="
111
93
  - !ruby/object:Gem::Version
112
- version: 2.1.1
94
+ version: '0'
113
95
  - !ruby/object:Gem::Dependency
114
96
  name: bundler
115
97
  requirement: !ruby/object:Gem::Requirement
116
98
  requirements:
117
99
  - - "~>"
118
100
  - !ruby/object:Gem::Version
119
- version: '1.12'
101
+ version: 2.2.15
120
102
  type: :development
121
103
  prerelease: false
122
104
  version_requirements: !ruby/object:Gem::Requirement
123
105
  requirements:
124
106
  - - "~>"
125
107
  - !ruby/object:Gem::Version
126
- version: '1.12'
108
+ version: 2.2.15
109
+ - !ruby/object:Gem::Dependency
110
+ name: coveralls
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
127
123
  - !ruby/object:Gem::Dependency
128
124
  name: rake
129
125
  requirement: !ruby/object:Gem::Requirement
@@ -153,7 +149,7 @@ dependencies:
153
149
  - !ruby/object:Gem::Version
154
150
  version: '3.0'
155
151
  - !ruby/object:Gem::Dependency
156
- name: coveralls
152
+ name: rspec_junit_formatter
157
153
  requirement: !ruby/object:Gem::Requirement
158
154
  requirements:
159
155
  - - ">="
@@ -166,6 +162,20 @@ dependencies:
166
162
  - - ">="
167
163
  - !ruby/object:Gem::Version
168
164
  version: '0'
165
+ - !ruby/object:Gem::Dependency
166
+ name: rubocop
167
+ requirement: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '1.9'
172
+ type: :development
173
+ prerelease: false
174
+ version_requirements: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - "~>"
177
+ - !ruby/object:Gem::Version
178
+ version: '1.9'
169
179
  description: Ruby CLI created to build Platanus' gems
170
180
  email:
171
181
  - ldlsegovia@gmail.com
@@ -174,13 +184,12 @@ executables:
174
184
  extensions: []
175
185
  extra_rdoc_files: []
176
186
  files:
177
- - ".coveralls.yml"
187
+ - ".circleci/config.yml"
188
+ - ".circleci/setup-rubygems.sh"
178
189
  - ".gitignore"
179
- - ".hound.yml"
180
190
  - ".rspec"
181
191
  - ".rubocop.yml"
182
192
  - ".ruby-version"
183
- - ".travis.yml"
184
193
  - CHANGELOG.md
185
194
  - Gemfile
186
195
  - LICENSE.txt
@@ -194,12 +203,13 @@ files:
194
203
  - lib/gemaker/cli.rb
195
204
  - lib/gemaker/commands/add_changelog.rb
196
205
  - lib/gemaker/commands/add_cli_structure.rb
197
- - lib/gemaker/commands/add_hound_rules.rb
198
206
  - lib/gemaker/commands/add_install_generator.rb
199
207
  - lib/gemaker/commands/add_license.rb
200
208
  - lib/gemaker/commands/add_readme.rb
201
209
  - lib/gemaker/commands/add_ruby_version.rb
202
210
  - lib/gemaker/commands/base.rb
211
+ - lib/gemaker/commands/configure_continuous_integration.rb
212
+ - lib/gemaker/commands/configure_editor_config.rb
203
213
  - lib/gemaker/commands/configure_git.rb
204
214
  - lib/gemaker/commands/configure_test_env.rb
205
215
  - lib/gemaker/commands/create_gem.rb
@@ -210,19 +220,25 @@ files:
210
220
  - lib/gemaker/config.rb
211
221
  - lib/gemaker/templates/CHANGELOG.md
212
222
  - lib/gemaker/templates/LICENSE.txt.erb
223
+ - lib/gemaker/templates/circle_config.yml.erb
224
+ - lib/gemaker/templates/circleci-setup-script.sh
213
225
  - lib/gemaker/templates/cli.rb.erb
226
+ - lib/gemaker/templates/editorconfig
214
227
  - lib/gemaker/templates/engine/Guardfile
215
228
  - lib/gemaker/templates/engine/README.md.erb
216
229
  - lib/gemaker/templates/engine/Rakefile
230
+ - lib/gemaker/templates/engine/development.rb.erb
217
231
  - lib/gemaker/templates/engine/engine.rb.erb
218
232
  - lib/gemaker/templates/engine/example_class.rb.erb
219
233
  - lib/gemaker/templates/engine/gemspec.erb
234
+ - lib/gemaker/templates/engine/gitignore
220
235
  - lib/gemaker/templates/engine/initializer.rb.erb
221
236
  - lib/gemaker/templates/engine/install_generator.rb.erb
222
237
  - lib/gemaker/templates/engine/install_usage.erb
223
238
  - lib/gemaker/templates/engine/lib_main_file.rb.erb
224
239
  - lib/gemaker/templates/engine/rails_helper.rb.erb
225
240
  - lib/gemaker/templates/engine/rspec
241
+ - lib/gemaker/templates/engine/rubocop.yml.erb
226
242
  - lib/gemaker/templates/engine/spec_helper.rb.erb
227
243
  - lib/gemaker/templates/engine/test_example.rb.erb
228
244
  - lib/gemaker/templates/exe.erb
@@ -231,6 +247,7 @@ files:
231
247
  - lib/gemaker/templates/normal/README.md.erb
232
248
  - lib/gemaker/templates/normal/Rakefile
233
249
  - lib/gemaker/templates/normal/gemspec.erb
250
+ - lib/gemaker/templates/normal/rubocop.yml.erb
234
251
  - lib/gemaker/templates/normal/spec_helper.rb.erb
235
252
  - lib/gemaker/templates/normal/test_example.rb.erb
236
253
  - lib/gemaker/templates/ruby-version.erb
@@ -240,8 +257,7 @@ files:
240
257
  - lib/gemaker/version.rb
241
258
  homepage: https://github.com/platanus/gemaker
242
259
  licenses: []
243
- metadata:
244
- allowed_push_host: 'TODO: Set to ''http://mygemserver.com'''
260
+ metadata: {}
245
261
  post_install_message:
246
262
  rdoc_options: []
247
263
  require_paths:
@@ -257,8 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
273
  - !ruby/object:Gem::Version
258
274
  version: '0'
259
275
  requirements: []
260
- rubyforge_project:
261
- rubygems_version: 2.4.5
276
+ rubygems_version: 3.1.6
262
277
  signing_key:
263
278
  specification_version: 4
264
279
  summary: Gem to build gems
data/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- service_name: travis-ci
data/.hound.yml DELETED
@@ -1,4 +0,0 @@
1
- ---
2
- ruby:
3
- enabled: true
4
- config_file: ".rubocop.yml"
data/.travis.yml DELETED
@@ -1,13 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.1
5
- before_install: gem install bundler -v 1.12.5
6
- deploy:
7
- provider: rubygems
8
- api_key:
9
- secure: QxgXB+CvSvCvGyjBKFDaA0SW9uk7W6WTuYoXxqCpwe/zVgOuhID1GtqX8F6WPZsBtxcyPh7Sv5yZaUJ9QbwURyrmDHsWpYkjSqc8YV/upuL853tUTcSnXGYbJSjkgPod4jULUJAJD1T1pP8UJStijxuLUQip3SkjTeGzyDcl4i8F9TLevXK/tZqs/FOzFkbaFWHhm117DIaaV3nH/tyIOhhyI7hXelGWNivo7+k3qQsRVKZn62fJjJC7dl1ER6pfl+92rCZ62cWuu0JUAVC86iaTnzMQpBF3tOHisGK0SFm9MBl/RQE4Tvy2JXsy4DoezWK5Iy4HOB0xrLJ+enw6qU0+iTPgtf5C//4XtDK5Ejj9hhrlxydIc83ALoW5Xk+QaQi65zdMPaATyB0r4gb6dub1eAa1TGTqh62fXEaIKRLF7OFBiVSbyNgx3T1VHvk/NPkWYiCk/1VJ3p7hu+M0dOjRTHLVTNcBuUx8yRFCgJbO86M2kNuzW4+NK9oa0KJGqgweRjNuqwA2KxwiARpnQYpHxvcVzRbIt23VQIaPM+W1yKdadNIAlXuSwDDlvbaYQLhR1yuBPhm1IjyNGMWKkak3ssQFfG9os5wsMzsz+oQLIm9XIvGaXqUpKrP6gFVS7CTLub1NawvEj5IT3BGsMddSpr+d5tsPaPNyaTMoLpA=
10
- gem: gemaker
11
- on:
12
- tags: true
13
- repo: platanus/gemaker
@@ -1,12 +0,0 @@
1
- module Gemaker
2
- module Cmd
3
- class AddHoundRules < Gemaker::Cmd::Base
4
- def perform
5
- execute_in_gem(
6
- "hound rules update ruby --local",
7
- "Missing tool. Please run `gem install hound-cli`."
8
- )
9
- end
10
- end
11
- end
12
- end