todo-gist 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +27 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +46 -0
- data/VERSION +1 -0
- data/bin/task +33 -0
- data/lib/gist.rb +50 -0
- data/lib/gists.rb +51 -0
- data/lib/todo-gist.rb +77 -0
- data/test/teststrap.rb +11 -0
- data/test/todo-gist_test.rb +11 -0
- data/todo-gist.gemspec +74 -0
- metadata +189 -0
    
        data/.document
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/Gemfile.lock
    ADDED
    
    | @@ -0,0 +1,27 @@ | |
| 1 | 
            +
            GEM
         | 
| 2 | 
            +
              remote: http://rubygems.org/
         | 
| 3 | 
            +
              specs:
         | 
| 4 | 
            +
                git (1.2.5)
         | 
| 5 | 
            +
                jeweler (1.6.4)
         | 
| 6 | 
            +
                  bundler (~> 1.0)
         | 
| 7 | 
            +
                  git (>= 1.2.5)
         | 
| 8 | 
            +
                  rake
         | 
| 9 | 
            +
                json (1.6.1)
         | 
| 10 | 
            +
                rake (0.8.7)
         | 
| 11 | 
            +
                rcov (0.9.11)
         | 
| 12 | 
            +
                riot (0.12.5)
         | 
| 13 | 
            +
                  rr
         | 
| 14 | 
            +
                rr (1.0.4)
         | 
| 15 | 
            +
                yard (0.6.8)
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            PLATFORMS
         | 
| 18 | 
            +
              ruby
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            DEPENDENCIES
         | 
| 21 | 
            +
              bundler (~> 1.0.0)
         | 
| 22 | 
            +
              jeweler (~> 1.6.4)
         | 
| 23 | 
            +
              json (~> 1.6.1)
         | 
| 24 | 
            +
              rake (= 0.8.7)
         | 
| 25 | 
            +
              rcov
         | 
| 26 | 
            +
              riot
         | 
| 27 | 
            +
              yard (~> 0.6.0)
         | 
    
        data/LICENSE.txt
    ADDED
    
    | @@ -0,0 +1,20 @@ | |
| 1 | 
            +
            Copyright (c) 2011 Adam Lloyd
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            Permission is hereby granted, free of charge, to any person obtaining
         | 
| 4 | 
            +
            a copy of this software and associated documentation files (the
         | 
| 5 | 
            +
            "Software"), to deal in the Software without restriction, including
         | 
| 6 | 
            +
            without limitation the rights to use, copy, modify, merge, publish,
         | 
| 7 | 
            +
            distribute, sublicense, and/or sell copies of the Software, and to
         | 
| 8 | 
            +
            permit persons to whom the Software is furnished to do so, subject to
         | 
| 9 | 
            +
            the following conditions:
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            The above copyright notice and this permission notice shall be
         | 
| 12 | 
            +
            included in all copies or substantial portions of the Software.
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
         | 
| 15 | 
            +
            EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
         | 
| 16 | 
            +
            MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
         | 
| 17 | 
            +
            NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
         | 
| 18 | 
            +
            LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
         | 
| 19 | 
            +
            OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
         | 
| 20 | 
            +
            WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
         | 
    
        data/README.rdoc
    ADDED
    
    | @@ -0,0 +1,19 @@ | |
| 1 | 
            +
            = todo-gist
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            A todo list persisted in a Gist.
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            == Contributing to todo-gist
         | 
| 6 | 
            +
             
         | 
| 7 | 
            +
            * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
         | 
| 8 | 
            +
            * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
         | 
| 9 | 
            +
            * Fork the project
         | 
| 10 | 
            +
            * Start a feature/bugfix branch
         | 
| 11 | 
            +
            * Commit and push until you are happy with your contribution
         | 
| 12 | 
            +
            * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
         | 
| 13 | 
            +
            * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            == Copyright
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            Copyright (c) 2011 Adam Lloyd. See LICENSE.txt for
         | 
| 18 | 
            +
            further details.
         | 
| 19 | 
            +
             | 
    
        data/Rakefile
    ADDED
    
    | @@ -0,0 +1,46 @@ | |
