rst 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +17 -0
- data/Rakefile +36 -0
- data/bin/rst +43 -0
- data/features/rst.feature +13 -0
- data/features/step_definitions/rst_steps.rb +1 -0
- data/features/support/env.rb +16 -0
- data/lib/rst.rb +5 -0
- data/lib/rst/version.rb +3 -0
- data/rst.gemspec +21 -0
- data/test/tc_something.rb +7 -0
- metadata +127 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Carol Nichols
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
rst
|
2
|
+
---
|
3
|
+
|
4
|
+
A command line client for [rstat.us](http://rstat.us). Heavily influenced by [t](https://github.com/sferik/t).
|
5
|
+
|
6
|
+
Current Functionality
|
7
|
+
---------------------
|
8
|
+
|
9
|
+
* Runs with an exit status of 0.
|
10
|
+
|
11
|
+
Future functionality
|
12
|
+
--------------------
|
13
|
+
|
14
|
+
* Read statuses without being logged in.
|
15
|
+
|
16
|
+
|
17
|
+
Author: Carol Nichols
|
data/Rakefile
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
require 'rake/clean'
|
3
|
+
|
4
|
+
require 'rake/testtask'
|
5
|
+
|
6
|
+
require 'cucumber'
|
7
|
+
require 'cucumber/rake/task'
|
8
|
+
gem 'rdoc' # we need the installed RDoc gem, not the system one
|
9
|
+
require 'rdoc/task'
|
10
|
+
|
11
|
+
include Rake::DSL
|
12
|
+
|
13
|
+
Bundler::GemHelper.install_tasks
|
14
|
+
|
15
|
+
|
16
|
+
Rake::TestTask.new do |t|
|
17
|
+
t.pattern = 'test/tc_*.rb'
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
CUKE_RESULTS = 'results.html'
|
22
|
+
CLEAN << CUKE_RESULTS
|
23
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
24
|
+
t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
|
25
|
+
t.fork = false
|
26
|
+
end
|
27
|
+
|
28
|
+
Rake::RDocTask.new do |rd|
|
29
|
+
|
30
|
+
rd.main = "README.rdoc"
|
31
|
+
|
32
|
+
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
|
33
|
+
end
|
34
|
+
|
35
|
+
task :default => [:test,:features]
|
36
|
+
|
data/bin/rst
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'methadone'
|
5
|
+
require 'rst'
|
6
|
+
|
7
|
+
class App
|
8
|
+
include Methadone::Main
|
9
|
+
include Methadone::CLILogging
|
10
|
+
|
11
|
+
main do # Add args you want: |like,so|
|
12
|
+
# your program code here
|
13
|
+
# You can access CLI options via
|
14
|
+
# the options Hash
|
15
|
+
end
|
16
|
+
|
17
|
+
# supplemental methods here
|
18
|
+
|
19
|
+
# Declare command-line interface here
|
20
|
+
|
21
|
+
# description "one line description of your app"
|
22
|
+
#
|
23
|
+
# Accept flags via:
|
24
|
+
# on("--flag VAL","Some flag")
|
25
|
+
# options[flag] will contain VAL
|
26
|
+
#
|
27
|
+
# Specify switches via:
|
28
|
+
# on("--[no-]switch","Some switch")
|
29
|
+
#
|
30
|
+
# Or, just call OptionParser methods on opts
|
31
|
+
#
|
32
|
+
# Require an argument
|
33
|
+
# arg :some_arg
|
34
|
+
#
|
35
|
+
# # Make an argument optional
|
36
|
+
# arg :optional_arg, :optional
|
37
|
+
|
38
|
+
version Rst::VERSION
|
39
|
+
|
40
|
+
use_log_level_option
|
41
|
+
|
42
|
+
go!
|
43
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Feature: My bootstrapped app kinda works
|
2
|
+
In order to get going on coding my awesome app
|
3
|
+
I want to have aruba and cucumber setup
|
4
|
+
So I don't have to do it myself
|
5
|
+
|
6
|
+
Scenario: App just runs
|
7
|
+
When I get help for "rst"
|
8
|
+
Then the exit status should be 0
|
9
|
+
And the banner should be present
|
10
|
+
And the banner should document that this app takes options
|
11
|
+
And the following options should be documented:
|
12
|
+
|--version|
|
13
|
+
And the banner should document that this app takes no arguments
|
@@ -0,0 +1 @@
|
|
1
|
+
# Put your step definitions here
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'aruba/cucumber'
|
2
|
+
require 'methadone/cucumber'
|
3
|
+
|
4
|
+
ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
|
5
|
+
LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
|
6
|
+
|
7
|
+
Before do
|
8
|
+
# Using "announce" causes massive warnings on 1.9.2
|
9
|
+
@puts = true
|
10
|
+
@original_rubylib = ENV['RUBYLIB']
|
11
|
+
ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
|
12
|
+
end
|
13
|
+
|
14
|
+
After do
|
15
|
+
ENV['RUBYLIB'] = @original_rubylib
|
16
|
+
end
|
data/lib/rst.rb
ADDED
data/lib/rst/version.rb
ADDED
data/rst.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/rst/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Carol Nichols"]
|
6
|
+
gem.email = ["carol.nichols@gmail.com"]
|
7
|
+
gem.description = %q{A command line client for rstat.us}
|
8
|
+
gem.summary = %q{A command line client for rstat.us}
|
9
|
+
gem.homepage = "https://github.com/clnclarinet/rst"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "rst"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Rst::VERSION
|
17
|
+
gem.add_development_dependency('rdoc')
|
18
|
+
gem.add_development_dependency('aruba')
|
19
|
+
gem.add_development_dependency('rake','~> 0.9.2')
|
20
|
+
gem.add_dependency('methadone', '~>1.2.0')
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rst
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Carol Nichols
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-23 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rdoc
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: aruba
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.9.2
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.9.2
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: methadone
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.2.0
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.2.0
|
78
|
+
description: A command line client for rstat.us
|
79
|
+
email:
|
80
|
+
- carol.nichols@gmail.com
|
81
|
+
executables:
|
82
|
+
- rst
|
83
|
+
extensions: []
|
84
|
+
extra_rdoc_files: []
|
85
|
+
files:
|
86
|
+
- .gitignore
|
87
|
+
- Gemfile
|
88
|
+
- LICENSE
|
89
|
+
- README.md
|
90
|
+
- Rakefile
|
91
|
+
- bin/rst
|
92
|
+
- features/rst.feature
|
93
|
+
- features/step_definitions/rst_steps.rb
|
94
|
+
- features/support/env.rb
|
95
|
+
- lib/rst.rb
|
96
|
+
- lib/rst/version.rb
|
97
|
+
- rst.gemspec
|
98
|
+
- test/tc_something.rb
|
99
|
+
homepage: https://github.com/clnclarinet/rst
|
100
|
+
licenses: []
|
101
|
+
post_install_message:
|
102
|
+
rdoc_options: []
|
103
|
+
require_paths:
|
104
|
+
- lib
|
105
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ! '>='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
requirements: []
|
118
|
+
rubyforge_project:
|
119
|
+
rubygems_version: 1.8.21
|
120
|
+
signing_key:
|
121
|
+
specification_version: 3
|
122
|
+
summary: A command line client for rstat.us
|
123
|
+
test_files:
|
124
|
+
- features/rst.feature
|
125
|
+
- features/step_definitions/rst_steps.rb
|
126
|
+
- features/support/env.rb
|
127
|
+
- test/tc_something.rb
|