nabaztag_hack_kit 0.1.0.beta2 → 0.1.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,26 @@ module NabaztagHackKit
6
6
  module Mods
7
7
  module Playground
8
8
 
9
+ module Helpers
10
+ def commands(commands, command_values)
11
+ Array(commands).zip(command_values).map do |command, values|
12
+ [command] + int_array(values.split(","))
13
+ end
14
+ end
15
+
16
+ def int_array(array)
17
+ array.map do |entry|
18
+ if entry.to_i.to_s == entry
19
+ entry.to_i
20
+ else
21
+ entry
22
+ end
23
+ end
24
+ end
25
+ end
26
+
9
27
  def self.registered(app)
28
+ app.helpers Playground::Helpers
10
29
 
11
30
  app.get "/" do
12
31
  redirect "/playground"
@@ -63,22 +82,6 @@ module NabaztagHackKit
63
82
  end
64
83
  end
65
84
 
66
- private
67
- def commands(commands, command_values)
68
- Array(commands).zip(command_values).map do |command, values|
69
- [command] + int_array(values.split(","))
70
- end
71
- end
72
-
73
- def int_array(array)
74
- array.map do |entry|
75
- if entry.to_i.to_s == entry
76
- entry.to_i
77
- else
78
- entry
79
- end
80
- end
81
- end
82
85
  end
83
86
  end
84
87
  end
@@ -1,3 +1,3 @@
1
1
  module NabaztagHackKit
2
- VERSION = "0.1.0.beta2"
2
+ VERSION = "0.1.0.beta3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nabaztag_hack_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta2
4
+ version: 0.1.0.beta3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: