extface 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +13 -5
  2. data/app/assets/javascripts/extface/devices.js +6 -0
  3. data/app/controllers/extface/handler_controller.rb +17 -10
  4. data/app/models/extface/device.rb +6 -3
  5. data/app/models/extface/driver.rb +42 -18
  6. data/app/models/extface/driver/epson/esc_pos.rb +12 -0
  7. data/app/models/extface/driver/epson/fiscal.rb +4 -0
  8. data/app/models/extface/driver/epson_tm_u220.rb +21 -0
  9. data/app/models/extface/driver/generic_pos.rb +4 -0
  10. data/app/models/extface/driver/star_scp700.rb +1 -5
  11. data/app/models/extface/driver/star_tsp200.rb +34 -0
  12. data/app/views/extface/devices/show.html.erb +10 -0
  13. data/app/views/layouts/extface/application.html.erb +1 -0
  14. data/lib/extface.rb +0 -1
  15. data/lib/extface/mapping.rb +2 -2
  16. data/lib/extface/version.rb +1 -1
  17. metadata +127 -169
  18. data/db/migrate/20140216110018_create_extface_pos_print_drivers.rb +0 -9
  19. data/db/migrate/20140216131245_create_extface_raw_drivers.rb +0 -9
  20. data/db/migrate/20140216131457_create_extface_fiscal_print_drivers.rb +0 -9
  21. data/db/migrate/20140216134748_create_extface_pbx_cdr_drivers.rb +0 -9
  22. data/db/migrate/20140303113217_drop_separate_driver_type_tables.rb +0 -12
  23. data/test/dummy/db/development.sqlite3 +0 -0
  24. data/test/dummy/db/test.sqlite3 +0 -0
  25. data/test/dummy/log/development.log +0 -164
  26. data/test/dummy/log/test.log +0 -5213
  27. data/test/dummy/tmp/cache/assets/test/sprockets/0a8a23b1a73ebf217f4e2b765013ce7b +0 -0
  28. data/test/dummy/tmp/cache/assets/test/sprockets/21fb58a50e25d1170f2c7d5bd5d29c54 +0 -0
  29. data/test/dummy/tmp/cache/assets/test/sprockets/263375f2d55c31687ed052f99ddead55 +0 -0
  30. data/test/dummy/tmp/cache/assets/test/sprockets/3f4ff460a79b2e29781690193a3960f6 +0 -0
  31. data/test/dummy/tmp/cache/assets/test/sprockets/4ef10b222fde3c042209a46daf3d3e36 +0 -0
  32. data/test/dummy/tmp/cache/assets/test/sprockets/544650645bc510ef8fbee0043c41fdcf +0 -0
  33. data/test/dummy/tmp/cache/assets/test/sprockets/6dbf2b0443792e51055710be15c83197 +0 -0
  34. data/test/dummy/tmp/cache/assets/test/sprockets/717acb3e7c0df18696cf1bc56de6d3d5 +0 -0
  35. data/test/dummy/tmp/cache/assets/test/sprockets/9891cbb0808f38b2c42f42fd89e662a4 +0 -0
  36. data/test/dummy/tmp/cache/assets/test/sprockets/9b178820b9dc8c81c9784cf7ee3b7d35 +0 -0
  37. data/test/dummy/tmp/cache/assets/test/sprockets/a06a4a7f51754a6a2c0694eb39ff824b +0 -0
  38. data/test/dummy/tmp/cache/assets/test/sprockets/a8cc2e73253025d2518d2449e16e5266 +0 -0
  39. data/test/dummy/tmp/cache/assets/test/sprockets/b56dfad0b14283f2cc10c62f37d71cc7 +0 -0
  40. data/test/dummy/tmp/cache/assets/test/sprockets/e1197e0129ade843b08de0b45c47fc40 +0 -0
  41. data/test/dummy/tmp/cache/assets/test/sprockets/ece3270b150db7c668579bb91ac7e2e5 +0 -0
  42. data/test/dummy/tmp/cache/assets/test/sprockets/f018ab87f3490dbbcbc2e3c9f36aed3d +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 714c0243acf089e3b0d8578dd2f394596065b6e0
4
- data.tar.gz: 6611c382e20b2188646f6e2f3cbf8641dbb24f30
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OTEyMjE5ZWI1YzM1NzYzZDgxN2Y2NWFjNGI2YTA5MjA1OGY0NzI1Mw==
5
+ data.tar.gz: !binary |-
6
+ YTFiNGM0OGQzNGZkZjQwNzliNzJiYmNkOTg3YmUwZjY4NjhmYWExZQ==
5
7
  SHA512:
