Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #28 from rubygarage/feature/RUBYHUB-0.2.1
Browse files Browse the repository at this point in the history
Feature/rubyhub 0.2.1
  • Loading branch information
dzemlianoi-double authored Apr 14, 2020
2 parents 5b47465 + d57da07 commit 7189921
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 31 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ commands:
gem update --system
gem install bundler
bundle install --jobs=4 --retry=3 --path vendor/bundle
bundle-save-cache:
description: Save RubyGems to cache
parameters:
Expand Down
15 changes: 15 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ Style/Documentation:
Style/FrozenStringLiteralComment:
Enabled: false

Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: true

Style/HashEachMethods:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true

RSpec/AnyInstance:
Enabled: false

Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PATH
remote: .
specs:
rubyhub (0.2.0)
thor (~> 1.0)
rubyhub (0.2.1)
thor

GEM
remote: https://rubygems.org/
Expand All @@ -12,17 +12,17 @@ GEM
colorize (0.8.1)
diff-lcs (1.3)
docile (1.3.2)
fasterer (0.8.2)
fasterer (0.8.3)
colorize (~> 0.7)
ruby_parser (>= 3.14.1)
ffaker (2.14.0)
jaro_winkler (1.5.4)
json (2.3.0)
method_source (1.0.0)
parallel (1.19.1)
parser (2.7.0.5)
parser (2.7.1.0)
ast (~> 2.4.0)
pry (0.13.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
rainbow (3.0.0)
Expand All @@ -32,15 +32,15 @@ GEM
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.0)
rspec-support (~> 3.9.0)
rspec-expectations (3.9.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.0)
rspec-support (3.9.2)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.81.0)
Expand Down
17 changes: 0 additions & 17 deletions lib/rubyhub/operations/pull_request/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,6 @@ def call(options)

def data
@data ||= Rubyhub::Configuration.instance.options.dig(:template, template.to_sym)
return unless @data.respond_to?(:to_hash)

description = @data[:description_main_body]
add_description_to_data if description.nil? || description.empty?
@data
end

def add_description_to_data
@data[:description_main_body] = read_description_from_file
end

def description_path
@description = @data[:description_path].is_a?(String) ? @data[:description_path] : ''
end

def read_description_from_file
File.exist?(description_path) ? File.read(description_path) : ''
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rubyhub/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Rubyhub
VERSION = '0.2.0'.freeze
VERSION = '0.2.1'.freeze
end
4 changes: 2 additions & 2 deletions rubyhub.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
Note that Rubyhub requires additional dependencies!
Please install https://github.com/github/hub
'
'

spec.add_dependency 'thor', '~> 1.0'
spec.add_dependency 'thor'

spec.add_development_dependency 'bundler', '~> 2.1'
spec.add_development_dependency 'fasterer', '~> 0.8'
Expand Down

0 comments on commit 7189921

Please sign in to comment.