| 1 | 
            +
            # encoding: utf-8
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'rubygems'
         | 
| 4 | 
            +
            require 'bundler'
         | 
| 5 | 
            +
            begin
         | 
| 6 | 
            +
              Bundler.setup(:default, :development)
         | 
| 7 | 
            +
            rescue Bundler::BundlerError => e
         | 
| 8 | 
            +
              $stderr.puts e.message
         | 
| 9 | 
            +
              $stderr.puts "Run `bundle install` to install missing gems"
         | 
| 10 | 
            +
              exit e.status_code
         | 
| 11 | 
            +
            end
         | 
| 12 | 
            +
            require 'rake'
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            require 'jeweler'
         | 
| 15 | 
            +
            Jeweler::Tasks.new do |gem|
         | 
| 16 | 
            +
              # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
         | 
| 17 | 
            +
              gem.name = "todo-gist"
         | 
| 18 | 
            +
              gem.homepage = "http://github.com/alloy-d/todo-gist"
         | 
| 19 | 
            +
              gem.license = "MIT"
         | 
| 20 | 
            +
              gem.summary = %Q{A todo list persisted in a Gist.}
         | 
| 21 | 
            +
              gem.description = %Q{A todo list persisted in a Gist.}
         | 
| 22 | 
            +
              gem.email = "adam@alloy-d.net"
         | 
| 23 | 
            +
              gem.authors = ["Adam Lloyd"]
         | 
| 24 | 
            +
              # dependencies defined in Gemfile
         | 
| 25 | 
            +
            end
         | 
| 26 | 
            +
            Jeweler::RubygemsDotOrgTasks.new
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            require 'rake/testtask'
         | 
| 29 | 
            +
            Rake::TestTask.new(:test) do |test|
         | 
| 30 | 
            +
              test.libs << 'lib' << 'test'
         | 
| 31 | 
            +
              test.pattern = 'test/**/*_test.rb'
         | 
| 32 | 
            +
              test.verbose = true
         | 
| 33 | 
            +
            end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            require 'rcov/rcovtask'
         | 
| 36 | 
            +
            Rcov::RcovTask.new do |test|
         | 
| 37 | 
            +
              test.libs << 'test'
         | 
| 38 | 
            +
              test.pattern = 'test/**/*_test.rb'
         | 
| 39 | 
            +
              test.verbose = true
         | 
| 40 | 
            +
              test.rcov_opts << '--exclude "gems/*"'
         | 
| 41 | 
            +
            end
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            task :default => :test
         | 
| 44 | 
            +
             | 
| 45 | 
            +
            require 'yard'
         | 
| 46 | 
            +
            YARD::Rake::YardocTask.new
         | 
    
        data/VERSION
    ADDED
    
    | @@ -0,0 +1 @@ | |
| 1 | 
            +
            0.1.0
         | 
    
        data/bin/task
    ADDED
    
    | @@ -0,0 +1,33 @@ | |
| 1 | 
            +
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
            require 'json'
         | 
| 3 | 
            +
            require 'todo-gist'
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            subcommand = ARGV[0] || "next"
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            if ARGV.length > 0
         | 
| 8 | 
            +
              task = ARGV[1..ARGV.length].join " "
         | 
| 9 | 
            +
            else
         | 
| 10 | 
            +
              task = nil
         | 
| 11 | 
            +
            end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            credentials_file = File.join(ENV["HOME"], ".github_credentials.json")
         | 
| 14 | 
            +
            if not File.exist?(credentials_file)
         | 
| 15 | 
            +
              STDERR.puts "Put your GitHub credentials in #{credentials_file}!"
         | 
| 16 | 
            +
              exit(-1)
         | 
| 17 | 
            +
            end
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            credentials = JSON.load(File.open(credentials_file))
         | 
| 20 | 
            +
            gist = TodoGist.new(credentials["username"], credentials["password"])
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            case subcommand
         | 
| 23 | 
            +
            when "push"
         | 
| 24 | 
            +
              gist.push task unless task.nil?
         | 
| 25 | 
            +
            when "enqueue"
         | 
| 26 | 
            +
              gist.enqueue task unless task.nil?
         | 
