da_funk 0.4.16 → 0.4.18
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/RELEASE_NOTES.md +6 -0
- data/Rakefile +1 -0
- data/lib/da_funk/screen.rb +0 -7
- data/lib/da_funk/test.rb +3 -32
- data/lib/device/version.rb +1 -1
- data/out/da_funk.mrb +0 -0
- data/test/integration/notification_test.rb +3 -6
- data/test/test_helper.rb +6 -1
- data/utils/command_line_platform.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a5fab758ef2648e1788ea84950b7bf6cf831b14
|
4
|
+
data.tar.gz: 832c818da5391f1ba9be48227d43cac80866bae9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20827c1f82448753380b6cefe12ebf9485bc67a53cc1f00067ba4f16beba581725772bd302a25109f740a803a8aec286102dc3e7fa20c09ff815f83910ead73a
|
7
|
+
data.tar.gz: 1bdeeff9b3c250cc6ec7aa7875fb7b5873cf75652a9016c2e01dcc1b6df091ea0e4c32dcf3697b50d1b8e8cb2e3ca000df6d6e956ac4ea107dbdbd7cf081dc9e
|
data/Gemfile.lock
CHANGED
@@ -7,7 +7,7 @@ GIT
|
|
7
7
|
PATH
|
8
8
|
remote: .
|
9
9
|
specs:
|
10
|
-
da_funk (0.4.
|
10
|
+
da_funk (0.4.18)
|
11
11
|
bundler (~> 1.7)
|
12
12
|
cloudwalk_handshake (~> 0.4)
|
13
13
|
rake (~> 10.4)
|
@@ -16,7 +16,7 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
cloudwalk_handshake (0.4.
|
19
|
+
cloudwalk_handshake (0.4.6)
|
20
20
|
rake (10.4.2)
|
21
21
|
yard (0.8.7.6)
|
22
22
|
|
data/RELEASE_NOTES.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# DaFunk
|
2
2
|
|
3
|
+
### 0.4.18 - 2015-12-03 - Automatically configure Application running
|
4
|
+
- Automatically configure Application running.
|
5
|
+
|
6
|
+
### 0.4.17 - 2015-12-01 - Update CloudWalkHandshake
|
7
|
+
- Update CloudWalkHandshake to version 0.4.6.
|
8
|
+
|
3
9
|
### 0.4.16 - 2015-11-27 - Serial and logical_number configuration on rake test
|
4
10
|
- Support to serial and logical_number configuration on rake test.
|
5
11
|
|
data/Rakefile
CHANGED
data/lib/da_funk/screen.rb
CHANGED
@@ -23,13 +23,6 @@ class Screen
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def jump_line(value = 1)
|
26
|
-
#CommandLinePlatform::Display._puts "=" * 50
|
27
|
-
#CommandLinePlatform::Display._puts x
|
28
|
-
#CommandLinePlatform::Display._puts y
|
29
|
-
#CommandLinePlatform::Display._puts max_x
|
30
|
-
#CommandLinePlatform::Display._puts max_y
|
31
|
-
#CommandLinePlatform::Display._puts "=" * 50
|
32
|
-
|
33
26
|
@y += value
|
34
27
|
@x = 0
|
35
28
|
@y = 0 if (@y > (@max_y-1))
|
data/lib/da_funk/test.rb
CHANGED
@@ -21,40 +21,10 @@ module DaFunk
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
module CRuby
|
25
|
-
def case
|
26
|
-
engine::TestCase
|
27
|
-
end
|
28
|
-
|
29
|
-
def engine
|
30
|
-
::Test::Unit
|
31
|
-
end
|
32
|
-
|
33
|
-
def run; end
|
34
|
-
|
35
|
-
def setup
|
36
|
-
require 'fileutils'
|
37
|
-
require 'test/unit'
|
38
|
-
|
39
|
-
libs.each do |file|
|
40
|
-
require file
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def platform
|
45
|
-
:cruby
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
24
|
class Test
|
50
25
|
class << self
|
51
|
-
attr_accessor :root_path, :libs, :tests, :logical_number, :serial
|
52
|
-
|
53
|
-
if Object.const_defined?(:MTest)
|
54
|
-
include DaFunk::MRuby
|
55
|
-
else
|
56
|
-
include DaFunk::CRuby
|
57
|
-
end
|
26
|
+
attr_accessor :root_path, :libs, :tests, :logical_number, :serial, :name
|
27
|
+
include DaFunk::MRuby
|
58
28
|
end
|
59
29
|
|
60
30
|
def self.mruby?
|
@@ -73,6 +43,7 @@ module DaFunk
|
|
73
43
|
@root_path ||= File.dirname("./")
|
74
44
|
@serial ||= "1111111111"
|
75
45
|
@logical_number ||= "00001"
|
46
|
+
@name ||= "main"
|
76
47
|
if self.cruby?
|
77
48
|
@libs ||= FileList[File.join(root_path, 'lib/**/*.rb')]
|
78
49
|
@tests ||= FileList[File.join(root_path, 'test/**/*test.rb')]
|
data/lib/device/version.rb
CHANGED
data/out/da_funk.mrb
CHANGED
Binary file
|
@@ -1,9 +1,7 @@
|
|
1
1
|
|
2
2
|
class NotificationTest < DaFunk::Test.case
|
3
3
|
def test_notification
|
4
|
-
Device::Setting.to_staging!
|
5
4
|
Device::Setting.company_name = "pc1"
|
6
|
-
Device::Setting.logical_number = "0101"
|
7
5
|
Device::Notification.setup
|
8
6
|
notification = Device::Notification.new
|
9
7
|
|
@@ -22,17 +20,16 @@ class NotificationTest < DaFunk::Test.case
|
|
22
20
|
|
23
21
|
def test_notification_SHOW_MESSAGE
|
24
22
|
$status = nil
|
25
|
-
Device::Setting.to_staging!
|
26
23
|
Device::Setting.company_name = "pc1"
|
27
|
-
Device::Setting.logical_number = "0101"
|
28
24
|
Device::Notification.setup
|
29
|
-
NotificationCallback.new "SHOW_MESSAGE", :on => Proc.new { |message,datetime|
|
25
|
+
Device::NotificationCallback.new "SHOW_MESSAGE", :on => Proc.new { |message,datetime|
|
30
26
|
$status = message
|
31
27
|
}
|
32
28
|
|
33
29
|
notification = Device::Notification.new
|
34
30
|
|
35
|
-
|
31
|
+
p "Must create message AAAA"
|
32
|
+
p "Remember to Press Enter after message appears"
|
36
33
|
time = Time.now + 60
|
37
34
|
while(time > Time.now && $status.nil?) do
|
38
35
|
notification.check
|
data/test/test_helper.rb
CHANGED
@@ -6,6 +6,11 @@ $LOAD_PATH.unshift "./#{APP_NAME}"
|
|
6
6
|
require 'da_funk'
|
7
7
|
|
8
8
|
DaFunk::Test.configure do |t|
|
9
|
-
t.root_path
|
9
|
+
t.root_path = ROOT_PATH
|
10
|
+
t.serial = "0000000001"
|
11
|
+
t.logical_number = "001"
|
12
|
+
t.name = APP_NAME
|
10
13
|
end
|
11
14
|
|
15
|
+
Device::Setting.to_staging!
|
16
|
+
|
@@ -8,6 +8,9 @@ class CommandLinePlatform
|
|
8
8
|
IO = ::IO
|
9
9
|
|
10
10
|
def self.setup
|
11
|
+
Device::System.klass = DaFunk::Test.name
|
12
|
+
Device::Setting.logical_number = DaFunk::Test.logical_number
|
13
|
+
CommandLinePlatform::System.serial = DaFunk::Test.serial
|
11
14
|
CommandLinePlatform::Display.standard_output = STDOUT
|
12
15
|
Screen.setup(21, 20)
|
13
16
|
begin
|
@@ -82,6 +85,5 @@ class CommandLinePlatform
|
|
82
85
|
end
|
83
86
|
|
84
87
|
Device.adapter ||= CommandLinePlatform
|
85
|
-
Device::System.klass = "main"
|
86
88
|
CommandLinePlatform.setup
|
87
89
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: da_funk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thiago Scalone
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|