gemsmith 8.1.0 → 8.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
  SHA1:
3
- metadata.gz: e3a96c9154c4fb90efc956a37d51aec117517651
4
- data.tar.gz: 0205e0b2cf6c1e918b3bbd2af0604b57731064d0
3
+ metadata.gz: 789e4603ef1a279accc50fae9d0b07f92c75e454
4
+ data.tar.gz: acd7977976268ac612fca91693113bc2364acb7b
5
5
  SHA512:
6
- metadata.gz: 1662d27ce0745b77682b287b9648de230f5262bb3771608667d38be3eecbad38f38530a7012d823353afc7ea826f88dec28bb2122a995de86d2245f9be772560
7
- data.tar.gz: e1d2fab655c0e0103b78f21f130de0a8144df440142a14cea914471188766f9769831a2b6dabc6dcf3b56b868beacd176d190158799efad2aa96d41bec8ac6bc
6
+ metadata.gz: 8790821afac91ddb715151e18f3a8f94f8b20c11fce89e53fda64bbcdd893b0b688757d1e3ce2bf584aa78b2fefdb3b0551b26a976386188c857e3b47fe31149
7
+ data.tar.gz: 3aa6b05408afe61b0cfd61db64e15022a28babdaa511e704d8540b8712ad387aa99b1b891f8af5882ae81cc7496e26b46141c1215dd0b2eed1d4c020c0f5cc7f
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -28,6 +28,10 @@ module Gemsmith
28
28
  def lib_gem_root
29
29
  File.join lib_root, "%gem_path%"
30
30
  end
31
+
32
+ def gem_name
33
+ configuration.dig :gem, :name
34
+ end
31
35
  end
32
36
  end
33
37
  end
@@ -47,7 +47,6 @@ module Gemsmith
47
47
  end
48
48
 
49
49
  def remove_files
50
- gem_name = configuration.dig :gem, :name
51
50
  gem_path = configuration.dig :gem, :path
52
51
 
53
52
  cli.remove_file "#{gem_name}/app/helpers/#{gem_path}/application_helper.rb", configuration
@@ -6,7 +6,9 @@ module Gemsmith
6
6
  class Reek < Base
7
7
  def run
8
8
  return unless configuration.dig(:generate, :reek)
9
- cli.template "%gem_name%/lib/tasks/reek.rake.tt", configuration
9
+
10
+ cli.uncomment_lines "#{gem_name}/Rakefile", /require.+reek.+/
11
+ cli.uncomment_lines "#{gem_name}/Rakefile", /Reek.+/
10
12
  end
11
13
  end
12
14
  end
@@ -7,10 +7,8 @@ module Gemsmith
7
7
  def run
8
8
  return unless configuration.dig(:generate, :rspec)
9
9
 
10
- cli.template "%gem_name%/lib/tasks/rspec.rake.tt", configuration
11
- cli.template "#{rspec_root}/spec_helper.rb.tt", configuration
12
- cli.template("#{rspec_root}/rails_helper.rb.tt", configuration) if configuration.dig(:generate, :rails)
13
- cli.template "#{rspec_root}/support/shared_contexts/temp_dir.rb.tt", configuration
10
+ uncomment_lines
11
+ install_templates
14
12
  end
15
13
 
16
14
  private
@@ -18,6 +16,17 @@ module Gemsmith
18
16
  def rspec_root
19
17
  "%gem_name%/spec"
20
18
  end
19
+
20
+ def uncomment_lines
21
+ cli.uncomment_lines "#{gem_name}/Rakefile", /require.+rspec.+/
22
+ cli.uncomment_lines "#{gem_name}/Rakefile", /RSpec.+/
23
+ end
24
+
25
+ def install_templates
26
+ cli.template "#{rspec_root}/spec_helper.rb.tt", configuration
27
+ cli.template("#{rspec_root}/rails_helper.rb.tt", configuration) if configuration.dig(:generate, :rails)
28
+ cli.template "#{rspec_root}/support/shared_contexts/temp_dir.rb.tt", configuration
29
+ end
21
30
  end
22
31
  end
23
32
  end
@@ -7,8 +7,9 @@ module Gemsmith
7
7
  def run
8
8
  return unless configuration.dig(:generate, :rubocop)
9
9
 
10
+ cli.uncomment_lines "#{gem_name}/Rakefile", /require.+rubocop.+/
11
+ cli.uncomment_lines "#{gem_name}/Rakefile", /RuboCop.+/
10
12
  cli.template "%gem_name%/.rubocop.yml.tt", configuration
