Commit 802198340017acce475f20595dc99e5eea9f4cd7

Anton Maminov 2017-01-30T22:20:53

update readme and some code cleanups

diff --git a/README.md b/README.md
index 1f6dfba..afff92a 100644
--- a/README.md
+++ b/README.md
@@ -99,9 +99,14 @@ client = MPDClient.new
 client.log = Logger.new($stderr)
 ```
 
-
 For more information about logging configuration, see http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html
 
+## Development
+
+After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
+
+To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
+
 ## Contributing
 
 1. Fork it
@@ -112,6 +117,6 @@ For more information about logging configuration, see http://www.ruby-doc.org/st
 
 ## License and Author
 
-Copyright (c) 2013-2015 by Anton Maminov
+Copyright (c) 2013-2017 by Anton Maminov
 
 This library is distributed under the MIT license.  Please see the LICENSE file.
diff --git a/bin/console b/bin/console
new file mode 100755
index 0000000..dcca0cf
--- /dev/null
+++ b/bin/console
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+
+require "bundler/setup"
+require "mpd_client"
+
+# You can add fixtures and/or initialization code here to make experimenting
+# with your gem easier. You can also use a different console, if you like.
+
+# (If you use this, don't forget to add pry to your Gemfile!)
+# require "pry"
+# Pry.start
+
+require "irb"
+IRB.start
diff --git a/bin/setup b/bin/setup
new file mode 100755
index 0000000..dce67d8
--- /dev/null
+++ b/bin/setup
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+set -euo pipefail
+IFS=$'\n\t'
+set -vx
+
+bundle install
+
+# Do any other automated setup that you need to do here
diff --git a/examples/Gemfile b/examples/Gemfile
index 56026b6..22aa2bf 100644
--- a/examples/Gemfile
+++ b/examples/Gemfile
@@ -1,3 +1,3 @@
 source 'https://rubygems.org'
 
-gem 'mpd_client', :path => '../'
+gem 'mpd_client', path: '../'
diff --git a/examples/search_and_replace_playlist.rb b/examples/search_and_replace_playlist.rb
index 210fdc1..b692c79 100644
--- a/examples/search_and_replace_playlist.rb
+++ b/examples/search_and_replace_playlist.rb
@@ -1,12 +1,10 @@
-# -*- encoding: utf-8 -*-
-
 require 'bundler'
 Bundler.setup :default
 
 require 'logger'
 require 'mpd_client'
 
-#MPDClient.log = Logger.new($stderr)
+# MPDClient.log = Logger.new($stderr)
 
 client = MPDClient.new
 
diff --git a/examples/stickers.rb b/examples/stickers.rb
index 8f39a1f..ce99b47 100644
--- a/examples/stickers.rb
+++ b/examples/stickers.rb
@@ -1,5 +1,3 @@
-# encoding: utf-8
-
 require 'bundler'
 Bundler.setup :default
 
diff --git a/lib/mpd_client.rb b/lib/mpd_client.rb
index c1edd0c..13aab25 100644
--- a/lib/mpd_client.rb
+++ b/lib/mpd_client.rb
@@ -1,5 +1,3 @@
-# encoding: utf-8
-
 require 'socket'
 require "mpd_client/version"
 
diff --git a/lib/mpd_client/version.rb b/lib/mpd_client/version.rb
index fcdadfd..9eea0a6 100644
--- a/lib/mpd_client/version.rb
+++ b/lib/mpd_client/version.rb
@@ -1,5 +1,3 @@
-# encoding: utf-8
-
 class MPDClient
   VERSION = "0.0.5"
 end
diff --git a/mpd_client.gemspec b/mpd_client.gemspec
index 683fa1c..5f0683f 100644
--- a/mpd_client.gemspec
+++ b/mpd_client.gemspec
@@ -1,4 +1,3 @@
-# -*- encoding: utf-8 -*-
 require File.expand_path('../lib/mpd_client/version', __FILE__)
 
 Gem::Specification.new do |gem|