fluttrly 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +16 -0
- data/README.md +27 -0
- data/Rakefile +2 -0
- data/bin/fluttrly +5 -0
- data/fluttrly-gem.gemspec +22 -0
- data/lib/fluttrly-gem/version.rb +3 -0
- data/lib/fluttrly-gem.rb +44 -0
- metadata +89 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/README.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#Fluttrly-gem
|
2
|
+
|
3
|
+
##What is this?
|
4
|
+
Fluttrly-gem is a command line gem I decided to make to help contribute to
|
5
|
+
[fluttrly](http://github.com/excid3/fluttrly).
|
6
|
+
|
7
|
+
|
8
|
+
##Why?
|
9
|
+
I wanted to know how to write gems with the new way bundler makes them, and I saw
|
10
|
+
[Holman](http://github.com/holman) make [boom](http://github.com/holman/boom). So I wanted to make a
|
11
|
+
command line utility myself. Sweet!
|
12
|
+
|
13
|
+
|
14
|
+
##Disclaimer
|
15
|
+
If you somehow get hurt using this. You're retarded. That being said, I shipped this as soon as possible,
|
16
|
+
so not all of the features are done yet.
|
17
|
+
|
18
|
+
|
19
|
+
##Usage
|
20
|
+
|
21
|
+
** List an item **
|
22
|
+
#fluttrly <command> <list>
|
23
|
+
$ fluttrly list bouverdafs
|
24
|
+
Task => "Nothing to see here, move along" at => 02-08-2011 18:57 PM
|
25
|
+
|
26
|
+
##Install
|
27
|
+
$ gem install fluttrly
|
data/Rakefile
ADDED
data/bin/fluttrly
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "fluttrly-gem/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "fluttrly"
|
7
|
+
s.version = Fluttrly::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Brent Beer"]
|
10
|
+
s.email = ["brent.beer@gmail.com"]
|
11
|
+
s.homepage = "http://rubygems.org/gems/fluttrly"
|
12
|
+
s.summary = %q{Fluttrly.com command line interface.}
|
13
|
+
s.description = %q{Maintain and inspect your fluttrly lists.}
|
14
|
+
|
15
|
+
s.rubyforge_project = "fluttrly-gem"
|
16
|
+
s.add_development_dependency "json"
|
17
|
+
|
18
|
+
s.files = `git ls-files`.split("\n")
|
19
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
end
|
data/lib/fluttrly-gem.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'net/http'
|
3
|
+
require 'JSON'
|
4
|
+
require 'Time'
|
5
|
+
|
6
|
+
|
7
|
+
#require 'fluttrly-gem/command'
|
8
|
+
module Fluttrly
|
9
|
+
# Your code goes here...
|
10
|
+
class Command
|
11
|
+
class << self
|
12
|
+
def execute(*args)
|
13
|
+
command = args.shift
|
14
|
+
list = args.shift
|
15
|
+
message = args.empty? ? nil : args.join(' ')
|
16
|
+
|
17
|
+
parse_arguments(command, list, message)
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
def parse_arguments(command, list, message)
|
22
|
+
return list(list) if command == 'list'
|
23
|
+
return post(list, message) if command == 'post'
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
def list(list)
|
28
|
+
uri = URI.parse("http://fluttrly.com/#{list}.json")
|
29
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
30
|
+
response = http.request(Net::HTTP::Get.new(uri.request_uri))
|
31
|
+
|
32
|
+
page = JSON.parse(response.body)
|
33
|
+
page.each do |task|
|
34
|
+
puts("Task => \"#{task["task"]["content"]}\" at => #{Time.parse(task["task"]["created_at"]).strftime("%m-%d-%Y %H:%M %p")} ")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def post(list=nil, message=nil)
|
39
|
+
puts "bouverdafs"
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
metadata
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fluttrly
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Brent Beer
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-02-08 00:00:00 -06:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: json
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
description: Maintain and inspect your fluttrly lists.
|
36
|
+
email:
|
37
|
+
- brent.beer@gmail.com
|
38
|
+
executables:
|
39
|
+
- fluttrly
|
40
|
+
extensions: []
|
41
|
+
|
42
|
+
extra_rdoc_files: []
|
43
|
+
|
44
|
+
files:
|
45
|
+
- .gitignore
|
46
|
+
- Gemfile
|
47
|
+
- Gemfile.lock
|
48
|
+
- README.md
|
49
|
+
- Rakefile
|
50
|
+
- bin/fluttrly
|
51
|
+
- fluttrly-gem.gemspec
|
52
|
+
- lib/fluttrly-gem.rb
|
53
|
+
- lib/fluttrly-gem/version.rb
|
54
|
+
has_rdoc: true
|
55
|
+
homepage: http://rubygems.org/gems/fluttrly
|
56
|
+
licenses: []
|
57
|
+
|
58
|
+
post_install_message:
|
59
|
+
rdoc_options: []
|
60
|
+
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
hash: 3
|
69
|
+
segments:
|
70
|
+
- 0
|
71
|
+
version: "0"
|
72
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 3
|
78
|
+
segments:
|
79
|
+
- 0
|
80
|
+
version: "0"
|
81
|
+
requirements: []
|
82
|
+
|
83
|
+
rubyforge_project: fluttrly-gem
|
84
|
+
rubygems_version: 1.3.7
|
85
|
+
signing_key:
|
86
|
+
specification_version: 3
|
87
|
+
summary: Fluttrly.com command line interface.
|
88
|
+
test_files: []
|
89
|
+
|