update readme and some code cleanups
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
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|