Sha256: ae30d92dd63d7af818d6416b4c0d5a156c1ca8aecab6e77c0de74ce1d970ac43
Contents?: true
Size: 1.4 KB
Versions: 3
Compression:
Stored size: 1.4 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
widget_list-1.3.7 | publish_gem.sh |
widget_list-1.3.6 | publish_gem.sh |
widget_list-1.3.5 | publish_gem.sh |