| 27 | 
            +
            when "next"
         | 
| 28 | 
            +
              puts gist.things[0]
         | 
| 29 | 
            +
            when "list"
         | 
| 30 | 
            +
              puts gist.things
         | 
| 31 | 
            +
            when "pop"
         | 
| 32 | 
            +
              puts "FINISHED: " + gist.pop
         | 
| 33 | 
            +
            end
         | 
    
        data/lib/gist.rb
    ADDED
    
    | @@ -0,0 +1,50 @@ | |
| 1 | 
            +
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
            require 'gists'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            class Gist
         | 
| 5 | 
            +
              attr_accessor :id, :description, :public, :files
         | 
| 6 | 
            +
              def initialize(hash)
         | 
| 7 | 
            +
                @id = hash[:id]
         | 
| 8 | 
            +
                @description = hash[:description]
         | 
| 9 | 
            +
                @public = hash[:public]
         | 
| 10 | 
            +
                @files = hash[:files] || {}
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
              def to_hash
         | 
| 14 | 
            +
                hash = {
         | 
| 15 | 
            +
                  :description => @description,
         | 
| 16 | 
            +
                  :public => @public,
         | 
| 17 | 
            +
                  :files => @files,
         | 
| 18 | 
            +
                }
         | 
| 19 | 
            +
                hash[:id] = @id if not @id.nil?
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                hash
         | 
| 22 | 
            +
              end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
              def to_json(*a)
         | 
| 25 | 
            +
                self.to_hash.to_json(*a)
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
             | 
| 28 | 
            +
              def [](name)
         | 
| 29 | 
            +
                @files[name][:content]
         | 
| 30 | 
            +
              end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
              def []=(name, body)
         | 
| 33 | 
            +
                if @files[name].nil? then
         | 
| 34 | 
            +
                  @files[name] = {}
         | 
| 35 | 
            +
                end
         | 
| 36 | 
            +
                @files[name][:content] = body
         | 
| 37 | 
            +
              end
         | 
| 38 | 
            +
             | 
| 39 | 
            +
              def self.json_create(hash)
         | 
| 40 | 
            +
                files = {}
         | 
| 41 | 
            +
                hash[:files].each do |k,v|
         | 
| 42 | 
            +
                  files[k.to_s] = {:content => v[:content]}
         | 
| 43 | 
            +
                end
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                hash[:files] = files
         | 
| 46 | 
            +
             | 
| 47 | 
            +
                new(hash)
         | 
| 48 | 
            +
              end
         | 
| 49 | 
            +
            end
         | 
| 50 | 
            +
             | 
    
        data/lib/gists.rb
    ADDED
    
    | @@ -0,0 +1,51 @@ | |
| 1 | 
            +
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
            require 'gist'
         | 
| 3 | 
            +
            require 'json'
         | 
| 4 | 
            +
            require 'net/http'
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            class Gists
         | 
| 7 | 
            +
              API_ROOT = "api.github.com"
         | 
| 8 | 
            +
              def initialize(username, password)
         | 
| 9 | 
            +
                @username = username
         | 
| 10 | 
            +
                @password = password
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
              def get(resource)
         | 
| 14 | 
            +
                Net::HTTP.start(API_ROOT, :use_ssl => true) do |http|
         | 
| 15 | 
            +
                  req = Net::HTTP::Get.new(resource)
         | 
| 16 | 
            +
                  req.basic_auth @username, @password
         | 
| 17 | 
            +
                  response = http.request(req)
         | 
| 18 | 
            +
                  
         | 
| 19 | 
            +
                  JSON.parse(response.body, :symbolize_names => true)
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              def post(resource, body)
         | 
| 24 | 
            +
                Net::HTTP.start(API_ROOT, :use_ssl => true) do |http|
         | 
| 25 | 
            +
                  req = Net::HTTP::Post.new(resource)
         | 
| 26 | 
            +
                  req.basic_auth @username, @password
         | 
| 27 | 
            +
                  req.body = body
         | 
| 28 | 
            +
                  response = http.request(req)
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                  JSON.parse(response.body, :symbolize_names => true)
         | 
