├── README.md ├── VERSION ├── bin └── .gitkeep ├── lib └── .gitkeep ├── spec └── spec_helper.rb ├── AUTHORS ├── .gitignore ├── Gemfile ├── UNLICENSE ├── .gemspec └── Rakefile /README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 0.0.0 -------------------------------------------------------------------------------- /bin/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Zachary Voase 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .bundle 3 | .tmp 4 | .yardoc 5 | /doc/yard 6 | pkg 7 | tmp 8 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "http://rubygems.org" 2 | 3 | # Specify your gem's dependencies in .gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | 3 | require 'rubygems' 4 | require 'rake' 5 | 6 | GEMSPEC = Gem::Specification.new do |gem| 7 | gem.version = File.read("VERSION").chomp 8 | gem.date = File.mtime("VERSION").strftime("%Y-%m-%d") 9 | 10 | gem.name = "name" 11 | gem.summary = "summary" 12 | gem.description = "description" 13 | gem.homepage = "http://github.com/zacharyvoase/name" 14 | gem.rubyforge_project = "nowarning" 15 | gem.license = "Public Domain" if gem.respond_to?(:license=) 16 | 17 | gem.authors = ["Zachary Voase"] 18 | gem.email = "z@zacharyvoase.com" 19 | 20 | gem.platform = Gem::Platform::RUBY 21 | gem.files = FileList["{bin,lib,spec}/**/*", "AUTHORS", "README.md", "UNLICENSE", "VERSION"] 22 | gem.bindir = "bin" 23 | gem.executables = FileList["bin/*"].pathmap("%f") 24 | gem.require_paths = ["lib"] 25 | gem.extensions = [] 26 | gem.test_files = FileList["{test,spec,features}/**/*"] 27 | gem.has_rdoc = false 28 | gem.has_yard = true 29 | 30 | gem.required_ruby_version = ">= 1.8.6" 31 | 32 | # Add dependencies here. 33 | 34 | gem.add_development_dependency "rake", "~> 0.8.7" 35 | gem.add_development_dependency "rspec", ">= 1.3.0" 36 | gem.add_development_dependency "yard", "~> 0.5" 37 | gem.add_development_dependency "bluecloth" # For Markdown formatting in YARD. 38 | end 39 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), 'lib'))) 2 | 3 | require 'bundler' 4 | require 'shellwords' 5 | 6 | # Adds `build`, `install` and `release` tasks. 7 | Bundler::GemHelper.install_tasks 8 | 9 | # ---- Versioning ---- 10 | 11 | # Tasks for bumping the value in VERSION: 12 | # 13 | # rake bump:bug # 1.2.3 -> 1.2.4 14 | # rake bump:min # 1.2.3 -> 1.3.0 15 | # rake bump:maj # 1.2.3 -> 2.0.0 16 | # 17 | # These tasks will also do a `git commit` for the version bump: 18 | # 19 | # git commit -m "Bumped to v1.2.4" VERSION 20 | # 21 | namespace :bump do 22 | def get_current_version 23 | File.read("VERSION").split(".").map(&:to_i) 24 | end 25 | 26 | def write_current_version(ver) 27 | File.open("VERSION", "w") { |f| f << ver.join(".") } 28 | FileUtils.touch("VERSION") 29 | sh "git", "commit", "-m", "Bumped to v#{ver.join(".")}", "VERSION" 30 | end 31 | 32 | desc "Increment this project's bugfix version (1.2.x)" 33 | task :bug do 34 | ver = get_current_version 35 | ver[2] += 1 36 | write_current_version(ver) 37 | end 38 | 39 | desc "Increment this project's minor version (1.x.3)" 40 | task :min do 41 | ver = get_current_version 42 | ver[1] += 1 43 | ver[2] = 0 44 | write_current_version(ver) 45 | end 46 | 47 | desc "Increment this project's major version (x.2.3)" 48 | task :maj do 49 | ver = get_current_version 50 | ver[0] += 1 51 | ver[1] = 0 52 | ver[2] = 0 53 | write_current_version(ver) 54 | end 55 | end 56 | 57 | # ---- RSpec ---- 58 | 59 | require 'rspec/core/rake_task' 60 | 61 | task :default => :spec 62 | spec = RSpec::Core::RakeTask.new do |t| 63 | t.verbose = false 64 | t.pattern = "spec/**/*_spec.rb" 65 | t.rspec_opts = (ENV["RSPEC_OPTS"] || %{ 66 | --color 67 | --format nested 68 | -I #{File.expand_path(File.join(__FILE__, "..", "lib"))} 69 | -r #{File.expand_path(File.join(__FILE__, "..", "spec", "spec_helper.rb"))} 70 | }).shellsplit 71 | end 72 | 73 | # ---- YARD ---- 74 | 75 | require 'yard' 76 | 77 | task :doc => :yard 78 | YARD::Rake::YardocTask.new do |yard| 79 | yard.files = ['lib/**/*.rb', '-', 'AUTHORS', 'UNLICENSE', 'VERSION'] 80 | yard.options = (ENV["YARD_OPTS"] || %{ 81 | --title "#{GEMSPEC.name} v#{GEMSPEC.version}" 82 | --output-dir doc/yard 83 | --protected 84 | --no-private 85 | --hide-void-return 86 | --markup markdown 87 | --readme README.md 88 | }).shellsplit 89 | end 90 | --------------------------------------------------------------------------------