nali 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,9 +18,9 @@ module Nali
18
18
  if message[ :nali_browser_id ]
19
19
  client.browser_id = message[ :nali_browser_id ]
20
20
  client_connected( client ) if respond_to?( :client_connected )
21
- client.send_json action: :onOpen
21
+ client.send_json action: :_onOpen
22
22
  elsif message[ :ping ]
23
- client.send_json action: :pong
23
+ client.send_json action: :_pong
24
24
  elsif message[ :controller ]
25
25
  name = message[ :controller ].capitalize + 'Controller'
26
26
  if Math.const_defined?( name ) and controller = Object.const_get( name )
@@ -70,7 +70,7 @@ module EventMachine
70
70
  unless params.empty?
71
71
  if model.destroyed? then unwatch( model ) else watch_time_up model end
72
72
  relations.each { |relation| sync relation }
73
- send_json action: :sync, params: params
73
+ send_json action: :_sync, params: params
74
74
  end
75
75
  end
76
76
  end
@@ -79,12 +79,12 @@ module EventMachine
79
79
 
80
80
  def call_method( method, model, params = nil )
81
81
  model = "#{ model.class.name }.#{ model.id }" if model.is_a?( ActiveRecord::Base )
82
- send_json action: 'callMethod', model: model, method: method, params: params
82
+ send_json action: :_callMethod, model: model, method: method, params: params
83
83
  self
84
84
  end
85
85
 
86
86
  def notice( method, params = nil )
87
- call_method method, 'Notice', params
87
+ call_method method, :Notice, params
88
88
  self
89
89
  end
90
90
 
@@ -104,7 +104,7 @@ module EventMachine
104
104
  end
105
105
 
106
106
  def app_run( method, params = nil )
107
- send_json action: 'appRun', method: method, params: params
107
+ send_json action: :_appRun, method: method, params: params
108
108
  self
109
109
  end
110
110
 
@@ -69,11 +69,11 @@ module Nali
69
69
  end
70
70
 
71
71
  def trigger_success( params = nil )
72
- client.send_json( { action: 'success', params: params, journal_id: @message[ :journal_id ] } )
72
+ client.send_json( { action: :_success, params: params, journal_id: @message[ :journal_id ] } )
73
73
  end
74
74
 
75
75
  def trigger_failure( params = nil )
76
- client.send_json( { action: 'failure', params: params, journal_id: @message[ :journal_id ] } )
76
+ client.send_json( { action: :_failure, params: params, journal_id: @message[ :journal_id ] } )
77
77
  end
78
78
 
79
79
  def before( &closure )
@@ -8,7 +8,7 @@ module Sprockets
8
8
  id = arr[1] + '_' + arr[0].split( '.' )[0]
9
9
  asset = environment[ path ]
10
10
  template = asset.body.force_encoding( 'UTF-8' ).strip.gsub( /\n\s*\n/, "\n" ).gsub( "\n", "\n " )
11
- result += %Q(\n <script type=\"text/template\" id=\"#{ id }\">\n #{ template }\n </script>)
11
+ result += %Q(\n <script type="text/template" id="#{ id }">\n #{ template }\n </script>)
12
12
  depend_on asset.pathname
13
13
  end
14
14
  result
@@ -54,7 +54,7 @@ module Nali
54
54
  end
55
55
 
56
56
  def sync_initial( params )
57
- params[ :_name ] = self.class.name
57
+ params[ :name ] = self.class.name
58
58
  params[ :attributes ] = { id: self.id }
59
59
  end
60
60
 
@@ -63,6 +63,9 @@ module Nali
63
63
 
64
64
  def sprockets_tasks
65
65
  require 'rake/sprocketstask'
66
+ Sprockets::Helpers.configure do |config|
67
+ config.debug = false
68
+ end
66
69
  Rake::SprocketsTask.new do |task|
67
70
  task.environment = @settings.client
68
71
  task.output = File.join( @settings.public_folder, 'client' )
@@ -1,5 +1,5 @@
1
1
  module Nali
2
2
 
3
- VERSION = '0.4.2'
3
+ VERSION = '0.4.3'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nali
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-26 00:00:00.000000000 Z
12
+ date: 2015-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thin