| 31 | 
            +
                end
         | 
| 32 | 
            +
              end
         | 
| 33 | 
            +
             | 
| 34 | 
            +
              def get_all
         | 
| 35 | 
            +
                get("/gists")
         | 
| 36 | 
            +
              end
         | 
| 37 | 
            +
             | 
| 38 | 
            +
              def get_gist(id)
         | 
| 39 | 
            +
                Gist.json_create(get("/gists/#{id}"))
         | 
| 40 | 
            +
              end
         | 
| 41 | 
            +
             | 
| 42 | 
            +
              def save(gist)
         | 
| 43 | 
            +
                if not gist.id.nil? then
         | 
| 44 | 
            +
                  post "/gists/#{gist.id}", gist.to_json
         | 
| 45 | 
            +
                else
         | 
| 46 | 
            +
                  res = post "/gists", gist.to_json
         | 
| 47 | 
            +
                  gist.id = res["id"]
         | 
| 48 | 
            +
                  res
         | 
| 49 | 
            +
                end
         | 
| 50 | 
            +
              end
         | 
| 51 | 
            +
            end
         | 
    
        data/lib/todo-gist.rb
    ADDED
    
    | @@ -0,0 +1,77 @@ | |
| 1 | 
            +
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
            require 'json'
         | 
| 3 | 
            +
            require_relative './gist.rb'
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            # A class for managing a to-do list as a Github Gist.
         | 
| 6 | 
            +
            class TodoGist
         | 
| 7 | 
            +
              attr_reader :things
         | 
| 8 | 
            +
              def initialize(username, password)
         | 
| 9 | 
            +
                @gists = Gists.new(username, password)
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                @gist = find_gist()
         | 
| 12 | 
            +
                if @gist.nil?
         | 
| 13 | 
            +
                  @gist = make_gist()
         | 
| 14 | 
            +
                end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                # Things is a Ruby array of to-do items that is kept in sync with the Gist
         | 
| 17 | 
            +
                # contents.
         | 
| 18 | 
            +
                @things = JSON.parse(@gist["list.json"])
         | 
| 19 | 
            +
              end
         | 
| 20 | 
            +
             | 
| 21 | 
            +
              def things=(things)
         | 
| 22 | 
            +
                @things = things
         | 
| 23 | 
            +
                update_gist
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
              # Adds an item to the end of the queue.
         | 
| 27 | 
            +
              def enqueue(thing)
         | 
| 28 | 
            +
                @things << thing
         | 
| 29 | 
            +
                update_gist
         | 
| 30 | 
            +
              end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
              # Pushes an item to the front of the queue.
         | 
| 33 | 
            +
              def push(thing)
         | 
| 34 | 
            +
                @things.unshift thing
         | 
| 35 | 
            +
                update_gist
         | 
| 36 | 
            +
              end
         | 
| 37 | 
            +
             | 
| 38 | 
            +
              # Does the default adding thing (same as enqueue).
         | 
| 39 | 
            +
              def add_thing(thing)
         | 
| 40 | 
            +
                enqueue(thing)
         | 
| 41 | 
            +
              end
         | 
| 42 | 
            +
             | 
| 43 | 
            +
              # Removes the first item from the list.
         | 
| 44 | 
            +
              def pop
         | 
| 45 | 
            +
                thing = @things.shift
         | 
| 46 | 
            +
                update_gist
         | 
| 47 | 
            +
                return thing
         | 
| 48 | 
            +
              end
         | 
| 49 | 
            +
             | 
| 50 | 
            +
              # Returns the first Gist with description "TODO Gist".
         | 
| 51 | 
            +
              def find_gist
         | 
| 52 | 
            +
                matches = @gists.get_all.select {|g| g[:description] == "TODO Gist"}
         | 
| 53 | 
            +
                if matches.length > 0 then
         | 
| 54 | 
            +
                  @gists.get_gist(matches[0][:id])
         | 
| 55 | 
            +
                else
         | 
| 56 | 
            +
                  nil
         | 
| 57 | 
            +
                end
         | 
| 58 | 
            +
              end
         | 
| 59 | 
            +
              private :find_gist
         | 