6
- metadata.gz: 12075904cb581e19cd763625b419aa4343a89b79b39a9bd490e74057c0c06d2b1fe105715657f079bf729da0876f87f3a480498f305b51b91977cdc26eef7869
7
- data.tar.gz: e5e6dc9737e49882078aab1a19560421bc043619e05cade202d5c59b7b246f11a77f0694e530ed183499dc33dd50ae71f73c60eebf86fae1a4f03f501ae6bc8f
8
+ metadata.gz: !binary |-
9
+ NmM2ZjBiMWFmMTRjM2MxMDM0NDA5ZDNkYWU2OGUwN2Q3NzA4ODZkOTAwZWQx
10
+ MmRkMjFmYmEyN2EwZmQ4MjY3NThmMGViNjFiMDU3OTNmZDU5N2Q3MjRkY2Vm
11
+ NWNlMGM3YTI1YTZiZTA2ZGI4NmFhMWJkMjZlYzRhZWI2ZTZmYzc=
12
+ data.tar.gz: !binary |-
13
+ MTE1YmJhZGJlNDNkMDI3NDZhNmY3NDNmZmE2MzFmZDhhMDlkYjM1YzAyZTEy
14
+ ZDM4MDExMTJhMDIyZGU1NmQzM2NiY2RmNjM3ZGE4MzIzZmNjOTk2ZTVkMzI1
15
+ NGJlYTViYjNjN2QwMWQ4YjM1NDVjM2ZhYTA2N2M2MzdiMDlkYTA=
@@ -1,2 +1,8 @@
1
1
  // Place all the behaviors and hooks related to the matching controller here.
2
2
  // All this logic will automatically be available in application.js.
3
+ $(document).ready(function() {
4
+ $('#push').click(function(e) {
5
+ $.post($(this).attr('href'), $('#data').val());
6
+ e.preventDefault();
7
+ });
8
+ });
@@ -43,18 +43,25 @@ module Extface
43
43
  def push
44
44
  # get request.body.read
45
45
  # if it is push message, process it
46
- response.headers['Content-Type'] = 'text/event-stream'
47
- p request.body.read
48
- Extface.redis.subscribe(:alabala) do |on|
49
- on.message do |event, data|
50
- response.stream.write("event: #{event} data: #{data}\n\n")
51
- Extface.redis.unsubscribe
46
+ status = :not_implemented
47
+ unless device.present?
48
+ status = :not_found
49
+ else
50
+ Extface.redis_block do |r|
51
+ r.append device.uuid, request.body.read
52
+ @full_buffer = r.get device.uuid
52
53
  end
54
+ if bytes_porcessed = device.driver.handle(@full_buffer)
55
+ Extface.redis_block do |r|
56
+ r.set device.uuid, r.get(device.uuid)[bytes_porcessed]
57
+ end
58
+ end
59
+ status = :ok
53
60
  end
54
- response.stream.write "finish\n"
55
- ensure
56
- response.stream.write "failed\n"
57
- response.stream.close
61
+ render nothing: true, status: status
62
+ rescue => e
63
+ p e.message
64
+ render nothing: true, status: :internal_server_error
58
65
  end
59
66
 
60
67
  def settings
@@ -36,9 +36,12 @@ module Extface
36
36
  Thread.new do
37
37
  begin
38
38
  raise 'No driver configured' unless driver.present?
39
- driver.set_job(job)
40
- yield driver
41
- job.complete!
39
+ if driver.set_job(job)
40
+ yield driver
41
+ job.complete!
42
+ else
43
+ raise driver.errors.full_messages.join(', ')
44
+ end
42
45
  rescue => e
43
46
  STDERR.puts e.message
44
47
  e.backtrace.each do |line|
@@ -33,39 +33,53 @@ module Extface
33
33
  end
34
34
  end
35
35
 
36
- def handle(buffer) # handle push messages from device outside active session
37
- return false
36
+ # called on every push message received, buffer contains all not processed data
37
+ def handle(buffer)
38
+ $stdout.puts "Extface:#{device.uuid} PUSH #{buffer}"
39
+ return buffer.length # return number of bytes processed
38
40
  end
39
41
 
40
42
  def push(buffer)
41
-
42
- if @job
43
- Timeout.timeout(Extface.device_timeout) do
44
- Extface.redis_block do |r|
45
- r.subscribe(@job.id) do |on| #blocking until delivered
46
- on.subscribe do |channel, subscriptions|
47
- @job.rpush buffer
48
- end
49
- on.message do |event, data|
50
- r.unsubscribe
51
- @job.connected!
52
- end
43
+ if @job
44
+ Timeout.timeout(Extface.device_timeout) do
45
+ Extface.redis_block do |r|
46
+ r.subscribe(@job.id) do |on| #blocking until delivered
47
+ on.subscribe do |channel, subscriptions|
48
+ @job.rpush buffer
49
+ end
50
+ on.message do |event, data|
51
+ r.unsubscribe
52
+ @job.connected!
53
53
  end
54
54
  end
55
55
  end
56
- else
57
- raise "No job given"
58
56
  end
59
-
57
+ else
58
+ raise "No job given"
59
+ end
60
60
  end
61
61
 
62
62
  def pull(timeout = nil)
