tramtracker 0.0.2 → 0.0.3
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 +18 -0
- data/.ruby-version +1 -0
- data/LICENSE.txt +22 -0
- data/README.md +23 -0
- data/Rakefile +1 -0
- data/bin/tramtracker +2 -2
- data/test/lib/tramtracker_test.rb +25 -0
- data/test/test_helper.rb +3 -0
- data/tramtracker.gemspec +18 -0
- metadata +33 -41
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Steven Occhipinti
|
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,23 @@
|
|
1
|
+
Tramtracker
|
2
|
+
===========
|
3
|
+
|
4
|
+
A commandline tool for Melbourne's TramTracker
|
5
|
+
|
6
|
+
|
7
|
+
Installation
|
8
|
+
------------
|
9
|
+
|
10
|
+
`gem install tramtracker`
|
11
|
+
|
12
|
+
|
13
|
+
Basic usage
|
14
|
+
-----------
|
15
|
+
|
16
|
+
`tramtracker <stop-id>`
|
17
|
+
|
18
|
+
|
19
|
+
Configuration
|
20
|
+
-------------
|
21
|
+
|
22
|
+
You may create a `~/.tramtracker` file containing the <stop-id> and omit the
|
23
|
+
command line argument
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/tramtracker
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative '../test_helper'
|
2
|
+
|
3
|
+
describe Tramtracker do
|
4
|
+
|
5
|
+
before do
|
6
|
+
@tramtracker = Tramtracker.new(1725)
|
7
|
+
@mock_response = <<-EOS
|
8
|
+
ID: 1725<br>\r\n
|
9
|
+
1) Rte 100<br>\r\n1 mins *<br>\r\n
|
10
|
+
2) Rte 101<br>\r\n10 mins *!<br>\r\n
|
11
|
+
3) Rte 102<br>\r\n20 mins *!<br>"
|
12
|
+
EOS
|
13
|
+
end
|
14
|
+
|
15
|
+
describe ".get" do
|
16
|
+
it "returns an array of hashes with route and time data" do
|
17
|
+
@tramtracker.stub :open, OpenStruct.new({:read => @mock_response}) do
|
18
|
+
@tramtracker.get.must_include({route: "100", minutes: "1"})
|
19
|
+
@tramtracker.get.must_include({route: "101", minutes: "10"})
|
20
|
+
@tramtracker.get.must_include({route: "102", minutes: "20"})
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
data/test/test_helper.rb
ADDED
data/tramtracker.gemspec
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gem.name = "tramtracker"
|
7
|
+
gem.version = "0.0.3"
|
8
|
+
gem.authors = ["Steven Occhipinti"]
|
9
|
+
gem.email = ["dev@stevenocchipinti.com"]
|
10
|
+
gem.description = "A commandline tool for Melbourne's TramTracker"
|
11
|
+
gem.summary = "CLI TramTracker"
|
12
|
+
gem.homepage = "https://github.com/stevenocchipinti/tramtracker"
|
13
|
+
|
14
|
+
gem.files = `git ls-files`.split($/)
|
15
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
16
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
17
|
+
gem.require_paths = ["lib"]
|
18
|
+
end
|
metadata
CHANGED
@@ -1,66 +1,58 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramtracker
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 2
|
10
|
-
version: 0.0.2
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Steven Occhipinti
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2013-04-30 00:00:00 Z
|
12
|
+
date: 2013-05-01 00:00:00.000000000 Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description: A commandline tool for Melbourne's TramTracker
|
22
|
-
email:
|
23
|
-
|
15
|
+
email:
|
16
|
+
- dev@stevenocchipinti.com
|
17
|
+
executables:
|
24
18
|
- tramtracker
|
25
19
|
extensions: []
|
26
|
-
|
27
20
|
extra_rdoc_files: []
|
28
|
-
|
29
|
-
|
30
|
-
-
|
21
|
+
files:
|
22
|
+
- .gitignore
|
23
|
+
- .ruby-version
|
24
|
+
- LICENSE.txt
|
25
|
+
- README.md
|
26
|
+
- Rakefile
|
31
27
|
- bin/tramtracker
|
28
|
+
- lib/tramtracker.rb
|
29
|
+
- test/lib/tramtracker_test.rb
|
30
|
+
- test/test_helper.rb
|
31
|
+
- tramtracker.gemspec
|
32
32
|
homepage: https://github.com/stevenocchipinti/tramtracker
|
33
|
-
licenses:
|
34
|
-
- MIT
|
33
|
+
licenses: []
|
35
34
|
post_install_message:
|
36
35
|
rdoc_options: []
|
37
|
-
|
38
|
-
require_paths:
|
36
|
+
require_paths:
|
39
37
|
- lib
|
40
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
- 0
|
48
|
-
version: "0"
|
49
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
45
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
55
|
-
segments:
|
56
|
-
- 0
|
57
|
-
version: "0"
|
46
|
+
requirements:
|
47
|
+
- - ! '>='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
58
50
|
requirements: []
|
59
|
-
|
60
51
|
rubyforge_project:
|
61
52
|
rubygems_version: 1.8.24
|
62
53
|
signing_key:
|
63
54
|
specification_version: 3
|
64
55
|
summary: CLI TramTracker
|
65
|
-
test_files:
|
66
|
-
|
56
|
+
test_files:
|
57
|
+
- test/lib/tramtracker_test.rb
|
58
|
+
- test/test_helper.rb
|