Skip to content

Commit

Permalink
Rebranded to shelr, http://shelr.tv/ mentioned :)
Browse files Browse the repository at this point in the history
  • Loading branch information
antono committed Aug 16, 2011
1 parent 126070d commit 4adb327
Show file tree
Hide file tree
Showing 19 changed files with 920 additions and 289 deletions.
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Original file line Diff line number Diff line change
@@ -1,9 +1,7 @@
source "http://rubygems.org" source "http://rubygems.org"


gem 'xdg' gem 'xdg', '1.0.0'
gem 'colored' gem 'colored'
#gem 'artii'
#gem 'ohai'


group :development do group :development do
gem "rspec" gem "rspec"
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GEM
rake rake
mocha (0.9.9) mocha (0.9.9)
rake rake
rake (0.8.7) rake (0.9.2)
rcov (0.9.9) rcov (0.9.9)
rspec (2.1.0) rspec (2.1.0)
rspec-core (~> 2.1.0) rspec-core (~> 2.1.0)
Expand All @@ -32,4 +32,4 @@ DEPENDENCIES
mocha mocha
rcov rcov
rspec rspec
xdg xdg (= 1.0.0)
694 changes: 674 additions & 20 deletions LICENSE.txt

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Rakefile
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'rubygems' require 'rubygems'
require 'bundler' require 'bundler'

begin begin
Bundler.setup(:default, :development) Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e rescue Bundler::BundlerError => e
Expand All @@ -11,14 +12,13 @@ require 'rake'


require 'jeweler' require 'jeweler'
Jeweler::Tasks.new do |gem| Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options gem.name = "shelr"
gem.name = "shellcast" gem.homepage = "http://shelr.tv/"
gem.homepage = "http://shell.heroku.com/" gem.license = "GPLv3"
gem.license = "GPL"
gem.summary = %Q{Screencasts for Shell Ninjas} gem.summary = %Q{Screencasts for Shell Ninjas}
gem.description = %Q{Screencast utility for unix shell junkies :)} gem.description = %Q{Screencast utility for unix shell junkies :)}
gem.email = "antono.vasiljev@gmail.com" gem.email = "self@antono.info"
gem.authors = ["Antono Vasiljev"] gem.authors = ["Antono Vasiljev", "Pete Clark"]
end end
Jeweler::RubygemsDotOrgTasks.new Jeweler::RubygemsDotOrgTasks.new


Expand All @@ -40,7 +40,7 @@ Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : "" version = File.exist?('VERSION') ? File.read('VERSION') : ""


rdoc.rdoc_dir = 'rdoc' rdoc.rdoc_dir = 'rdoc'
rdoc.title = "shellcast #{version}" rdoc.title = "shelr #{version}"
rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb') rdoc.rdoc_files.include('lib/**/*.rb')
end end
37 changes: 19 additions & 18 deletions bin/shellcast → bin/shelr
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,54 +3,55 @@
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__)) $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))


require 'rubygems' require 'rubygems'
require 'shellcast' require 'shelr'


BASENAME = File.basename(__FILE__) BASENAME = File.basename(__FILE__)
HELP = <<-HELP HELP = <<-HELP
Usage: #{BASENAME} option [arg] Usage: #{BASENAME} option [arg]
Options: Options:
setup API_KEY - setup setup API_KEY - setup
record - record new shellcast record - record new shellcast
push RECORD_ID - publish push RECORD_ID - publish
list - print list of records list - print list of records
play RECORD_ID - play local record play RECORD_ID - play local record
play RECORD_URL - play remote record play RECORD_URL - play remote record
HELP
HELP


case ARGV[0] case ARGV[0]
when '-h', '--help' when '-h', '--help'
puts HELP puts HELP
when 'record' when 'record'
ShellCast::Recorder.record! Shelr::Recorder.record!
when 'list' when 'list'
ShellCast::Player.list Shelr::Player.list
when 'play' when 'play'
if ARGV[1] if ARGV[1]
if ARGV[1] =~ /^http:.*/ if ARGV[1] =~ /^http:.*/
ShellCast::Player.play_remote(ARGV[1]) Shelr::Player.play_remote(ARGV[1])
else else
ShellCast::Player.play(ARGV[1]) Shelr::Player.play(ARGV[1])
end end
else else
puts "Missing id for shellcast" puts "Missing id for shellcast"
ShellCast::Player.list Shelr::Player.list
puts "Select one..." puts "Select one..."
exit exit
end end
when 'push' when 'push'
if ARGV[1] if ARGV[1]
ShellCast::Publisher.new.publish(ARGV[1]) Shelr::Publisher.new.publish(ARGV[1])
else else
puts "What do you want to publish" puts "What do you want to publish"
ShellCast::Player.list Shelr::Player.list
puts "Select one..." puts "Select one..."
exit exit
end end
when 'setup' when 'setup'
if ARGV[1] if ARGV[1]
ShellCast.api_key = ARGV[1] Shelr.api_key = ARGV[1]
else else
puts "\n\tUsage: #{BASENAME} setup API_KEY\n\n" puts "\n\tUsage: #{BASENAME} setup API_KEY\n\n"
exit exit
Expand Down
101 changes: 0 additions & 101 deletions lib/shellcast/player.rb

This file was deleted.

100 changes: 0 additions & 100 deletions lib/shellcast/recorder.rb

This file was deleted.

22 changes: 10 additions & 12 deletions lib/shellcast.rb → lib/shelr.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
require 'yaml' require 'yaml'
require 'json' require 'json'


module ShellCast module Shelr


APP_NAME = 'shellcast' APP_NAME = 'shelr'
DATA_DIR = File.join(XDG['DATA_HOME'].to_s, APP_NAME) DATA_DIR = File.join(XDG['DATA_HOME'].to_s, APP_NAME)
CONFIG_DIR = File.join(XDG['CONFIG_HOME'].to_s, APP_NAME) CONFIG_DIR = File.join(XDG['CONFIG_HOME'].to_s, APP_NAME)
API_KEY = File.join(CONFIG_DIR, 'api_key') API_KEY = File.join(CONFIG_DIR, 'api_key')
API_URL = ENV['SC_LOCAL'] ? 'http://localhost:3000' : 'http://shell.heroku.com' API_URL = ENV['SC_LOCAL'] ? 'http://localhost:3000' : 'http://shelr.tv'

autoload :Recorder, 'shelr/recorder.rb'
autoload :Player, 'shelr/player.rb'
autoload :Publisher, 'shelr/publisher.rb'


class << self class << self
def api_key def api_key
Expand All @@ -21,18 +25,12 @@ def api_key


def api_key=(key) def api_key=(key)
FileUtils.mkdir_p(CONFIG_DIR) unless File.exist?(CONFIG_DIR) FileUtils.mkdir_p(CONFIG_DIR) unless File.exist?(CONFIG_DIR)
File.open(API_KEY, 'w+') do |f| File.open(API_KEY, 'w+') { |f| f.puts(key.strip) }
f.puts(key.strip)
end
end end


def shellcast_dir(shellcast_id) def data_dir(record_id)
File.join(ShellCast::DATA_DIR, shellcast_id.to_s) File.join(Shelr::DATA_DIR, record_id.to_s)
end end
end end


autoload :Recorder, 'shellcast/recorder.rb'
autoload :Player, 'shellcast/player.rb'
autoload :Publisher, 'shellcast/publisher.rb'

end end
Loading

0 comments on commit 4adb327

Please sign in to comment.