63
+ element = nil
63
64
  Extface.redis_block do |r|
64
- list, element = r.blpop(device.uuid, :timeout => timeout)
65
+ list, element = r.blpop(buffer_key, :timeout => timeout)
65
66
  end
66
67
  element
67
68
  end
68
69
 
70
+ def flush
71
+ Extface.redis_block do |r|
72
+ r.del device.uuid
73
+ r.del buffer_key
74
+ end
75
+ end
76
+
77
+ def rpush(buffer)
78
+ Extface.redis_block do |r|
79
+ r.rpush buffer_key, buffer
80
+ end
81
+ end
82
+
69
83
  def notify(message)
70
84
  raise "No job given" unless @job
71
85
  @job.notify(message)
@@ -73,7 +87,17 @@ module Extface
73
87
 
74
88
  def set_job(job)
75
89
  @job = job
90
+ return check_status
91
+ end
92
+
93
+ def check_status
94
+ errors.add :base, :not_implemented
95
+ false
76
96
  end
77
97
 
98
+ private
99
+ def buffer_key
100
+ "#{device.uuid}:#{self.id}"
101
+ end
78
102
  end
79
103
  end
@@ -0,0 +1,12 @@
1
+ require 'active_support/concern'
2
+ module Extface
3
+ module Driver::Epson::EscPos
4
+
5
+ def autocut(partial = true) # (Function B)
6
+ # <GS> 'V' 0x65 x - Full-cut command
7
+ # <GS> 'V' 0x66 x - Partial-cut command
8
+ push partial ? "\x1D\x56\x65\x03" : "\x1D\x56\x66\x03"
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,4 @@
1
+ module Extface
2
+ module Driver::Epson::Fiscal
3
+ end
4
+ end
@@ -0,0 +1,21 @@
1
+ require 'extface/driver/epson/esc_pos'
2
+ require 'extface/driver/epson/fiscal'
3
+ module Extface
4
+ class Driver::EpsonTmU220 < Driver::GenericPos
5
+ NAME = 'Epson TM-U220 (Serial)'.freeze
6
+ GROUP = Extface::FISCAL_DRIVER
7
+
8
+ DEVELOPMENT = true #driver is not ready for production (not passing all tests or has major bugs)
9
+
10
+ # Select driver features
11
+ RAW = true #responds to #push(data) and #pull
12
+ PRINT = true #POS, slip printers
13
+ FISCAL = true #cash registers, fiscal printers
14
+ REPORT = false #only transmit data that must be parsed by handler, CDR, report devices
15
+
16
+ has_serial_config
17
+
18
+ include Extface::Driver::Epson::EscPos
19
+ include Extface::Driver::Epson::Fiscal
20
+ end
21
+ end
@@ -45,5 +45,9 @@ module Extface
45
45
  end
46
46
  end
47
47
 
48
+ def check_status
49
+ return true #just pass
50
+ end
51
+
48
52
  end
49
53
  end
@@ -10,10 +10,6 @@ module Extface
10
10
  PRINT = true #POS, slip printers
11
11
  FISCAL = false #cash registers, fiscal printers
12
12
  REPORT = false #only transmit data that must be parsed by handler, CDR, report devices
13
-
14
- def autocut(partial = true)
15
- print "\r\n\r\n\r\n"
16
- print partial ? "\x1B\x64\x31" : "\x1B\x64\x30"
17
- end
13
+
18
14
  end
19
15
  end
@@ -12,5 +12,39 @@ module Extface
12
12
  REPORT = false #only transmit data that must be parsed by handler, CDR, report devices
13
13
 
14
14
  has_serial_config
15
+
16
+ def handle(buffer)
17
+ #expecting only 1 status byte, move it to receive_buffer
18
+ rpush buffer
19
+ return buffer.length # return number of bytes processed
20
+ end
21
+
22
+ def autocut(partial = true)
23
+ # <ESC> “d” “0” - Full-cut command
24
+ # <ESC> “d” “1” - Partial-cut command
25
+ push "\r\n\r\n\r\n"
26
+ push partial ? "\x1B\x64\x31" : "\x1B\x64\x30"
27
+ end
28
+
29
+ def check_status
30
+ flush
31
+ push "\x05" # <ENQ> - Causes the printer to transmit a status byte
32
+ if status = pull(3) #wait 3 sec for data
33
+ human_status_errors(status)
34
+ return errors.empty?
35
+ else
36
+ errors.add :base, "No data received from device"
37
+ return false
38
+ end
39
+ end
40
+
41
+ def human_status_errors(status_byte)
42
+ errors.add :base, "Vertical parity error" unless (status_byte.ord & 0x01).zero?
43
+ errors.add :base, "Framing error" unless (status_byte.ord & 0x02).zero?
44
+ errors.add :base, "Mechanical error" unless (status_byte.ord & 0x04).zero?
45
+ errors.add :base, "Receipt paper empty" unless (status_byte.ord & 0x08).zero?
46
+ errors.add :base, "Buffer overflow" unless (status_byte.ord & 0x40).zero?
47
+ end
48
+
15
49
  end
