Permalink
Browse files

Minor code cleanup

* double quotes => single quotes
* gem => spec
  • Loading branch information...
1 parent bd8edf8 commit 6770e0b857881323142c0aea2f4775e1bb32c482 @stephenmckinney stephenmckinney committed Dec 14, 2012
Showing with 33 additions and 33 deletions.
  1. +3 −3 Rakefile
  2. +3 −3 bin/pomo
  3. +7 −7 lib/pomo/task.rb
  4. +20 −20 pomo.gemspec
View
@@ -1,7 +1,7 @@
-require "rspec/core/rake_task"
-require "bundler/gem_tasks"
+require 'rspec/core/rake_task'
+require 'bundler/gem_tasks'
-desc "Run specs"
+desc 'Run specs'
RSpec::Core::RakeTask.new do |t|
t.verbose = false
t.rspec_opts = '--color'
View
@@ -39,9 +39,9 @@ command :init do |c|
c.description = 'Initialize pomo in the current directory'
c.action do |args, options|
Pomo::List.new :init => true
- say "Initialized at `./.pomo`"
- say " - Any commands run while in this directory will reference this file for tasks"
- say " - To remove simply execute `rm .pomo`"
+ say 'Initialized at `./.pomo`'
+ say ' - Any commands run while in this directory will reference this file for tasks'
+ say ' - To remove simply execute `rm .pomo`'
end
end
View
@@ -81,23 +81,23 @@ def foreground_progress(config)
notifier = Pomo::Notifier.new(config)
complete_message = "Time is up! Hope you are finished #{self}"
- format_message = "(:progress_bar) :remaining minutes remaining"
+ format_message = '(:progress_bar) :remaining minutes remaining'
progress(
(0..length).to_a.reverse,
:format => format_message,
:tokens => { :remaining => length },
:complete_message => complete_message
) do |remaining|
if remaining == length / 2
- notifier.notify "Half way there!", :header => "#{remaining} minutes remaining"
+ notifier.notify 'Half way there!', :header => "#{remaining} minutes remaining"
elsif remaining == 5
- notifier.notify "Almost there!", :header => "5 minutes remaining"
+ notifier.notify 'Almost there!', :header => '5 minutes remaining'
end
sleep 60
{ :remaining => remaining }
end
- notifier.notify "Hope you are finished #{self}", :header => "Time is up!", :type => :warning
+ notifier.notify "Hope you are finished #{self}", :header => 'Time is up!', :type => :warning
list = Pomo::List.new
if task = list.running
@@ -115,16 +115,16 @@ def background_progress(config)
write_pomo_stat(remaining) if config.pomo_stat
refresh_tmux_status_bar if config.tmux
if remaining == length / 2
- notifier.notify "Half way there!", :header => "#{remaining} minutes remaining"
+ notifier.notify 'Half way there!', :header => "#{remaining} minutes remaining"
elsif remaining == 5
- notifier.notify "Almost there!", :header => "5 minutes remaining"
+ notifier.notify 'Almost there!', :header => '5 minutes remaining'
end
sleep 60
end
write_pomo_stat(0) if config.pomo_stat
refresh_tmux_status_bar if config.tmux
- notifier.notify "Hope you are finished #{self}", :header => "Time is up!", :type => :warning
+ notifier.notify "Hope you are finished #{self}", :header => 'Time is up!', :type => :warning
list = Pomo::List.new
if task = list.running
View
@@ -3,28 +3,28 @@ lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'pomo/version'
-Gem::Specification.new do |gem|
- gem.name = "pomo"
- gem.version = Pomo::VERSION
- gem.authors = ["TJ Holowaychuk", "Steve McKinney"]
- gem.email = ["tj@vision-media.ca", "stevemckinney@gmail.com"]
- gem.summary = "pomo-#{Pomo::VERSION}"
- gem.description = "Pomodoro time management for the command-line"
- gem.homepage = "http://github.com/visionmedia/pomo"
+Gem::Specification.new do |spec|
+ spec.name = 'pomo'
+ spec.version = Pomo::VERSION
+ spec.authors = ['TJ Holowaychuk', 'Steve McKinney']
+ spec.email = ['tj@vision-media.ca', 'stevemckinney@gmail.com']
+ spec.summary = "pomo-#{Pomo::VERSION}"
+ spec.description = 'Pomodoro time management for the command-line'
+ spec.homepage = 'https://github.com/visionmedia/pomo'
- gem.rubyforge_project = "pomo"
+ spec.rubyforge_project = 'pomo'
- gem.files = `git ls-files`.split($/)
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
- gem.require_paths = ["lib"]
- gem.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Pomo", "--main", "Readme.md"]
+ spec.files = `git ls-files`.split($/)
+ spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
+ spec.require_paths = ['lib']
+ spec.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'Pomo', '--main', 'Readme.md']
- gem.add_dependency("commander", ["~> 4.1"])
- gem.add_dependency("octokit", "~> 1.19")
- gem.add_dependency("terminal-notifier", ["~> 1.4"]) if /darwin/ =~ RUBY_PLATFORM
- gem.add_dependency("growl", ["~> 1.0"]) if /darwin/ =~ RUBY_PLATFORM
- gem.add_dependency("libnotify", ["~> 0.8"]) if /linux/ =~ RUBY_PLATFORM
+ spec.add_dependency('commander', '~> 4.1')
+ spec.add_dependency('octokit', '~> 1.19')
+ spec.add_dependency('terminal-notifier', '~> 1.4') if /darwin/ =~ RUBY_PLATFORM
+ spec.add_dependency('growl', '~> 1.0') if /darwin/ =~ RUBY_PLATFORM
+ spec.add_dependency('libnotify', '~> 0.8') if /linux/ =~ RUBY_PLATFORM
- gem.add_development_dependency("rspec", "~> 2.12")
+ spec.add_development_dependency('rspec', '~> 2.12')
end

0 comments on commit 6770e0b

Please sign in to comment.