da_funk 0.6.3 → 0.6.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d8b61d365bd82c3bb9c7c3a7008903f6b3812a7
4
- data.tar.gz: f5687ceb98bd71957610afde0eacafc4b8ae7caf
3
+ metadata.gz: b08890583ad6d10c592b5ef42e9f87586fcb5eb2
4
+ data.tar.gz: 73027d348b22d8a5b1799b5a631f2703ededa91a
5
5
  SHA512:
6
- metadata.gz: 44bebc1031aa17fa379a9c6c0d870a5cee858e253c16433eabf70a6182f3ef627b5398af89fb9e3fa28218d5e098542f7a77bb693ced1d72dc4a09e48e27664c
7
- data.tar.gz: 7f93930798df834c2f976f63e0bf9f072977e1cd93039e140560f23e89c5138d9b4ae3a7155e42f5295a22a1c72842a46be37799d3fac2cb2435f493f4a414ca
6
+ metadata.gz: c02ca455f484d9b6f2a89552c17b2a530305e04b86cc7b4ccc1ba65bce0a00c219a6fc3d136e07c396f689b6b053c3d2fc8c37a097094f761188804f3446bb33
7
+ data.tar.gz: 55ec01977d0b7f49d0557ddb0cdf0655bd924156f38469864bbc674b46f80d3eaceb58b37d49b6cddc79c0223a84e9805cc97edcce98424275b134286cbde262
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- da_funk (0.6.3)
4
+ da_funk (0.6.4)
5
5
  bundler (~> 1.7)
6
6
  cloudwalk_handshake (~> 0.5)
7
7
  posxml_parser (~> 0.6)
@@ -11,14 +11,15 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- cloudwalk_handshake (0.5.2)
15
- funky-simplehttp (0.4.3)
14
+ cloudwalk_handshake (0.5.3)
15
+ funky-simplehttp (0.4.4)
16
16
  posxml_parser (0.7.2)
17
17
  rake (10.5.0)
18
18
  yard (0.8.7.6)
19
19
 
20
20
  PLATFORMS
21
21
  ruby
22
+ x86-mingw32
22
23
 
23
24
  DEPENDENCIES
24
25
  cloudwalk_handshake
@@ -1,5 +1,12 @@
1
1
  # DaFunk
2
2
 
3
+ ### 0.6.4 - 2016-02-16 - Update cloudwalk_handshake
4
+
5
+ - Update cloudwalk_handshake to version 0.5.3.
6
+ - Add DaFunk::VERSION to define da_funk version.
7
+ - Change Device.version to define platform/device version.
8
+ - Fix Printer.check, syntax error.
9
+
3
10
  ### 0.6.3 - 2016-02-12 - Update cloudwalk_handshake
4
11
 
5
12
  - Update cloudwalk_handshake to version 0.5.2.
data/Rakefile CHANGED
@@ -10,6 +10,7 @@ FileUtils.cd DA_FUNK_ROOT
10
10
 
