snooby 0.0.1
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/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/lib/snooby.rb +14 -0
- data/lib/snooby/version.rb +3 -0
- data/snooby.gemspec +20 -0
- metadata +51 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/snooby.rb
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
$: << File.expand_path('../lib', $0)
|
|
2
|
+
%w[net/http cgi json].each { |d| require d }
|
|
3
|
+
require 'snooby/user'
|
|
4
|
+
|
|
5
|
+
module Snooby
|
|
6
|
+
# connection to be shared by all instances
|
|
7
|
+
Reddit = Net::HTTP.new('www.reddit.com')
|
|
8
|
+
|
|
9
|
+
# load previously stored user data if it exists
|
|
10
|
+
class << self; attr_accessor :config; end
|
|
11
|
+
Snooby.config = JSON.parse(File.read('.snooby')) rescue {}
|
|
12
|
+
|
|
13
|
+
class RedditError < StandardError; end
|
|
14
|
+
end
|
data/snooby.gemspec
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
3
|
+
require 'snooby/version'
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |s|
|
|
6
|
+
s.name = 'snooby'
|
|
7
|
+
s.version = Snooby::VERSION
|
|
8
|
+
s.authors = ['andkerosine']
|
|
9
|
+
s.email = ['andkerosine@gmail.com']
|
|
10
|
+
s.homepage = 'https://github.com/andkerosine/snooby'
|
|
11
|
+
s.summary = 'Ruby wrapper for the reddit API.'
|
|
12
|
+
s.description = 'Snooby wraps the reddit API in convenient Ruby.'
|
|
13
|
+
|
|
14
|
+
s.rubyforge_project = 'snooby'
|
|
15
|
+
|
|
16
|
+
s.files = `git ls-files`.split("\n")
|
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
19
|
+
s.require_paths = ["lib"]
|
|
20
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: snooby
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- andkerosine
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2012-02-06 00:00:00.000000000 Z
|
|
13
|
+
dependencies: []
|
|
14
|
+
description: Snooby wraps the reddit API in convenient Ruby.
|
|
15
|
+
email:
|
|
16
|
+
- andkerosine@gmail.com
|
|
17
|
+
executables: []
|
|
18
|
+
extensions: []
|
|
19
|
+
extra_rdoc_files: []
|
|
20
|
+
files:
|
|
21
|
+
- .gitignore
|
|
22
|
+
- Gemfile
|
|
23
|
+
- Rakefile
|
|
24
|
+
- lib/snooby.rb
|
|
25
|
+
- lib/snooby/version.rb
|
|
26
|
+
- snooby.gemspec
|
|
27
|
+
homepage: https://github.com/andkerosine/snooby
|
|
28
|
+
licenses: []
|
|
29
|
+
post_install_message:
|
|
30
|
+
rdoc_options: []
|
|
31
|
+
require_paths:
|
|
32
|
+
- lib
|
|
33
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
34
|
+
none: false
|
|
35
|
+
requirements:
|
|
36
|
+
- - ! '>='
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
39
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
40
|
+
none: false
|
|
41
|
+
requirements:
|
|
42
|
+
- - ! '>='
|
|
43
|
+
- !ruby/object:Gem::Version
|
|
44
|
+
version: '0'
|
|
45
|
+
requirements: []
|
|
46
|
+
rubyforge_project: snooby
|
|
47
|
+
rubygems_version: 1.8.15
|
|
48
|
+
signing_key:
|
|
49
|
+
specification_version: 3
|
|
50
|
+
summary: Ruby wrapper for the reddit API.
|
|
51
|
+
test_files: []
|