16
50
  end
@@ -65,10 +65,20 @@
65
65
  </dl>
66
66
 
67
67
  <hr />
68
+
68
69
  <% if @device.print? %>
69
70
  <%= button_to 'Print Test Page', test_page_device_path(@device), remote: true, name: :test_page, value: true, class: 'btn btn-warning' %>
70
71
  <% end %>
71
72
 
73
+ <br />Simulate push data from device
74
+
75
+ <div class="input-group">
76
+ <input type="text" id='data' class="form-control">
77
+ <span class="input-group-btn">
78
+ <%= link_to 'Push', extface.push_url(@device.uuid), id: :push, class: 'btn btn-warning'%>
79
+ </span>
80
+ </div><!-- /input-group -->
81
+
72
82
  <h1>Jobs</h1>
73
83
  <table class='table'>
74
84
  <thead>
@@ -4,6 +4,7 @@
4
4
  <title>Extface&hearts;</title>
5
5
  <%= stylesheet_link_tag "extface/application", media: "all" %>
6
6
  <%= stylesheet_link_tag "http://getbootstrap.com/dist/css/bootstrap.min.css", medis: :all %>
7
+ <%= javascript_include_tag "http://code.jquery.com/jquery-latest.min.js" %>
7
8
  <%= javascript_include_tag "extface/application" %>
8
9
  <%= csrf_meta_tags %>
9
10
  </head>
data/lib/extface.rb CHANGED
@@ -2,7 +2,6 @@ require "extface/engine"
2
2
  require "extface/routes"
3
3
  require "extface/mapping"
4
4
  require "extface/extfaceable"
5
- require "extface/extfaceable"
6
5
  require "redis-namespace"
7
6
  module Extface
8
7
  RAW_DRIVER = "Raw Communication Devices"
@@ -2,7 +2,7 @@ module Extface
2
2
  class Mapping
3
3
  attr_reader :name, :i_klass, :i_param, :i_find_key, :i_extra_module
4
4
  def initialize(resource, options)
5
- @name = options[:as] || resource.to_s
5
+ @name = (options[:as] || resource).to_s
6
6
 
7
7
  @i_klass = (options[:interfaceable_type] || name.to_s.classify).to_s.constantize
8
8
 
@@ -12,7 +12,7 @@ module Extface
12
12
  # :uuid then find_by! :uuid => params[:uuid]
13
13
  # :shop_uuid then find_by! :uuid => params[:shop_uuid]
14
14
  # :shop_id then find_by! :id => params[:shop_id]
