Sha256: 6986c924a22a24c747aa7f7c6b7ad95cd99b45d6dccd1729cfb25943167d3b65

Contents?: true

Size: 1.44 KB

Versions: 29

Compression:

Stored size: 1.44 KB

Contents

#these scripts will create a new gem, mount a vendor folder and publish the gem

CAMELCASE=WidgetList
GEMNAME=widget_list

rvm gemset create $GEMNAME
rvm gemset use $GEMNAME
gem install bundler
bundle gem $GEMNAME
#chown wcapp:wcapp -R $GEMNAME/*
cd $GEMNAME/
mkdir -p vendor/assets/{images,javascripts,stylesheets} 
touch vendor/assets/javascripts/$GEMNAME.js
touch vendor/assets/stylesheets/$GEMNAME.css
touch lib/$GEMNAME/engine.rb
echo 'Add require "'$GEMNAME'/engine" to lib/'$GEMNAME'.rb'
echo 'Next Add //= require '$GEMNAME' to application.js in your rails application'
echo 'Next Add *= require '$GEMNAME' to application.css in your rails application'
echo 'module '$CAMELCASE > lib/$GEMNAME/engine.rb
echo '  class Engine < Rails::Engine' >> lib/$GEMNAME/engine.rb
echo '    # auto wire' >> lib/$GEMNAME/engine.rb
echo "    initializer '""$GEMNAME"".load_static_assets' do |app|" >> lib/$GEMNAME/engine.rb
echo '      app.middleware.use ::ActionDispatch::Static, "#{root}/vendor"' >> lib/$GEMNAME/engine.rb
echo '    end' >> lib/$GEMNAME/engine.rb
echo '  end' >> lib/$GEMNAME/engine.rb
echo 'end' >> lib/$GEMNAME/engine.rb

#to publish it
#curl -u incubus158 https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials

#first edit version.rb and increment it to your new version, then run this
gem build *gemspec | awk 'NR==4{print $2}' > tmpfile.txt
GEMBUILD=`cat tmpfile.txt`
gem push $GEMBUILD
rm tmpfile.txt $GEMBUILD


Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
widget_list-1.3.4 publish_gem.sh
widget_list-1.3.2 publish_gem.sh
widget_list-1.3.1 publish_gem.sh
widget_list-1.3.0 publish_gem.sh
widget_list-1.2.9 publish_gem.sh
widget_list-1.2.8 publish_gem.sh
widget_list-1.2.7 publish_gem.sh
widget_list-1.2.6 publish_gem.sh
widget_list-1.2.5 publish_gem.sh
widget_list-1.2.4 publish_gem.sh
widget_list-1.2.3 publish_gem.sh
widget_list-1.2.2 publish_gem.sh
widget_list-1.2.1 publish_gem.sh
widget_list-1.2.0 publish_gem.sh
widget_list-1.1.9 publish_gem.sh
widget_list-1.1.8 publish_gem.sh
widget_list-1.1.7 publish_gem.sh
widget_list-1.1.6 publish_gem.sh
widget_list-1.1.5 publish_gem.sh
widget_list-1.1.4 publish_gem.sh