Class: PushGem
- Inherits:
-
Object
- Object
- PushGem
- Defined in:
- lib/push_gem.rb,
lib/push_gem/version.rb
Constant Summary collapse
- VERSION =
"1.0.0"
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#gem ⇒ Object
Returns the value of attribute gem.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(author:, gem:) ⇒ PushGem
constructor
A new instance of PushGem.
- #push ⇒ Object
Constructor Details
#initialize(author:, gem:) ⇒ PushGem
12 13 14 15 |
# File 'lib/push_gem.rb', line 12 def initialize(author:, gem:) = @gem = gem end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
10 11 12 |
# File 'lib/push_gem.rb', line 10 def end |
#gem ⇒ Object
Returns the value of attribute gem.
10 11 12 |
# File 'lib/push_gem.rb', line 10 def gem @gem end |
Instance Method Details
#check ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/push_gem.rb', line 32 def check validate_gem! RSpec::Core::RakeTask.new(:spec) do |t| t.verbose = false end RuboCop::RakeTask.new puts "Running tests for #{gem} gem..." Rake::Task["spec"].invoke Rake::Task["rubocop"].invoke end |
#push ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/push_gem.rb', line 17 def push validate_gem! system("bundle install") puts "Pushing #{gem} gem..." build_gem push_to_github push_to_rubygems puts "Successfully pushed #{gem} gem to both GitHub Packages and RubyGems.org" end |