15
- @i_find_key = @i_param[/^(#{@name}_|)(\w+)/,2]
15
+ @i_find_key = @i_param[/^(#{resource}_|)(\w+)/,2]
16
16
  # FIXME not before schema load
17
17
  #raise "#{@i_klass.name} has no method #{@i_find_key}" unless @i_klass.new.respond_to? @i_find_key
18
18
  #raise "Did you forget to add 'has_extface_devices' in #{@i_klass.name} ?" unless @i_klass.new.respond_to? :extface_devices
@@ -1,3 +1,3 @@
1
1
  module Extface
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Vangelov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-04 00:00:00.000000000 Z
11
+ date: 2014-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: redis
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: redis-namespace
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: Extface allows use of Cash Registers, Fiscal and POS printers without
@@ -76,138 +76,116 @@ executables: []
76
76
  extensions: []
77
77
  extra_rdoc_files: []
78
78
  files:
79
- - MIT-LICENSE
80
- - README.rdoc
81
- - Rakefile
82
- - app/assets/javascripts/extface/application.js
83
- - app/assets/javascripts/extface/devices.js
84
- - app/assets/javascripts/extface/jobs.js
85
- - app/assets/stylesheets/extface/application.css
79
+ - app/views/extface/application/_object_errors.html.erb
80
+ - app/views/extface/jobs/_form.html.erb
81
+ - app/views/extface/jobs/index.html.erb
82
+ - app/views/extface/jobs/new.html.erb
83
+ - app/views/extface/jobs/edit.html.erb
84
+ - app/views/extface/jobs/show.html.erb
85
+ - app/views/extface/serial_configs/_settings.html.erb
86
+ - app/views/extface/devices/index.html.erb
87
+ - app/views/extface/devices/form.html.erb
88
+ - app/views/extface/devices/show.html.erb
89
+ - app/views/extface/driver/star_tsp200/_settings.html.erb
90
+ - app/views/extface/driver/star_scp700/_settings.html.erb
91
+ - app/views/extface/driver/generic_pos/_settings.html.erb
92
+ - app/views/layouts/extface/application.html.erb
93
+ - app/helpers/extface/devices_helper.rb
94
+ - app/helpers/extface/application_helper.rb
95
+ - app/helpers/extface/sse_helper.rb
96
+ - app/helpers/extface/jobs_helper.rb
97
+ - app/assets/stylesheets/extface/sse.css
86
98
  - app/assets/stylesheets/extface/devices.css
87
99
  - app/assets/stylesheets/extface/jobs.css
88
- - app/assets/stylesheets/extface/sse.css
89
- - app/controllers/extface/application_controller.rb
100
+ - app/assets/stylesheets/extface/application.css
101
+ - app/assets/javascripts/extface/devices.js
102
+ - app/assets/javascripts/extface/jobs.js
103
+ - app/assets/javascripts/extface/application.js
90
104
  - app/controllers/extface/devices_controller.rb
91
- - app/controllers/extface/handler_controller.rb
105
+ - app/controllers/extface/application_controller.rb
92
106
  - app/controllers/extface/jobs_controller.rb
93
- - app/helpers/extface/application_helper.rb
94
- - app/helpers/extface/devices_helper.rb
95
- - app/helpers/extface/jobs_helper.rb
96
- - app/helpers/extface/sse_helper.rb
107
+ - app/controllers/extface/handler_controller.rb
97
108
  - app/models/extface/device.rb
109
+ - app/models/extface/serial_config.rb
110
+ - app/models/extface/job.rb
98
111
  - app/models/extface/driver.rb
99
- - app/models/extface/driver/generic_pos.rb
112
+ - app/models/extface/driver/epson/fiscal.rb
113
+ - app/models/extface/driver/epson/esc_pos.rb
114
+ - app/models/extface/driver/epson_tm_u220.rb
100
115
  - app/models/extface/driver/star_scp700.rb
116
+ - app/models/extface/driver/generic_pos.rb
101
117
  - app/models/extface/driver/star_tsp200.rb
102
- - app/models/extface/job.rb
103
- - app/models/extface/serial_config.rb
104
- - app/views/extface/application/_object_errors.html.erb
105
- - app/views/extface/devices/form.html.erb
106
- - app/views/extface/devices/index.html.erb
107
- - app/views/extface/devices/show.html.erb
108
- - app/views/extface/driver/generic_pos/_settings.html.erb
109
- - app/views/extface/driver/star_scp700/_settings.html.erb
110
- - app/views/extface/driver/star_tsp200/_settings.html.erb
111
- - app/views/extface/jobs/_form.html.erb
112
- - app/views/extface/jobs/edit.html.erb
113
- - app/views/extface/jobs/index.html.erb
114
- - app/views/extface/jobs/new.html.erb
115
- - app/views/extface/jobs/show.html.erb
116
- - app/views/extface/serial_configs/_settings.html.erb
117
- - app/views/layouts/extface/application.html.erb
118
118
  - config/routes.rb
119
- - db/migrate/20140215192111_create_extface_devices.rb
120
- - db/migrate/20140216110018_create_extface_pos_print_drivers.rb
121
- - db/migrate/20140216110608_create_extface_serial_configs.rb
122
- - db/migrate/20140216131245_create_extface_raw_drivers.rb
123
- - db/migrate/20140216131457_create_extface_fiscal_print_drivers.rb
124
- - db/migrate/20140216134748_create_extface_pbx_cdr_drivers.rb
125
- - db/migrate/20140219091811_create_extface_jobs.rb
126
- - db/migrate/20140219175006_add_job_info_to_extface_jobs.rb
119
+ - db/migrate/20140303123022_change_polymorphic_to_has_one_to_extface_serial_configs.rb
127
120
  - db/migrate/20140303112124_create_extface_drivers.rb
128
- - db/migrate/20140303113217_drop_separate_driver_type_tables.rb
129
121
  - db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
130
- - db/migrate/20140303123022_change_polymorphic_to_has_one_to_extface_serial_configs.rb
122
+ - db/migrate/20140216110608_create_extface_serial_configs.rb
123
+ - db/migrate/20140219175006_add_job_info_to_extface_jobs.rb
124
+ - db/migrate/20140215192111_create_extface_devices.rb
125
+ - db/migrate/20140219091811_create_extface_jobs.rb
131
126
  - lib/extface.rb
132
- - lib/extface/engine.rb
127
+ - lib/tasks/extface_tasks.rake
133
128
  - lib/extface/extfaceable.rb
134
129
  - lib/extface/mapping.rb
135
130
  - lib/extface/routes.rb
131
+ - lib/extface/engine.rb
136
132
  - lib/extface/version.rb
137
- - lib/tasks/extface_tasks.rake
138
- - test/controllers/extface/devices_controller_test.rb
139
- - test/controllers/extface/jobs_controller_test.rb
133
+ - MIT-LICENSE
134
+ - Rakefile
135
+ - README.rdoc
136
+ - test/extface_test.rb
137
+ - test/integration/navigation_test.rb
138
+ - test/dummy/db/schema.rb
139
+ - test/dummy/db/migrate/20140221203517_create_shops.rb
140
140
  - test/dummy/README.rdoc
141
+ - test/dummy/config.ru
142
+ - test/dummy/config/database.yml
143
+ - test/dummy/config/locales/en.yml
144
+ - test/dummy/config/initializers/inflections.rb
145
+ - test/dummy/config/initializers/wrap_parameters.rb
146
+ - test/dummy/config/initializers/secret_token.rb
147
+ - test/dummy/config/initializers/backtrace_silencers.rb
148
+ - test/dummy/config/initializers/session_store.rb
149
+ - test/dummy/config/initializers/filter_parameter_logging.rb
150
+ - test/dummy/config/initializers/mime_types.rb
151
+ - test/dummy/config/environments/test.rb
152
+ - test/dummy/config/environments/development.rb
153
+ - test/dummy/config/environments/production.rb
154
+ - test/dummy/config/routes.rb
155
+ - test/dummy/config/boot.rb
156
+ - test/dummy/config/application.rb
157
+ - test/dummy/config/environment.rb
141
158
  - test/dummy/Rakefile
142
- - test/dummy/app/assets/javascripts/application.js
159
+ - test/dummy/app/views/layouts/application.html.erb
160
+ - test/dummy/app/helpers/application_helper.rb
143
161
  - test/dummy/app/assets/stylesheets/application.css
162
+ - test/dummy/app/assets/javascripts/application.js
144
163
  - test/dummy/app/controllers/application_controller.rb
145
- - test/dummy/app/helpers/application_helper.rb
146
164
  - test/dummy/app/models/shop.rb
147
- - test/dummy/app/views/layouts/application.html.erb
148
165
  - test/dummy/bin/bundle
149
166
  - test/dummy/bin/rails
150
167
  - test/dummy/bin/rake
151
- - test/dummy/config.ru
152
- - test/dummy/config/application.rb
153
- - test/dummy/config/boot.rb
154
- - test/dummy/config/database.yml
155
- - test/dummy/config/environment.rb
156
- - test/dummy/config/environments/development.rb
157
- - test/dummy/config/environments/production.rb
158
- - test/dummy/config/environments/test.rb
159
- - test/dummy/config/initializers/backtrace_silencers.rb
160
- - test/dummy/config/initializers/filter_parameter_logging.rb
161
- - test/dummy/config/initializers/inflections.rb
162
- - test/dummy/config/initializers/mime_types.rb
163
- - test/dummy/config/initializers/secret_token.rb
164
- - test/dummy/config/initializers/session_store.rb
165
- - test/dummy/config/initializers/wrap_parameters.rb
166
- - test/dummy/config/locales/en.yml
167
- - test/dummy/config/routes.rb
168
- - test/dummy/db/development.sqlite3
169
- - test/dummy/db/migrate/20140221203517_create_shops.rb
170
- - test/dummy/db/schema.rb
171
- - test/dummy/db/test.sqlite3
172
- - test/dummy/log/development.log
173
- - test/dummy/log/test.log
174
168
  - test/dummy/public/404.html
175
- - test/dummy/public/422.html
176
169
  - test/dummy/public/500.html
177
170
  - test/dummy/public/favicon.ico
178
- - test/dummy/tmp/cache/assets/test/sprockets/0a8a23b1a73ebf217f4e2b765013ce7b
179
- - test/dummy/tmp/cache/assets/test/sprockets/21fb58a50e25d1170f2c7d5bd5d29c54
180
- - test/dummy/tmp/cache/assets/test/sprockets/263375f2d55c31687ed052f99ddead55
181
- - test/dummy/tmp/cache/assets/test/sprockets/3f4ff460a79b2e29781690193a3960f6
182
- - test/dummy/tmp/cache/assets/test/sprockets/4ef10b222fde3c042209a46daf3d3e36
183
- - test/dummy/tmp/cache/assets/test/sprockets/544650645bc510ef8fbee0043c41fdcf
184
- - test/dummy/tmp/cache/assets/test/sprockets/6dbf2b0443792e51055710be15c83197
185
- - test/dummy/tmp/cache/assets/test/sprockets/717acb3e7c0df18696cf1bc56de6d3d5
186
- - test/dummy/tmp/cache/assets/test/sprockets/9891cbb0808f38b2c42f42fd89e662a4
187
- - test/dummy/tmp/cache/assets/test/sprockets/9b178820b9dc8c81c9784cf7ee3b7d35
188
- - test/dummy/tmp/cache/assets/test/sprockets/a06a4a7f51754a6a2c0694eb39ff824b
189
- - test/dummy/tmp/cache/assets/test/sprockets/a8cc2e73253025d2518d2449e16e5266
190
- - test/dummy/tmp/cache/assets/test/sprockets/b56dfad0b14283f2cc10c62f37d71cc7
191
- - test/dummy/tmp/cache/assets/test/sprockets/e1197e0129ade843b08de0b45c47fc40
192
- - test/dummy/tmp/cache/assets/test/sprockets/ece3270b150db7c668579bb91ac7e2e5
193
- - test/dummy/tmp/cache/assets/test/sprockets/f018ab87f3490dbbcbc2e3c9f36aed3d
194
- - test/extface_test.rb
195
- - test/fixtures/extface/devices.yml
196
- - test/fixtures/extface/drivers.yml
197
- - test/fixtures/extface/jobs.yml
198
- - test/fixtures/extface/serial_configs.yml
199
- - test/fixtures/shops.yml
200
- - test/helpers/extface/devices_helper_test.rb
171
+ - test/dummy/public/422.html
201
172
  - test/helpers/extface/jobs_helper_test.rb
173
+ - test/helpers/extface/devices_helper_test.rb
202
174
  - test/helpers/extface/sse_helper_test.rb
203
- - test/integration/navigation_test.rb
175
+ - test/controllers/extface/jobs_controller_test.rb
176
+ - test/controllers/extface/devices_controller_test.rb
177
+ - test/models/extface/serial_config_test.rb
178
+ - test/models/extface/job_test.rb
204
179
  - test/models/extface/device_test.rb
180
+ - test/models/extface/driver_test.rb
205
181
  - test/models/extface/driver/generic_pos_test.rb
206
182
  - test/models/extface/driver/star_scp700_test.rb
207
183
  - test/models/extface/driver/star_tsp200_test.rb
208
- - test/models/extface/driver_test.rb
209
- - test/models/extface/job_test.rb
210
- - test/models/extface/serial_config_test.rb
184
+ - test/fixtures/shops.yml
185
+ - test/fixtures/extface/drivers.yml
186
+ - test/fixtures/extface/serial_configs.yml
187
+ - test/fixtures/extface/devices.yml
188
+ - test/fixtures/extface/jobs.yml
211
189
  - test/test_helper.rb
212
190
  homepage: http://extface.com
213
191
  licenses: []
@@ -218,92 +196,72 @@ require_paths:
218
196
  - lib
219
197
  required_ruby_version: !ruby/object:Gem::Requirement
220
198
  requirements:
221
- - - '>='
199
+ - - ! '>='
222
200
  - !ruby/object:Gem::Version
223
201
  version: '0'
224
202
  required_rubygems_version: !ruby/object:Gem::Requirement
225
203
  requirements:
226
- - - '>='
204
+ - - ! '>='
227
205
  - !ruby/object:Gem::Version
228
206
  version: '0'
229
207
  requirements: []
230
208
  rubyforge_project:
231
- rubygems_version: 2.2.2
209
+ rubygems_version: 2.1.10
232
210
  signing_key:
233
211
  specification_version: 4
234
212
  summary: External Interfaces for Cloud-Based Applications (Rails 4)
235
213
  test_files:
236
- - test/fixtures/extface/serial_configs.yml
237
- - test/fixtures/extface/devices.yml
238
- - test/fixtures/extface/drivers.yml
239
- - test/fixtures/extface/jobs.yml
240
- - test/fixtures/shops.yml
241
- - test/test_helper.rb
242
- - test/controllers/extface/devices_controller_test.rb
243
- - test/controllers/extface/jobs_controller_test.rb
244
- - test/dummy/tmp/cache/assets/test/sprockets/0a8a23b1a73ebf217f4e2b765013ce7b
245
- - test/dummy/tmp/cache/assets/test/sprockets/4ef10b222fde3c042209a46daf3d3e36
246
- - test/dummy/tmp/cache/assets/test/sprockets/ece3270b150db7c668579bb91ac7e2e5
247
- - test/dummy/tmp/cache/assets/test/sprockets/f018ab87f3490dbbcbc2e3c9f36aed3d
248
- - test/dummy/tmp/cache/assets/test/sprockets/e1197e0129ade843b08de0b45c47fc40
249
- - test/dummy/tmp/cache/assets/test/sprockets/b56dfad0b14283f2cc10c62f37d71cc7
250
- - test/dummy/tmp/cache/assets/test/sprockets/6dbf2b0443792e51055710be15c83197
251
- - test/dummy/tmp/cache/assets/test/sprockets/9b178820b9dc8c81c9784cf7ee3b7d35
252
- - test/dummy/tmp/cache/assets/test/sprockets/21fb58a50e25d1170f2c7d5bd5d29c54
253
- - test/dummy/tmp/cache/assets/test/sprockets/544650645bc510ef8fbee0043c41fdcf
254
- - test/dummy/tmp/cache/assets/test/sprockets/9891cbb0808f38b2c42f42fd89e662a4
255
- - test/dummy/tmp/cache/assets/test/sprockets/263375f2d55c31687ed052f99ddead55
256
- - test/dummy/tmp/cache/assets/test/sprockets/717acb3e7c0df18696cf1bc56de6d3d5
257
- - test/dummy/tmp/cache/assets/test/sprockets/3f4ff460a79b2e29781690193a3960f6
258
- - test/dummy/tmp/cache/assets/test/sprockets/a8cc2e73253025d2518d2449e16e5266
259
- - test/dummy/tmp/cache/assets/test/sprockets/a06a4a7f51754a6a2c0694eb39ff824b
260
- - test/dummy/config.ru
261
- - test/dummy/log/development.log
262
- - test/dummy/log/test.log
263
- - test/dummy/db/development.sqlite3
264
- - test/dummy/db/migrate/20140221203517_create_shops.rb
265
- - test/dummy/db/test.sqlite3
214
+ - test/extface_test.rb
215
+ - test/integration/navigation_test.rb
266
216
  - test/dummy/db/schema.rb
217
+ - test/dummy/db/migrate/20140221203517_create_shops.rb
267
218
  - test/dummy/README.rdoc
268
- - test/dummy/app/views/layouts/application.html.erb
269
- - test/dummy/app/controllers/application_controller.rb
270
- - test/dummy/app/helpers/application_helper.rb
271
- - test/dummy/app/assets/javascripts/application.js
272
- - test/dummy/app/assets/stylesheets/application.css
273
- - test/dummy/app/models/shop.rb
274
- - test/dummy/config/application.rb
275
- - test/dummy/config/locales/en.yml
276
- - test/dummy/config/boot.rb
277
- - test/dummy/config/environments/test.rb
278
- - test/dummy/config/environments/production.rb
279
- - test/dummy/config/environments/development.rb
280
- - test/dummy/config/routes.rb
281
- - test/dummy/config/environment.rb
219
+ - test/dummy/config.ru
282
220
  - test/dummy/config/database.yml
283
- - test/dummy/config/initializers/wrap_parameters.rb
221
+ - test/dummy/config/locales/en.yml
284
222
  - test/dummy/config/initializers/inflections.rb
285
- - test/dummy/config/initializers/session_store.rb
223
+ - test/dummy/config/initializers/wrap_parameters.rb
286
224
  - test/dummy/config/initializers/secret_token.rb
287
225
  - test/dummy/config/initializers/backtrace_silencers.rb
226
+ - test/dummy/config/initializers/session_store.rb
288
227
  - test/dummy/config/initializers/filter_parameter_logging.rb
289
228
  - test/dummy/config/initializers/mime_types.rb
290
- - test/dummy/bin/rake
229
+ - test/dummy/config/environments/test.rb
230
+ - test/dummy/config/environments/development.rb
231
+ - test/dummy/config/environments/production.rb
232
+ - test/dummy/config/routes.rb
233
+ - test/dummy/config/boot.rb
234
+ - test/dummy/config/application.rb
235
+ - test/dummy/config/environment.rb
236
+ - test/dummy/Rakefile
237
+ - test/dummy/app/views/layouts/application.html.erb
238
+ - test/dummy/app/helpers/application_helper.rb
239
+ - test/dummy/app/assets/stylesheets/application.css
240
+ - test/dummy/app/assets/javascripts/application.js
241
+ - test/dummy/app/controllers/application_controller.rb
242
+ - test/dummy/app/models/shop.rb
291
243
  - test/dummy/bin/bundle
292
244
  - test/dummy/bin/rails
293
- - test/dummy/public/favicon.ico
294
- - test/dummy/public/500.html
245
+ - test/dummy/bin/rake
295
246
  - test/dummy/public/404.html
247
+ - test/dummy/public/500.html
248
+ - test/dummy/public/favicon.ico
296
249
  - test/dummy/public/422.html
297
- - test/dummy/Rakefile
298
- - test/helpers/extface/sse_helper_test.rb
299
- - test/helpers/extface/devices_helper_test.rb
300
250
  - test/helpers/extface/jobs_helper_test.rb
301
- - test/extface_test.rb
302
- - test/integration/navigation_test.rb
251
+ - test/helpers/extface/devices_helper_test.rb
252
+ - test/helpers/extface/sse_helper_test.rb
253
+ - test/controllers/extface/jobs_controller_test.rb
254
+ - test/controllers/extface/devices_controller_test.rb
255
+ - test/models/extface/serial_config_test.rb
303
256
  - test/models/extface/job_test.rb
257
+ - test/models/extface/device_test.rb
258
+ - test/models/extface/driver_test.rb
304
259
  - test/models/extface/driver/generic_pos_test.rb
305
260
  - test/models/extface/driver/star_scp700_test.rb
306
261
  - test/models/extface/driver/star_tsp200_test.rb
307
- - test/models/extface/serial_config_test.rb
308
- - test/models/extface/device_test.rb
309
- - test/models/extface/driver_test.rb
262
+ - test/fixtures/shops.yml
263
+ - test/fixtures/extface/drivers.yml
264
+ - test/fixtures/extface/serial_configs.yml
265
+ - test/fixtures/extface/devices.yml
266
+ - test/fixtures/extface/jobs.yml
267
+ - test/test_helper.rb