twoffein-client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/README.md +98 -95
  2. data/README.md.erb +4 -2
  3. data/Rakefile +3 -3
  4. data/VERSION +1 -1
  5. data/bin/twoffein-client +5 -8
  6. metadata +1 -1
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Twoffein-Client
2
- Client-Version: 1.0.0 | API-Version: 0.2
2
+ Client-Version: 0.1.0 | API-Version: 0.2
3
3
 
4
4
  This client for [Twoffein](http://twoffein.com/)'s [API](http://twoffein.com/api-faq/).
5
5
 
@@ -27,7 +27,7 @@ SYNOPSIS
27
27
  twoffein-client [global options] command [command options] [arguments...]
28
28
 
29
29
  VERSION
30
- 1.0.0
30
+ 0.1.0
31
31
 
32
32
  GLOBAL OPTIONS
33
33
  --help - Show this message
@@ -44,6 +44,7 @@ COMMANDS
44
44
 
45
45
  ## Examples
46
46
 
47
+
47
48
  ### Drinks
48
49
 
49
50
  **Input:**
@@ -52,92 +53,94 @@ COMMANDS
52
53
 
53
54
  **Output:**
54
55
  ```
55
- Drink (key)
56
- -------------------------------------------
57
- Kaffee (kaffee)
58
- Milchkaffee (milchkaffee)
59
- Eiskaffee (eiskaffee)
60
- Energy Drink (energiedrink)
61
- Cola (cola)
62
- Cola Light (colalight)
63
- Cola Zero (colazero)
64
- Cola-Mix (colamix)
65
- Cola-Mix Light (colamixlight)
66
- Cola-Mix Zero (colamixzero)
67
- Bubble Tea (bubbletea)
68
- Cherry Cola (cherrycola)
69
- Vanilla Cola (vanillacola)
70
- Caffé Latte (cafelatte)
71
- Caffé au Lait (cafeaulait)
72
- Latte Macchiato (lattemacchiato)
73
- Espresso Macciato (espressomacciato)
74
- Espresso con Panne (espressoconpanne)
75
- Flat White (flatwhite)
76
- Caffé Breve (caffebreve)
77
- Caffé Mocha (caffemocha)
78
- Americano (americano)
79
- Melange (melange)
80
- Red Eye (redeye)
81
- Tee (tee)
82
- Eistee (eistee)
83
- Kakao (kakao)
84
- Mate (mate)
85
- Espresso (espresso)
86
- Cappuccino (cappuccino)
87
- Vannillochino (vannillochino)
88
- Instantkaffee (instantkaffee)
89
- Mokka (mokka)
90
- Chai-Latte (chailatte)
91
- Grünen Tee (guenertee)
92
- Schwarztee (schwarztee)
93
- 1337MATE (leetmate)
94
- Club-Mate (clubmate)
95
- Club-Mate Cola (clubmatecola)
96
- ICE-Tea KRAFTSTOFF (kraftstoff)
97
- Premium-Cola (premiumcola)
98
- Dr Pepper (drpepper)
99
- Vita Cola (vitacola)
100
- Vita Cola Mix (vitacolamix)
101
- Vita Cola Pur (vitacolapur)
102
- Schokocino (schokocino)
103
- afri cola (africola)
104
- afri sugarfree (afrisugarfree)
105
- afri power (afripower)
106
- fritz-kola (fritzkola)
107
- fritz-kola stevia (fritzkolastevia)
108
- fritz-kola zuckerfrei (fritzkolazuckerfrei)
109
- mischmasch (mischmasch)
110
- Haji Cola (hajicola)
111
- KILLERFISH Hot Energy (killerfishhotenergy)
112
- Café Frappé (cafefrappe)
113
- Energy Shot (energyshot)
114
- Wasser (wasser)
115
- Mineralwasser (mineralwasser)
116
- Apfelsaft (apfelsaft)
117
- Orangensaft (orangensaft)
118
- Milch (milch)
119
- Sojamilch (sojamilch)
120
- Orangenlimonade (orangenlimonade)
121
- Zitronenlimonade (zitronenlimonade)
122
- Kräuterlimonade (kraeuterlimonade)
123
- Apfelsaftschorle (apfelsaftschorle)
124
- Ginger Ale (gingerale)
125
- Tonic Water (tonicwater)
126
- Bitter Lemon (bitterlemon)
127
- Bananensaft (bananensaft)
128
- Traubensaft (traubensaft)
129
- Milchshake (milchshake)
130
- Joghurtdrink (joghurtdrink)
131
- Smoothie (smoothie)
132
- Espresso Doppio (espressodoppio)
133
- Fassbrause (fassbrause)
134
- Ayran (ayran)
135
- Flora Power (florapower)
136
- VOLT Cola (voltcola)
137
- COFAIN 699 (cofain669)
138
- Erdbeersaft (erdbeersaft)
139
- KiBa (kiba)
140
- Müllermilch (muellermilch)
56
+ Drink (key)
57
+ --------------------------------------------
58
+ Kaffee (kaffee)
59
+ Milchkaffee (milchkaffee)
60
+ Eiskaffee (eiskaffee)
61
+ Energy Drink (energiedrink)
62
+ Cola (cola)
63
+ Cola Light (colalight)
64
+ Cola Zero (colazero)
65
+ Cola-Mix (colamix)
66
+ Cola-Mix Light (colamixlight)
67
+ Cola-Mix Zero (colamixzero)
68
+ Bubble Tea (bubbletea)
69
+ Cherry Cola (cherrycola)
70
+ Vanilla Cola (vanillacola)
71
+ Caffé Latte (cafelatte)
72
+ Caffé au Lait (cafeaulait)
73
+ Latte Macchiato (lattemacchiato)
74
+ Espresso Macciato (espressomacciato)
75
+ Espresso con Panne (espressoconpanne)
76
+ Flat White (flatwhite)
77
+ Caffé Breve (caffebreve)
78
+ Caffé Mocha (caffemocha)
79
+ Americano (americano)
80
+ Melange (melange)
81
+ Red Eye (redeye)
82
+ Tee (tee)
83
+ Eistee (eistee)
84
+ Kakao (kakao)
85
+ Mate (mate)
86
+ Espresso (espresso)
87
+ Cappuccino (cappuccino)
88
+ Vannillochino (vannillochino)
89
+ Instantkaffee (instantkaffee)
90
+ Mokka (mokka)
91
+ Chai-Latte (chailatte)
92
+ Grünen Tee (guenertee)
93
+ Schwarztee (schwarztee)
94
+ 1337MATE (leetmate)
95
+ Club-Mate (clubmate)
96
+ Club-Mate Cola (clubmatecola)
97
+ ICE-Tea KRAFTSTOFF (kraftstoff)
98
+ Premium-Cola (premiumcola)
99
+ Dr Pepper (drpepper)
100
+ Vita Cola (vitacola)
101
+ Vita Cola Mix (vitacolamix)
102
+ Vita Cola Pur (vitacolapur)
103
+ Schokocino (schokocino)
104
+ afri cola (africola)
105
+ afri sugarfree (afrisugarfree)
106
+ afri power (afripower)
107
+ fritz-kola (fritzkola)
108
+ fritz-kola stevia (fritzkolastevia)
109
+ fritz-kola zuckerfrei (fritzkolazuckerfrei)
110
+ mischmasch (mischmasch)
111
+ Haji Cola (hajicola)
112
+ KILLERFISH Hot Energy (killerfishhotenergy)
113
+ Café Frappé (cafefrappe)
114
+ Energy Shot (energyshot)
115
+ Wasser (wasser)
116
+ Mineralwasser (mineralwasser)
117
+ Apfelsaft (apfelsaft)
118
+ Orangensaft (orangensaft)
119
+ Milch (milch)
120
+ Sojamilch (sojamilch)
121
+ Orangenlimonade (orangenlimonade)
122
+ Zitronenlimonade (zitronenlimonade)
123
+ Kräuterlimonade (kraeuterlimonade)
124
+ Apfelsaftschorle (apfelsaftschorle)
125
+ Ginger Ale (gingerale)
126
+ Tonic Water (tonicwater)
127
+ Bitter Lemon (bitterlemon)
128
+ Bananensaft (bananensaft)
129
+ Traubensaft (traubensaft)
130
+ Milchshake (milchshake)
131
+ Joghurtdrink (joghurtdrink)
132
+ Smoothie (smoothie)
133
+ Espresso Doppio (espressodoppio)
134
+ Fassbrause (fassbrause)
135
+ Ayran (ayran)
136
+ Flora Power (florapower)
137
+ VOLT Cola (voltcola)
138
+ COFAIN 699 (cofain669)
139
+ Erdbeersaft (erdbeersaft)
140
+ KiBa (kiba)
141
+ Müllermilch (muellermilch)
142
+ Malzbier (malzbier)
143
+ Rhabarberschorle (rhabarberschorle)
141
144
  ```
142
145
 
143
146
  ### Drinks (filtered)
@@ -148,10 +151,10 @@ Müllermilch (muellermilch)
148
151
 
149
152
  **Output:**
150
153
  ```
151
- Drink (key)
152
- ------------------------------------
153
- Club-Mate (clubmate)
154
- Club-Mate Cola (clubmatecola)
154
+ Drink (key)
155
+ ------------------------------
156
+ Club-Mate (clubmate)
157
+ Club-Mate Cola (clubmatecola)
155
158
  ```
156
159
 
157
160
  ### Profile
@@ -164,9 +167,9 @@ Club-Mate Cola (clubmatecola)
164
167
  ```
165
168
  Quest: Blitzlicht
166
169
  Drink: Club-Mate
167
- Rank: 75
170
+ Rank: 74
168
171
  Rank Title: Kaffeekännchen
169
- Drunken: 12
172
+ Drunken: 16
170
173
  Bluttwoffeinkonzentration: 1%
171
174
  First Login: 2012-07-08 13:36
172
175
  Screen Name: DSIW
@@ -195,7 +198,7 @@ _Notice: You can't send yourself a cookie._
195
198
  ```
196
199
  Ich trinke gerade Club-Mate.
197
200
  Info: Youre Tweet has been tweeted. Thanks.
198
- Drinks today: 1
201
+ Drinks today: 2
199
202
  ```
200
203
 
201
204
  ## Contributing
data/README.md.erb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Twoffein-Client
2
- Client-Version: <%= require File.absolute_path("lib/twoffein-client/version.rb", __FILE__); Twoffein::Client::VERSION %> | API-Version: <%= require File.absolute_path("lib/twoffein-client/version.rb", __FILE__); Twoffein::Server::VERSION %>
2
+ Client-Version: <%= require File.absolute_path("../lib/twoffein-client/version.rb", __FILE__); Twoffein::Client::VERSION %> | API-Version: <%= require File.absolute_path("../lib/twoffein-client/version.rb", __FILE__); Twoffein::Server::VERSION %>
3
3
 
4
4
  This client for [Twoffein](http://twoffein.com/)'s [API](http://twoffein.com/api-faq/).
5
5
 
@@ -25,7 +25,7 @@ Or install it yourself as:
25
25
 
26
26
  ## Examples
27
27
  <%
28
- def example(title, command);
28
+ def self.example(title, command);
29
29
  title = "### #{title}"
30
30
  input = "**Input:**\n\n #{command.gsub("bundle exec bin/",'')}"
31
31
  output = "**Output:**\n```\n#{%x[#{command}]}```"
@@ -41,6 +41,8 @@ Or install it yourself as:
41
41
 
42
42
  <%= example "Cookie", "bundle exec bin/twoffein-client cookie DSIW" %>
43
43
 
44
+ _Notice: You can't send yourself a cookie._
45
+
44
46
  <%= example "Tweet", "bundle exec bin/twoffein-client tweet clubmate" %>
45
47
 
46
48
  ## Contributing
data/Rakefile CHANGED
@@ -40,16 +40,16 @@ task :default => [:spec,:features]
40
40
  module Erb
41
41
  require 'erb'
42
42
 
43
- def rm_basename_ext file, extension
43
+ def self.rm_basename_ext file, extension
44
44
  path = Pathname.new(file)
45
45
  path.basename.sub(/\.#{extension}$/, '').to_s
46
46
  end
47
47
 
48
- def target_of file
48
+ def self.target_of file
49
49
  rm_basename_ext(file, "erb")
50
50
  end
51
51
 
52
- def generate_file file, options={}
52
+ def self.generate_file file, options={}
53
53
  target = target_of file
54
54
  puts "generating #{target}"
55
55
  return if options[:noop]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/bin/twoffein-client CHANGED
@@ -24,7 +24,7 @@ command :profile do |c|
24
24
  #if options[:grep]
25
25
  #puts Profiles.search(/#{options["grep"]}/i)
26
26
  #else
27
- puts Profile.get profile
27
+ puts Profile.get(profile)
28
28
  #end
29
29
  end
30
30
  end
@@ -36,11 +36,8 @@ command :drinks do |c|
36
36
  c.flag :grep
37
37
 
38
38
  c.action do |global_options,options,args|
39
- if options[:grep]
40
- puts Drinks.search(/#{options[:grep]}/i)
41
- else
42
- puts Drinks.new
43
- end
39
+ drinks = options[:grep] ? Drinks.search(/#{options[:grep]}/i) : Drinks.new
40
+ puts drinks.to_s
44
41
  end
45
42
  end
46
43
 
@@ -59,7 +56,7 @@ command :tweet do |c|
59
56
  info = tweet.publish unless DEBUG
60
57
  puts 'Info: ' + info[:info] unless info.nil?
61
58
  puts 'Drinks today: ' + info[:tweets].to_s if info && !info[:tweets].nil?
62
- rescue Twoffein::Error => e
59
+ rescue Server::Error => e
63
60
  puts e.message
64
61
  end
65
62
  end
@@ -75,7 +72,7 @@ command :cookie do |c|
75
72
  begin
76
73
  info = cookie.send unless DEBUG
77
74
  puts 'Info: ' + info[:info] unless info.nil?
78
- rescue Twoffein::Error => e
75
+ rescue Server::Error => e
79
76
  puts e.message
80
77
  end
81
78
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twoffein-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: