SHARE
TWEET

simple gem

petruchito Jul 5th, 2015 239 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. petruchito@ubuntuX:~/riverbattle$ tree .
  2. .
  3. β”œβ”€β”€ lib
  4. β”‚Β Β  β”œβ”€β”€ riverbattle
  5. β”‚Β Β  β”‚Β Β  β”œβ”€β”€ base.rb
  6. β”‚Β Β  β”‚Β Β  └── version.rb
  7. β”‚Β Β  └── riverbattle.rb
  8. └── riverbattle.gemspec
  9.  
  10. 2 directories, 4 files
  11. petruchito@ubuntuX:~/riverbattle$ cat riverbattle.gemspec
  12. Gem::Specification.new do |s|
  13.   s.name        = 'riverbattle'
  14.   s.version     = '0.0.0'
  15.   s.date        = '2010-04-28'
  16.   s.summary     = 'riverbattle gem'
  17.   s.description = 'simple rubygems test'
  18.   s.authors     = ['Eugene Petrov']
  19.   s.email       = 'freeglider@gmail.com'
  20.   s.files = Dir['lib/*.rb'] + Dir['lib/riverbattle/*.rb']
  21.   s.require_paths = ['lib']
  22.   s.homepage    =
  23.     'http://rubygems.org/gems'
  24. end
  25. petruchito@ubuntuX:~/riverbattle$ cat lib/riverbattle.rb
  26. require 'riverbattle/version'
  27. petruchito@ubuntuX:~/riverbattle$ cat lib/riverbattle/version.rb
  28. require "riverbattle/base"
  29. VERSION='0.0.1'
  30. petruchito@ubuntuX:~/riverbattle$ cat lib/riverbattle/base.rb
  31. p "hello from base.rb"
  32. petruchito@ubuntuX:~/riverbattle$ gem build riverbattle.gemspec
  33. WARNING:  licenses is empty, but is recommended.  Use a license abbreviation from:
  34. http://opensource.org/licenses/alphabetical
  35. WARNING:  See http://guides.rubygems.org/specification-reference/ for help
  36.   Successfully built RubyGem
  37.   Name: riverbattle
  38.   Version: 0.0.0
  39.   File: riverbattle-0.0.0.gem
  40. petruchito@ubuntuX:~/riverbattle$ gem install ./riverbattle-0.0.0.gem
  41. Successfully installed riverbattle-0.0.0
  42. Parsing documentation for riverbattle-0.0.0
  43. Done installing documentation for riverbattle after 0 seconds
  44. 1 gem installed
  45. petruchito@ubuntuX:~/riverbattle$ ruby -e 'require "riverbattle"'
  46. "hello from base.rb"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top