11
- cli.template "%gem_name%/lib/tasks/rubocop.rake.tt", configuration
12
13
  cli.run "rubocop --auto-correct > /dev/null"
13
14
  end
14
15
  end
@@ -6,7 +6,10 @@ module Gemsmith
6
6
  class SCSSLint < Base
7
7
  def run
8
8
  return unless configuration.dig(:generate, :scss_lint)
9
- cli.template "%gem_name%/lib/tasks/scss_lint.rake.tt", configuration
9
+
10
+ gem_name = configuration.dig :gem, :name
11
+ cli.uncomment_lines "#{gem_name}/Rakefile", /require.+scss.+/
12
+ cli.uncomment_lines "#{gem_name}/Rakefile", /SCSSLint.+/
10
13
  end
11
14
  end
12
15
  end
@@ -12,7 +12,7 @@ module Gemsmith
12
12
  end
13
13
 
14
14
  def self.version
15
- "8.1.0"
15
+ "8.2.0"
16
16
  end
17
17
 
18
18
  def self.version_label
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  <%- if config.dig(:generate, :rails) -%>
27
27
  spec.add_dependency "rails", "~> <%= config.dig(:versions, :rails) %>"
28
28
  <%- end -%>
29
- spec.add_development_dependency "rake", "~> 11.0"
29
+ spec.add_development_dependency "rake", "~> 12.0"
30
30
  spec.add_development_dependency "gemsmith", "~> <%= Gemsmith::Identity.version[/\d{1}\.\d{1}/] %>"
31
31
  <%- if config.dig(:generate, :pry) -%>
32
32
  spec.add_development_dependency "pry", "~> 0.10"
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
43
43
  spec.add_development_dependency "reek", "~> 4.5"
44
44
  <%- end -%>
45
45
  <%- if config.dig(:generate, :rubocop) -%>
46
- spec.add_development_dependency "rubocop", "~> 0.45"
46
+ spec.add_development_dependency "rubocop", "~> 0.46"
47
47
  <%- end -%>
48
48
  <%- if config.dig(:generate, :scss_lint) -%>
49
49
  spec.add_development_dependency "scss_lint", "~> 0.50"
@@ -1,3 +1,4 @@
1
1
  *.gem
2
2
  .bundle