| 60 | 
            +
             | 
| 61 | 
            +
              # Makes a Gist if none already exists.
         | 
| 62 | 
            +
              def make_gist
         | 
| 63 | 
            +
                @gist = Gist.new(:description => "TODO Gist",
         | 
| 64 | 
            +
                                 :public => false)
         | 
| 65 | 
            +
                @gist["list.json"] = "[]"
         | 
| 66 | 
            +
                @gists.save @gist
         | 
| 67 | 
            +
              end
         | 
| 68 | 
            +
              private :make_gist
         | 
| 69 | 
            +
             | 
| 70 | 
            +
              # Updates the Gist with contents of the list.
         | 
| 71 | 
            +
              # FIXME: this allows more than a responsible number of race conditions.
         | 
| 72 | 
            +
              def update_gist
         | 
| 73 | 
            +
                @gist["list.json"] = JSON.pretty_generate @things
         | 
| 74 | 
            +
                @gists.save @gist
         | 
| 75 | 
            +
              end
         | 
| 76 | 
            +
              private :update_gist
         | 
| 77 | 
            +
            end
         | 
    
        data/test/teststrap.rb
    ADDED
    
    | @@ -0,0 +1,11 @@ | |
| 1 | 
            +
            require 'rubygems'
         | 
| 2 | 
            +
            require 'bundler'
         | 
| 3 | 
            +
            begin
         | 
| 4 | 
            +
              Bundler.setup(:default, :development)
         | 
| 5 | 
            +
            rescue Bundler::BundlerError => e
         | 
| 6 | 
            +
              $stderr.puts e.message
         | 
| 7 | 
            +
              $stderr.puts "Run `bundle install` to install missing gems"
         | 
| 8 | 
            +
              exit e.status_code
         | 
| 9 | 
            +
            end
         | 
| 10 | 
            +
            require 'riot'
         | 
| 11 | 
            +
            require 'todo-gist'
         | 
    
        data/todo-gist.gemspec
    ADDED
    
    | @@ -0,0 +1,74 @@ | |
| 1 | 
            +
            # Generated by jeweler
         | 
| 2 | 
            +
            # DO NOT EDIT THIS FILE DIRECTLY
         | 
| 3 | 
            +
            # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
         | 
| 4 | 
            +
            # -*- encoding: utf-8 -*-
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            Gem::Specification.new do |s|
         | 
| 7 | 
            +
              s.name = %q{todo-gist}
         | 
| 8 | 
            +
              s.version = "0.1.0"
         | 
| 9 | 
            +
             | 
| 10 | 
            +
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 | 
            +
              s.authors = ["Adam Lloyd"]
         | 
| 12 | 
            +
              s.date = %q{2011-10-17}
         | 
| 13 | 
            +
              s.default_executable = %q{task}
         | 
| 14 | 
            +
              s.description = %q{A todo list persisted in a Gist.}
         | 
| 15 | 
            +
              s.email = %q{adam@alloy-d.net}
         | 
| 16 | 
            +
              s.executables = ["task"]
         | 
| 17 | 
            +
              s.extra_rdoc_files = [
         | 
| 18 | 
            +
                "LICENSE.txt",
         | 
| 19 | 
            +
                "README.rdoc"
         | 
| 20 | 
            +
              ]
         | 
| 21 | 
            +
              s.files = [
         | 
| 22 | 
            +
                ".document",
         | 
| 23 | 
            +
                "Gemfile",
         | 
| 24 | 
            +
                "Gemfile.lock",
         | 
| 25 | 
            +
                "LICENSE.txt",
         | 
| 26 | 
            +
                "README.rdoc",
         | 
| 27 | 
            +
                "Rakefile",
         | 
| 28 | 
            +
                "VERSION",
         | 
| 29 | 
            +
                "bin/task",
         | 
| 30 | 
            +
                "lib/gist.rb",
         | 
| 31 | 
            +
                "lib/gists.rb",
         | 
| 32 | 
            +
                "lib/todo-gist.rb",
         | 
| 33 | 
            +
                "test/teststrap.rb",
         | 
| 34 | 
            +
                "test/todo-gist_test.rb",
         | 
| 35 | 
            +
                "todo-gist.gemspec"
         | 
| 36 | 
            +
              ]
         | 