11
11
  FILES = FileList[
12
12
  "lib/device/version.rb",
13
+ "lib/da_funk/version.rb",
13
14
  "lib/da_funk/helper.rb",
14
15
  "lib/da_funk.rb",
15
16
  "lib/da_funk/test.rb",
@@ -5,11 +5,11 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  tasks = File.expand_path('../tasks', __FILE__)
6
6
  $LOAD_PATH.unshift(tasks) unless $LOAD_PATH.include?(tasks)
7
7
 
8
- require 'device/version.rb'
8
+ require 'da_funk/version.rb'
9
9
 
10
10
  Gem::Specification.new do |spec|
11
11
  spec.name = "da_funk"
12
- spec.version = Device::API_VERSION
12
+ spec.version = DaFunk::VERSION
13
13
  spec.authors = ["Thiago Scalone"]
14
14
  spec.email = ["thiago@cloudwalk.io"]
15
15
  spec.summary = "MRuby Embedded System Framework"
@@ -1,5 +1,6 @@
1
1
  unless Object.const_defined?(:MTest)
2
2
  file_path = File.dirname(File.realpath(__FILE__))
3
+ require file_path + "/da_funk/version.rb"
3
4
  require file_path + "/da_funk/helper.rb"
4
5
  require file_path + "/da_funk/iso8583.rb"
5
6
  require file_path + "/da_funk/rake_task.rb"
@@ -0,0 +1,4 @@
1
+ module DaFunk
2
+ VERSION="0.6.4"
3
+ end
4
+
@@ -180,7 +180,7 @@ class Device
180
180
  # @return [Fixnum] ERR_PRN_PAPEROUT Out of paper.
181
181
  # @return [Fixnum] ERR_PRN_OVERHEAT Printer overheating.
182
182
  def self.check
183
- self._check
183
+ self.adapter.check
184
184
  end
185
185
 
186
186
  # Check if printer has paper
@@ -21,7 +21,7 @@ class Device
21
21
  IO_ERROR = -3
22
22
 
23
23
  def self.request_file(remote_path, local_path, crc = "")
24
- download = Device::Transaction::Download.new(Device::System.serial, "", Device.version)
24
+ download = Device::Transaction::Download.new(Device::System.serial, "", DaFunk::VERSION)
25
25
  download.perform(Device::Network.socket,
26
26
  Device::Setting.company_name,
27
27
  remote_path, local_path, Device::System.app,
@@ -1,11 +1,5 @@
1
1
 
2
2
  class Device
3
- API_VERSION="0.6.3"
4
-
5
- def self.api_version
6
- Device::API_VERSION
7
- end
8
-
9
3
  def self.version
10
4
  adapter.version
11
5
  end
@@ -4,6 +4,7 @@ APP_NAME = File.basename(File.dirname(ROOT_PATH))
4
4
  $LOAD_PATH.unshift "./#{APP_NAME}"
5
5
 
6
6
  require 'da_funk'
7
+ require 'funky-simplehttp'
7
8
 
8
9
  DaFunk::Test.configure do |t|
9
10
  t.root_path = ROOT_PATH
@@ -1,9 +1,9 @@
1
1
 
2
2
  class ApplicationTest < DaFunk::Test.case
3
3
  def setup
4
- @file_path = "./ttt"
4
+ @file_path = "#{Device::Setting.company_name}_ttt"
5
5
  @string = "12345678901234567890"
6
- @file = File.open("./ttt", "w+")
6
+ @file = File.open("./ttt.zip", "w+")
7
7
  @file.write(@string)
8
8
  @file.close
9
9
  @crc = Device::Crypto.crc16_hex(@string)
@@ -11,21 +11,21 @@ class ApplicationTest < DaFunk::Test.case
11
11
  end
12
12
 
13
13
  def test_check_crc_true
14
- application = Device::Application.new("TTT", @file_path, "ruby", @crc)
14
+ application = Device::Application.new("TTT", @file_path, "ruby", nil)
15
15
  assert_equal true, application.outdated?
16
16
  end
17
17
 
18
18
  def test_check_crc_false
19
- application = Device::Application.new("TTT", @file_path, "ruby", "1111")
19
+ application = Device::Application.new("TTT", @file_path, "ruby", @crc)
20
20
  assert_equal false, application.outdated?
21
21
  end
22
22
 
23
23
  def test_check_crc_non_file
24
24
  application = Device::Application.new("TTT", "./non_exists", "ruby", "1111")
25
- assert_equal false, application.outdated?
25
+ assert_equal true, application.outdated?
26
26
  end
27
27
 
28
28
  def teardown
29
- File.delete(@file_path)
29
+ File.delete("./ttt.zip")
30
30
  end
31
31
  end
@@ -44,15 +44,6 @@ class HelperTest < DaFunk::Test.case
44
44
  assert_equal "10,000.000", @helper.number_to_currency(10000.0, {:precision => 3})
45
45
  end
46
46
 
47
- def test_number_to_currency_basic
48
- assert_equal "U$: 0.00", @helper.number_to_currency("", {:label => "U$: "})
49
- assert_equal "U$: 0.01", @helper.number_to_currency("1", {:label => "U$: "})
50
- assert_equal "U$: 0.10", @helper.number_to_currency("10", {:label => "U$: "})
51
- assert_equal "U$: 0.01", @helper.number_to_currency("01", {:label => "U$: "})
52
- assert_equal "U$: 1.00", @helper.number_to_currency("100", {:label => "U$: "})
53
- assert_equal "U$: 10.00", @helper.number_to_currency("1000", {:label => "U$: "})
54
- end
55
-
56
47
  def test_helper_include_scope
57
48
  assert HelperKlass.methods.include? :attach
58
49
  assert HelperKlass.new.methods.include? :attach
@@ -97,7 +97,7 @@ class CommandLinePlatform
97
97
  def self.versions
98
98
  {
99
99
  "OS" => Device.version,
100
- "SDK" => Device.api_version,
100
+ "SDK" => DaFunk::VERSION,
101
101
  "EMV" => "0.0.1",
102
102
  "Pinpad" => "0.0.1"
103
103
  }
@@ -105,7 +105,7 @@ class CommandLinePlatform
105
105
  end
106
106
 
107
107
  def self.version
108
- "0.0.1"
108
+ DaFunk::VERSION
109
109
  end
110
110
  end
111
111
 
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.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Scalone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-12 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -120,6 +120,7 @@ files:
120
120
  - lib/da_funk/screen.rb
121
121
  - lib/da_funk/screen_flow.rb
122
122
  - lib/da_funk/test.rb
123
+ - lib/da_funk/version.rb
123
124
  - lib/device.rb
124
125
  - lib/device/application.rb
125
126
  - lib/device/audio.rb