3
3
  pkg/*
4
+ Gemfile.lock
@@ -11,6 +11,8 @@ Style/AndOr:
11
11
  EnforcedStyle: conditionals
12
12
  Style/CaseIndentation:
13
13
  IndentOneStep: true
14
+ Style/EmptyMethod:
15
+ EnforcedStyle: expanded
14
16
  Style/MethodDefParentheses:
15
17
  EnforcedStyle: require_no_parentheses
16
18
  Style/NumericLiterals:
@@ -1,11 +1,8 @@
1
1
  language: ruby
2
- rvm:
3
- - <%= config.dig(:versions, :ruby) %>
4
2
  <%- if config.dig(:generate, :rails) -%>
5
3
  gemfile:
6
4
  - gemfiles/rails-<%= config.dig(:versions, :rails) %>.x.gemfile
7
5
  <%- end -%>
8
- script: bundle exec rake
9
6
  <%- if config.dig(:generate, :code_climate) -%>
10
7
  after_script: bundle exec codeclimate-test-reporter
11
8
  <%- end -%>
@@ -1,7 +1,14 @@
1
1
  begin
2
2
  require "gemsmith/rake/setup"
3
+ # require "rspec/core/rake_task"
4
+ # require "reek/rake/task"
5
+ # require "rubocop/rake_task"
6
+ # require "scss_lint/rake_task"
7
+
8
+ # RSpec::Core::RakeTask.new(:spec)
9
+ # Reek::Rake::Task.new
10
+ # RuboCop::RakeTask.new
11
+ # SCSSLint::RakeTask.new { |task| task.files = ["app/assets"] }
3
12
  rescue LoadError => error
4
13
  puts error.message
5
14
  end
6
-
7
- Dir.glob("lib/tasks/*.rake").each { |file| load file }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemsmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.0
4
+ version: 8.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -30,7 +30,7 @@ cert_chain:
30
30
  n/LUZ1dKhIHzfKx1B4+TEIefArObGfkLIDM8+Dq1RX7TF1k81Men7iu4MgE9bYBn
31
31
  3dE+xI3FdB5gWcdWxdtgRCmWjtXeYYyb4z6NQQ==
32
32
  -----END CERTIFICATE-----
33
- date: 2016-11-13 00:00:00.000000000 Z
33
+ date: 2016-12-18 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: thor
@@ -150,14 +150,14 @@ dependencies:
150
150
  requirements:
151
151
  - - "~>"
152
152
  - !ruby/object:Gem::Version
153
- version: '11.0'
153
+ version: '12.0'
154
154
  type: :development
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - "~>"
159
159
  - !ruby/object:Gem::Version
160
- version: '11.0'
160
+ version: '12.0'
161
161
  - !ruby/object:Gem::Dependency
162
162
  name: pry
163
163
  requirement: !ruby/object:Gem::Requirement
@@ -318,14 +318,14 @@ dependencies:
318
318
  requirements:
319
319
  - - "~>"
320
320
  - !ruby/object:Gem::Version
321
- version: '0.45'
321
+ version: '0.46'
322
322
  type: :development
323
323
  prerelease: false
324
324
  version_requirements: !ruby/object:Gem::Requirement
325
325
  requirements:
326
326
  - - "~>"
327
327
  - !ruby/object:Gem::Version
328
- version: '0.45'
328
+ version: '0.46'
329
329
  - !ruby/object:Gem::Dependency
330
330
  name: codeclimate-test-reporter
331
331
  requirement: !ruby/object:Gem::Requirement
@@ -419,17 +419,10 @@ files:
419
419
  - lib/gemsmith/templates/%gem_name%/lib/generators/%gem_path%/install/install_generator.rb.tt
420
420
  - lib/gemsmith/templates/%gem_name%/lib/generators/%gem_path%/upgrade/USAGE.tt
421
421
  - lib/gemsmith/templates/%gem_name%/lib/generators/%gem_path%/upgrade/upgrade_generator.rb.tt
422
- - lib/gemsmith/templates/%gem_name%/lib/tasks/reek.rake.tt
423
- - lib/gemsmith/templates/%gem_name%/lib/tasks/rspec.rake.tt
424
- - lib/gemsmith/templates/%gem_name%/lib/tasks/rubocop.rake.tt
425
- - lib/gemsmith/templates/%gem_name%/lib/tasks/scss_lint.rake.tt
426
422
  - lib/gemsmith/templates/%gem_name%/spec/lib/%gem_path%/cli_spec.rb.tt
427
423
  - lib/gemsmith/templates/%gem_name%/spec/rails_helper.rb.tt
428
424
  - lib/gemsmith/templates/%gem_name%/spec/spec_helper.rb.tt
429
425
  - lib/gemsmith/templates/%gem_name%/spec/support/shared_contexts/temp_dir.rb.tt
430
- - lib/tasks/reek.rake
431
- - lib/tasks/rspec.rake
432
- - lib/tasks/rubocop.rake
433
426
  homepage: https://github.com/bkuhlmann/gemsmith
434
427
  licenses:
435
428
  - MIT
metadata.gz.sig CHANGED
Binary file
@@ -1,6 +0,0 @@
1
- begin
2
- require "reek/rake/task"
3
- Reek::Rake::Task.new
4
- rescue LoadError => error
5
- puts error.message
6
- end
@@ -1,6 +0,0 @@
1
- begin
2
- require "rspec/core/rake_task"
3
- RSpec::Core::RakeTask.new(:spec)
4
- rescue LoadError => error
5
- puts error.message
6
- end
@@ -1,6 +0,0 @@
1
- begin
2
- require "rubocop/rake_task"
3
- RuboCop::RakeTask.new
4
- rescue LoadError => error
5
- puts error.message
6
- end
@@ -1,6 +0,0 @@
1
- begin
2
- require "scss_lint/rake_task"
3
- SCSSLint::RakeTask.new { |task| task.files = ["app/assets"] }
4
- rescue LoadError => error
5
- puts error.message
6
- end
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- require "reek/rake/task"
5
- Reek::Rake::Task.new
6
- rescue LoadError => error
7
- puts error.message
8
- end
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- require "rspec/core/rake_task"
5
- RSpec::Core::RakeTask.new(:spec)
6
- rescue LoadError => error
7
- puts error.message
8
- end
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- require "rubocop/rake_task"
5
- RuboCop::RakeTask.new
6
- rescue LoadError => error
7
- puts error.message
8
- end