| 37 | 
            +
              s.homepage = %q{http://github.com/alloy-d/todo-gist}
         | 
| 38 | 
            +
              s.licenses = ["MIT"]
         | 
| 39 | 
            +
              s.require_paths = ["lib"]
         | 
| 40 | 
            +
              s.rubygems_version = %q{1.3.7}
         | 
| 41 | 
            +
              s.summary = %q{A todo list persisted in a Gist.}
         | 
| 42 | 
            +
             | 
| 43 | 
            +
              if s.respond_to? :specification_version then
         | 
| 44 | 
            +
                current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
         | 
| 45 | 
            +
                s.specification_version = 3
         | 
| 46 | 
            +
             | 
| 47 | 
            +
                if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
         | 
| 48 | 
            +
                  s.add_runtime_dependency(%q<json>, ["~> 1.6.1"])
         | 
| 49 | 
            +
                  s.add_development_dependency(%q<rake>, ["= 0.8.7"])
         | 
| 50 | 
            +
                  s.add_development_dependency(%q<riot>, [">= 0"])
         | 
| 51 | 
            +
                  s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
         | 
| 52 | 
            +
                  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
         | 
| 53 | 
            +
                  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
         | 
| 54 | 
            +
                  s.add_development_dependency(%q<rcov>, [">= 0"])
         | 
| 55 | 
            +
                else
         | 
| 56 | 
            +
                  s.add_dependency(%q<json>, ["~> 1.6.1"])
         | 
| 57 | 
            +
                  s.add_dependency(%q<rake>, ["= 0.8.7"])
         | 
| 58 | 
            +
                  s.add_dependency(%q<riot>, [">= 0"])
         | 
| 59 | 
            +
                  s.add_dependency(%q<yard>, ["~> 0.6.0"])
         | 
| 60 | 
            +
                  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
         | 
| 61 | 
            +
                  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
         | 
| 62 | 
            +
                  s.add_dependency(%q<rcov>, [">= 0"])
         | 
| 63 | 
            +
                end
         | 
| 64 | 
            +
              else
         | 
| 65 | 
            +
                s.add_dependency(%q<json>, ["~> 1.6.1"])
         | 
| 66 | 
            +
                s.add_dependency(%q<rake>, ["= 0.8.7"])
         | 
| 67 | 
            +
                s.add_dependency(%q<riot>, [">= 0"])
         | 
| 68 | 
            +
                s.add_dependency(%q<yard>, ["~> 0.6.0"])
         | 
| 69 | 
            +
                s.add_dependency(%q<bundler>, ["~> 1.0.0"])
         | 
| 70 | 
            +
                s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
         | 
| 71 | 
            +
                s.add_dependency(%q<rcov>, [">= 0"])
         | 
| 72 | 
            +
              end
         | 
| 73 | 
            +
            end
         | 
| 74 | 
            +
             | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,189 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification 
         | 
| 2 | 
            +
            name: todo-gist
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              prerelease: false
         | 
| 5 | 
            +
              segments: 
         | 
| 6 | 
            +
              - 0
         | 
| 7 | 
            +
              - 1
         | 
| 8 | 
            +
              - 0
         | 
| 9 | 
            +
              segments_generated: true
         | 
| 10 | 
            +
              version: 0.1.0
         | 
| 11 | 
            +
            platform: ruby
         | 
| 12 | 
            +
            authors: 
         | 
| 13 | 
            +
            - Adam Lloyd
         | 
| 14 | 
            +
            autorequire: 
         | 
| 15 | 
            +
            bindir: bin
         | 
| 16 | 
            +
            cert_chain: []
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            date: 2011-10-17 00:00:00 -04:00
         | 
| 19 | 
            +
            default_executable: task
         | 
| 20 | 
            +
            dependencies: 
         | 
| 21 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 22 | 
            +
              name: json
         | 
| 23 | 
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 24 | 
            +
                none: false
         | 
| 25 | 
            +
                requirements: 
         | 
| 26 | 
            +
                - - ~>
         | 
| 27 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 28 | 
            +
                    segments: 
         | 
| 29 | 
            +
                    - 1
         | 
| 30 | 
            +
                    - 6
         | 
| 31 | 
            +
                    - 1
         | 
| 32 | 
            +
                    segments_generated: true
         | 
| 33 | 
            +
                    version: 1.6.1
         | 
| 34 | 
            +
              type: :runtime
         | 
| 35 | 
            +
              prerelease: false
         | 
| 36 | 
            +
              version_requirements: *id001
         | 
| 37 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 38 | 
            +
              name: rake
         | 
| 39 | 
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 40 | 
            +
                none: false
         | 
| 41 | 
            +
                requirements: 
         | 
| 42 | 
            +
                - - "="
         | 
| 43 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 44 | 
            +
                    segments: 
         | 
| 45 | 
            +
                    - 0
         | 
| 46 | 
            +
                    - 8
         | 
| 47 | 
            +
                    - 7
         | 
| 48 | 
            +
                    segments_generated: true
         | 
| 49 | 
            +
                    version: 0.8.7
         | 
| 50 | 
            +
              type: :development
         | 
| 51 | 
            +
              prerelease: false
         | 
| 52 | 
            +
              version_requirements: *id002
         | 
| 53 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 54 | 
            +
              name: riot
         | 
| 55 | 
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 56 | 
            +
                none: false
         | 
| 57 | 
            +
                requirements: 
         | 
| 58 | 
            +
                - - ">="
         | 
| 59 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 60 | 
            +
                    segments: 
         | 
| 61 | 
            +
                    - 0
         | 
| 62 | 
            +
                    segments_generated: true
         | 
| 63 | 
            +
                    version: "0"
         | 
| 64 | 
            +
              type: :development
         | 
| 65 | 
            +
              prerelease: false
         | 
| 66 | 
            +
              version_requirements: *id003
         | 
| 67 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 68 | 
            +
              name: yard
         | 
| 69 | 
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         | 
| 70 | 
            +
                none: false
         | 
| 71 | 
            +
                requirements: 
         | 
| 72 | 
            +
                - - ~>
         | 
| 73 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 74 | 
            +
                    segments: 
         | 
| 75 | 
            +
                    - 0
         | 
| 76 | 
            +
                    - 6
         | 
| 77 | 
            +
                    - 0
         | 
| 78 | 
            +
                    segments_generated: true
         | 
| 79 | 
            +
                    version: 0.6.0
         | 
| 80 | 
            +
              type: :development
         | 
| 81 | 
            +
              prerelease: false
         | 
| 82 | 
            +
              version_requirements: *id004
         | 
| 83 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 84 | 
            +
              name: bundler
         | 
| 85 | 
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         | 
| 86 | 
            +
                none: false
         | 
| 87 | 
            +
                requirements: 
         | 
| 88 | 
            +
                - - ~>
         | 
| 89 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 90 | 
            +
                    segments: 
         | 
| 91 | 
            +
                    - 1
         | 
| 92 | 
            +
                    - 0
         | 
| 93 | 
            +
                    - 0
         | 
| 94 | 
            +
                    segments_generated: true
         | 
| 95 | 
            +
                    version: 1.0.0
         | 
| 96 | 
            +
              type: :development
         | 
| 97 | 
            +
              prerelease: false
         | 
| 98 | 
            +
              version_requirements: *id005
         | 
| 99 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 100 | 
            +
              name: jeweler
         | 
| 101 | 
            +
              requirement: &id006 !ruby/object:Gem::Requirement 
         | 
| 102 | 
            +
                none: false
         | 
| 103 | 
            +
                requirements: 
         | 
| 104 | 
            +
                - - ~>
         | 
| 105 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 106 | 
            +
                    segments: 
         | 
| 107 | 
            +
                    - 1
         | 
| 108 | 
            +
                    - 6
         | 
| 109 | 
            +
                    - 4
         | 
| 110 | 
            +
                    segments_generated: true
         | 
| 111 | 
            +
                    version: 1.6.4
         | 
| 112 | 
            +
              type: :development
         | 
| 113 | 
            +
              prerelease: false
         | 
| 114 | 
            +
              version_requirements: *id006
         | 
| 115 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 116 | 
            +
              name: rcov
         | 
| 117 | 
            +
              requirement: &id007 !ruby/object:Gem::Requirement 
         | 
| 118 | 
            +
                none: false
         | 
| 119 | 
            +
                requirements: 
         | 
| 120 | 
            +
                - - ">="
         | 
| 121 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 122 | 
            +
                    segments: 
         | 
| 123 | 
            +
                    - 0
         | 
| 124 | 
            +
                    segments_generated: true
         | 
| 125 | 
            +
                    version: "0"
         | 
| 126 | 
            +
              type: :development
         | 
| 127 | 
            +
              prerelease: false
         | 
| 128 | 
            +
              version_requirements: *id007
         | 
| 129 | 
            +
            description: A todo list persisted in a Gist.
         | 
| 130 | 
            +
            email: adam@alloy-d.net
         | 
| 131 | 
            +
            executables: 
         | 
| 132 | 
            +
            - task
         | 
| 133 | 
            +
            extensions: []
         | 
| 134 | 
            +
             | 
| 135 | 
            +
            extra_rdoc_files: 
         | 
| 136 | 
            +
            - LICENSE.txt
         | 
| 137 | 
            +
            - README.rdoc
         | 
| 138 | 
            +
            files: 
         | 
| 139 | 
            +
            - .document
         | 
| 140 | 
            +
            - Gemfile
         | 
| 141 | 
            +
            - Gemfile.lock
         | 
| 142 | 
            +
            - LICENSE.txt
         | 
| 143 | 
            +
            - README.rdoc
         | 
| 144 | 
            +
            - Rakefile
         | 
| 145 | 
            +
            - VERSION
         | 
| 146 | 
            +
            - bin/task
         | 
| 147 | 
            +
            - lib/gist.rb
         | 
| 148 | 
            +
            - lib/gists.rb
         | 
| 149 | 
            +
            - lib/todo-gist.rb
         | 
| 150 | 
            +
            - test/teststrap.rb
         | 
| 151 | 
            +
            - test/todo-gist_test.rb
         | 
| 152 | 
            +
            - todo-gist.gemspec
         | 
| 153 | 
            +
            has_rdoc: true
         | 
| 154 | 
            +
            homepage: http://github.com/alloy-d/todo-gist
         | 
| 155 | 
            +
            licenses: 
         | 
| 156 | 
            +
            - MIT
         | 
| 157 | 
            +
            post_install_message: 
         | 
| 158 | 
            +
            rdoc_options: []
         | 
| 159 | 
            +
             | 
| 160 | 
            +
            require_paths: 
         | 
| 161 | 
            +
            - lib
         | 
| 162 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 163 | 
            +
              none: false
         | 
| 164 | 
            +
              requirements: 
         | 
| 165 | 
            +
              - - ">="
         | 
| 166 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 167 | 
            +
                  hash: -27020880490657883
         | 
| 168 | 
            +
                  segments: 
         | 
| 169 | 
            +
                  - 0
         | 
| 170 | 
            +
                  segments_generated: true
         | 
| 171 | 
            +
                  version: "0"
         | 
| 172 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 173 | 
            +
              none: false
         | 
| 174 | 
            +
              requirements: 
         | 
| 175 | 
            +
              - - ">="
         | 
| 176 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 177 | 
            +
                  segments: 
         | 
| 178 | 
            +
                  - 0
         | 
| 179 | 
            +
                  segments_generated: true
         | 
| 180 | 
            +
                  version: "0"
         | 
| 181 | 
            +
            requirements: []
         | 
| 182 | 
            +
             | 
| 183 | 
            +
            rubyforge_project: 
         | 
| 184 | 
            +
            rubygems_version: 1.3.7
         | 
| 185 | 
            +
            signing_key: 
         | 
| 186 | 
            +
            specification_version: 3
         | 
| 187 | 
            +
            summary: A todo list persisted in a Gist.
         | 
| 188 | 
            +
            test_files: []
         | 
| 189 | 
            +
             |