jhsu802701/generic_gem

View on GitHub
plans.txt

Summary

Maintainability
Test Coverage
AT START:
1.  Set configuration
#!/usr/bin/env sh
echo "---" > $HOME/.bundle/config
echo "BUNDLE_GEM__COC: true" >> $HOME/.bundle/config
echo "BUNDLE_GEM__MIT: true" >> $HOME/.bundle/config
echo "BUNDLE_GEM__TEST: rspec" >> $HOME/.bundle/config
/usr/bin/env ruby <<-EORUBY
 
  StringInFile.replace("0.1.0", "0.0.0", (lib/gem name/version.txt))
 
EORUBY

2.  bundle gem (name of gem)

3.  Make bin/setup and bin/console executable
chmod +x bin/setup
chmod +x bin/console

4.  Add gem_test file
echo "#!/bin/bash" > gem_test.sh
echo "" >> gem_test.sh
echo "# Run this script to test this gem." >> gem_test.sh
echo "bin/setup" >> gem_test.sh
echo "rake" >> gem_test.sh
chmod +x gem_test.sh

5.  Add gem_console file

echo "#!/bin/bash" > gem_console.sh
echo "" >> gem_console.sh
echo "# Run this script to test this gem in an irb shell." >> gem_console.sh
echo "bin/console" >> gem_console.sh
chmod +x gem_console.sh

6.  gemspec: Add rspec to development dependency list, replace "\nend" with
'  spec.add_development_dependency "rspec"\nend'

7.  Rakefile:
require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new

task :default => :spec
task :test => :spec

8.  *_spec.rb:
expect(false).to eq(true) -> expect(true).to eq(true)

9.  .gitignore
include tmp, tmp*, and .DS_Store