mobius 1.0.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/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in mobius.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,3 @@
1
+ module Mobius
2
+ VERSION = "1.0.0"
3
+ end
data/lib/mobius.rb ADDED
@@ -0,0 +1,78 @@
1
+ require "mobius/version"
2
+ require 'net/http'
3
+ require 'uri'
4
+ module Mobius
5
+
6
+ SITE = # this constant will need to hold the first URL you visited as part of this game
7
+
8
+ def self.new
9
+ Mobilito.new
10
+ end
11
+
12
+ def self.send
13
+ m = Mobilito.new
14
+ res = m.transmit
15
+ m.interpret(res)
16
+ end
17
+
18
+ class Mobilito
19
+
20
+ # SOME ASSEMBLY REQUIRED (no, not the language)
21
+
22
+ def transmit
23
+ uri = URI(SITE)
24
+ res = Net::HTTP.post_form(uri, calling_card.merge(:authkey => AUTHKEY))
25
+ end
26
+
27
+ def interpret(res)
28
+ puts "Response: #{res.body}"
29
+ end
30
+
31
+ def inspect
32
+ puts "\n\n
33
+ ```` `````
34
+ ``.``` ` ````.-..`
35
+ `.--.``````` `. `.-://:.`
36
+ .-:-..````...``.```..-:://:.
37
+ :/:.:--.-...```` ``.-:/+.
38
+ /::-.----`` ``.-/+:
39
+ -//::-:--` ```-//.
40
+ :/::-..``` ``..:/`
41
+ -/:::.```` `..----..``.-://.
42
+ `/:-:-.``` `..----::-``::://`
43
+ ---::.`` `````...` -::/-
44
+ .---..````` ``` `` `:-:-
45
+ .-`..```...`` ``` `:-:.
46
+ --:-````..`` ````..`.::-
47
+ `.:..`````````````.:/::`
48
+ `/:...```````---.--//.
49
+ `-::-..````````.-::/-
50
+ `---:::-.....`..--::
51
+ .-..--////::::///:-``
52
+ ..``..-:--//-:::-` `
53
+ .`````-:-...-::-:.```` ` ` `````
54
+ ```````.-.``.:://::.````````````
55
+ `..````` ````.--.:/:://:-....```````
56
+ ``...`-```` `` `.`-::---....`-:--.....`````
57
+ ```.----`-` `` `...````````.-.--..---.``
58
+ ``...`..`-..- ````` ..``...-` ```.`
59
+ `.--.```.``-`-. ``` ``.``.``. `` ``....
60
+ `:/:-.```.`.. -`` ``..`..```` ```-`. ````. .` `.`...--.
61
+ `:+/:-.```.``` -````````````---.```` `..`. ```..``. ``.:/-::.
62
+ -:::-.`...````-``..` `````.`-. `..-.``..`-`` `.`.--/:::`
63
+ `:-:-..`....--.`...````.. `..-````..``..`.::.`.``.--::+/-
64
+ `-::.-.-`.-:..```.```.-``.....` .` `..-:- `.``.-///-`
65
+ `---:-``--`` ``.`.--`.` `-.-- `.-.-//-`
66
+ `.:.`-.``` `.`-`..`-` ````-:--///:.`
67
+ ``.....`````.... ....`` `.:/+/:.`
68
+ `......--.````..---```.-::--.`
69
+ `````....-------..``
70
+ \n\n\n
71
+ Greetings, esteemed technologist. If you're reading this, it appears
72
+ you're at least somewhat familiar with the joys of Ruby. Now let's see
73
+ what you can do. Take a look around the components of this gem. Determine
74
+ what it does, what it's supposed to do, build the difference, and USE IT.\n\n
75
+ We look forward to hearing from you...\n\n"
76
+ end
77
+ end
78
+ end
data/mobius.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "mobius/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "mobius"
7
+ s.version = Mobius::VERSION
8
+ s.authors = ["Mobius Caesar, GFM"]
9
+ s.email = ["caesar@mobiusgame.net"]
10
+ s.homepage = "http://www.mobiusgame.net"
11
+ s.summary = %q{Client Gem for Mobius Game}
12
+ s.description = %q{Client Gem for Mobius Game}
13
+
14
+ s.rubyforge_project = "mobius"
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
+
21
+ # specify any dependencies here; for example:
22
+ s.add_development_dependency "rspec"
23
+ s.add_runtime_dependency "net/http"
24
+ s.add_runtime_dependency "uri"
25
+ end
@@ -0,0 +1,68 @@
1
+ require 'mobius'
2
+
3
+ describe 'Mobius module' do
4
+ it 'contains an AUTHKEY constant' do
5
+ Mobius::AUTHKEY.should_not == nil
6
+ Mobius::AUTHKEY.kind_of?(String).should == true
7
+ end
8
+
9
+ it 'contains a SITE constant' do
10
+ Mobius::SITE.should_not == nil
11
+ Mobius::SITE.kind_of?(String).should == true
12
+ end
13
+ end
14
+
15
+ describe 'Mobilito class' do
16
+ describe '#calling_card' do
17
+ subject{Mobius.new.calling_card}
18
+ it 'returns a hash' do
19
+ subject.kind_of?(Hash).should == true
20
+ end
21
+
22
+ it 'contains the proper number of keys' do
23
+ subject.keys.count.should == 7
24
+ end
25
+
26
+ it 'contains a name string' do
27
+ subject[:name].empty?.should == false
28
+ subject[:name].kind_of?(String).should == true
29
+ end
30
+
31
+ it 'contains an email string' do
32
+ subject[:email].empty?.should == false
33
+ subject[:email].kind_of?(String).should == true
34
+ end
35
+
36
+ it 'contains a phone number string' do
37
+ subject[:phone].empty?.should == false
38
+ subject[:phone].kind_of?(String).should == true
39
+ end
40
+
41
+ it 'contains a street address' do
42
+ subject[:address1].empty?.should == false
43
+ subject[:address2].empty?.should == false
44
+ subject[:address1].kind_of?(String).should == true
45
+ subject[:address2].kind_of?(String).should == true
46
+ end
47
+
48
+ it 'contains a URL string' do
49
+ subject[:url].empty?.should == false
50
+ subject[:url].kind_of?(String).should == true
51
+ end
52
+
53
+ it 'contains notes' do
54
+ subject[:notes].empty?.should == false
55
+ subject[:notes].kind_of?(String).should == true
56
+ end
57
+
58
+ it 'does not contain more data than is reasonable' do
59
+ subject[:name].length.should < 255
60
+ subject[:email].length.should < 255
61
+ subject[:phone].length.should < 50
62
+ subject[:address1].length.should < 255
63
+ subject[:address2].length.should < 255
64
+ subject[:url].length.should < 255
65
+ subject[:notes].length.should < 255
66
+ end
67
+ end
68
+ end
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mobius
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Mobius Caesar, GFM
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-04-14 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rspec
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :development
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: net/http
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: uri
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ type: :runtime
61
+ version_requirements: *id003
62
+ description: Client Gem for Mobius Game
63
+ email:
64
+ - caesar@mobiusgame.net
65
+ executables: []
66
+
67
+ extensions: []
68
+
69
+ extra_rdoc_files: []
70
+
71
+ files:
72
+ - .gitignore
73
+ - Gemfile
74
+ - Rakefile
75
+ - lib/mobius.rb
76
+ - lib/mobius/version.rb
77
+ - mobius.gemspec
78
+ - spec/mobius_spec.rb
79
+ homepage: http://www.mobiusgame.net
80
+ licenses: []
81
+
82
+ post_install_message:
83
+ rdoc_options: []
84
+
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ hash: 3
93
+ segments:
94
+ - 0
95
+ version: "0"
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ hash: 3
102
+ segments:
103
+ - 0
104
+ version: "0"
105
+ requirements: []
106
+
107
+ rubyforge_project: mobius
108
+ rubygems_version: 1.8.11
109
+ signing_key:
110
+ specification_version: 3
111
+ summary: Client Gem for Mobius Game
112
+ test_files:
113
+ - spec/mobius_spec.rb